This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: strange bug in gettimeofday function
- From: Andrew Makhorin <mao at gnu dot org>
- To: "Cary Jamison" <Cary_Jamison at Symantec dot com>
- Cc: cygwin at cygwin dot com
- Date: Fri, 16 Feb 2007 04:12:31 +0300
- Subject: Re: strange bug in gettimeofday function
- References: <13811889795.20070215071733@gnu.org> <er2v5b$nmj$1@sea.gmane.org>
- Reply-to: Andrew Makhorin <mao at gnu dot org>
> 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/