* Stefan Monnier [2009-12-03 21:52+0100] 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. > > Indeed, it passes through a floating point conversion, so there's only > abour 52 bit of precesion. Here is a patch for string-to-number to use the full fixnum range: