Re: [pure-lang-users] math.pure
Status: Beta
Brought to you by:
agraef
From: Eddie R. <er...@bm...> - 2008-08-20 21:42:12
|
On Wed, 2008-08-20 at 17:32 -0400, John Cowan wrote: > Eddie Rucker scripsit: > > Should we have the following rules? > > _+:nan = nan; > > nan+:_ = nan; > > nan<:_ = nan; > > _<:nan = nan; > > > > My thinking is that if any part of a complex number is nan then the > > whole thing is not a number. OTOH, inf+:inf, 0+:inf, inf+:0, etc, you > > might want to keep that way for either further processing or to let the > > user know the result is a complex number. What does everyone think about > > this? > > I'd avoid this: it's easy enough to add a post-processing ruleset > to make the change. Just because the real side of a computation has > lost significance doesn't mean the imaginary side doesn't still contain > useful data (or vice versa). The whole point of inf and nan is to allow > computation to continue, postponing the check for significance to the end. > Thanks John! You and Albert keep it coming. e.r. |