How do I work with 16 digits numbers ?

Get help using Construct 2

Post » Sat Sep 05, 2015 5:26 pm

hi
i need to make an app which get 2 number and it start from lower number and every tick add 1 to lower number until it get to the bigger number
like this :
lownumb < bignumb
repeat => add 1 to lownumb
but this numbers are 16 digits and it just work with 15 digits
(i can use numbers as a string then get right number which is not 9 and then add to that and if the last number is 9 then add to left number but i need a simple formula !)
B
16
S
6
Posts: 243
Reputation: 1,755

Post » Mon Sep 07, 2015 11:26 pm

Well 64 bit floating point numbers only keep track of 15-17 significant digits, so that would explain one part of it.

To get around it you could use two variable with say 10 digits a peace. Then when the second half is at 11 digits, remove the first digit and add one to the second half. Or something like that.
B
94
S
33
G
114
Posts: 5,357
Reputation: 73,775


Return to How do I....?

Who is online

Users browsing this forum: Gunter and 21 guests