When using the arithmitic editor i found it tends to often lead to domainviolation when using goniometic calculations:
2016-06-02 12:51:34| 67.4| 0.0|WARN |Number of Coordinates: 2 -- Coordinate Dimension: 2
2016-06-02 12:51:34| 67.4| 0.0|WARN |(95221.671876227498,464970.131574183)(95220.230171277391,464970.131574183)
2016-06-02 12:51:34| 67.4| 0.0|WARN |===========================================================================
2016-06-02 12:51:36| 69.7| 2.2|WARN |Hoek_in_graden_en_radialen._2_AttributeCreator_2: Failed to evaluate arithmetic expression '-1.#IND*(180*1.0/3.1415926535897932)'
2016-06-02 12:51:36| 69.7| 0.0|WARN |Hoek_in_graden_en_radialen._2_AttributeCreator_2: TCL Error Message:
2016-06-02 12:51:36| 69.7| 0.0|WARN | invalid character "#"
2016-06-02 12:51:36| 69.7| 0.0|WARN | in expression "-1.#IND*(180*1.0/3.1415926..."
2016-06-02 12:51:36| 69.7| 0.0|WARN |Hoek_in_graden_en_radialen._2_AttributeCreator_2: Failed to evaluate expression '-1.#IND*(180*1.0/3.1415926535897932)'
This bit in the above expression uising above vertices
@Evaluate((@Value(E_x)-@Value(S_x))/@sqrt(@pow(@Value(E_x)-@Value(S_x),2)))
has fme output -1.0000000000000027 (the table view shows value -1 b.t.w. so its a bit lying...lol)
wich leads to acos (-1.0000000000000027) wich is out of domain.
Where is should be
-1 (in fact when line is horizontal it is calculating A/SQRT(Pow(A) wich is A/A wich is 1.. child can do it..)
Fme has no pmin, pmax functions.
the expr tcl function to do the math is more accurate.
using tcl expr
>expr (@Value(E_x)-@Value(S_x))/sqrt(pow(@Value(E_x)-@Value(S_x),2))]
yields the correct -1
I always thought fme waas using the same math engine, tcl one, but appearently not?
so