sets and gets accuracy level
FLAG = flag_accuracy_level() flag_accuracy_level(FLAG)
accuracy level
maximum speed [default]
accuracy of extended (80bit) with naive summation (error = N*2^-64)
accuracy of double (64bit) with Kahan summation (error = 2^-52)
accuracy of extended (80bit) with Kahan summation (error = 2^-64)
used in SUMSKIPNAN_MEX and COVM_MEX The error margin of the naive summation is N*eps (N is the number of samples), the error margin is only 2*eps if Kahan's summation is used [1].
Please note, level 3 might be equally accurate but slower than 1 or 2 on some platforms.
[1] David Goldberg,
What Every Computer Scientist Should Know About Floating-Point Arithmetic
ACM Computing Surveys, Vol 23, No 1, March 1991.