base/math/rndint.c File Reference

#include <limits.h>
#include <math.h>

Include dependency graph for rndint.c:

Include dependency graph

Go to the source code of this file.

Data Structures

union  DblInHex

Defines

#define asm(x)
#define SET_INVALID   0x01000000UL

Functions

double nearbyint (double x)
long int rinttol (double x)
double round (double x)
long int roundtol (double x)
double trunc (double x)

Variables

const unsigned long int signMask = 0x80000000ul
const double twoTo52 = 4503599627370496.0
const double doubleToLong = 4503603922337792.0
const DblInHex Huge = {{ 0x7FF00000, 0x00000000 }}
const DblInHex TOWARDZERO = {{ 0x00000000, 0x00000001 }}


Define Documentation

#define asm  ) 
 

Definition at line 51 of file rndint.c.

#define SET_INVALID   0x01000000UL
 

Definition at line 54 of file rndint.c.

Referenced by rinttol(), and roundtol().


Function Documentation

double nearbyint double  x  ) 
 

Definition at line 176 of file rndint.c.

References copysign(), fabs(), and twoTo52.

Here is the call graph for this function:

long int rinttol double  x  ) 
 

Definition at line 210 of file rndint.c.

References DblInHex::dbl, doubleToLong, SET_INVALID, signMask, twoTo52, and DblInHex::words.

double round double  x  ) 
 

Definition at line 301 of file rndint.c.

References DblInHex::dbl, signMask, twoTo52, and DblInHex::words.

long int roundtol double  x  ) 
 

Definition at line 397 of file rndint.c.

References DblInHex::dbl, doubleToLong, SET_INVALID, signMask, and DblInHex::words.

double trunc double  x  ) 
 

Definition at line 497 of file rndint.c.

References DblInHex::dbl, signMask, twoTo52, and DblInHex::words.


Variable Documentation

const double doubleToLong = 4503603922337792.0 [static]
 

Definition at line 72 of file rndint.c.

Referenced by rinttol(), and roundtol().

const DblInHex Huge = {{ 0x7FF00000, 0x00000000 }} [static]
 

Definition at line 73 of file rndint.c.

const unsigned long int signMask = 0x80000000ul [static]
 

Definition at line 70 of file rndint.c.

Referenced by rinttol(), round(), roundtol(), and trunc().

const DblInHex TOWARDZERO = {{ 0x00000000, 0x00000001 }} [static]
 

Definition at line 74 of file rndint.c.

const double twoTo52 = 4503599627370496.0 [static]
 

Definition at line 71 of file rndint.c.

Referenced by nearbyint(), rinttol(), round(), and trunc().


Generated on Thu Nov 20 11:55:54 2008 for RTAI API by doxygen 1.3.8