Opened 6 years ago

Closed 5 years ago

#3174 closed feature request (duplicate)

decodeFloat (0.0/0.0) = undefined

Reported by: crutcher Owned by:
Priority: normal Milestone:
Component: libraries/base Version:
Keywords: Cc: carette
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

there are a number of bugs associated with decoding NaN that could be resolved by changing decodeFloat (0.0/0.0) to be undefined.

http://hackage.haskell.org/trac/ghc/ticket/3070 - floor
http://hackage.haskell.org/trac/ghc/ticket/3134 - encodeFloat . decodeFloat

Change History (3)

comment:1 Changed 6 years ago by simonpj

  • Cc carette added
  • difficulty set to Unknown

NaNs are an area where it's easy for someone ignorant to screw up. Would some of you guys who know and care about numerics like to come up with a concrete code change -- maybe it's only one line in the definition of decodeFloat -- and then we'll apply it? Ideally a patch, but it'd be good enough to say "change this line to say that".

Oh, and please give us a test or two with expected output.

Thanks

Simon

comment:2 Changed 6 years ago by igloo

  • Milestone set to _|_

comment:3 Changed 5 years ago by simonmar

  • Resolution set to duplicate
  • Status changed from new to closed
  • Type of failure set to None/Unknown

duplicate of #3134

Note: See TracTickets for help on using tickets.