]> Cypherpunks repositories - gostls13.git/commit
math/big: handling of +/-Inf and zero precision, enable zero values
authorRobert Griesemer <gri@golang.org>
Fri, 6 Feb 2015 01:21:48 +0000 (17:21 -0800)
committerRobert Griesemer <gri@golang.org>
Fri, 6 Feb 2015 17:21:01 +0000 (17:21 +0000)
commit15594df6b4e913d1ed9d7b38fa71868be28e9b63
treeba08ef6bf4aa3719f91bebed379790f0634a15a7
parent9b6ccb13233f2977c74c73ae836212c55d342d28
math/big: handling of +/-Inf and zero precision, enable zero values

- clarified representation of +/-Inf
- only 0 and Inf values can have 0 precision
- a zero precision value used as result value takes the max precision
  of the arguments (to be fine-tuned for setters)
- the zero precision approach makes Float zero values possible
  (they represent +0)
- more tests

Missing: Filling in the blanks. More tests.

Change-Id: Ibb4f97e12e1f356c3085ce80f3464e97b82ac130
Reviewed-on: https://go-review.googlesource.com/4000
Reviewed-by: Alan Donovan <adonovan@google.com>
src/math/big/float.go
src/math/big/float_test.go
src/math/big/floatconv.go
src/math/big/floatconv_test.go