Function rc_algebra_set_zero_tolerance#
Defined in File algebra.h
Function Documentation#
-
void rc_algebra_set_zero_tolerance(double tol)#
Sets the zero tolerance for detecting singular matrices.
When inverting matrices or solving a linear system, this library first checks that the determinant of the matrix is non-zero. Due to the rounding errors that come from float-point math, we cannot check if the determinant is exactly zero. Instead, it is checked to be smaller in magnitude than the zero-tolerance.
The default value is 10^-8 but it can be changed here if the user is dealing with unusually small or large floating point values.
This only effects the operation of rc_algebra_invert_matrix, rc_algebra_invert_matrix_inplace, and rc_algebra_lin_system_solve.
- Parameters:
tol – [in] The zero-tolerance