From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#40892: 26.3; emacs calculator.el: return values are truncated integers Date: Wed, 29 Apr 2020 11:57:23 -0400 Message-ID: <85v9ligu8s.fsf@gmail.com> References: <87tv151h2m.fsf@igel.home> <871ro9b8cz.fsf@fliptop.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="21131"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (windows-nt) Cc: 40892@debbugs.gnu.org, Aitor Soroa , Andreas Schwab To: Tomas Nordin Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 29 17:59:52 2020 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 1jTp7o-0005Nf-2X for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 29 Apr 2020 17:59:52 +0200 Original-Received: from localhost ([::1]:50984 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTp7n-0005tu-2i for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 29 Apr 2020 11:59:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39398) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTp6o-0005KD-VJ for bug-gnu-emacs@gnu.org; Wed, 29 Apr 2020 11:59:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jTp62-0002fG-MG for bug-gnu-emacs@gnu.org; Wed, 29 Apr 2020 11:58:50 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:32818) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jTp62-0002f1-8m for bug-gnu-emacs@gnu.org; Wed, 29 Apr 2020 11:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jTp62-0001eX-6W for bug-gnu-emacs@gnu.org; Wed, 29 Apr 2020 11:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 29 Apr 2020 15:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40892 X-GNU-PR-Package: emacs Original-Received: via spool by 40892-submit@debbugs.gnu.org id=B40892.15881758536317 (code B ref 40892); Wed, 29 Apr 2020 15:58:02 +0000 Original-Received: (at 40892) by debbugs.gnu.org; 29 Apr 2020 15:57:33 +0000 Original-Received: from localhost ([127.0.0.1]:44364 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTp5Z-0001do-HX for submit@debbugs.gnu.org; Wed, 29 Apr 2020 11:57:33 -0400 Original-Received: from mail-qt1-f179.google.com ([209.85.160.179]:39993) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTp5Y-0001dc-33 for 40892@debbugs.gnu.org; Wed, 29 Apr 2020 11:57:32 -0400 Original-Received: by mail-qt1-f179.google.com with SMTP id e17so2248432qtp.7 for <40892@debbugs.gnu.org>; Wed, 29 Apr 2020 08:57:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=0DeWK7SYFAUWpR60I7zZJPIc2rqlD2cCaw6TS20CnXM=; b=KLAlTGam3QTRMSZzzYGu2zxBJMIhTgwKfyKVrG0FvJ8rXnYgNoAEUXqFwtickTNRMr EDamZNvp4UETXvu/XQiHT8JjS9WBT52u2Eke+6krMHmolAoBNUXswkxaJItXFHiEYlXn 3g8W+KYIN8nn5CKcTt1Qmj8ZutH8pLLntA9DUpLyAfcCBXExeB0K7+JP+2Vdhal43gAR AgQzk4LvBgWab6h/RDGl90EREY9AaqeEuVORWStgsC+HhnYZZV1j9CwLxPiqi+8NE8AR /Y1GJnqKrAHolCrrzTWhzDPcbSHPgh9t5g1NwpS682jyEO8INTB0QUwNOfpkW9NkNUMv ETcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=0DeWK7SYFAUWpR60I7zZJPIc2rqlD2cCaw6TS20CnXM=; b=Y1kcX+3nd9WzxWieIpcsomIGiDVIo0Uty1dEP6SJYvpDzR+ckkVOhKls4Zm/JQ/pss ktIhe1DoIo1PpDPVmYFUxS/lrHQnsYtGOpdNEaUU3LPMMDTz2mCQXcf8Ap/9NBZU48n4 aTZ1WIAt3oqHM1vlA6+Fa7gjf6wMgNCPyQEyNy7pVSJxfVqCEqeql1MO/6vizfCTsXKQ LJvoo9ZE8ePZjdZ/fDhYjsSyhoeVx5d6ACcgJ91ZHbFopG7rTg9ea63GWLipvrRImMMu +ns41LTNeyCZ+B/OeBN9Fny6V5uXiwEI7EpE48qih11Lu0IrwuuownGnkfiUfiI0GKYb P7RA== X-Gm-Message-State: AGi0PuZ/UyaRCryHdaNhh46XSd+vSqBECrgu67CC5EWyCmGYP1Fcj0oj tH7rrDyi2zEkdRJyjhR1uk67k2gY X-Google-Smtp-Source: APiQypLkbaQOEtqeJKfpRcFx/F1hA5i3HsXvhzFJHHvuB0U/tCBkJ4Tda1BVqrfInk1Wfyj1DbHt4g== X-Received: by 2002:aed:3f1d:: with SMTP id p29mr34919992qtf.14.1588175846333; Wed, 29 Apr 2020 08:57:26 -0700 (PDT) Original-Received: from vhost2 (CPE001143542e1f-CMf81d0f809fa0.cpe.net.cable.rogers.com. [99.230.38.42]) by smtp.gmail.com with ESMTPSA id 22sm16155152qks.76.2020.04.29.08.57.25 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 29 Apr 2020 08:57:25 -0700 (PDT) In-Reply-To: <871ro9b8cz.fsf@fliptop.i-did-not-set--mail-host-address--so-tickle-me> (Tomas Nordin's message of "Mon, 27 Apr 2020 11:12:12 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Received-From: 209.51.188.43 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" Xref: news.gmane.io gmane.emacs.bugs:179325 Archived-At: >>> M-x calculator >>> 22 / 7 >>> >>> The answer is '3'. >> ELISP> (/ 22 7) >> 3 (#o3, #x3, ?\C-c) >> ELISP> (/ 22 7.0) >> 3.142857142857143 > > It might be a bit surprising through an interface that is meant to be > similar to popular calc apps (if meant so). On the other hand maybe one > wants to do integer divisions as well. This report could be a suggestion > of a new variable like 'treat-input-integers-as-floats'. There is already an integer division operation: 22.0 / 7 RET ===> 3.143 22.0 \ 7 RET ===> 3 But we probably do still want an option, just because existing users may want to keep the current behaviour.