Arith Trigonometric
Aus ExpeccoWiki
Inhaltsverzeichnis |
Schema
Operation
The trigonometric functions consist of Sin, Cos, Tan, ArcSin, ArcCos and ArcTan. Angles are given in radians (i.e. a full circle is 2π). Although the pins' types are declared as "Number", the generated values are actually of "Float"-type for all inputs.
Errors
The usual mathematical exceptions are raised for invalid input values.
Due to the fact that floating point numbers are used, a certain error is to be expected which results from rounding errors of the underlying algorithms. For example, sin returns -2.4503E-16 for the input of 2*π, which should be actually 0. This corresponds to an error in the least significant bit(s) of a double precision floating point number. As the numerics are based on the underlying C-language math library implementation, there is no easy fix to that. We recommend, that results are tested against an epsilon-value-range around the expected result ( use the near/not near blocks for comparison, instead of equal/not equal ) .
Revisions
The "Sin" and "Cos" blocks have been in the Standard Library since 1.1.
"Tan", "ArcSin", "ArcCos" and "ArcTan" have been added with Standard Library 1.7.1 .
Back to Standard Library.
Previous: Arith [ BitXor ]
Next: Arith [ Pi ]
