## Integer/Floating Point Ranges and Precision

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller

BillJames
Livecode Opensource Backer
Posts: 9
Joined: Tue Feb 10, 2009 2:14 am

### Integer/Floating Point Ranges and Precision

I looked in the user guide, dictionary, and searched the forums but I cannot find a discussion of number ranges or digits of precision. I understand that the language is typeless, but you would expect at least some discussion on this topic. I tried some testing on integers and was surprised to find that you can do the below:

put 2 ^ 500 into tInt

Does this mean that there is variable precision built into revolution math? It appears so.

Can the digits of precision for floating point math be set as well?

Thanks,

Bill

Mark
Livecode Opensource Backer
Posts: 5138
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

### Re: Integer/Floating Point Ranges and Precision

Hi BIll,

Off the top of my head, I believe that Revolution can't handle any numbers larger than 2^52 (or 2^53?). RunRev is not a scienticif/medical/military calculation tool. 2^500 does return a number, but put (2^500)-(2^500-1) returns 0 instead of 1. Apparently, such calculations make no sense in Revolution.

Best,

Mark