public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* BZ #16503
@ 2022-05-10  9:29 Paul Zimmermann
  2022-05-10 14:40 ` Adhemerval Zanella
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Zimmermann @ 2022-05-10  9:29 UTC (permalink / raw)
  To: libc-alpha

       Hi,

has someone access to a SH4 processor? Now that #13304 is fixed,
maybe #16503 is fixed too ([sh] wrong results on fma_towardzero).

Best regards,
Paul


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: BZ #16503
  2022-05-10  9:29 BZ #16503 Paul Zimmermann
@ 2022-05-10 14:40 ` Adhemerval Zanella
  2022-05-10 14:59   ` Paul Zimmermann
  0 siblings, 1 reply; 4+ messages in thread
From: Adhemerval Zanella @ 2022-05-10 14:40 UTC (permalink / raw)
  To: libc-alpha



On 10/05/2022 06:29, Paul Zimmermann via Libc-alpha wrote:
>        Hi,
> 
> has someone access to a SH4 processor? Now that #13304 is fixed,
> maybe #16503 is fixed too ([sh] wrong results on fma_towardzero).
> 
> Best regards,
> Paul
> 

Besides some NaN failures, fma still shows issues:

$ ./testrun.sh math/test-double-fma

Failure: Test: fma_towardzero (-0x2.33956cdae7c2ep-960, 0x3.8e211518bfea2p-108, -0x2.02c2b59766d9p-1024)
Result:
 is:         -1.1185354662458815e-308  -0x0.80b0ad65d9d59p-1022
 should be:  -1.1185354662458810e-308  -0x0.80b0ad65d9d58p-1022
 difference:  4.9406564584124654e-324   0x0.0000000000001p-1022
 ulp       :  1.0000
 max.ulp   :  0.0000
Failure: Test: fma_towardzero (-0x4p-1076, 0x8.8p-4, -0x3.ffffffffffffcp-1024)
Result:
 is:         -2.2250738585072013e-308  -0x1.0000000000000p-1022
 should be:  -2.2250738585072008e-308  -0x0.fffffffffffffp-1022
 difference:  4.9406564584124654e-324   0x0.0000000000001p-1022
 ulp       :  1.0000
 max.ulp   :  0.0000
Failure: Test: fma_towardzero (-0x7.ffffffffffffp-1024, 0x8.0000000000008p-4, -0x4p-1076)
Result:
 is:         -2.2250738585072013e-308  -0x1.0000000000000p-1022
 should be:  -2.2250738585072008e-308  -0x0.fffffffffffffp-1022
 difference:  4.9406564584124654e-324   0x0.0000000000001p-1022
 ulp       :  1.0000
 max.ulp   :  0.0000
Failure: Test: fma_towardzero (0x2.2a7aca1773e0cp-908, 0x9.6809186a42038p-128, -0x2.c9e356b3f0fp-1024)
Result:
 is:         -1.5484573404150452e-308  -0x0.b22757123bbe9p-1022
 should be:  -1.5484573404150447e-308  -0x0.b22757123bbe8p-1022
 difference:  4.9406564584124654e-324   0x0.0000000000001p-1022
 ulp       :  1.0000
 max.ulp   :  0.0000
Failure: Test: fma_towardzero (0x4p-1076, 0x8.8p-4, 0x3.ffffffffffffcp-1024)
Result:
 is:          2.2250738585072013e-308   0x1.0000000000000p-1022
 should be:   2.2250738585072008e-308   0x0.fffffffffffffp-1022
 difference:  4.9406564584124654e-324   0x0.0000000000001p-1022
 ulp       :  1.0000
 max.ulp   :  0.0000
Failure: Test: fma_towardzero (0x7.ffffffffffffp-1024, 0x8.0000000000008p-4, 0x4p-1076)
Result:
 is:          2.2250738585072013e-308   0x1.0000000000000p-1022
 should be:   2.2250738585072008e-308   0x0.fffffffffffffp-1022
 difference:  4.9406564584124654e-324   0x0.0000000000001p-1022
 ulp       :  1.0000
 max.ulp   :  0.0000

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: BZ #16503
  2022-05-10 14:40 ` Adhemerval Zanella
@ 2022-05-10 14:59   ` Paul Zimmermann
  2022-05-10 16:02     ` Adhemerval Zanella
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Zimmermann @ 2022-05-10 14:59 UTC (permalink / raw)
  To: Adhemerval Zanella; +Cc: libc-alpha

