Created
June 6, 2018 06:41
-
-
Save zunda/a4b238a6f0b5d4149e34a9777458fcdb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"math" | |
) | |
func main() { | |
x := 1.0 - math.Pow(2.0, -52) | |
y := math.Cbrt(x) | |
fmt.Printf("%20.17f %20.17f\n", x, y) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ go version | |
go version go1.8.3 linux/amd64 | |
$ go run main.go | |
0.99999999999999978 0.99999999999999989 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment