GNU bug report logs - #15859
24.3.50; Calc - dimensionless units again

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: "Roland Winkler" <winkler@HIDDEN>; dated Sun, 10 Nov 2013 23:36:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 10 Nov 2013 23:35:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 10 18:35:59 2013
Received: from localhost ([127.0.0.1]:46024 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VfeXv-0002ky-06
	for submit <at> debbugs.gnu.org; Sun, 10 Nov 2013 18:35:59 -0500
Received: from eggs.gnu.org ([208.118.235.92]:33774)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <winkler@HIDDEN>) id 1VfeXt-0002kk-4W
 for submit <at> debbugs.gnu.org; Sun, 10 Nov 2013 18:35:57 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <winkler@HIDDEN>) id 1VfeXh-00039v-UA
 for submit <at> debbugs.gnu.org; Sun, 10 Nov 2013 18:35:51 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:38579)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <winkler@HIDDEN>) id 1VfeXh-00039r-JZ
 for submit <at> debbugs.gnu.org; Sun, 10 Nov 2013 18:35:45 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:35489)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <winkler@HIDDEN>) id 1VfeXb-0000nL-Mm
 for bug-gnu-emacs@HIDDEN; Sun, 10 Nov 2013 18:35:45 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <winkler@HIDDEN>) id 1VfeXV-00038U-OP
 for bug-gnu-emacs@HIDDEN; Sun, 10 Nov 2013 18:35:39 -0500
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49453)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <winkler@HIDDEN>) id 1VfeXV-00038Q-9S
 for bug-gnu-emacs@HIDDEN; Sun, 10 Nov 2013 18:35:33 -0500
Received: from 162-229-45-114.lightspeed.cicril.sbcglobal.net
 ([162.229.45.114]:36145 helo=regnitz)
 by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <winkler@HIDDEN>) id 1VfeXU-000074-Tv
 for bug-gnu-emacs@HIDDEN; Sun, 10 Nov 2013 18:35:33 -0500
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <21120.6201.687671.227593@HIDDEN>
Date: Sun, 10 Nov 2013 17:35:21 -0600
From: "Roland Winkler" <winkler@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 24.3.50; Calc - dimensionless units again
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)


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@HIDDEN
Windowing system distributor `The X.Org Foundation', version 11.0.11103000
System Description:	Ubuntu 12.04.3 LTS




Acknowledgement sent to "Roland Winkler" <winkler@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#15859; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.