Subject: Re: 23.1.50; (string-to-number (number-to-string most-positive-fixnum))

From: Lars Magne Ingebrigtsen <[email-masked]>
Date: Sun, 18 Sep 2011 11:47:58 +0200

Helmut Eller <[email-masked]> writes:

> (setq x (string-to-number (number-to-string most-positive-fixnum)))
> (= most-positive-fixnum x) => nil
>
> x is 2305843009213693440 but it should be most-positive-fixnum
> which is 2305843009213693951.
>
> The test
> (= most-positive-fixnum 
>    (string-to-number (number-to-string most-positive-fixnum)))
> seems to work as expected on 32-bit machines but not so on 64 bit.

I'm unable to reproduce this on Emacs 24, so I think it's likely that
this has been fixed by all the numerical fixes that have been applied
the last year.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/