Hi Martin,
On 7/16/21 2:05 PM, Martin Storsjo wrote:
@@ -1139,6 +1139,9 @@ float CDECL coshf( float x ) UINT32 ui = *(UINT32*)&x; float t;
- if (isnan(x))
return x;
A quick test shows that ucrtbase returns something like: if (isnan(x)) { *(DWORD*)&x |= 0x400000; return x; }
Probably it will make sense to move the code to integrate better with musl implementation. Instead of checking for nan with isnan function it can be done here: /* |x| > log(FLT_MAX) or nan */ if (ui > 0x7f800000) *(DWORD*)&t = *(DWORD*)&x | 0x400000; else t = __expo2f(x, 1.0f); return t;
Thanks, Piotr