Opened 6 years ago

Closed 6 years ago

#5524 closed bug (fixed)

Unnecessary overflow in encodeFloat

Reported by: Owned by:
Priority: normal Milestone:
Component: libraries/base Version: 7.2.1
Keywords: overflow, encodeFloat Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


Prelude> encodeFloat (2^1024) (-1024)

The real result is 1.0 of course.

The docs for encodeFloat now say that the result is infinite if overflow occurs, so technically we're within the spec, but I think in this case it shouldn't overflow.

Change History (2)

comment:1 Changed 6 years ago by

Status: newmerge

Fixed by [3b9a78d45eab41ecd616e805a3adc25d5d3c8332] There's a small performance hit when encoding a J# s# ba# with few limbs (1-2%).

comment:2 Changed 6 years ago by

Resolution: fixed
Status: mergeclosed
Note: See TracTickets for help on using tickets.