-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logarithmic funcs #536
Logarithmic funcs #536
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #536 +/- ##
=========================================
+ Coverage 98.8% 98.8% +0.1%
=========================================
Files 186 188 +2
Lines 11631 11653 +22
=========================================
+ Hits 11482 11509 +27
+ Misses 149 144 -5
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
BOOST_DECIMAL_EXPORT template <typename T> | ||
constexpr auto log(T x) noexcept | ||
BOOST_DECIMAL_REQUIRES(detail::is_decimal_floating_point_v, T) | ||
{ | ||
#if BOOST_DECIMAL_DEC_EVAL_METHOD == 0 | ||
|
||
using evaluation_type = T; | ||
|
||
#elif BOOST_DECIMAL_DEC_EVAL_METHOD == 1 | ||
|
||
using evaluation_type = detail::promote_args_t<T, decimal64>; | ||
|
||
#else // BOOST_DECIMAL_DEC_EVAL_METHOD == 2 | ||
|
||
using evaluation_type = detail::promote_args_t<T, decimal128>; | ||
|
||
#endif | ||
|
||
return static_cast<T>(detail::log_impl(static_cast<evaluation_type>(x))); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to keep this part on each of the special functions to properly support the float evaluation methods. This promotes the type of x depending on the macro set and then does the calculation much like how boost math does.
No description provided.