]> Cypherpunks repositories - gostls13.git/commit
math/big: multi-precision Floats (starting point)
authorRobert Griesemer <gri@golang.org>
Mon, 8 Dec 2014 22:36:39 +0000 (14:36 -0800)
committerRobert Griesemer <gri@golang.org>
Sat, 24 Jan 2015 05:17:27 +0000 (05:17 +0000)
commitbd275b238179cdaca2c01a0bf1ac60a16fbf5a98
treea3bbf32c663aa010156f9b05b1be23f5ee48b273
parent571d02d9fef357ffb7ffe341d30164123f686efb
math/big: multi-precision Floats (starting point)

Implemented:
- +, -, *, /, and some unary ops
- all rounding modes
- basic conversions
- string to float conversion
- tests

Missing:
- float to string conversion, formatting
- handling of +/-0 and +/-inf (under- and overflow)
- various TODOs and cleanups

With precision set to 24 or 53, the results match
float32 or float64 operations exactly (excluding
NaNs and denormalized numbers which will not be
supported).

Change-Id: I3121e90fc4b1528e40bb6ff526008da18b3c6520
Reviewed-on: https://go-review.googlesource.com/1218
Reviewed-by: Alan Donovan <adonovan@google.com>
src/math/big/float.go [new file with mode: 0644]
src/math/big/float_test.go [new file with mode: 0644]
src/math/big/int.go
src/math/big/nat.go
src/math/big/nat_test.go
src/math/big/rat.go