* include/math.h (sqrt): Remove inline definition.

(sqrtf): Replace inline definition with prototype.
	(sqrtl): Likewise.
	* mingwex/math/sqrtf.c (sqrtf): Set domain error if
	argument less than zero.
	* mingwex/math/sqrtf.c (sqrtl): Likewise.

	Correct typo in 2002-10-30 ChangeLog entry.
This commit is contained in:
Danny Smith
2002-11-09 10:44:02 +00:00
parent 49f7ea1675
commit 9da547ff26
3 changed files with 31 additions and 25 deletions

View File

@@ -1,8 +1,20 @@
#include <math.h>
#include <errno.h>
extern long double __QNANL;
long double
sqrtl (long double x)
{
long double res;
asm ("fsqrt" : "=t" (res) : "0" (x));
return res;
if (x < 0.0L )
{
errno = EDOM;
return __QNANL;
}
else
{
long double res;
asm ("fsqrt" : "=t" (res) : "0" (x));
return res;
}
}