XTCE 1.2 RTF Avatar
  1. OMG Issue

XTCE12 — Missing a number of Math Operators in latest proposal merge for XTCE 1.2.

  • Key: XTCE12-472
  • Status: closed  
  • Source: Boeing ( Mr. David Overeem)
  • Summary:

    Previous issue resolution incorporated has some probably mistakes in the math operators.

    atan2 should have two arguments
    missing some new operators
    clarification of platform/language specific issues on some operators

  • Reported: XTCE 1.1 — Sat, 5 Aug 2017 16:46 GMT
  • Disposition: Resolved — XTCE 1.2
  • Disposition Summary:

    Propose to correct the misses in math operators

    This resolution proposes to replace the current proposed complexType MathOperatorsType with one that incorporates missing operators from the previous developed BitBucket schema. Additional appinfo is provided to assist in guiding implementers. An error was noted on the arguments for atan2() also.

    This is the replacement type definition:

    <simpleType name="MathOperatorsType">
    <annotation>
    <documentation xml:lang="en">Mathematical operators used in the math operation. Behavior of each operator on the stack is described using notation (before – after), where "before" represents the stack before execution of the operator and "after" represent the stack after execution.</documentation>
    </annotation>
    <restriction base="string">
    <enumeration value="+">
    <annotation>
    <documentation xml:lang="en">addition (x1 x2 – x1+x2)</documentation>
    </annotation>
    </enumeration>
    <enumeration value="-">
    <annotation>
    <documentation xml:lang="en">subtraction (x1 x2 – x1-x2)</documentation>
    </annotation>
    </enumeration>
    <enumeration value="*">
    <annotation>
    <documentation xml:lang="en">multiplication (x1 x2 – x1*x2)</documentation>
    </annotation>
    </enumeration>
    <enumeration value="/">
    <annotation>
    <documentation xml:lang="en">division (x1 x2 – x1/x2)</documentation>
    <appinfo>An undefined condition exists if x2 is 0</appinfo>
    </annotation>
    </enumeration>
    <enumeration value="%">
    <annotation>
    <documentation xml:lang="en">modulo (x1 x2 – x3) Divide x1 by x2, giving the modulo x3</documentation>
    <appinfo>An undefined condition exists if x2 is 0. Implementations should verify modulo versus remainder behavior.</appinfo>
    </annotation>
    </enumeration>
    <enumeration value="^">
    <annotation>
    <documentation xml:lang="en">power function (x1 x2 – x1**x2)</documentation>
    <appinfo>An undefined condition exists if an imaginary number is the result. Imaginary numbers are not supported</appinfo>
    </annotation>
    </enumeration>
    <enumeration value="y^x">
    <annotation>
    <documentation xml:lang="en">reverse power function (x1 x2 – x2**x1)</documentation>
    </annotation>
    </enumeration>
    <enumeration value="ln">
    <annotation>
    <documentation xml:lang="en">natural (base e) logarithm (x – ln)</documentation>
    <appinfo>An undefined condition exists if x is less than or equal to 0</appinfo>
    </annotation>
    </enumeration>
    <enumeration value="log">
    <annotation>
    <documentation xml:lang="en">base-10 logarithm (x-- log)</documentation>
    <appinfo>An undefined condition exists if x is less than or equal to 0</appinfo>
    </annotation>
    </enumeration>
    <enumeration value="e^x">
    <annotation>
    <documentation xml:lang="en">exponentiation (x – exp)</documentation>
    </annotation>
    </enumeration>
    <enumeration value="1/x">
    <annotation>
    <documentation xml:lang="en">inversion (x – 1/x)</documentation>
    <appinfo>An undefined condition exists if x is less than 0</appinfo>
    </annotation>
    </enumeration>
    <enumeration value="x!">
    <annotation>
    <documentation xml:lang="en">factorial (x – x!)</documentation>
    <appinfo>An undefined condition exists if x is less than 0</appinfo>
    </annotation>
    </enumeration>
    <enumeration value="tan">
    <annotation>
    <documentation xml:lang="en">tangent (x – tan) radians</documentation>
    </annotation>
    </enumeration>
    <enumeration value="cos">
    <annotation>
    <documentation xml:lang="en">cosine (x – cos) radians</documentation>
    </annotation>
    </enumeration>
    <enumeration value="sin">
    <annotation>
    <documentation xml:lang="en">sine (x – sin) radians</documentation>
    </annotation>
    </enumeration>
    <enumeration value="atan">
    <annotation>
    <documentation xml:lang="en">arctangent (x – atan) radians</documentation>
    </annotation>
    </enumeration>
    <enumeration value="atan2">
    <annotation>
    <documentation xml:lang="en">arctangent (x1 x2 – atan2(x2, x1)) radians</documentation>
    <appinfo>An undefined condition exists if x1 and x2 are 0</appinfo>
    </annotation>
    </enumeration>
    <enumeration value="acos">
    <annotation>
    <documentation xml:lang="en">arccosine (x – acos) radians</documentation>
    </annotation>
    </enumeration>
    <enumeration value="asin">
    <annotation>
    <documentation xml:lang="en">arcsine (x – asin) radians</documentation>
    </annotation>
    </enumeration>
    <enumeration value="tanh">
    <annotation>
    <documentation xml:lang="en">hyperbolic tangent (x – tanh)</documentation>
    </annotation>
    </enumeration>
    <enumeration value="cosh">
    <annotation>
    <documentation xml:lang="en">hyperbolic cosine (x – cosh)</documentation>
    </annotation>
    </enumeration>
    <enumeration value="sinh">
    <annotation>
    <documentation xml:lang="en">hyperbolic sine (x – sinh)</documentation>
    </annotation>
    </enumeration>
    <enumeration value="atanh">
    <annotation>
    <documentation xml:lang="en">hyperbolic arctangent (x – atanh)</documentation>
    <appinfo>An undefined condition exists if x is outside the range [-1.0,+1.0]</appinfo>
    </annotation>
    </enumeration>
    <enumeration value="acosh">
    <annotation>
    <documentation xml:lang="en">hyperbolic arccosine (x – acosh)</documentation>
    <appinfo>An undefined condition exists if n is less than 1</appinfo>
    </annotation>
    </enumeration>
    <enumeration value="asinh">
    <annotation>
    <documentation xml:lang="en">hyperbolic arcsine (x – asinh)</documentation>
    </annotation>
    </enumeration>
    <enumeration value="swap">
    <annotation>
    <documentation xml:lang="en">swap the top two stack items (x1 x2 – x2 x1)</documentation>
    </annotation>
    </enumeration>
    <enumeration value="drop">
    <annotation>
    <documentation xml:lang="en">Remove top item from the stack (x – )</documentation>
    </annotation>
    </enumeration>
    <enumeration value="dup">
    <annotation>
    <documentation xml:lang="en">Duplicate top item on the stack (x – x x)</documentation>
    </annotation>
    </enumeration>
    <enumeration value="over">
    <annotation>
    <documentation xml:lang="en">Duplicate top item on the stack (x1 x2 – x1 x2 x1)</documentation>
    </annotation>
    </enumeration>
    <enumeration value="<<">
    <annotation>
    <documentation xml:lang="en">signed bitwise left shift (x1 x2 – x1 << x2)</documentation>
    <appinfo>Limitation from SEI INT13-C. Use bitwise operators only on unsigned operands</appinfo>
    </annotation>
    </enumeration>
    <enumeration value=">>">
    <annotation>
    <documentation xml:lang="en">signed bitwise right shift (x1 x2 – x1 >> x2)</documentation>
    <appinfo>Limitation from SEI INT13-C. Use bitwise operators only on unsigned operands</appinfo>
    </annotation>
    </enumeration>
    <enumeration value="&">
    <annotation>
    <documentation xml:lang="en">bitwise and (x1 x2 – x1 & x2)</documentation>
    <appinfo>Limitation from SEI INT13-C. Use bitwise operators only on unsigned operands</appinfo>
    </annotation>
    </enumeration>
    <enumeration value="|">
    <annotation>
    <documentation xml:lang="en">bitwise or (x1 x2 – x1 | x2)</documentation>
    <appinfo>Limitation from SEI INT13-C. Use bitwise operators only on unsigned operands</appinfo>
    </annotation>
    </enumeration>
    <enumeration value="&&">
    <annotation>
    <documentation xml:lang="en">logical and (x1 x2 – x1 && x2)</documentation>
    <appinfo>The result of this can only be 0 or 1</appinfo>
    </annotation>
    </enumeration>
    <enumeration value="||">
    <annotation>
    <documentation xml:lang="en">logical or (x1 x2 – x1 || x2)</documentation>
    <appinfo>The result of this can only be 0 or 1</appinfo>
    </annotation>
    </enumeration>
    <enumeration value="!">
    <annotation>
    <documentation xml:lang="en">logical not (x1 x2 – x1 ! x2)</documentation>
    <appinfo>The result of this can only be 0 or 1</appinfo>
    </annotation>
    </enumeration>
    <enumeration value="abs">
    <annotation>
    <documentation xml:lang="en">absolute value (x1 – abs(x1))</documentation>
    </annotation>
    </enumeration>
    <enumeration value="div">
    <annotation>
    <documentation xml:lang="en">Euclidean division quotient (x1 – div(x1))</documentation>
    </annotation>
    </enumeration>
    <enumeration value="int">
    <annotation>
    <documentation xml:lang="en">integer part (x1 – int(x1))</documentation>
    </annotation>
    </enumeration>
    <enumeration value=">">
    <annotation>
    <documentation xml:lang="en">greater than x,y (x1 x2 – x1 > x2)</documentation>
    <appinfo>The result of this can only be 0 or 1</appinfo>
    </annotation>
    </enumeration>
    <enumeration value=">=">
    <annotation>
    <documentation xml:lang="en">greater than or equal x,y (x1 x2 – x1 >= x2)</documentation>
    <appinfo>The result of this can only be 0 or 1</appinfo>
    </annotation>
    </enumeration>
    <enumeration value="<">
    <annotation>
    <documentation xml:lang="en">less than x,y (x1 x2 – x1 < x2)</documentation>
    <appinfo>The result of this can only be 0 or 1</appinfo>
    </annotation>
    </enumeration>
    <enumeration value="<=">
    <annotation>
    <documentation xml:lang="en">less than or equal x,y (x1 x2 – x1 <= x2)</documentation>
    <appinfo>The result of this can only be 0 or 1</appinfo>
    </annotation>
    </enumeration>
    <enumeration value="==">
    <annotation>
    <documentation xml:lang="en">equal x,y (x1 x2 – x1 == x2)</documentation>
    <appinfo>The result of this can only be 0 or 1</appinfo>
    </annotation>
    </enumeration>
    <enumeration value="!=">
    <annotation>
    <documentation xml:lang="en">not equal x,y (x1 x2 – x1 != x2)</documentation>
    <appinfo>The result of this can only be 0 or 1</appinfo>
    </annotation>
    </enumeration>
    <enumeration value="min">
    <annotation>
    <documentation xml:lang="en">minimum of x,y (x1 x2 – min(x1, x2))</documentation>
    </annotation>
    </enumeration>
    <enumeration value="max">
    <annotation>
    <documentation xml:lang="en">maximum of x,y (x1 x2 – max(x1, x2))</documentation>
    </annotation>
    </enumeration>
    <enumeration value="xor">
    <annotation>
    <documentation xml:lang="en">Bitwise exclusive or (XOR) (x1 x2 – x1 xor x2)</documentation>
    <appinfo>Limitation from SEI INT13-C. Use bitwise operators only on unsigned operands</appinfo>
    </annotation>
    </enumeration>
    <enumeration value="~">
    <annotation>
    <documentation xml:lang="en">Bitwise not operation (x1 x2 – x1 ~ x2) The result of this can only be 0 or 1</documentation>
    <appinfo>Limitation from SEI INT13-C. Use bitwise operators only on unsigned operands</appinfo>
    </annotation>
    </enumeration>
    </restriction>
    </simpleType>

  • Updated: Tue, 10 Jul 2018 14:23 GMT