Hello,
I have just started a program that works with large numbers (not for any particular reason, I was just bored). However, when I try and calculate a really large number (for example 2^2^2^2^2^2), I get the result "00000inf". I know this is probably beyond the limits of what LiveCode can process, but is there any way to increase the limit of what LiveCode can calculate?
Thanks,
Andrew
Working with large numbers in LiveCode
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 184
- Joined: Wed Apr 10, 2013 5:09 pm
Re: Working with large numbers in LiveCode
Hi Andrew,
you could try to set "the numberformat" to its max, whatever that is.
But I'm sure you will tell us
Best
Klaus
you could try to set "the numberformat" to its max, whatever that is.
But I'm sure you will tell us

Best
Klaus
Re: Working with large numbers in LiveCode
Hi.
I can never remember exactly, but you will encounter errors if the result of any arithmetic calculations requires more than about 16 decimal digits of precision.
Craig Newman
I can never remember exactly, but you will encounter errors if the result of any arithmetic calculations requires more than about 16 decimal digits of precision.
Craig Newman
-
- VIP Livecode Opensource Backer
- Posts: 184
- Joined: Wed Apr 10, 2013 5:09 pm
Re: Working with large numbers in LiveCode
Hi Craig,
The thing is, my program is not working with decimal places, all numbers generated are integers.
In answer to Klaus, I have tried setting the numberFormat to various values, and it changes nothing. I am not sure what to do next. Any advice?
Thanks again,
Andrew
The thing is, my program is not working with decimal places, all numbers generated are integers.
In answer to Klaus, I have tried setting the numberFormat to various values, and it changes nothing. I am not sure what to do next. Any advice?
Thanks again,
Andrew
Re: Working with large numbers in LiveCode
The numberformat is a display tool. Wonderful but has no effect on the underlying value.
I meant integers in my post. If you multiply two 15 digit numbers, you will lose all sense of accuracy in about the 16th place.
Craig
I meant integers in my post. If you multiply two 15 digit numbers, you will lose all sense of accuracy in about the 16th place.
Craig