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

Re: Indeterminate math

From:
mosullivan@crtinc.com
Date:
October 14, 2002 17:20
Subject:
Re: Indeterminate math
Message ID:
187160-220021021502036468@M2W066.mail2web.com
From: Mark J. Reed mark.reed@turner.com
> Summary of values:
> 
>    1/0              +Inf
>    -1/0             -Inf
>    0/0              NaN
>    Inf/0            NaN
>    Inf/Inf          NaN

Are Inf and NaN going to be standard in Perl 6? As long as we're traveling
down that road, how about i (the square root of -1), or Lukasiwiscean Null?
(Sorry if I sound sarcastic, I'm actually honestly curious.)

My inner Larry Wall is right now saying that there needs to be a more
generalized solution to all this.  OK, here's one. By default, anything/0
throws an exception.  However, you can load modules to handle those
exceptions, substituting Inf, NaN, or whatever as the evaluation of the
expression.

-Miko


--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .





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