The function returns TRUE if an error was detected, and FALSE otherwise.
FUNCTION
The function adds a pattern to the local variables cov and mean which
contain the summations of the previous patterns added. The final covariance
and mean can be calculated using calc_mean_var.