<?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: C++ Standard Library IOStreams floating-point problem in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/c-standard-library-iostreams-floating-point-problem/m-p/3717629#M9012</link>
    <description>&amp;gt; Perhaps one could subclass IOStreams [...]&lt;BR /&gt;&lt;BR /&gt;As soon as I learn enough C++ to give this&lt;BR /&gt;a try, I may give this a try.  (Unless&lt;BR /&gt;someone who knows something tells me before&lt;BR /&gt;then that it's really hopeless.)</description>
    <pubDate>Fri, 27 Jan 2006 09:38:24 GMT</pubDate>
    <dc:creator>Steven Schweda</dc:creator>
    <dc:date>2006-01-27T09:38:24Z</dc:date>
    <item>
      <title>C++ Standard Library IOStreams floating-point problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/c-standard-library-iostreams-floating-point-problem/m-p/3717625#M9008</link>
      <description>A different floating-point thread reminded me&lt;BR /&gt;of this C++ problem.&lt;BR /&gt;&lt;BR /&gt;According to the HP C++ User's Guide:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h71000.www7.hp.com/commercial/cplus/docs/ugv_stl.html#_sec" target="_blank"&gt;http://h71000.www7.hp.com/commercial/cplus/docs/ugv_stl.html#_sec&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;7.1.7 IOStreams Expects Default Floating-Point Format&lt;BR /&gt;&lt;BR /&gt;The C++ standard library IOStreams expects floating-point values in the&lt;BR /&gt;default floating-point format for each platform: G_FLOAT on Alpha&lt;BR /&gt;systems and IEEE on I64 systems. Using standard library IOStreams for&lt;BR /&gt;processing floating-point values in a different format (for example, in&lt;BR /&gt;a program compiled /FLOAT=IEEE on Alpha or /FLOAT=G_FLOAT on I64) is not&lt;BR /&gt;supported. The C++ class library does not have this restriction.&lt;BR /&gt;&lt;BR /&gt;Here, "is not supported" is a gentle euphemism&lt;BR /&gt;for "doesn't work".  The current SETI@home&lt;BR /&gt;client, for example, uses IOStreams, and also&lt;BR /&gt;expects IEEE floating-point.  The restriction&lt;BR /&gt;described above makes this impossible on Alpha.&lt;BR /&gt;&lt;BR /&gt;It would be nice if an IEEE edition of this&lt;BR /&gt;library were available on Alpha.  Any hope?&lt;BR /&gt;</description>
      <pubDate>Wed, 25 Jan 2006 17:10:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/c-standard-library-iostreams-floating-point-problem/m-p/3717625#M9008</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2006-01-25T17:10:46Z</dc:date>
    </item>
    <item>
      <title>Re: C++ Standard Library IOStreams floating-point problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/c-standard-library-iostreams-floating-point-problem/m-p/3717626#M9009</link>
      <description>Wow, you're right, Steven.  Now I'm wondering how we dodged that bullet with all the code we switched to the standard library a couple of years ago.  Nothing I can think off off-hand except luck.&lt;BR /&gt;&lt;BR /&gt;Time to search the source again, I guess.  I don't know if it broke anything of ours, but I'd vote for an IEEE version of the library, too.&lt;BR /&gt;&lt;BR /&gt;--Travis Craig&lt;BR /&gt;</description>
      <pubDate>Thu, 26 Jan 2006 20:14:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/c-standard-library-iostreams-floating-point-problem/m-p/3717626#M9009</guid>
      <dc:creator>Travis Craig</dc:creator>
      <dc:date>2006-01-26T20:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: C++ Standard Library IOStreams floating-point problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/c-standard-library-iostreams-floating-point-problem/m-p/3717627#M9010</link>
      <description>The secret is to avoid doing the wrong&lt;BR /&gt;thing(s).  The offending SETI@home code&lt;BR /&gt;comprises many statements like:&lt;BR /&gt;&lt;BR /&gt;in &amp;gt;&amp;gt; center;&lt;BR /&gt;&lt;BR /&gt;where "in" is a std::istringstream, and&lt;BR /&gt;"center" is a double.  The use is like atof()&lt;BR /&gt;(or atol[l]() for the integers), apparently,&lt;BR /&gt;but so much more cute.  They use this stuff&lt;BR /&gt;to parse the data in a some ".xml" file(s).&lt;BR /&gt;Works fine for integers, too, but the&lt;BR /&gt;results are nonsense for floating-point&lt;BR /&gt;variables, due to the format difference.&lt;BR /&gt;&lt;BR /&gt;The SETI@home code has hundreds of these,&lt;BR /&gt;making manual conversion to harmless, old&lt;BR /&gt;code more work than I can justify.</description>
      <pubDate>Thu, 26 Jan 2006 22:47:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/c-standard-library-iostreams-floating-point-problem/m-p/3717627#M9010</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2006-01-26T22:47:15Z</dc:date>
    </item>
    <item>
      <title>Re: C++ Standard Library IOStreams floating-point problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/c-standard-library-iostreams-floating-point-problem/m-p/3717628#M9011</link>
      <description>Steven,&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt;&lt;BR /&gt;in &amp;gt;&amp;gt; center;&lt;BR /&gt;...&lt;BR /&gt;The SETI@home code has hundreds of these,&lt;BR /&gt;making manual conversion to harmless, old&lt;BR /&gt;code more work than I can justify.&lt;BR /&gt;&amp;lt;&amp;lt;&amp;lt;&lt;BR /&gt;&lt;BR /&gt;Perhaps one could subclass IOStreams, overwriting operator&amp;gt;&amp;gt; to do the Right Thing(TM). That way not the uses of "in" et al. would have to be reworked, but just the declarations.&lt;BR /&gt;&lt;BR /&gt;Just an idea...&lt;BR /&gt;&lt;BR /&gt;cu,&lt;BR /&gt;  Martin</description>
      <pubDate>Fri, 27 Jan 2006 02:50:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/c-standard-library-iostreams-floating-point-problem/m-p/3717628#M9011</guid>
      <dc:creator>Martin Vorlaender</dc:creator>
      <dc:date>2006-01-27T02:50:36Z</dc:date>
    </item>
    <item>
      <title>Re: C++ Standard Library IOStreams floating-point problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/c-standard-library-iostreams-floating-point-problem/m-p/3717629#M9012</link>
      <description>&amp;gt; Perhaps one could subclass IOStreams [...]&lt;BR /&gt;&lt;BR /&gt;As soon as I learn enough C++ to give this&lt;BR /&gt;a try, I may give this a try.  (Unless&lt;BR /&gt;someone who knows something tells me before&lt;BR /&gt;then that it's really hopeless.)</description>
      <pubDate>Fri, 27 Jan 2006 09:38:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/c-standard-library-iostreams-floating-point-problem/m-p/3717629#M9012</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2006-01-27T09:38:24Z</dc:date>
    </item>
  </channel>
</rss>

