unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#15859: 24.3.50; Calc - dimensionless units again
@ 2013-11-10 23:35 Roland Winkler
  2020-11-22 15:13 ` Michael Heerdegen
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Roland Winkler @ 2013-11-10 23:35 UTC (permalink / raw)
  To: 15859


I thought that the new (though undocumented) variable
calc-allow-units-as-numbers allowed to perform unit conversions
involving dimensionless units. Yet I am still having trouble with
this.  (For the following I have used the default
calc-allow-units-as-numbers bound to t, assuming that this is what I
need.)

Say, the old expression is "7 m / (c s)" and I want to convert this
into a physically equal expression.  So I run calc-convert-units,
which will ask

  (The expression is unitless when simplified) Old Units: 

With calc-allow-units-as-numbers non-nil, I think calc-convert-units
should not ask this question, or there should be some other way to
customize calc-convert-units to skip this question.  Anyway, I enter
an empty string, because I do not know what else would be meaningful
here. [m/(c s) is equal to 3.33e-9, this cannot be required if I
just want to convert "7 m / (c s)" into something equal to this
expression.]

Now for the new unit:

(1) If I want to convert "7 m / (c s)" to a plain number, I enter "1",
    but then Calc throws an error "No units specified".
    The correct result would be 2.33e-8.

(2) If one wants to convert to the new unit "in / (c hr)" the result
    returned by calc-convert-units is 2.33e-8, that is, the plain
    number which would have been the correct result for (1).
    The new unit "in / (c hr)" is ignored by calc-convert-units.
    The correct result would be "992125.98 in / (c hr)".

Both examples assume that it should be possible to make a unit
conversion where the old expression on the stack is physically equal
to the new expression.  I think this assumption is reasonable.




In GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.4.2)
 of 2013-11-10 on regnitz
Bzr revision: 115054 jan.h.d@swipnet.se-20131110121803-bv908hul7t8ji6c8
Windowing system distributor `The X.Org Foundation', version 11.0.11103000
System Description:	Ubuntu 12.04.3 LTS





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

end of thread, other threads:[~2023-04-25  3:44 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-10 23:35 bug#15859: 24.3.50; Calc - dimensionless units again Roland Winkler
2020-11-22 15:13 ` Michael Heerdegen
2020-11-23 15:13   ` Roland Winkler
2020-11-24  1:00     ` Michael Heerdegen
2020-11-24 23:37       ` Michael Heerdegen
2021-09-06  9:40         ` Lars Ingebrigtsen
2021-09-17  1:45           ` Michael Heerdegen
2023-04-14 15:12 ` Michael Heerdegen
2023-04-17  4:47   ` Roland Winkler
2023-04-17 14:04     ` Michael Heerdegen
2023-04-17 15:20       ` Roland Winkler
2023-04-18 23:07         ` Michael Heerdegen
2023-04-25  3:44           ` Roland Winkler
2023-04-21 14:25 ` Michael Heerdegen
2023-04-25  3:44   ` Roland Winkler

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).