rounding - Is it possible to circumvent Matlab epsilon? -


i have 2 arrays of numbers identical. when take difference array of half small numbers (on order of 1e-16), , half identically 0. i'm positive due rounding issues; i.e. difference between 2 entries less epsilon.

that said i'd still show difference between entries (even if extremely small). there way circumvent matlab's epsilon tolerance? perhaps using clever scaling of arrays?

edit : here's example of issue. array a accurate 15 digits (being copied c file output), while array b comes matlab. take 1 element of a 1.00002429399044. subtract corresponding entry in b, displays 1.00002429399044. difference between them 2.22044604925031e-16 according matlab. means there must more digits in entry of b being displayed.

consider same scenario element of a being 1.00003105215213. difference between number , element in b displays 1.00003105215213 0. have hard time beleiving in case numbers stored same - if display more digits in matlab expect see difference between 2 numbers.

if have 2 floating points numbers x , y in matlab, , x-y evaluates 0, means x , y in fact equal: internally represented same 0-1 string of length 64. operation of subtraction did not lose information "due rounding issues"; rather, either didn't have information begin with, or lost prior subtraction.

if suspect x , y should not equal, have @ happened earlier, calculated. may possible reorganize computation knowing eventual goal compare x y.

simple example: if want compute y=sqrt(x^2+1) large x, formula fine written. if turns out eventual goal compare result x, i.e., consider sqrt(x^2+1)-x, i'll proceed differently, using fact sqrt(x^2+1)-x = 1/(sqrt(x^2+1)+x).


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -