Re: [Haskell-cafe] Monadic Floating Point [was: Linking and unsafePerformIO]

2008-10-23 Thread Sterling Clover
I'd like to direct folks' attention to the IEEE-utils package on hackage [1], which Matt Morrow started and I have made a few additions to. There are bindings to set and check the rounding mode, as well as check and clear the exception register. On top of that I've built a very experimental

Re: [Haskell-cafe] Monadic Floating Point [was: Linking and unsafePerformIO]

2008-10-17 Thread Ariel J. Birnbaum
It is an interesting question: can IEEE floating point be done purely while preserving the essential features. I've not looked very far so I don't know how far people have looked into this before. Not sure. My doubts are mainly on interference between threads. If a thread can keep its FP state

Re: [Haskell-cafe] Monadic Floating Point [was: Linking and unsafePerformIO]

2008-10-16 Thread Scott Turner
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

Re: [Haskell-cafe] Monadic Floating Point [was: Linking and unsafePerformIO]

2008-10-15 Thread Ariel J. Birnbaum
On Wednesday 15 October 2008 05:21:04 John Dorsey wrote: Should all floating point numerals be in the IO Monad? I'm deviating from the thread's topic, but I tend to agree with this one. Maybe not IO directly, but some kind of STM-style monad, at least (that is, FP operations are composable but

Re: [Haskell-cafe] Monadic Floating Point [was: Linking and unsafePerformIO]

2008-10-15 Thread Duncan Coutts
On Thu, 2008-10-16 at 01:24 +0200, Ariel J. Birnbaum wrote: On Wednesday 15 October 2008 05:21:04 John Dorsey wrote: Should all floating point numerals be in the IO Monad? I'm deviating from the thread's topic, but I tend to agree with this one. Maybe not IO directly, but some kind of