X-Spam-Check-By: sourceware.org Date: Fri, 16 Feb 2007 04:12:31 +0300 From: Andrew Makhorin X-Mailer: The Bat! (v2.0 Beta/1) Personal Reply-To: Andrew Makhorin Message-ID: <106982500.20070216041231@gnu.org> To: "Cary Jamison" CC: cygwin AT cygwin DOT com Subject: Re: strange bug in gettimeofday function In-Reply-To: References: <13811889795 DOT 20070215071733 AT gnu DOT org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-detected-kernel: Error: This connection is not (no longer?) in the cache. 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 > I would be suspicious of floating-point rounding errors here for the > original problem you described. Why don't you try a test case that just > checks if one tv is ever less than a previous tv, without the conversions. Because I could not reproduce the bug concerning gettimeofday out of a complex program where it is used. Probably it works correctly. But then I would like to know why comparison of two floating-point numbers leads to different results: t0 is *exactly* the same as t1, nevertheless the condition t0 > t1 is true (sometimes). That is the question. -- 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/