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

Re: NaN semantics

Thread Previous | Thread Next
Dan Sugalski
October 10, 2001 08:33
Re: NaN semantics
Message ID:
At 05:12 PM 10/10/2001 +0200, RaFaL Pocztarski wrote:
>Dan Sugalski wrote:
> > At 08:37 AM 10/9/2001 -0700, Brent Dax wrote:
> > >For consistency, I'd prefer to use is: 3+(2 is i).
> >
> > Well, the convention is suffixing an imaginary number with an i. I don't
> > think we'd be too well served to go a different route.
>So the imaginary numbers would be standard literals? Like
>     $x=2+10i;
>Great idea, as well as sqrt(-1) returning 1i istead of raising the

If we do them, yep. Currently no promises there.

>BTW, I was thinking once that numeral literals like 4k or 10G
>(meaning 4*2**10, 10*2**30) would be very nice. What do you think?

I think the meaning of the suffices are sufficiently vague as to make me 
uncomfortable supporting them. Is 1K 1024 or 1000? I can make a good case 
for both, and that's never a good sign.


--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai                         have teddy bears and even
                                      teddy bears get drunk

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About