]> Cypherpunks repositories - gostls13.git/commit
big: Improvements to Rat.SetString
authorEvan Shaw <chickencha@gmail.com>
Fri, 9 Jul 2010 18:24:31 +0000 (11:24 -0700)
committerRobert Griesemer <gri@golang.org>
Fri, 9 Jul 2010 18:24:31 +0000 (11:24 -0700)
commit2e00bf987782b4c514d428bb5dc5af87b8eb5dd5
tree4f9b6740bcde167a756d4c063eb2b1cb8c9650a4
parent56b3e5d644e737046d019516b577821b55f167fb
big: Improvements to Rat.SetString

* Allow an exponent part. This is necessary for exp/eval.
* Fix a bug for input that had no numbers after the decimal.
* In Int.SetString, allow a leading + sign.
* In Int.SetString, error if the input is "-" with no number.
* In nat.scan, normalize the resulting nat.

R=gri
CC=golang-dev
https://golang.org/cl/1733045
src/pkg/big/int.go
src/pkg/big/int_test.go
src/pkg/big/nat.go
src/pkg/big/rat.go
src/pkg/big/rat_test.go