[squeak-dev] Daily Commit Log

commits at source.squeak.org commits at source.squeak.org
Tue Dec 23 23:55:02 UTC 2014

Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours:


Name: Kernel-nice.892
Ancestors: Kernel-eem.891

Fix Float class>>fromIEEE32Bit: in the case of gradual underflow again...


A single precision (32bits) float gradual underflow is of the form
biased exponent = 0 (-127 unbiased, but true value to take into account is -126)
significand of the form 0.bbb....b (23 bit after the floating point, no implied 1)

Once converted to double precision, this will not underflow...

So we must shift the significand left until the highest bit pass left of the floating point :
for example 0.001b...b ==> 1.b...b000
adjust the exponent (which is -126) by same number of shift (-129 in this example since there are 3 shifts)
then remove the leading bit left of floating point - it is already taken into account as the implied 1 now that we do not underflow.


More information about the Squeak-dev mailing list