<?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 &amp;gt;&amp;gt;...in mind that exact in Software Tuning, Performance Optimization &amp; Platform Monitoring</title>
    <link>https://community.intel.com/t5/Software-Tuning-Performance/Concerns-on-using-AVX-double-floating-point-instructions-for/m-p/973222#M2867</link>
    <description>&amp;gt;&amp;gt;...in mind that exact implementation of printf()(I mean here some kind of formatting performed by this function) should be also taken into account...

It affects only how the value is displayed not as how it is stored.</description>
    <pubDate>Thu, 13 Dec 2012 20:51:36 GMT</pubDate>
    <dc:creator>SergeyKostrov</dc:creator>
    <dc:date>2012-12-13T20:51:36Z</dc:date>
    <item>
      <title>Concerns on using AVX double floating point instructions for integer data</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/Concerns-on-using-AVX-double-floating-point-instructions-for/m-p/973205#M2850</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;As you might know, AVX does not provide instructions for integer types, which are planned to arrive with AVX2. I have a code written using AVX instructions, which basically use _mm256_*_pd() variants of instructions that operate on double-precision floating-point values (the instructions I use are min, max, shuffle, blend, load, loadu, etc.). However my data is actually integers, which I load by casting integer pointers to double pointers, i.e. __m256d reg = _mm256_loadu_pd((double*)intPtr) etc. Functionality wise the code seems to do what I expect, i.e. sorts the data. However, as I haven't tested with all sorts of different data, I'm concerned whether the output will always be correct. What corner cases should I be concerned with? Would the comparisons will always be correct or will there be some integer values where the AVX floating point comparison would not work?&lt;/P&gt;
&lt;P&gt;Thanks for comments and suggestions&lt;/P&gt;</description>
      <pubDate>Thu, 13 Dec 2012 13:29:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/Concerns-on-using-AVX-double-floating-point-instructions-for/m-p/973205#M2850</guid>
      <dc:creator>cagribal</dc:creator>
      <dc:date>2012-12-13T13:29:46Z</dc:date>
    </item>
    <item>
      <title>From IEEE Std 754-2008,</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/Concerns-on-using-AVX-double-floating-point-instructions-for/m-p/973206#M2851</link>
      <description>From IEEE Std 754-2008, section 5.11:

&lt;BLOCKQUOTE&gt;Four mutually exclusive relations are possible: less than, equal, greater than, and unordered. The last case arises when at least one operand is NaN. Every NaN shall compare unordered with everything, including itself.&lt;/BLOCKQUOTE&gt;

Thus, comparisons involving integers whose bit pattern matches that of a floating-point NaN would be problematic.</description>
      <pubDate>Thu, 13 Dec 2012 14:33:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/Concerns-on-using-AVX-double-floating-point-instructions-for/m-p/973206#M2851</guid>
      <dc:creator>Jeffrey_A_Intel</dc:creator>
      <dc:date>2012-12-13T14:33:01Z</dc:date>
    </item>
    <item>
      <title>Of course you can do int-to</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/Concerns-on-using-AVX-double-floating-point-instructions-for/m-p/973207#M2852</link>
      <description>Of course you can do &lt;STRONG&gt;int-to-double&lt;/STRONG&gt; cast in order to use AVX, however...

&amp;gt;&amp;gt;...Would the comparisons will always be correct or will there be some integer values where the AVX floating point comparison
&amp;gt;&amp;gt;would not work?

I would be very carefull because your processing will be dependent on limitation of IEEE 754 Standard and, as recommended in many-many sources, a comparison with an Epsilon could be added ( expect a performance impact ). If your tests are deterministic ( No Random data ) an accuracy of processings, I mean based in integers and then based on doubles, could be verified as soon as both outputs are saved.

