There was no way to get to the error message before.
Change-Id: I4aa9d3d9f468c33f9996295bafcbed097de0389f
Reviewed-on: https://go-review.googlesource.com/8660
Reviewed-by: Alan Donovan <adonovan@google.com>
msg string
}
+// ErrNan implements the error interface.
+func (err ErrNaN) Error() string {
+ return err.msg
+}
+
// NewFloat allocates and returns a new Float set to x,
// with precision 53 and rounding mode ToNearestEven.
// NewFloat panics with ErrNaN if x is a NaN.
"testing"
)
+// Verify that ErrNaN implements the error interface.
+var _ error = ErrNaN{}
+
func (x *Float) uint64() uint64 {
u, acc := x.Uint64()
if acc != Exact {