Skip to content
Snippets Groups Projects
Commit 315ea234 authored by Raymond Toy's avatar Raymond Toy
Browse files

Fix incorrect value from INTEGER-DECODE-FLOAT for denormals.

This is a long standing bug where INTEGER-DECODE-FLOAT returned
incorrect values for denormal double-float numbers.  The lower 32 bits
of the double were not shifted enough when creating the integer
result.

As a side-effect, DECODE-FLOAT decodes denormal double-float's
correctly and SCALE-FLOAT scales denormals correctly too.

 * src/code/float.lisp:
   * Shift the lower 32-bit of the fraction one more time to adjust
     for the fact that the upper 20 bits were shifted an extra time.
 * tests/float.lisp:
   * Add several tests for INTEGER-DECODE-FLOAT, SCALE-FLOAT, and
     DECODE-FLOAT.
 * src/general-info/release-20f.txt:
   * Add this bug fix to the notes.
parent b3558268
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment