On Thu, Dec 10, 2015 at 1:46 PM, Peter TB Brett
wrote:
> When numbers are too large to represent exactly, LiveCode automatically
> shifts to using 64-bit IEEE floating point representation. Floating-point
> numbers store a number in three pieces:
>
> 1) a sign bit
> 2)
On Thu, Dec 10, 2015 at 1:17 PM, Bob Sneidar
wrote:
> Because the binary equivalent of a 40 digit decimal number is NOT 40 bits.
> It is many more bits. For example the binary equivalent of
> 1 (17 digits) is 1010101 (27 digits).
>
>
> -Original Message-
> From: Peter TB Brett <peter.br...@livecode.com>
> To: How to use LiveCode <use-livecode@lists.runrev.com>
> Sent: Thu, Dec 10, 2015 1:47 pm
> Subject: Re: Why aren't large numbers limited to 64 bit values?
>
> On 2015-12-10 17:
Looks like the largest decimal number that can be represented then is
4.50359962737E+15, or 450359962737
Bob S
> On Dec 10, 2015, at 10:46 , Peter TB Brett wrote:
>
> On 2015-12-10 17:54, Geoff Canyon wrote:
>> LiveCode works in 64 bit numbers, so why does
>>
15 1:47 pm
Subject: Re: Why aren't large numbers limited to 64 bit values?
On 2015-12-10 17:54, Geoff Canyon wrote:
> LiveCode works in 64 bit numbers, so why does
>
> put 100 * 100
>
> result in
>
> 1303786028427003666890
aren't large numbers limited to 64 bit values?
On 2015-12-10 17:54, Geoff Canyon wrote:
> LiveCode works in 64 bit numbers, so why does
>
> put 100 * 100
>
> result in
>
> 1303786028427003666890752
>
> which is close
Because the binary equivalent of a 40 digit decimal number is NOT 40 bits. It
is many more bits. For example the binary equivalent of 1 (17
digits) is 1010101 (27 digits). You are thinking of each
decimal digit as a binary bit.
Bob S
> On Dec 10, 2015, at
LiveCode works in 64 bit numbers, so why does
put 100 * 100
result in
1303786028427003666890752
which is close to the right answer, instead of some 18 digit value?
___
use-livecode mailing list
Correction. The web calculator had a maximum which I exceeded. The binary
equivalent of 1E40 is
111010110001100101001000111110101110010100101.
That is 133 bits. That far exceeds the limits of Livecode.
Bob
On 2015-12-10 17:54, Geoff Canyon wrote:
LiveCode works in 64 bit numbers, so why does
put 100 * 100
result in
1303786028427003666890752
which is close to the right answer, instead of some 18 digit value?
When numbers are too large to
10 matches
Mail list logo