Indeed! Getting the library numerics to do the Right Thing is something that can only be done by people who know about numerics. People who build compilers aren't, alas. It's quite a specialised subject, and very easy to screw up. And there's performance to worry about too in the common case when the corner cases don't appear.
So if there are folk out there who care about getting numerics correct, we would welcome your direct involvement. Look at the code, make it right, send patches to [EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>. It's all open source, and you'll be benefiting lots of people. Simon From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Lennart Augustsson Sent: 04 August 2007 16:47 To: Andrew Coppin Cc: haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] How odd... Haskell doesn't know much about infinity, but Haskell implementations are allowed to use IEEE floating point which has infinity. And to get things right, there needs to be a few changes to the library to do the right thing for certain numbers, this is not news. In fact I filed a bug report a while back about it. -- Lennart On 8/4/07, Andrew Coppin <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>> wrote: Paul Johnson wrote: > Andrew Coppin wrote: >> > 0**2 >> 0 >> >> > (0 :+ 0)**2 >> NaN :+ NaN >> >> (Is this a bug?) > According to the Standard Prelude, > # x ** y = exp (log x * y)
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe