Funny FPU trick I discovered yesterday to detect arm64 or x86_64 architecture at runtime
Interesting.
Drop stdint and workaround it. See what happens.
This gets curiouser and curiouser.
I am thinking it is due to microcode differences.
Actually, just the instruction set.
Something is happening differently because sqrt(-1) is using an invalid parameter to the call in the first place.
errno needs to be checked immediately.
Also, compile without optimization.
@pancake now try with musl, i386, m68k, ppc64el, sparc64, s390x, …
As if there were only two architectures in existence.
Another thought. Did you rebuild libm from source without optimisation?