Welcome to mirror list, hosted at ThFree Co, Russian Federation.

sqrtl.c « math « mingwex « mingw « winsup - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: dba68d87860d9f4d7d0c3334fa729e52075f8c46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <math.h>
#include <errno.h>

extern long double  __QNANL;

long double
sqrtl (long double x)
{
  if (x < 0.0L )
    {
      errno = EDOM;
      return __QNANL;
    }
  else
    {
      long double res;
      asm ("fsqrt" : "=t" (res) : "0" (x));
      return res;
    }
}