1
0
mirror of https://github.com/golang/go synced 2024-11-20 08:54:40 -07:00
go/src
Martin Möhrmann d1210acffd 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>
2015-01-15 00:15:58 +00:00
..
archive archive/tar: document Reader.Next's behavior at the end 2014-12-30 21:38:37 +00:00
bufio bufio: add Reader.Discard 2015-01-07 06:37:57 +00:00
builtin
bytes
cmd liblink: adjustments for c2go conversion 2015-01-14 19:18:05 +00:00
compress compress/bzip2: s/repeat_power/repeatPower/ 2014-12-19 01:29:00 +00:00
container
crypto crypto/x509: add cert SmartOS cert path 2015-01-14 05:07:37 +00:00
database/sql database/sql: Remove unnecessary call to maybeOpenNewConnections 2014-12-24 02:39:12 +00:00
debug all: power64 is now ppc64 2014-12-05 19:13:20 -05:00
encoding encoding/gob: address go vet report 2014-12-28 19:30:31 +00:00
errors
expvar
flag flag: Check for Set error 2014-12-22 00:17:07 +00:00
fmt fmt: fix two typos 2015-01-04 23:07:43 +00:00
go cmd/cgo, go/build: finish a cleanup TODO 2015-01-08 00:59:37 +00:00
hash all: power64 is now ppc64 2014-12-05 19:13:20 -05:00
html html/template: fix build after encoding/js escaping change 2014-10-28 10:18:44 +11:00
image image/draw: fold TestClipWithNilMP into TestClip. 2015-01-14 06:04:13 +00:00
index/suffixarray
internal/syscall
io io: clarify Reader returning 0, nil 2014-09-16 10:01:28 -04:00
lib9
libbio
liblink liblink: adjustments for c2go conversion 2015-01-14 19:18:05 +00:00
log log: add global Output function 2015-01-12 04:45:38 +00:00
math math/big: faster assembly kernels for AddVx/SubVx for 386. 2015-01-08 20:58:59 +00:00
mime mime/multipart: moved some code to mime/internal/quotedprintable 2014-12-23 19:30:02 +00:00
net net/http: deflake TestResponseWriterWriteStringAllocs, test interface instead 2015-01-13 01:38:10 +00:00
os os: replace itod on posix with general itoa and fix possible infinite recursion 2015-01-02 16:21:18 +00:00
path path/filepath: remove named result parameter for VolumeName 2014-12-18 16:05:07 +00:00
reflect reflect: remove extra word in comment 2015-01-13 18:55:15 +00:00
regexp regexp: fix typo in comment: s/onpass/onepass/ 2014-12-24 07:30:28 +00:00
runtime runtime: fix *bsd/amd64 build 2015-01-14 23:58:36 +00:00
sort sort: reduce number of comparisons needed by medianOfThree 2015-01-13 19:37:02 +00:00
strconv strconv: speed up atoi for common cases 2015-01-08 20:58:26 +00:00
strings
sync sync/atomic: remove atomic pointer hammer tests 2015-01-06 00:28:22 +00:00
syscall syscall: match seek argument size to signature 2015-01-14 17:08:00 +00:00
testing testing/iotest: fix copy/paste error in comment 2014-12-29 19:05:37 +00:00
text text/template: fix bug in pipelined variadics 2014-10-18 11:22:05 -07:00
time time: correctly parse large input durations and avoid precision loss 2015-01-15 00:15:58 +00:00
unicode
unsafe unsafe: document that unsafe programs are not protected 2014-10-24 09:37:25 -07:00
all.bash
all.bat
all.rc
androidtest.bash
clean.bash
clean.bat
clean.rc
make.bash build: change all.bash output to be more markdown-friendly 2014-12-13 00:03:23 +00:00
make.bat build: change all.bash output to be more markdown-friendly 2014-12-13 00:03:23 +00:00
Make.dist
make.rc
nacltest.bash
race.bash
race.bat
run.bash cmd/cgo: remove obsolete -cdefs flag 2015-01-07 22:49:59 +00:00
run.bat build: change all.bash output to be more markdown-friendly 2014-12-13 00:03:23 +00:00
run.rc build: add GOTESTONLY environment test for Plan 9's run.rc 2015-01-08 04:35:23 +00:00
sudo.bash