...
Implementations that support floating point arithmetic but does which do not support subnormalssubnormal numbers, such as IBM S/360 hex floating point or sloppy IEEE-754 implementations that skip subnormals (or " support " them by flushing them to zero) can return a range error when calling one of the following family of functions with the following arguments:
...
Where min
is the minimum value for the corresponding floating point type and subnorm
is a subnormal value.
These error cases are not an issue if If Annex F is fully support. In this case, if and subnormal results are supported, the returned value is exact and there cannot be a range error. The C Standard [ISO/IEC 9899:2011] specifies the following for the fmod()
, remainder()
and remquo()
functions:
...
This noncompliant code example determines the arcsin inverse sine of x:
Code Block | ||||
---|---|---|---|---|
| ||||
#include <math.h> void func(float x) { float result = asin(x); /* ... */ } |
...