2002-07-29 05:00:10 +02:00
|
|
|
#include <math.h>
|
2002-11-09 11:44:02 +01:00
|
|
|
#include <errno.h>
|
|
|
|
|
|
|
|
extern long double __QNANL;
|
|
|
|
|
2002-07-29 05:00:10 +02:00
|
|
|
long double
|
|
|
|
sqrtl (long double x)
|
|
|
|
{
|
2002-11-09 11:44:02 +01:00
|
|
|
if (x < 0.0L )
|
|
|
|
{
|
|
|
|
errno = EDOM;
|
|
|
|
return __QNANL;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
long double res;
|
|
|
|
asm ("fsqrt" : "=t" (res) : "0" (x));
|
|
|
|
return res;
|
|
|
|
}
|
2002-07-29 05:00:10 +02:00
|
|
|
}
|