[Glass] Floats problem with SIXX between Pharo and GemStone
Martin McClure
martin.mcclure at gemtalksystems.com
Mon Mar 3 10:38:07 PST 2014
On 03/03/2014 07:14 AM, Mariano Martinez Peck wrote:
>
> Now...a similar question is....is there a way to move Floats between
> Pharo and GemStone with SIXX *without *loosing decimals (no rounded)?
> Sixx in Pharo exports Floats doing #printString. So for example:
>
> 5645.0000000000000000000000000786786 printString
> -> '5645.0'
>
> I loose info. So what is the alternative?
In this example, there is no information lost. Most rational numbers are
not exactly representable as Floats.
5645.0000000000000000000000000786786 is one of those. 5645.0 is the
closest number representable as a Float, so this is a correct,
information-preserving representation.
Regards,
-Martin
More information about the Glass
mailing list