There are single- and double-precision binary format viewers on the web and you could look / verify how some integer values will look like after conversion to double type.</description>
      <pubDate>Thu, 13 Dec 2012 15:29:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/Concerns-on-using-AVX-double-floating-point-instructions-for/m-p/973207#M2852</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2012-12-13T15:29:29Z</dc:date>
    </item>
    <item>
      <title>&gt;&gt;...Thus, comparisons</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/Concerns-on-using-AVX-double-floating-point-instructions-for/m-p/973208#M2853</link>
      <description>&amp;gt;&amp;gt;...Thus, comparisons involving integers whose bit pattern matches that of a floating-point NaN would be problematic...

That looks interesting and could you give us at least one example when some integer value could be converted to a double-precision NaN value?</description>
      <pubDate>Thu, 13 Dec 2012 15:48:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/Concerns-on-using-AVX-double-floating-point-instructions-for/m-p/973208#M2853</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2012-12-13T15:48:33Z</dc:date>
    </item>
    <item>
      <title>&gt;&gt;...Thus, comparisons</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/Concerns-on-using-AVX-double-floating-point-instructions-for/m-p/973209#M2854</link>
      <description>&amp;gt;&amp;gt;...Thus, comparisons involving integers whose bit pattern matches that of a floating-point NaN would be problematic...

I'm very surprized when Intel engineers make some statements without any real verification(s) ( sometimes very simple ), like:

&lt;STRONG&gt;[ Test-case ]&lt;/STRONG&gt;
...
		int iIsNan = 0;

		double dValue = -1.0;
		double dValueLn = 0.0L;
		unsigned __int64 iValue = 0U;
		printf( "dValue   = %f\n", dValue );
		printf( "dValueLn = %f\n", dValueLn );
		printf( "iValue   = %I64d\n", iValue );

		dValueLn = CrtLog( dValue );
		printf( "dValueLn = %f\n", dValueLn );
		iValue = ( __int64 )dValueLn;
		printf( "iValue   = %I64d\n", iValue );
		iIsNan = _isnan( dValueLn );
		if( iIsNan == 0 )
			printf( "dValueLn is Not NaN\n" );
		else
			printf( "dValueLn is NaN\n" );
		dValue = ( double )iValue;
		printf( "dValue   = %f\n", dValue );

		iValue = 9223372036854775800i64;
		dValue = 0.0L;
		printf( "iValue   = %I64d\n", iValue );
		printf( "dValue   = %f\n", dValue );

		dValue = ( double )iValue;
		printf( "dValue   = %f\n", dValue );
		iIsNan = _isnan( dValue );
		if( iIsNan == 0 )
			printf( "dValue is Not NaN\n" );
		else
			printf( "dValue is NaN\n" );
...

&lt;STRONG&gt;[ Output ]&lt;/STRONG&gt;

dValue   = -1.000000
dValueLn = 0.000000
iValue   = 0
dValueLn = -1.#IND00
iValue   = -9223372036854775808
dValueLn is NaN
dValue   = 9223372036854775800.000000
iValue   = 9223372036854775800
dValue   = 0.000000
dValue   = 9223372036854775800.000000
&lt;STRONG&gt;dValue is Not NaN&lt;/STRONG&gt;

Please let me know if you find any problems with the test-case.

Best regards,
Sergey

{ UPDATED }Fixed:
printf( "iValue   = %f\n", iValue );
to
printf( "iValue   = %I64d\n", iValue );</description>
      <pubDate>Thu, 13 Dec 2012 16:13:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/Concerns-on-using-AVX-double-floating-point-instructions-for/m-p/973209#M2854</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2012-12-13T16:13:00Z</dc:date>
    </item>
    <item>
      <title>Hello cagribal,</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/Concerns-on-using-AVX-double-floating-point-instructions-for/m-p/973210#M2855</link>
      <description>Hello cagribal,
