https://software.intel.com/de-de/forums/topic/348960/feed
deI suppose that catastrophic
https://software.intel.com/de-de/comment/1719568#comment-1719568
<a id="comment-1719568"></a>
<div class="field field-name-comment-body field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p>I suppose that catastrophic cancellation could be blamed for slightly inaccurate results.It mainly occurres when two very close values in precision(nearly equal) are subtracted or added with different signs.<br />
Moreover the exact implementation of an algorithms as beign used by Matlab and MKL can also be different thus leading to miniscule variation in the<br />
final result.</p>
</div></div></div>Mon, 24 Dec 2012 06:29:26 +0000iliyapolakcomment 1719568 at https://software.intel.comGiven that:
https://software.intel.com/de-de/comment/1719134#comment-1719134
<a id="comment-1719134"></a>
<div class="field field-name-comment-body field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p>Given that:<br />
kx(i) = K(i,:) * x(:)<br />
.<br />
You could define vectors kx_16 and x_16 as real*16 and accumulate kx_16, for all available values of K(i,j). You would not need to store K, but merely obtain all non-zero values and accumulate their effect.<br />
You could then compare the error of kx_matlab and kx_mkl from kx_16 and report the sum of the absolute diference.<br />
.<br />
This would show which one is worse.<br />
As you would probably calculate this in a Fortran environment, you would need to be careful to extract kx_matlab to the precision available.<br />
You need to be careful to identify possible sources of error in the comparison and when obtaining values of K.<br />
The results might be an interesting study.</p>
<p>John</p>
</div></div></div>Wed, 19 Dec 2012 07:31:20 +0000John Campbellcomment 1719134 at https://software.intel.comJim,
https://software.intel.com/de-de/comment/1719098#comment-1719098
<a id="comment-1719098"></a>
<div class="field field-name-comment-body field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p>Jim,</p>
<p>The coefficients of the matrix are all of the form (a + b/sqrt(2)) X 10<sup>9</sup>, where a and b are small integers (plus or minus 0, 1, 2, 4). The M-V product should give 2 X 10<sup>9</sup> in rows 1 and 3, and zero in the rest of the rows. Relative to the non-zero coefficients, a sum such as 2 X 10<sup>-6</sup> is about the same as 1 is relative to machine-epsilon. </p>
<p>The non-zero values that the OP obtained will be sensitive to the order of evaluation. Compared to the exact value (zero), the values given by MKL and Matlab are equally bad (or good, depending on the point of view).</p>
<p>The values in the file values.txt are not all given to the full number of digits that double precision permits. Correcting them caused the output KX(4:8) to become exactly zero, leaving KX(2) as the only number that is small instead of being identically zero.</p>
</div></div></div>Tue, 18 Dec 2012 20:18:00 +0000mecej4comment 1719098 at https://software.intel.commecej4, why then does the 7th
https://software.intel.com/de-de/comment/1719051#comment-1719051
<a id="comment-1719051"></a>
<div class="field field-name-comment-body field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p>mecej4, why then does the 7th entry vary by a much larger factor?<br />
(was this a type-o by the OP?)</p>
<p>Jim Dempsey</p>
</div></div></div>Tue, 18 Dec 2012 15:39:15 +0000jimdempseyatthecovecomment 1719051 at https://software.intel.comSuch small discrepancies are
https://software.intel.com/de-de/comment/1719034#comment-1719034
<a id="comment-1719034"></a>
<div class="field field-name-comment-body field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p>Such small discrepancies are to be expected, given that the result has some elements of the order of 2 billion, and some elements of the order of a millionth. That ratio of the two is about the same as that of 1.0 to machine epsilon in double precision, and we know well that the subtractive cancellation (that happens when the matrix-vector product is computed) leads to precision loss.</p>
</div></div></div>Tue, 18 Dec 2012 13:36:02 +0000mecej4comment 1719034 at https://software.intel.com