View Single Post
Old 06 June 2017, 10:01   #144
Toni Wilen
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 43
Posts: 20,651
I noticed the same, it happens if FPU emulation is enabled and host mode (not softfloat) and Amiga program sets FPU rounding/precision mode.

I traced it to tan() c-library function call in led filter calculation function, tan() returns something bogus in this case (should be 0.8 or so but returns 2.something). Oddly enough even if I restore original host FPU mode before calling it, it still returns same wrong result.

It may be compiler version related and unsupported (and has always been unsupported most likely). I don't think host FPU rounding/precision mode changes are supposed to be done when using c-library math functions.

As a workaround I replaced that tan() call with softfloat version. It is not performance critical, it is only called when filter mode changes.

In worst case some other host FPU mode FPU emulation trigonometric functions may also return wrong values.. This may need some last minute changes..
Toni Wilen is offline  
Page generated in 0.04939 seconds with 9 queries