SolveEquation1n


Overloaded template function to solve linear equations. It can be used only with float data types.

You can find more information in comments below.

// Find solution of x + a = 0 equation and store it in x1. Return number of found solutions(always 1)template<class TYPE>
int SolveEquation1n(const TYPE a, TComplex<TYPE> &x1);
// Find solution of ax + b = 0 equation and store it in x1. Return number of found solutions(either 1 or 0 if a = 0). Tolerance is used for comparison of a with zerotemplate<class TYPE>
int SolveEquation1n(const TYPE a, const TYPE b, TComplex<TYPE> &x1, const TYPE tolerance);
Namespace: ntl
Include: NTL/Core/Complex.h