all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Calc: calc-convert-temperature and floating-point results
@ 2007-08-05 20:19 Christian Schlauer
  2007-08-26 13:19 ` Christian Schlauer
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Schlauer @ 2007-08-05 20:19 UTC (permalink / raw)
  To: bug-gnu-emacs

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-08-26 13:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-05 20:19 Calc: calc-convert-temperature and floating-point results Christian Schlauer
2007-08-26 13:19 ` Christian Schlauer

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.