From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Christian Schlauer Newsgroups: gmane.emacs.bugs Subject: Calc: calc-convert-temperature and floating-point results Date: Sun, 05 Aug 2007 22:19:32 +0200 Message-ID: Reply-To: cs-usenet@arcor.de NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1186416952 2177 80.91.229.12 (6 Aug 2007 16:15:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 6 Aug 2007 16:15:52 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Aug 06 18:15:49 2007 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1II5F6-0001LM-S4 for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 Aug 2007 18:15:43 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1II5F1-0003H5-Li for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 Aug 2007 12:15:35 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1II5Ez-0003Gp-8T for bug-gnu-emacs@gnu.org; Mon, 06 Aug 2007 12:15:33 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1II5Ex-0003GD-Me for bug-gnu-emacs@gnu.org; Mon, 06 Aug 2007 12:15:32 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1II5Ex-0003GA-GG for bug-gnu-emacs@gnu.org; Mon, 06 Aug 2007 12:15:31 -0400 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1II5Ev-0003EP-Qh for bug-gnu-emacs@gnu.org; Mon, 06 Aug 2007 12:15:30 -0400 Original-Received: from root by ciao.gmane.org with local (Exim 4.43) id 1II5EV-0000kW-LF for bug-gnu-emacs@gnu.org; Mon, 06 Aug 2007 18:15:03 +0200 Original-Received: from finn.gmane.org ([80.91.229.4]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 06 Aug 2007 18:15:03 +0200 Original-Received: from cs-usenet by finn.gmane.org with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 06 Aug 2007 18:15:03 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 41 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: finn.gmane.org User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-Detected-Kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:16286 Archived-At: Observed with Emacs 22.1: The following table contains some temperatures in °F in the first column that are converted to °C in the second column with Org-mode and the equation below the table. The third column shows what one gets with Calc and `u t' (calc-convert-temperature) -- all converted temperatures that should be floating point numbers aren't fully converted: they are presented as fractions: -160:9 = -160/9 = -17.778. | T/°F | T/°C | T/°C (calculated in Calc with `u t') | |------+---------+--------------------------------------| | 0 | -17.778 | -160:9 | | 32 | 0 | 0 | | 50 | 10 | 10 | | 70 | 21.111 | 190:9 | | 90 | 32.222 | 290:9 | | 98.6 | 37. | 37. | | 212 | 100 | 100 | | 1750 | 954.44 | 8590:9 | #+TBLFM: $2=($1-32)*5/9 How to reproduce: ----------------- 1. emacs -q --no-site-file 2. M-x calc 3. Enter the number in the first column (prepend »'« and append » dF«) 4. Press u t RET dC RET 5. What you get is the value in the 3rd column -- what you want is the value in the second column Regards, Christian Schlauer P. S.: May I add a feature request? It would be nice if calc-convert-temperature (and calc-convert-units) remembered the last `target unit' requested by the user. That is, instead of the prompts "New temperature units: " and "New units: " I would prefer "New temperature units (default dC): " and "New units (default dC): " if "dC" was the last `target unit' used.