[Cfp-interest 3265] Re: Specification of complex operators
Paul Zimmermann
Paul.Zimmermann at inria.fr
Mon Sep 9 00:11:59 PDT 2024
Hi,
with Paul Caprioli, Vincenzo Innocente and John Mather, we are currently testing the accuracy
of complex operators and functions in the current compilers and math libraries.
Avoidance of intermediate overflows is not so easy. For cmulf all 3 compilers gcc, icx and
clang give the wrong result for the following example (x1, y1, x2, y2):
{-0x1.80a55ep+0,-0x1.1bfep+80,0x1.ap+64,-0x1.54c296p+127}, /* gcc Inf */
{-0x1.80a55ep+0,-0x1.1bfep+80,0x1.ap+64,-0x1.54c296p+127}, /* icx Inf */
{-0x1.80a55ep+0,-0x1.1bfep+80,0x1.ap+64,-0x1.54c296p+127}, /* clang Inf */
Idem for cpowf:
{0x0p+0,-0x1p-149,-0x0p+0,0x1.838p+121}, /* glibc Inf */
{-0x1.80a55ep+0,-0x1.1bfep+80,0x1.ap+64,-0x1.54c296p+127}, /* icx Inf */
{0x0p+0,-0x1p-149,-0x0p+0,0x1.838p+121}, /* clang Inf */
And for cdiv:
{0x1.0348p+972,0x1.834p+972,0x1.ep-512,-0x0.0000000000001p-1022}, /* gcc Inf */
{0x1.0348p+972,0x1.834p+972,0x1.ep-512,-0x0.0000000000001p-1022}, /* icx Inf */
{0x1.0348p+972,0x1.834p+972,0x1.ep-512,-0x0.0000000000001p-1022}, /* clang Inf */
Paul
More information about the Cfp-interest
mailing list