<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Relatively Robust Representations algorithmn (dstevr) in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Relatively-Robust-Representations-algorithmn-dstevr/m-p/915722#M12550</link>
    <description>&lt;P&gt;&lt;SPAN class="postbody"&gt;&lt;FONT size="2"&gt;The big efforts have been spent to repair Relatively Robust Representations algorithmn (dstevr), &lt;BR /&gt;but also now it is easy to find examples in which bad results turn out &lt;BR /&gt;(see also section 2 on the page devoted to P4 processor: &lt;/FONT&gt;&lt;A href="http://www.thesa-store.com/products" target="_blank"&gt;&lt;FONT color="#006699" size="2"&gt;&lt;/FONT&gt;&lt;/A&gt;&lt;A href="http://www.thesa-store.com/products" target="_blank"&gt;http://www.thesa-store.com/products&lt;/A&gt;&lt;FONT size="2"&gt;): &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="postbody"&gt;&lt;FONT size="2"&gt;//icl /O2 mkl_dstevr_test.c mkl_c.lib&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="postbody"&gt;&lt;FONT size="2"&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;#include &lt;STDLIB.H&gt;&lt;BR /&gt;#include &lt;MATH.H&gt;&lt;/MATH.H&gt;&lt;/STDLIB.H&gt;&lt;/STDIO.H&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="postbody"&gt;&lt;FONT size="2"&gt;#include &lt;MKL.H&gt;&lt;/MKL.H&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="postbody"&gt;&lt;FONT size="2"&gt;int main() { &lt;BR /&gt; int n = 1001;&lt;BR /&gt; double *d__, *e;&lt;BR /&gt; double vl, vu;&lt;BR /&gt; int il, iu;&lt;BR /&gt; double abstol;&lt;BR /&gt; int m;&lt;BR /&gt; double *w;&lt;BR /&gt; double *z__;&lt;BR /&gt; int ldz;&lt;BR /&gt; int *isuppz;&lt;BR /&gt; double *work;&lt;BR /&gt; int lwork;&lt;BR /&gt; int *iwork;&lt;BR /&gt; int liwork;&lt;BR /&gt; int info;&lt;BR /&gt;&lt;BR /&gt; int i, j;&lt;BR /&gt; double sum, max_modulus;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="postbody"&gt;&lt;FONT size="2"&gt; d__= (double *) malloc (n * sizeof (double));&lt;BR /&gt; e = (double *) malloc (n * sizeof (double));&lt;BR /&gt; w = (double *) malloc (n * sizeof (double));&lt;BR /&gt; z__ = (double *) malloc (n * n * sizeof (double));&lt;BR /&gt; isuppz = (int *) malloc (2 * n * sizeof (int));&lt;BR /&gt; lwork = 20 * n;&lt;BR /&gt; work = (double *) malloc (lwork * sizeof (double));&lt;BR /&gt; liwork = 10 * n;&lt;BR /&gt; iwork = (int *) malloc (liwork * sizeof (double));&lt;BR /&gt; if (! iwork || ! work || ! isuppz || ! z__ || ! e || ! d__ || ! w) {&lt;BR /&gt; printf("Not enough memory to allocate buffer
");&lt;BR /&gt; exit(1);&lt;BR /&gt; } &lt;BR /&gt; for (i = 0; i &amp;lt; n; i++) {&lt;BR /&gt; if (i &amp;lt;= n / 2) { &lt;BR /&gt; d__&lt;I&gt; = sin((double)(n / 2 - i));&lt;BR /&gt; } else {&lt;BR /&gt; d__&lt;I&gt; = sin((double)(i - n / 2));&lt;BR /&gt; }&lt;BR /&gt; if (i != n - 1) {&lt;BR /&gt; e&lt;I&gt; = 1.0;&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; abstol = dlamch("S"); &lt;BR /&gt; ldz = n;&lt;BR /&gt; dstevr("V", &lt;BR /&gt; "A", &lt;BR /&gt; &amp;amp;n, &lt;BR /&gt; d__, &lt;BR /&gt; e, &lt;BR /&gt; &amp;amp;vl, &lt;BR /&gt; &amp;amp;vu, &lt;BR /&gt; &amp;amp;il, &lt;BR /&gt; &amp;amp;iu, &lt;BR /&gt; &amp;amp;abstol,&lt;BR /&gt; &amp;amp;m, &lt;BR /&gt; w, &lt;BR /&gt; z__,&lt;BR /&gt; &amp;amp;ldz,&lt;BR /&gt; isuppz,&lt;BR /&gt; work,&lt;BR /&gt; &amp;amp;lwork,&lt;BR /&gt; iwork,&lt;BR /&gt; &amp;amp;liwork,&lt;BR /&gt; &amp;amp;info);&lt;BR /&gt; if (! info) {&lt;BR /&gt; max_modulus = 0.0;&lt;BR /&gt; for (i = 0; i &amp;lt; m - 1; i++) {&lt;BR /&gt; sum = 0.0;&lt;BR /&gt; for (j = 0; j &amp;lt; n; j++) {&lt;BR /&gt; sum += z__[i * n + j] * z__[(i + 1) * n + j];&lt;BR /&gt; }&lt;BR /&gt; if (fabs (sum) &amp;gt; max_modulus) {&lt;BR /&gt; max_modulus = fabs (sum);&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; printf("Max modulus of scalar dot of contiguous vectors = %e 
", max_modulus);&lt;BR /&gt; } else {&lt;BR /&gt; printf("info_dstevr=%d 
", info);&lt;BR /&gt; }&lt;BR /&gt; free (d__);&lt;BR /&gt; free (e);&lt;BR /&gt; free (w);&lt;BR /&gt; free (z__);&lt;BR /&gt; free (isuppz);&lt;BR /&gt; free (work);&lt;BR /&gt; free (iwork);&lt;BR /&gt; return 0;&lt;BR /&gt; }&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="postbody"&gt;&lt;FONT size="2"&gt;//Max modulus of scalar dot of contiguous vectors = 6.109680e-001&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 19 Jul 2007 19:59:06 GMT</pubDate>
    <dc:creator>y_sigolaev</dc:creator>
    <dc:date>2007-07-19T19:59:06Z</dc:date>
    <item>
      <title>Relatively Robust Representations algorithmn (dstevr)</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Relatively-Robust-Representations-algorithmn-dstevr/m-p/915722#M12550</link>
      <description>&lt;P&gt;&lt;SPAN class="postbody"&gt;&lt;FONT size="2"&gt;The big efforts have been spent to repair Relatively Robust Representations algorithmn (dstevr), &lt;BR /&gt;but also now it is easy to find examples in which bad results turn out &lt;BR /&gt;(see also section 2 on the page devoted to P4 processor: &lt;/FONT&gt;&lt;A href="http://www.thesa-store.com/products" target="_blank"&gt;&lt;FONT color="#006699" size="2"&gt;&lt;/FONT&gt;&lt;/A&gt;&lt;A href="http://www.thesa-store.com/products" target="_blank"&gt;http://www.thesa-store.com/products&lt;/A&gt;&lt;FONT size="2"&gt;): &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="postbody"&gt;&lt;FONT size="2"&gt;//icl /O2 mkl_dstevr_test.c mkl_c.lib&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="postbody"&gt;&lt;FONT size="2"&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;#include &lt;STDLIB.H&gt;&lt;BR /&gt;#include &lt;MATH.H&gt;&lt;/MATH.H&gt;&lt;/STDLIB.H&gt;&lt;/STDIO.H&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="postbody"&gt;&lt;FONT size="2"&gt;#include &lt;MKL.H&gt;&lt;/MKL.H&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="postbody"&gt;&lt;FONT size="2"&gt;int main() { &lt;BR /&gt; int n = 1001;&lt;BR /&gt; double *d__, *e;&lt;BR /&gt; double vl, vu;&lt;BR /&gt; int il, iu;&lt;BR /&gt; double abstol;&lt;BR /&gt; int m;&lt;BR /&gt; double *w;&lt;BR /&gt; double *z__;&lt;BR /&gt; int ldz;&lt;BR /&gt; int *isuppz;&lt;BR /&gt; double *work;&lt;BR /&gt; int lwork;&lt;BR /&gt; int *iwork;&lt;BR /&gt; int liwork;&lt;BR /&gt; int info;&lt;BR /&gt;&lt;BR /&gt; int i, j;&lt;BR /&gt; double sum, max_modulus;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="postbody"&gt;&lt;FONT size="2"&gt; d__= (double *) malloc (n * sizeof (double));&lt;BR /&gt; e = (double *) malloc (n * sizeof (double));&lt;BR /&gt; w = (double *) malloc (n * sizeof (double));&lt;BR /&gt; z__ = (double *) malloc (n * n * sizeof (double));&lt;BR /&gt; isuppz = (int *) malloc (2 * n * sizeof (int));&lt;BR /&gt; lwork = 20 * n;&lt;BR /&gt; work = (double *) malloc (lwork * sizeof (double));&lt;BR /&gt; liwork = 10 * n;&lt;BR /&gt; iwork = (int *) malloc (liwork * sizeof (double));&lt;BR /&gt; if (! iwork || ! work || ! isuppz || ! z__ || ! e || ! d__ || ! w) {&lt;BR /&gt; printf("Not enough memory to allocate buffer
");&lt;BR /&gt; exit(1);&lt;BR /&gt; } &lt;BR /&gt; for (i = 0; i &amp;lt; n; i++) {&lt;BR /&gt; if (i &amp;lt;= n / 2) { &lt;BR /&gt; d__&lt;I&gt; = sin((double)(n / 2 - i));&lt;BR /&gt; } else {&lt;BR /&gt; d__&lt;I&gt; = sin((double)(i - n / 2));&lt;BR /&gt; }&lt;BR /&gt; if (i != n - 1) {&lt;BR /&gt; e&lt;I&gt; = 1.0;&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; abstol = dlamch("S"); &lt;BR /&gt; ldz = n;&lt;BR /&gt; dstevr("V", &lt;BR /&gt; "A", &lt;BR /&gt; &amp;amp;n, &lt;BR /&gt; d__, &lt;BR /&gt; e, &lt;BR /&gt; &amp;amp;vl, &lt;BR /&gt; &amp;amp;vu, &lt;BR /&gt; &amp;amp;il, &lt;BR /&gt; &amp;amp;iu, &lt;BR /&gt; &amp;amp;abstol,&lt;BR /&gt; &amp;amp;m, &lt;BR /&gt; w, &lt;BR /&gt; z__,&lt;BR /&gt; &amp;amp;ldz,&lt;BR /&gt; isuppz,&lt;BR /&gt; work,&lt;BR /&gt; &amp;amp;lwork,&lt;BR /&gt; iwork,&lt;BR /&gt; &amp;amp;liwork,&lt;BR /&gt; &amp;amp;info);&lt;BR /&gt; if (! info) {&lt;BR /&gt; max_modulus = 0.0;&lt;BR /&gt; for (i = 0; i &amp;lt; m - 1; i++) {&lt;BR /&gt; sum = 0.0;&lt;BR /&gt; for (j = 0; j &amp;lt; n; j++) {&lt;BR /&gt; sum += z__[i * n + j] * z__[(i + 1) * n + j];&lt;BR /&gt; }&lt;BR /&gt; if (fabs (sum) &amp;gt; max_modulus) {&lt;BR /&gt; max_modulus = fabs (sum);&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; printf("Max modulus of scalar dot of contiguous vectors = %e 
", max_modulus);&lt;BR /&gt; } else {&lt;BR /&gt; printf("info_dstevr=%d 
", info);&lt;BR /&gt; }&lt;BR /&gt; free (d__);&lt;BR /&gt; free (e);&lt;BR /&gt; free (w);&lt;BR /&gt; free (z__);&lt;BR /&gt; free (isuppz);&lt;BR /&gt; free (work);&lt;BR /&gt; free (iwork);&lt;BR /&gt; return 0;&lt;BR /&gt; }&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="postbody"&gt;&lt;FONT size="2"&gt;//Max modulus of scalar dot of contiguous vectors = 6.109680e-001&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jul 2007 19:59:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Relatively-Robust-Representations-algorithmn-dstevr/m-p/915722#M12550</guid>
      <dc:creator>y_sigolaev</dc:creator>
      <dc:date>2007-07-19T19:59:06Z</dc:date>
    </item>
  </channel>
</rss>

