mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-24 23:56:49 +03:00
21 lines
301 B
C
21 lines
301 B
C
|
#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;
|
||
|
}
|
||
|
}
|