Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 Date: Sat, 4 Jun 2005 13:14:10 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: lrint() incorrect results. Message-ID: <20050604171410.GA32605@trixie.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.8i On Sun, Jun 05, 2005 at 02:58:34AM +1000, Luke Hutchinson wrote: >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 >#include > >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 Seems to be YA newlib problem. Dave Korn, can I press you into service to look at this since you've previously demonstrated such amazing adeptness with newlib? :-) cgf -- 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/