Some questions about using NaN and Inf

2007-10-06 Thread brian d foy
I'm thinking about how to explain Perl 6's numbers to the beginners just picking up Learning Perl 6. I had some questions about NaN and Inf (which I can't just try since neither Parrot or Pugs appear to know about these yet). * In S02's table of Immutable types, it mentions that Int allows Inf

Re: Some questions about using NaN and Inf

2007-10-06 Thread Moritz Lenz
brian d foy wrote: * If I can match $x to NaN (or its stand-in), what happens when $x is undef? undef is a property of the container variable (that it holds no value), whereas NaN is a property of the content (like 1/0). so undef ~~ NaN should be false IMHO. There's a note about this in S02

Re: Some questions about using NaN and Inf

2007-10-06 Thread brian d foy
In article [EMAIL PROTECTED], brian d foy [EMAIL PROTECTED] wrote: I'm thinking about how to explain Perl 6's numbers to the beginners just picking up Learning Perl 6. I had some questions about NaN and Inf (which I can't just try since neither Parrot or Pugs appear to know about these yet).

Pair notation for number radix

2007-10-06 Thread brian d foy
This is basically the same question I had about file test operators earlier (http://www.nntp.perl.org/group/perl.perl6.language/2007/04/msg27415.htm l). I never got an answer on my syntax question and the discussion went off to talk about file tests instead of pair notation. From S02 The general

Re: Some questions about using NaN and Inf

2007-10-06 Thread Darren Duncan
At 3:20 PM -0500 10/6/07, brian d foy wrote: For comparisons, how are we going to use Inf and NaN? Are those going to be special flyweight objects, so: $x = 1 / 0; $x == Inf;# is it the same value $x === Inf; # it is always the same object Be mindful of the difference