GNU bug report logs -
#5114
23.1.50; (string-to-number (number-to-string most-positive-fixnum))
Previous Next
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 #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
(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.
Helmut.
In GNU Emacs 23.1.50.1 (x86_64-unknown-linux-gnu)
of 2009-12-03
configured using `configure '--without-x''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: nil
locale-coding-system: utf-8-unix
default enable-multibyte-characters: t
This bug report was last modified 13 years and 245 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.