diff options
| author | Martin Möhrmann <martisch@uos.de> | 2015-01-07 19:56:06 +0100 |
|---|---|---|
| committer | Robert Griesemer <gri@golang.org> | 2015-01-15 00:15:58 +0000 |
| commit | d1210acffd19482a0471f68d62baf10695fee8b9 (patch) | |
| tree | 745f4c7b2010764fba640d69299df8c173639387 /src/encoding | |
| parent | 3b63b69d2f16be676d4fdc4f4ac697ed92abf523 (diff) | |
| download | go-d1210acffd19482a0471f68d62baf10695fee8b9.tar.xz | |
time: correctly parse large input durations and avoid precision loss
Do not lose precision for durations specified without fractions
that can be represented by an int64 such as 1<<53+1 nanoseconds.
Previously there was some precision lost in floating point conversion.
Handle overflow for durations above 1<<63-1 nanoseconds but not earlier.
Add tests to cover the above cases.
Change-Id: I4bcda93cee1673e501ecb6a9eef3914ee29aecd2
Reviewed-on: https://go-review.googlesource.com/2461
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Diffstat (limited to 'src/encoding')
0 files changed, 0 insertions, 0 deletions
