|
tfel
|
#include </home/runner/work/tfel/tfel/include/TFEL/Math/General/CubicRoots.hxx>
Static Public Member Functions | |
| template<typename T> | |
| static TFEL_HOST_DEVICE T | cbrt (const T x) noexcept |
| template<typename T> requires ((tfel::typetraits::IsReal<T>::cond) && (tfel::typetraits::IsFundamentalNumericType<T>::cond)) | |
| static TFEL_HOST_DEVICE unsigned short | find_roots (T &x1, T &x2, T &x3, const T a3, const T a2, const T a1, const T a0) |
| template<typename T> requires ((tfel::typetraits::IsReal<T>::cond) && (tfel::typetraits::IsFundamentalNumericType<T>::cond)) | |
| static TFEL_HOST_DEVICE unsigned short | exe (T &x1, T &x2, T &x3, const T a3, const T a2, const T a1, const T a0, const bool b=false) |
Static Protected Member Functions | |
| template<typename T> | |
| static TFEL_HOST_DEVICE void | improve (T &vp, const T a3, const T a2, const T a1, const T a0) |
struct gathering tools function to compute the roots of a cubic polynomial
|
inlinestaticnoexcept |
| [in] | x | : value |
|
inlinestatic |
| [out] | x1 | : first root |
| [out] | x2 | : second root |
| [out] | x3 | : third root |
| [in] | a3 | : coefficient of the polynom |
| [in] | a2 | : coefficient of the polynom |
| [in] | a1 | : coefficient of the polynom |
| [in] | a0 | : coefficient of the polynom |
| [in] | b | : if true, use a newton raphson algorithm to refine the roots found |
|
inlinestatic |
find the real roots of a cubic polynomial by Cardan's method
| [out] | x1 | : first root |
| [out] | x2 | : second root |
| [out] | x3 | : third root |
| [in] | a3 | : coefficient of the polynom |
| [in] | a2 | : coefficient of the polynom |
| [in] | a1 | : coefficient of the polynom |
| [in] | a0 | : coefficient of the polynom |