Bug 202900 - nearbyint() not declared in <math.h>
nearbyint() not declared in <math.h>
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: glibc (Show other bugs)
4.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-08-16 19:28 EDT by Stephen Rasku
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-08-17 03:04:42 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Stephen Rasku 2006-08-16 19:28:29 EDT
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 03:04:42 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.