# How do I get above 1 quintillion

Get help using Construct 2

### » Wed Jul 22, 2015 12:46 am

I am trying to make an adventure capitalist type scoring but cant get C2 to display above 7 quintillion 7000000000000000000 18 zeros seem to be a limit

can anyone tell me how to display 1 quintillion sextillion septillion and so on because I am stumped I have it counting perfect until quintillion.
B
8
S
2
Posts: 21
Reputation: 1,327

### » Wed Jul 22, 2015 3:01 am

To go any bigger you'll have to roll your own arithmetic for large numbers. Here's an example for summing two arbitrarily large positive integers:

So many digits, so little time
Moderator
B
114
S
41
G
20
Posts: 1,586
Reputation: 19,161

### » Wed Jul 22, 2015 2:48 pm

Thanks for the reply But I have to say that capx has gone right over my head especially as I have to change the large number into example 1.234 septillion witch I know how to do. What I am trying to do is keep score with really high numbers in the written form Like adventure capitalist

Also thank you for the example Capx
B
8
S
2
Posts: 21
Reputation: 1,327

### » Wed Jul 22, 2015 8:04 pm

I think there has been a few topics about this sort of thing. Also this tutorial may be of use:
https://www.scirra.com/tutorials/1447/u ... tial-games
B
97
S
36
G
131
Posts: 5,520
Reputation: 83,478

### » Wed Jul 22, 2015 8:20 pm

@R0J0hound 's solution is probably your best bet. You can get around large numbers using exponents and logs.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,867

### » Thu Jul 23, 2015 10:00 am

I have been trying to get answers to this for a long time and I get them but most are extremely long winded and complicated to understand.

Some have helped.

But i have to say thank you to R0J0hound for pointing me to this because it the only real answer to use thank you again.
B
8
S
2
Posts: 21
Reputation: 1,327

### » Thu Jul 23, 2015 10:34 am

Javascript stores numbers as double-precision (64-bit) floats. Integer precision only goes as far as 2^53, or about 9x10^15. Beyond that there is not enough precision to reliably increment the number by 1. The precision goes lower the higher you go, and so math operations become more imprecise.

The easiest solution is probably just fake it. Store numbers in units of say billions, so 9 trillion is actually stored as 9000. Then when you display it to the user, use a string and just append the characters "000000000". The user sees 9 trillion, but you only stored 9000.
Scirra Founder
B
413
S
244
G
92
Posts: 25,089
Reputation: 199,786

### » Sat Jul 25, 2015 12:58 am

Ashley wrote:Javascript stores numbers as double-precision (64-bit) floats. Integer precision only goes as far as 2^53, or about 9x10^15. Beyond that there is not enough precision to reliably increment the number by 1. The precision goes lower the higher you go, and so math operations become more imprecise.

The easiest solution is probably just fake it. Store numbers in units of say billions, so 9 trillion is actually stored as 9000. Then when you display it to the user, use a string and just append the characters "000000000". The user sees 9 trillion, but you only stored 9000.

Im not really sure exactly what all this means but I do agree High numbers do seem unreliable is there any chance of an example of what you mean
B
8
S
2
Posts: 21
Reputation: 1,327

### » Sat Jul 25, 2015 1:58 am

The question is is what are your requirements? Do you need to count by "ones" starting at zero, or do you start with a higher number? What is the highest number you want to count to? Computers can't count to infinity, so there have to be some limits.
B
71
S
22
G
280
Posts: 3,842
Reputation: 154,386