To infinity and back
The See Also section of POSIX' math.h definition links to the POSIX definitions of acceptable domains.
E.g. fabs()
:
If x is ±0, +0 shall be returned.If x is ±Inf, +Inf shall be returned.
I converted mentioned See Also-section to StackOverflow-Markdown:
acos(), acosh(), asin(), atan(), atan2(), cbrt(), ceil(), cos(), cosh(), erf(), exp(), expm1(), fabs(), floor(), fmod(), frexp(), hypot(), ilogb(), isnan(), j0(), ldexp(), lgamma(), log(), log10(), log1p(), logb(), modf(), nextafter(), pow(), remainder(), rint(), scalb(), sin(), sinh(), sqrt(), tan(), tanh(), y0(),
I contributed search/replace/regex-fu. We now just need someone with cURL-fu.
In C99 it's on Appendix F:
F.9.3.1 The exp functions-- exp(±0) returns 1.-- exp(-∞) returns +0.-- exp(+∞) returns +∞.
Appendix F is normative and:
An implementation that defines
__STDC_IEC_559__
shall conform to the specifications in this annex.