On 11/14/2002 1:58 PM, Angel Faus wrote:
=section ** Pseudo-Numbers=section *** NaN The value C<NaN> ("Not a Number") may be returned by some functions or operations to signal that the result of a calculation (for example, division by zero) cannot be represented by a numeric value.
...
Guys, can we please not argue over just how arithmetic and such works for NaN and Inf, and defer to IEEE specs (IEEE-754, AKA IEEE floating point)? It'll save much argument, and that's how it'll almost certianly be implemented anyway. Give examples and references, but don't define nonstandard "standard" perl6 semantics when a good standard exists. (I'm looking for a good reference on the IEEE semantics right now, but I'm not having much luck for some reason.)=section *** Inf The terms C<Inf> and C<-Inf> represent positive and negative infinity; you may sometimes use these to create infinite lists. For the C<Inf> values, perl will operate them following the standard conventions. For example:
(We need a few additional rules, actualy: NaN is false, and -Inf and +Inf are both true. If either are forced into an int, and error occours (? on that last point.) This whole paragraph might properly be pushed off to the discussion of Num in Bool context later.)
-=- James Mastros