Quote:
Originally Posted by Toni Wilen
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 "0x2168c23
4" into a "0x2168c23
5". 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.