Skip to content

Commit 9ea4614

Browse files
authored
Merge pull request #536 from cppalliance/logarithmic_funcs
fix #534 and fix #535 via improve log funcs
2 parents 84785bf + a001179 commit 9ea4614

File tree

9 files changed

+632
-236
lines changed

9 files changed

+632
-236
lines changed

include/boost/decimal/detail/cmath/impl/cosh_impl.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ constexpr typename cosh_table_imp<b>::d128_coeffs_t cosh_table_imp<b>::d128_coef
9999
using cosh_table = cosh_detail::cosh_table_imp<true>;
100100

101101
template <BOOST_DECIMAL_DECIMAL_FLOATING_TYPE T>
102-
constexpr auto cosh_series_expansion(T z) noexcept;
102+
constexpr auto cosh_series_expansion(T z2) noexcept;
103103

104104
template <>
105105
constexpr auto cosh_series_expansion<decimal32>(decimal32 z2) noexcept
Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
// Copyright 2023 - 2024 Matt Borland
2+
// Copyright 2023 - 2024 Christopher Kormanyos
3+
// Distributed under the Boost Software License, Version 1.0.
4+
// https://www.boost.org/LICENSE_1_0.txt
5+
6+
#ifndef BOOST_DECIMAL_DETAIL_CMATH_IMPL_LOG1P_IMPL_HPP
7+
#define BOOST_DECIMAL_DETAIL_CMATH_IMPL_LOG1P_IMPL_HPP
8+
9+
#include <boost/decimal/detail/concepts.hpp>
10+
#include <boost/decimal/detail/cmath/impl/taylor_series_result.hpp>
11+
12+
#ifndef BOOST_DECIMAL_BUILD_MODULE
13+
#include <array>
14+
#include <cstddef>
15+
#include <cstdint>
16+
#endif
17+
18+
namespace boost {
19+
namespace decimal {
20+
namespace detail {
21+
22+
namespace log1p_detail {
23+
24+
template <bool b>
25+
struct log1p_table_imp
26+
{
27+
private:
28+
using d32_coeffs_t = std::array<decimal32, 12>;
29+
using d64_coeffs_t = std::array<decimal64, 20>;
30+
using d128_coeffs_t = std::array<decimal128, 36>;
31+
32+
public:
33+
static constexpr d32_coeffs_t d32_coeffs =
34+
{{
35+
// Series[Log[1 + x], {x, 0, 13}]
36+
// (1), // * z
37+
-boost::decimal::decimal32 { 5, -1 }, // * z^2
38+
boost::decimal::decimal32 { UINT64_C(3333333333333333333), -19 }, // * z^3
39+
-boost::decimal::decimal32 { 25, -2 }, // * z^4
40+
boost::decimal::decimal32 { 2, -1 }, // * z^5
41+
-boost::decimal::decimal32 { UINT64_C(1666666666666666667), -19 }, // * z^6
42+
boost::decimal::decimal32 { UINT64_C(1428571428571428571), -19 }, // * z^7
43+
-boost::decimal::decimal32 { 125, -3 }, // * z^8
44+
boost::decimal::decimal32 { UINT64_C(1111111111111111111), -19 }, // * z^9
45+
-boost::decimal::decimal32 { 1, -1 }, // * z^10
46+
boost::decimal::decimal32 { UINT64_C(9090909090909090909), -19 - 1 }, // * z^11
47+
-boost::decimal::decimal32 { UINT64_C(8333333333333333333), -19 - 1 }, // * z^12
48+
boost::decimal::decimal32 { UINT64_C(7692307692307692308), -19 - 1 }, // * z^13
49+
}};
50+
51+
static constexpr d64_coeffs_t d64_coeffs =
52+
{{
53+
// Series[Log[1 + x], {x, 0, 21}]
54+
// (1), // * z
55+
-boost::decimal::decimal64 { 5, -1 }, // * z^2
56+
boost::decimal::decimal64 { UINT64_C(3333333333333333333), -19 }, // * z^3
57+
-boost::decimal::decimal64 { 25, -2 }, // * z^4
58+
boost::decimal::decimal64 { 2, -1 }, // * z^5
59+
-boost::decimal::decimal64 { UINT64_C(1666666666666666667), -19 }, // * z^6
60+
boost::decimal::decimal64 { UINT64_C(1428571428571428571), -19 }, // * z^7
61+
-boost::decimal::decimal64 { 125, -3 }, // * z^8
62+
boost::decimal::decimal64 { UINT64_C(1111111111111111111), -19 }, // * z^9
63+
-boost::decimal::decimal64 { 1, -1 }, // * z^10
64+
boost::decimal::decimal64 { UINT64_C(9090909090909090909), -19 - 1 }, // * z^11
65+
-boost::decimal::decimal64 { UINT64_C(8333333333333333333), -19 - 1 }, // * z^12
66+
boost::decimal::decimal64 { UINT64_C(7692307692307692308), -19 - 1 }, // * z^13
67+
-boost::decimal::decimal64 { UINT64_C(7142857142857142857), -19 - 1 }, // * z^14
68+
boost::decimal::decimal64 { UINT64_C(6666666666666666667), -19 - 1 }, // * z^15
69+
-boost::decimal::decimal64 { UINT64_C(6250000000000000000), -19 - 1 }, // * z^16
70+
boost::decimal::decimal64 { UINT64_C(5882352941176470588), -19 - 1 }, // * z^17
71+
-boost::decimal::decimal64 { UINT64_C(5555555555555555556), -19 - 1 }, // * z^18
72+
boost::decimal::decimal64 { UINT64_C(5263157894736842105), -19 - 1 }, // * z^19
73+
-boost::decimal::decimal64 { 5, -2 }, // * z^20
74+
boost::decimal::decimal64 { UINT64_C(4761904761904761905), -19 - 1 }, // * z^21
75+
}};
76+
77+
static constexpr d128_coeffs_t d128_coeffs =
78+
{{
79+
// Series[Log[(1 + (z/2))/(1 - (z/2))], {z, 0, 43}]
80+
// (1), // * z
81+
-::boost::decimal::decimal128 { 5, -1 }, // * z^2
82+
::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(180700362080917), UINT64_C(7483252092553221458) }, -34 }, // * z^3
83+
-::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(135525271560688), UINT64_C(1000753050987528192) }, -34 }, // * z^4
84+
::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(108420217248550), UINT64_C(8179300070273843200) }, -34 }, // * z^5
85+
-::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(90350181040458), UINT64_C(12964998083131386532) }, -34 }, // * z^6
86+
::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(77443012320393), UINT64_C(3207108039665666332) }, -34 }, // * z^7
87+
-::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(67762635780344), UINT64_C(500376525493764096) }, -34 }, // * z^8
88+
::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(60233454026972), UINT64_C(8643332055420924359) }, -34 }, // * z^9
89+
-::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(54210108624275), UINT64_C(4089650035136921600) }, -34 }, // * z^10
90+
::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(492819169311592), UINT64_C(17054915875379776418) }, -35 }, // * z^11
91+
-::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(451750905202293), UINT64_C(9484758194528277842) }, -35 }, // * z^12
92+
::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(417000835571347), UINT64_C(15850062977145160938) }, -35 }, // * z^13
93+
-::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(387215061601965), UINT64_C(16035540198328331700) }, -35 }, // * z^14
94+
::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(361400724161834), UINT64_C(14966504185106442916) }, -35 }, // * z^15
95+
-::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(338813178901720), UINT64_C(2501882627468820480) }, -35 }, // * z^16
96+
::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(318882991907501), UINT64_C(5610020838860575434) }, -35 }, // * z^17
97+
-::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(301167270134862), UINT64_C(6323172129685518558) }, -35 }, // * z^18
98+
::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(285316361180395), UINT64_C(16670067533954968520) }, -35 }, // * z^19
99+
-::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(271050543121376), UINT64_C(2001506101975056384) }, -35 }, // * z^20
100+
::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(258143374401310), UINT64_C(10690360132218887800) }, -35 }, // * z^21
101+
-::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(246409584655796), UINT64_C(8527457937689888204) }, -35 }, // * z^22
102+
::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(235696124453370), UINT64_C(9760763598982462770) }, -35 }, // * z^23
103+
-::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(225875452601146), UINT64_C(13965751134118914724) }, -35 }, // * z^24
104+
::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(216840434497100), UINT64_C(16358600140547686400) }, -35 }, // * z^25
105+
-::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(208500417785673), UINT64_C(17148403525427356272) }, -35 }, // * z^26
106+
::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(200778180089908), UINT64_C(4215448086457012372) }, -35 }, // * z^27
107+
-::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(193607530800982), UINT64_C(17241142136018941658) }, -35 }, // * z^28
108+
::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(186931409049224), UINT64_C(16646619993397598836) }, -35 }, // * z^29
109+
-::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(180700362080917), UINT64_C(7483252092553221458) }, -35 }, // * z^30
110+
::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(174871318142823), UINT64_C(5456688082434451252) }, -35 }, // * z^31
111+
-::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(169406589450860), UINT64_C(1250941313734410240) }, -35 }, // * z^32
112+
::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(164273056437197), UINT64_C(11833886649696442678) }, -35 }, // * z^33
113+
-::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(159441495953750), UINT64_C(12028382456285063520) }, -35 }, // * z^34
114+
::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(154886024640786), UINT64_C(6414216079331332674) }, -35 }, // * z^35
115+
-::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(150583635067431), UINT64_C(3161586064842759274) }, -35 }, // * z^36
116+
::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(146513807092635), UINT64_C(13545911456276754540) }, -35 }, // * z^37
117+
}};
118+
};
119+
120+
#if !(defined(__cpp_inline_variables) && __cpp_inline_variables >= 201606L) && (!defined(_MSC_VER) || _MSC_VER != 1900)
121+
122+
template <bool b>
123+
constexpr typename log1p_table_imp<b>::d32_coeffs_t log1p_table_imp<b>::d32_coeffs;
124+
125+
template <bool b>
126+
constexpr typename log1p_table_imp<b>::d64_coeffs_t log1p_table_imp<b>::d64_coeffs;
127+
128+
template <bool b>
129+
constexpr typename log1p_table_imp<b>::d128_coeffs_t log1p_table_imp<b>::d128_coeffs;
130+
131+
#endif
132+
133+
} //namespace log1p_detail
134+
135+
using log1p_table = log1p_detail::log1p_table_imp<true>;
136+
137+
template <BOOST_DECIMAL_DECIMAL_FLOATING_TYPE T>
138+
constexpr auto log1p_series_expansion(T z2) noexcept;
139+
140+
template <>
141+
constexpr auto log1p_series_expansion<decimal32>(decimal32 z2) noexcept
142+
{
143+
return taylor_series_result(z2, log1p_table::d32_coeffs);
144+
}
145+
146+
template <>
147+
constexpr auto log1p_series_expansion<decimal64>(decimal64 z2) noexcept
148+
{
149+
return taylor_series_result(z2, log1p_table::d64_coeffs);
150+
}
151+
152+
template <>
153+
constexpr auto log1p_series_expansion<decimal128>(decimal128 z2) noexcept
154+
{
155+
return taylor_series_result(z2, log1p_table::d128_coeffs);
156+
}
157+
158+
} //namespace detail
159+
} //namespace decimal
160+
} //namespace boost
161+
162+
#endif //BOOST_DECIMAL_DETAIL_CMATH_IMPL_LOG1P_IMPL_HPP
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
// Copyright 2023 - 2024 Matt Borland
2+
// Copyright 2023 - 2024 Christopher Kormanyos
3+
// Distributed under the Boost Software License, Version 1.0.
4+
// https://www.boost.org/LICENSE_1_0.txt
5+
6+
#ifndef BOOST_DECIMAL_DETAIL_CMATH_IMPL_LOG_IMPL_HPP
7+
#define BOOST_DECIMAL_DETAIL_CMATH_IMPL_LOG_IMPL_HPP
8+
9+
#include <boost/decimal/detail/concepts.hpp>
10+
#include <boost/decimal/detail/cmath/impl/taylor_series_result.hpp>
11+
12+
#ifndef BOOST_DECIMAL_BUILD_MODULE
13+
#include <array>
14+
#include <cstddef>
15+
#include <cstdint>
16+
#endif
17+
18+
namespace boost {
19+
namespace decimal {
20+
namespace detail {
21+
22+
namespace log_detail {
23+
24+
template <bool b>
25+
struct log_table_imp
26+
{
27+
private:
28+
using d32_coeffs_t = std::array<decimal32, 8>;
29+
using d64_coeffs_t = std::array<decimal64, 11>;
30+
using d128_coeffs_t = std::array<decimal128, 21>;
31+
32+
public:
33+
static constexpr d32_coeffs_t d32_coeffs =
34+
{{
35+
// Series[Log[(1 + (z/2))/(1 - (z/2))], {z, 0, 17}]
36+
// (1), // * z
37+
::boost::decimal::decimal32 { UINT64_C(8333333333333333333), - 19 - 1 }, // * z^3
38+
::boost::decimal::decimal32 { UINT64_C(1250000000000000000), - 19 - 1 }, // * z^5
39+
::boost::decimal::decimal32 { UINT64_C(2232142857142857143), - 19 - 2 }, // * z^7
40+
::boost::decimal::decimal32 { UINT64_C(4340277777777777778), - 19 - 3 }, // * z^9
41+
::boost::decimal::decimal32 { UINT64_C(8877840909090909091), - 19 - 4 }, // * z^11
42+
::boost::decimal::decimal32 { UINT64_C(1878004807692307692), - 19 - 4 }, // * z^13
43+
::boost::decimal::decimal32 { UINT64_C(4069010416666666667), - 19 - 5 }, // * z^15
44+
::boost::decimal::decimal32 { UINT64_C(8975758272058823529), - 19 - 6 }, // * z^17
45+
}};
46+
47+
static constexpr d64_coeffs_t d64_coeffs =
48+
{{
49+
// Series[Log[(1 + (z/2))/(1 - (z/2))], {z, 0, 23}]
50+
// (1), // * z
51+
::boost::decimal::decimal64 { UINT64_C(8333333333333333333), - 19 - 1 }, // * z^3
52+
::boost::decimal::decimal64 { UINT64_C(1250000000000000000), - 19 - 1 }, // * z^5
53+
::boost::decimal::decimal64 { UINT64_C(2232142857142857143), - 19 - 2 }, // * z^7
54+
::boost::decimal::decimal64 { UINT64_C(4340277777777777778), - 19 - 3 }, // * z^9
55+
::boost::decimal::decimal64 { UINT64_C(8877840909090909091), - 19 - 4 }, // * z^11
56+
::boost::decimal::decimal64 { UINT64_C(1878004807692307692), - 19 - 4 }, // * z^13
57+
::boost::decimal::decimal64 { UINT64_C(4069010416666666667), - 19 - 5 }, // * z^15
58+
::boost::decimal::decimal64 { UINT64_C(8975758272058823529), - 19 - 6 }, // * z^17
59+
::boost::decimal::decimal64 { UINT64_C(2007735402960526316), - 19 - 6 }, // * z^19
60+
::boost::decimal::decimal64 { UINT64_C(4541306268601190476), - 19 - 7 }, // * z^21
61+
::boost::decimal::decimal64 { UINT64_C(1036602517832880435), - 19 - 7 }, // * z^23
62+
}};
63+
64+
static constexpr d128_coeffs_t d128_coeffs =
65+
{{
66+
// Series[Log[(1 + (z/2))/(1 - (z/2))], {z, 0, 43}]
67+
// (1), // * z
68+
::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(451750905202293), UINT64_C(9484758194528277842) }, -35 }, // * z^3
69+
::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(67762635780344), UINT64_C(500376525493764096) }, -35 }, // * z^5
70+
::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(121004706750614), UINT64_C(6164027816584450626) }, -36 }, // * z^7
71+
::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(235286929792861), UINT64_C(3787056721709964394) }, -37 }, // * z^9
72+
::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(481268720030852), UINT64_C(8584740752302634068) }, -38 }, // * z^11
73+
::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(101806844621911), UINT64_C(1816002851448634124) }, -38 }, // * z^13
74+
::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(220581496680807), UINT64_C(7009130190423632548) }, -39 }, // * z^15
75+
::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(486576830913545), UINT64_C(12748560115094843630) }, -40 }, // * z^17
76+
::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(108839554283293), UINT64_C(2123490654414259032) }, -40 }, // * z^19
77+
::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(246184706116972), UINT64_C(9634423737622849438) }, -41 }, // * z^21
78+
::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(56194335091917), UINT64_C(11823550152479764302) }, -41 }, // * z^23
79+
::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(129246970711410), UINT64_C(10592095684364861440) }, -42 }, // * z^25
80+
::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(299182802572709), UINT64_C(12220910627630811506) }, -43 }, // * z^27
81+
::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(69637376460889), UINT64_C(5865971761607874066) }, -43 }, // * z^29
82+
::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(162861606239176), UINT64_C(11636108014793143194) }, -44 }, // * z^31
83+
::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(382478014652611), UINT64_C(14470401740943906374) }, -45 }, // * z^33
84+
::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(90155532025258), UINT64_C(9076666090147568782) }, -45 }, // * z^35
85+
::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(213205650059732), UINT64_C(16978042870933143358) }, -46 }, // * z^37
86+
::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(505680067449366), UINT64_C(9996854995997550184) }, -47 }, // * z^39
87+
::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(120253186771495), UINT64_C(12950434681540257980) }, -47 }, // * z^41
88+
::boost::decimal::decimal128 { boost::decimal::detail::uint128 { UINT64_C(286650038234379), UINT64_C(5345076336561816786) }, -48 }, // * z^43
89+
}};
90+
};
91+
92+
#if !(defined(__cpp_inline_variables) && __cpp_inline_variables >= 201606L) && (!defined(_MSC_VER) || _MSC_VER != 1900)
93+
94+
template <bool b>
95+
constexpr typename log_table_imp<b>::d32_coeffs_t log_table_imp<b>::d32_coeffs;
96+
97+
template <bool b>
98+
constexpr typename log_table_imp<b>::d64_coeffs_t log_table_imp<b>::d64_coeffs;
99+
100+
template <bool b>
101+
constexpr typename log_table_imp<b>::d128_coeffs_t log_table_imp<b>::d128_coeffs;
102+
103+
#endif
104+
105+
} //namespace log_detail
106+
107+
using log_table = log_detail::log_table_imp<true>;
108+
109+
template <BOOST_DECIMAL_DECIMAL_FLOATING_TYPE T>
110+
constexpr auto log_series_expansion(T z2) noexcept;
111+
112+
template <>
113+
constexpr auto log_series_expansion<decimal32>(decimal32 z2) noexcept
114+
{
115+
return taylor_series_result(z2, log_table::d32_coeffs);
116+
}
117+
118+
template <>
119+
constexpr auto log_series_expansion<decimal64>(decimal64 z2) noexcept
120+
{
121+
return taylor_series_result(z2, log_table::d64_coeffs);
122+
}
123+
124+
template <>
125+
constexpr auto log_series_expansion<decimal128>(decimal128 z2) noexcept
126+
{
127+
return taylor_series_result(z2, log_table::d128_coeffs);
128+
}
129+
130+
} //namespace detail
131+
} //namespace decimal
132+
} //namespace boost
133+
134+
#endif //BOOST_DECIMAL_DETAIL_CMATH_IMPL_LOG_IMPL_HPP

include/boost/decimal/detail/cmath/impl/sinh_impl.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ constexpr typename sinh_table_imp<b>::d128_coeffs_t sinh_table_imp<b>::d128_coef
9999
using sinh_table = sinh_detail::sinh_table_imp<true>;
100100

101101
template <BOOST_DECIMAL_DECIMAL_FLOATING_TYPE T>
102-
constexpr auto sinh_series_expansion(T z) noexcept;
102+
constexpr auto sinh_series_expansion(T z2) noexcept;
103103

104104
template <>
105105
constexpr auto sinh_series_expansion<decimal32>(decimal32 z2) noexcept

include/boost/decimal/detail/cmath/impl/tanh_impl.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ constexpr typename tanh_table_imp<b>::d128_coeffs_t tanh_table_imp<b>::d128_coef
107107
using tanh_table = tanh_detail::tanh_table_imp<true>;
108108

109109
template <BOOST_DECIMAL_DECIMAL_FLOATING_TYPE T>
110-
constexpr auto tanh_series_expansion(T z) noexcept;
110+
constexpr auto tanh_series_expansion(T z2) noexcept;
111111

112112
template <>
113113
constexpr auto tanh_series_expansion<decimal32>(decimal32 z2) noexcept

0 commit comments

Comments
 (0)