I assume when you say 'integers' you do mean 4 byte signed variables... so 32bit and includes one sign bit.
The double precision IEEE mantissa is 53 bits plus one sign bit.
If the question is, can every 32bit integer value be converted to double and, when I convert back to integer, will I get back the original integer?
The answer to this is yes.
If you are just doing compares (that is, not changing the value of your converted 32bit INTs) in your AVX code, you will not get NANs, and you will get the compare results you expect (there will be no unordered results).
Pat</description>
      <pubDate>Thu, 13 Dec 2012 16:40:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/Concerns-on-using-AVX-double-floating-point-instructions-for/m-p/973210#M2855</guid>
      <dc:creator>Patrick_F_Intel1</dc:creator>
      <dc:date>2012-12-13T16:40:22Z</dc:date>
    </item>
    <item>
      <title>Hi everybody,</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/Concerns-on-using-AVX-double-floating-point-instructions-for/m-p/973211#M2856</link>
      <description>Hi everybody,

There are cases ( I detected 3 so far ) wheh 64-bit Integer ( boundary signed &amp;amp; unsigned ) and Double-Precision values do not match. Please take a look at cases 2.x:

&lt;STRONG&gt;[ Output ]&lt;/STRONG&gt;

Test-Case 1
        dValue   = -1.000000
        dValueLn = 0.000000
        iValue   = 0
        dValueLn = -1.#IND00
        iValue   = -9223372036854775808
        dValueLn is NaN
        dValue   = 9223372036854775800.000000

Verifications for Boundary values ( signed and unsigned ) of 64-bit range:
Test-Case 2.1
        iValueS  = 9223372036854775807
        dValue   = 0.000000
        dValue   = 9223372036854775800.000000
        dValue is Not NaN

Test-Case 2.2
        iValueS  = -9223372036854775808
        dValue   = 0.000000
        dValue   = -9223372036854775800.000000
        dValue is Not NaN

Test-Case 2.3
        iValueU = 9223372036854775807
        dValue   = 0.000000
        dValue   = 9223372036854775800.000000
        dValue is Not NaN

Test-Case 2.4
        iValueU  = 0
        dValue   = 0.000000
        dValue   = 0.000000
        dValue is Not NaN

