Back to index

glibc  2.9
Functions
s_floorf.c File Reference
#include <math.h>

Go to the source code of this file.

Functions

float __floorf (float x)

Function Documentation

float __floorf ( float  x)

Definition at line 26 of file s_floorf.c.

{
  float two23 = copysignf (0x1.0p23, x);
  float r, tmp;
  
  __asm (
#ifdef _IEEE_FP_INEXACT
        "adds/suim %2, %3, %1\n\tsubs/suim %1, %3, %0"
#else
        "adds/sum %2, %3, %1\n\tsubs/sum %1, %3, %0"
#endif
        : "=&f"(r), "=&f"(tmp)
        : "f"(x), "f"(two23));

  /* floor(-0) == -0, and in general we'll always have the same
     sign as our input.  */
  return copysignf (r, x);
}

Here is the caller graph for this function: