Back to index

glibc  2.9
w_sqrtf.c File Reference
#include "math.h"
#include "math_private.h"
#include <fenv_libc.h>
#include <sysdep.h>
#include <ldsodefs.h>

Go to the source code of this file.


float __sqrtf (float x)

Function Documentation

float __sqrtf ( float  x)

Definition at line 32 of file w_sqrtf.c.

#ifdef _IEEE_LIBM
  return __ieee754_sqrtf (x);
  float z;
/* Power4 (ISA V2.0) and above implement sqrtf in hardware.  */
   __asm __volatile (
       "      fsqrts %0,%1\n"
              : "=f" (z)
              : "f" (x));

  if (__builtin_expect (_LIB_VERSION == _IEEE_, 0))
    return z;
  if (__builtin_expect (x != x, 0))
    return z;
  if  (__builtin_expect (x < 0.0, 0))
    /* sqrtf(negative) */
    return (float) __kernel_standard ((double) x, (double) x, 126);
    return z;

Here is the call graph for this function: