GNU bug report logs - #5114
23.1.50; (string-to-number (number-to-string most-positive-fixnum))

Previous Next

Package: emacs;

Reported by: Helmut Eller <eller.helmut <at> gmail.com>

Date: Thu, 3 Dec 2009 15:05:07 UTC

Severity: normal

Tags: fixed

Fixed in version 24.1

Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #33 received at 5114 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Helmut Eller <eller.helmut <at> gmail.com>
Cc: 5114 <at> debbugs.gnu.org
Subject: Re: 23.1.50;
	(string-to-number (number-to-string most-positive-fixnum))
Date: Sun, 18 Sep 2011 11:47:58 +0200
Helmut Eller <eller.helmut <at> gmail.com> 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/




This bug report was last modified 13 years and 246 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.