• Robert Griesemer's avatar
    math/big: fix Float.Float32 conversion for denormal corner cases · 79afb43a
    Robert Griesemer authored
    The existing code was incorrect for numbers that after rounding would
    become the smallest denormal float32 (instead the result was 0). This
    caused all.bash to fail if Float32() were used in the compiler for
    constant arithmetic (there's currently a work-around - see also issue
    10321.
    
    This change fixes the implementation of Float.Float32 and adds
    corresponding test cases. Float32 and Float64 diverge at this point.
    For ease of review, this change only fixes Float32. Float64 will be
    made to match in a subsequent change.
    
    Fixes #10321.
    
    Change-Id: Iccafe37c1593a4946bc552e4ad2045f69be62d80
    Reviewed-on: https://go-review.googlesource.com/10350Reviewed-by: 's avatarAlan Donovan <adonovan@google.com>
    79afb43a
Name
Last commit
Last update
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...