GNU bug report logs - #16283
24.2; Built-in function * , used for calculating product, gives wrong output

Previous Next

Package: emacs;

Reported by: Mohammed Sami <abdussami101 <at> gmail.com>

Date: Sat, 28 Dec 2013 18:43:01 UTC

Severity: normal

Found in version 24.2

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #13 received at 16283-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Mohammed Sami <abdussami101 <at> gmail.com>
Cc: 16283-done <at> debbugs.gnu.org
Subject: Re: 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 <at> 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.




This bug report was last modified 11 years and 199 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.