mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 05:42:29 +00:00
Make further progress on non-x86 support
This commit is contained in:
parent
aef9a69a60
commit
036b9a0002
155 changed files with 2307 additions and 653 deletions
|
@ -33,7 +33,9 @@ long double powl(long double x, long double y) {
|
|||
if (x) {
|
||||
if (y) {
|
||||
if (x < 0 && y != truncl(y)) {
|
||||
#ifndef __NO_MATH_ERRNO__
|
||||
errno = EDOM;
|
||||
#endif
|
||||
return NAN;
|
||||
}
|
||||
asm("fyl2x" : "=t"(u) : "0"(fabsl(x)), "u"(y) : "st(1)");
|
||||
|
@ -57,7 +59,9 @@ long double powl(long double x, long double y) {
|
|||
} else if (!y) {
|
||||
return 1;
|
||||
} else {
|
||||
#ifndef __NO_MATH_ERRNO__
|
||||
errno = ERANGE;
|
||||
#endif
|
||||
if (y == truncl(y) && ((int64_t)y & 1)) {
|
||||
return copysignl(INFINITY, x);
|
||||
} else {
|
||||
|
@ -619,6 +623,8 @@ long double powl(long double x, long double y)
|
|||
{
|
||||
return pow(x, y);
|
||||
}
|
||||
#else
|
||||
#error "architecture unsupported"
|
||||
#endif
|
||||
|
||||
#endif /* __x86_64__ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue