Opened 6 years ago

Closed 5 years ago

#185 closed defect (fixed)

tan100 defined inconsistently

Reported by: maikriechert Owned by:
Priority: major Milestone: Version 2.1
Component: unit definitions Keywords:


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>
      <property>refraction of a prism</property>
      <value Unit="100tan(1 rad)" UNIT="100TAN(1 RAD)">
         <function name="tanTimes100" value="1" Unit="deg"/>
   <unit Code="%[slope]" CODE="%[SLOPE]" isMetric="no" isSpecial="yes" class="clinical">
      <name>percent of slope</name>
      <value Unit="100tan(1 rad)" UNIT="100TAN(1 RAD)">
         <function name="100tan" value="1" Unit="deg"/>

There are two inconsistencies here:

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

Change History (2)

comment:1 Changed 5 years ago by Gunther Schadow

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

The function pair denoted “tan100(1 deg)”


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"/>

comment:2 Changed 5 years ago by Gunther Schadow

Milestone: Version 2.1
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.