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
REALnumber with an absolute value smaller than 1.1754944E-38, - or an
LREALnumber 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.