]> Cypherpunks repositories - gostls13.git/commitdiff
math/big: better documentation for Rat.Float64
authorRobert Griesemer <gri@golang.org>
Mon, 29 Jul 2013 20:06:34 +0000 (13:06 -0700)
committerRobert Griesemer <gri@golang.org>
Mon, 29 Jul 2013 20:06:34 +0000 (13:06 -0700)
R=adonovan, r
CC=golang-dev
https://golang.org/cl/11961043

src/pkg/math/big/rat.go

index 75d044fe21dbefccae972b5220ae907a46f6e791..39791ec6d88440e8e5cd720759670ced78c2a0d2 100644 (file)
@@ -164,8 +164,9 @@ func quotToFloat(a, b nat) (f float64, exact bool) {
 }
 
 // Float64 returns the nearest float64 value for x and a bool indicating
-// whether f represents x exactly. The sign of f always matches the sign
-// of x, even if f == 0.
+// whether f represents x exactly. If the magnitude of x is too large to
+// be represented by a float64, f is an infinity and exact is false.
+// The sign of f always matches the sign of x, even if f == 0.
 func (x *Rat) Float64() (f float64, exact bool) {
        b := x.b.abs
        if len(b) == 0 {