float conversion problem on Sparc (0914)

From: Kish Shen <ks15_at_icparc.ic.ac.uk>
Date: Tue 27 Mar 2001 03:01:55 PM GMT
Message-Id: <E14huyp-00058F-00@holborn.icparc.ic.ac.uk>
On sparc_sunos5 (ECLiPSe 5.1.1), and alpha linux:

[eclipse 17]:  A is 1000000000000000000000000000000000000000.

A = 1000000000000000000000000000000000000000
yes.
[eclipse 18]:  A is 1000000000000000000000000000000000000000.0.

A = 1e+39
yes.

but

[eclipse 15]: A is float(1000000000000000000000000000000000000000).

A = 1.0000000000000001e+39
yes.

the conversion is not exact, even though 1e39 should be representable
exactly.

1e40 and 1e38 converts fine:

[eclipse 15]: A is float(1000000000000000000000000000000000000000).

A = 1.0000000000000001e+39
yes.
[eclipse 16]: A is float(10000000000000000000000000000000000000000).

A = 1e+40
yes.
Received on Tue Mar 27 16:01:56 2001

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:08:05 PM GMT GMT