Re: Ser: a new old serialization library
Posted: Tue Aug 11, 2015 4:54 pm
For example:
Outputs:
Not a major issue since with 32-bit floats it would just be truncated during loading.
I guess it could lead to imprecision when the serialization output from a 32 bit distribution is used with a 64 bit distribution (which is not supposed to happen anyways).
Again, it's a minor thing so I wouldn't be too worried about it.
Code: Select all
f = io.open('out.txt', 'w')
f:write(string.format("%.17g\n", 1))
f:write(string.format("%.17g\n", 1/2))
f:write(string.format("%.17g\n", 1/3))
f:write(string.format("%.17g\n", 1/4))
f:write(string.format("%.17g\n", 1/5))
Code: Select all
1
0.5
0.3333333432674408
0.25
0.20000000298023224
I guess it could lead to imprecision when the serialization output from a 32 bit distribution is used with a 64 bit distribution (which is not supposed to happen anyways).
Again, it's a minor thing so I wouldn't be too worried about it.