<?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: Precision difference between Linux and Windows (Fortran77)? in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Precision-difference-between-Linux-and-Windows-Fortran77/m-p/759223#M14710</link>
    <description>I can confirm your results and I now get consistent output from Linux and Windows. It is really possible to get a bit lost in all these compilation options...&lt;BR /&gt;&lt;BR /&gt;Thank you so much for the help.  It is highly appreciated.&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 17 Sep 2009 11:48:27 GMT</pubDate>
    <dc:creator>espenbe</dc:creator>
    <dc:date>2009-09-17T11:48:27Z</dc:date>
    <item>
      <title>Precision difference between Linux and Windows (Fortran77)?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Precision-difference-between-Linux-and-Windows-Fortran77/m-p/759221#M14708</link>
      <description>Consider the following small piece of code (Fortran77) run on 32bit architecture:&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt; PROGRAM TEST&lt;BR /&gt;C&lt;BR /&gt; IMPLICIT NONE&lt;BR /&gt; DOUBLE PRECISION A, B, C&lt;BR /&gt;C&lt;BR /&gt; A = 319.0D0 / DACOS(-1.0D0)&lt;BR /&gt; B = 761.0D0 / 93.0D0&lt;BR /&gt; C = A - B&lt;BR /&gt;C&lt;BR /&gt; WRITE(6, '(3EN35.25)') C, A - B,               C - (A - B)&lt;BR /&gt;C&lt;BR /&gt; END&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;BR /&gt;In this case I would assume "C - (A - B)" would give me "zero" (0.0D0), but it doesn't on Linux. If I compile the same piece of code in Windows, it gives me zero. By the way, if I use Absoft ProFortran compiler I also get zero. Why is this happening? Can I do something with compiler flags? I tried "-O1" and "-O2", but they didn't help me. Simple compiler string was&lt;BR /&gt;&lt;BR /&gt; ifort -O -o test test.f&lt;BR /&gt;&lt;BR /&gt;Result from Linux:&lt;BR /&gt;93.3580579937044916505328729E+00 93.3580579937044916505328729E+00 -3.5527136788005009293556213E-15&lt;BR /&gt;&lt;BR /&gt;Result from Windows:&lt;BR /&gt;93.3580579937044916505328729E+00 93.3580579937044916505328729E+00 0.0000000000000000000000000E+00&lt;BR /&gt;&lt;BR /&gt;Using the compiler option "-pc64" on Linux did not affect the output. Changing the compiler option to "/Qpc80" on Windows made the output equal the one from Linux. The two physical computers are equal, "only" the operating system differs.&lt;BR /&gt;&lt;BR /&gt;Any idea of what I could do to get consistent results from the two compilers? &lt;BR /&gt;Compiler versions:&lt;BR /&gt; Windows: 11.0.066&lt;BR /&gt; Linux: 11.1.046&lt;BR /&gt;&lt;BR /&gt;I also tried with 10.1.022 for Linux with same result.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Espen&lt;BR /&gt;</description>
      <pubDate>Thu, 17 Sep 2009 09:12:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Precision-difference-between-Linux-and-Windows-Fortran77/m-p/759221#M14708</guid>
      <dc:creator>espenbe</dc:creator>
      <dc:date>2009-09-17T09:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: Precision difference between Linux and Windows (Fortran77)?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Precision-difference-between-Linux-and-Windows-Fortran77/m-p/759222#M14709</link>
      <description>&lt;BR /&gt;Compile with: &lt;STRONG&gt;-assume protect-parens&lt;/STRONG&gt; (Linux) or &lt;STRONG&gt;/assume:protect-parens&lt;/STRONG&gt; (Windows). The default is &lt;STRONG&gt;noprotect-parens&lt;/STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;I see consistent compiler treatment and resultsacross Linux and Windows.&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Linux&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;$ ifort -V u68415.f90 -o u68415&lt;BR /&gt;Intel Fortran Intel 64 Compiler Professional for applications running on Intel 64, Version 11.1 Build 20090827 Package ID: l_cprof_p_11.1.056&lt;BR /&gt;Copyright (C) 1985-2009 Intel Corporation. All rights reserved.&lt;BR /&gt;&lt;BR /&gt;Intel Fortran 11.1-2582&lt;BR /&gt;GNU ld version 2.17.50.0.6-5.el5 20061020&lt;BR /&gt;&lt;BR /&gt;$ ./u68415&lt;BR /&gt;93.3580579937044916505328729E+00 93.3580579937044916505328729E+00 -3.5527136788005009293556213E-15&lt;BR /&gt;&lt;BR /&gt;$ ifort -V u68415.f90 -o u68415 &lt;STRONG&gt;-assume protect-parens&lt;/STRONG&gt;&lt;BR /&gt;Intel Fortran Intel 64 Compiler Professional for applications running on Intel 64, Version 11.1 Build 20090827 Package ID: l_cprof_p_11.1.056&lt;BR /&gt;Copyright (C) 1985-2009 Intel Corporation. All rights reserved.&lt;BR /&gt;&lt;BR /&gt;Intel Fortran 11.1-2582&lt;BR /&gt;GNU ld version 2.17.50.0.6-5.el5 20061020&lt;BR /&gt;&lt;BR /&gt;$ ./u68415&lt;BR /&gt;93.3580579937044916505328729E+00 93.3580579937044916505328729E+00 0.0000000000000000000000000E+00&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Windows&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;$ ifort u68415.f90&lt;BR /&gt;Intel Visual Fortran Intel 64 Compiler Professional for applications running on Intel 64, Version 11.1 Build 20090511 Package ID: w_cprof_p_11.1.035&lt;BR /&gt;&lt;BR /&gt;Copyright (C) 1985-2009 Intel Corporation. All rights reserved.&lt;BR /&gt;&lt;BR /&gt;Microsoft  Incremental Linker Version 9.00.21022.08&lt;BR /&gt;Copyright (C) Microsoft Corporation. All rights reserved.&lt;BR /&gt;&lt;BR /&gt;-out: u68415.exe&lt;BR /&gt;-subsystem:console&lt;BR /&gt;u68415.obj&lt;BR /&gt;&lt;BR /&gt;$ .u68415.exe&lt;BR /&gt;93.3580579937044916505328729E+00 93.3580579937044916505328729E+00 -3.5527136788005009293556213E-15&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;$ ifort &lt;STRONG&gt;/assume:protect-parens&lt;/STRONG&gt; u68415.f90&lt;BR /&gt;Intel Visual Fortran Intel 64 Compiler Professional for applications running on Intel 64, Version 11.1 Build 20090511 Package ID: w_cprof_p_11.1.035&lt;BR /&gt;&lt;BR /&gt;Copyright (C) 1985-2009 Intel Corporation. All rights reserved.&lt;BR /&gt;&lt;BR /&gt;Microsoft  Incremental Linker Version 9.00.21022.08&lt;BR /&gt;Copyright (C) Microsoft Corporation. All rights reserved.&lt;BR /&gt;&lt;BR /&gt;-out: u68415.exe&lt;BR /&gt;-subsystem:console&lt;BR /&gt;u68415.obj&lt;BR /&gt;&lt;BR /&gt;$ .u68415.exe&lt;BR /&gt;93.3580579937044916505328729E+00 93.3580579937044916505328729E+00 0.0000000000000000000000000E+00&lt;BR /&gt;</description>
      <pubDate>Thu, 17 Sep 2009 11:38:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Precision-difference-between-Linux-and-Windows-Fortran77/m-p/759222#M14709</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2009-09-17T11:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: Precision difference between Linux and Windows (Fortran77)?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Precision-difference-between-Linux-and-Windows-Fortran77/m-p/759223#M14710</link>
      <description>I can confirm your results and I now get consistent output from Linux and Windows. It is really possible to get a bit lost in all these compilation options...&lt;BR /&gt;&lt;BR /&gt;Thank you so much for the help.  It is highly appreciated.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 17 Sep 2009 11:48:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Precision-difference-between-Linux-and-Windows-Fortran77/m-p/759223#M14710</guid>
      <dc:creator>espenbe</dc:creator>
      <dc:date>2009-09-17T11:48:27Z</dc:date>
    </item>
    <item>
      <title>Re: Precision difference between Linux and Windows (Fortran77)?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Precision-difference-between-Linux-and-Windows-Fortran77/m-p/759224#M14711</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/443444"&gt;espenbe&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;It is really possible to get a bit lost in all these compilation options...&lt;BR /&gt;&lt;BR /&gt;Thank you so much for the help. It is highly appreciated.&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;Indeed it is. There are a lot of them andI cetainly do not remember them all myself.&lt;BR /&gt;&lt;BR /&gt;Glad I could help.</description>
      <pubDate>Thu, 17 Sep 2009 11:54:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Precision-difference-between-Linux-and-Windows-Fortran77/m-p/759224#M14711</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2009-09-17T11:54:33Z</dc:date>
    </item>
  </channel>
</rss>

