aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/mpallocbits_test.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2019-11-04 19:43:45 -0500
committerRuss Cox <rsc@golang.org>2019-11-07 14:51:06 +0000
commit543c6d2e0dcd24886fce6c00e84b7238c30c1c0b (patch)
treecd506c47eb8b8e6b400f2a689d7433fe9b180bec /src/runtime/mpallocbits_test.go
parent3b1ae308a40d4548f7dab84d22e62838fcdbb354 (diff)
downloadgo-543c6d2e0dcd24886fce6c00e84b7238c30c1c0b.tar.xz
math, cmd/compile: rename Fma to FMA
This API was added for #25819, where it was discussed as math.FMA. The commit adding it used math.Fma, presumably for consistency with the rest of the unusual names in package math (Sincos, Acosh, Erfcinv, Float32bits, etc). I believe that using an idiomatic Go name is more important here than consistency with these other names, most of which are historical baggage from C's standard library. Early additions like Float32frombits happened before "uppercase for export" (so they were originally like "float32frombits") and they were not properly reconsidered when we uppercased the symbols to export them. That's a mistake we live with. The names of functions we have added since then, and even a few that were legacy, are more properly Go-cased, such as IsNaN, IsInf, and RoundToEven, rather than Isnan, Isinf, and Roundtoeven. And also constants like MaxFloat32. For new API, we should keep using proper Go-cased symbols instead of minimally-upper-cased-C symbols. So math.FMA, not math.Fma. This API has not yet been released, so this change does not break the compatibility promise. This CL also modifies cmd/compile, since the compiler knows the name of the function. I could have stopped at changing the string constants, but it seemed to make more sense to use a consistent casing everywhere. Change-Id: I0f6f3407f41e99bfa8239467345c33945088896e Reviewed-on: https://go-review.googlesource.com/c/go/+/205317 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/runtime/mpallocbits_test.go')
0 files changed, 0 insertions, 0 deletions