|
mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
|
General mathematical utilities.
Classes | |
| class | mx::math::histogramUniform< realT > |
| A histogram with uniform bin spacing. More... | |
Modules | |
| Constants and units | |
| Geometry and Geodesy | |
| Special Functions | |
| Templatized BLAS and Lapack | |
| Integration | |
| Interpolation | |
| Data Fitting | |
| Plotting Data | |
| Random Numbers | |
| Vector Utilities | |
| Fourier Transforms | |
| Methods for calculating the Fourier Transform. | |
| NVIDIA Cuda Interface | |
| Gen. Math Files | |
Functions | |
| template<typename realT > | |
| void | mx::math::quarticRoots (std::vector< std::complex< realT > > &x, realT a, realT b, realT c, realT d, realT e) |
| Find the roots of the general quartic equation. | |
| void mx::math::quarticRoots | ( | std::vector< std::complex< realT > > & | x, |
| realT | a, | ||
| realT | b, | ||
| realT | c, | ||
| realT | d, | ||
| realT | e | ||
| ) |
Find the roots of the general quartic equation.
Finds the roots of
\[ f(x) = a x^4 + b x^3 + c x^2 + d x + e \]
using the general formula for quartic roots. See https://en.wikipedia.org/wiki/Quartic_function.
| realT | is the floating point type used for calculations. |
| [out] | x | On exit contains the 4 roots, is resized to length 4. |
| [in] | a | the coefficient of the \(x^4\) term. |
| [in] | b | the coefficient of the \(x^3\) term. |
| [in] | c | the coefficient of the \(x^2\) term. |
| [in] | d | the coefficient of the \(x^1\) term. |
| [in] | e | the coefficient of the \(x^0\) term. |
Definition at line 126 of file roots.hpp.
References mx::math::six_fifths().
Referenced by mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::optimumTauWFS().