From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Roland Winkler" Newsgroups: gmane.emacs.bugs Subject: bug#10554: 24.0.92; No units specified (dimensionless quantities in Emacs Calc) Date: Fri, 20 Jan 2012 11:55:20 -0600 Message-ID: <20249.43656.150957.30947@gargle.gargle.HOWL> References: <8762g8i7s6.fsf@niu.edu> <87bopz5pt8.fsf@gmail.com> <20248.39483.716850.185512@gargle.gargle.HOWL> <87d3afdlfz.fsf@gmail.com> <20249.10002.733142.491623@gargle.gargle.HOWL> <8739bajp5k.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1327082159 17808 80.91.229.12 (20 Jan 2012 17:55:59 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 20 Jan 2012 17:55:59 +0000 (UTC) Cc: 10554@debbugs.gnu.org To: jay.p.belanger@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 20 18:55:54 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RoIgm-0000ud-OY for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Jan 2012 18:55:48 +0100 Original-Received: from localhost ([::1]:52057 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoIgl-0003Ne-V0 for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Jan 2012 12:55:47 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:48345) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoIgj-0003NJ-Lp for bug-gnu-emacs@gnu.org; Fri, 20 Jan 2012 12:55:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RoIgi-00016h-FR for bug-gnu-emacs@gnu.org; Fri, 20 Jan 2012 12:55:45 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42226) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoIgi-00016d-9U for bug-gnu-emacs@gnu.org; Fri, 20 Jan 2012 12:55:44 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1RoIhy-0006Rf-58 for bug-gnu-emacs@gnu.org; Fri, 20 Jan 2012 12:57:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Roland Winkler" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Jan 2012 17:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10554 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 10554-submit@debbugs.gnu.org id=B10554.132708220624747 (code B ref 10554); Fri, 20 Jan 2012 17:57:02 +0000 Original-Received: (at 10554) by debbugs.gnu.org; 20 Jan 2012 17:56:46 +0000 Original-Received: from localhost ([127.0.0.1]:36899 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RoIhi-0006R6-4n for submit@debbugs.gnu.org; Fri, 20 Jan 2012 12:56:46 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]:56500) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RoIhf-0006Qy-1H for 10554@debbugs.gnu.org; Fri, 20 Jan 2012 12:56:44 -0500 Original-Received: from u010774.lc.ehu.es ([158.227.8.163]:38446 helo=regnitz) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1RoIgN-0007OG-VZ; Fri, 20 Jan 2012 12:55:24 -0500 In-Reply-To: <8739bajp5k.fsf@gmail.com> X-Mailer: VM 8.2 trial under 24.0.92.1 (x86_64-unknown-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:55873 Archived-At: On Fri Jan 20 2012 Jay Belanger wrote: > > > I would always consider the concept of "converting part of a units > > expression" to be not the main rule to follow here, > > If 45 mi/hr is on the stack, and "u c" is called with new units km, what > should happen? Here the user is posing a problem with no uniquely defined answer. The answer could be expressed in km/hr but also in km/s or in km eV/hbar. This scenario I would always give the lowest priority. > > but the exception if nothing else works because it is, in > > general, not unique which unit should be used for the remainder, > > if one converts, say, pc^2 into gal. > > If volume is converted to volume, there should be no remainder. pc^2 specifies an area: 1 pc^2 is converted to 2.5e35 gal/m > But what if you ask Calc to convert a units expression into a > dimensionless number when it can't be so converted? again: I'd give this scenario the lowest priority. I'd say: most often the requested output unit does not match the dimension of the input because one made whatever mistake either in the expression to be converted or in the unit selected for the output. > If you try to convert it to alpha, you can use "1" as a default old > unit and you can give it "alpha" as a new unit. (Since "1" can't be > used as an output unit, it isn't obvious that it can be used an > an input unit. Perhaps that's what this discussion is about.) If I have a plain number on the stack and want it to be converted to alpha, I'll be asked for the old unit. - You are right: here one can specify "1" as the old unit. My problem is here that from my perspective as a Calc user (not worrying about any internals of Calc) the treatment of the unit "1" sticks out in various ways. In physics I'd call "1" a unit like all the other ones. In that sense it would be great if Calc could treat it that way, too. > (Granted, currently an output unit of 1 does give an error, but > since it would be a no-op I doubt the user intended to give it > anyhow.) This is the point where I want to argue the other way round: For me, it's perfectly valid and it would be great if one could use it like any other unit. > > Note that conversion of "7 alpha" to "m" already gives the > > dimensionless number 0.051. > > Right. That's how it currently works, I'd say that this example illustrates once more that any "partial conversion" is most often meaningless and not what the user might have intended. Roland