thank you Adhemerval for checking.

Isn't it using the soft-fp fma from commit 6f7c009 ?

Paul

> Date: Tue, 10 May 2022 11:40:01 -0300
> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
>  Thunderbird/91.9.0
> From: Adhemerval Zanella via Libc-alpha <libc-alpha@sourceware.org>
> 
> 
> 
> On 10/05/2022 06:29, Paul Zimmermann via Libc-alpha wrote:
> >        Hi,
> > 
> > has someone access to a SH4 processor? Now that #13304 is fixed,
> > maybe #16503 is fixed too ([sh] wrong results on fma_towardzero).
> > 
> > Best regards,
> > Paul
> > 
> 
> Besides some NaN failures, fma still shows issues:
> 
> $ ./testrun.sh math/test-double-fma
> 
> Failure: Test: fma_towardzero (-0x2.33956cdae7c2ep-960, 0x3.8e211518bfea2p-108, -0x2.02c2b59766d9p-1024)
> Result:
>  is:         -1.1185354662458815e-308  -0x0.80b0ad65d9d59p-1022
>  should be:  -1.1185354662458810e-308  -0x0.80b0ad65d9d58p-1022
>  difference:  4.9406564584124654e-324   0x0.0000000000001p-1022
>  ulp       :  1.0000
>  max.ulp   :  0.0000
> Failure: Test: fma_towardzero (-0x4p-1076, 0x8.8p-4, -0x3.ffffffffffffcp-1024)
> Result:
>  is:         -2.2250738585072013e-308  -0x1.0000000000000p-1022
>  should be:  -2.2250738585072008e-308  -0x0.fffffffffffffp-1022
>  difference:  4.9406564584124654e-324   0x0.0000000000001p-1022
>  ulp       :  1.0000
>  max.ulp   :  0.0000
> Failure: Test: fma_towardzero (-0x7.ffffffffffffp-1024, 0x8.0000000000008p-4, -0x4p-1076)
> Result:
>  is:         -2.2250738585072013e-308  -0x1.0000000000000p-1022
>  should be:  -2.2250738585072008e-308  -0x0.fffffffffffffp-1022
>  difference:  4.9406564584124654e-324   0x0.0000000000001p-1022
>  ulp       :  1.0000
>  max.ulp   :  0.0000
> Failure: Test: fma_towardzero (0x2.2a7aca1773e0cp-908, 0x9.6809186a42038p-128, -0x2.c9e356b3f0fp-1024)
> Result:
>  is:         -1.5484573404150452e-308  -0x0.b22757123bbe9p-1022
>  should be:  -1.5484573404150447e-308  -0x0.b22757123bbe8p-1022
>  difference:  4.9406564584124654e-324   0x0.0000000000001p-1022
>  ulp       :  1.0000
>  max.ulp   :  0.0000
> Failure: Test: fma_towardzero (0x4p-1076, 0x8.8p-4, 0x3.ffffffffffffcp-1024)
> Result:
>  is:          2.2250738585072013e-308   0x1.0000000000000p-1022
>  should be:   2.2250738585072008e-308   0x0.fffffffffffffp-1022
>  difference:  4.9406564584124654e-324   0x0.0000000000001p-1022
>  ulp       :  1.0000
>  max.ulp   :  0.0000
> Failure: Test: fma_towardzero (0x7.ffffffffffffp-1024, 0x8.0000000000008p-4, 0x4p-1076)
> Result:
>  is:          2.2250738585072013e-308   0x1.0000000000000p-1022
>  should be:   2.2250738585072008e-308   0x0.fffffffffffffp-1022
>  difference:  4.9406564584124654e-324   0x0.0000000000001p-1022
>  ulp       :  1.0000
>  max.ulp   :  0.0000
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: BZ #16503
  2022-05-10 14:59   ` Paul Zimmermann
@ 2022-05-10 16:02     ` Adhemerval Zanella
  0 siblings, 0 replies; 4+ messages in thread
From: Adhemerval Zanella @ 2022-05-10 16:02 UTC (permalink / raw)
  To: Paul Zimmermann; +Cc: libc-alpha

It uses the generic implementation from sysdeps/ieee754/dbl-64/s_fma.c 
since I built for sh4 (which defines __SH_FPU_ANY__).

