@@ -24,9 +24,15 @@ namespace tgamma_detail {
2424template <bool b>
2525struct tgamma_table_imp
2626{
27- static constexpr std::array<decimal32, 15 > d32_coeffs =
27+ private:
28+ using d32_coeffs_t = std::array<decimal32, 15 >;
29+ using d64_coeffs_t = std::array<decimal64, 36 >;
30+ using d128_coeffs_t = std::array<decimal128, 44 >;
31+
32+ public:
33+ static constexpr d32_coeffs_t d32_coeffs =
2834 {{
29- // N[Series[1/Gamma[z], {z, 0, 16}], 24 ]
35+ // N[Series[1/Gamma[z], {z, 0, 16}], 19 ]
3036 +::boost::decimal::decimal32 { UINT64_C (5'772'156'649'015'328'606 ), - 19 - 0 }, // * z^2
3137 -::boost::decimal::decimal32 { UINT64_C (6'558'780'715'202'538'811 ), - 19 - 0 }, // * z^3
3238 -::boost::decimal::decimal32 { UINT64_C (4'200'263'503'409'523'553 ), - 19 - 1 }, // * z^4
@@ -44,9 +50,9 @@ struct tgamma_table_imp
4450 +::boost::decimal::decimal32 { UINT64_C (6'116'095'104'481'415'818 ), - 19 - 8 }, // * z^16
4551 }};
4652
47- static constexpr std::array<decimal64, 36 > d64_coeffs =
53+ static constexpr d64_coeffs_t d64_coeffs =
4854 {{
49- // N[Series[1/Gamma[z], {z, 0, 27}], 24 ]
55+ // N[Series[1/Gamma[z], {z, 0, 27}], 19 ]
5056 +::boost::decimal::decimal64 { UINT64_C (5'772'156'649'015'328'606 ), - 19 - 0 }, // * z^2
5157 -::boost::decimal::decimal64 { UINT64_C (6'558'780'715'202'538'811 ), - 19 - 0 }, // * z^3
5258 -::boost::decimal::decimal64 { UINT64_C (4'200'263'503'409'523'553 ), - 19 - 1 }, // * z^4
@@ -75,9 +81,9 @@ struct tgamma_table_imp
7581 +::boost::decimal::decimal64 { UINT64_C (1'186'692'254'751'600'333 ), - 19 - 17 }, // * z^27
7682 }};
7783
78- static constexpr std::array<decimal128, 44 > d128_coeffs =
84+ static constexpr d128_coeffs_t d128_coeffs =
7985 {{
80- // N[Series[1/Gamma[z], {z, 0, 27 }], 24 ]
86+ // N[Series[1/Gamma[z], {z, 0, 45 }], 36 ]
8187 +::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C (312909238939453 ), UINT64_C (7916302232898517972 ) }, -34 }, // * z^2
8288 -::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C (355552215013931 ), UINT64_C (2875353717947891404 ) }, -34 }, // * z^3
8389 -::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C (227696740770409 ), UINT64_C (1287992959696612036 ) }, -35 }, // * z^4
@@ -104,24 +110,24 @@ struct tgamma_table_imp
104110 +::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C (66503802694735 ), UINT64_C (8619931044472680662 ) }, -48 }, // * z^25
105111 -::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C (64036195058454 ), UINT64_C (13570784405336680634 ) }, -49 }, // * z^26
106112 +::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C (64330716033670 ), UINT64_C (6228121739584017954 ) }, -51 }, // * z^27
107- +::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C (76565308743615 ), UINT64_C (9665163337994634860 ) }, -51 },
108- -::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C (124615253252825 ), UINT64_C (5713012462345318490 ) }, -52 },
109- +::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C (92938152937825 ), UINT64_C (2160517649493992050 ) }, -53 },
110- +::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C (72497982578925 ), UINT64_C (10055707640313829460 ) }, -55 },
111- -::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C (111360223980902 ), UINT64_C (528747408384118098 ) }, -55 },
112- +::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C (148320486134320 ), UINT64_C (12662323637555269860 ) }, -56 },
113- -::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C (93911231108772 ), UINT64_C (8663955293807189228 ) }, -57 },
114- -::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C (127969413738636 ), UINT64_C (17978922200959991754 ) }, -59 },
115- +::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C (101100927852914 ), UINT64_C (16158702556622869636 ) }, -59 },
116- -::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C (120243204727301 ), UINT64_C (13141135468649758444 ) }, -60 },
117- +::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C (70352901832557 ), UINT64_C (2975454173305568482 ) }, -61 },
118- +::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C (64005738370342 ), UINT64_C (18063645830042937300 ) }, -63 },
119- -::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C (60963839731470 ), UINT64_C (14965217315129705920 ) }, -63 },
120- +::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C (69230926066837 ), UINT64_C (16656915204960392533 ) }, -64 },
121- -::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C (400691370795862 ), UINT64_C (16972369904241895558 ) }, -66 },
122- +::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C (61514934723438 ), UINT64_C (5918930041313493498 ) }, -68 },
123- +::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C (251487992814431 ), UINT64_C (6680121266003781724 ) }, -68 },
124- -::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C (289879709778175 ), UINT64_C (4432551928123929090 ) }, -69 },
113+ +::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C (76565308743615 ), UINT64_C (9665163337994634860 ) }, -51 }, // * z^28
114+ -::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C (124615253252825 ), UINT64_C (5713012462345318490 ) }, -52 }, // * z^29
115+ +::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C (92938152937825 ), UINT64_C (2160517649493992050 ) }, -53 }, // * z^30
116+ +::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C (72497982578925 ), UINT64_C (10055707640313829460 ) }, -55 }, // * z^31
117+ -::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C (111360223980902 ), UINT64_C (528747408384118098 ) }, -55 }, // * z^32
118+ +::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C (148320486134320 ), UINT64_C (12662323637555269860 ) }, -56 }, // * z^33
119+ -::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C (93911231108772 ), UINT64_C (8663955293807189228 ) }, -57 }, // * z^34
120+ -::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C (127969413738636 ), UINT64_C (17978922200959991754 ) }, -59 }, // * z^35
121+ +::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C (101100927852914 ), UINT64_C (16158702556622869636 ) }, -59 }, // * z^36
122+ -::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C (120243204727301 ), UINT64_C (13141135468649758444 ) }, -60 }, // * z^37
123+ +::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C (70352901832557 ), UINT64_C (2975454173305568482 ) }, -61 }, // * z^38
124+ +::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C (64005738370342 ), UINT64_C (18063645830042937300 ) }, -63 }, // * z^39
125+ -::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C (60963839731470 ), UINT64_C (14965217315129705920 ) }, -63 }, // * z^40
126+ +::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C (69230926066837 ), UINT64_C (16656915204960392533 ) }, -64 }, // * z^41
127+ -::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C (400691370795862 ), UINT64_C (16972369904241895558 ) }, -66 }, // * z^42
128+ +::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C (61514934723438 ), UINT64_C (5918930041313493498 ) }, -68 }, // * z^43
129+ +::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C (251487992814431 ), UINT64_C (6680121266003781724 ) }, -68 }, // * z^44
130+ -::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C (289879709778175 ), UINT64_C (4432551928123929090 ) }, -69 }, // * z^45
125131 }};
126132};
127133
0 commit comments