X-Spam-Check-By: sourceware.org
Reply-To: <newlib@sourceware.org>
From: "Dave Korn" <dave.korn@artimi.com>
To: <newlib@sourceware.org>
Cc: <cygwin@cygwin.com>
References: <19c433eb0708240916t48556c38k563ada260702e1fd@mail.gmail.com>
Subject: RE: Problem with lroundf()
Date: Fri, 24 Aug 2007 17:29:29 +0100
Message-ID: <02f101c7e66b$f1ba3530$2e08a8c0@CAM.ARTIMI.COM>
MIME-Version: 1.0
Content-Type: text/plain; 	charset="iso-8859-1"
X-Mailer: Microsoft Office Outlook 11
In-Reply-To: <19c433eb0708240916t48556c38k563ada260702e1fd@mail.gmail.com>
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id l7OGTrbk003413

On 24 August 2007 17:16, François-Xavier Coudert wrote:

> Hi all,
> 
> I think the following exhibits a bug in the lroundf() routine:

  Gahh, it's entirely likely, we keep finding cruft and corner cases in the fp
math.  Cygwin's maths routines come from newlib; post redirected there and
fups-to set.

 
> $ cat a.c
> #include <math.h>
> #include <stdio.h>
> 
> int main (void) {
>   printf ("%d\n", (int) lroundf(0.7));
> }
> 
> $ gcc a.c && ./a.exe
> 0
> 
> The result of lroundf(0.7) should be 1, not 0. If lround() is used
> instead of lroundf(), then it's working OK.
> 
> I didn't file a PR in bugzilla because the bug report instructions say
> to send a mail to this list, but I can open one if need be.
> 
> Thanks,
> FX

  Might get some spare time over the weekend to look at this with you, might not.
Sorry I can't be more certain.

    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/