On 10/05/2022 11:59, Paul Zimmermann wrote:
> thank you Adhemerval for checking.
> 
> Isn't it using the soft-fp fma from commit 6f7c009 ?
> 
> Paul
> 
>> Date: Tue, 10 May 2022 11:40:01 -0300
>> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
>>  Thunderbird/91.9.0
>> From: Adhemerval Zanella via Libc-alpha <libc-alpha@sourceware.org>
>>
>>
>>
>> On 10/05/2022 06:29, Paul Zimmermann via Libc-alpha wrote:
>>>        Hi,
>>>
>>> has someone access to a SH4 processor? Now that #13304 is fixed,
>>> maybe #16503 is fixed too ([sh] wrong results on fma_towardzero).
>>>
>>> Best regards,
>>> Paul
>>>
>>
>> Besides some NaN failures, fma still shows issues:
>>
>> $ ./testrun.sh math/test-double-fma
>>
>> Failure: Test: fma_towardzero (-0x2.33956cdae7c2ep-960, 0x3.8e211518bfea2p-108, -0x2.02c2b59766d9p-1024)
>> Result:
>>  is:         -1.1185354662458815e-308  -0x0.80b0ad65d9d59p-1022
>>  should be:  -1.1185354662458810e-308  -0x0.80b0ad65d9d58p-1022
>>  difference:  4.9406564584124654e-324   0x0.0000000000001p-1022
>>  ulp       :  1.0000
>>  max.ulp   :  0.0000
>> Failure: Test: fma_towardzero (-0x4p-1076, 0x8.8p-4, -0x3.ffffffffffffcp-1024)
>> Result:
>>  is:         -2.2250738585072013e-308  -0x1.0000000000000p-1022
>>  should be:  -2.2250738585072008e-308  -0x0.fffffffffffffp-1022
>>  difference:  4.9406564584124654e-324   0x0.0000000000001p-1022
>>  ulp       :  1.0000
>>  max.ulp   :  0.0000
>> Failure: Test: fma_towardzero (-0x7.ffffffffffffp-1024, 0x8.0000000000008p-4, -0x4p-1076)
>> Result:
>>  is:         -2.2250738585072013e-308  -0x1.0000000000000p-1022
>>  should be:  -2.2250738585072008e-308  -0x0.fffffffffffffp-1022
>>  difference:  4.9406564584124654e-324   0x0.0000000000001p-1022
>>  ulp       :  1.0000
>>  max.ulp   :  0.0000
>> Failure: Test: fma_towardzero (0x2.2a7aca1773e0cp-908, 0x9.6809186a42038p-128, -0x2.c9e356b3f0fp-1024)
>> Result:
>>  is:         -1.5484573404150452e-308  -0x0.b22757123bbe9p-1022
>>  should be:  -1.5484573404150447e-308  -0x0.b22757123bbe8p-1022
>>  difference:  4.9406564584124654e-324   0x0.0000000000001p-1022
>>  ulp       :  1.0000
>>  max.ulp   :  0.0000
>> Failure: Test: fma_towardzero (0x4p-1076, 0x8.8p-4, 0x3.ffffffffffffcp-1024)
>> Result:
>>  is:          2.2250738585072013e-308   0x1.0000000000000p-1022
>>  should be:   2.2250738585072008e-308   0x0.fffffffffffffp-1022
>>  difference:  4.9406564584124654e-324   0x0.0000000000001p-1022
>>  ulp       :  1.0000
>>  max.ulp   :  0.0000
>> Failure: Test: fma_towardzero (0x7.ffffffffffffp-1024, 0x8.0000000000008p-4, 0x4p-1076)
>> Result:
>>  is:          2.2250738585072013e-308   0x1.0000000000000p-1022
>>  should be:   2.2250738585072008e-308   0x0.fffffffffffffp-1022
>>  difference:  4.9406564584124654e-324   0x0.0000000000001p-1022
>>  ulp       :  1.0000
>>  max.ulp   :  0.0000
>>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-05-10 16:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-10  9:29 BZ #16503 Paul Zimmermann
2022-05-10 14:40 ` Adhemerval Zanella
2022-05-10 14:59   ` Paul Zimmermann
2022-05-10 16:02     ` Adhemerval Zanella

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).