From: Christian Schlauer <cs-muelleimer-rubbish.bin@arcor.de>
To: bug-gnu-emacs@gnu.org
Subject: Re: Calc: calc-convert-temperature and floating-point results
Date: Sun, 26 Aug 2007 15:19:12 +0200 [thread overview]
Message-ID: <faruk0$h4m$1@sea.gmane.org> (raw)
In-Reply-To: f95bc4$6cv$2@sea.gmane.org
Christian Schlauer <cs-muelleimer-rubbish.bin@arcor.de> writes:
> 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
This has been dealt with on the trunk -- thanks, Jay! However, it
doesn't work all the time. In fact, it seems to work only the first
time:
1. emacs -q --no-site-file
2. M-x calc
3. '0 dF RET
4. u t dF RET dC RET
So far, so good. But try to convert one more temperature:
5. '50 dF RET
6. u t RET
Now Emacs beeps and the echo area says "Bad format in units
expression: Expected a number".
Besides that, shouldn't this go into EMACS_22_BASE as well? -160:9
(°C) isn't a really convenient representation of -17.778 (°C), so it
counts as a bug fix, IMO.
> 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.
Thanks for implementing this!
--
Christian Schlauer
prev parent reply other threads:[~2007-08-26 13:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-05 20:19 Calc: calc-convert-temperature and floating-point results Christian Schlauer
2007-08-26 13:19 ` Christian Schlauer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='faruk0$h4m$1@sea.gmane.org' \
--to=cs-muelleimer-rubbish.bin@arcor.de \
--cc=bug-gnu-emacs@gnu.org \
--cc=cs-usenet@arcor.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.