[Haskell-cafe] Monadic Floating Point [was: Linking and
unsafePerformIO]
Scott Turner
1haskell at pkturner.org
Thu Oct 16 07:42:16 EDT 2008
On 2008 October 16 Thursday, Duncan Coutts wrote:
> On Thu, 2008-10-16 at 01:24 +0200, Ariel J. Birnbaum wrote:
> > Floating point operations, at least by IEEE754, depend on environmental
> > settings like the current rounding mode. They may modify state, like the
> > sticky bits that indicate an exception occurred.
> It is an interesting question: can IEEE floating point be done purely
> while preserving the essential features.
The trouble is that the best numerical algorithms have been written using the
imperative-style IEEE operations for more than 20 years. If Haskell had a
floating point monad, then those algorithms could be coded in Haskell. But
that doesn't seem like an interesting and fruitful approach. Haskell can
access those algorithms using FFI.
The test of making IEEE floating point accessible in pure Haskell code is
whether it stirs any interest in the numerical analysis community.
More information about the Haskell-Cafe
mailing list