[Bug: 21.4.19] Bruised floating point numbers from string-to-int
Vin Shelton
acs at xemacs.org
Mon Apr 3 16:43:48 EDT 2006
Hi Rodney,
On 4/3/06, Rodney Sparapani <rsparapa at mcw.edu> wrote:
> ================================================================
> Dear Bug Team!
>
> string-to-int sometimes returns unsightly values which makes
> writing elisp functions that operate on tables of numbers
> very complicated if you want them to remain easy on the eyes.
> I'm not sure where the problem is: xemacs, os, compiler, cpu???
> Any help would be appreciated:
> (string-to-int "8.180E-1")
> 0.8179999999999999
Interestingly, on my windows native XEmacs (both 21.4 and 21.5),
compiled with Visual C++, I get:
(string-to-int "8.180E-1")
0.818
On my Cygwin XEmacs (both 21.4 and 21.5), compiled with gcc, I get:
(string-to-int "8.180E-1")
0.8179999999999999
HTH,
Vin
--
Whoever you are, no matter how lonely,
the world offers itself to your imagination,
calls to you like the wild geese, harsh and exciting--
over and over announcing your place
in the family of things. Mary Oliver
More information about the XEmacs-Beta
mailing list