Skip to content
  • Raymond Toy's avatar
    Fix incorrect value from INTEGER-DECODE-FLOAT for denormals. · 315ea234
    Raymond Toy authored
    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.
    315ea234