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

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

bug#16283: 24.2; Built-in function * , used for calculating product, giv


From: Eli Zaretskii
Subject: bug#16283: 24.2; Built-in function * , used for calculating product, gives wrong output
Date: Sat, 28 Dec 2013 20:52:02 +0200

> From: Mohammed Sami <abdussami101@gmail.com>
> Date: Sat, 28 Dec 2013 23:45:38 +0530
> 
> After starting window Emacs with "emacs -q", when I evaluate (* 1024 1024
> 1024 1024), I get 0.
> (* 1024 1024) works correctly, but repeating '1024' more than two times
> gives wrong value.

A 32-bit build of Emacs cannot correctly do integer math beyond the
value of most-positive-fixnum, whose value is 536870911.  This is a
fundamental limitation of Emacs Lisp, not a bug.

You can work around this bu using floating-point numbers:

  (* 1024.0 1024.0 1024.0) => 1073741824.0

Closing.





reply via email to

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