exact double value

BlitzMax Forums/BlitzMax Beginners Area/exact double value

CS_TBL(Posted 2005) [#1]
local meep:double=1.1
debuglog meep

result: 1.1000000238418579

Not exactly what I meant.. and tho the error here is minor, is there any way to get 1.1 into a double as 1.1000000000000000 ?


Koriolis(Posted 2005) [#2]
First of all you'd need to type the literal, using "1.1!":
local meep:double=1.1!
That way you really get a double precision.

Is there any way to get 1.1 into a double as 1.1000000000000000 ?
Generally speaking, no. Floating point values have a limited precision, and only some values can be represented exactly.