<?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 Re: An error when converting from double to Ipp32f. in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/An-error-when-converting-from-double-to-Ipp32f/m-p/891083#M11491</link>
    <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/408384"&gt;thstart&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;P&gt;&lt;SPAN style="font-size: x-small;"&gt;double value = 0;&lt;BR /&gt;Ipp32f pValD;&lt;BR /&gt;Ipp8u Buf[]="19970501";&lt;BR /&gt;value = atof((const char*)Buf);&lt;BR /&gt;pValD = (Ipp32f )value;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: x-small;"&gt;From debugger:&lt;BR /&gt;value19970501.000000000double&lt;BR /&gt;pValD19970500.float&lt;BR /&gt;&lt;BR /&gt;the result in pValD=19970500 , not 19970501 &lt;BR /&gt;this error occurs when converting from double to Ipp32f.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="font-size: x-small;"&gt;Do you have any explanation?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;Ipp32f is a 32bit floating point, double are generally 64 bits thus have more precision and can represent bigger numbers.&lt;/P&gt;
&lt;P&gt;Not all natural numbers can be represented by floating points. In your case there is probably no representation for 19970501 in 32 bits but there is in 64 bits (I didn't do the math but you can convinced yourself if you look online for the internal representation of floating point).&lt;/P&gt;
&lt;P&gt;Hope this help,&lt;/P&gt;
&lt;P&gt;Emmanuel&lt;/P&gt;</description>
    <pubDate>Tue, 02 Dec 2008 12:02:26 GMT</pubDate>
    <dc:creator>Emmanuel_W_</dc:creator>
    <dc:date>2008-12-02T12:02:26Z</dc:date>
    <item>
      <title>An error when converting from double to Ipp32f.</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/An-error-when-converting-from-double-to-Ipp32f/m-p/891082#M11490</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: x-small;"&gt;double value = 0;&lt;BR /&gt;Ipp32f pValD;&lt;BR /&gt;Ipp8u Buf[]="19970501";&lt;BR /&gt;value = atof((const char*)Buf);&lt;BR /&gt;pValD = (Ipp32f )value;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: x-small;"&gt;From debugger:&lt;BR /&gt;value19970501.000000000double&lt;BR /&gt;pValD19970500.float&lt;BR /&gt;&lt;BR /&gt;the result in pValD=19970500 , not 19970501 &lt;BR /&gt;this error occurs when converting from double to Ipp32f.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="font-size: x-small;"&gt;Do you have any explanation?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Dec 2008 07:40:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/An-error-when-converting-from-double-to-Ipp32f/m-p/891082#M11490</guid>
      <dc:creator>constantine-vassilev</dc:creator>
      <dc:date>2008-12-02T07:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: An error when converting from double to Ipp32f.</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/An-error-when-converting-from-double-to-Ipp32f/m-p/891083#M11491</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/408384"&gt;thstart&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;P&gt;&lt;SPAN style="font-size: x-small;"&gt;double value = 0;&lt;BR /&gt;Ipp32f pValD;&lt;BR /&gt;Ipp8u Buf[]="19970501";&lt;BR /&gt;value = atof((const char*)Buf);&lt;BR /&gt;pValD = (Ipp32f )value;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: x-small;"&gt;From debugger:&lt;BR /&gt;value19970501.000000000double&lt;BR /&gt;pValD19970500.float&lt;BR /&gt;&lt;BR /&gt;the result in pValD=19970500 , not 19970501 &lt;BR /&gt;this error occurs when converting from double to Ipp32f.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="font-size: x-small;"&gt;Do you have any explanation?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;Ipp32f is a 32bit floating point, double are generally 64 bits thus have more precision and can represent bigger numbers.&lt;/P&gt;
&lt;P&gt;Not all natural numbers can be represented by floating points. In your case there is probably no representation for 19970501 in 32 bits but there is in 64 bits (I didn't do the math but you can convinced yourself if you look online for the internal representation of floating point).&lt;/P&gt;
&lt;P&gt;Hope this help,&lt;/P&gt;
&lt;P&gt;Emmanuel&lt;/P&gt;</description>
      <pubDate>Tue, 02 Dec 2008 12:02:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/An-error-when-converting-from-double-to-Ipp32f/m-p/891083#M11491</guid>
      <dc:creator>Emmanuel_W_</dc:creator>
      <dc:date>2008-12-02T12:02:26Z</dc:date>
    </item>
    <item>
      <title>Re: An error when converting from double to Ipp32f.</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/An-error-when-converting-from-double-to-Ipp32f/m-p/891084#M11492</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/404536"&gt;eweber&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;P&gt;Ipp32f is a 32bit floating point, double are generally 64 bits thus have more precision and can represent bigger numbers.&lt;/P&gt;
&lt;P&gt;Not all natural numbers can be represented by floating points. In your case there is probably no representation for 19970501 in 32 bits but there is in 64 bits (I didn't do the math but you can convinced yourself if you look online for the internal representation of floating point).&lt;/P&gt;
&lt;P&gt;Hope this help,&lt;/P&gt;
&lt;P&gt;Emmanuel&lt;/P&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;Yes you are right - flat has significant max 7 digits. The problem &lt;BR /&gt;is actually I need a fast conversion between string and Intel types.&lt;BR /&gt;In this case I have to use Microsoft's _atodbl. I am using vectors&lt;BR /&gt;and this would be a performance problem. Does Intel has a vector&lt;BR /&gt;string to Intel types conversion function?
&lt;TABLE style="width: 140pt; border-collapse: collapse;" border="0" cellspacing="0" cellpadding="0" width="187"&gt;
&lt;COLGROUP span="1"&gt;&lt;COL style="width: 140pt; mso-width-source: userset; mso-width-alt: 6838;" span="1" width="187" /&gt;&lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15pt; mso-height-source: userset;" height="20"&gt;
&lt;TD style="width: 140pt; height: 15pt; background-color: transparent; border: #f0f0f0;" width="187" height="20"&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/P&gt;</description>
      <pubDate>Wed, 03 Dec 2008 07:46:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/An-error-when-converting-from-double-to-Ipp32f/m-p/891084#M11492</guid>
      <dc:creator>constantine-vassilev</dc:creator>
      <dc:date>2008-12-03T07:46:04Z</dc:date>
    </item>
    <item>
      <title>Re: An error when converting from double to Ipp32f.</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/An-error-when-converting-from-double-to-Ipp32f/m-p/891085#M11493</link>
      <description>&lt;DIV style="margin:0px;"&gt;Hello,&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;'Intel types' is nothing more than just typedefs (see ippdefs.h file)&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;typedef float Ipp32f;&lt;BR /&gt;typedef double Ipp64f;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;We do not have string to typeconversion functions in IPP.&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;Regards,&lt;BR /&gt; Vladimir&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Dec 2008 07:53:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/An-error-when-converting-from-double-to-Ipp32f/m-p/891085#M11493</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2008-12-03T07:53:16Z</dc:date>
    </item>
    <item>
      <title>Re: An error when converting from double to Ipp32f.</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/An-error-when-converting-from-double-to-Ipp32f/m-p/891086#M11494</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/61463"&gt;vdudnik&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;DIV style="margin:0px;"&gt;Hello,&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;'Intel types' is nothing more than just typedefs (see ippdefs.h file)&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;typedef float Ipp32f;&lt;BR /&gt;typedef double Ipp64f;&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;We do not have string to typeconversion functions in IPP.&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;Regards,&lt;BR /&gt; Vladimir&lt;/DIV&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;If they are just typedefs, how they are 32 bit aligned?&lt;/P&gt;</description>
      <pubDate>Wed, 03 Dec 2008 08:21:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/An-error-when-converting-from-double-to-Ipp32f/m-p/891086#M11494</guid>
      <dc:creator>constantine-vassilev</dc:creator>
      <dc:date>2008-12-03T08:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: An error when converting from double to Ipp32f.</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/An-error-when-converting-from-double-to-Ipp32f/m-p/891087#M11495</link>
      <description>&lt;DIV style="margin:0px;"&gt;What do you mean? How typedef is related to memory alignment?&lt;/DIV&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Dec 2008 08:33:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/An-error-when-converting-from-double-to-Ipp32f/m-p/891087#M11495</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2008-12-03T08:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: An error when converting from double to Ipp32f.</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/An-error-when-converting-from-double-to-Ipp32f/m-p/891088#M11496</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/61463"&gt;vdudnik&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;DIV style="margin:0px;"&gt;What do you mean? How typedef is related to memory alignment?&lt;/DIV&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;I just want to use 32 bit memory alignment when for example create an array&lt;BR /&gt;and read from a disk file for example.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Dec 2008 08:50:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/An-error-when-converting-from-double-to-Ipp32f/m-p/891088#M11496</guid>
      <dc:creator>constantine-vassilev</dc:creator>
      <dc:date>2008-12-03T08:50:29Z</dc:date>
    </item>
    <item>
      <title>Re: An error when converting from double to Ipp32f.</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/An-error-when-converting-from-double-to-Ipp32f/m-p/891089#M11497</link>
      <description>&lt;DIV style="margin:0px;"&gt;You mayuse ippMalloc/ippFree functions which provide you 32-bytes aligned memory buffer (so 32-bit alignment is guaranteed for sure)&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;Vladimir&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Dec 2008 08:54:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/An-error-when-converting-from-double-to-Ipp32f/m-p/891089#M11497</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2008-12-03T08:54:55Z</dc:date>
    </item>
  </channel>
</rss>

