Corner cases - Manual - SIMATIC AX - System.FastMath - System.FastMath,

System.FastMath library

Portfolio
SIMATIC AX
Product
SIMATIC AX
Software version
10.2.7
Edition
10/2025
Language
English (original)
Package Name
@ax/system-fastmath

For this function, different behaviors occur between the targets 1500 and llvm in certain corner cases:

Operand Result 1500 Result llvm Description
Positive subnormal number 0.0 Tangent of operand
Signaling NaN Signaling NaN Quiet NaN 1500 returns the operand as result. llvm also, except that the most significant bit of mantissa is set to 1 to indicate qNaN.
Larger than 1.0E+09 Inaccurate Accurate Starting from a very small error with an operand of about 1.0E+09, the error increases as the operand approaches the maximum number of its format.
±∞ ±∞ -NaN

Notes

A subnormal number is also called a denormalized number, see IEEE 754. In ST, this means

  • a REAL number with an absolute value smaller than 1.1754944E-38,
  • or an LREAL number with an absolute value smaller than 2.22507385850720138309023271733E-308.

For definitions and using recommendations of signaling NaN and quite NaN, also see IEEE 754.

In case identical behaviors of both targets are needed for these corner cases, System.FastMath.Tan() might not be suitable. Use System.Math.Tan() instead, which has worse runtime performance but gives identical results for both targets.