From:

Date:

October 11, 2001 13:41Subject:

Re: NaN semanticsMessage ID:

3BC56CCD.6CCA5290@davidnicol.comRaFaL Pocztarski wrote: > I haven't got any contact with NaN before, but when Tim pointed that > NaN!=NaN is true in IEEE I thought that it does make sense. I see pros > and cons and it's not so ugly and non-intuitive as it can look. When > comparing $a and $b as numbers there is no need for $a==$b!=NaN, if > NaN!=NaN then $a==$b is ok for any values of $a and $b, it would be true > only if $a and $b are numbers and they are equal. If NaN==NaN is true, > then the longer $a==$b!=NaN is needed. So when comparing two scalars as > numbers NaN!=NaN being true makes it easier. But then "until $inflation > != NaN" would be useless as NaN!=anything is always true (NaN!=NaN, and > NaN!=anynumber). With NaN!=NaN some other way like $x.isNaN or $x.isnum > would be needed. Or maybe NaN evaluates to 'NaN' in string context and > +$x eq 'NaN' (or +$x eq NaN) could be used? NaN==NaN being false is in > fact very intuitive for me, as NaN is something without any numerical > meaning, so numerically compared to anything doesn't make sense (as == > means numerical equality, not just equality). Maybe it should be undef > instead of false? I'm coming to this thread after nearly a week of everyone weighing in their opinions, and fully expect to see what I'm about to type in stated by someone else, days ago, a little further down the long list of posts. What if not-a-number stringifies to NaN, but numerically always compares to false, so the conditional in the example could CLEARLY be written while $inflation ne NaN; -- David Nicol 816.235.1187 1,3,7-trimethylxanthineThread Previous | Thread Next

- NaN semantics by Tim Conrow
- Re: NaN semantics by Damian Conway
- RE: NaN semantics by Brent Dax
- RE: NaN semantics by Richard_Cox
- RE: NaN semantics by Dan Sugalski
- Re: NaN semantics by Jonathan Scott Duff
- RE: NaN semantics by Dan Sugalski
- Re: NaN semantics by Dan Sugalski
- Re: NaN semantics by Bart Lateur
- Re: NaN semantics by Dan Sugalski
- Re: NaN semantics by Glenn Linderman
- Re: NaN semantics by RaFaL Pocztarski
- Re: NaN semantics by Jonathan Scott Duff
- Re: NaN semantics by Dan Sugalski
- Re: NaN semantics by Michel Rodriguez
- Re: NaN semantics by Sam Vilain
- Re: NaN semantics by RaFaL Pocztarski
- Re: NaN semantics by Trond Michelsen
- Re: NaN semantics by Aaron Sherman
- Re: NaN semantics by Glenn Linderman
- Re: NaN semantics by RaFaL Pocztarski
- Re: NaN semantics by RaFaL Pocztarski
- Re: NaN semantics by RaFaL Pocztarski
- Re: NaN semantics by RaFaL Pocztarski
- RE: NaN semantics by David Whipp
- Re: NaN semantics by RaFaL Pocztarski
- NaN+NaNi by David Nicol
- Re: NaN+NaNi by Dan Sugalski
- Re: NaN+NaNi by Jonathan Scott Duff
- Re: NaN+NaNi by RaFaL Pocztarski
- Re: NaN+NaNi by raptor
- Re: NaN+NaNi by RaFaL Pocztarski
- Re: NaN+NaNi by Aaron Sherman
- Re: NaN+NaNi by Jonathan Scott Duff
- 3.243F6A888+C0FFEe-4i by David Nicol
- Re: NaN+NaNi by RaFaL Pocztarski
- Re: NaN+NaNi by Glenn Linderman
- Re: NaN+NaNi by RaFaL Pocztarski
- Re: NaN+NaNi by RaFaL Pocztarski
- Re: NaN+NaNi by RaFaL Pocztarski
- Re: NaN+NaNi by RaFaL Pocztarski
- Re: NaN semantics by Jonathan Scott Duff
- Re: NaN semantics by RaFaL Pocztarski
- RE: NaN semantics by David Whipp
- Re: NaN semantics by raptor
- Re: NaN semantics by Jonathan Scott Duff
- RE: NaN semantics by Brent Dax
- Re: NaN semantics by Dan Sugalski
- Re: NaN semantics by Nicholas Clark
- Re: NaN semantics by Mark
- Re: NaN semantics by Damian Conway
- RE: NaN semantics by Damian Conway
- RE: NaN semantics by Damian Conway
- Re: NaN semantics by Dan Sugalski
- Re: NaN semantics by RaFaL Pocztarski
- Re: NaN semantics by Damian Conway
- Re: NaN semantics by Piers Cawley
- Re: NaN semantics by Damian Conway
- Re: NaN semantics by Tim Conrow
- Re: NaN semantics by Damian Conway
- Re: NaN semantics by Damian Conway
- RE: NaN semantics by David Whipp
- Re: NaN semantics by Graham Barr
- Re: NaN semantics by Piers Cawley
- Re: NaN semantics by RaFaL Pocztarski
- Re: NaN semantics by Damian Conway
- Re: NaN semantics by Tim Conrow
- Re: NaN semantics by Damian Conway
- Re: NaN semantics by Me
- Re: NaN semantics by merlyn
- Re: NaN semantics by RaFaL Pocztarski
- Re: NaN semantics by RaFaL Pocztarski
- Re: NaN semantics by John Siracusa
- Re: NaN semantics by RaFaL Pocztarski
**Re: NaN semantics**by David Nicol- Re: NaN semantics by RaFaL Pocztarski

nntp.perl.org: Perl Programming lists via nntp and http.

Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About