all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#35608: 26.2; Calc temperature conversions
@ 2019-05-06 19:33 Harris, Bill
  2019-05-06 21:19 ` Mauro Aranda
  0 siblings, 1 reply; 5+ messages in thread
From: Harris, Bill @ 2019-05-06 19:33 UTC (permalink / raw)
  To: 35608

[-- Attachment #1: Type: text/plain, Size: 3387 bytes --]

I started Emacs from Cygwin with

$ /cygdrive/c/emacs/emacs-26.2-x86_64/bin/runemacs.exe  -Q

I typed C-x * * to start Calc.

I entered '10 degC' and then

u c degF

I got 18, not the expected 50.

From *Calc Trail*:

Emacs Calculator Trail
alg' 10 * degC
cvun 18. * degF



In GNU Emacs 26.2 (build 1, x86_64-w64-mingw32)
of 2019-04-13 built on CIRROCUMULUS
Repository revision: fd1b34bfba8f3f6298df47c8e10b61530426f749
Windowing system distributor 'Microsoft Corp.', version 10.0.17134
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Defining kbd macro...
C-x *  (Type ? for a list of Calc options)
Welcome to the GNU Emacs Calculator!  Press '?' or 'h' for help, 'q' to quit
Working...
Building units table...done
Quit [4 times]
Configured using:
'configure --without-dbus --host=x86_64-w64-mingw32
--without-compress-install 'CFLAGS=-O2 -static -g3''

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS THREADS LCMS2

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: cp1252

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
 menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv
bytecomp byte-compile cconv cl-loaddefs cl-lib dired dired-loaddefs
format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config
gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils calc-units calccomp calc-arith
calc-misc calc-alg calc-ext calc-aent calc-menu easymenu calc
calc-loaddefs calc-macs kmacro elec-pair time-date mule-util tooltip
eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel
dos-w32 ls-lisp disp-table term/w32-win w32-win w32-vars term/common-win
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core term/tty-colors frame cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads w32notify w32
lcms2 multi-tty make-network-process emacs)

Memory information:
((conses 16 134957 10618)
(symbols 48 23863 1)
(miscs 40 39 130)
(strings 32 37413 1399)
(string-bytes 1 950048)
(vectors 16 16436)
(vector-slots 8 524751 12824)
(floats 8 52 211)
(intervals 56 275 3)
(buffers 992 13))

[-- Attachment #2: Type: text/html, Size: 8916 bytes --]

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

* bug#35608: 26.2; Calc temperature conversions
  2019-05-06 19:33 bug#35608: 26.2; Calc temperature conversions Harris, Bill
@ 2019-05-06 21:19 ` Mauro Aranda
  2019-05-06 21:27   ` Harris, Bill
  0 siblings, 1 reply; 5+ messages in thread
From: Mauro Aranda @ 2019-05-06 21:19 UTC (permalink / raw)
  To: Harris, Bill; +Cc: 35608

[-- Attachment #1: Type: text/plain, Size: 563 bytes --]

tags 35608 notabug
quit

"Harris, Bill" <wsharris@snopud.com> writes:

> I entered '10 degC' and then
> u c degF
> I got 18, not the expected 50.

Hello.

That's because ‘u c’ treats temperature units as relative, and not as
absolute.  The result you got means that a change of 10 degrees Celsius
equals to a change of 18 degrees Fahrenheit.

You need to use ‘u t’ (calc-convert-temperature) to convert an absolute
temperature from one scale to another.  With that command, you'll get
the expected 50 degF.

Best regards,
Mauro.

>

[-- Attachment #2: Type: text/html, Size: 1095 bytes --]

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

* bug#35608: 26.2; Calc temperature conversions
  2019-05-06 21:19 ` Mauro Aranda
@ 2019-05-06 21:27   ` Harris, Bill
  2019-05-13 14:50     ` npostavs
  0 siblings, 1 reply; 5+ messages in thread
From: Harris, Bill @ 2019-05-06 21:27 UTC (permalink / raw)
  To: Mauro Aranda; +Cc: 35608@debbugs.gnu.org

