mirror of
https://github.com/adtools/clib2.git
synced 2025-12-08 14:59:05 +00:00
- Ditched __is_infinity() and __is_not_a_number(), brought them back
as isinf() and isnan(). - Updated code and header files to state exactly which ISO 'C' version is meant by the "The following is not part of the ISO 'C' standard." warning. - Integrated rint() and rintf(). git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14699 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: math_rint.c,v 1.1 2004-08-06 12:56:43 hfrieden Exp $
|
||||
* $Id: math_rint.c,v 1.2 2004-08-07 09:15:32 obarthel Exp $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
@ -44,12 +44,13 @@
|
||||
#include "math_headers.h"
|
||||
#endif /* _MATH_HEADERS_H */
|
||||
|
||||
#if defined(FLOATING_POINT_SUPPORT)
|
||||
/****************************************************************************/
|
||||
|
||||
/* The following is not part of the ISO 'C' (1994) (1994) standard. */
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
extern double rint(double);
|
||||
extern float rintf(float);
|
||||
#if defined(FLOATING_POINT_SUPPORT)
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
@ -59,10 +60,7 @@ rint(double x)
|
||||
return floor ( x+0.5 );
|
||||
}
|
||||
|
||||
float
|
||||
rintf(float x)
|
||||
{
|
||||
return (float) floor ( x + 0.5f );
|
||||
}
|
||||
/****************************************************************************/
|
||||
|
||||
#endif /* FLOATING_POINT_SUPPORT */
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user