wok-4.x view glibc/stuff/glibc-2.19-fix-sign-in-bsloww1-input.patch @ rev 12466

New toolchain GCC 4.9.2, Glibc 2.19, Binutils 2.23.1
author Stanislas Leduc <shann@slitaz.org>
date Wed Nov 09 15:12:00 2022 +0000 (18 months ago)
parents
children
line source
2 From ffe768a90912f9bce43b70a82576b3dc99e3121c Mon Sep 17 00:00:00 2001
3 From: Siddhesh Poyarekar <siddhesh@redhat.com>
4 Date: Thu, 27 Feb 2014 21:29:16 +0530
5 Subject: [PATCH] Fix sign of input to bsloww1 (BZ #16623)
7 In 84ba214c, I removed some redundant sign computations and in the
8 process, I incorrectly got rid of a temporary variable, thus passing
9 the absolute value of the input to bsloww1. This caused #16623.
11 This fix undoes the incorrect change.
12 ---
13 sysdeps/ieee754/dbl-64/s_sin.c | 16 ++++++++++------
14 3 files changed, 18 insertions(+), 7 deletions(-)
16 diff --git a/sysdeps/ieee754/dbl-64/s_sin.c b/sysdeps/ieee754/dbl-64/s_sin.c
17 index 6105e9f..50109b8 100644
18 --- a/sysdeps/ieee754/dbl-64/s_sin.c
19 +++ b/sysdeps/ieee754/dbl-64/s_sin.c
20 @@ -447,19 +447,21 @@ __sin (double x)
21 }
22 else
23 {
24 + double t;
25 if (a > 0)
26 {
27 m = 1;
28 + t = a;
29 db = da;
30 }
31 else
32 {
33 m = 0;
34 - a = -a;
35 + t = -a;
36 db = -da;
37 }
38 - u.x = big + a;
39 - y = a - (u.x - big);
40 + u.x = big + t;
41 + y = t - (u.x - big);
42 res = do_sin (u, y, db, &cor);
43 cor = (cor > 0) ? 1.035 * cor + eps : 1.035 * cor - eps;
44 retval = ((res == res + cor) ? ((m) ? res : -res)
45 @@ -671,19 +673,21 @@ __cos (double x)
46 }
47 else
48 {
49 + double t;
50 if (a > 0)
51 {
52 m = 1;
53 + t = a;
54 db = da;
55 }
56 else
57 {
58 m = 0;
59 - a = -a;
60 + t = -a;
61 db = -da;
62 }
63 - u.x = big + a;
64 - y = a - (u.x - big);
65 + u.x = big + t;
66 + y = t - (u.x - big);
67 res = do_sin (u, y, db, &cor);
68 cor = (cor > 0) ? 1.035 * cor + eps : 1.035 * cor - eps;
69 retval = ((res == res + cor) ? ((m) ? res : -res)
70 --
71 1.9.0