[-- Attachment #1: Type: text/plain, Size: 1149 bytes --]

Thank you, Mauro.  I thought it gave absolute temperatures in previous versions (26.1, for example), but I just checked on version 25.1, and it, too, does as you say.

Bill

From: Mauro Aranda <maurooaranda@gmail.com>
Sent: Monday, May 6, 2019 2:19 PM
To: Harris, Bill <wsharris@snopud.com>
Cc: 35608@debbugs.gnu.org
Subject: Re: bug#35608: 26.2; Calc temperature conversions

CAUTION: THIS EMAIL IS FROM AN EXTERNAL SENDER.
Do not click on links or open attachments if the sender is unknown or the email is suspect.
________________________________
tags 35608 notabug
quit

"Harris, Bill" <wsharris@snopud.com<mailto:wsharris@snopud.com>> writes:

> I entered '10 degC' and then
> u c degF
> I got 18, not the expected 50.

Hello.

That's because ‘u c’ treats temperature units as relative, and not as
absolute.  The result you got means that a change of 10 degrees Celsius
equals to a change of 18 degrees Fahrenheit.

You need to use ‘u t’ (calc-convert-temperature) to convert an absolute
temperature from one scale to another.  With that command, you'll get
the expected 50 degF.

Best regards,
Mauro.

[-- Attachment #2: Type: text/html, Size: 4419 bytes --]

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

* bug#35608: 26.2; Calc temperature conversions
  2019-05-06 21:27   ` Harris, Bill
@ 2019-05-13 14:50     ` npostavs
  2019-05-13 14:52       ` Harris, Bill
  0 siblings, 1 reply; 5+ messages in thread
From: npostavs @ 2019-05-13 14:50 UTC (permalink / raw)
  To: Harris, Bill; +Cc: Mauro Aranda, 35608@debbugs.gnu.org

close 35608
quit

"Harris, Bill" <wsharris@snopud.com> writes:

> Thank you, Mauro.  I thought it gave absolute temperatures in previous
> versions (26.1, for example), but I just checked on version 25.1, and
> it, too, does as you say.

Right, see also (info "(calc) Basic Operations on Units") or
<https://www.gnu.org/software/emacs/manual/html_node/calc/Basic-Operations-on-Units.html>,
which has exactly this example conversion:

       The ‘u c’ command treats temperature units (like ‘degC’ and ‘K’) as
    relative temperatures.  For example, ‘u c’ converts ‘10 degC’ to ‘18
    degF’: A change of 10 degrees Celsius corresponds to a change of 18
    degrees Fahrenheit.  To convert absolute temperatures, you can use the
    ‘u t’ (‘calc-convert-temperature’) command.  The value on the stack must
    be a simple units expression with units of temperature only.  This
    command would convert ‘10 degC’ to ‘50 degF’, the equivalent temperature
    on the Fahrenheit scale.






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

* bug#35608: 26.2; Calc temperature conversions
  2019-05-13 14:50     ` npostavs
@ 2019-05-13 14:52       ` Harris, Bill
  0 siblings, 0 replies; 5+ messages in thread
From: Harris, Bill @ 2019-05-13 14:52 UTC (permalink / raw)
  To: npostavs@gmail.com; +Cc: Mauro Aranda, 35608@debbugs.gnu.org

RTM, as they say.  Thanks!

-----Original Message-----
From: npostavs@gmail.com <npostavs@gmail.com> 
Sent: Monday, May 13, 2019 7:50 AM
To: Harris, Bill <wsharris@snopud.com>
Cc: Mauro Aranda <maurooaranda@gmail.com>; 35608@debbugs.gnu.org
Subject: Re: bug#35608: 26.2; Calc temperature conversions

CAUTION: THIS EMAIL IS FROM AN EXTERNAL SENDER.
Do not click on links or open attachments if the sender is unknown or the email is suspect.
________________________________

close 35608
quit

"Harris, Bill" <wsharris@snopud.com> writes:

> Thank you, Mauro.  I thought it gave absolute temperatures in previous 
> versions (26.1, for example), but I just checked on version 25.1, and 
> it, too, does as you say.

Right, see also (info "(calc) Basic Operations on Units") or <https://www.gnu.org/software/emacs/manual/html_node/calc/Basic-Operations-on-Units.html>,
which has exactly this example conversion:

       The 'u c' command treats temperature units (like 'degC' and 'K') as
    relative temperatures.  For example, 'u c' converts '10 degC' to '18
    degF': A change of 10 degrees Celsius corresponds to a change of 18
    degrees Fahrenheit.  To convert absolute temperatures, you can use the
    'u t' ('calc-convert-temperature') command.  The value on the stack must
    be a simple units expression with units of temperature only.  This
    command would convert '10 degC' to '50 degF', the equivalent temperature
    on the Fahrenheit scale.






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

end of thread, other threads:[~2019-05-13 14:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-06 19:33 bug#35608: 26.2; Calc temperature conversions Harris, Bill
2019-05-06 21:19 ` Mauro Aranda
2019-05-06 21:27   ` Harris, Bill
2019-05-13 14:50     ` npostavs
2019-05-13 14:52       ` Harris, Bill

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.