Red Hat Bugzilla – Bug 202900
nearbyint() not declared in <math.h>
Last modified: 2007-11-30 17:07:27 EST
Description of problem:
The prototype for the function nearbyint() is not declared in <math.h> even
though the man page says to #include this file for this function. If I use the
function as documented I get:
warning: implicit declaration of function `nearbyint'
Version-Release number of selected component (if applicable):
How reproducible: 100%
Steps to Reproduce:
1. #include <math.h>
Program should compile with no warnings.
info libc 'Feature Test Macros'
As nearbyint is only ISO C99 function, you need one of -std=c99, -std=gnu99,
-D_ISOC99_SOURCE, -D_GNU_SOURCE or -D_XOPEN_SOURCE=600.