aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/float.go
diff options
context:
space:
mode:
authorcui fliter <imcusg@gmail.com>2022-10-03 01:32:11 +0000
committerMeng Zhuo <mzh@golangcn.org>2022-10-26 02:39:39 +0000
commit069d1fc9e2085d93ea256b6c49b5d7c3026f79a3 (patch)
tree12d4cd9a7c68ce012166e0b8f74a9fe6c7259df8 /src/runtime/float.go
parent5d59fa143ae1d0d8fdcc677297ce58bbfc592111 (diff)
downloadgo-069d1fc9e2085d93ea256b6c49b5d7c3026f79a3.tar.xz
runtime: fix a few function names on comments
Change-Id: I4be0b1e612dcc21ca6bb7d4395f1c0aa52480759 GitHub-Last-Rev: 032480c4c9ddb2bedea26b01bb80b8a079bfdcf3 GitHub-Pull-Request: golang/go#55993 Reviewed-on: https://go-review.googlesource.com/c/go/+/437518 Reviewed-by: hopehook <hopehook@golangcn.org> Reviewed-by: Keith Randall <khr@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Carlos Amedee <carlos@golang.org> Reviewed-by: Keith Randall <khr@golang.org> Run-TryBot: hopehook <hopehook@golangcn.org>
Diffstat (limited to 'src/runtime/float.go')
-rw-r--r--src/runtime/float.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/runtime/float.go b/src/runtime/float.go
index c80c8b7abf..9f281c4045 100644
--- a/src/runtime/float.go
+++ b/src/runtime/float.go
@@ -24,12 +24,12 @@ func isInf(f float64) bool {
return !isNaN(f) && !isFinite(f)
}
-// Abs returns the absolute value of x.
+// abs returns the absolute value of x.
//
// Special cases are:
//
-// Abs(±Inf) = +Inf
-// Abs(NaN) = NaN
+// abs(±Inf) = +Inf
+// abs(NaN) = NaN
func abs(x float64) float64 {
const sign = 1 << 63
return float64frombits(float64bits(x) &^ sign)
@@ -42,12 +42,12 @@ func copysign(x, y float64) float64 {
return float64frombits(float64bits(x)&^sign | float64bits(y)&sign)
}
-// Float64bits returns the IEEE 754 binary representation of f.
+// float64bits returns the IEEE 754 binary representation of f.
func float64bits(f float64) uint64 {
return *(*uint64)(unsafe.Pointer(&f))
}
-// Float64frombits returns the floating point number corresponding
+// float64frombits returns the floating point number corresponding
// the IEEE 754 binary representation b.
func float64frombits(b uint64) float64 {
return *(*float64)(unsafe.Pointer(&b))