ID:155894
Feb 17 2011, 11:16 am
|
|
I got my stat reader to go up to about 2 billon but if i put in 3 billon it reads as 2,125,120,000 or something like that when in other games they are able to display the numbers into like quintillion etc so im wondering how do i get it to show numbers past 2 bil
|
Feb 17 2011, 11:18 am
|
|
My advice is that there is no practical reason you should be using such massive numbers like that.
|
In response to LordAndrew
|
|
Well i have a practical reason which is i dont want a stat cap to be limited to only 2 billon i want it to go on so rather then go off topic perhaps you can actually help?
|
You can't. Past that point, BYOND has to approximate as it doesn't store numbers with that much precision. You can use the BigNum library by... someone or other. Search for it in the libraries. It should suit your needs.
|
In response to Popisfizzy
|
|
yes this should do the trick but any way someone could tell me how to simplify this so i can just get stats to display high numbers like in that demo
|
In response to Buttbird
|
|
Either take what you got or find a way to turn 2billion to 200 or something because no way in hell you actually need a user to gain 1000000 EXP or whatever it was for everything.
|
In response to ExPixel
|
|
I dont see why everyone cares so much what i do with the number being so high really it shouldn't concern you as to what its for im just asking for help not opinion on what it used for so please either post something useful or dont post at all
|
In response to Buttbird
|
|
num2text(), and text2num() should work perfectly if you're displaying them like I think you are.
|
In response to LordAndrew
|
|
I pretty much have to agree with LordAndrew. If you're not making a math program/game, having numbers that big is just silly. "only 2bil", if I gave you 1000$ every day, it'd take 2,737.85 years for you to get 1 billion, and 5475.7 years for you to get 2.
|
In response to Emasym
|
|
And as the OP has so justly proclaimed, his Design Philosophy is not at question here. He asked how to accomplish showing out the whole number rather than being shown in scientific notation, which Crazah has already provided the answer to. num2text and then text2num is exactly what he is looking for. More specifically, num2text's second argument.
src<<num2text(1234567890,10) //10 digits before scientific notation kicks in EDIT What they are doing may or may not be practical, but the knowledge they gain from their question is more important, is it not? They may need such knowledge later on for a different purpose than showing out the billions/trillions/quadrillions/etc |