Skip to content
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

Extended Precision Constants #505

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions include/boost/math/constants/constants.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,17 @@ namespace boost{ namespace math
#endif

} // namespace constants

namespace numbers {
#if __cplusplus > 201400L || _MSVC_LANG > 201400L

template<typename T, typename std::enable_if<std::is_trivially_constructible<T>::value, bool>::type = true>
BOOST_INLINE_VARIABLE constexpr T pi_v = boost::math::constants::pi<T>();

BOOST_INLINE_VARIABLE constexpr double pi = pi_v<double>;

#endif
} // namespace numbers
} // namespace math
} // namespace boost

Expand Down
Loading