Standard Math

suggest change

Syntax

Remarks

  1. pow is in C89. powf and powl were added in C99. On many Unix-like systems, gcc needs -lm to link the math library. That flag is not an ISO C requirement.
  2. A portable check sets errno to zero and calls feclearexcept(FE_ALL_EXCEPT) before the math call. After the call, an error is reported if errno is nonzero or if fetestexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW) is nonzero. Those floating-environment calls are reliable only when <fenv.h> is included and #pragma STDC FENV_ACCESS ON is in effect. Which of errno and the exception flags an implementation uses is given by math_errhandling. See the math_error manual on systems that provide it.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents