diff --git a/src/U_polynomials.jl b/src/U_polynomials.jl index 25d8689..544677a 100644 --- a/src/U_polynomials.jl +++ b/src/U_polynomials.jl @@ -136,88 +136,94 @@ Uk_poly_Hankel(p, v, p2, x) = Uk_poly_Jn(p, v, p2, x) ##### function Uk_poly5(p, v, p2) - u0 = 1.0 - u1 = evalpoly(p2, (0.125, -0.20833333333333334)) - u2 = evalpoly(p2, (0.0703125, -0.4010416666666667, 0.3342013888888889)) - u3 = evalpoly(p2, (0.0732421875, -0.8912109375, 1.8464626736111112, -1.0258125964506173)) - u4 = evalpoly(p2, (0.112152099609375, -2.3640869140625, 8.78912353515625, -11.207002616222994, 4.669584423426247)) - u5 = evalpoly(p2, (0.22710800170898438, -7.368794359479632, 42.53499874538846, -91.81824154324002, 84.63621767460073, -28.212072558200244)) - - Poly = (u0, u1, u2, u3, u4, u5) + Poly = Uk_poly5(p2) return split_evalpoly(-p/v, Poly) end - -function Uk_poly10(p, v, p2) - u0 = 1.0 - u1 = evalpoly(p2, (0.125, -0.20833333333333334)) - u2 = evalpoly(p2, (0.0703125, -0.4010416666666667, 0.3342013888888889)) - u3 = evalpoly(p2, (0.0732421875, -0.8912109375, 1.8464626736111112, -1.0258125964506173)) - u4 = evalpoly(p2, (0.112152099609375, -2.3640869140625, 8.78912353515625, -11.207002616222994, 4.669584423426247)) +function Uk_poly5(p2) u5 = evalpoly(p2, (0.22710800170898438, -7.368794359479632, 42.53499874538846, -91.81824154324002, 84.63621767460073, -28.212072558200244)) - u6 = evalpoly(p2, (0.5725014209747314, -26.491430486951554, 218.1905117442116, -699.5796273761325, 1059.9904525279999, -765.2524681411817, 212.57013003921713)) - u7 = evalpoly(p2, (1.7277275025844574, -108.09091978839466, 1200.9029132163525, -5305.646978613403, 11655.393336864534, -13586.550006434136, 8061.722181737309, -1919.457662318407)) - u8 = evalpoly(p2, (6.074042001273483, -493.91530477308805, 7109.514302489364, -41192.65496889755, 122200.46498301747, -203400.17728041555, 192547.00123253153, -96980.59838863752, 20204.29133096615)) - u9 = evalpoly(p2, (24.380529699556064, -2499.8304818112097, 45218.76898136273, -331645.17248456355, 1.2683652733216248e6, -2.8135632265865337e6, 3.763271297656404e6, -2.998015918538107e6, 1.3117636146629772e6, -242919.18790055133)) - u10 = evalpoly(p2, (110.01714026924674, -13886.08975371704, 308186.40461266245, -2.7856181280864547e6, 1.3288767166421818e7, -3.7567176660763346e7, 6.634451227472903e7, -7.410514821153265e7, 5.095260249266464e7, -1.9706819118432228e7, 3.284469853072038e6)) + u4 = evalpoly(p2, (0.112152099609375, -2.3640869140625, 8.78912353515625, -11.207002616222994, 4.669584423426247)) + u3 = evalpoly(p2, (0.0732421875, -0.8912109375, 1.8464626736111112, -1.0258125964506173)) + u2 = evalpoly(p2, (0.0703125, -0.4010416666666667, 0.3342013888888889)) + u1 = evalpoly(p2, (0.125, -0.20833333333333334)) + return (1.0, u1, u2, u3, u4, u5) +end - Poly = (u0, u1, u2, u3, u4, u5, u6, u7, u8, u9, u10) +function Uk_poly10(p, v, p2) + Poly = Uk_poly10(p2) return split_evalpoly(-p/v, Poly) end - -function Uk_poly20(p, v, p2) - u0 = 1.0 - u1 = evalpoly(p2, (0.125, -0.20833333333333334)) - u2 = evalpoly(p2, (0.0703125, -0.4010416666666667, 0.3342013888888889)) - u3 = evalpoly(p2, (0.0732421875, -0.8912109375, 1.8464626736111112, -1.0258125964506173)) - u4 = evalpoly(p2, (0.112152099609375, -2.3640869140625, 8.78912353515625, -11.207002616222994, 4.669584423426247)) - u5 = evalpoly(p2, (0.22710800170898438, -7.368794359479632, 42.53499874538846, -91.81824154324002, 84.63621767460073, -28.212072558200244)) - u6 = evalpoly(p2, (0.5725014209747314, -26.491430486951554, 218.1905117442116, -699.5796273761325, 1059.9904525279999, -765.2524681411817, 212.57013003921713)) - u7 = evalpoly(p2, (1.7277275025844574, -108.09091978839466, 1200.9029132163525, -5305.646978613403, 11655.393336864534, -13586.550006434136, 8061.722181737309, -1919.457662318407)) - u8 = evalpoly(p2, (6.074042001273483, -493.91530477308805, 7109.514302489364, -41192.65496889755, 122200.46498301747, -203400.17728041555, 192547.00123253153, -96980.59838863752, 20204.29133096615)) - u9 = evalpoly(p2, (24.380529699556064, -2499.8304818112097, 45218.76898136273, -331645.17248456355, 1.2683652733216248e6, -2.8135632265865337e6, 3.763271297656404e6, -2.998015918538107e6, 1.3117636146629772e6, -242919.18790055133)) +function Uk_poly10(p2) u10 = evalpoly(p2, (110.01714026924674, -13886.08975371704, 308186.40461266245, -2.7856181280864547e6, 1.3288767166421818e7, -3.7567176660763346e7, 6.634451227472903e7, -7.410514821153265e7, 5.095260249266464e7, -1.9706819118432228e7, 3.284469853072038e6)) - u11 = evalpoly(p2, (551.3358961220206, -84005.4336030241, 2.2437681779224495e6, -2.4474062725738727e7, 1.420629077975331e8, -4.9588978427503026e8, 1.1068428168230145e9, -1.6210805521083372e9, 1.5535968995705802e9, -9.394623596815784e8, 3.2557307418576574e8, -4.932925366450996e7)) - u12 = evalpoly(p2, (3038.090510922384, -549842.3275722887, 1.7395107553978164e7, -2.2510566188941526e8, 1.5592798648792574e9, -6.563293792619285e9, 1.79542137311556e10, -3.3026599749800724e10, 4.1280185579753975e10, -3.4632043388158775e10, 1.8688207509295826e10, -5.866481492051847e9, 8.147890961183121e8)) - u13 = evalpoly(p2, (18257.755474293175, -3.8718334425726123e6, 1.43157876718889e8, -2.167164983223795e9, 1.763473060683497e10, -8.786707217802327e10, 2.879006499061506e11, -6.453648692453765e11, 1.0081581068653821e12, -1.0983751560812233e12, 8.192186695485773e11, -3.990961752244665e11, 1.144982377320258e11, -1.4679261247695616e10)) - u14 = evalpoly(p2, (118838.42625678326, -2.9188388122220814e7, 1.2470092935127103e9, -2.1822927757529224e10, 2.0591450323241e11, -1.1965528801961816e12, 4.612725780849132e12, -1.2320491305598287e13, 2.334836404458184e13, -3.166708858478516e13, 3.056512551993532e13, -2.0516899410934438e13, 9.109341185239898e12, -2.406297900028504e12, 2.86464035717679e11)) - u15 = evalpoly(p2, (832859.3040162893, -2.3455796352225152e8, 1.1465754899448236e10, -2.2961937296824646e11, 2.4850009280340854e12, -1.663482472489248e13, 7.437312290867914e13, -2.3260483118893994e14, 5.230548825784446e14, -8.57461032982895e14, 1.0269551960827625e15, -8.894969398810265e14, 5.4273966498765975e14, -2.213496387025252e14, 5.417751075510605e13, -6.019723417234006e12)) - u16 = evalpoly(p2, (6.252951493434797e6, -2.0016469281917763e9, 1.1099740513917902e11, -2.5215584749128545e12, 3.100743647289646e13, -2.3665253045164925e14, 1.2126758042503475e15, -4.3793258383640155e15, 1.1486706978449752e16, -2.2268225133911144e16, 3.213827526858624e16, -3.4447226006485144e16, 2.705471130619708e16, -1.5129826322457682e16, 5.705782159023671e15, -1.3010127235496995e15, 1.3552215870309369e14)) - u17 = evalpoly(p2, (5.0069589531988926e7, -1.8078220384658062e10, 1.128709145410874e12, -2.886383763141476e13, 4.0004445704303625e14, -3.4503855118462725e15, 2.0064271476309532e16, -8.270945651585064e16, 2.4960365126160426e17, -5.62631788074636e17, 9.575335098169139e17, -1.2336116931960694e18, 1.1961991142756308e18, -8.592577980317548e17, 4.4347954614171904e17, -1.5552983504313904e17, 3.3192764720355224e16, -3.254192619642669e15)) - u18 = evalpoly(p2, (4.259392165047669e8, -1.722832387173505e11, 1.2030115826419191e13, -3.4396530474307594e14, 5.335106978708839e15, -5.1605093193485224e16, 3.37667624979061e17, -1.5736434765189599e18, 5.402894876715982e18, -1.3970803516443374e19, 2.757282981650519e19, -4.178861444656839e19, 4.859942729324836e19, -4.301555703831444e19, 2.846521225167657e19, -1.3639420410571592e19, 4.47020096401231e18, -8.966114215270463e17, 8.30195760673191e16)) - u19 = evalpoly(p2, (3.8362551802304335e9, -1.7277040123529995e12, 1.3412416915180639e14, -4.2619355104268985e15, 7.351663610930971e16, -7.921651119323832e17, 5.789887667664653e18, -3.025566598990372e19, 1.1707490535797259e20, -3.434621399768417e20, 7.756704953461136e20, -1.360203777284994e21, 1.8571089321463453e21, -1.9677247077053125e21, 1.6016898573693598e21, -9.824438427689858e20, 4.392792200888712e20, -1.351217503435996e20, 2.5563802960529236e19, -2.242438856186775e18)) - u20 = evalpoly(p2, (3.646840080706556e10, -1.818726203851104e13, 1.5613123930484672e15, -5.48403360388329e16, 1.0461721131134344e18, -1.2483700995047234e19, 1.0126774169536592e20, -5.8917941350694964e20, 2.548961114664972e21, -8.405915817108351e21, 2.1487414815055883e22, -4.302534303482379e22, 6.783661642951883e22, -8.423222750084323e22, 8.19433100543513e22, -6.173206302884415e22, 3.528435843903409e22, -1.4787743528433614e22, 4.285296082829494e21, -7.671943936729004e20, 6.393286613940837e19)) + u9 = evalpoly(p2, (24.380529699556064, -2499.8304818112097, 45218.76898136273, -331645.17248456355, 1.2683652733216248e6, -2.8135632265865337e6, 3.763271297656404e6, -2.998015918538107e6, 1.3117636146629772e6, -242919.18790055133)) + u8 = evalpoly(p2, (6.074042001273483, -493.91530477308805, 7109.514302489364, -41192.65496889755, 122200.46498301747, -203400.17728041555, 192547.00123253153, -96980.59838863752, 20204.29133096615)) + u7 = evalpoly(p2, (1.7277275025844574, -108.09091978839466, 1200.9029132163525, -5305.646978613403, 11655.393336864534, -13586.550006434136, 8061.722181737309, -1919.457662318407)) + u6 = evalpoly(p2, (0.5725014209747314, -26.491430486951554, 218.1905117442116, -699.5796273761325, 1059.9904525279999, -765.2524681411817, 212.57013003921713)) + u5 = evalpoly(p2, (0.22710800170898438, -7.368794359479632, 42.53499874538846, -91.81824154324002, 84.63621767460073, -28.212072558200244)) + u4 = evalpoly(p2, (0.112152099609375, -2.3640869140625, 8.78912353515625, -11.207002616222994, 4.669584423426247)) + u3 = evalpoly(p2, (0.0732421875, -0.8912109375, 1.8464626736111112, -1.0258125964506173)) + u2 = evalpoly(p2, (0.0703125, -0.4010416666666667, 0.3342013888888889)) + u1 = evalpoly(p2, (0.125, -0.20833333333333334)) + return (1.0, u1, u2, u3, u4, u5, u6, u7, u8, u9, u10) +end - Poly = (u0, u1, u2, u3, u4, u5, u6, u7, u8, u9, u10, u11, u12, u13, u14, u15, u16, u17, u18, u19, u20) +function Uk_poly20(p, v, p2) + Poly = Uk_poly20(p2) return split_evalpoly(-p/v, Poly) end +function Uk_poly20(p2) + u20 = evalpoly(p2, (3.646840080706556e10, -1.818726203851104e13, 1.5613123930484672e15, -5.48403360388329e16, 1.0461721131134344e18, -1.2483700995047234e19, 1.0126774169536592e20, -5.8917941350694964e20, 2.548961114664972e21, -8.405915817108351e21, 2.1487414815055883e22, -4.302534303482379e22, 6.783661642951883e22, -8.423222750084323e22, 8.19433100543513e22, -6.173206302884415e22, 3.528435843903409e22, -1.4787743528433614e22, 4.285296082829494e21, -7.671943936729004e20, 6.393286613940837e19)) + u19 = evalpoly(p2, (3.8362551802304335e9, -1.7277040123529995e12, 1.3412416915180639e14, -4.2619355104268985e15, 7.351663610930971e16, -7.921651119323832e17, 5.789887667664653e18, -3.025566598990372e19, 1.1707490535797259e20, -3.434621399768417e20, 7.756704953461136e20, -1.360203777284994e21, 1.8571089321463453e21, -1.9677247077053125e21, 1.6016898573693598e21, -9.824438427689858e20, 4.392792200888712e20, -1.351217503435996e20, 2.5563802960529236e19, -2.242438856186775e18)) + u18 = evalpoly(p2, (4.259392165047669e8, -1.722832387173505e11, 1.2030115826419191e13, -3.4396530474307594e14, 5.335106978708839e15, -5.1605093193485224e16, 3.37667624979061e17, -1.5736434765189599e18, 5.402894876715982e18, -1.3970803516443374e19, 2.757282981650519e19, -4.178861444656839e19, 4.859942729324836e19, -4.301555703831444e19, 2.846521225167657e19, -1.3639420410571592e19, 4.47020096401231e18, -8.966114215270463e17, 8.30195760673191e16)) + u17 = evalpoly(p2, (5.0069589531988926e7, -1.8078220384658062e10, 1.128709145410874e12, -2.886383763141476e13, 4.0004445704303625e14, -3.4503855118462725e15, 2.0064271476309532e16, -8.270945651585064e16, 2.4960365126160426e17, -5.62631788074636e17, 9.575335098169139e17, -1.2336116931960694e18, 1.1961991142756308e18, -8.592577980317548e17, 4.4347954614171904e17, -1.5552983504313904e17, 3.3192764720355224e16, -3.254192619642669e15)) + u16 = evalpoly(p2, (6.252951493434797e6, -2.0016469281917763e9, 1.1099740513917902e11, -2.5215584749128545e12, 3.100743647289646e13, -2.3665253045164925e14, 1.2126758042503475e15, -4.3793258383640155e15, 1.1486706978449752e16, -2.2268225133911144e16, 3.213827526858624e16, -3.4447226006485144e16, 2.705471130619708e16, -1.5129826322457682e16, 5.705782159023671e15, -1.3010127235496995e15, 1.3552215870309369e14)) + u15 = evalpoly(p2, (832859.3040162893, -2.3455796352225152e8, 1.1465754899448236e10, -2.2961937296824646e11, 2.4850009280340854e12, -1.663482472489248e13, 7.437312290867914e13, -2.3260483118893994e14, 5.230548825784446e14, -8.57461032982895e14, 1.0269551960827625e15, -8.894969398810265e14, 5.4273966498765975e14, -2.213496387025252e14, 5.417751075510605e13, -6.019723417234006e12)) + u14 = evalpoly(p2, (118838.42625678326, -2.9188388122220814e7, 1.2470092935127103e9, -2.1822927757529224e10, 2.0591450323241e11, -1.1965528801961816e12, 4.612725780849132e12, -1.2320491305598287e13, 2.334836404458184e13, -3.166708858478516e13, 3.056512551993532e13, -2.0516899410934438e13, 9.109341185239898e12, -2.406297900028504e12, 2.86464035717679e11)) + u13 = evalpoly(p2, (18257.755474293175, -3.8718334425726123e6, 1.43157876718889e8, -2.167164983223795e9, 1.763473060683497e10, -8.786707217802327e10, 2.879006499061506e11, -6.453648692453765e11, 1.0081581068653821e12, -1.0983751560812233e12, 8.192186695485773e11, -3.990961752244665e11, 1.144982377320258e11, -1.4679261247695616e10)) + u12 = evalpoly(p2, (3038.090510922384, -549842.3275722887, 1.7395107553978164e7, -2.2510566188941526e8, 1.5592798648792574e9, -6.563293792619285e9, 1.79542137311556e10, -3.3026599749800724e10, 4.1280185579753975e10, -3.4632043388158775e10, 1.8688207509295826e10, -5.866481492051847e9, 8.147890961183121e8)) + u11 = evalpoly(p2, (551.3358961220206, -84005.4336030241, 2.2437681779224495e6, -2.4474062725738727e7, 1.420629077975331e8, -4.9588978427503026e8, 1.1068428168230145e9, -1.6210805521083372e9, 1.5535968995705802e9, -9.394623596815784e8, 3.2557307418576574e8, -4.932925366450996e7)) + u10 = evalpoly(p2, (110.01714026924674, -13886.08975371704, 308186.40461266245, -2.7856181280864547e6, 1.3288767166421818e7, -3.7567176660763346e7, 6.634451227472903e7, -7.410514821153265e7, 5.095260249266464e7, -1.9706819118432228e7, 3.284469853072038e6)) + u9 = evalpoly(p2, (24.380529699556064, -2499.8304818112097, 45218.76898136273, -331645.17248456355, 1.2683652733216248e6, -2.8135632265865337e6, 3.763271297656404e6, -2.998015918538107e6, 1.3117636146629772e6, -242919.18790055133)) + u8 = evalpoly(p2, (6.074042001273483, -493.91530477308805, 7109.514302489364, -41192.65496889755, 122200.46498301747, -203400.17728041555, 192547.00123253153, -96980.59838863752, 20204.29133096615)) + u7 = evalpoly(p2, (1.7277275025844574, -108.09091978839466, 1200.9029132163525, -5305.646978613403, 11655.393336864534, -13586.550006434136, 8061.722181737309, -1919.457662318407)) + u6 = evalpoly(p2, (0.5725014209747314, -26.491430486951554, 218.1905117442116, -699.5796273761325, 1059.9904525279999, -765.2524681411817, 212.57013003921713)) + u5 = evalpoly(p2, (0.22710800170898438, -7.368794359479632, 42.53499874538846, -91.81824154324002, 84.63621767460073, -28.212072558200244)) + u4 = evalpoly(p2, (0.112152099609375, -2.3640869140625, 8.78912353515625, -11.207002616222994, 4.669584423426247)) + u3 = evalpoly(p2, (0.0732421875, -0.8912109375, 1.8464626736111112, -1.0258125964506173)) + u2 = evalpoly(p2, (0.0703125, -0.4010416666666667, 0.3342013888888889)) + u1 = evalpoly(p2, (0.125, -0.20833333333333334)) + return (1.0, u1, u2, u3, u4, u5, u6, u7, u8, u9, u10, u11, u12, u13, u14, u15, u16, u17, u18, u19, u20) +end # implementation for arbitrary precision function Uk_poly_Jn(p, v, p2, x::T) where T - u0 = one(T) - u1 = evalpoly(p2, (3, -5)) / 24 - u2 = evalpoly(p2, (81, -462, 385)) / 1152 - u3 = evalpoly(p2, (30375, -369603, 765765, -425425)) / 414720 - u4 = evalpoly(p2, (4465125, -94121676, 349922430, -446185740, 185910725)) / 39813120 - u5 = evalpoly(p2, (1519035525, -49286948607, 284499769554, -614135872350, 566098157625, -188699385875)) / 6688604160 - u6 = evalpoly(p2, (2757049477875, -127577298354750, 1050760774457901, -3369032068261860,5104696716244125, -3685299006138750, 1023694168371875)) / 4815794995200 - u7 = evalpoly(p2, (199689155040375, -12493049053044375, 138799253740521843, -613221795981706275, 1347119637570231525, -1570320948552481125, 931766432052080625, -221849150488590625)) / 115579079884800 - u8 = evalpoly(p2, (134790179652253125, -10960565081605263000, 157768535329832893644, -914113758588905038248, 2711772922412520971550, -4513690624987320777000, 4272845805510421639500, -2152114239059719935000, 448357133137441653125)) / 22191183337881600 - u9 = evalpoly(p2, (6427469716717690265625, -659033454841709672064375, 11921080954211358275362500, -87432034049652400520788332, 334380732677827878090447630, -741743213039573443221773250, 992115946599792610768672500, -790370708270219620781737500, 345821892003106984030190625, -64041091111686478524109375)) / 263631258054033408000 - u10 = evalpoly(p2, (9745329584487361980740625, -1230031256571145165088463750, 27299183373230345667273718125, -246750339886026017414509498824, 1177120360439828012193658602930, -3327704366990695147540934069220, 5876803711285273203043452095250, -6564241639632418015173104205000, 4513386761946134740461797128125, -1745632061522350031610173343750, 290938676920391671935028890625)) / 88580102706155225088000 - u11 = evalpoly(p2, (15237265774872558064250728125, -2321657500166464779660536015625, 62011003282542082472252466220875, -676389476843440422173605288596087, 3926191452593448964331218647028194, -13704902022868787041097596217578170, 30589806122850866110941936529264950, -44801790321820682384740638703320750, 42936745153513007436411401865860625, -25963913760458280822131901737878125, 8997860461116953237934638500359375, -1363312191078326248171914924296875)) / 27636992044320430227456000 - u12 = evalpoly(p2, (120907703923613748239829527671875, -21882222767154197351962677311437500, 692277766674325563109617997687563750, -8958590476947726766450604043798559500, 62055079517573388459132793029571876461, -261201165596865827608687437905740780920, 714528665351965363868467348116538170900, -1314368459332124683504418467809129387000, 1642838631056253395899341314188134178125, -1378260730939829908037976894025628887500, 743739612850105971846901081692858843750, -233469939346545526651936774615688437500, 32426380464797989812768996474401171875)) / 39797268543821419527536640000 - u13 = evalpoly(p2, (17438611142828905996129258798828125, -3698121486504259988094897605296209375, 136735019134677724428035696765082813750, -2069933923586966756183324291232117362250, 16843538631795795357786827345307534156063, -83924867223075156862785921508524155665245, 274983827478138958623041508409195988431140, -616410216242554698436702353237166008656700, 962926533925253374359704288384340809260875, -1049095945162229046324321461816274931715625, 782463969315283937856703223178540650343750, -381190503845282445953419057314665534156250, 109361210755577700442544717509565392265625, -14020668045586884672121117629431460546875)) / 955134445051714068660879360000 - u14 = evalpoly(p2, (5448320367052402487647812713291015625, -1338184074771428116079233795614103631250, 57170953417612444837142230812990944671875, -1000503839668383458999731491914516564625300, 9440449669103391509091075981237243128469201, -54857705817658080981995319669299096598482382, 211477117385619365164298957821904115470535555, -564850830044980230366140582063618983657685400, 1070439683260179398514645952824098811025619475, -1451823699927947602004297385351260623500372750, 1401302601668131482630653233972052729323190625, -940627071986145750405920450097257805227812500, 417630985812040040477569028872405152769921875, -110320224449895843354117801955418504167031250, 13133360053559028970728309756597440972265625)) / 45846453362482275295722209280000 - u15 = evalpoly(p2, (8178936810213560828419581728001773291015625, -2303431987527333128955769182299845911305390625, 112597271053778779753048514469995937998172890625, -2254933495791765108580529087615802250458013685625, 24403480234538299231733883413666768614198435948125, -163359140754958502896104062604202934925448173291477, 730367145705123976114617970888707594104468177381925, -2284251621937242886581917667066122422330060024456125, 5136561256208409671660362298619778869859994724706875, -8420533422834140468835467666391400380550043688871875, 10085018700249896522602267572484630409640764997271875, -8735135969643867540297524795790262235822823374296875, 5329871927856528282113994744458999865006055974609375, -2173722139119126857509156976742601742357422740234375, 532039967451707060045861997017872377315039521484375, -59115551939078562227317999668652486368337724609375)) / 9820310310243703368343697227776000000 - u16 = evalpoly(p2, (23579874823845695868333654121829112397998046875, -7548208883093506123919073318645848440986281250000, 418571121445853600940987397062487467273966779625000, -9508794888602532435079114127493385198079570710470000, 116929016866180520574682795493722856433879981336112500, -892416493340003758691506680694321990355675722520838096, 4572999438129700505777642155788222350797540050279284760, -16514434054042671665093745143345645271999901089177788400, 43316362356947864694367448897560019067412728259897505250, -83973458255376217113431722753277764119484494850353270000, 121193409013842312774251134029225218007034205572281375000, -129900460304939941764670297010274798325693206430601250000, 102023293586271009821923530738271106285703628596295312500, -57054562339825052419659481088225652020508564894843750000, 21516499723877657209702638528530839860502345904015625000, -4906117886528008036369575428500807148681084440781250000, 511053946513334170455164107135500744654279629248046875)) / 3770999159133582093443979735465984000000 - u17 = evalpoly(p2, (86098445290621992919710288959076381992996044921875, -31086866964344776434901340294726759585844523939453125, 1940900724642360326780559417863159500982538936987375000, -49633551391469586967911551642521760042791355027620125000, 687906693873155071735691272079937403263685738018470814500, -5933198793919698447982330692598158428032189878414161012124, 34502031994800767344892422746634773296018107824906632419848, -142225164683992765990030747899409462088308925365682017857240, 429212352515026773475471295511415883382060846328770993005250, -967487903877461958325237917115228310512630590714451916640750, 1646551275524985252738847924398650627672209050734790851265000, -2121288587929318041669932345514745412624685501425210767875000, 2056954829464921151146089484749565775448230537475447606562500, -1477558757838664620053280135342775196503230238657956773437500, 762596613990574496129519527341431797422236075424587596875000, -267445311988545069854943494211913506927580321987738265625000, 57077468859498937494621367436714109067308943816271513671875, -5595830280343033087707977199677853830128327825124658203125)) / 1719575616564913434610454759372488704000000 - u18 = evalpoly(p2, (17402648254366970318896442155853313710334325579833984375, -7038996381042630440706320955207218277836259136214144531250, 491515845627995608630308828025937223574193727753376100859375, -14053430579296992819276840860026711644143962037898462198750000, 217977088167107844476671248240850549184342689357081793983627500, -2108435312318793739666233505677933977608124223061200130648299000, 13796125542556918366536045481173150324297945459901440053845493532, -64294535084989436534160300189785402934009324116808204634140090960, 220746706223415685134843293656748091845034254294736425040548604450, -570806748959722117700578156666367879819767325936645047354739587500, 1126546324172034608288726239622146620694308510621969350884171781250, -1707362295067866555400074337741150183369276187369879432556935250000, 1985632470023144029098600377248581775333320983961309350778555937500, -1757491631661175749558620292180560395062012011157079033996696875000, 1163006497421870129179321717633624986894646606476886508372367187500, -557267390747417776045984733477369082240579802825315540376718750000, 182639522233726398821209338567430722027981720466294556325849609375, -36632957438678377189819992330283878474735514770655121685644531250, 3391940503581331221279628919470729488401436552838437193115234375)) / 40857116649582343206344405082690331607040000000 - u19 = evalpoly(p2, (3761719809509744584195141470215239968860161850335693359375, -1694136104847790923543013061207680485991618397125797873046875, 131518243789528012257323287684549590712219590887856743595703125, -4179129511260217209133623104486559148268490002722848244991240625, 72088266652871136165181276891337618088740053757385007292240377500, -776773977214820033621339638022401758862209813648991378355261599500, 5677394779818071523358076045292335690018332546439714641415150037636, -29667822591847140970922062603154078948366431649274897672067206014580, 114800233558787974267088388638654159779991991716667850063043161177890, -336788945225975997668966486515468748933754942064781256509404101275850, 760599837839891632010677514872412397427959022966733699428711208643750, -1333776105497652608917805362422659621440699261908512326717363285968750, 1821026790520428617034899967974569000414933301802005578083458082187500, -1929493390007550512825649545883182667978851358936168551128507440937500, 1570570304135828069768211937927131121377451398878663909061910457812500, -963355744456233323886326422779275308259891167457840027230510476562500, 430744376085805585076333464506126217301082462279781595185335615234375, -132496442776420617057548516091451843431549350710841121872822607421875, 25067118709566753991500713640672585065184296412786618544560205078125, -2198870062242697718552694179006367110981078632700580574084228515625)) / 980570799589976236952265721984567958568960000000 - u20 = evalpoly(p2, (24030618487110150352755402740028995969072485932314476318359375, -11984379509393886990049682627416290126645799829432886859195312500, 1028816773596376675865176501621547688509187479681533744365175781250, -36136687211104276266628386141898079997731413843884113675698994212500, 689368394712060288513879526213143279387995331221181709158682715671875, -8226054591925395046897310265711439061232478740113589342810359827971600, 66729727980314206345594148553023187689855688854650386958448499394886808, -388235990422199036481157075090292917209702371811112714609151030385239376, 1679621555358289731717827244171539003686077073065087747585589973854567950, -5539024239213671573375139503069183935283937579486175606155069574939719000, 14158993985687610069291256086138044030538819617545349322200892501730615500, -28351273454978996507857547213496220444080209057761228571819950144231575000, 44700502703654649774362294361156754154712937287563245669685024068473468750, -55504285315413734114196925709059066734450069228526494661323483726671250000, 53996017865021964397812742861916826936440170527545458081631955240159375000, -40677946447845849750014263157052100427921007881029648608310681741346250000, 23250401373415767366970579801426233116241475047289980901600427561701171875, -9744288621182737996606001891415854305391392962559389056448157541132812500, 2823768330714179467082676027577350697536971031741905897356560592675781250, -505537818270094147077012813306995849751437826286925078626556809570312500, 42128151522507845589751067775582987479286485523910423218879734130859375)) / 658943577324464031231922565173629668158341120000000 - u21 = evalpoly(p2, (1990919576929585163761247434580873723897677550573731281207275390625, -1094071724893410272201314846735800345180930752601602224440504638671875, 103359845691236916270005420886293061281368263471845448279855946394531250, -3993558675585831919973605001813276532326292885934464373884268722794718750, 83832389176247515253189196480455786065824463879054932596114704927571390625, -1101977288759423115916484463959767795703317649005495798822550381533967842875, 9865413224996821913093061266347613112205666995211786544733850490740903131000, -63509799534443193918054738326913581450607131662586232327271654588312820660616, 305080179205137176095342856930260393560550505786421683990077008259370104309410, -1122099959965657526344757894103766710826629020929459670948834078441128579791750, 3217185258543282976637373169047731813093578126603884759856059695249999306047500, -7276835259402589085458442196686990645669654847254510877738804991391058411412500, 13076651508858985557227319801010895818335803028865299751194038965212274849406250, -18719023753854332443081892087572754119280558462994056787647908433841920235468750, 21307327225910629020600045595173860611314592374884901403059587980149276271875000, -19156728115567236234371593788102013666866274144599851347429312225076676478125000, 13430107219321888006291381503763318985372222835071804983658005207838642173828125, -7186150593017474773099947110903785965879266917528290917207712073663895771484375, 2834031566467842832851805860262261718160136985649155528263587796394390332031250, -776308737033643856044315139790308583914612827783322139063211433790569824218750, 131897976398031751060811874321878385924211075364673046295410087596954345703125, -10468093364923154846096180501736379835254847251164527483762705364837646484375)) / 5456052820246562178600318839637653652351064473600000000 - Poly = (u0, u1, u2, u3, u4, u5, u6, u7, u8, u9, u10, u11, u12, u13, u14, u15, u16, u17, u18, u19, u20, u21) + Poly = _Uk_poly_Jn(p2) return split_evalpoly(-p/v, Poly) end +function _Uk_poly_Jn(p2) + u21 = evalpoly(p2, (1990919576929585163761247434580873723897677550573731281207275390625, -1094071724893410272201314846735800345180930752601602224440504638671875, 103359845691236916270005420886293061281368263471845448279855946394531250, -3993558675585831919973605001813276532326292885934464373884268722794718750, 83832389176247515253189196480455786065824463879054932596114704927571390625, -1101977288759423115916484463959767795703317649005495798822550381533967842875, 9865413224996821913093061266347613112205666995211786544733850490740903131000, -63509799534443193918054738326913581450607131662586232327271654588312820660616, 305080179205137176095342856930260393560550505786421683990077008259370104309410, -1122099959965657526344757894103766710826629020929459670948834078441128579791750, 3217185258543282976637373169047731813093578126603884759856059695249999306047500, -7276835259402589085458442196686990645669654847254510877738804991391058411412500, 13076651508858985557227319801010895818335803028865299751194038965212274849406250, -18719023753854332443081892087572754119280558462994056787647908433841920235468750, 21307327225910629020600045595173860611314592374884901403059587980149276271875000, -19156728115567236234371593788102013666866274144599851347429312225076676478125000, 13430107219321888006291381503763318985372222835071804983658005207838642173828125, -7186150593017474773099947110903785965879266917528290917207712073663895771484375, 2834031566467842832851805860262261718160136985649155528263587796394390332031250, -776308737033643856044315139790308583914612827783322139063211433790569824218750, 131897976398031751060811874321878385924211075364673046295410087596954345703125, -10468093364923154846096180501736379835254847251164527483762705364837646484375)) / 5456052820246562178600318839637653652351064473600000000 + u20 = evalpoly(p2, (24030618487110150352755402740028995969072485932314476318359375, -11984379509393886990049682627416290126645799829432886859195312500, 1028816773596376675865176501621547688509187479681533744365175781250, -36136687211104276266628386141898079997731413843884113675698994212500, 689368394712060288513879526213143279387995331221181709158682715671875, -8226054591925395046897310265711439061232478740113589342810359827971600, 66729727980314206345594148553023187689855688854650386958448499394886808, -388235990422199036481157075090292917209702371811112714609151030385239376, 1679621555358289731717827244171539003686077073065087747585589973854567950, -5539024239213671573375139503069183935283937579486175606155069574939719000, 14158993985687610069291256086138044030538819617545349322200892501730615500, -28351273454978996507857547213496220444080209057761228571819950144231575000, 44700502703654649774362294361156754154712937287563245669685024068473468750, -55504285315413734114196925709059066734450069228526494661323483726671250000, 53996017865021964397812742861916826936440170527545458081631955240159375000, -40677946447845849750014263157052100427921007881029648608310681741346250000, 23250401373415767366970579801426233116241475047289980901600427561701171875, -9744288621182737996606001891415854305391392962559389056448157541132812500, 2823768330714179467082676027577350697536971031741905897356560592675781250, -505537818270094147077012813306995849751437826286925078626556809570312500, 42128151522507845589751067775582987479286485523910423218879734130859375)) / 658943577324464031231922565173629668158341120000000 + u19 = evalpoly(p2, (3761719809509744584195141470215239968860161850335693359375, -1694136104847790923543013061207680485991618397125797873046875, 131518243789528012257323287684549590712219590887856743595703125, -4179129511260217209133623104486559148268490002722848244991240625, 72088266652871136165181276891337618088740053757385007292240377500, -776773977214820033621339638022401758862209813648991378355261599500, 5677394779818071523358076045292335690018332546439714641415150037636, -29667822591847140970922062603154078948366431649274897672067206014580, 114800233558787974267088388638654159779991991716667850063043161177890, -336788945225975997668966486515468748933754942064781256509404101275850, 760599837839891632010677514872412397427959022966733699428711208643750, -1333776105497652608917805362422659621440699261908512326717363285968750, 1821026790520428617034899967974569000414933301802005578083458082187500, -1929493390007550512825649545883182667978851358936168551128507440937500, 1570570304135828069768211937927131121377451398878663909061910457812500, -963355744456233323886326422779275308259891167457840027230510476562500, 430744376085805585076333464506126217301082462279781595185335615234375, -132496442776420617057548516091451843431549350710841121872822607421875, 25067118709566753991500713640672585065184296412786618544560205078125, -2198870062242697718552694179006367110981078632700580574084228515625)) / 980570799589976236952265721984567958568960000000 + u18 = evalpoly(p2, (17402648254366970318896442155853313710334325579833984375, -7038996381042630440706320955207218277836259136214144531250, 491515845627995608630308828025937223574193727753376100859375, -14053430579296992819276840860026711644143962037898462198750000, 217977088167107844476671248240850549184342689357081793983627500, -2108435312318793739666233505677933977608124223061200130648299000, 13796125542556918366536045481173150324297945459901440053845493532, -64294535084989436534160300189785402934009324116808204634140090960, 220746706223415685134843293656748091845034254294736425040548604450, -570806748959722117700578156666367879819767325936645047354739587500, 1126546324172034608288726239622146620694308510621969350884171781250, -1707362295067866555400074337741150183369276187369879432556935250000, 1985632470023144029098600377248581775333320983961309350778555937500, -1757491631661175749558620292180560395062012011157079033996696875000, 1163006497421870129179321717633624986894646606476886508372367187500, -557267390747417776045984733477369082240579802825315540376718750000, 182639522233726398821209338567430722027981720466294556325849609375, -36632957438678377189819992330283878474735514770655121685644531250, 3391940503581331221279628919470729488401436552838437193115234375)) / 40857116649582343206344405082690331607040000000 + u17 = evalpoly(p2, (86098445290621992919710288959076381992996044921875, -31086866964344776434901340294726759585844523939453125, 1940900724642360326780559417863159500982538936987375000, -49633551391469586967911551642521760042791355027620125000, 687906693873155071735691272079937403263685738018470814500, -5933198793919698447982330692598158428032189878414161012124, 34502031994800767344892422746634773296018107824906632419848, -142225164683992765990030747899409462088308925365682017857240, 429212352515026773475471295511415883382060846328770993005250, -967487903877461958325237917115228310512630590714451916640750, 1646551275524985252738847924398650627672209050734790851265000, -2121288587929318041669932345514745412624685501425210767875000, 2056954829464921151146089484749565775448230537475447606562500, -1477558757838664620053280135342775196503230238657956773437500, 762596613990574496129519527341431797422236075424587596875000, -267445311988545069854943494211913506927580321987738265625000, 57077468859498937494621367436714109067308943816271513671875, -5595830280343033087707977199677853830128327825124658203125)) / 1719575616564913434610454759372488704000000 + u16 = evalpoly(p2, (23579874823845695868333654121829112397998046875, -7548208883093506123919073318645848440986281250000, 418571121445853600940987397062487467273966779625000, -9508794888602532435079114127493385198079570710470000, 116929016866180520574682795493722856433879981336112500, -892416493340003758691506680694321990355675722520838096, 4572999438129700505777642155788222350797540050279284760, -16514434054042671665093745143345645271999901089177788400, 43316362356947864694367448897560019067412728259897505250, -83973458255376217113431722753277764119484494850353270000, 121193409013842312774251134029225218007034205572281375000, -129900460304939941764670297010274798325693206430601250000, 102023293586271009821923530738271106285703628596295312500, -57054562339825052419659481088225652020508564894843750000, 21516499723877657209702638528530839860502345904015625000, -4906117886528008036369575428500807148681084440781250000, 511053946513334170455164107135500744654279629248046875)) / 3770999159133582093443979735465984000000 + u15 = evalpoly(p2, (8178936810213560828419581728001773291015625, -2303431987527333128955769182299845911305390625, 112597271053778779753048514469995937998172890625, -2254933495791765108580529087615802250458013685625, 24403480234538299231733883413666768614198435948125, -163359140754958502896104062604202934925448173291477, 730367145705123976114617970888707594104468177381925, -2284251621937242886581917667066122422330060024456125, 5136561256208409671660362298619778869859994724706875, -8420533422834140468835467666391400380550043688871875, 10085018700249896522602267572484630409640764997271875, -8735135969643867540297524795790262235822823374296875, 5329871927856528282113994744458999865006055974609375, -2173722139119126857509156976742601742357422740234375, 532039967451707060045861997017872377315039521484375, -59115551939078562227317999668652486368337724609375)) / 9820310310243703368343697227776000000 + u14 = evalpoly(p2, (5448320367052402487647812713291015625, -1338184074771428116079233795614103631250, 57170953417612444837142230812990944671875, -1000503839668383458999731491914516564625300, 9440449669103391509091075981237243128469201, -54857705817658080981995319669299096598482382, 211477117385619365164298957821904115470535555, -564850830044980230366140582063618983657685400, 1070439683260179398514645952824098811025619475, -1451823699927947602004297385351260623500372750, 1401302601668131482630653233972052729323190625, -940627071986145750405920450097257805227812500, 417630985812040040477569028872405152769921875, -110320224449895843354117801955418504167031250, 13133360053559028970728309756597440972265625)) / 45846453362482275295722209280000 + u13 = evalpoly(p2, (17438611142828905996129258798828125, -3698121486504259988094897605296209375, 136735019134677724428035696765082813750, -2069933923586966756183324291232117362250, 16843538631795795357786827345307534156063, -83924867223075156862785921508524155665245, 274983827478138958623041508409195988431140, -616410216242554698436702353237166008656700, 962926533925253374359704288384340809260875, -1049095945162229046324321461816274931715625, 782463969315283937856703223178540650343750, -381190503845282445953419057314665534156250, 109361210755577700442544717509565392265625, -14020668045586884672121117629431460546875)) / 955134445051714068660879360000 + u12 = evalpoly(p2, (120907703923613748239829527671875, -21882222767154197351962677311437500, 692277766674325563109617997687563750, -8958590476947726766450604043798559500, 62055079517573388459132793029571876461, -261201165596865827608687437905740780920, 714528665351965363868467348116538170900, -1314368459332124683504418467809129387000, 1642838631056253395899341314188134178125, -1378260730939829908037976894025628887500, 743739612850105971846901081692858843750, -233469939346545526651936774615688437500, 32426380464797989812768996474401171875)) / 39797268543821419527536640000 + u11 = evalpoly(p2, (15237265774872558064250728125, -2321657500166464779660536015625, 62011003282542082472252466220875, -676389476843440422173605288596087, 3926191452593448964331218647028194, -13704902022868787041097596217578170, 30589806122850866110941936529264950, -44801790321820682384740638703320750, 42936745153513007436411401865860625, -25963913760458280822131901737878125, 8997860461116953237934638500359375, -1363312191078326248171914924296875)) / 27636992044320430227456000 + u10 = evalpoly(p2, (9745329584487361980740625, -1230031256571145165088463750, 27299183373230345667273718125, -246750339886026017414509498824, 1177120360439828012193658602930, -3327704366990695147540934069220, 5876803711285273203043452095250, -6564241639632418015173104205000, 4513386761946134740461797128125, -1745632061522350031610173343750, 290938676920391671935028890625)) / 88580102706155225088000 + u9 = evalpoly(p2, (6427469716717690265625, -659033454841709672064375, 11921080954211358275362500, -87432034049652400520788332, 334380732677827878090447630, -741743213039573443221773250, 992115946599792610768672500, -790370708270219620781737500, 345821892003106984030190625, -64041091111686478524109375)) / 263631258054033408000 + u8 = evalpoly(p2, (134790179652253125, -10960565081605263000, 157768535329832893644, -914113758588905038248, 2711772922412520971550, -4513690624987320777000, 4272845805510421639500, -2152114239059719935000, 448357133137441653125)) / 22191183337881600 + u7 = evalpoly(p2, (199689155040375, -12493049053044375, 138799253740521843, -613221795981706275, 1347119637570231525, -1570320948552481125, 931766432052080625, -221849150488590625)) / 115579079884800 + u6 = evalpoly(p2, (2757049477875, -127577298354750, 1050760774457901, -3369032068261860,5104696716244125, -3685299006138750, 1023694168371875)) / 4815794995200 + u5 = evalpoly(p2, (1519035525, -49286948607, 284499769554, -614135872350, 566098157625, -188699385875)) / 6688604160 + u4 = evalpoly(p2, (4465125, -94121676, 349922430, -446185740, 185910725)) / 39813120 + u3 = evalpoly(p2, (30375, -369603, 765765, -425425)) / 414720 + u2 = evalpoly(p2, (81, -462, 385)) / 1152 + u1 = evalpoly(p2, (3, -5)) / 24 + u0 = one(p2) + return (u0, u1, u2, u3, u4, u5, u6, u7, u8, u9, u10, u11, u12, u13, u14, u15, u16, u17, u18, u19, u20, u21) +end # performs a second order horner scheme for polynomial evaluation # computes the even and odd coefficients of the polynomial independently within a loop to reduce latency diff --git a/src/asymptotics.jl b/src/asymptotics.jl index b015140..46795bd 100644 --- a/src/asymptotics.jl +++ b/src/asymptotics.jl @@ -108,66 +108,68 @@ function _α_αp_asymptotic(v, x::Float32) return _α_αp_poly_30(v, x) end end + function _α_αp_poly_5(v, x::T) where T xinv = inv(x)^2 μ = 4 * v^2 - s0 = one(T) - s1 = (1 - μ) / 8 - s2 = evalpoly(μ, (-0.1953125, 0.203125, -0.0078125)) - s3 = evalpoly(μ, (1.0478515625, -1.1591796875, 0.1123046875, -0.0009765625)) - s4 = evalpoly(μ, (-11.466461181640625, 13.1358642578125, -1.71624755859375, 0.0469970703125, -0.000152587890625)) + s5 = evalpoly(μ, (211.27614974975586, -246.8455924987793, 37.067405700683594, -1.5151596069335938, 0.017223358154296875, -2.6702880859375e-5)) + s4 = evalpoly(μ, (-11.466461181640625, 13.1358642578125, -1.71624755859375, 0.0469970703125, -0.000152587890625)) + s3 = evalpoly(μ, (1.0478515625, -1.1591796875, 0.1123046875, -0.0009765625)) + s2 = evalpoly(μ, (-0.1953125, 0.203125, -0.0078125)) + s1 = evalpoly(μ, (0.125, -0.125)) - αp = evalpoly(xinv, (s0, s1, s2, s3, s4, s5)) - α = x * evalpoly(xinv, (s0, -s1, -s2/3, -s3/5, -s4/7, -s5/9)) + αp = evalpoly(xinv, (1.0, s1, s2, s3, s4, s5)) + α = x * evalpoly(xinv, (1.0, -s1, -s2/3, -s3/5, -s4/7, -s5/9)) return α, αp end + + function _α_αp_poly_10(v, x::T) where T xinv = inv(x)^2 μ = 4 * v^2 - s0 = one(T) - s1 = (1 - μ) / 8 - s2 = evalpoly(μ, (-0.1953125, 0.203125, -0.0078125)) - s3 = evalpoly(μ, (1.0478515625, -1.1591796875, 0.1123046875, -0.0009765625)) - s4 = evalpoly(μ, (-11.466461181640625, 13.1358642578125, -1.71624755859375, 0.0469970703125, -0.000152587890625)) - s5 = evalpoly(μ, (211.27614974975586, -246.8455924987793, 37.067405700683594, -1.5151596069335938, 0.017223358154296875, -2.6702880859375e-5)) - s6 = evalpoly(μ, (-5892.0457146167755, 6965.548173427582, -1128.6143367290497, 56.11658954620361, -1.0105445384979248, 0.005837917327880859, -5.0067901611328125e-6)) - s7 = evalpoly(μ, (231884.6359563172, -276225.9131319225, 46889.68168082833, -2607.1347218453884, 59.29277476668358, -0.5644365847110748, 0.0018794238567352295, -9.834766387939453e-7)) - s8 = evalpoly(μ, (-1.225106763286615e7, 1.4670878180751745e7, -2.5692206274838205e6, 153362.43350451812, -4001.4928083932027, 49.41718461737037, -0.2788656409829855, 0.0005833245813846588, -1.9976869225502014e-7)) - s9 = evalpoly(μ, (8.369564497799761e8, -1.0061560971482614e9, 1.80175839935865e8, -1.1293844119552301e7, 322272.3393258663, -4655.44006793818, 34.77845393284224, -0.12591543863527477, 0.0001761710154823959, -4.1618477553129196e-8)) + s10 = evalpoly(μ, (-7.181611223268327e10, 8.659091218989731e10, -1.576853447634526e10, 1.0243675365394899e9, -3.1127612822052997e7, 499001.19046756154, -4427.281508191307, 21.557856538012857, -0.053067848184582544, 5.209072696743533e-5, -8.843926480039954e-9)) - - αp = evalpoly(xinv, (s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10)) - α = x * evalpoly(xinv, (s0, -s1, -s2/3, -s3/5, -s4/7, -s5/9, -s6/11, -s7/13, -s8/15, -s9/17, -s10/19)) - return α, αp + s9 = evalpoly(μ, (8.369564497799761e8, -1.0061560971482614e9, 1.80175839935865e8, -1.1293844119552301e7, 322272.3393258663, -4655.44006793818, 34.77845393284224, -0.12591543863527477, 0.0001761710154823959, -4.1618477553129196e-8)) + s8 = evalpoly(μ, (-1.225106763286615e7, 1.4670878180751745e7, -2.5692206274838205e6, 153362.43350451812, -4001.4928083932027, 49.41718461737037, -0.2788656409829855, 0.0005833245813846588, -1.9976869225502014e-7)) + s7 = evalpoly(μ, (231884.6359563172, -276225.9131319225, 46889.68168082833, -2607.1347218453884, 59.29277476668358, -0.5644365847110748, 0.0018794238567352295, -9.834766387939453e-7)) + s6 = evalpoly(μ, (-5892.0457146167755, 6965.548173427582, -1128.6143367290497, 56.11658954620361, -1.0105445384979248, 0.005837917327880859, -5.0067901611328125e-6)) + s5 = evalpoly(μ, (211.27614974975586, -246.8455924987793, 37.067405700683594, -1.5151596069335938, 0.017223358154296875, -2.6702880859375e-5)) + s4 = evalpoly(μ, (-11.466461181640625, 13.1358642578125, -1.71624755859375, 0.0469970703125, -0.000152587890625)) + s3 = evalpoly(μ, (1.0478515625, -1.1591796875, 0.1123046875, -0.0009765625)) + s2 = evalpoly(μ, (-0.1953125, 0.203125, -0.0078125)) + s1 = evalpoly(μ, (0.125, -0.125)) + + P = (1.0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10) + α, αp = split_phase_evalpoly(xinv, P) + return α*x, αp end function _α_αp_poly_20(v, x::T) where T xinv = inv(x)^2 μ = 4 * v^2 - s0 = one(T) - s1 = (1 - μ) / 8 - s2 = evalpoly(μ, (-0.1953125, 0.203125, -0.0078125)) - s3 = evalpoly(μ, (1.0478515625, -1.1591796875, 0.1123046875, -0.0009765625)) - s4 = evalpoly(μ, (-11.466461181640625, 13.1358642578125, -1.71624755859375, 0.0469970703125, -0.000152587890625)) - s5 = evalpoly(μ, (211.27614974975586, -246.8455924987793, 37.067405700683594, -1.5151596069335938, 0.017223358154296875, -2.6702880859375e-5)) - s6 = evalpoly(μ, (-5892.0457146167755, 6965.548173427582, -1128.6143367290497, 56.11658954620361, -1.0105445384979248, 0.005837917327880859, -5.0067901611328125e-6)) - s7 = evalpoly(μ, (231884.6359563172, -276225.9131319225, 46889.68168082833, -2607.1347218453884, 59.29277476668358, -0.5644365847110748, 0.0018794238567352295, -9.834766387939453e-7)) - s8 = evalpoly(μ, (-1.225106763286615e7, 1.4670878180751745e7, -2.5692206274838205e6, 153362.43350451812, -4001.4928083932027, 49.41718461737037, -0.2788656409829855, 0.0005833245813846588, -1.9976869225502014e-7)) - s9 = evalpoly(μ, (8.369564497799761e8, -1.0061560971482614e9, 1.80175839935865e8, -1.1293844119552301e7, 322272.3393258663, -4655.44006793818, 34.77845393284224, -0.12591543863527477, 0.0001761710154823959, -4.1618477553129196e-8)) - s10 = evalpoly(μ, (-7.181611223268327e10, 8.659091218989731e10, -1.576853447634526e10, 1.0243675365394899e9, -3.1127612822052997e7, 499001.19046756154, -4427.281508191307, 21.557856538012857, -0.053067848184582544, 5.209072696743533e-5, -8.843926480039954e-9)) - s11 = evalpoly(μ, (7.562132599676877e12, -9.139342212003133e12, 1.686263984004851e12, -1.1257747938365613e11, 3.584384568770644e9, -6.188986771037158e7, 616601.7257690447, -3609.808395761912, 12.103919447801218, -0.021179858537379914, 1.5144118606258417e-5, -1.909484126372263e-9)) - s12 = evalpoly(μ, (-9.588236853265692e14, 1.161016591203577e15, -2.164822377227822e14, 1.4768015151140877e13, -4.8748767898914606e11, 8.900147704533855e9, -9.641151011038888e7, 640028.5410983711, -2606.385824929625, 6.277422845836725, -0.008087900592073538, 4.342405588886322e-6, -4.176996526439325e-10)) - s13 = evalpoly(μ, (1.4409993748135704e17, -1.747635582560889e17, 3.286944341694018e16, -2.2818860422499875e15, 7.75248528894739e13, -1.4783938404512664e12, 1.7064572063331423e10, -1.2415577730993801e8, 578046.6774168271, -1705.2186748496474, 3.0504712266430722, -0.0029777336087200013, 1.2309086638850886e-6, -9.237588471933122e-11)) - s14 = evalpoly(μ, (-2.5330554576498356e19, 3.0761765051109855e19, -5.827690025164462e18, 4.1047854971841363e17, -1.4277576770556304e16, 2.819724813029272e14, -3.4214400566025547e12, 2.670056925037507e10, -1.3717353508462998e8, 465890.6725849346, -1028.1881576107903, 1.4039031226739573, -0.0010631539871280848, 3.4554354377824836e-7, -2.061961712485072e-11)) - s15 = evalpoly(μ, (5.149237018485509e21, -6.260437088008504e21, 1.1933270317945127e21, -8.508441473311652e19, 3.0180281284560543e18, -6.1344355915029736e16, 7.750474619361342e14, -6.393706192980096e12, 3.543452904857713e10, -1.3358182185805681e8, 341472.1144099866, -578.7806110577233, 0.6169921485050097, -0.00036976968916281605, 9.619824624385043e-8, -4.639413853091412e-12)) - s16 = evalpoly(μ, (-1.1986350446061028e24, 1.458736721654471e24, -2.795293505867967e23, 2.0139038975089457e22, -7.262922096794037e20, 1.5122633519520676e19, -1.975555191650512e17, 1.7050149800082885e15, -1.0037673890747877e13, 4.1025284625807785e10, -1.1700278886842367e8, 230919.39384718135, -307.22947128726474, 0.260626935759175, -0.0001257334987819726, 2.658906071879852e-8, -1.051117201091023e-12)) - s17 = evalpoly(μ, (3.167717078292175e26, -3.8584266638650446e26, 7.4277307068246446e25, -5.399729057323595e24, 1.9752248974202056e23, -4.197842582814349e21, 5.640147455618286e19, -5.0538188484912346e17, 3.1258357574848365e15, -1.3629748027461303e13, 4.233000035928751e10, -9.36296364559977e7, 145724.23973885347, -155.01792293897955, 0.10637041031529318, -4.191933776256961e-5, 7.303030923530292e-9, -2.3959289142515966e-13)) - s18 = evalpoly(μ, (-9.432675683095812e28, 1.1498154949132059e29, -2.2224123014148547e28, 1.6283472309548362e27, -6.03034763221407e25, 1.3043849059659297e24, -1.7950710383376238e22, 1.6602291470434327e20, -1.0700309670904285e18, 4.92026735148727e15, -1.6365119263912514e13, 3.957355516860315e10, -6.930551343828379e7, 86599.59532013819, -74.82883257079231, 0.042123857348712865, -1.3735762526818516e-5, 1.994760566671595e-9, -5.490670428493242e-14)) - s19 = evalpoly(μ, (3.1436617397720927e31, -3.8346121964186915e31, 7.438172213027661e30, -5.487658176284203e29, 2.0543110479331377e28, -4.512190593153004e26, 6.33949148154985e24, -6.024489803885022e22, 4.020727203383251e20, -1.9328978639294188e18, 6.802550072768408e15, -1.767751414955178e13, 3.3964900375451138e10, -4.792703592867111e7, 48822.71795456563, -34.73905348751307, 0.01624286720956346, -4.43222001918643e-6, 5.421693881235296e-10, -1.2642991118241018e-14)) s20 = evalpoly(μ, (-1.1655823449858069e34, 1.4226232333293694e34, -2.7683048917097874e33, 2.0549175959945544e32, -7.766193794571668e30, 1.7289192571208397e29, -2.473355129610242e27, 2.406335820680262e25, -1.6548511836241395e23, 8.261988206301513e20, -3.048956971903377e18, 8.409146358453666e15, -1.7416884938569994e13, 2.7048317602344254e10, -3.1216507081066556e7, 26272.21159305084, -15.578788452840763, 0.0061163849392160095, -1.4107081622121022e-6, 1.4671084930995856e-10, -2.9236916960932355e-15)) - - P = (s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, s17, s18, s19, s20) + s19 = evalpoly(μ, (3.1436617397720927e31, -3.8346121964186915e31, 7.438172213027661e30, -5.487658176284203e29, 2.0543110479331377e28, -4.512190593153004e26, 6.33949148154985e24, -6.024489803885022e22, 4.020727203383251e20, -1.9328978639294188e18, 6.802550072768408e15, -1.767751414955178e13, 3.3964900375451138e10, -4.792703592867111e7, 48822.71795456563, -34.73905348751307, 0.01624286720956346, -4.43222001918643e-6, 5.421693881235296e-10, -1.2642991118241018e-14)) + s18 = evalpoly(μ, (-9.432675683095812e28, 1.1498154949132059e29, -2.2224123014148547e28, 1.6283472309548362e27, -6.03034763221407e25, 1.3043849059659297e24, -1.7950710383376238e22, 1.6602291470434327e20, -1.0700309670904285e18, 4.92026735148727e15, -1.6365119263912514e13, 3.957355516860315e10, -6.930551343828379e7, 86599.59532013819, -74.82883257079231, 0.042123857348712865, -1.3735762526818516e-5, 1.994760566671595e-9, -5.490670428493242e-14)) + s17 = evalpoly(μ, (3.167717078292175e26, -3.8584266638650446e26, 7.4277307068246446e25, -5.399729057323595e24, 1.9752248974202056e23, -4.197842582814349e21, 5.640147455618286e19, -5.0538188484912346e17, 3.1258357574848365e15, -1.3629748027461303e13, 4.233000035928751e10, -9.36296364559977e7, 145724.23973885347, -155.01792293897955, 0.10637041031529318, -4.191933776256961e-5, 7.303030923530292e-9, -2.3959289142515966e-13)) + s16 = evalpoly(μ, (-1.1986350446061028e24, 1.458736721654471e24, -2.795293505867967e23, 2.0139038975089457e22, -7.262922096794037e20, 1.5122633519520676e19, -1.975555191650512e17, 1.7050149800082885e15, -1.0037673890747877e13, 4.1025284625807785e10, -1.1700278886842367e8, 230919.39384718135, -307.22947128726474, 0.260626935759175, -0.0001257334987819726, 2.658906071879852e-8, -1.051117201091023e-12)) + s15 = evalpoly(μ, (5.149237018485509e21, -6.260437088008504e21, 1.1933270317945127e21, -8.508441473311652e19, 3.0180281284560543e18, -6.1344355915029736e16, 7.750474619361342e14, -6.393706192980096e12, 3.543452904857713e10, -1.3358182185805681e8, 341472.1144099866, -578.7806110577233, 0.6169921485050097, -0.00036976968916281605, 9.619824624385043e-8, -4.639413853091412e-12)) + s14 = evalpoly(μ, (-2.5330554576498356e19, 3.0761765051109855e19, -5.827690025164462e18, 4.1047854971841363e17, -1.4277576770556304e16, 2.819724813029272e14, -3.4214400566025547e12, 2.670056925037507e10, -1.3717353508462998e8, 465890.6725849346, -1028.1881576107903, 1.4039031226739573, -0.0010631539871280848, 3.4554354377824836e-7, -2.061961712485072e-11)) + s13 = evalpoly(μ, (1.4409993748135704e17, -1.747635582560889e17, 3.286944341694018e16, -2.2818860422499875e15, 7.75248528894739e13, -1.4783938404512664e12, 1.7064572063331423e10, -1.2415577730993801e8, 578046.6774168271, -1705.2186748496474, 3.0504712266430722, -0.0029777336087200013, 1.2309086638850886e-6, -9.237588471933122e-11)) + s12 = evalpoly(μ, (-9.588236853265692e14, 1.161016591203577e15, -2.164822377227822e14, 1.4768015151140877e13, -4.8748767898914606e11, 8.900147704533855e9, -9.641151011038888e7, 640028.5410983711, -2606.385824929625, 6.277422845836725, -0.008087900592073538, 4.342405588886322e-6, -4.176996526439325e-10)) + s11 = evalpoly(μ, (7.562132599676877e12, -9.139342212003133e12, 1.686263984004851e12, -1.1257747938365613e11, 3.584384568770644e9, -6.188986771037158e7, 616601.7257690447, -3609.808395761912, 12.103919447801218, -0.021179858537379914, 1.5144118606258417e-5, -1.909484126372263e-9)) + s10 = evalpoly(μ, (-7.181611223268327e10, 8.659091218989731e10, -1.576853447634526e10, 1.0243675365394899e9, -3.1127612822052997e7, 499001.19046756154, -4427.281508191307, 21.557856538012857, -0.053067848184582544, 5.209072696743533e-5, -8.843926480039954e-9)) + s9 = evalpoly(μ, (8.369564497799761e8, -1.0061560971482614e9, 1.80175839935865e8, -1.1293844119552301e7, 322272.3393258663, -4655.44006793818, 34.77845393284224, -0.12591543863527477, 0.0001761710154823959, -4.1618477553129196e-8)) + s8 = evalpoly(μ, (-1.225106763286615e7, 1.4670878180751745e7, -2.5692206274838205e6, 153362.43350451812, -4001.4928083932027, 49.41718461737037, -0.2788656409829855, 0.0005833245813846588, -1.9976869225502014e-7)) + s7 = evalpoly(μ, (231884.6359563172, -276225.9131319225, 46889.68168082833, -2607.1347218453884, 59.29277476668358, -0.5644365847110748, 0.0018794238567352295, -9.834766387939453e-7)) + s6 = evalpoly(μ, (-5892.0457146167755, 6965.548173427582, -1128.6143367290497, 56.11658954620361, -1.0105445384979248, 0.005837917327880859, -5.0067901611328125e-6)) + s5 = evalpoly(μ, (211.27614974975586, -246.8455924987793, 37.067405700683594, -1.5151596069335938, 0.017223358154296875, -2.6702880859375e-5)) + s4 = evalpoly(μ, (-11.466461181640625, 13.1358642578125, -1.71624755859375, 0.0469970703125, -0.000152587890625)) + s3 = evalpoly(μ, (1.0478515625, -1.1591796875, 0.1123046875, -0.0009765625)) + s2 = evalpoly(μ, (-0.1953125, 0.203125, -0.0078125)) + s1 = evalpoly(μ, (0.125, -0.125)) + + P = (1.0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, s17, s18, s19, s20) α, αp = split_phase_evalpoly(xinv, P) return α*x, αp end @@ -175,43 +177,41 @@ end function _α_αp_poly_30(v, x::T) where T xinv = inv(x)^2 μ = 4 * v^2 - s0 = one(T) - s1 = (1 - μ) / 8 - s2 = evalpoly(μ, (-0.1953125, 0.203125, -0.0078125)) - s3 = evalpoly(μ, (1.0478515625, -1.1591796875, 0.1123046875, -0.0009765625)) - s4 = evalpoly(μ, (-11.466461181640625, 13.1358642578125, -1.71624755859375, 0.0469970703125, -0.000152587890625)) - s5 = evalpoly(μ, (211.27614974975586, -246.8455924987793, 37.067405700683594, -1.5151596069335938, 0.017223358154296875, -2.6702880859375e-5)) - s6 = evalpoly(μ, (-5892.0457146167755, 6965.548173427582, -1128.6143367290497, 56.11658954620361, -1.0105445384979248, 0.005837917327880859, -5.0067901611328125e-6)) - s7 = evalpoly(μ, (231884.6359563172, -276225.9131319225, 46889.68168082833, -2607.1347218453884, 59.29277476668358, -0.5644365847110748, 0.0018794238567352295, -9.834766387939453e-7)) - s8 = evalpoly(μ, (-1.225106763286615e7, 1.4670878180751745e7, -2.5692206274838205e6, 153362.43350451812, -4001.4928083932027, 49.41718461737037, -0.2788656409829855, 0.0005833245813846588, -1.9976869225502014e-7)) - s9 = evalpoly(μ, (8.369564497799761e8, -1.0061560971482614e9, 1.80175839935865e8, -1.1293844119552301e7, 322272.3393258663, -4655.44006793818, 34.77845393284224, -0.12591543863527477, 0.0001761710154823959, -4.1618477553129196e-8)) - s10 = evalpoly(μ, (-7.181611223268327e10, 8.659091218989731e10, -1.576853447634526e10, 1.0243675365394899e9, -3.1127612822052997e7, 499001.19046756154, -4427.281508191307, 21.557856538012857, -0.053067848184582544, 5.209072696743533e-5, -8.843926480039954e-9)) - s11 = evalpoly(μ, (7.562132599676877e12, -9.139342212003133e12, 1.686263984004851e12, -1.1257747938365613e11, 3.584384568770644e9, -6.188986771037158e7, 616601.7257690447, -3609.808395761912, 12.103919447801218, -0.021179858537379914, 1.5144118606258417e-5, -1.909484126372263e-9)) - s12 = evalpoly(μ, (-9.588236853265692e14, 1.161016591203577e15, -2.164822377227822e14, 1.4768015151140877e13, -4.8748767898914606e11, 8.900147704533855e9, -9.641151011038888e7, 640028.5410983711, -2606.385824929625, 6.277422845836725, -0.008087900592073538, 4.342405588886322e-6, -4.176996526439325e-10)) - s13 = evalpoly(μ, (1.4409993748135704e17, -1.747635582560889e17, 3.286944341694018e16, -2.2818860422499875e15, 7.75248528894739e13, -1.4783938404512664e12, 1.7064572063331423e10, -1.2415577730993801e8, 578046.6774168271, -1705.2186748496474, 3.0504712266430722, -0.0029777336087200013, 1.2309086638850886e-6, -9.237588471933122e-11)) - s14 = evalpoly(μ, (-2.5330554576498356e19, 3.0761765051109855e19, -5.827690025164462e18, 4.1047854971841363e17, -1.4277576770556304e16, 2.819724813029272e14, -3.4214400566025547e12, 2.670056925037507e10, -1.3717353508462998e8, 465890.6725849346, -1028.1881576107903, 1.4039031226739573, -0.0010631539871280848, 3.4554354377824836e-7, -2.061961712485072e-11)) - s15 = evalpoly(μ, (5.149237018485509e21, -6.260437088008504e21, 1.1933270317945127e21, -8.508441473311652e19, 3.0180281284560543e18, -6.1344355915029736e16, 7.750474619361342e14, -6.393706192980096e12, 3.543452904857713e10, -1.3358182185805681e8, 341472.1144099866, -578.7806110577233, 0.6169921485050097, -0.00036976968916281605, 9.619824624385043e-8, -4.639413853091412e-12)) - s16 = evalpoly(μ, (-1.1986350446061028e24, 1.458736721654471e24, -2.795293505867967e23, 2.0139038975089457e22, -7.262922096794037e20, 1.5122633519520676e19, -1.975555191650512e17, 1.7050149800082885e15, -1.0037673890747877e13, 4.1025284625807785e10, -1.1700278886842367e8, 230919.39384718135, -307.22947128726474, 0.260626935759175, -0.0001257334987819726, 2.658906071879852e-8, -1.051117201091023e-12)) - s17 = evalpoly(μ, (3.167717078292175e26, -3.8584266638650446e26, 7.4277307068246446e25, -5.399729057323595e24, 1.9752248974202056e23, -4.197842582814349e21, 5.640147455618286e19, -5.0538188484912346e17, 3.1258357574848365e15, -1.3629748027461303e13, 4.233000035928751e10, -9.36296364559977e7, 145724.23973885347, -155.01792293897955, 0.10637041031529318, -4.191933776256961e-5, 7.303030923530292e-9, -2.3959289142515966e-13)) - s18 = evalpoly(μ, (-9.432675683095812e28, 1.1498154949132059e29, -2.2224123014148547e28, 1.6283472309548362e27, -6.03034763221407e25, 1.3043849059659297e24, -1.7950710383376238e22, 1.6602291470434327e20, -1.0700309670904285e18, 4.92026735148727e15, -1.6365119263912514e13, 3.957355516860315e10, -6.930551343828379e7, 86599.59532013819, -74.82883257079231, 0.042123857348712865, -1.3735762526818516e-5, 1.994760566671595e-9, -5.490670428493242e-14)) - s19 = evalpoly(μ, (3.1436617397720927e31, -3.8346121964186915e31, 7.438172213027661e30, -5.487658176284203e29, 2.0543110479331377e28, -4.512190593153004e26, 6.33949148154985e24, -6.024489803885022e22, 4.020727203383251e20, -1.9328978639294188e18, 6.802550072768408e15, -1.767751414955178e13, 3.3964900375451138e10, -4.792703592867111e7, 48822.71795456563, -34.73905348751307, 0.01624286720956346, -4.43222001918643e-6, 5.421693881235296e-10, -1.2642991118241018e-14)) - s20 = even_odd_poly_add(μ, (-1.1655823449858069e34, 1.4226232333293694e34, -2.7683048917097874e33, 2.0549175959945544e32, -7.766193794571668e30, 1.7289192571208397e29, -2.473355129610242e27, 2.406335820680262e25, -1.6548511836241395e23, 8.261988206301513e20, -3.048956971903377e18, 8.409146358453666e15, -1.7416884938569994e13, 2.7048317602344254e10, -3.1216507081066556e7, 26272.21159305084, -15.578788452840763, 0.0061163849392160095, -1.4107081622121022e-6, 1.4671084930995856e-10, -2.9236916960932355e-15)) - s21 = even_odd_poly_add(μ, (4.7820456670665866e36, -5.839767806978455e36, 1.139609569657776e36, -8.505736729879162e34, 3.241923388548771e33, -7.303696541971675e31, 1.061598557628623e30, -1.0542835823932327e28, 7.4416439961740466e25, -3.8383112218012e23, 1.4749530840065974e21, -4.277160387520148e18, 9.428034079487212e15, -1.582775791680076e13, 2.0161618573658318e10, -1.9279964972155876e7, 13562.78784549061, -6.773533616718505, 0.0022547380647248, -4.4351435924730097e-7, 3.9542564728199e-11, -6.787141437359297e-16)) - s22 = even_odd_poly_add(μ, (-2.1603839510459968e39, 2.639521237493071e39, -5.164169654060501e38, 3.873385769490781e37, -1.4875551809791352e36, 3.3870740530372218e34, -4.993086633044377e32, 5.049452384590897e30, -3.646484825050138e28, 1.934929035289944e26, -7.699788293506606e23, 2.3306500988206443e21, -5.414879939834449e18, 9.69892178268169e15, -1.3389590376401615e13, 1.4169012254830626e10, -1.1355350548005087e7, 6745.941285011119, -2.8643019266046954, 0.0008154154591207295, -1.3789599324701242e-7, 1.061958568923219e-11, -1.5810954484757452e-16)) - s23 = even_odd_poly_add(μ, (1.0699708275991454e42, -1.3078533633276038e42, 2.5647480608865752e41, -1.9322501955238208e40, 7.471528599453178e38, -1.7175047656287374e37, 2.56398527252613e35, -2.6350896428114214e33, 1.9417708082703794e31, -1.0563755426904998e29, 4.333903992576568e26, -1.3614388053852227e24, 3.3089693719445074e21, -6.261128573879847e18, 9.243346554045246e15, -1.0625592945166727e13, 9.4457596395905e9, -6.4083469576330995e6, 3244.624388704194, -1.1811472686414501, 0.0002898188382446864, -4.2443950630387665e-8, 2.84271079789386e-12, -3.694951319807448e-17)) - s24 = even_odd_poly_add(μ, (-5.786059033524315e44, 7.075318200534661e44, -1.3904375539321083e44, 1.051770598467428e43, -4.0921342782576984e41, 9.487906954286141e39, -1.4325415965940442e38, 1.493677625028016e36, -1.1206631946323043e34, 6.2329465039514265e31, -2.626782977025989e29, 8.52403241555426e26, -2.1544180262833415e24, 4.273241060880315e21, -6.678193343397941e18, 8.226793217207085e15, -7.9615210223039795e12, 6.004451011853662e9, -3.4795218728555855e6, 1513.831326319914, -0.4760701870709445, 0.00010139500470517733, -1.2944568154864108e-8, 7.586889731852131e-13, -8.660042155798706e-18)) - s25 = even_odd_poly_add(μ, (3.4037481878842518e47, -4.163722422572948e47, 8.198385202264364e46, -6.22435990386475e45, 2.4353618503436353e44, -5.690731110001809e42, 8.680616408346572e40, -9.169497515863974e38, 6.991529767882026e36, -3.9660440566717967e34, 1.7117897755074633e32, -5.716342746132164e29, 1.495186253411991e27, -3.089698915505606e24, 5.071094031947313e21, -6.62564031827467e18, 6.884682491993269e15, -5.663687113496129e12, 3.6558083666029415e9, -1.8241160174217927e6, 687.0067933018984, -0.1879264018835715, 3.496541491784091e-5, -3.914759734732158e-9, 2.0193378048364477e-13, -2.035109906612696e-18)) - s26 = even_odd_poly_add(μ, (-2.170796074547977e50, 2.6563886780963143e50, -5.239744551853566e49, 3.9915243203539826e48, -1.5697710844957169e47, 3.694226454576932e45, -5.687790414754595e43, 6.07923257088654e41, -4.703231744077508e39, 2.715669597352839e37, -1.1973880447446774e35, 4.101798034247621e32, -1.1059082744278117e30, 2.3689970250205793e27, -4.057770223206878e24, 5.577674944614657e21, -6.157880219725851e18, 5.448993990587677e15, -3.8435237604702446e12, 2.1401262084993436e9, -926134.0995426074, 303.9782133922326, -0.07278018905169194, 1.1898982367956518e-5, -1.1748038677566303e-9, 5.361217221358988e-14, -4.794249299231832e-19)) - s27 = even_odd_poly_add(μ, (1.4962552090981924e53, -1.8315342344152888e53, 3.6186332587139524e52, -2.7651411770117913e51, 1.092593756883467e50, -2.5880088398643682e48, 4.0185482602383215e46, -4.341325948517365e44, 3.40330197791503e42, -1.996788871925338e40, 8.974814912978575e37, -3.1454308144632116e35, 8.712781142577153e32, -1.926817207371682e30, 3.4266421642703216e27, -4.923376108039163e24, 5.727723667496557e21, -5.393876507549732e18, 4.099268265682976e15, -2.498492707776039e12, 1.2086394541382809e9, -456609.83322422515, 131.40817769348385, -0.027695807224792045, 4.000233368100494e-6, -3.500503095889607e-10, 1.4200746208673407e-14, -1.1319755289852937e-19)) - s28 = even_odd_poly_add(μ, (-1.1113660587118494e56, 1.360796163396552e56, -2.692648562464633e55, 2.0634410442908336e54, -8.188692555802185e52, 1.9512412867297912e51, -3.0534326199740573e49, 3.3310997303957132e47, -2.6429272553053182e45, 1.573358131379098e43, -7.195503085038196e40, 2.5742410447166102e38, -7.305470671594484e35, 1.6621868613473995e33, -3.056128428896728e30, 4.5656808004766417e27, -5.560280477035352e24, 5.525982611412455e21, -4.4762143769251487e18, 2.944057191090032e15, -1.561376913130651e12, 6.60436019199837e8, -219122.78889988337, 55.602561558610454, -0.010370022987617815, 1.3297453832052619e-6, -1.0361746982713131e-10, 3.753418608703549e-15, -2.6783349569741323e-20)) - s29 = even_odd_poly_add(μ, (8.871640240590993e58, -1.0865691207568645e59, 2.153044379065757e58, -1.654292598675498e57, 6.591312178536168e55, -1.5792626981209235e54, 2.4890507915218916e52, -2.7398535977577976e50, 2.1978557435213864e48, -1.3258581553903244e46, 6.160064953128667e43, -2.24525395106052e41, 6.512651083776791e38, -1.520126754804397e36, 2.879357904563898e33, -4.453253892004961e30, 5.646779978807957e27, -5.882834513685185e24, 5.036061410449725e21, -3.535410901341911e18, 2.0262400502486065e15, -9.410029770358712e11, 3.500781492364049e8, -102565.9203518178, 23.065519747567176, -0.003825019881917803, 4.374396753566091e-7, -3.048458029283708e-11, 9.900967356259312e-16, -6.3495009755852275e-21)) s30 = even_odd_poly_add(μ, (-7.592029625744128e61, 9.300807898884993e61, -1.8453653700408117e61, 1.4213662513968141e60, -5.684267643368571e58, 1.3688721521734006e57, -2.1717210753568686e55, 2.410362055956752e53, -1.953160895382593e51, 1.1926329508677187e49, -5.621526725185766e46, 2.084010993835956e44, -6.16598654084696e41, 1.472798231204338e39, -2.8653790379578294e36, 4.5711759648399396e33, -6.008229949414824e30, 6.525582948238488e27, -5.863525845645105e24, 4.3559252317865593e21, -2.6682229171870643e18, 1.3409000748848645e15, -5.4845348768282446e11, 1.8042426705573353e8, -46913.0207873715, 9.39407807634952, -0.0013913710768178739, 1.4251320396079487e-7, -8.917800204478063e-12, 2.6068908049173686e-16, -1.5080064817014915e-21)) - - P = (s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, s17, s18, s19, s20, s21, s22, s23, s24, s25, s26, s27, s28, s29, s30) + s29 = even_odd_poly_add(μ, (8.871640240590993e58, -1.0865691207568645e59, 2.153044379065757e58, -1.654292598675498e57, 6.591312178536168e55, -1.5792626981209235e54, 2.4890507915218916e52, -2.7398535977577976e50, 2.1978557435213864e48, -1.3258581553903244e46, 6.160064953128667e43, -2.24525395106052e41, 6.512651083776791e38, -1.520126754804397e36, 2.879357904563898e33, -4.453253892004961e30, 5.646779978807957e27, -5.882834513685185e24, 5.036061410449725e21, -3.535410901341911e18, 2.0262400502486065e15, -9.410029770358712e11, 3.500781492364049e8, -102565.9203518178, 23.065519747567176, -0.003825019881917803, 4.374396753566091e-7, -3.048458029283708e-11, 9.900967356259312e-16, -6.3495009755852275e-21)) + s28 = even_odd_poly_add(μ, (-1.1113660587118494e56, 1.360796163396552e56, -2.692648562464633e55, 2.0634410442908336e54, -8.188692555802185e52, 1.9512412867297912e51, -3.0534326199740573e49, 3.3310997303957132e47, -2.6429272553053182e45, 1.573358131379098e43, -7.195503085038196e40, 2.5742410447166102e38, -7.305470671594484e35, 1.6621868613473995e33, -3.056128428896728e30, 4.5656808004766417e27, -5.560280477035352e24, 5.525982611412455e21, -4.4762143769251487e18, 2.944057191090032e15, -1.561376913130651e12, 6.60436019199837e8, -219122.78889988337, 55.602561558610454, -0.010370022987617815, 1.3297453832052619e-6, -1.0361746982713131e-10, 3.753418608703549e-15, -2.6783349569741323e-20)) + s27 = even_odd_poly_add(μ, (1.4962552090981924e53, -1.8315342344152888e53, 3.6186332587139524e52, -2.7651411770117913e51, 1.092593756883467e50, -2.5880088398643682e48, 4.0185482602383215e46, -4.341325948517365e44, 3.40330197791503e42, -1.996788871925338e40, 8.974814912978575e37, -3.1454308144632116e35, 8.712781142577153e32, -1.926817207371682e30, 3.4266421642703216e27, -4.923376108039163e24, 5.727723667496557e21, -5.393876507549732e18, 4.099268265682976e15, -2.498492707776039e12, 1.2086394541382809e9, -456609.83322422515, 131.40817769348385, -0.027695807224792045, 4.000233368100494e-6, -3.500503095889607e-10, 1.4200746208673407e-14, -1.1319755289852937e-19)) + s26 = even_odd_poly_add(μ, (-2.170796074547977e50, 2.6563886780963143e50, -5.239744551853566e49, 3.9915243203539826e48, -1.5697710844957169e47, 3.694226454576932e45, -5.687790414754595e43, 6.07923257088654e41, -4.703231744077508e39, 2.715669597352839e37, -1.1973880447446774e35, 4.101798034247621e32, -1.1059082744278117e30, 2.3689970250205793e27, -4.057770223206878e24, 5.577674944614657e21, -6.157880219725851e18, 5.448993990587677e15, -3.8435237604702446e12, 2.1401262084993436e9, -926134.0995426074, 303.9782133922326, -0.07278018905169194, 1.1898982367956518e-5, -1.1748038677566303e-9, 5.361217221358988e-14, -4.794249299231832e-19)) + s25 = even_odd_poly_add(μ, (3.4037481878842518e47, -4.163722422572948e47, 8.198385202264364e46, -6.22435990386475e45, 2.4353618503436353e44, -5.690731110001809e42, 8.680616408346572e40, -9.169497515863974e38, 6.991529767882026e36, -3.9660440566717967e34, 1.7117897755074633e32, -5.716342746132164e29, 1.495186253411991e27, -3.089698915505606e24, 5.071094031947313e21, -6.62564031827467e18, 6.884682491993269e15, -5.663687113496129e12, 3.6558083666029415e9, -1.8241160174217927e6, 687.0067933018984, -0.1879264018835715, 3.496541491784091e-5, -3.914759734732158e-9, 2.0193378048364477e-13, -2.035109906612696e-18)) + s24 = even_odd_poly_add(μ, (-5.786059033524315e44, 7.075318200534661e44, -1.3904375539321083e44, 1.051770598467428e43, -4.0921342782576984e41, 9.487906954286141e39, -1.4325415965940442e38, 1.493677625028016e36, -1.1206631946323043e34, 6.2329465039514265e31, -2.626782977025989e29, 8.52403241555426e26, -2.1544180262833415e24, 4.273241060880315e21, -6.678193343397941e18, 8.226793217207085e15, -7.9615210223039795e12, 6.004451011853662e9, -3.4795218728555855e6, 1513.831326319914, -0.4760701870709445, 0.00010139500470517733, -1.2944568154864108e-8, 7.586889731852131e-13, -8.660042155798706e-18)) + s23 = even_odd_poly_add(μ, (1.0699708275991454e42, -1.3078533633276038e42, 2.5647480608865752e41, -1.9322501955238208e40, 7.471528599453178e38, -1.7175047656287374e37, 2.56398527252613e35, -2.6350896428114214e33, 1.9417708082703794e31, -1.0563755426904998e29, 4.333903992576568e26, -1.3614388053852227e24, 3.3089693719445074e21, -6.261128573879847e18, 9.243346554045246e15, -1.0625592945166727e13, 9.4457596395905e9, -6.4083469576330995e6, 3244.624388704194, -1.1811472686414501, 0.0002898188382446864, -4.2443950630387665e-8, 2.84271079789386e-12, -3.694951319807448e-17)) + s22 = even_odd_poly_add(μ, (-2.1603839510459968e39, 2.639521237493071e39, -5.164169654060501e38, 3.873385769490781e37, -1.4875551809791352e36, 3.3870740530372218e34, -4.993086633044377e32, 5.049452384590897e30, -3.646484825050138e28, 1.934929035289944e26, -7.699788293506606e23, 2.3306500988206443e21, -5.414879939834449e18, 9.69892178268169e15, -1.3389590376401615e13, 1.4169012254830626e10, -1.1355350548005087e7, 6745.941285011119, -2.8643019266046954, 0.0008154154591207295, -1.3789599324701242e-7, 1.061958568923219e-11, -1.5810954484757452e-16)) + s21 = even_odd_poly_add(μ, (4.7820456670665866e36, -5.839767806978455e36, 1.139609569657776e36, -8.505736729879162e34, 3.241923388548771e33, -7.303696541971675e31, 1.061598557628623e30, -1.0542835823932327e28, 7.4416439961740466e25, -3.8383112218012e23, 1.4749530840065974e21, -4.277160387520148e18, 9.428034079487212e15, -1.582775791680076e13, 2.0161618573658318e10, -1.9279964972155876e7, 13562.78784549061, -6.773533616718505, 0.0022547380647248, -4.4351435924730097e-7, 3.9542564728199e-11, -6.787141437359297e-16)) + s20 = evalpoly(μ, (-1.1655823449858069e34, 1.4226232333293694e34, -2.7683048917097874e33, 2.0549175959945544e32, -7.766193794571668e30, 1.7289192571208397e29, -2.473355129610242e27, 2.406335820680262e25, -1.6548511836241395e23, 8.261988206301513e20, -3.048956971903377e18, 8.409146358453666e15, -1.7416884938569994e13, 2.7048317602344254e10, -3.1216507081066556e7, 26272.21159305084, -15.578788452840763, 0.0061163849392160095, -1.4107081622121022e-6, 1.4671084930995856e-10, -2.9236916960932355e-15)) + s19 = evalpoly(μ, (3.1436617397720927e31, -3.8346121964186915e31, 7.438172213027661e30, -5.487658176284203e29, 2.0543110479331377e28, -4.512190593153004e26, 6.33949148154985e24, -6.024489803885022e22, 4.020727203383251e20, -1.9328978639294188e18, 6.802550072768408e15, -1.767751414955178e13, 3.3964900375451138e10, -4.792703592867111e7, 48822.71795456563, -34.73905348751307, 0.01624286720956346, -4.43222001918643e-6, 5.421693881235296e-10, -1.2642991118241018e-14)) + s18 = evalpoly(μ, (-9.432675683095812e28, 1.1498154949132059e29, -2.2224123014148547e28, 1.6283472309548362e27, -6.03034763221407e25, 1.3043849059659297e24, -1.7950710383376238e22, 1.6602291470434327e20, -1.0700309670904285e18, 4.92026735148727e15, -1.6365119263912514e13, 3.957355516860315e10, -6.930551343828379e7, 86599.59532013819, -74.82883257079231, 0.042123857348712865, -1.3735762526818516e-5, 1.994760566671595e-9, -5.490670428493242e-14)) + s17 = evalpoly(μ, (3.167717078292175e26, -3.8584266638650446e26, 7.4277307068246446e25, -5.399729057323595e24, 1.9752248974202056e23, -4.197842582814349e21, 5.640147455618286e19, -5.0538188484912346e17, 3.1258357574848365e15, -1.3629748027461303e13, 4.233000035928751e10, -9.36296364559977e7, 145724.23973885347, -155.01792293897955, 0.10637041031529318, -4.191933776256961e-5, 7.303030923530292e-9, -2.3959289142515966e-13)) + s16 = evalpoly(μ, (-1.1986350446061028e24, 1.458736721654471e24, -2.795293505867967e23, 2.0139038975089457e22, -7.262922096794037e20, 1.5122633519520676e19, -1.975555191650512e17, 1.7050149800082885e15, -1.0037673890747877e13, 4.1025284625807785e10, -1.1700278886842367e8, 230919.39384718135, -307.22947128726474, 0.260626935759175, -0.0001257334987819726, 2.658906071879852e-8, -1.051117201091023e-12)) + s15 = evalpoly(μ, (5.149237018485509e21, -6.260437088008504e21, 1.1933270317945127e21, -8.508441473311652e19, 3.0180281284560543e18, -6.1344355915029736e16, 7.750474619361342e14, -6.393706192980096e12, 3.543452904857713e10, -1.3358182185805681e8, 341472.1144099866, -578.7806110577233, 0.6169921485050097, -0.00036976968916281605, 9.619824624385043e-8, -4.639413853091412e-12)) + s14 = evalpoly(μ, (-2.5330554576498356e19, 3.0761765051109855e19, -5.827690025164462e18, 4.1047854971841363e17, -1.4277576770556304e16, 2.819724813029272e14, -3.4214400566025547e12, 2.670056925037507e10, -1.3717353508462998e8, 465890.6725849346, -1028.1881576107903, 1.4039031226739573, -0.0010631539871280848, 3.4554354377824836e-7, -2.061961712485072e-11)) + s13 = evalpoly(μ, (1.4409993748135704e17, -1.747635582560889e17, 3.286944341694018e16, -2.2818860422499875e15, 7.75248528894739e13, -1.4783938404512664e12, 1.7064572063331423e10, -1.2415577730993801e8, 578046.6774168271, -1705.2186748496474, 3.0504712266430722, -0.0029777336087200013, 1.2309086638850886e-6, -9.237588471933122e-11)) + s12 = evalpoly(μ, (-9.588236853265692e14, 1.161016591203577e15, -2.164822377227822e14, 1.4768015151140877e13, -4.8748767898914606e11, 8.900147704533855e9, -9.641151011038888e7, 640028.5410983711, -2606.385824929625, 6.277422845836725, -0.008087900592073538, 4.342405588886322e-6, -4.176996526439325e-10)) + s11 = evalpoly(μ, (7.562132599676877e12, -9.139342212003133e12, 1.686263984004851e12, -1.1257747938365613e11, 3.584384568770644e9, -6.188986771037158e7, 616601.7257690447, -3609.808395761912, 12.103919447801218, -0.021179858537379914, 1.5144118606258417e-5, -1.909484126372263e-9)) + s10 = evalpoly(μ, (-7.181611223268327e10, 8.659091218989731e10, -1.576853447634526e10, 1.0243675365394899e9, -3.1127612822052997e7, 499001.19046756154, -4427.281508191307, 21.557856538012857, -0.053067848184582544, 5.209072696743533e-5, -8.843926480039954e-9)) + s9 = evalpoly(μ, (8.369564497799761e8, -1.0061560971482614e9, 1.80175839935865e8, -1.1293844119552301e7, 322272.3393258663, -4655.44006793818, 34.77845393284224, -0.12591543863527477, 0.0001761710154823959, -4.1618477553129196e-8)) + s8 = evalpoly(μ, (-1.225106763286615e7, 1.4670878180751745e7, -2.5692206274838205e6, 153362.43350451812, -4001.4928083932027, 49.41718461737037, -0.2788656409829855, 0.0005833245813846588, -1.9976869225502014e-7)) + s7 = evalpoly(μ, (231884.6359563172, -276225.9131319225, 46889.68168082833, -2607.1347218453884, 59.29277476668358, -0.5644365847110748, 0.0018794238567352295, -9.834766387939453e-7)) + s6 = evalpoly(μ, (-5892.0457146167755, 6965.548173427582, -1128.6143367290497, 56.11658954620361, -1.0105445384979248, 0.005837917327880859, -5.0067901611328125e-6)) + s5 = evalpoly(μ, (211.27614974975586, -246.8455924987793, 37.067405700683594, -1.5151596069335938, 0.017223358154296875, -2.6702880859375e-5)) + s4 = evalpoly(μ, (-11.466461181640625, 13.1358642578125, -1.71624755859375, 0.0469970703125, -0.000152587890625)) + s3 = evalpoly(μ, (1.0478515625, -1.1591796875, 0.1123046875, -0.0009765625)) + s2 = evalpoly(μ, (-0.1953125, 0.203125, -0.0078125)) + s1 = evalpoly(μ, (0.125, -0.125)) + + P = (1.0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, s17, s18, s19, s20, s21, s22, s23, s24, s25, s26, s27, s28, s29, s30) α, αp = split_phase_evalpoly(xinv, P) return α*x, αp end - # this function evaluates the phase and integral at the same time (more efficiently) for example given some polynomial P with coeffficients s0, s1, ... # we use this function when the size of P is large (length(P) > 20) as it is more efficient # P = (s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, s17, s18, s19, s20, s21, s22, s23, s24, s25, s26, s27, s28, s29, s30) diff --git a/src/misc.jl b/src/misc.jl index 3ef9e79..6be8c72 100644 --- a/src/misc.jl +++ b/src/misc.jl @@ -44,4 +44,4 @@ end w = fn * 6.07710050650619224932e-11 y = r-w return unsafe_trunc(Int, fn), Base.Math.DoubleFloat64(y, (r-y)-w) -end \ No newline at end of file +end