Skip to content

Instantly share code, notes, and snippets.

@zunda
Created June 6, 2018 06:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zunda/a4b238a6f0b5d4149e34a9777458fcdb to your computer and use it in GitHub Desktop.
Save zunda/a4b238a6f0b5d4149e34a9777458fcdb to your computer and use it in GitHub Desktop.
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)
}
$ 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