View Single Post
Old 02 July 2018, 15:58   #7
PeterK
Registered User
 
Join Date: Apr 2005
Location: digital hell, Germany, after 1984, but worse
Posts: 3,382
Quote:
Originally Posted by Toni Wilen View Post
This now uses round to zero temporarily. But you still need to recheck every one of them again
Quote:
FACOS(1)=0 and FACOS(-1)=Pi are correct now in all modes. In 80-bit mode the LSB of Extended Precision is rounded to zero for Pi, but that's acceptable. It's more important that a zero point of a function is exactly 0.
Toni, could you compile another alternative version temporarily?

Please, disable the forced "round to zero" in Jit and non-Jit again and set the LSB in pihalf by changing the "0x2168c234" into a "0x2168c235". I can't see what might go wrong with "round to nearest" then, but that needs some investigation. If it works, it would be the cleanest solution (no forced rounding mode).
Code:
static uae_u32 pihalf[] = {0x2168c235, 0xc90fdaa2, 0x3fff};
On my current PC FASIN(1) always returns Pi/2 with the LSB set, so FACOS(1) = Pi/2 - FASIN(1) should give exactly 0.

Maybe there was some inexactness in the FPU of my Pentium II processor once when I decided to set the LSB to 0.

Last edited by PeterK; 02 July 2018 at 16:22.
PeterK is offline  
 
Page generated in 0.04833 seconds with 11 queries