What is the easiest way to get the machine epsilon in Go? What about other aspects of floating point numbers such as precision, min exponent, max exponent, wobble, etc?
I realize that there is the math/const package with the max and min for the different float types (http://golang.org/src/pkg/math/const.go), but no other information.
One reason I would like to know is to verify that I've reached the maximum precision for a given calculation that the machine can do so that I don't quit to early or try longer then needed.
The other is just for curiosity.
Thanks
EDIT:
For the fun I looked up in some notes from school on how to calculate the epsilon manually for fun and here is a rough translation from c++ http://play.golang.org/p/XOXwIdNfsa enjoy
EDIT: comment from below (thanks for a more idiomatic way of finding epsilon):
Use epsilon := math.Nextafter(1, 2) - 1
Playground – Nick Craig-Wood Mar 5 at 8:07