This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.
Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Hi! This patch implements hypotl for quad long doubles, increases precision of some constants and updates all libm-test-ulps (only in the sparc64 case it is actually changing anything but the test strings though). With this patch, sparc64 glibc (built normally with full optimizations with one single exception - k_rem_pio2.c which is miscompiled at -O3, so I compiled it with -O0) passes make check for the first time ever. Of course, a bunch of long double functions is still not implemented, but current libm make check does not test them. I've checked sparc32 too and it passes as well. 2000-10-26 Jakub Jelinek <jakub@redhat.com> * sysdeps/ieee754/ldbl-128/e_hypotl.c: New. * math/libm-test.inc (cabs_test, cexp_test, csqrt_test, hypot_test): Increase precision of constants. * sysdeps/alpha/fpu/libm-test-ulps: Update. * sysdeps/arm/libm-test-ulps: Update. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/ia64/fpu/libm-test-ulps: Update. * sysdeps/m68k/fpu/libm-test-ulps: Update. * sysdeps/mips/fpu/libm-test-ulps: Update. * sysdeps/powerpc/fpu/libm-test-ulps: Update. * sysdeps/sparc/sparc32/fpu/libm-test-ulps: Update. * sysdeps/sparc/sparc64/fpu/libm-test-ulps: Update. * sysdeps/sh/sh4/fpu/libm-test-ulps: Update. * sysdeps/s390/fpu/libm-test-ulps: Update. --- libc/math/libm-test.inc.jj Wed Oct 25 18:06:36 2000 +++ libc/math/libm-test.inc Thu Oct 26 17:02:53 2000 @@ -949,15 +949,15 @@ cabs_test (void) TEST_c_f (cabs, nan_value, nan_value, nan_value); /* cabs (x,y) == cabs (y,x). */ - TEST_c_f (cabs, 0.7L, 12.4L, 12.41974234837422060118L); + TEST_c_f (cabs, 0.7L, 12.4L, 12.419742348374220601176836866763271L); /* cabs (x,y) == cabs (-x,y). */ - TEST_c_f (cabs, -12.4L, 0.7L, 12.41974234837422060118L); + TEST_c_f (cabs, -12.4L, 0.7L, 12.419742348374220601176836866763271L); /* cabs (x,y) == cabs (-y,x). */ - TEST_c_f (cabs, -0.7L, 12.4L, 12.41974234837422060118L); + TEST_c_f (cabs, -0.7L, 12.4L, 12.419742348374220601176836866763271L); /* cabs (x,y) == cabs (-x,-y). */ - TEST_c_f (cabs, -12.4L, -0.7L, 12.41974234837422060118L); + TEST_c_f (cabs, -12.4L, -0.7L, 12.419742348374220601176836866763271L); /* cabs (x,y) == cabs (-y,-x). */ - TEST_c_f (cabs, -0.7L, -12.4L, 12.41974234837422060118L); + TEST_c_f (cabs, -0.7L, -12.4L, 12.419742348374220601176836866763271L); /* cabs (x,0) == fabs (x). */ TEST_c_f (cabs, -0.7L, 0, 0.7L); TEST_c_f (cabs, 0.7L, 0, 0.7L); @@ -966,7 +966,7 @@ cabs_test (void) TEST_c_f (cabs, -5.7e7L, 0, 5.7e7L); TEST_c_f (cabs, 5.7e7L, 0, 5.7e7L); - TEST_c_f (cabs, 0.7L, 1.2L, 1.3892443989449804508L); + TEST_c_f (cabs, 0.7L, 1.2L, 1.3892443989449804508432547041028554L); END (cabs); } @@ -1667,7 +1667,7 @@ cexp_test (void) TEST_c_c (cexp, nan_value, nan_value, nan_value, nan_value); TEST_c_c (cexp, 0.7L, 1.2L, 0.72969890915032360123451688642930727L, 1.8768962328348102821139467908203072L); - TEST_c_c (cexp, -2.0, -3.0, -0.1339809149295426134L, -0.0190985162611351964L); + TEST_c_c (cexp, -2.0, -3.0, -0.13398091492954261346140525546115575L, -0.019098516261135196432576240858800925L); END (cexp, complex); } @@ -2166,9 +2166,9 @@ csqrt_test (void) TEST_c_c (csqrt, -1, 0, 0.0, 1.0); TEST_c_c (csqrt, 0, 2, 1.0, 1.0); TEST_c_c (csqrt, 119, 120, 12.0, 5.0); - TEST_c_c (csqrt, 0.7L, 1.2L, 1.0220676100300264507L, 0.5870453129635652115L); - TEST_c_c (csqrt, -2, -3, 0.8959774761298381247L, -1.6741492280355400404L); - TEST_c_c (csqrt, -2, 3, 0.8959774761298381247L, 1.6741492280355400404L); + TEST_c_c (csqrt, 0.7L, 1.2L, 1.022067610030026450706487883081139L, 0.58704531296356521154977678719838035L); + TEST_c_c (csqrt, -2, -3, 0.89597747612983812471573375529004348L, -1.6741492280355400404480393008490519L); + TEST_c_c (csqrt, -2, 3, 0.89597747612983812471573375529004348L, 1.6741492280355400404480393008490519L); END (csqrt, complex); } @@ -2752,21 +2752,21 @@ hypot_test (void) TEST_ff_f (hypot, nan_value, nan_value, nan_value); /* hypot (x,y) == hypot (+-x, +-y) */ - TEST_ff_f (hypot, 0.7L, 12.4L, 12.41974234837422060118L); - TEST_ff_f (hypot, -0.7L, 12.4L, 12.41974234837422060118L); - TEST_ff_f (hypot, 0.7L, -12.4L, 12.41974234837422060118L); - TEST_ff_f (hypot, -0.7L, -12.4L, 12.41974234837422060118L); - TEST_ff_f (hypot, 12.4L, 0.7L, 12.41974234837422060118L); - TEST_ff_f (hypot, -12.4L, 0.7L, 12.41974234837422060118L); - TEST_ff_f (hypot, 12.4L, -0.7L, 12.41974234837422060118L); - TEST_ff_f (hypot, -12.4L, -0.7L, 12.41974234837422060118L); + TEST_ff_f (hypot, 0.7L, 12.4L, 12.419742348374220601176836866763271L); + TEST_ff_f (hypot, -0.7L, 12.4L, 12.419742348374220601176836866763271L); + TEST_ff_f (hypot, 0.7L, -12.4L, 12.419742348374220601176836866763271L); + TEST_ff_f (hypot, -0.7L, -12.4L, 12.419742348374220601176836866763271L); + TEST_ff_f (hypot, 12.4L, 0.7L, 12.419742348374220601176836866763271L); + TEST_ff_f (hypot, -12.4L, 0.7L, 12.419742348374220601176836866763271L); + TEST_ff_f (hypot, 12.4L, -0.7L, 12.419742348374220601176836866763271L); + TEST_ff_f (hypot, -12.4L, -0.7L, 12.419742348374220601176836866763271L); /* hypot (x,0) == fabs (x) */ TEST_ff_f (hypot, 0.7L, 0, 0.7L); TEST_ff_f (hypot, -0.7L, 0, 0.7L); TEST_ff_f (hypot, -5.7e7, 0, 5.7e7L); - TEST_ff_f (hypot, 0.7L, 1.2L, 1.3892443989449804508L); + TEST_ff_f (hypot, 0.7L, 1.2L, 1.3892443989449804508432547041028554L); END (hypot); } --- libc/sysdeps/alpha/fpu/libm-test-ulps.jj Fri Sep 22 09:35:56 2000 +++ libc/sysdeps/alpha/fpu/libm-test-ulps Thu Oct 26 17:31:52 2000 @@ -19,22 +19,22 @@ double: 1 idouble: 1 # cabs -Test "cabs (-0.7 + 12.4 i) == 12.41974234837422060118": +Test "cabs (-0.7 + 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-0.7 - 12.4 i) == 12.41974234837422060118": +Test "cabs (-0.7 - 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-12.4 + 0.7 i) == 12.41974234837422060118": +Test "cabs (-12.4 + 0.7 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-12.4 - 0.7 i) == 12.41974234837422060118": +Test "cabs (-12.4 - 0.7 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508": +Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508432547041028554": double: 1 idouble: 1 -Test "cabs (0.7 + 12.4 i) == 12.41974234837422060118": +Test "cabs (0.7 + 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 @@ -161,7 +161,7 @@ double: 1 idouble: 1 # cexp -Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.1339809149295426134 - 0.0190985162611351964 i": +Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": float: 1 ifloat: 1 Test "Real part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i": @@ -291,18 +291,18 @@ float: 1 ifloat: 1 # csqrt -Test "Real part of: csqrt (-2 + 3 i) == 0.8959774761298381247 + 1.6741492280355400404 i": +Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": float: 1 ifloat: 1 -Test "Real part of: csqrt (-2 - 3 i) == 0.8959774761298381247 - 1.6741492280355400404 i": +Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i": float: 1 ifloat: 1 -Test "Real part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i": +Test "Real part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i": +Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i": float: 1 ifloat: 1 @@ -400,31 +400,31 @@ idouble: 2 ifloat: 1 # hypot -Test "hypot (-0.7, -12.4) == 12.41974234837422060118": +Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (-0.7, 12.4) == 12.41974234837422060118": +Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (-12.4, -0.7) == 12.41974234837422060118": +Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (-12.4, 0.7) == 12.41974234837422060118": +Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (0.7, -12.4) == 12.41974234837422060118": +Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (0.7, 1.2) == 1.3892443989449804508": +Test "hypot (0.7, 1.2) == 1.3892443989449804508432547041028554": double: 1 idouble: 1 -Test "hypot (0.7, 12.4) == 12.41974234837422060118": +Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (12.4, -0.7) == 12.41974234837422060118": +Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (12.4, 0.7) == 12.41974234837422060118": +Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 --- libc/sysdeps/arm/libm-test-ulps.jj Thu Oct 26 18:17:17 2000 +++ libc/sysdeps/arm/libm-test-ulps Thu Oct 26 18:17:56 2000 @@ -19,22 +19,22 @@ double: 1 idouble: 1 # cabs -Test "cabs (-0.7 + 12.4 i) == 12.41974234837422060118": +Test "cabs (-0.7 + 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-0.7 - 12.4 i) == 12.41974234837422060118": +Test "cabs (-0.7 - 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-12.4 + 0.7 i) == 12.41974234837422060118": +Test "cabs (-12.4 + 0.7 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-12.4 - 0.7 i) == 12.41974234837422060118": +Test "cabs (-12.4 - 0.7 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508": +Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508432547041028554": double: 1 idouble: 1 -Test "cabs (0.7 + 12.4 i) == 12.41974234837422060118": +Test "cabs (0.7 + 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 @@ -161,7 +161,7 @@ double: 1 idouble: 1 # cexp -Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.1339809149295426134 - 0.0190985162611351964 i": +Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": float: 1 ifloat: 1 Test "Real part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i": @@ -291,18 +291,18 @@ float: 1 ifloat: 1 # csqrt -Test "Real part of: csqrt (-2 + 3 i) == 0.8959774761298381247 + 1.6741492280355400404 i": +Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": float: 1 ifloat: 1 -Test "Real part of: csqrt (-2 - 3 i) == 0.8959774761298381247 - 1.6741492280355400404 i": +Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i": float: 1 ifloat: 1 -Test "Real part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i": +Test "Real part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i": +Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i": float: 1 ifloat: 1 @@ -400,31 +400,31 @@ idouble: 2 ifloat: 1 # hypot -Test "hypot (-0.7, -12.4) == 12.41974234837422060118": +Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (-0.7, 12.4) == 12.41974234837422060118": +Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (-12.4, -0.7) == 12.41974234837422060118": +Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (-12.4, 0.7) == 12.41974234837422060118": +Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (0.7, -12.4) == 12.41974234837422060118": +Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (0.7, 1.2) == 1.3892443989449804508": +Test "hypot (0.7, 1.2) == 1.3892443989449804508432547041028554": double: 1 idouble: 1 -Test "hypot (0.7, 12.4) == 12.41974234837422060118": +Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (12.4, -0.7) == 12.41974234837422060118": +Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (12.4, 0.7) == 12.41974234837422060118": +Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 --- libc/sysdeps/i386/fpu/libm-test-ulps.jj Tue Oct 17 07:18:12 2000 +++ libc/sysdeps/i386/fpu/libm-test-ulps Thu Oct 26 17:31:52 2000 @@ -42,24 +42,24 @@ ildouble: 1605 ldouble: 1605 # cabs -Test "cabs (-0.7 + 12.4 i) == 12.41974234837422060118": +Test "cabs (-0.7 + 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-0.7 - 12.4 i) == 12.41974234837422060118": +Test "cabs (-0.7 - 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-12.4 + 0.7 i) == 12.41974234837422060118": +Test "cabs (-12.4 + 0.7 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-12.4 - 0.7 i) == 12.41974234837422060118": +Test "cabs (-12.4 - 0.7 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508": +Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508432547041028554": double: 1 idouble: 1 ildouble: 560 ldouble: 560 -Test "cabs (0.7 + 12.4 i) == 12.41974234837422060118": +Test "cabs (0.7 + 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 @@ -240,10 +240,10 @@ ildouble: 1183 ldouble: 1183 # cexp -Test "Real part of: cexp (-2.0 - 3.0 i) == -0.1339809149295426134 - 0.0190985162611351964 i": +Test "Real part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": ildouble: 4 ldouble: 4 -Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.1339809149295426134 - 0.0190985162611351964 i": +Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": ildouble: 18 ldouble: 18 Test "Real part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i": @@ -451,20 +451,20 @@ ildouble: 477 ldouble: 477 # csqrt -Test "Real part of: csqrt (-2 + 3 i) == 0.8959774761298381247 + 1.6741492280355400404 i": +Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": ildouble: 1 ldouble: 1 -Test "Imaginary part of: csqrt (-2 + 3 i) == 0.8959774761298381247 + 1.6741492280355400404 i": -Test "Real part of: csqrt (-2 - 3 i) == 0.8959774761298381247 - 1.6741492280355400404 i": +Test "Imaginary part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": +Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i": ildouble: 1 ldouble: 1 -Test "Imaginary part of: csqrt (-2 - 3 i) == 0.8959774761298381247 - 1.6741492280355400404 i": -Test "Real part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i": +Test "Imaginary part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i": +Test "Real part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i": double: 1 idouble: 1 ildouble: 237 ldouble: 237 -Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i": +Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i": ildouble: 128 ldouble: 128 @@ -598,39 +598,39 @@ double: 1 idouble: 1 # hypot -Test "hypot (-0.7, -12.4) == 12.41974234837422060118": +Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271": float: 1 ildouble: 406 ldouble: 406 -Test "hypot (-0.7, 12.4) == 12.41974234837422060118": +Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271": float: 1 ildouble: 406 ldouble: 406 -Test "hypot (-12.4, -0.7) == 12.41974234837422060118": +Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271": float: 1 ildouble: 406 ldouble: 406 -Test "hypot (-12.4, 0.7) == 12.41974234837422060118": +Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271": float: 1 ildouble: 406 ldouble: 406 -Test "hypot (0.7, -12.4) == 12.41974234837422060118": +Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271": float: 1 ildouble: 406 ldouble: 406 -Test "hypot (0.7, 1.2) == 1.3892443989449804508": +Test "hypot (0.7, 1.2) == 1.3892443989449804508432547041028554": double: 1 ildouble: 560 ldouble: 560 -Test "hypot (0.7, 12.4) == 12.41974234837422060118": +Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271": float: 1 ildouble: 406 ldouble: 406 -Test "hypot (12.4, -0.7) == 12.41974234837422060118": +Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271": float: 1 ildouble: 406 ldouble: 406 -Test "hypot (12.4, 0.7) == 12.41974234837422060118": +Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271": float: 1 ildouble: 406 ldouble: 406 --- libc/sysdeps/ieee754/ldbl-128/e_hypotl.c.jj Thu Oct 26 14:18:28 2000 +++ libc/sysdeps/ieee754/ldbl-128/e_hypotl.c Thu Oct 26 14:49:29 2000 @@ -0,0 +1,132 @@ +/* e_hypotl.c -- long double version of e_hypot.c. + * Conversion to long double by Jakub Jelinek, jakub@redhat.com. + */ + +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +#if defined(LIBM_SCCS) && !defined(lint) +static char rcsid[] = "$NetBSD: e_hypotl.c,v 1.9 1995/05/12 04:57:27 jtc Exp $"; +#endif + +/* __ieee754_hypotl(x,y) + * + * Method : + * If (assume round-to-nearest) z=x*x+y*y + * has error less than sqrtl(2)/2 ulp, than + * sqrtl(z) has error less than 1 ulp (exercise). + * + * So, compute sqrtl(x*x+y*y) with some care as + * follows to get the error below 1 ulp: + * + * Assume x>y>0; + * (if possible, set rounding to round-to-nearest) + * 1. if x > 2y use + * x1*x1+(y*y+(x2*(x+x1))) for x*x+y*y + * where x1 = x with lower 64 bits cleared, x2 = x-x1; else + * 2. if x <= 2y use + * t1*y1+((x-y)*(x-y)+(t1*y2+t2*y)) + * where t1 = 2x with lower 64 bits cleared, t2 = 2x-t1, + * y1= y with lower 64 bits chopped, y2 = y-y1. + * + * NOTE: scaling may be necessary if some argument is too + * large or too tiny + * + * Special cases: + * hypotl(x,y) is INF if x or y is +INF or -INF; else + * hypotl(x,y) is NAN if x or y is NAN. + * + * Accuracy: + * hypotl(x,y) returns sqrtl(x^2+y^2) with error less + * than 1 ulps (units in the last place) + */ + +#include "math.h" +#include "math_private.h" + +#ifdef __STDC__ + long double __ieee754_hypotl(long double x, long double y) +#else + long double __ieee754_hypotl(x,y) + long double x, y; +#endif +{ + long double a,b,t1,t2,y1,y2,w; + int64_t j,k,ha,hb; + + GET_LDOUBLE_MSW64(ha,x); + ha &= 0x7fffffffffffffffLL; + GET_LDOUBLE_MSW64(hb,y); + hb &= 0x7fffffffffffffffLL; + if(hb > ha) {a=y;b=x;j=ha; ha=hb;hb=j;} else {a=x;b=y;} + SET_LDOUBLE_MSW64(a,ha); /* a <- |a| */ + SET_LDOUBLE_MSW64(b,hb); /* b <- |b| */ + if((ha-hb)>0x78000000000000LL) {return a+b;} /* x/y > 2**120 */ + k=0; + if(ha > 0x5f3f000000000000LL) { /* a>2**8000 */ + if(ha >= 0x7fff000000000000LL) { /* Inf or NaN */ + u_int64_t low; + w = a+b; /* for sNaN */ + GET_LDOUBLE_LSW64(low,a); + if(((ha&0xffffffffffffLL)|low)==0) w = a; + GET_LDOUBLE_LSW64(low,b); + if(((hb^0x7fff000000000000LL)|low)==0) w = b; + return w; + } + /* scale a and b by 2**-9600 */ + ha -= 0x2580000000000000LL; + hb -= 0x2580000000000000LL; k += 9600; + SET_LDOUBLE_MSW64(a,ha); + SET_LDOUBLE_MSW64(b,hb); + } + if(hb < 0x20bf000000000000LL) { /* b < 2**-8000 */ + if(hb <= 0x0000ffffffffffffLL) { /* subnormal b or 0 */ + u_int64_t low; + GET_LDOUBLE_LSW64(low,b); + if((hb|low)==0) return a; + t1=0; + SET_LDOUBLE_MSW64(t1,0x7ffd000000000000LL); /* t1=2^16382 */ + b *= t1; + a *= t1; + k -= 16382; + } else { /* scale a and b by 2^9600 */ + ha += 0x2580000000000000LL; /* a *= 2^9600 */ + hb += 0x2580000000000000LL; /* b *= 2^9600 */ + k -= 9600; + SET_LDOUBLE_MSW64(a,ha); + SET_LDOUBLE_MSW64(b,hb); + } + } + /* medium size a and b */ + w = a-b; + if (w>b) { + t1 = 0; + SET_LDOUBLE_MSW64(t1,ha); + t2 = a-t1; + w = __ieee754_sqrtl(t1*t1-(b*(-b)-t2*(a+t1))); + } else { + a = a+a; + y1 = 0; + SET_LDOUBLE_MSW64(y1,hb); + y2 = b - y1; + t1 = 0; + SET_LDOUBLE_MSW64(t1,ha+0x0001000000000000LL); + t2 = a - t1; + w = __ieee754_sqrtl(t1*y1-(w*(-w)-(t1*y2+t2*b))); + } + if(k!=0) { + u_int64_t high; + t1 = 1.0L; + GET_LDOUBLE_MSW64(high,t1); + SET_LDOUBLE_MSW64(t1,high+(k<<48)); + return t1*w; + } else return w; +} --- libc/sysdeps/ia64/fpu/libm-test-ulps.jj Sat Sep 30 04:55:56 2000 +++ libc/sysdeps/ia64/fpu/libm-test-ulps Thu Oct 26 17:31:52 2000 @@ -53,24 +53,24 @@ ildouble: 1605 ldouble: 1605 # cabs -Test "cabs (-0.7 + 12.4 i) == 12.41974234837422060118": +Test "cabs (-0.7 + 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-0.7 - 12.4 i) == 12.41974234837422060118": +Test "cabs (-0.7 - 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-12.4 + 0.7 i) == 12.41974234837422060118": +Test "cabs (-12.4 + 0.7 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-12.4 - 0.7 i) == 12.41974234837422060118": +Test "cabs (-12.4 - 0.7 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508": +Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508432547041028554": double: 1 idouble: 1 ildouble: 560 ldouble: 560 -Test "cabs (0.7 + 12.4 i) == 12.41974234837422060118": +Test "cabs (0.7 + 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 @@ -282,10 +282,10 @@ ildouble: 1183 ldouble: 1183 # cexp -Test "Real part of: cexp (-2.0 - 3.0 i) == -0.1339809149295426134 - 0.0190985162611351964 i": +Test "Real part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": ildouble: 4 ldouble: 4 -Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.1339809149295426134 - 0.0190985162611351964 i": +Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": float: 1 ifloat: 1 ildouble: 18 @@ -513,26 +513,26 @@ ildouble: 477 ldouble: 477 # csqrt -Test "Real part of: csqrt (-2 + 3 i) == 0.8959774761298381247 + 1.6741492280355400404 i": +Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": float: 1 ifloat: 1 ildouble: 1 ldouble: 1 -Test "Imaginary part of: csqrt (-2 + 3 i) == 0.8959774761298381247 + 1.6741492280355400404 i": -Test "Real part of: csqrt (-2 - 3 i) == 0.8959774761298381247 - 1.6741492280355400404 i": +Test "Imaginary part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": +Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i": float: 1 ifloat: 1 ildouble: 1 ldouble: 1 -Test "Imaginary part of: csqrt (-2 - 3 i) == 0.8959774761298381247 - 1.6741492280355400404 i": -Test "Real part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i": +Test "Imaginary part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i": +Test "Real part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i": float: 1 ifloat: 1 double: 1 idouble: 1 ildouble: 237 ldouble: 237 -Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i": +Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i": float: 1 ifloat: 1 ildouble: 128 @@ -692,47 +692,47 @@ double: 1 idouble: 1 # hypot -Test "hypot (-0.7, -12.4) == 12.41974234837422060118": +Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 ildouble: 406 ldouble: 406 -Test "hypot (-0.7, 12.4) == 12.41974234837422060118": +Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 ildouble: 406 ldouble: 406 -Test "hypot (-12.4, -0.7) == 12.41974234837422060118": +Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 ildouble: 406 ldouble: 406 -Test "hypot (-12.4, 0.7) == 12.41974234837422060118": +Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 ildouble: 406 ldouble: 406 -Test "hypot (0.7, -12.4) == 12.41974234837422060118": +Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 ildouble: 406 ldouble: 406 -Test "hypot (0.7, 1.2) == 1.3892443989449804508": +Test "hypot (0.7, 1.2) == 1.3892443989449804508432547041028554": double: 1 idouble: 1 ildouble: 560 ldouble: 560 -Test "hypot (0.7, 12.4) == 12.41974234837422060118": +Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 ildouble: 406 ldouble: 406 -Test "hypot (12.4, -0.7) == 12.41974234837422060118": +Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 ildouble: 406 ldouble: 406 -Test "hypot (12.4, 0.7) == 12.41974234837422060118": +Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 ildouble: 406 --- libc/sysdeps/m68k/fpu/libm-test-ulps.jj Wed Oct 25 11:14:41 2000 +++ libc/sysdeps/m68k/fpu/libm-test-ulps Thu Oct 26 17:31:52 2000 @@ -28,22 +28,22 @@ double: 1 idouble: 1 # cabs -Test "cabs (-0.7 + 12.4 i) == 12.41974234837422060118": +Test "cabs (-0.7 + 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-0.7 - 12.4 i) == 12.41974234837422060118": +Test "cabs (-0.7 - 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-12.4 + 0.7 i) == 12.41974234837422060118": +Test "cabs (-12.4 + 0.7 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-12.4 - 0.7 i) == 12.41974234837422060118": +Test "cabs (-12.4 - 0.7 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508": +Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508432547041028554": ildouble: 1 ldouble: 1 -Test "cabs (0.7 + 12.4 i) == 12.41974234837422060118": +Test "cabs (0.7 + 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 @@ -209,12 +209,12 @@ ildouble: 2 ldouble: 2 # cexp -Test "Real part of: cexp (-2.0 - 3.0 i) == -0.1339809149295426134 - 0.0190985162611351964 i": +Test "Real part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": float: 1 ifloat: 1 ildouble: 5 ldouble: 5 -Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.1339809149295426134 - 0.0190985162611351964 i": +Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": float: 1 ifloat: 1 ildouble: 19 @@ -344,16 +344,16 @@ float: 1 ifloat: 1 # csqrt -Test "Real part of: csqrt (-2 + 3 i) == 0.8959774761298381247 + 1.6741492280355400404 i": +Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": ildouble: 1 ldouble: 1 -Test "Real part of: csqrt (-2 - 3 i) == 0.8959774761298381247 - 1.6741492280355400404 i": +Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i": ildouble: 1 ldouble: 1 -Test "Real part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i": +Test "Real part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i": float: 1 ifloat: 1 -Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i": +Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i": ildouble: 1 ldouble: 1 @@ -453,31 +453,31 @@ ildouble: 1 ldouble: 1 # hypot -Test "hypot (-0.7, -12.4) == 12.41974234837422060118": +Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (-0.7, 12.4) == 12.41974234837422060118": +Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (-12.4, -0.7) == 12.41974234837422060118": +Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (-12.4, 0.7) == 12.41974234837422060118": +Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (0.7, -12.4) == 12.41974234837422060118": +Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (0.7, 1.2) == 1.3892443989449804508": +Test "hypot (0.7, 1.2) == 1.3892443989449804508432547041028554": ildouble: 1 ldouble: 1 -Test "hypot (0.7, 12.4) == 12.41974234837422060118": +Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (12.4, -0.7) == 12.41974234837422060118": +Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (12.4, 0.7) == 12.41974234837422060118": +Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 --- libc/sysdeps/mips/fpu/libm-test-ulps.jj Tue Jun 20 16:16:21 2000 +++ libc/sysdeps/mips/fpu/libm-test-ulps Thu Oct 26 17:31:52 2000 @@ -19,22 +19,22 @@ double: 1 idouble: 1 # cabs -Test "cabs (-0.7 + 12.4 i) == 12.41974234837422060118": +Test "cabs (-0.7 + 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-0.7 - 12.4 i) == 12.41974234837422060118": +Test "cabs (-0.7 - 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-12.4 + 0.7 i) == 12.41974234837422060118": +Test "cabs (-12.4 + 0.7 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-12.4 - 0.7 i) == 12.41974234837422060118": +Test "cabs (-12.4 - 0.7 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508": +Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508432547041028554": double: 1 idouble: 1 -Test "cabs (0.7 + 12.4 i) == 12.41974234837422060118": +Test "cabs (0.7 + 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 @@ -161,7 +161,7 @@ double: 1 idouble: 1 # cexp -Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.1339809149295426134 - 0.0190985162611351964 i": +Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": float: 1 ifloat: 1 Test "Real part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i": @@ -291,18 +291,18 @@ float: 1 ifloat: 1 # csqrt -Test "Real part of: csqrt (-2 + 3 i) == 0.8959774761298381247 + 1.6741492280355400404 i": +Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": float: 1 ifloat: 1 -Test "Real part of: csqrt (-2 - 3 i) == 0.8959774761298381247 - 1.6741492280355400404 i": +Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i": float: 1 ifloat: 1 -Test "Real part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i": +Test "Real part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i": +Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i": float: 1 ifloat: 1 @@ -400,31 +400,31 @@ idouble: 2 ifloat: 1 # hypot -Test "hypot (-0.7, -12.4) == 12.41974234837422060118": +Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (-0.7, 12.4) == 12.41974234837422060118": +Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (-12.4, -0.7) == 12.41974234837422060118": +Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (-12.4, 0.7) == 12.41974234837422060118": +Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (0.7, -12.4) == 12.41974234837422060118": +Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (0.7, 1.2) == 1.3892443989449804508": +Test "hypot (0.7, 1.2) == 1.3892443989449804508432547041028554": double: 1 idouble: 1 -Test "hypot (0.7, 12.4) == 12.41974234837422060118": +Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (12.4, -0.7) == 12.41974234837422060118": +Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (12.4, 0.7) == 12.41974234837422060118": +Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 --- libc/sysdeps/powerpc/fpu/libm-test-ulps.jj Wed Oct 25 11:14:45 2000 +++ libc/sysdeps/powerpc/fpu/libm-test-ulps Thu Oct 26 17:31:52 2000 @@ -19,22 +19,22 @@ double: 1 idouble: 1 # cabs -Test "cabs (-0.7 + 12.4 i) == 12.41974234837422060118": +Test "cabs (-0.7 + 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-0.7 - 12.4 i) == 12.41974234837422060118": +Test "cabs (-0.7 - 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-12.4 + 0.7 i) == 12.41974234837422060118": +Test "cabs (-12.4 + 0.7 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-12.4 - 0.7 i) == 12.41974234837422060118": +Test "cabs (-12.4 - 0.7 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508": +Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508432547041028554": double: 1 idouble: 1 -Test "cabs (0.7 + 12.4 i) == 12.41974234837422060118": +Test "cabs (0.7 + 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 @@ -160,7 +160,7 @@ double: 1 idouble: 1 # cexp -Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.1339809149295426134 - 0.0190985162611351964 i": +Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": float: 1 ifloat: 1 Test "Real part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i": @@ -290,18 +290,18 @@ float: 1 ifloat: 1 # csqrt -Test "Real part of: csqrt (-2 + 3 i) == 0.8959774761298381247 + 1.6741492280355400404 i": +Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": float: 1 ifloat: 1 -Test "Real part of: csqrt (-2 - 3 i) == 0.8959774761298381247 - 1.6741492280355400404 i": +Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i": float: 1 ifloat: 1 -Test "Real part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i": +Test "Real part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i": +Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i": float: 1 ifloat: 1 @@ -399,31 +399,31 @@ idouble: 2 ifloat: 1 # hypot -Test "hypot (-0.7, -12.4) == 12.41974234837422060118": +Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (-0.7, 12.4) == 12.41974234837422060118": +Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (-12.4, -0.7) == 12.41974234837422060118": +Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (-12.4, 0.7) == 12.41974234837422060118": +Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (0.7, -12.4) == 12.41974234837422060118": +Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (0.7, 1.2) == 1.3892443989449804508": +Test "hypot (0.7, 1.2) == 1.3892443989449804508432547041028554": double: 1 idouble: 1 -Test "hypot (0.7, 12.4) == 12.41974234837422060118": +Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (12.4, -0.7) == 12.41974234837422060118": +Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (12.4, 0.7) == 12.41974234837422060118": +Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 --- libc/sysdeps/sparc/sparc32/fpu/libm-test-ulps.jj Wed Oct 25 14:45:54 2000 +++ libc/sysdeps/sparc/sparc32/fpu/libm-test-ulps Thu Oct 26 17:31:52 2000 @@ -19,22 +19,22 @@ double: 1 idouble: 1 # cabs -Test "cabs (-0.7 + 12.4 i) == 12.41974234837422060118": +Test "cabs (-0.7 + 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-0.7 - 12.4 i) == 12.41974234837422060118": +Test "cabs (-0.7 - 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-12.4 + 0.7 i) == 12.41974234837422060118": +Test "cabs (-12.4 + 0.7 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-12.4 - 0.7 i) == 12.41974234837422060118": +Test "cabs (-12.4 - 0.7 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508": +Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508432547041028554": double: 1 idouble: 1 -Test "cabs (0.7 + 12.4 i) == 12.41974234837422060118": +Test "cabs (0.7 + 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 @@ -161,7 +161,7 @@ double: 1 idouble: 1 # cexp -Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.1339809149295426134 - 0.0190985162611351964 i": +Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": float: 1 ifloat: 1 Test "Real part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i": @@ -291,18 +291,18 @@ float: 1 ifloat: 1 # csqrt -Test "Real part of: csqrt (-2 + 3 i) == 0.8959774761298381247 + 1.6741492280355400404 i": +Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": float: 1 ifloat: 1 -Test "Real part of: csqrt (-2 - 3 i) == 0.8959774761298381247 - 1.6741492280355400404 i": +Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i": float: 1 ifloat: 1 -Test "Real part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i": +Test "Real part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i": +Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i": float: 1 ifloat: 1 @@ -400,31 +400,31 @@ idouble: 2 ifloat: 1 # hypot -Test "hypot (-0.7, -12.4) == 12.41974234837422060118": +Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (-0.7, 12.4) == 12.41974234837422060118": +Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (-12.4, -0.7) == 12.41974234837422060118": +Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (-12.4, 0.7) == 12.41974234837422060118": +Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (0.7, -12.4) == 12.41974234837422060118": +Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (0.7, 1.2) == 1.3892443989449804508": +Test "hypot (0.7, 1.2) == 1.3892443989449804508432547041028554": double: 1 idouble: 1 -Test "hypot (0.7, 12.4) == 12.41974234837422060118": +Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (12.4, -0.7) == 12.41974234837422060118": +Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (12.4, 0.7) == 12.41974234837422060118": +Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 --- libc/sysdeps/sparc/sparc64/fpu/libm-test-ulps.jj Wed Oct 25 18:30:58 2000 +++ libc/sysdeps/sparc/sparc64/fpu/libm-test-ulps Thu Oct 26 18:20:20 2000 @@ -19,22 +19,22 @@ double: 1 idouble: 1 # cabs -Test "cabs (-0.7 + 12.4 i) == 12.41974234837422060118": +Test "cabs (-0.7 + 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-0.7 - 12.4 i) == 12.41974234837422060118": +Test "cabs (-0.7 - 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-12.4 + 0.7 i) == 12.41974234837422060118": +Test "cabs (-12.4 + 0.7 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-12.4 - 0.7 i) == 12.41974234837422060118": +Test "cabs (-12.4 - 0.7 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508": +Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508432547041028554": double: 1 idouble: 1 -Test "cabs (0.7 + 12.4 i) == 12.41974234837422060118": +Test "cabs (0.7 + 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 @@ -161,9 +161,14 @@ double: 1 idouble: 1 # cexp -Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.1339809149295426134 - 0.0190985162611351964 i": +Test "Real part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": +ildouble: 1 +ldouble: 1 +Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Test "Real part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i": double: 1 float: 1 @@ -330,20 +335,26 @@ float: 1 ifloat: 1 # csqrt -Test "Real part of: csqrt (-2 + 3 i) == 0.8959774761298381247 + 1.6741492280355400404 i": +Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": float: 1 ifloat: 1 -Test "Real part of: csqrt (-2 - 3 i) == 0.8959774761298381247 - 1.6741492280355400404 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i": float: 1 ifloat: 1 -Test "Real part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i": +ildouble: 1 +ldouble: 1 +Test "Real part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i": +Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 # ctan Test "Real part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i": @@ -453,31 +464,31 @@ ildouble: 2 ldouble: 2 # hypot -Test "hypot (-0.7, -12.4) == 12.41974234837422060118": +Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (-0.7, 12.4) == 12.41974234837422060118": +Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (-12.4, -0.7) == 12.41974234837422060118": +Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (-12.4, 0.7) == 12.41974234837422060118": +Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (0.7, -12.4) == 12.41974234837422060118": +Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (0.7, 1.2) == 1.3892443989449804508": +Test "hypot (0.7, 1.2) == 1.3892443989449804508432547041028554": double: 1 idouble: 1 -Test "hypot (0.7, 12.4) == 12.41974234837422060118": +Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (12.4, -0.7) == 12.41974234837422060118": +Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (12.4, 0.7) == 12.41974234837422060118": +Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 @@ -937,10 +948,14 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: Imaginary part of "cexp": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: Imaginary part of "clog": double: 1 @@ -999,10 +1014,14 @@ double: 1 float: 1 idouble: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: Imaginary part of "csqrt": float: 1 ifloat: 1 +ildouble: 1 +ldouble: 1 Function: Real part of "ctan": double: 1 --- libc/sysdeps/sh/sh4/fpu/libm-test-ulps.jj Mon Jun 12 22:31:02 2000 +++ libc/sysdeps/sh/sh4/fpu/libm-test-ulps Thu Oct 26 17:31:52 2000 @@ -19,22 +19,22 @@ double: 1 idouble: 1 # cabs -Test "cabs (-0.7 + 12.4 i) == 12.41974234837422060118": +Test "cabs (-0.7 + 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-0.7 - 12.4 i) == 12.41974234837422060118": +Test "cabs (-0.7 - 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-12.4 + 0.7 i) == 12.41974234837422060118": +Test "cabs (-12.4 + 0.7 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-12.4 - 0.7 i) == 12.41974234837422060118": +Test "cabs (-12.4 - 0.7 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508": +Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508432547041028554": double: 1 idouble: 1 -Test "cabs (0.7 + 12.4 i) == 12.41974234837422060118": +Test "cabs (0.7 + 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 @@ -161,7 +161,7 @@ double: 1 idouble: 1 # cexp -Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.1339809149295426134 - 0.0190985162611351964 i": +Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": float: 1 ifloat: 1 Test "Real part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i": @@ -291,18 +291,18 @@ float: 1 ifloat: 1 # csqrt -Test "Real part of: csqrt (-2 + 3 i) == 0.8959774761298381247 + 1.6741492280355400404 i": +Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": float: 1 ifloat: 1 -Test "Real part of: csqrt (-2 - 3 i) == 0.8959774761298381247 - 1.6741492280355400404 i": +Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i": float: 1 ifloat: 1 -Test "Real part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i": +Test "Real part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i": +Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i": float: 1 ifloat: 1 @@ -400,31 +400,31 @@ idouble: 2 ifloat: 1 # hypot -Test "hypot (-0.7, -12.4) == 12.41974234837422060118": +Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (-0.7, 12.4) == 12.41974234837422060118": +Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (-12.4, -0.7) == 12.41974234837422060118": +Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (-12.4, 0.7) == 12.41974234837422060118": +Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (0.7, -12.4) == 12.41974234837422060118": +Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (0.7, 1.2) == 1.3892443989449804508": +Test "hypot (0.7, 1.2) == 1.3892443989449804508432547041028554": double: 1 idouble: 1 -Test "hypot (0.7, 12.4) == 12.41974234837422060118": +Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (12.4, -0.7) == 12.41974234837422060118": +Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (12.4, 0.7) == 12.41974234837422060118": +Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 --- libc/sysdeps/s390/fpu/libm-test-ulps.jj Wed Oct 25 11:14:46 2000 +++ libc/sysdeps/s390/fpu/libm-test-ulps Thu Oct 26 17:31:52 2000 @@ -24,22 +24,22 @@ double: 1 idouble: 1 # cabs -Test "cabs (-0.7 + 12.4 i) == 12.41974234837422060118": +Test "cabs (-0.7 + 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-0.7 - 12.4 i) == 12.41974234837422060118": +Test "cabs (-0.7 - 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-12.4 + 0.7 i) == 12.41974234837422060118": +Test "cabs (-12.4 + 0.7 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (-12.4 - 0.7 i) == 12.41974234837422060118": +Test "cabs (-12.4 - 0.7 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508": +Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508432547041028554": double: 1 idouble: 1 -Test "cabs (0.7 + 12.4 i) == 12.41974234837422060118": +Test "cabs (0.7 + 12.4 i) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 @@ -166,7 +166,7 @@ double: 1 idouble: 1 # cexp -Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.1339809149295426134 - 0.0190985162611351964 i": +Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i": float: 1 ifloat: 1 Test "Real part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i": @@ -309,18 +309,18 @@ float: 1 ifloat: 1 # csqrt -Test "Real part of: csqrt (-2 + 3 i) == 0.8959774761298381247 + 1.6741492280355400404 i": +Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i": float: 1 ifloat: 1 -Test "Real part of: csqrt (-2 - 3 i) == 0.8959774761298381247 - 1.6741492280355400404 i": +Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i": float: 1 ifloat: 1 -Test "Real part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i": +Test "Real part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i": double: 1 float: 1 idouble: 1 ifloat: 1 -Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i": +Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i": float: 1 ifloat: 1 @@ -421,31 +421,31 @@ idouble: 2 ifloat: 1 # hypot -Test "hypot (-0.7, -12.4) == 12.41974234837422060118": +Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (-0.7, 12.4) == 12.41974234837422060118": +Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (-12.4, -0.7) == 12.41974234837422060118": +Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (-12.4, 0.7) == 12.41974234837422060118": +Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (0.7, -12.4) == 12.41974234837422060118": +Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (0.7, 1.2) == 1.3892443989449804508": +Test "hypot (0.7, 1.2) == 1.3892443989449804508432547041028554": double: 1 idouble: 1 -Test "hypot (0.7, 12.4) == 12.41974234837422060118": +Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (12.4, -0.7) == 12.41974234837422060118": +Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 -Test "hypot (12.4, 0.7) == 12.41974234837422060118": +Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271": float: 1 ifloat: 1 Jakub
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |