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:
abigail
Date:
March 7, 2001 14:38
Subject:
Re: [ID 20010305.005] "use integer" doesn't make rand() return integers
Message ID:
20010307223949.20351.qmail@foad.org
On Wed, Mar 07, 2001 at 05:32:15PM -0500, Ronald J Kimball wrote:
> 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.  :)


Same thing of course. Not at all something you expect.


Abigail

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