From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Van Ly via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#64441: 29.0.92; elisp arithmetic error at ielm prompt Date: Tue, 4 Jul 2023 10:44:06 GMT Message-ID: <202307041044.364Ai6nN021477@sdf.org> References: <202307031620.363GKYEA003729@sdf.org> <878rbx547h.fsf@gmx.net> Reply-To: Van Ly Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="975"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 64441@debbugs.gnu.org To: Stephen Berman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 04 12:45:28 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qGdXD-000AXZ-W8 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 04 Jul 2023 12:45:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qGdWw-0005mE-ET; Tue, 04 Jul 2023 06:45:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qGdWq-0005ll-Vk for bug-gnu-emacs@gnu.org; Tue, 04 Jul 2023 06:45:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qGdWp-0007Rw-0Y for bug-gnu-emacs@gnu.org; Tue, 04 Jul 2023 06:45:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qGdWo-0005D6-LD for bug-gnu-emacs@gnu.org; Tue, 04 Jul 2023 06:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Van Ly Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 04 Jul 2023 10:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64441 X-GNU-PR-Package: emacs X-Debbugs-Original-Cc: bug-gnu-emacs@gnu.org, 64441@debbugs.gnu.org Original-Received: via spool by 64441-submit@debbugs.gnu.org id=B64441.168846746319939 (code B ref 64441); Tue, 04 Jul 2023 10:45:02 +0000 Original-Received: (at 64441) by debbugs.gnu.org; 4 Jul 2023 10:44:23 +0000 Original-Received: from localhost ([127.0.0.1]:35056 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qGdWA-0005BX-NR for submit@debbugs.gnu.org; Tue, 04 Jul 2023 06:44:22 -0400 Original-Received: from mx.sdf.org ([205.166.94.24]:59418) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qGdW8-0005BL-6O for 64441@debbugs.gnu.org; Tue, 04 Jul 2023 06:44:21 -0400 Original-Received: from sdf.org (IDENT:van.ly@ryo.sdf.org [209.160.32.186]) by mx.sdf.org (8.16.1/8.14.5) with ESMTPS id 364Ai6FE020753 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Tue, 4 Jul 2023 10:44:17 GMT Original-Received: (from van.ly@localhost) by sdf.org (8.16.1/8.12.8/Submit) id 364Ai6nN021477; Tue, 4 Jul 2023 10:44:06 GMT In-Reply-To: <878rbx547h.fsf@gmx.net> (message from Stephen Berman on Mon, 03 Jul 2023 18:50:58 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:264571 Archived-At: > From: Stephen Berman > > `/' in Elisp is different from `/' in Common Lisp. > > (elisp) Arithmetic Operations: > > If all the arguments are integers, the result is an integer, > obtained by rounding the quotient towards zero after each division. > > Hence (/ 3 4), (/ 7 13) and (/ 5 12) all evaluate to 0, and "If you > divide an integer by the integer 0, Emacs signals an ‘arith-error’ > error". > > But in Common Lisp > (http://www.lispworks.com/documentation/HyperSpec/Body/f_sl.htm): > > If each argument is either an integer or a ratio, and the result is > not an integer, then it is a ratio. > > Hence (/ 3 4) => 3/4, (/ 7 13) => 7/13 and (/ 5 12) => 5/12 > Thank you Steve.