Mail Archives: cygwin/2009/07/26/15:50:46
--------------060503020200030408000508
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Leena DOT Padgaonkar AT patni DOT com wrote:
> My basic problem is that the cygwin floating addition is giving
> different results than VS 2008 for certain float values .Both the
> environments are on the same PC. So I was wondering about the floating
> point format used in cygwin.
>
> Btw, the makefile which I am using are having following options
> OPTFLAGS = -I . -O3 -funroll-loops -mtune=pentium3 -ffast-math
> -mfancy-math-387
>
>
Only 64-bit Windows passes the same settings of x87 precision mode
(53-bit) and SSE abrupt underflow mode to both gcc and MSVC built .exe.
-ffast-math would not be recommended for similarity to MSVC build, where
none of the aggressive options would normally be in use. Only the
abrupt underflow setting matches MSVC.
If /Ox is set for MSVC, similar optimization should be obtained with gcc
-O3.
If you are looking for full performance, and don't need compatibility
with 10-year-old CPUs, you would normally set /fp:fast /arch:SSE2 in
MSVC, and corresponding -march=pentium-m -mfpmath=sse (or newer -march)
in gcc. If you don't set /arch:SSE2 /fp:fast in MSVC, you imply K&R
style promotion of certain float expressions to double, such as you get
with 387 math in gcc.
--------------060503020200030408000508
Content-Type: message/rfc822;
name="Re: cygwin gcc compatibility with MSVC numerics.eml"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="Re: cygwin gcc compatibility with MSVC numerics.eml"
Return-Path: <n8tm AT aol DOT com>
Received: from [192.168.1.102] (99-13-231-72.lightspeed.snjsca.sbcglobal.net [99.13.231.72]) by cia-ma05.mx.aol.com (v124.15) with ESMTP id MAILCIAMA058-91464a6cabea119; Sun, 26 Jul 2009 15:18:05 -0400
Message-ID: <4A6CABEB DOT 4000701 AT aol DOT com>
Date: Sun, 26 Jul 2009 12:18:03 -0700
From: Tim Prince <n8tm AT aol DOT com>
Reply-To: tprince AT computer DOT org
User-Agent: Thunderbird 2.0.0.22 (Windows/20090605)
MIME-Version: 1.0
To: Leena DOT Padgaonkar AT patni DOT com
Subject: Re: cygwin gcc compatibility with MSVC numerics
References: <10746230 DOT 2742571248621615816 DOT JavaMail DOT nabble AT isper DOT nabble DOT com>
In-Reply-To: <10746230 DOT 2742571248621615816 DOT JavaMail DOT nabble AT isper DOT nabble DOT com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-AOL-IP: 99.13.231.72
X-Mailer: Unknown (No Version)
Leena DOT Padgaonkar AT patni DOT com wrote:
> My basic problem is that the cygwin floating addition is giving different results than VS 2008 for certain float values .Both the environments are on the same PC. So I was wondering about the floating point format used in cygwin.
>
> Btw, the makefile which I am using are having following options
> OPTFLAGS = -I . -O3 -funroll-loops -mtune=pentium3 -ffast-math -mfancy-math-387
>
>
Only 64-bit Windows passes the same settings of x87 precision mode
(53-bit) and SSE abrupt underflow mode to both gcc and MSVC built .exe.
-ffast-math would not be recommended for similarity to MSVC build, where
none of the aggressive options would normally be in use. Only the
abrupt underflow setting matches MSVC.
If /Ox is set for MSVC, similar optimization should be obtained with gcc
-O3.
If you are looking for full performance, and don't need compatibility
with 10-year-old CPUs, you would normally set /fp:fast /arch:SSE2 in
MSVC, and corresponding -march=pentium-m -mfpmath=sse (or newer -march)
in gcc. If you don't set /arch:SSE2 /fp:fast in MSVC, you imply K&R
style promotion of certain float expressions to double, such as you get
with 387 math in gcc.
--------------060503020200030408000508
Content-Type: text/plain; charset=us-ascii
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
--------------060503020200030408000508--
- Raw text -