Returns eps
for double precision arguments and
feps
for single precision arguments. The syntax for
teps
is
y = teps(x)
The teps
function is most useful if you need to
compute epsilon based on the type of the array.
The following example demonstrates the use of the teps
function,
and one of its numerical consequences.
--> teps(float(3.4)) ans = <float> - size: [1 1] 5.9604645e-08 --> teps(complex(3.4+i*2)) ans = <float> - size: [1 1] 5.9604645e-08 --> teps(double(3.4)) ans = <double> - size: [1 1] 1.11022302462516e-16 --> teps(dcomplex(3.4+i*2)) ans = <double> - size: [1 1] 1.11022302462516e-16