Make quality improvements

- Write some more unit tests
- memcpy() on ARM is now faster
- Address the Musl complex math FIXME comments
- Some libm funcs like pow() now support setting errno
- Import the latest and greatest math functions from ARM
- Use more accurate atan2f() and log1pf() implementations
- atoi() and atol() will no longer saturate or clobber errno
This commit is contained in:
Justine Tunney 2024-02-25 14:57:28 -08:00
parent af8f2bd19f
commit 592f6ebc20
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
122 changed files with 6305 additions and 3859 deletions

View file

@ -30,7 +30,6 @@
#include "libc/tinymath/internal.h"
__static_yoink("musl_libc_notice");
#define FENV_SUPPORT 1
static inline uint32_t mul32(uint32_t a, uint32_t b)
@ -38,14 +37,12 @@ static inline uint32_t mul32(uint32_t a, uint32_t b)
return (uint64_t)a*b >> 32;
}
/* see sqrt.c for more detailed comments. */
/**
* Returns square root of 𝑥.
*/
float sqrtf(float x)
{
#ifdef __SSE2__
#if defined(__x86_64__)
asm("sqrtss\t%1,%0" : "=x"(x) : "x"(x));
return x;