X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Message-ID: From: Mike Marchywka To: Richard Stanton , "cygwin AT cygwin DOT com" Subject: RE: cygwin gcc: Different numerical results in thread vs in main() Date: Mon, 4 Aug 2008 13:01:48 -0400 In-Reply-To: <40C7B1BFC291ED4E9D10436D07736A33127AB73D21@EXMAIL7.haas.uc.berkeley.edu> References: <40C7B1BFC291ED4E9D10436D07736A33127AB73CD1 AT EXMAIL7 DOT haas DOT uc DOT berkeley DOT edu> <40C7B1BFC291ED4E9D10436D07736A33127AB73D21 AT EXMAIL7 DOT haas DOT uc DOT berkeley DOT edu> Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id m74H2o7w001242 > From: stanton AT haas DOT berkeley DOT edu > To: marchywka AT hotmail DOT com; cygwin AT cygwin DOT com > Date: Mon, 4 Aug 2008 09:40:36 -0700 > Subject: RE: cygwin gcc: Different numerical results in thread vs in main() > > 1) The result from the within thread calculation matches my Mac output (note that the Mac is also an Intel based machine, and I'm also using gcc there, albeit version 4.0.1, so clearly something is operating differently there). The main() result is different from the Mac output. > rant> I would have replied 5 minutes sooner but I was waiting for hotmail to let me go to text mode while an ad, probably composed by someone who doesn't know what a CPU is, show me an animation of something. /rant> The only reason I point this out is that you can write indefinite precision math code but it will be slower. The compiler may generate much better code if you don't care about the last few bits. Definitely check the intel books on architecture and issues, not sure what to suggest on floating point but maybe one of the standards groups discusses the issues. _________________________________________________________________ Reveal your inner athlete and share it with friends on Windows Live. http://revealyourinnerathlete.windowslive.com?locale=en-us&ocid=TXT_TAGLM_WLYIA_whichathlete_us -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/