OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

# office message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [office] Fw: [members] OASIS TC Call for Participation: OASIS UnitsMLTC

• From: robert_weir@us.ibm.com
• To: office@lists.oasis-open.org
• Date: Thu, 15 Jun 2006 21:54:31 -0400

The techniques for checking the correctness of calculations involving physical quantities is well-known.  Wikipedia has a really nice write up:  http://en.wikipedia.org/wiki/Dimensional_analysis

One way I've seen the syntax question solved in the commercial product MathCAD.  It has built in constants like "kg", "sec" or "m" which can be multiplied by an constant to created a dimensioned constant, like 100*kg.  See http://www.che.lsu.edu/links/computing/tutorials/mathcad/tutorials/units_tutorial.htm for more examples.

This can go in really interesting directions.  If you allow physical units, why not also allow values with uncertainty (measurement error or whatever) and via interval arithmetic or other means correctly propagate errors through the calculations, the so calculated cells correctly express the error in the results?

I'm going to add a use case to the set of metadata uses cases we're putting together.    The rest is an implementation concern <g>

-Rob

"David A. Wheeler" <dwheeler@dwheeler.com> wrote on 06/13/2006 07:27:50 PM:

> robert_weir@us.ibm.com wrote:
> >
> > Saw this come through today.
> >
> > Crazy idea, but has anyone seen a spreadsheet that was sensitive to
> > metrical units?  So I could put "1 m" in A1, "1 cm" in A2 and =A1+A2
> > in A3 and have it come out as 1.01 m or 1101 cm, with units converting
> > automatically and perhaps giving an error condition if incompatible
> > units were mixed, e.g., inches added to seconds.
> >
> > If we can make a cell bold, or format it as currency, why not be able
> > to apply a "meters" tag to it, to clarify the units?
> >
> > A spreadsheet that tracked units, autoconverted units and warned of
> > unit mismatches would be a killer feature for scientific/engineering use.
> >
> > So, this UnitsML spec might be worth tracking to see if there is some
> > interesting innovation we can do in this area in a future (2007?
> > 2008?) ODF release.
>
> I don't know of any spreadsheets that have this general functionality,
> but you're
> right, it's a very interesting idea.  It would really just automate what
> engineers
> do by hand, but the possibility of automatically detecting mistakes
> would be very
> worthwhile.  One potential problem is the syntax.
>
> There are many general-purpose libraries that do something like this.
> Here's a LISP one:
> http://www.iue.tuwien.ac.at/phd/tuppa/node96.html#SECTION001840000000000000000
> http://tcllib.sourceforge.net/doc/units.html
> One person tried to do this in Ada directly, by abusing its type system,
> but that didn't work out well: