Back to index

glibc  2.9
Functions
s_rintf.c File Reference
#include "math.h"

Go to the source code of this file.

Functions

float __rintf (float x)

Function Documentation

float __rintf ( float  x)

Definition at line 23 of file s_rintf.c.

{
  static const float TWO23 = 8388608.0;

  if (fabsf (x) < TWO23)
    {
      if (x > 0.0)
       {
         x += TWO23;
         x -= TWO23;
       }
      else if (x < 0.0)
       {
         x = TWO23 - x;
         x = -(x - TWO23);
       }
    }
  
  return x;
}

Here is the call graph for this function: