Skip to content

Fix #166: integer-decode-float has incorrect type for exponent

Raymond Toy requested to merge issue-166-integer-decode-float-min-float into master

The underlying problem is that the compiler thinks integer-decode-float returns an exponent in the range -1074 to 1024, but that's not true. When the number is a denormal, the exponent can be less than -1074. And that confuses the compiler.

Thus, change the defknown for integer-decode-float to say it returns a float-int-exponent instead of float-exponent where we've added a new type float-int-exponent to match float-exponent. We already have double-float-int-exponent and single-float-int-exponent types defined for this.

Add a test to verify that we return the correct value and also don't crash when we compile up the bad case.

Merge request reports