Whenever I write a long number I get something like this 7.03398e+008 . Yea sure it's a condensed version, I get that but what if I wanted to actually just write a long number?
Thank you. This has been bugging me for so long now.
As ZOMGbies said, use the num2text proc, however I would first recommend trying the search function on the forum, as this question has arrived and been solved many times before.
When numbers are in the millions, byond outputs them as though a calculator would when youve made a number too wide for the screen.
To combat this you transform the numbers into text and byond treats them like a sentence
1,250,000 is smaller than 1,250,0e+007.
Why does BYOND default to the e+thousands of numbers, anyway? I can't think of a single person who'd actually want that for any form of project.
By default, if the number of significant figures exceeds 6, the number will be in scientific notation. If you don't like that, use num2text(1250000,9) so that it won't output a scientific notation unless the number of significant figures exceeds 9.
1,250,000,000,000,000,000,000,000,000,000,000
is not shorter than
1,250,0e+034
That's actually a number, though. I doubt aside from people who took programming classes (which is where I assume you'd see this) would know 1,781,0e+08 actually means something.
It's probably got something to do with the amount of bytes you can contain within an int that BYOND handles. Hence it uses an algebraic formula to reduce the byte size.
I have no clue if this is correct, but it seems logical.
It's for memory purposes. Once a variable reaches a certain point of taking up too many bytes, BYOND condenses it so that it doesn't use up as much memory.
You could easily work around this problem with a datum and datum mathematical functions.