GNU bug report logs -
#30408
24.5; (format "%x" large-number) produces incorrect results
Previous Next
Reported by: David Sitsky <david.sitsky <at> gmail.com>
Date: Sat, 10 Feb 2018 07:03:02 UTC
Severity: wishlist
Found in version 24.5
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
Message #46 received at 30408 <at> debbugs.gnu.org (full text, mbox):
> From: Paul Eggert <eggert <at> cs.ucla.edu>
> Date: Tue, 27 Mar 2018 16:19:21 -0700
>
> Here's a patch that I hope addresses the main problem. The basic idea is
> to avoid the confusion exemplified in Bug#30408 by changing Emacs so
> that it ordinarily signals an error if it reads a program that contains
> an integer literal that is out of fixnum range. However, if the
> out-of-range literal is followed by '.' then Emacs continues to silently
> convert it to floating-point; this is intended as an escape hatch for
> any programs that need the old behavior (I expect this'll be rare).
I'd suggest, for a good measure, to have a variable which would force
the conversion to floats, avoiding an error even without the trailing
period. We can later remove that variable, or make it a no-op, if the
danger of breaking existing code turns out low or non-existent.
This bug report was last modified 7 years and 78 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.