[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Calc: calc-convert-temperature and floating-point results
From: |
Christian Schlauer |
Subject: |
Calc: calc-convert-temperature and floating-point results |
Date: |
Sun, 05 Aug 2007 22:19:32 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
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.
- Calc: calc-convert-temperature and floating-point results,
Christian Schlauer <=