Bug 28765 - x86_64 libmvec atan2 accuracy
Summary: x86_64 libmvec atan2 accuracy
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: math (show other bugs)
Version: 2.35
: P2 normal
Target Milestone: 2.35
Assignee: Sunil Pandey
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-11 17:38 UTC by Sunil Pandey
Modified: 2022-01-14 14:59 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed: 2022-01-11 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sunil Pandey 2022-01-11 17:38:56 UTC
libmvec vector function atan2 has greater than 4 ulps accuracy on SSE4.2 for following inputs.

atan2(_ZGVbN2vv_atan2@GLIBC_2.35) on SSE4.2:

    {0x1.bcab29da0e947p-54,0x1.bc41f4d2294b8p-54}     4.19888 ulps
    {0x1.b836ed678be29p-588,0x1.b7be6f5a03a8cp-588}   4.09889 ulps
Comment 1 Sourceware Commits 2022-01-12 22:24:39 UTC
The master branch has been updated by Sunil Pandey <skpgkp2@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=49e2bf58d57758df244eb621d63cedd2ab6d1971

commit 49e2bf58d57758df244eb621d63cedd2ab6d1971
Author: Sunil K Pandey <skpgkp2@gmail.com>
Date:   Wed Jan 12 11:02:19 2022 -0800

    x86_64: Fix SSE4.2 libmvec atan2 function accuracy [BZ #28765]
    
    This patch fixes SSE4.2 libmvec atan2 function accuracy for following
    inputs to less than 4 ulps.
    
    {0x1.bcab29da0e947p-54,0x1.bc41f4d2294b8p-54}   4.19888 ulps
    {0x1.b836ed678be29p-588,0x1.b7be6f5a03a8cp-588} 4.09889 ulps
    
    This fixes BZ #28765.
    
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
Comment 2 Sourceware Commits 2022-01-14 14:56:21 UTC
The master branch has been updated by Sunil Pandey <skpgkp2@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=047512374a95b7bc42a996f61def50843f2bd5e7

commit 047512374a95b7bc42a996f61def50843f2bd5e7
Author: Sunil K Pandey <skpgkp2@gmail.com>
Date:   Wed Jan 12 12:26:35 2022 -0800

    math: Add more inputs to atan2 accuracy tests [BZ #28765]
    
    This patch adds following inputs:
    
    0x1.bcab29da0e947p-54 0x1.bc41f4d2294b8p-54
    0x1.a11891ec004d4p-348 0x1.814830510be26p-348
    0x1.b836ed678be29p-588 0x1.b7be6f5a03a8cp-588
    0x1.a83f842ef3f73p-633 0x1.a799d8a6677ep-633
    
    to atan2 tests and updates x86_64 double atan2 ulps.
    
    This fixes BZ #28765.
    
    Reviewed-By: Paul Zimmermann <Paul.Zimmermann@inria.fr>
Comment 3 H.J. Lu 2022-01-14 14:59:10 UTC
Fixed.