X-Spam-Check-By: sourceware.org From: "Dave Korn" To: "'Andrew Makhorin'" , "'Robin Walker'" Cc: , "'Peter Rosin'" References: <13811889795 DOT 20070215071733 AT gnu DOT org> <106982500 DOT 20070216041231 AT gnu DOT org> <1433795387 DOT 20070216163624 AT gnu DOT org> Subject: RE: strange bug in gettimeofday function Date: Fri, 16 Feb 2007 15:24:26 -0000 Message-ID: <0d4001c751de$8cba5600$2e08a8c0@CAM.ARTIMI.COM> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <1433795387.20070216163624@gnu.org> 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 On 16 February 2007 13:36, Andrew Makhorin wrote: > The irony is that I usually give the same standard explanation about > floating-point to people who do not understand that :) *Unfortunately*, > you are right, and the difference really appears because the second > value returned by get_time being computed with full 80-bit precision > is kept in a fpu register during the comparison while the first value > is stored and then loaded as a 64-bit value. This is the infamous http://gcc.gnu.org/PR323. See in particular comment #60 for a solution (although IIRC _FPU_SETCW doesn't exist on cygwin... maybe I'll see about adding it). cheers, DaveK -- Can't think of a witty .sigline today.... -- 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/