ID:133751
 
Is there any chance that a new version of BYOND could include a world setting for double point precision floating point numbers? It gets kind of ridiculous being limited to 16 million if you are trying todo any math. Or the ability to initiate a variable as a double precision floating point number?
Something like var/x as float?

What do you mean anyway? You can exceed 16 million very easily. Ditto for 16 billion. 1.#INF does not pop up until at least past 1e+37.

-- Data
In response to Android Data
Android Data wrote:
Something like var/x as float?

What do you mean anyway? You can exceed 16 million very easily. Ditto for 16 billion. 1.#INF does not pop up until at least past 1e+37.

-- Data
world<<"[10]"
world<<"[100]"
world<<"[1000]"
world<<"[10000]"
world<<"[100000]"
world<<"[1000000]"
world<<"[10000000]"
world<<"[100000000]"
world<<"[1000000000]"
world<<"[10000000000]"
world<<"[100000000000]"
world<<"[1000000000000]"
world<<"[10000000000000]"
world<<"[100000000000000]"
world<<"[1000000000000000]"

Outputs:
10
100
1000
10000
100000
1e+006
1e+007
1e+008
1e+009
2.14748e+009
2.14748e+009
2.14748e+009
2.14748e+009
2.14748e+009
2.14748e+009

Does that make it a num2text problem?
In response to Android Data
Yes, but way before 10^37, you start to lose precision. I believe once you get to 2^24, (16,777,216) or lower if you are using decimals.
Strawgate wrote:
Is there any chance that a new version of BYOND could include a world setting for double point precision floating point numbers? It gets kind of ridiculous being limited to 16 million if you are trying todo any math. Or the ability to initiate a variable as a double precision floating point number?

This isn't currently possible because of the way BYOND handles values. All values in BYOND are 5 bytes: a type and a 4-byte value. (Oddly for references this is always expressed as a 4-byte value anyway. So essentially all reference values are really only 3 bytes.)

A double-precision number would have to be a reference to a value storing it, and we'd have to keep track of which ones were no longer used. It'd be a mess.

Lummox JR
In response to Asielen
Yeah. I was doing a pattern-seeking program for math class.
I lost true precision even before that. I'll rerun it and let it sit overnight and tell you the maximum value it got too before failing.

[Edit]
iight, letting it run overnight, exact precision failed with no decimals at 1.67854e+007, but it's only off by one number. Not sure where it gets more horribly off, lol.