ucum-org / ucum

https://ucum.org
Other
50 stars 10 forks source link

tan100 defined inconsistently #134

Closed timbrisc closed 7 years ago

timbrisc commented 8 years ago

Issue migrated from trac ticket # 185

component: unit definitions | priority: major | resolution: fixed

2016-05-31 08:42:15: maik.riechert@arcor.de created the issue


In §44 the text says:

The function pair denoted “tan100(1 deg)” is defined as fPD(α) # tan(α) * 100 to convert from a plane angle α to a prism diopter value (or a slope percent value) and fPD-1(x)arctan(x / 100) to convert from prism diopter (or slope percent) value x back to a plane angle.

Whereas the table below says: 100tan(1 rad)

Looking at the XML file, you find the following:

   <unit Code="[p'diop]" CODE="[P'DIOP]" isMetric="no" isSpecial="yes" class="clinical">
      <name>prism diopter</name>
      <printSymbol>PD</printSymbol>
      <property>refraction of a prism</property>
      <value Unit="100tan(1 rad)" UNIT="100TAN(1 RAD)">
         <function name="tanTimes100" value="1" Unit="deg"/>
      </value>
   </unit>
   <unit Code="%[slope]" CODE="%[SLOPE]" isMetric="no" isSpecial="yes" class="clinical">
      <name>percent of slope</name>
      <printSymbol>%</printSymbol>
      <property>slope</property>
      <value Unit="100tan(1 rad)" UNIT="100TAN(1 RAD)">
         <function name="100tan" value="1" Unit="deg"/>
      </value>
   </unit>

There are two inconsistencies here:

  1. There are two different function names for the same thing within the tags: 100tan and tanTimes100.
  2. The tag has "deg" as unit, whereas the tag has "100tan(1 rad)".
timbrisc commented 7 years ago

2016-12-14 15:21:38: gschadow@pragmaticdata.com commented


Yes, indeed, the text was off. The table was right. Changed the text from

The function pair denoted “tan100(1 deg)”

to

The function pair denoted “100tan(1 rad)”

The function/@name does not make it into the specification text. It is a name which conforms to naming rules in a typical programming language like Java, that is why it is different. Obviously it was not right with the function/@Unit="deg" in there, so I changed it to:

  <function name="tanTimes100" value="1" Unit="rad"/>
timbrisc commented 7 years ago

2016-12-14 15:21:55: gschadow@pragmaticdata.com changed status from new to closed

timbrisc commented 7 years ago

2016-12-14 15:21:55: gschadow@pragmaticdata.com set resolution to fixed

timbrisc commented 7 years ago

2016-12-14 15:21:55: gschadow@pragmaticdata.com