Skip to content

Commit 3449a16

Browse files
committed
Make INV_2PI a tuple
Without this, the compiler cannot assume that the range reduction is idempotent to make use of the new fast constprop code path. In the future this could potentially be an ImmutableArray, but since this is relatively small, a tuple is probably fine.
1 parent f10176c commit 3449a16

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

base/special/rem_pio2.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# @printf "0x%016x,\n" k
2424
# I -= k
2525
# end
26-
const INV_2PI = UInt64[
26+
const INV_2PI = (
2727
0x28be_60db_9391_054a,
2828
0x7f09_d5f4_7d4d_3770,
2929
0x36d8_a566_4f10_e410,
@@ -42,7 +42,7 @@ const INV_2PI = UInt64[
4242
0x5d49_eeb1_faf9_7c5e,
4343
0xcf41_ce7d_e294_a4ba,
4444
0x9afe_d7ec_47e3_5742,
45-
0x1580_cc11_bf1e_daea]
45+
0x1580_cc11_bf1e_daea)
4646

4747
@inline function cody_waite_2c_pio2(x::Float64, fn, n)
4848
pio2_1 = 1.57079632673412561417e+00

0 commit comments

Comments
 (0)