Re: [pure-lang-users] math.pure
Status: Beta
Brought to you by:
agraef
From: John C. <co...@cc...> - 2008-08-20 21:32:50
|
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. -- John Cowan http://ccil.org/~cowan co...@cc... Monday we watch-a Firefly's house, but he no come out. He wasn't home. Tuesday we go to the ball game, but he fool us. He no show up. Wednesday he go to the ball game, and we fool him. We no show up. Thursday was a double-header. Nobody show up. Friday it rained all day. There was no ball game, so we stayed home and we listened to it on-a the radio. --Chicolini |