lrint() incorrect results.
Luke Hutchinson
lukeh-temp-email@hotmail.com
Sat Jun 4 16:58:00 GMT 2005
lrint() does not appear to be working correctly under Cygwin.
The following simple test program compiled with g++ 3.3.3 demonstrates the
problem.
#include <iostream>
#include <cmath>
int main(void) {
std::cout << "lrintf(0.5f)\t" << lrintf(0.5f) << "\n"
"lrintf(-0.5f)\t" << lrintf(-0.5f) << "\n"
"lrint(0.5)\t" << lrint(0.5) << "\n"
"lrint(-0.5)\t" << lrint(0.5) << std::endl;
return 0;
}
The output is
lrintf(0.5f) 0
lrintf(-0.5f) 0
lrint(0.5) 2
lrint(-0.5) 2
Running the same code under Linux (fedora core 1) gives the expected results
of,
lrintf(0.5f) 0
lrintf(-0.5f) 0
lrint(0.5) 0
lrint(-0.5) 0
- Luke
_________________________________________________________________
REALESTATE: biggest buy/rent/share listings
http://ninemsn.realestate.com.au
--
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/
More information about the Cygwin
mailing list