|
From: | Stefan Monnier |
Subject: | bug#5114: 23.1.50; (string-to-number (number-to-string most-positive-fixnum)) |
Date: | Thu, 03 Dec 2009 15:52:16 -0500 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) |
> (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. Indeed, it passes through a floating point conversion, so there's only abour 52 bit of precesion. Stefan
[Prev in Thread] | Current Thread | [Next in Thread] |