Re: [pure-lang-users] Yet another quirk with MinGW
Status: Beta
Brought to you by:
agraef
From: Eddie R. <er...@bm...> - 2008-08-20 15:47:22
|
On Wed, 2008-08-20 at 11:34 -0400, John Cowan wrote: > Eddie Rucker scripsit: > > > (1) Is sqrt supposed to be defined for nan and inf? ln, sin, cos, etc, > > are. > > The hardware says that sqrt(inf) is inf and sqrt(nan) is nan, which > is what you expect given that inf*inf = inf and nan*nan = nan. Yep! But they aren't defined in math.pure. sqrt inf => sqrt inf and sqrt nan => sqrt nan. > In IEEE floats, the less tampering with the hardware the better. Most of the time I'd agree, but I still think log 0 => -inf sucks big time. Even though the limit of log x -> -inf as x -> 0 that is very different from saying log 0 == -inf. That's like saying 9/0 = inf because lim 9/x -> inf as x -> 0. > There was a young fellow of Trinity > Who solved the square root of infinity, > But while counting the digits > Was seized by the fidgets > Dropped maths and took up divinity. > > No wonder! Floating point is a bugger. e.r. |