develooper Front page | perl.perl5.porters | Postings from March 2001

Re: [ID 20010305.005] "use integer" doesn't make rand() return integers

Thread Previous | Thread Next
From:
Ronald J Kimball
Date:
March 7, 2001 14:32
Subject:
Re: [ID 20010305.005] "use integer" doesn't make rand() return integers
Message ID:
20010307173215.B684800@linguist.thayer.dartmouth.edu
On Wed, Mar 07, 2001 at 11:15:33PM +0100, abigail@foad.org wrote:
> After all, does it make any sense that '* 1' isn't an identity operation?
> 
> I find:
> 
>     1 * sin (1) != sin (1)
> 
> to be utterly unintuitive. Now, I don't really care in this case because
> trig functions aren't particular useful when doing integer arithmetic.

How do you feel about:

    1 * 3.5 != 3.5

?  (Except that when you do the comparison, the operands are truncated to
integers.  :)

Ronald

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