bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#8611: fixnum arithmetic should not wrap around


From: Stefan Monnier
Subject: bug#8611: fixnum arithmetic should not wrap around
Date: Tue, 03 May 2011 21:31:21 -0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> If Emacs Lisp treats too-large integers as floating point when
> reading, then its arithmetic should be consistent with this.  In the
> long run perhaps it'd be better for Emacs Lisp to use bignums, but
> until then, consistent use of floating point is a better substitute
> than wraparound.

I'm not convinced that auto-switching to floats is a good idea.
Using floats has only been introduced in order to handle things like
file sizes larger than 4GB, i.e. the int-to-float conversion currently
only ever happens for values that come from some C function.

Until now the current inconsistency hasn't seemed to be a source of real
problems, so I'd rather leave it as is.  If/when we bump into a real
problem due to it, we'll then see what needs to be done.


        Stefan





reply via email to

[Prev in Thread] Current Thread [Next in Thread]