I was wondering is there a way to check a number that has 3.12e+06 or w/e it is to see what e+0x number it is? so like if i checked if its equal to e+07 i could say its a 10mil via code? because i have no idea how to code it to check if its on e+06 and onward except by literally putting in if(number==100000000000000000) etc
I would bring up the question of why you're using numbers that big in the first place, as I can almost guarantee it isn't needed.
But to answer the question, no. The scientific notation is added on when it is displayed, but the number remains the same. 3.12e+06 is the same thing as 3.12 x 106. You just need to move the decimal 6 places to the right. With this knowledge, you should be able to do whatever you want with simple math in DM. Though, I still stand by my first point - I don't believe there is much of a reason at all to have numbers that big outside of very niche cases. |
Albro1 wrote:
I would bring up the question of why you're using numbers that big in the first place, as I can almost guarantee it isn't needed. Probably a dragon ball z game |
In response to Colesprite
|
|
Colesprite wrote:
Albro1 wrote: This is what I was going to say! :) |
In response to Colesprite
|
|
Colesprite wrote:
Probably a dragon ball z game Someone smells what the Rock is cookin'. |
Word of advice, don't work with huge numbers in BYOND. Arithmetic gets funky if you do it the standard way. Sometimes it won't subtract. Sometimes it won't add. Sometimes it won't do anything. Sometimes it does more than you intend.
|
A bit of a crude example, but it gets the point across. This is most effective when you're able to do it recursively.