summaryrefslogtreecommitdiff
path: root/lib/math
diff options
context:
space:
mode:
authorS. Gilles <sgilles@math.umd.edu>2018-06-28 11:33:53 -0400
committerS. Gilles <sgilles@math.umd.edu>2018-06-28 11:33:56 -0400
commit0843b337e2c2f96bde753090304e1a918b03d73f (patch)
tree43a0ce0e43c9e3b777171a7b8dd3fcde68d799f9 /lib/math
parentc57f69776103121107ad70d86a7b0efbc2553daa (diff)
downloadmc-0843b337e2c2f96bde753090304e1a918b03d73f.tar.gz
Fix bi/ci calculation in reduction.
Diffstat (limited to 'lib/math')
-rw-r--r--lib/math/sin-impl.myr6
-rw-r--r--lib/math/test/sin-impl.myr1
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/math/sin-impl.myr b/lib/math/sin-impl.myr
index f9feb97..ed91888 100644
--- a/lib/math/sin-impl.myr
+++ b/lib/math/sin-impl.myr
@@ -681,9 +681,9 @@ const huge_reduce_2pi = {x : flt64
xc = 0.0
else
(u1, u2, u3) = R[j - 2]
- b1 = std.flt64frombits(u1)
- b2 = std.flt64frombits(u2)
- b3 = std.flt64frombits(u3)
+ c1 = std.flt64frombits(u1)
+ c2 = std.flt64frombits(u2)
+ c3 = std.flt64frombits(u3)
var e3 : int64 = 50*(j - 2 : int64) + 25
var xlo = std.flt64frombits(b & ((~0) << (52 + (e3 - e : uint64))))
xc = scale2(xlo, -e3)
diff --git a/lib/math/test/sin-impl.myr b/lib/math/test/sin-impl.myr
index 2ba361c..398da48 100644
--- a/lib/math/test/sin-impl.myr
+++ b/lib/math/test/sin-impl.myr
@@ -71,6 +71,7 @@ const sincos02 = {c
var inputs : (uint64, uint64, uint64)[:] = [
(0x0000000000000000, 0x0000000000000000, 0x3ff0000000000000),
(0x4100000000000000, 0xbfeff8bd7b10d6b0, 0x3fa58ced65ec8b50),
+ (0x4b01000000000000, 0xbfe3e9527dc75f12, 0x3fe90cf80997c963),
][:]
for (x, ys, yc) : inputs