mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 13:10:33 +00:00
glibc: fix a math problem by upstream patch
This commit is contained in:
parent
05068ac554
commit
cbe7e0b5f0
|
@ -56,6 +56,8 @@ stdenv.mkDerivation ({
|
|||
"/bin:/usr/bin", which is inappropriate on NixOS machines. This
|
||||
patch extends the search path by "/run/current-system/sw/bin". */
|
||||
./fix_path_attribute_in_getconf.patch
|
||||
|
||||
./fix-math.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
|
|
336
pkgs/development/libraries/glibc/2.19/fix-math.patch
Normal file
336
pkgs/development/libraries/glibc/2.19/fix-math.patch
Normal file
|
@ -0,0 +1,336 @@
|
|||
From: Siddhesh Poyarekar <siddhesh@redhat.com>
|
||||
Date: Thu, 27 Feb 2014 15:42:09 +0000 (+0530)
|
||||
Subject: Fix sign of input to bsloww1 (BZ #16623)
|
||||
X-Git-Url: http://repo.or.cz/w/glibc.git/commitdiff_plain/1cadc85813d736f7682fa2eeadae639ab6b66c65
|
||||
|
||||
Fix sign of input to bsloww1 (BZ #16623)
|
||||
|
||||
In 84ba214c, I removed some redundant sign computations and in the
|
||||
process, I incorrectly got rid of a temporary variable, thus passing
|
||||
the absolute value of the input to bsloww1. This caused #16623.
|
||||
|
||||
This fix undoes the incorrect change.
|
||||
|
||||
[nix]: drop docs update (wouldn't apply)
|
||||
---
|
||||
|
||||
diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in
|
||||
index ac5348f..fafe96f 100644
|
||||
--- a/math/auto-libm-test-in
|
||||
+++ b/math/auto-libm-test-in
|
||||
@@ -594,6 +594,7 @@ cos 0x1.0000010b239a9p0
|
||||
cos 0x1.00000162a932bp0
|
||||
cos 0x1.000002d452a10p0
|
||||
cos 0x1.000005bc7d86dp0
|
||||
+cos 0x1.200145a975ce6p32
|
||||
cos 1
|
||||
cos 2
|
||||
cos 3
|
||||
@@ -1748,6 +1749,7 @@ sin 7
|
||||
sin 8
|
||||
sin 9
|
||||
sin 10
|
||||
+sin 0x1.2001469775ce6p32
|
||||
|
||||
sincos 0
|
||||
sincos -0
|
||||
diff --git a/math/auto-libm-test-out b/math/auto-libm-test-out
|
||||
index 8f79359..59c08a7 100644
|
||||
--- a/math/auto-libm-test-out
|
||||
+++ b/math/auto-libm-test-out
|
||||
@@ -74446,6 +74446,75 @@ cos 0x1.000005bc7d86dp0
|
||||
= cos tonearest ldbl-128ibm 0x1.000005bc7d86dp+0L : 0x8.a513ba9f703d3ffffffcb92354p-4L : inexact-ok
|
||||
= cos towardzero ldbl-128ibm 0x1.000005bc7d86dp+0L : 0x8.a513ba9f703d3ffffffcb92354p-4L : inexact-ok
|
||||
= cos upward ldbl-128ibm 0x1.000005bc7d86dp+0L : 0x8.a513ba9f703d3ffffffcb92358p-4L : inexact-ok
|
||||
+cos 0x1.200145a975ce6p32
|
||||
+= cos downward flt-32 0x1.200146p+32f : -0xf.74fbep-4f : inexact-ok
|
||||
+= cos tonearest flt-32 0x1.200146p+32f : -0xf.74fbdp-4f : inexact-ok
|
||||
+= cos towardzero flt-32 0x1.200146p+32f : -0xf.74fbdp-4f : inexact-ok
|
||||
+= cos upward flt-32 0x1.200146p+32f : -0xf.74fbdp-4f : inexact-ok
|
||||
+= cos downward dbl-64 0x1.200146p+32 : -0xf.74fbd5498fe5p-4 : inexact-ok
|
||||
+= cos tonearest dbl-64 0x1.200146p+32 : -0xf.74fbd5498fe5p-4 : inexact-ok
|
||||
+= cos towardzero dbl-64 0x1.200146p+32 : -0xf.74fbd5498fe48p-4 : inexact-ok
|
||||
+= cos upward dbl-64 0x1.200146p+32 : -0xf.74fbd5498fe48p-4 : inexact-ok
|
||||
+= cos downward ldbl-96-intel 0x1.200146p+32L : -0xf.74fbd5498fe4c0dp-4L : inexact-ok
|
||||
+= cos tonearest ldbl-96-intel 0x1.200146p+32L : -0xf.74fbd5498fe4c0cp-4L : inexact-ok
|
||||
+= cos towardzero ldbl-96-intel 0x1.200146p+32L : -0xf.74fbd5498fe4c0cp-4L : inexact-ok
|
||||
+= cos upward ldbl-96-intel 0x1.200146p+32L : -0xf.74fbd5498fe4c0cp-4L : inexact-ok
|
||||
+= cos downward ldbl-96-m68k 0x1.200146p+32L : -0xf.74fbd5498fe4c0dp-4L : inexact-ok
|
||||
+= cos tonearest ldbl-96-m68k 0x1.200146p+32L : -0xf.74fbd5498fe4c0cp-4L : inexact-ok
|
||||
+= cos towardzero ldbl-96-m68k 0x1.200146p+32L : -0xf.74fbd5498fe4c0cp-4L : inexact-ok
|
||||
+= cos upward ldbl-96-m68k 0x1.200146p+32L : -0xf.74fbd5498fe4c0cp-4L : inexact-ok
|
||||
+= cos downward ldbl-128 0x1.200146p+32L : -0xf.74fbd5498fe4c0c71bd9e4ef59e8p-4L : inexact-ok
|
||||
+= cos tonearest ldbl-128 0x1.200146p+32L : -0xf.74fbd5498fe4c0c71bd9e4ef59e8p-4L : inexact-ok
|
||||
+= cos towardzero ldbl-128 0x1.200146p+32L : -0xf.74fbd5498fe4c0c71bd9e4ef59ep-4L : inexact-ok
|
||||
+= cos upward ldbl-128 0x1.200146p+32L : -0xf.74fbd5498fe4c0c71bd9e4ef59ep-4L : inexact-ok
|
||||
+= cos downward ldbl-128ibm 0x1.200146p+32L : -0xf.74fbd5498fe4c0c71bd9e4ef5cp-4L : inexact-ok
|
||||
+= cos tonearest ldbl-128ibm 0x1.200146p+32L : -0xf.74fbd5498fe4c0c71bd9e4ef58p-4L : inexact-ok
|
||||
+= cos towardzero ldbl-128ibm 0x1.200146p+32L : -0xf.74fbd5498fe4c0c71bd9e4ef58p-4L : inexact-ok
|
||||
+= cos upward ldbl-128ibm 0x1.200146p+32L : -0xf.74fbd5498fe4c0c71bd9e4ef58p-4L : inexact-ok
|
||||
+= cos downward flt-32 0x1.200144p+32f : 0xf.bc96cp-4f : inexact-ok
|
||||
+= cos tonearest flt-32 0x1.200144p+32f : 0xf.bc96dp-4f : inexact-ok
|
||||
+= cos towardzero flt-32 0x1.200144p+32f : 0xf.bc96cp-4f : inexact-ok
|
||||
+= cos upward flt-32 0x1.200144p+32f : 0xf.bc96dp-4f : inexact-ok
|
||||
+= cos downward dbl-64 0x1.200144p+32 : 0xf.bc96ca2c658a8p-4 : inexact-ok
|
||||
+= cos tonearest dbl-64 0x1.200144p+32 : 0xf.bc96ca2c658a8p-4 : inexact-ok
|
||||
+= cos towardzero dbl-64 0x1.200144p+32 : 0xf.bc96ca2c658a8p-4 : inexact-ok
|
||||
+= cos upward dbl-64 0x1.200144p+32 : 0xf.bc96ca2c658bp-4 : inexact-ok
|
||||
+= cos downward ldbl-96-intel 0x1.200144p+32L : 0xf.bc96ca2c658abf5p-4L : inexact-ok
|
||||
+= cos tonearest ldbl-96-intel 0x1.200144p+32L : 0xf.bc96ca2c658abf6p-4L : inexact-ok
|
||||
+= cos towardzero ldbl-96-intel 0x1.200144p+32L : 0xf.bc96ca2c658abf5p-4L : inexact-ok
|
||||
+= cos upward ldbl-96-intel 0x1.200144p+32L : 0xf.bc96ca2c658abf6p-4L : inexact-ok
|
||||
+= cos downward ldbl-96-m68k 0x1.200144p+32L : 0xf.bc96ca2c658abf5p-4L : inexact-ok
|
||||
+= cos tonearest ldbl-96-m68k 0x1.200144p+32L : 0xf.bc96ca2c658abf6p-4L : inexact-ok
|
||||
+= cos towardzero ldbl-96-m68k 0x1.200144p+32L : 0xf.bc96ca2c658abf5p-4L : inexact-ok
|
||||
+= cos upward ldbl-96-m68k 0x1.200144p+32L : 0xf.bc96ca2c658abf6p-4L : inexact-ok
|
||||
+= cos downward ldbl-128 0x1.200144p+32L : 0xf.bc96ca2c658abf5ace7b886a8fbp-4L : inexact-ok
|
||||
+= cos tonearest ldbl-128 0x1.200144p+32L : 0xf.bc96ca2c658abf5ace7b886a8fbp-4L : inexact-ok
|
||||
+= cos towardzero ldbl-128 0x1.200144p+32L : 0xf.bc96ca2c658abf5ace7b886a8fbp-4L : inexact-ok
|
||||
+= cos upward ldbl-128 0x1.200144p+32L : 0xf.bc96ca2c658abf5ace7b886a8fb8p-4L : inexact-ok
|
||||
+= cos downward ldbl-128ibm 0x1.200144p+32L : 0xf.bc96ca2c658abf5ace7b886a8cp-4L : inexact-ok
|
||||
+= cos tonearest ldbl-128ibm 0x1.200144p+32L : 0xf.bc96ca2c658abf5ace7b886a9p-4L : inexact-ok
|
||||
+= cos towardzero ldbl-128ibm 0x1.200144p+32L : 0xf.bc96ca2c658abf5ace7b886a8cp-4L : inexact-ok
|
||||
+= cos upward ldbl-128ibm 0x1.200144p+32L : 0xf.bc96ca2c658abf5ace7b886a9p-4L : inexact-ok
|
||||
+= cos downward dbl-64 0x1.200145a975ce6p+32 : -0x6.568e7ed3dffdp-4 : inexact-ok
|
||||
+= cos tonearest dbl-64 0x1.200145a975ce6p+32 : -0x6.568e7ed3dffccp-4 : inexact-ok
|
||||
+= cos towardzero dbl-64 0x1.200145a975ce6p+32 : -0x6.568e7ed3dffccp-4 : inexact-ok
|
||||
+= cos upward dbl-64 0x1.200145a975ce6p+32 : -0x6.568e7ed3dffccp-4 : inexact-ok
|
||||
+= cos downward ldbl-96-intel 0x1.200145a975ce6p+32L : -0x6.568e7ed3dffcdfe8p-4L : inexact-ok
|
||||
+= cos tonearest ldbl-96-intel 0x1.200145a975ce6p+32L : -0x6.568e7ed3dffcdfep-4L : inexact-ok
|
||||
+= cos towardzero ldbl-96-intel 0x1.200145a975ce6p+32L : -0x6.568e7ed3dffcdfep-4L : inexact-ok
|
||||
+= cos upward ldbl-96-intel 0x1.200145a975ce6p+32L : -0x6.568e7ed3dffcdfep-4L : inexact-ok
|
||||
+= cos downward ldbl-96-m68k 0x1.200145a975ce6p+32L : -0x6.568e7ed3dffcdfe8p-4L : inexact-ok
|
||||
+= cos tonearest ldbl-96-m68k 0x1.200145a975ce6p+32L : -0x6.568e7ed3dffcdfep-4L : inexact-ok
|
||||
+= cos towardzero ldbl-96-m68k 0x1.200145a975ce6p+32L : -0x6.568e7ed3dffcdfep-4L : inexact-ok
|
||||
+= cos upward ldbl-96-m68k 0x1.200145a975ce6p+32L : -0x6.568e7ed3dffcdfep-4L : inexact-ok
|
||||
+= cos downward ldbl-128 0x1.200145a975ce6p+32L : -0x6.568e7ed3dffcdfe227fd726840e8p-4L : inexact-ok
|
||||
+= cos tonearest ldbl-128 0x1.200145a975ce6p+32L : -0x6.568e7ed3dffcdfe227fd726840e4p-4L : inexact-ok
|
||||
+= cos towardzero ldbl-128 0x1.200145a975ce6p+32L : -0x6.568e7ed3dffcdfe227fd726840e4p-4L : inexact-ok
|
||||
+= cos upward ldbl-128 0x1.200145a975ce6p+32L : -0x6.568e7ed3dffcdfe227fd726840e4p-4L : inexact-ok
|
||||
+= cos downward ldbl-128ibm 0x1.200145a975ce6p+32L : -0x6.568e7ed3dffcdfe227fd726842p-4L : inexact-ok
|
||||
+= cos tonearest ldbl-128ibm 0x1.200145a975ce6p+32L : -0x6.568e7ed3dffcdfe227fd72684p-4L : inexact-ok
|
||||
+= cos towardzero ldbl-128ibm 0x1.200145a975ce6p+32L : -0x6.568e7ed3dffcdfe227fd72684p-4L : inexact-ok
|
||||
+= cos upward ldbl-128ibm 0x1.200145a975ce6p+32L : -0x6.568e7ed3dffcdfe227fd72684p-4L : inexact-ok
|
||||
cos 1
|
||||
= cos downward flt-32 0x1p+0f : 0x8.a514p-4f : inexact-ok
|
||||
= cos tonearest flt-32 0x1p+0f : 0x8.a514p-4f : inexact-ok
|
||||
@@ -157744,6 +157813,75 @@ sin 10
|
||||
= sin tonearest ldbl-128ibm 0xap+0L : -0x8.b44f7af9a7a92ce7fb22be025p-4L : inexact-ok
|
||||
= sin towardzero ldbl-128ibm 0xap+0L : -0x8.b44f7af9a7a92ce7fb22be024cp-4L : inexact-ok
|
||||
= sin upward ldbl-128ibm 0xap+0L : -0x8.b44f7af9a7a92ce7fb22be024cp-4L : inexact-ok
|
||||
+sin 0x1.2001469775ce6p32
|
||||
+= sin downward flt-32 0x1.200148p+32f : -0x5.595d8p-4f : inexact-ok
|
||||
+= sin tonearest flt-32 0x1.200148p+32f : -0x5.595d8p-4f : inexact-ok
|
||||
+= sin towardzero flt-32 0x1.200148p+32f : -0x5.595d78p-4f : inexact-ok
|
||||
+= sin upward flt-32 0x1.200148p+32f : -0x5.595d78p-4f : inexact-ok
|
||||
+= sin downward dbl-64 0x1.200148p+32 : -0x5.595d7e536fe38p-4 : inexact-ok
|
||||
+= sin tonearest dbl-64 0x1.200148p+32 : -0x5.595d7e536fe34p-4 : inexact-ok
|
||||
+= sin towardzero dbl-64 0x1.200148p+32 : -0x5.595d7e536fe34p-4 : inexact-ok
|
||||
+= sin upward dbl-64 0x1.200148p+32 : -0x5.595d7e536fe34p-4 : inexact-ok
|
||||
+= sin downward ldbl-96-intel 0x1.200148p+32L : -0x5.595d7e536fe35eep-4L : inexact-ok
|
||||
+= sin tonearest ldbl-96-intel 0x1.200148p+32L : -0x5.595d7e536fe35ed8p-4L : inexact-ok
|
||||
+= sin towardzero ldbl-96-intel 0x1.200148p+32L : -0x5.595d7e536fe35ed8p-4L : inexact-ok
|
||||
+= sin upward ldbl-96-intel 0x1.200148p+32L : -0x5.595d7e536fe35ed8p-4L : inexact-ok
|
||||
+= sin downward ldbl-96-m68k 0x1.200148p+32L : -0x5.595d7e536fe35eep-4L : inexact-ok
|
||||
+= sin tonearest ldbl-96-m68k 0x1.200148p+32L : -0x5.595d7e536fe35ed8p-4L : inexact-ok
|
||||
+= sin towardzero ldbl-96-m68k 0x1.200148p+32L : -0x5.595d7e536fe35ed8p-4L : inexact-ok
|
||||
+= sin upward ldbl-96-m68k 0x1.200148p+32L : -0x5.595d7e536fe35ed8p-4L : inexact-ok
|
||||
+= sin downward ldbl-128 0x1.200148p+32L : -0x5.595d7e536fe35edbe2ad0df9d944p-4L : inexact-ok
|
||||
+= sin tonearest ldbl-128 0x1.200148p+32L : -0x5.595d7e536fe35edbe2ad0df9d94p-4L : inexact-ok
|
||||
+= sin towardzero ldbl-128 0x1.200148p+32L : -0x5.595d7e536fe35edbe2ad0df9d94p-4L : inexact-ok
|
||||
+= sin upward ldbl-128 0x1.200148p+32L : -0x5.595d7e536fe35edbe2ad0df9d94p-4L : inexact-ok
|
||||
+= sin downward ldbl-128ibm 0x1.200148p+32L : -0x5.595d7e536fe35edbe2ad0df9dap-4L : inexact-ok
|
||||
+= sin tonearest ldbl-128ibm 0x1.200148p+32L : -0x5.595d7e536fe35edbe2ad0df9dap-4L : inexact-ok
|
||||
+= sin towardzero ldbl-128ibm 0x1.200148p+32L : -0x5.595d7e536fe35edbe2ad0df9d8p-4L : inexact-ok
|
||||
+= sin upward ldbl-128ibm 0x1.200148p+32L : -0x5.595d7e536fe35edbe2ad0df9d8p-4L : inexact-ok
|
||||
+= sin downward flt-32 0x1.200146p+32f : 0x4.220ffp-4f : inexact-ok
|
||||
+= sin tonearest flt-32 0x1.200146p+32f : 0x4.220ffp-4f : inexact-ok
|
||||
+= sin towardzero flt-32 0x1.200146p+32f : 0x4.220ffp-4f : inexact-ok
|
||||
+= sin upward flt-32 0x1.200146p+32f : 0x4.220ff8p-4f : inexact-ok
|
||||
+= sin downward dbl-64 0x1.200146p+32 : 0x4.220ff25f5cfp-4 : inexact-ok
|
||||
+= sin tonearest dbl-64 0x1.200146p+32 : 0x4.220ff25f5cf04p-4 : inexact-ok
|
||||
+= sin towardzero dbl-64 0x1.200146p+32 : 0x4.220ff25f5cfp-4 : inexact-ok
|
||||
+= sin upward dbl-64 0x1.200146p+32 : 0x4.220ff25f5cf04p-4 : inexact-ok
|
||||
+= sin downward ldbl-96-intel 0x1.200146p+32L : 0x4.220ff25f5cf02a4p-4L : inexact-ok
|
||||
+= sin tonearest ldbl-96-intel 0x1.200146p+32L : 0x4.220ff25f5cf02a48p-4L : inexact-ok
|
||||
+= sin towardzero ldbl-96-intel 0x1.200146p+32L : 0x4.220ff25f5cf02a4p-4L : inexact-ok
|
||||
+= sin upward ldbl-96-intel 0x1.200146p+32L : 0x4.220ff25f5cf02a48p-4L : inexact-ok
|
||||
+= sin downward ldbl-96-m68k 0x1.200146p+32L : 0x4.220ff25f5cf02a4p-4L : inexact-ok
|
||||
+= sin tonearest ldbl-96-m68k 0x1.200146p+32L : 0x4.220ff25f5cf02a48p-4L : inexact-ok
|
||||
+= sin towardzero ldbl-96-m68k 0x1.200146p+32L : 0x4.220ff25f5cf02a4p-4L : inexact-ok
|
||||
+= sin upward ldbl-96-m68k 0x1.200146p+32L : 0x4.220ff25f5cf02a48p-4L : inexact-ok
|
||||
+= sin downward ldbl-128 0x1.200146p+32L : 0x4.220ff25f5cf02a464dbb3a679ccp-4L : inexact-ok
|
||||
+= sin tonearest ldbl-128 0x1.200146p+32L : 0x4.220ff25f5cf02a464dbb3a679ccp-4L : inexact-ok
|
||||
+= sin towardzero ldbl-128 0x1.200146p+32L : 0x4.220ff25f5cf02a464dbb3a679ccp-4L : inexact-ok
|
||||
+= sin upward ldbl-128 0x1.200146p+32L : 0x4.220ff25f5cf02a464dbb3a679cc4p-4L : inexact-ok
|
||||
+= sin downward ldbl-128ibm 0x1.200146p+32L : 0x4.220ff25f5cf02a464dbb3a679cp-4L : inexact-ok
|
||||
+= sin tonearest ldbl-128ibm 0x1.200146p+32L : 0x4.220ff25f5cf02a464dbb3a679cp-4L : inexact-ok
|
||||
+= sin towardzero ldbl-128ibm 0x1.200146p+32L : 0x4.220ff25f5cf02a464dbb3a679cp-4L : inexact-ok
|
||||
+= sin upward ldbl-128ibm 0x1.200146p+32L : 0x4.220ff25f5cf02a464dbb3a679ep-4L : inexact-ok
|
||||
+= sin downward dbl-64 0x1.2001469775ce6p+32 : -0x6.444fda50019fcp-4 : inexact-ok
|
||||
+= sin tonearest dbl-64 0x1.2001469775ce6p+32 : -0x6.444fda50019f8p-4 : inexact-ok
|
||||
+= sin towardzero dbl-64 0x1.2001469775ce6p+32 : -0x6.444fda50019f8p-4 : inexact-ok
|
||||
+= sin upward dbl-64 0x1.2001469775ce6p+32 : -0x6.444fda50019f8p-4 : inexact-ok
|
||||
+= sin downward ldbl-96-intel 0x1.2001469775ce6p+32L : -0x6.444fda50019f9f6p-4L : inexact-ok
|
||||
+= sin tonearest ldbl-96-intel 0x1.2001469775ce6p+32L : -0x6.444fda50019f9f58p-4L : inexact-ok
|
||||
+= sin towardzero ldbl-96-intel 0x1.2001469775ce6p+32L : -0x6.444fda50019f9f58p-4L : inexact-ok
|
||||
+= sin upward ldbl-96-intel 0x1.2001469775ce6p+32L : -0x6.444fda50019f9f58p-4L : inexact-ok
|
||||
+= sin downward ldbl-96-m68k 0x1.2001469775ce6p+32L : -0x6.444fda50019f9f6p-4L : inexact-ok
|
||||
+= sin tonearest ldbl-96-m68k 0x1.2001469775ce6p+32L : -0x6.444fda50019f9f58p-4L : inexact-ok
|
||||
+= sin towardzero ldbl-96-m68k 0x1.2001469775ce6p+32L : -0x6.444fda50019f9f58p-4L : inexact-ok
|
||||
+= sin upward ldbl-96-m68k 0x1.2001469775ce6p+32L : -0x6.444fda50019f9f58p-4L : inexact-ok
|
||||
+= sin downward ldbl-128 0x1.2001469775ce6p+32L : -0x6.444fda50019f9f5ba3779ca70604p-4L : inexact-ok
|
||||
+= sin tonearest ldbl-128 0x1.2001469775ce6p+32L : -0x6.444fda50019f9f5ba3779ca706p-4L : inexact-ok
|
||||
+= sin towardzero ldbl-128 0x1.2001469775ce6p+32L : -0x6.444fda50019f9f5ba3779ca706p-4L : inexact-ok
|
||||
+= sin upward ldbl-128 0x1.2001469775ce6p+32L : -0x6.444fda50019f9f5ba3779ca706p-4L : inexact-ok
|
||||
+= sin downward ldbl-128ibm 0x1.2001469775ce6p+32L : -0x6.444fda50019f9f5ba3779ca708p-4L : inexact-ok
|
||||
+= sin tonearest ldbl-128ibm 0x1.2001469775ce6p+32L : -0x6.444fda50019f9f5ba3779ca706p-4L : inexact-ok
|
||||
+= sin towardzero ldbl-128ibm 0x1.2001469775ce6p+32L : -0x6.444fda50019f9f5ba3779ca706p-4L : inexact-ok
|
||||
+= sin upward ldbl-128ibm 0x1.2001469775ce6p+32L : -0x6.444fda50019f9f5ba3779ca706p-4L : inexact-ok
|
||||
sincos 0
|
||||
= sincos downward flt-32 0x0p+0f : 0x0p+0f 0x1p+0f : inexact-ok
|
||||
= sincos tonearest flt-32 0x0p+0f : 0x0p+0f 0x1p+0f : inexact-ok
|
||||
diff --git a/sysdeps/ieee754/dbl-64/s_sin.c b/sysdeps/ieee754/dbl-64/s_sin.c
|
||||
index 6105e9f..50109b8 100644
|
||||
--- a/sysdeps/ieee754/dbl-64/s_sin.c
|
||||
+++ b/sysdeps/ieee754/dbl-64/s_sin.c
|
||||
@@ -447,19 +447,21 @@ __sin (double x)
|
||||
}
|
||||
else
|
||||
{
|
||||
+ double t;
|
||||
if (a > 0)
|
||||
{
|
||||
m = 1;
|
||||
+ t = a;
|
||||
db = da;
|
||||
}
|
||||
else
|
||||
{
|
||||
m = 0;
|
||||
- a = -a;
|
||||
+ t = -a;
|
||||
db = -da;
|
||||
}
|
||||
- u.x = big + a;
|
||||
- y = a - (u.x - big);
|
||||
+ u.x = big + t;
|
||||
+ y = t - (u.x - big);
|
||||
res = do_sin (u, y, db, &cor);
|
||||
cor = (cor > 0) ? 1.035 * cor + eps : 1.035 * cor - eps;
|
||||
retval = ((res == res + cor) ? ((m) ? res : -res)
|
||||
@@ -671,19 +673,21 @@ __cos (double x)
|
||||
}
|
||||
else
|
||||
{
|
||||
+ double t;
|
||||
if (a > 0)
|
||||
{
|
||||
m = 1;
|
||||
+ t = a;
|
||||
db = da;
|
||||
}
|
||||
else
|
||||
{
|
||||
m = 0;
|
||||
- a = -a;
|
||||
+ t = -a;
|
||||
db = -da;
|
||||
}
|
||||
- u.x = big + a;
|
||||
- y = a - (u.x - big);
|
||||
+ u.x = big + t;
|
||||
+ y = t - (u.x - big);
|
||||
res = do_sin (u, y, db, &cor);
|
||||
cor = (cor > 0) ? 1.035 * cor + eps : 1.035 * cor - eps;
|
||||
retval = ((res == res + cor) ? ((m) ? res : -res)
|
||||
diff --git a/sysdeps/x86_64/fpu/libm-test-ulps b/sysdeps/x86_64/fpu/libm-test-ulps
|
||||
index f3980f8..544f1c7 100644
|
||||
--- a/sysdeps/x86_64/fpu/libm-test-ulps
|
||||
+++ b/sysdeps/x86_64/fpu/libm-test-ulps
|
||||
@@ -10900,6 +10900,14 @@ idouble: 1
|
||||
Test "cos_downward (0x1.0c152382d7365p+0)":
|
||||
double: 1
|
||||
idouble: 1
|
||||
+Test "cos_downward (0x1.200145a975ce6p+32)":
|
||||
+double: 1
|
||||
+idouble: 1
|
||||
+ildouble: 1
|
||||
+ldouble: 1
|
||||
+Test "cos_downward (0x1.200146p+32)":
|
||||
+ildouble: 1
|
||||
+ldouble: 1
|
||||
Test "cos_downward (0x1.921fb4p+0)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
@@ -11126,6 +11134,9 @@ idouble: 1
|
||||
Test "cos_towardzero (0x1.0c152382d7365p+0)":
|
||||
double: 1
|
||||
idouble: 1
|
||||
+Test "cos_towardzero (0x1.200146p+32)":
|
||||
+double: 1
|
||||
+idouble: 1
|
||||
Test "cos_towardzero (0x1.921fb4p+0)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
@@ -11258,6 +11269,17 @@ idouble: 1
|
||||
Test "cos_upward (0x1.0c1524p+0)":
|
||||
double: 1
|
||||
idouble: 1
|
||||
+Test "cos_upward (0x1.200144p+32)":
|
||||
+double: 1
|
||||
+idouble: 1
|
||||
+Test "cos_upward (0x1.200145a975ce6p+32)":
|
||||
+ildouble: 1
|
||||
+ldouble: 1
|
||||
+Test "cos_upward (0x1.200146p+32)":
|
||||
+double: 1
|
||||
+idouble: 1
|
||||
+ildouble: 1
|
||||
+ldouble: 1
|
||||
Test "cos_upward (0x1.921fb4p+0)":
|
||||
double: 1
|
||||
idouble: 1
|
||||
@@ -15155,6 +15177,19 @@ double: 1
|
||||
idouble: 1
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
+Test "sin_downward (0x1.2001469775ce6p+32)":
|
||||
+double: 1
|
||||
+idouble: 1
|
||||
+ildouble: 1
|
||||
+ldouble: 1
|
||||
+Test "sin_downward (0x1.200146p+32)":
|
||||
+double: 1
|
||||
+idouble: 1
|
||||
+Test "sin_downward (0x1.200148p+32)":
|
||||
+double: 1
|
||||
+idouble: 1
|
||||
+ildouble: 1
|
||||
+ldouble: 1
|
||||
Test "sin_downward (0x1.921fb54442d18468p+0)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
@@ -15383,6 +15418,9 @@ double: 1
|
||||
idouble: 1
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
+Test "sin_towardzero (0x1.200146p+32)":
|
||||
+double: 1
|
||||
+idouble: 1
|
||||
Test "sin_towardzero (0x1.921fb54442d18468p+0)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
@@ -15532,6 +15570,12 @@ ldouble: 1
|
||||
Test "sin_upward (-0x8.60a92p-4)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
+Test "sin_upward (0x1.2001469775ce6p+32)":
|
||||
+ildouble: 1
|
||||
+ldouble: 1
|
||||
+Test "sin_upward (0x1.200148p+32)":
|
||||
+ildouble: 1
|
||||
+ldouble: 1
|
||||
Test "sin_upward (0x1.921fb4p+0)":
|
||||
double: 1
|
||||
idouble: 1
|
Loading…
Reference in a new issue