[PATCH 2/3] msvcrt: Improve sqrt accuracy and performance on i386.
Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> --- dlls/msvcrt/math.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+)
IIRC from bug 50429, the asin results were affected by setting the x87 control word beforehand. Is that not the case for sqrt?
Hi Zebediah,
On 2 Feb 2021, at 21:18, Zebediah Figura (she/her) <zfigura(a)codeweavers.com> wrote:
IIRC from bug 50429, the asin results were affected by setting the x87 control word beforehand. Is that not the case for sqrt?
The code only resets rounding mode (and preserves other control word bits). I haven’t tested all the x87 control word values but it seems to be matching with native. AFAIR asin was also ignoring rounding mode. Thanks, Piotr
On 2/2/21 4:38 PM, Piotr Caban wrote:
Hi Zebediah,
On 2 Feb 2021, at 21:18, Zebediah Figura (she/her) <zfigura(a)codeweavers.com> wrote:
IIRC from bug 50429, the asin results were affected by setting the x87 control word beforehand. Is that not the case for sqrt?
The code only resets rounding mode (and preserves other control word bits). I haven’t tested all the x87 control word values but it seems to be matching with native. AFAIR asin was also ignoring rounding mode.
Ah, cool, I didn't pay attention to which bits this was actually setting.
Thanks, Piotr
participants (3)
-
Piotr Caban -
Piotr Caban -
Zebediah Figura (she/her)