I'll post source codes of my quick test later after additional verification.</description>
      <pubDate>Thu, 13 Dec 2012 17:25:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/Concerns-on-using-AVX-double-floating-point-instructions-for/m-p/973211#M2856</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2012-12-13T17:25:51Z</dc:date>
    </item>
    <item>
      <title>64bit integers (if the span</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/Concerns-on-using-AVX-double-floating-point-instructions-for/m-p/973212#M2857</link>
      <description>64bit integers (if the span of non-zero bits in the 64bit integer is more than 53 bits) cannot be represented without a loss of precision.
That is, converting a 64bit integer to double and back to 64bit may or may not give you back the original 64bit integer, depending on how many bits are used in the original 64bit integer.
But 32bit integers will be okay.</description>
      <pubDate>Thu, 13 Dec 2012 17:34:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/Concerns-on-using-AVX-double-floating-point-instructions-for/m-p/973212#M2857</guid>
      <dc:creator>Patrick_F_Intel1</dc:creator>
      <dc:date>2012-12-13T17:34:09Z</dc:date>
    </item>
    <item>
      <title>&gt;&gt;...64bit integers (if the</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/Concerns-on-using-AVX-double-floating-point-instructions-for/m-p/973213#M2858</link>
      <description>&amp;gt;&amp;gt;...64bit integers (if the span of non-zero bits in the 64bit integer is more than 53 bits) cannot be represented without a loss of precision...

Exactly and this is how it looks like:

&amp;gt;&amp;gt;...
&amp;gt;&amp;gt;Test-Case 2.1
&amp;gt;&amp;gt;iValueS = &lt;STRONG&gt;9223372036854775807&lt;/STRONG&gt;
&amp;gt;&amp;gt;...
&amp;gt;&amp;gt;dValue = &lt;STRONG&gt;9223372036854775800&lt;/STRONG&gt;.000000
&amp;gt;&amp;gt;...

Thanks Patrick for the comment!</description>
      <pubDate>Thu, 13 Dec 2012 17:39:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/Concerns-on-using-AVX-double-floating-point-instructions-for/m-p/973213#M2858</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2012-12-13T17:39:32Z</dc:date>
    </item>
    <item>
      <title>&gt;&gt;...What corner cases should</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/Concerns-on-using-AVX-double-floating-point-instructions-for/m-p/973214#M2859</link>
      <description>&amp;gt;&amp;gt;...What corner cases should I be concerned with?

Look for a Patrick's post for a case with 32-bit integers.

There are 2 generic cases wheh 64-bit Integer ( boundary signed &amp;amp; unsigned ) and Double-Precision values do not match ( 64-bit is converted to 53-bit DP as Patrick mentioned in his post ). You need to verify some range of boundary integer values ( next to min and max values ).

&amp;gt;&amp;gt;...Would the comparisons will always be correct or will there be some integer values where the AVX floating point comparison
&amp;gt;&amp;gt;would not work?

Yes if a precision of the source integer value is not lost during the conversion.

Does it make sense?</description>
      <pubDate>Thu, 13 Dec 2012 17:55:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/Concerns-on-using-AVX-double-floating-point-instructions-for/m-p/973214#M2859</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2012-12-13T17:55:00Z</dc:date>
    </item>
    <item>
      <title>Hi all,</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/Concerns-on-using-AVX-double-floating-point-instructions-for/m-p/973215#M2860</link>
      <description>Hi all,

thanks for your replies.

@Patrick: Actually, as integer I meant 64-bit signed integers. So as I understood, it is possible that some 64-bit integer might have bit pattern of NaN and might result in an incorrect result.

Here are small test cases that I'm using:

[cpp]
    double NaN;
    *(uint64_t *)(&amp;amp;NaN) = 0x7FF0000000000001;

    // Test.1) Prints "NEQ : nan" , as NaN != NaN
    if(NaN == NaN)
        printf("EQ : %.20f\n", NaN);
    else
        printf("NEQ : %.20f\n", NaN);

    double x = 87.0d;
    // Test.2) Prints Unordered as comparison with a NaN is always Unordered
    if(NaN &amp;lt; x)
        printf("LT\n");
    else if(NaN &amp;gt; x)
        printf("GT\n");
    else if(NaN == x)
        printf("EQ\n");
    else
        printf("Unordered\n");

    // Test.3) Comparisons with AVX, basically min(NaN, 10) returns NaN (?)
    int64_t arr1[4] = {10, 20, 30, 40};
    int64_t arr2[4] = {50, 20, 40, 10};
    *(double *)(&amp;amp;arr2[0]) = NaN;

    __m256d a = _mm256_loadu_pd((double *) arr1);
    __m256d b = _mm256_loadu_pd((double *) arr2);
    printf("A = "); p256i(a);   // A = AVXVector: {10 ; 20 ; 30 ; 40} 
    printf("B = "); p256i(b);   // B = AVXVector: {9218868437227405313 ; 20 ; 40 ; 10} 
    __m256d ret = _mm256_min_pd (a, b);
    printf("MIN = "); p256i(ret);   // MIN = AVXVector: {9218868437227405313 ; 20 ; 30 ; 10}
[/cpp]</description>
      <pubDate>Thu, 13 Dec 2012 18:18:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/Concerns-on-using-AVX-double-floating-point-instructions-for/m-p/973215#M2860</guid>
      <dc:creator>cagribal</dc:creator>
      <dc:date>2012-12-13T18:18:00Z</dc:date>
    </item>
    <item>
      <title>Hello Cagribal,</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/Concerns-on-using-AVX-double-floating-point-instructions-for/m-p/973216#M2861</link>
      <description>Hello Cagribal,
Yes, one can certainly generate double precision NANs from 64bit bit patterns.
And one can generate 64bit ints which won't convert to doubles without loss of precision (such as bigint = (1LL &amp;lt;&amp;lt; 55) + 1.)
From my old PhD days, there were whole sections dedicated to what can/can't be represented/converted and back.
You will need to check that your 64bit integer ranges do not exceed the 53 bit mantissa of the double precision value.
Pat</description>
      <pubDate>Thu, 13 Dec 2012 19:17:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/Concerns-on-using-AVX-double-floating-point-instructions-for/m-p/973216#M2861</guid>
      <dc:creator>Patrick_F_Intel1</dc:creator>
      <dc:date>2012-12-13T19:17:54Z</dc:date>
    </item>
    <item>
      <title>Hi everybody,</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/Concerns-on-using-AVX-double-floating-point-instructions-for/m-p/973217#M2862</link>
      <description>Hi everybody,

&amp;gt;&amp;gt;...I'll post source codes of my quick test later after additional verification...

Here it is:
...
		int iIsNaN = 0;

		// Test-Case 1
		printf( "Test-Case 1\n" );
		double dValue = -1.0;
		double dValueLn = 0.0L;
		unsigned __int64 iValue = 0U;
		printf( "\tdValue   = %f\n", dValue );
		printf( "\tdValueLn = %f\n", dValueLn );
		printf( "\tiValue   = %I64d\n", iValue );

		dValueLn = CrtLog( dValue );
		printf( "\tdValueLn = %f\n", dValueLn );
		iValue = ( unsigned __int64 )dValueLn;
		printf( "\tiValue   = %I64d\n", iValue );
		iIsNaN = _isnan( dValueLn );
		if( iIsNaN == 0 )
			printf( "\tdValueLn is Not NaN\n" );
		else
			printf( "\tdValueLn is NaN\n" );
		dValue = ( double )iValue;
		printf( "\tdValue   = %f\n", dValue );

		printf( "Verifications for Boundary values ( Signed and UnSigned ) of 64-bit range:\n" );

		__int64 iValueS = 0LL;
		unsigned __int64 iValueU = 0ULL;

		// Test-Case 2.1
		printf( "Test-Case 2.1\n" );
		iValueS = ( 9223372036854775807LL );
		dValue = 0.0L;
		printf( "\tiValueS  = %I64d\n", iValueS );
		printf( "\tdValue   = %f\n", dValue );

		dValue = ( double )iValueS;
		printf( "\tdValue   = %f\n", dValue );
		iIsNaN = _isnan( dValue );
		if( iIsNaN == 0 )
			printf( "\tdValue is Not NaN\n" );
		else
			printf( "\tdValue is NaN\n" );

		// Test-Case 2.2
		printf( "Test-Case 2.2\n" );
		iValueS = ( -9223372036854775807LL - 1 );
		dValue = 0.0L;
		printf( "\tiValueS  = %I64d\n", iValueS );
		printf( "\tdValue   = %f\n", dValue );

		dValue = ( double )iValueS;
		printf( "\tdValue   = %f\n", dValue );
		iIsNaN = _isnan( dValue );
		if( iIsNaN == 0 )
			printf( "\tdValue is Not NaN\n" );
		else
			printf( "\tdValue is NaN\n" );

		// Test-Case 2.3
		printf( "Test-Case 2.3\n" );
		iValueU = ( 9223372036854775807ULL );
		dValue = 0.0L;
		printf( "\tiValueU  = %I64d\n", iValueU );
		printf( "\tdValue   = %f\n", dValue );

		dValue = ( double )iValueU;
		printf( "\tdValue   = %f\n", dValue );
		iIsNaN = _isnan( dValue );
		if( iIsNaN == 0 )
			printf( "\tdValue is Not NaN\n" );
		else
			printf( "\tdValue is NaN\n" );

		// Test-Case 2.4
		printf( "Test-Case 2.4\n" );
		iValueU = ( 0ULL );
		dValue = 0.0L;
		printf( "\tiValueU  = %I64d\n", iValueU );
		printf( "\tdValue   = %f\n", dValue );

		dValue = ( double )iValueU;
		printf( "\tdValue   = %f\n", dValue );
		iIsNaN = _isnan( dValue );
		if( iIsNaN == 0 )
			printf( "\tdValue is Not NaN\n" );
		else
			printf( "\tdValue is NaN\n" );
...</description>
      <pubDate>Thu, 13 Dec 2012 19:46:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/Concerns-on-using-AVX-double-floating-point-instructions-for/m-p/973217#M2862</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2012-12-13T19:46:24Z</dc:date>
    </item>
    <item>
      <title>&gt;&gt;...it is possible that some</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/Concerns-on-using-AVX-double-floating-point-instructions-for/m-p/973218#M2863</link>
      <description>&amp;gt;&amp;gt;...it is possible that &lt;STRONG&gt;some 64-bit integer might have bit pattern of NaN&lt;/STRONG&gt; and might result in an incorrect result...

I'll do a couple of tests and I'll be back. Thanks guys for that really nice discussion!</description>
      <pubDate>Thu, 13 Dec 2012 19:50:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/Concerns-on-using-AVX-double-floating-point-instructions-for/m-p/973218#M2863</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2012-12-13T19:50:22Z</dc:date>
    </item>
    <item>
      <title>&gt;&gt;&gt;Exactly and this is how it</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/Concerns-on-using-AVX-double-floating-point-instructions-for/m-p/973219#M2864</link>
      <description>&amp;gt;&amp;gt;&amp;gt;Exactly and this is how it looks like:

&amp;gt;&amp;gt;...
&amp;gt;&amp;gt;Test-Case 2.1
&amp;gt;&amp;gt;iValueS = 9223372036854775807
&amp;gt;&amp;gt;...
&amp;gt;&amp;gt;dValue = 9223372036854775800.000000
&amp;gt;&amp;gt;...

Please bear in mind that exact implementation of printf()(I mean here some kind of formatting performed by this function) should be also taken into account when the same primitive types are converted from one type to other.The best example of such a conversion,albeit not applicable to your case is reduction of long double 80-bit type to 64-bit which is performed by MSVCRT printf() function.</description>
      <pubDate>Thu, 13 Dec 2012 20:28:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/Concerns-on-using-AVX-double-floating-point-instructions-for/m-p/973219#M2864</guid>
      <dc:creator>Bernard</dc:creator>
      <dc:date>2012-12-13T20:28:35Z</dc:date>
    </item>
    <item>
      <title>I'm very surprized when Intel</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/Concerns-on-using-AVX-double-floating-point-instructions-for/m-p/973220#M2865</link>
      <description>&lt;BLOCKQUOTE&gt;I'm very surprized when Intel engineers make some statements without any real verification(s)...&lt;/BLOCKQUOTE&gt;

Perhaps you missed this part of the original post:  However my data is actually integers, which I load by &lt;EM&gt;casting integer pointers to double pointers&lt;/EM&gt;...

If one of those "doubles" now points to 64 bits which has the long int value 92211202370041090560 (= 0x7ff8000000000000), it will be intepreted as a (quiet) NaN, and it will compare as "unordered" with any other value.</description>
      <pubDate>Thu, 13 Dec 2012 20:48:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/Concerns-on-using-AVX-double-floating-point-instructions-for/m-p/973220#M2865</guid>
      <dc:creator>Jeffrey_A_Intel</dc:creator>
      <dc:date>2012-12-13T20:48:43Z</dc:date>
    </item>
    <item>
      <title>Make that 9221120237041090560</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/Concerns-on-using-AVX-double-floating-point-instructions-for/m-p/973221#M2866</link>
      <description>Make that 922112023&lt;B&gt;704&lt;/B&gt;1090560 and not 922112023&lt;B&gt;7004&lt;/B&gt;1090560.</description>
      <pubDate>Thu, 13 Dec 2012 20:51:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/Concerns-on-using-AVX-double-floating-point-instructions-for/m-p/973221#M2866</guid>
      <dc:creator>Jeffrey_A_Intel</dc:creator>
      <dc:date>2012-12-13T20:51:00Z</dc:date>
    </item>
    <item>
      <title>&gt;&gt;...in mind that exact</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/Concerns-on-using-AVX-double-floating-point-instructions-for/m-p/973222#M2867</link>
      <description>&amp;gt;&amp;gt;...in mind that exact implementation of printf()(I mean here some kind of formatting performed by this function) should be also taken into account...

It affects only how the value is displayed not as how it is stored.</description>
      <pubDate>Thu, 13 Dec 2012 20:51:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/Concerns-on-using-AVX-double-floating-point-instructions-for/m-p/973222#M2867</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2012-12-13T20:51:36Z</dc:date>
    </item>
    <item>
      <title>&gt;&gt;...I'll do a couple of</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/Concerns-on-using-AVX-double-floating-point-instructions-for/m-p/973223#M2868</link>
      <description>&amp;gt;&amp;gt;...I'll do a couple of tests and I'll be back...

Here is a small Test-Case 1.2

...
		// Test-Case 1.2
		printf( "Test-Case 1.2\n" );

		unsigned __int64 iNaNIntValue = 0ULL;

	//	iNaNIntValue = 0x1020304050607080;

		dValueLn = 0;
		iNaNIntValue = 18444492273895866368ULL;		// 0xfff8000000000000 = NaN-raw-value ( binary representation )
		dValueLn = ( double )iNaNIntValue;
		iIsNaN = _isnan( dValueLn );
		if( iIsNaN == 0 )
			printf( "\tdValueLn is Not NaN\n" );
		else
			printf( "\tdValueLn is NaN\n" );
...

When debugging this is how variables look like in a Visual Studio 'Memory' window:

&lt;STRONG&gt;[ 'double' with NaN value ]&lt;/STRONG&gt;
...
00 00 00 00 00 00 f8 ff
...

&lt;STRONG&gt;[ '__int64' after assignment from 'double' with NaN value ]&lt;/STRONG&gt;
...
00 00 00 00 00 00 00 80
...

So, it looks like a developer should watch out for a 0xfff8000000000000 or 18444492273895866368 value. No and let me continue. Next, if a developer converts it back to 'double' it will get 0x43efff0000000000 or 4895411695440101376 and that is done by a C++ compiler (!). It looks like a magic but actually there are No any uncertanties here because only 53 bits (!) will be copied into mantissa and a part of 64-bit integer which is "responsible" for a NaN-code won't be re-created in the 'double'.

So, this is &lt;STRONG&gt;not&lt;/STRONG&gt; possible to create a NaN value in a double precision variable from a 64-bit integer variable by doing a simple cast, like:

...
	dValueLn = 0;
	iNaNIntValue = 18444492273895866368ULL;
	dValueLn = ( double )iNaNIntValue;
...

unless a developer copies these 8 bytes with a 'memcpy' CRT function directly.</description>
      <pubDate>Thu, 13 Dec 2012 20:55:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/Concerns-on-using-AVX-double-floating-point-instructions-for/m-p/973223#M2868</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2012-12-13T20:55:00Z</dc:date>
    </item>
    <item>
      <title>&gt;&gt;...</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/Concerns-on-using-AVX-double-floating-point-instructions-for/m-p/973224#M2869</link>
      <description>&amp;gt;&amp;gt;...
&amp;gt;&amp;gt;unless a developer copies these 8 bytes with a 'memcpy' CRT function directly.

Something like that:

...
		// Test-Case 1.3
		printf( "Test-Case 1.3\n" );

		void *pdValueLn = &amp;amp;dValueLn;
		void *piNaNIntValue = &amp;amp;iNaNIntValue;
		memcpy( ( void * )pdValueLn, ( const void * )piNaNIntValue, 8 );
		iIsNaN = _isnan( dValueLn );
		if( iIsNaN == 0 )
			printf( "\tdValueLn is Not NaN\n" );
		else
			printf( "\tdValueLn is NaN\n" );
...

&lt;STRONG&gt;[ Output ]&lt;/STRONG&gt;

...
Test-Case 1.3
        dValueLn is NaN
...

Once again, this is &lt;STRONG&gt;not&lt;/STRONG&gt; possible to create a NaN value in a double precision variable from a 64-bit integer variable by doing a simple cast.</description>
      <pubDate>Thu, 13 Dec 2012 20:56:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/Concerns-on-using-AVX-double-floating-point-instructions-for/m-p/973224#M2869</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2012-12-13T20:56:35Z</dc:date>
    </item>
  </channel>
</rss>

