From 6063b1faff64530238a7229cf6f631fc9de73154 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Sat, 28 Jul 2018 07:10:08 -0700 Subject: [PATCH 1/2] Utilize precompilable bigints https://github.com/JuliaLang/julia/pull/28296#event-1757754127 --- src/tableaus.jl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/tableaus.jl b/src/tableaus.jl index 475f22748..7002fb841 100644 --- a/src/tableaus.jl +++ b/src/tableaus.jl @@ -594,10 +594,10 @@ function SKenCarpTableau(T,T2) # bhat2 = -T(10771552573575//22201958757719) # bhat3 = T(9247589265047//10645013368117) # bhat4 = T(2193209047091//5459859503100) - btilde1 = T(parse(BigInt,"681815649026867975666107")//parse(BigInt,"25159934323302256049469295")) # bhat1-a41 - btilde2 = T(parse(BigInt,"18411887981491912264464127")//parse(BigInt,"167175311446532472108584143")) # bhat2-a42 - btilde3 = T(parse(BigInt,"-12719313754959329011138489")//parse(BigInt,"123410692144842870217698057")) # bhat3-a43 - btilde4 = T(parse(BigInt,"-47289384293135913063989")//parse(BigInt,"1383962894467812063558225")) # bhat4-γ + btilde1 = T(681815649026867975666107//25159934323302256049469295) # bhat1-a41 + btilde2 = T(18411887981491912264464127//167175311446532472108584143) # bhat2-a42 + btilde3 = T(-12719313754959329011138489//123410692144842870217698057) # bhat3-a43 + btilde4 = T(-47289384293135913063989//1383962894467812063558225) # bhat4-γ c3 = T2(3//5) c2 = 2γ θ = c3/c2 @@ -618,10 +618,10 @@ function SKenCarpTableau(T,T2) eb2 = T(-4482444167858//7529755066697 ) eb3 = T(11266239266428//11593286722821) eb4 = T(1767732205903//4055673282236) - ebtilde1 = T(parse(BigInt,"681815649026867975666107")//parse(BigInt,"25159934323302256049469295")) - ebtilde2 = T(parse(BigInt,"18411887981491912264464127")//parse(BigInt,"167175311446532472108584143")) - ebtilde3 = -T(parse(BigInt,"12719313754959329011138489")//parse(BigInt,"123410692144842870217698057")) - ebtilde4 = -T(parse(BigInt,"47289384293135913063989")//parse(BigInt,"1383962894467812063558225")) + ebtilde1 = T(681815649026867975666107//25159934323302256049469295) + ebtilde2 = T(18411887981491912264464127//167175311446532472108584143) + ebtilde3 = -T(12719313754959329011138489//123410692144842870217698057) + ebtilde4 = -T(47289384293135913063989//1383962894467812063558225) # Noise Tableau From 54b76cf07c184360ed17c52badf04a784ae2199b Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Sat, 28 Jul 2018 07:15:22 -0700 Subject: [PATCH 2/2] fix possible rational overflow behavior --- src/tableaus.jl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/tableaus.jl b/src/tableaus.jl index 7002fb841..510e5a1d3 100644 --- a/src/tableaus.jl +++ b/src/tableaus.jl @@ -594,10 +594,10 @@ function SKenCarpTableau(T,T2) # bhat2 = -T(10771552573575//22201958757719) # bhat3 = T(9247589265047//10645013368117) # bhat4 = T(2193209047091//5459859503100) - btilde1 = T(681815649026867975666107//25159934323302256049469295) # bhat1-a41 - btilde2 = T(18411887981491912264464127//167175311446532472108584143) # bhat2-a42 - btilde3 = T(-12719313754959329011138489//123410692144842870217698057) # bhat3-a43 - btilde4 = T(-47289384293135913063989//1383962894467812063558225) # bhat4-γ + btilde1 = T(BigInt(681815649026867975666107)//BigInt(25159934323302256049469295)) # bhat1-a41 + btilde2 = T(BigInt(18411887981491912264464127)//BigInt(167175311446532472108584143)) # bhat2-a42 + btilde3 = T(BigInt(-12719313754959329011138489)//BigInt(123410692144842870217698057)) # bhat3-a43 + btilde4 = T(BigInt(-47289384293135913063989)//BigInt(1383962894467812063558225)) # bhat4-γ c3 = T2(3//5) c2 = 2γ θ = c3/c2 @@ -618,10 +618,10 @@ function SKenCarpTableau(T,T2) eb2 = T(-4482444167858//7529755066697 ) eb3 = T(11266239266428//11593286722821) eb4 = T(1767732205903//4055673282236) - ebtilde1 = T(681815649026867975666107//25159934323302256049469295) - ebtilde2 = T(18411887981491912264464127//167175311446532472108584143) - ebtilde3 = -T(12719313754959329011138489//123410692144842870217698057) - ebtilde4 = -T(47289384293135913063989//1383962894467812063558225) + ebtilde1 = T(BigInt(681815649026867975666107)//BigInt(25159934323302256049469295)) + ebtilde2 = T(BigInt(18411887981491912264464127)//BigInt(167175311446532472108584143)) + ebtilde3 = -T(BigInt(12719313754959329011138489)//BigInt(123410692144842870217698057)) + ebtilde4 = -T(BigInt(47289384293135913063989)//BigInt(1383962894467812063558225)) # Noise Tableau