#include <limits>
Go to the source code of this file.
|
template<typename T > |
constexpr std::enable_if_t< std::is_floating_point_v< T >, T > | autopas::utils::ConstexprMath::sqrt (T x, T epsilon) |
| Calculates the square root of floating point values x based on Newton-Raphson methon.
|
|
template<typename T > |
constexpr std::enable_if_t< std::is_integral_v< T >, T > | autopas::utils::ConstexprMath::sqrt (T x) |
| Calculates the square root of integral values x based on Newton-Raphson methon.
|
|
- Date
- 15.05.2023
- Author
- D. Martin
◆ sqrt() [1/2]
template<typename T >
constexpr std::enable_if_t< std::is_integral_v< T >, T > autopas::utils::ConstexprMath::sqrt |
( |
T |
x | ) |
|
|
constexpr |
Calculates the square root of integral values x based on Newton-Raphson methon.
- Template Parameters
-
- Parameters
-
- Returns
- sqrt(x)
◆ sqrt() [2/2]
template<typename T >
constexpr std::enable_if_t< std::is_floating_point_v< T >, T > autopas::utils::ConstexprMath::sqrt |
( |
T |
x, |
|
|
T |
epsilon |
|
) |
| |
|
constexpr |
Calculates the square root of floating point values x based on Newton-Raphson methon.
- Template Parameters
-
- Parameters
-
x | input value |
epsilon | epsilon value used for floating point accuracy comparison |
- Returns
- sqrt(x)