Bug 202900

Summary: nearbyint() not declared in <math.h>
Product: Red Hat Enterprise Linux 4 Reporter: Stephen Rasku <redhat>
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED NOTABUG QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-08-17 07:04:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Stephen Rasku 2006-08-16 23:28:29 UTC
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):

glibc-2.3.4-2.19

How reproducible: 100%

Steps to Reproduce:
1. #include <math.h>
2. nearbyint(floatExpr);
  
Actual results:

See above.

Expected results:

Program should compile with no warnings.

Comment 1 Jakub Jelinek 2006-08-17 07:04:42 UTC
Please read
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.