How do I get above 1 quintillion

0 favourites
  • 9 posts
From the Asset Store
​2D Battle backgrounds (from above) is designed for battle or strategy games and are hand drawn.
  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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

  • 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

  • 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

  • R0J0hound 's solution is probably your best bet. You can get around large numbers using exponents and logs.

  • 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.

  • 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.

  • 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

  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)