develooper Front page | perl.vmsperl | Postings from June 2002

Re: [PATCH] pp.c:pp_pow() -- quit when you're done

Thread Previous | Thread Next
Philip Newton
June 16, 2002 07:08
Re: [PATCH] pp.c:pp_pow() -- quit when you're done
Message ID:
On Sun, 16 Jun 2002 12:45:30 +0100, (Nicholas Clark)

> For information (which I don't think has reached p5p) the reason for having
> messy loops in pp_pow rather than using pow() or log(), exp() and a multiply
> is that on Irix with longdoubles, 2**31 was giving a floating point value
> slightly *less* than 1<<31, which was really screwing up some tests.
> (and by implication (nearly) every perl programmer's assumption that 2**n
> is an integer)

Perhaps it had the same floating-point engine as my first "scientific"
calculator, for which 2**32 was 4294967295 (i.e. one less than the
correct answer).


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