unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* 23.0.50; calc: units conversion changes value
@ 2007-10-23 18:29 Torsten Bronger
  2007-10-23 18:36 ` Leo
  2007-10-24  2:59 ` Jay Belanger
  0 siblings, 2 replies; 3+ messages in thread
From: Torsten Bronger @ 2007-10-23 18:29 UTC (permalink / raw)
  To: emacs-pretest-bug

Hallöchen!

In Emacs Calc, when I try to convert between incompatible units,
Calc refuses to convert, which is totally correct behaviour.
However, in some cases it changes the value of the quantity, which
isn't in my opinion:

Current value on stack: "1".  Then "calc-convert-units", Old units:
1, new units: cm^2.  The new value on the stack is "100" but I
expect "1".  This is problematic when you mis-typed the new unit and
try it again with the correct one.  Then you get indeed the correct
target unit but (if metric prefixes and at least ^2 is involved)
with the wrong value.

Tschö,
Torsten.

-- 
Torsten Bronger, aquisgrana, europa vetus
                                      Jabber ID: bronger@jabber.org
                      (See http://ime.webhop.org for ICQ, MSN, etc.)

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

* Re: 23.0.50; calc: units conversion changes value
  2007-10-23 18:29 23.0.50; calc: units conversion changes value Torsten Bronger
@ 2007-10-23 18:36 ` Leo
  2007-10-24  2:59 ` Jay Belanger
  1 sibling, 0 replies; 3+ messages in thread
From: Leo @ 2007-10-23 18:36 UTC (permalink / raw)
  To: emacs-devel

On 2007-10-23 19:29 +0100, Torsten Bronger wrote:
> Hallöchen!
>
> In Emacs Calc, when I try to convert between incompatible units,
> Calc refuses to convert, which is totally correct behaviour.
> However, in some cases it changes the value of the quantity, which
> isn't in my opinion:
>
> Current value on stack: "1".  Then "calc-convert-units", Old units:
> 1, new units: cm^2.  The new value on the stack is "100" but I
> expect "1". 

I can reproduce this on Emacs 2007-10-10.

> This is problematic when you mis-typed the new unit and try it again
> with the correct one.  Then you get indeed the correct target unit but
> (if metric prefixes and at least ^2 is involved) with the wrong value.
>
> Tschö,
> Torsten.

-- 
.:  Leo  :.  [ sdl.web AT gmail.com ]  .:  [ GPG Key: 9283AA3F ]  :.

       Use the most powerful email client -- http://gnus.org/

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

* Re: 23.0.50; calc: units conversion changes value
  2007-10-23 18:29 23.0.50; calc: units conversion changes value Torsten Bronger
  2007-10-23 18:36 ` Leo
@ 2007-10-24  2:59 ` Jay Belanger
  1 sibling, 0 replies; 3+ messages in thread
From: Jay Belanger @ 2007-10-24  2:59 UTC (permalink / raw)
  To: emacs-pretest-bug; +Cc: jay.p.belanger


Torsten Bronger <bronger@physik.rwth-aachen.de> writes:

> In Emacs Calc, when I try to convert between incompatible units,
> Calc refuses to convert, which is totally correct behaviour.

Calc will convert to incompatible units, sort of; if the target units
are incompatible, it will multiply them by the appropriate fundamental
units to make the augmented target units compatible.

> However, in some cases it changes the value of the quantity, which
> isn't in my opinion:
>
> Current value on stack: "1".  Then "calc-convert-units", Old units:
> 1, new units: cm^2.  The new value on the stack is "100" but I
> expect "1". 

Thanks for catching this; it's been fixed in CVS.

Jay

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

end of thread, other threads:[~2007-10-24  2:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-23 18:29 23.0.50; calc: units conversion changes value Torsten Bronger
2007-10-23 18:36 ` Leo
2007-10-24  2:59 ` Jay Belanger

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).