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
|
@ -19,6 +19,9 @@
|
|||
#include "libc/math.h"
|
||||
#include "libc/tinymath/ldshape.internal.h"
|
||||
|
||||
/**
|
||||
* Returns absolute value of floating point number.
|
||||
*/
|
||||
long double fabsl(long double x) {
|
||||
#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
|
||||
return fabs(x);
|
||||
|
@ -26,5 +29,7 @@ long double fabsl(long double x) {
|
|||
union ldshape u = {x};
|
||||
u.i.se &= 0x7fff;
|
||||
return u.f;
|
||||
#else
|
||||
#error "architecture unsupported"
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue