https://bugs.winehq.org/show_bug.cgi?id=50429
--- Comment #8 from Zebediah Figura z.figura12@gmail.com --- (In reply to Piotr Caban from comment #7)
I've started looking on this bug today, here's what I have found so far:
- native implementation sets sse2 status word, not x87
- current implementation returns correct values for all calls recorded in
arcsin_fixme_serious_sam_tfe file
- current implementation returns different values than native in some
cases, e.g.: asin(-1.08632087707519531250000e-01) = -1.08846890318393410557185e-01, expected -1.08846890318393396679397e-01
- we used to implement asin(x) as atan2(x, sqrt((1 - x) * (1 + x))), it's
probably not going to fix the problem because both atan2 and sqrt needs precision fixes as well
I guess that the proper solution is to implement __libm_sse2_asin and call it inside asin. I didn't test yet if the function is affected by _set_SSE2_enable function.
Is that also true for 32-bit? My testing showed that behaviour differed between msvcrt versions and architectures, but that 32-bit msvcrt returns the same values as the attached x87 implementation on both windows 7 and windows 10.