develooper Front page | perl.perl6.language | Postings from October 2001

RE: NaN semantics

Thread Previous | Thread Next
From:
Brent Dax
Date:
October 7, 2001 02:55
Subject:
RE: NaN semantics
Message ID:
FJELLKOPEAGHOOODKEDPCELDCHAA.brentdax@cpan.org
Damian Conway:
#    > The example can be rewritten
#    >
#    >        print "Inflation rate: " and $inflation = +<>
#    >                              while $inflation != $inflation;
#
# Err. No it can't.

His point was that the NaN IEEE came up with is defined to have NaN !=
NaN, and that it might be confusing if Perl's behavior wasn't consistent
with that.  Not that I think NaN != NaN is a particularly good idea, but
consistency with other languages may be.  If NaN != NaN, then his
example is correct.

P.S. Congratulations to you and Larry for waking up perl6-language.  I
had seen almost no traffic on it in weeks, and was starting to get a bit
worried that thoughts on the languages were coughing, sputtering and
dying.  :^)

--Brent Dax
brentdax@cpan.org
Configure pumpking for Perl 6

They *will* pay for what they've done.


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About