• Robert Griesemer's avatar
    spec: require 16 bit minimum exponent in constants rather than 32 · 8fbfdad2
    Robert Griesemer authored
    A 16bit binary exponent permits a constant range covering roughly the range
    from 7e-9865 to 7e9863 which is more than enough for any practical and
    hypothetical constant arithmetic.
    
    Furthermore, until recently cmd/compile could not handle very large exponents
    correctly anyway; i.e., the chance that any real programs (but for tests that
    explore corner cases) are affected are close to zero.
    
    Finally, restricting the minimum supported range significantly reduces the
    implementation complexity in an area that hardly matters in reality for new
    or alternative spec-compliant implementations that don't or cannot rely on
    pre-existing arbitratry precision arithmetic packages that support a 32bit
    exponent range.
    
    This is technically a language change but for the reasons mentioned above
    this is unlikely to affect any real programs, and certainly not programs
    compiled with the gc or gccgo compilers as they currently support up to
    32bit exponents.
    
    Fixes #13572.
    
    Change-Id: I970f919c57fc82c0175844364cf48ea335f17d39
    Reviewed-on: https://go-review.googlesource.com/17711Reviewed-by: 's avatarRob Pike <r@golang.org>
    Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
    8fbfdad2
Name
Last commit
Last update
..
articles Loading commit data...
codewalk Loading commit data...
devel Loading commit data...
gopher Loading commit data...
play Loading commit data...
progs Loading commit data...
asm.html Loading commit data...
cmd.html Loading commit data...
code.html Loading commit data...
conduct.html Loading commit data...
contrib.html Loading commit data...
contribute.html Loading commit data...
debugging_with_gdb.html Loading commit data...
docs.html Loading commit data...
effective_go.html Loading commit data...
gccgo_contribute.html Loading commit data...
gccgo_install.html Loading commit data...
go-logo-black.png Loading commit data...
go-logo-blue.png Loading commit data...
go-logo-white.png Loading commit data...
go1.1.html Loading commit data...
go1.2.html Loading commit data...
go1.3.html Loading commit data...
go1.4.html Loading commit data...
go1.5.html Loading commit data...
go1.6.html Loading commit data...
go1.7.html Loading commit data...
go1.8.txt Loading commit data...
go1.html Loading commit data...
go1compat.html Loading commit data...
go_faq.html Loading commit data...
go_mem.html Loading commit data...
go_spec.html Loading commit data...
help.html Loading commit data...
ie.css Loading commit data...
install-source.html Loading commit data...
install.html Loading commit data...
root.html Loading commit data...
security.html Loading commit data...
share.png Loading commit data...
tos.html Loading commit data...