[Om] Questions about representing units

Jonathan Stratford jonathanstratford at hotmail.com
Sat Feb 21 14:46:31 CET 2009


Hi all,

In response to the questions left for me below.

>BTW, does your unit converter 
>(http://klein.activemath.org:90/~jonathan/units/converter.php) support such 
>compound units for which no explicit symbol has been defined?
Yes, it can cope with many of these (it can't cope with all of them as the 
algorithm's by no means perfect). For some reason, I can't get the online 
version to load, but the following (just picking 2 examples from my testing) 
work both with the version that was in my dissertation, and my local copy of 
what I think is on klein.activemath.org (it's slightly updated):

17.3 millimetre per nanosecond sqrd to mile per hour sqrd
6 ounce inch per minute sqrd to kilogramme metre per second sqrd

>Then, a final question about that unit converter: I can convert hours to 
>minutes, but for minutes to seconds, and hours to seconds, it tells me

>> The two units were known, but found to be different dimensions. Please
>> supply a definition for the units to reconcile this difference, 
>> remembering
>> to ensure the new definition has a different name.
>>
>> 1 hour to second is incalculable.

I'm not certain offhand what the problem with seconds is, but I would 
suspect it is because the unit "second" appears in both units_metric1 and 
units_time1, and the algorithm's picking the one in metric, then failing to 
find the path through to units_time1. My lookup algorithm returned the first 
unit it came across that matched the name "second", and then if the other 
unit was a different dimension, there was no way to go back and look for 
another unit. I mentioned it in my dissertation:

"It is unclear whether the unit second should be removed from either of its 
two CDs, because it is both a metric unit and a time unit, which in turn 
might have quite a big effect on the system, as several decisions were 
made---at least in part---because it was in both."

"Something that needs considering in OpenMath, but which has quite 
wide-ranging consequences for our system is whether it is correct for a unit 
name to appear in two different CDs, both to represent the same unit, as 
with second, or a different unit. This affects how the units are stored and 
looked up."

I did think I'd fixed/got round this in my dissertation, so I've just tried 
it on the version I handed in as my dissertation, and it seems hours or 
minutes to seconds works fine, so I've obviously broken that since in an 
effort to fix something else. The trouble is, for a long time (since my 
university account closed down after I left), I have no way of updating the 
version on klein.activemath.org (I never had FTP access, only scp, so I used 
my uni webspace to copy from). It has just occurred to me that I could 
possibly do it through cygwin, so I will try to give it a go later on -- but 
it seems the server is down currently.

>Is there any better place for reporting this bug?
I imagine I'm the only one worth reporting bugs to, as I don't think anyone 
else is likely to work on it.

Hope this is of some help -- feel free to ask anything else!

Cheers,
Jonathan

----- Original Message ----- 
From: "Professor James Davenport" <jhd at cs.bath.ac.uk>
To: "Christoph LANGE" <ch.lange at jacobs-university.de>
Cc: "OpenMath" <om at openmath.org>; <mdt22 at bath.ac.uk>; "Prof. James 
Davenport" <jhd at cs.bath.ac.uk>; <jap at cs.bath.ac.uk>; 
<jonathan.stratford at alumni.bath.ac.uk>; "Jana Giceva" 
<j.giceva at jacobs-university.de>
Sent: Saturday, February 21, 2009 3:37 AM
Subject: Re: Questions about representing units



On Fri, February 20, 2009 11:51 pm, Christoph LANGE wrote:
> Dear James, dear Jonathan, dear all,
> An easy one first:  I didn't find a concrete example for prefixing, but
> may I
> assume that the following is correct?
>
> <!-- 1 kilometre -->
> <OMA>
>   <OMS cd="arith1" name="times"/>
>   <OMI>1</OMI>
>   <OMA>
>     <OMS cd="units_ops1" name="prefix"/>
>     <OMS cd="units_siprefix1" name="kilo"/>
>     <OMS cd="units_metric1" name="metre"/>
>   </OMA>
> </OMA>
That's right.
> Then, how about compound units?  There are some convenience symbols like
> metres_per_second, but what do we need them for?  Wouldn't it make more
> sense
> to do without them (as you suggested to do without metre_squared) and
> write instead: <snip>divide</snip>
It probably would do. As and when we can declare individual symbols
obsolete, I will propose doing so to MOST of these - memroy says there are
some odd ones, but i can't remember offhand.

> BTW, does your unit converter
> (http://klein.activemath.org:90/~jonathan/units/converter.php) support
> such compound units for which no explicit symbol has been defined?
One for Jonathan.
> Then, a final question about that unit converter: I can convert hours to
> minutes, but for minutes to seconds, and hours to seconds, it tells me
Ditto this one.
>> The two units were known, but found to be different dimensions. Please
>> supply a definition for the units to reconcile this difference,
>> remembering
>> to ensure the new definition has a different name.
>>
>> 1 hour to second is incalculable.
>
> Is there any better place for reporting this bug?
>
> BTW, we are planning to add a unit conversion service to our active
> document framework (https://jomdoc.omdoc.org/wiki/JOBAD); see
> https://jomdoc.omdoc.org/ticket/254 if interested in further details.
Thanks for this.

James Davenport
Visiting Full Professor, University of Waterloo
Otherwise:
Hebron & Medlock Professor of Information Technology and
Chairman, Powerful Computing WP, University of Bath
OpenMath Content Dictionary Editor
IMU Committee on Electronic Information and Communication




More information about the Om mailing list