]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/gc: use approx. float formatting in error messages
authorRobert Griesemer <gri@golang.org>
Sat, 4 Apr 2015 00:50:37 +0000 (17:50 -0700)
committerRobert Griesemer <gri@golang.org>
Tue, 7 Apr 2015 23:01:01 +0000 (23:01 +0000)
commitbb418a59f83f8dd19914522c58c1ba442dee522f
tree1867d29b6ca0077b11a4eab3caf71c98d4e60885
parentb643684febabf499205f92da06adb02a722ed225
cmd/internal/gc: use approx. float formatting in error messages

For very out-of-range floating-point constants (1e100000000),
precise formatting of the offending value for error messages
is not needed and potentially extremely slow.

This change resurrects an adjusted variant of the original code
which uses float64 formatting in the common case (in-range values),
and a fast manual approximation for out-of-range values.

Change-Id: I2f6e53040929b8bf924dac4bb27c4d811ede48e2
Reviewed-on: https://go-review.googlesource.com/8470
Reviewed-by: Alan Donovan <adonovan@google.com>
src/cmd/internal/gc/mparith3.go