Skip to content

Commit

Permalink
Make INV_2PI a tuple
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Keno committed Jan 22, 2022
1 parent f10176c commit 3449a16
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions base/special/rem_pio2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# @printf "0x%016x,\n" k
# I -= k
# end
const INV_2PI = UInt64[
const INV_2PI = (
0x28be_60db_9391_054a,
0x7f09_d5f4_7d4d_3770,
0x36d8_a566_4f10_e410,
Expand All @@ -42,7 +42,7 @@ const INV_2PI = UInt64[
0x5d49_eeb1_faf9_7c5e,
0xcf41_ce7d_e294_a4ba,
0x9afe_d7ec_47e3_5742,
0x1580_cc11_bf1e_daea]
0x1580_cc11_bf1e_daea)

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

0 comments on commit 3449a16

Please sign in to comment.