
Hello, I'm considering using Haskell for a numerical application. However, I need to rely on IEEE 754 standards being implemented correctly. What is the current state of 754 in Haskell? The definition has this paragraph, which makes me suspect Haskell is not appropriate for this application: "The default floating point operations defined by the Haskell Prelude do not conform to current language independent arithmetic (LIA) standards. These standards require considerably more complexity in the numeric structure and have thus been relegated to a library. Some, but not all, aspects of the IEEE floating point standard have been accounted for in Prelude class RealFloat." Thank you, Sean

Haskell does not allow you to change rounding mode, NaN signallng mode, etc.
But otherwise Haskell on modern platforms conforms to IEEE 754.
-- Lennart
On Sun, Jun 22, 2008 at 9:37 AM, Sean McLaughlin
Hello,
I'm considering using Haskell for a numerical application. However, I need to rely on IEEE 754 standards being implemented correctly. What is the current state of 754 in Haskell? The definition has this paragraph, which makes me suspect Haskell is not appropriate for this application:
"The default floating point operations defined by the Haskell Prelude do not conform to current language independent arithmetic (LIA) standards. These standards require considerably more complexity in the numeric structure and have thus been relegated to a library. Some, but not all, aspects of the IEEE floating point standard have been accounted for in Prelude class RealFloat."
Thank you,
Sean _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On Sun, 22 Jun 2008, Lennart Augustsson wrote:
Haskell does not allow you to change rounding mode, NaN signallng mode, etc. But otherwise Haskell on modern platforms conforms to IEEE 754.
It just uses the machine floating point implementation, which is most oftenly IEEE. However the good news are - if someone manually writes functions for IEEE number representation, they could be used exactly the same way as Float and Double, and chances are good that with some optimizer RULES the operations can be replaced by efficient FPU operations on IEEE compliant FPUs.
participants (3)
-
Henning Thielemann
-
Lennart Augustsson
-
Sean McLaughlin