Back to index

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

Go to the source code of this file.

Functions

float __ceilf (float x)

Function Documentation

float __ceilf ( float  x)

Definition at line 27 of file s_ceilf.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));

  /* Fix up the negation we did above, as well as handling -0 properly. */
  return copysignf (r, x);
}