Does anybody know of any tricks to make the editor math for reals more accurate? I need precise numbers and the editor is giving me numbers that are too inaccurate. For example:
Variable-Settest[0]=(121.9048*0.0082)
The editor returns 1.01172 which is incorrect. The number should be .99961936. I know that it isn't possible for it to be that accurate due to the editor using fixed points and not floats, but I would like to get it to at least .99~
I read from another post to multiply both numbers by 4096 and then divide by 4096 but the returned value was, 48.7627, which is obviously way too large.
Somehow I remember, that someone posted the exact question some time ago.
When I remember correctly, than it wasn't really doable.
There were some sort of workarounds, but they don't work that great I think.
Hello,
Does anybody know of any tricks to make the editor math for reals more accurate? I need precise numbers and the editor is giving me numbers that are too inaccurate. For example:
The editor returns 1.01172 which is incorrect. The number should be .99961936. I know that it isn't possible for it to be that accurate due to the editor using fixed points and not floats, but I would like to get it to at least .99~
I read from another post to multiply both numbers by 4096 and then divide by 4096 but the returned value was, 48.7627, which is obviously way too large.
So, how can I improve accuracy? Thanks.
Somehow I remember, that someone posted the exact question some time ago. When I remember correctly, than it wasn't really doable. There were some sort of workarounds, but they don't work that great I think.
Looks like the error you made was multiplying BOTH numbers by 4096 and then multiplying them together, so you need to divide the product by 4096^2.
@dgh64: Go
Hm, I tried:
But, in-game, it says cannot divide by 0. When I input in my calculator, I get the correct number, .99961936.
Edit: Ah, because 4096^2 > 524288 (max size for real)
So, I tried:
and got value: .0117188
Well I think I got it as close as its going to get.
So, I am off by .00049.