in reply to Re: Handling large numbers
in thread Handling large numbers

I thought floating point numbers were the computer form of real numbers,
ie. they have a decimal point
but 1000000000000000000000000000001 is an integer.

"Argument is futile - you will be ignorralated!"

Replies are listed 'Best First'.
Re: Re: Re: Handling large numbers
by no_slogan (Deacon) on Jun 06, 2001 at 03:11 UTC
    Numbers are always floating-point in perl. Usually. True, you can use integer, but that doesn't seem to take effect until after the parser has chewed the number up and spat it out as a float. On many platforms, 1000000000000000000000000000001 is too big a number to represent as an integer, anyway. Integers have some implementation-dependent maximum number of bits. Computer arithmetic is not the same as mathematical arithmetic. There's always some limit on the size (number of digits) of a number the computer can remember, even if it's the machine's entire virtual memory area.