Back to index

glibc  2.9
w_sqrt.c File Reference
#include <math_ldbl_opt.h>
#include "math.h"
#include "math_private.h"
#include <fenv_libc.h>

Go to the source code of this file.


double __sqrt (double x)

Function Documentation

double __sqrt ( double  x)

Definition at line 30 of file w_sqrt.c.

  double z;
/* Power4 (ISA V2.0) and above implement sqrt in hardware.  */
   __asm __volatile (
       "      fsqrt  %0,%1\n"
              : "=f" (z)
              : "f" (x));
#ifdef _IEEE_LIBM
  return z;
  if (__builtin_expect (_LIB_VERSION == _IEEE_, 0))
    return z;
  if (__builtin_expect (x != x, 0))
    return z;
  if  (__builtin_expect (x < 0.0, 0))
    return __kernel_standard (x, x, 26);  /* sqrt(negative) */
    return z;

Here is the call graph for this function: