This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Problem with lroundf()


Hi all,

I think the following exhibits a bug in the lroundf() routine:

$ 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


PS: the list of packages probably relevant is following. Please ask if
you need any more information.

Package              Version
base-files           3.7-1
cygrunsrv            1.17-1
cygutils             1.3.1-1
cygwin               1.5.24-2
gcc                  3.4.4-3
gcc-core             3.4.4-3

--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]