delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/06/13/05:39:13

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
From: "Dave Korn" <dave DOT korn AT artimi DOT com>
To: <cygwin AT cygwin DOT com>
Subject: RE: lrint() incorrect results.
Date: Mon, 13 Jun 2005 10:39:00 +0100
MIME-Version: 1.0
In-Reply-To: <BAY14-F1784BC294209D40BB32F16D0F90@phx.gbl>
Message-ID: <SERRANOGhrsH41WUuHO00000006@SERRANO.CAM.ARTIMI.COM>

----Original Message----
>From: Luke Hutchinson
>Sent: 04 June 2005 18:27

> Is there any particular reason the same inline functions as defined in the
> MinGW header files are not used?  They work correctly, and being inlined,
> are more efficient.


  Well, the main reason is that cygwin uses newlib for libc/libm support,
and newlib is generic across all CPUs, so it can't use x86-specific inline
assembler in quite the same way.  However it would be an eminently suitable
workaround for your applications.

  (BTW I've started looking at the code for this.  It seems it must never
have worked, since these files haven't been modified since they were first
added three years ago.  I haven't exactly understood the problem yet, but
I've figured out that lrintf ought to be just as broken as lrint and only
isn't because of a signed-vs-unsigned bug in the code!  I have a hunch there
may just be a broken endian-ness assumption in the code somewhere, but I'll
know more later).


    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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019