Re: new module 'isnan-nolibm'

2007-02-27 Thread Bruno Haible
Jim Meyering asked: > Where did you announce it? http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00269.html http://article.gmane.org/gmane.comp.lib.gnulib.bugs/9267

Re: new module 'isnan-nolibm'

2007-02-27 Thread Ben Pfaff
Jim Meyering <[EMAIL PROTECTED]> writes: > Perhaps I should make gnus start reading via e.g., gmane.org. I recommend this approach. I read many mailing lists this way, and it works very well for me. I'm not sure how gmane chooses what to put in To: and CC:, but I've had no complaints so far. --

Re: new module 'isnan-nolibm'

2007-02-27 Thread Jim Meyering
Matthew Woehlke <[EMAIL PROTECTED]> wrote: > http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00269.html Oh! In _this_ list. Thanks. I never received that message. I wish list-delivery-to-subscribers were more reliable. Perhaps I should make gnus start reading via e.g., gmane.org.

Re: new module 'isnan-nolibm'

2007-02-27 Thread Matthew Woehlke
Jim Meyering wrote: Bruno Haible <[EMAIL PROTECTED]> wrote: The package I announced two days ago shows that most systems have isnan() as a function: $ ./show-portability isnan libcfreebsd-5.2.1 libcfreebsd-6.0 libcirix-6.5 libcmaco

Re: new module 'isnan-nolibm'

2007-02-27 Thread Jim Meyering
Bruno Haible <[EMAIL PROTECTED]> wrote: > The package I announced two days ago shows that most systems have isnan() > as a function: > > $ ./show-portability isnan > libcfreebsd-5.2.1 > libcfreebsd-6.0 > libcirix-6.5 > libcmacosx-10.3

Re: new module 'isnan-nolibm'

2007-02-25 Thread Paul Eggert
Bruno Haible <[EMAIL PROTECTED]> writes: > Paul Eggert wrote: >> > Solaris 10: isnan() is a function, defined in libc >> >> Not that this affects the conclusion, but the Solaris isnan is present >> only for legacy apps. On Solaris 10 isnan is a macro that expands to >> __builtin_isnan, and __bu

Re: new module 'isnan-nolibm'

2007-02-25 Thread Bruno Haible
Paul Eggert wrote: > > Solaris 10: isnan() is a function, defined in libc > > Not that this affects the conclusion, but the Solaris isnan is present > only for legacy apps. On Solaris 10 isnan is a macro that expands to > __builtin_isnan, and __builtin_isnan is done inline. Huh? On a Solaris 10

Re: new module 'isnan-nolibm'

2007-02-25 Thread Paul Eggert
Bruno Haible <[EMAIL PROTECTED]> writes: > Solaris 10: isnan() is a function, defined in libc Not that this affects the conclusion, but the Solaris isnan is present only for legacy apps. On Solaris 10 isnan is a macro that expands to __builtin_isnan, and __builtin_isnan is done inline. The isn

Re: new module 'isnan-nolibm'

2007-02-24 Thread Ben Pfaff
Bruno Haible <[EMAIL PROTECTED]> writes: > Ben Pfaff wrote: >> I was under the impression that some platforms were missing isnan >> entirely, so that this was worth more than just "isnan() without >> libm". But I can't confidently name a system that lacks it. > > The package I announced two days

Re: new module 'isnan-nolibm'

2007-02-24 Thread Bruno Haible
Ben Pfaff wrote: > I was under the impression that some platforms were missing isnan > entirely, so that this was worth more than just "isnan() without > libm". But I can't confidently name a system that lacks it. The package I announced two days ago shows that most systems have isnan() as a func

Re: new module 'isnan-nolibm'

2007-02-24 Thread Bruno Haible
Eric Blake wrote: > No, on cygwin, isnan is a macro in that wraps the internal > functions __isnan{,lf}, and the isnan entry point in cygwin1.dll exists > only for backwards compatibility for multi-year-old apps that were > compiled against cygwin prior to the POSIX compliance bug being fixed of >

Re: new module 'isnan-nolibm'

2007-02-24 Thread Ben Pfaff
Bruno Haible <[EMAIL PROTECTED]> writes: > Ben Pfaff asked: >> >* lib/isnan.h: New file. >> Could/should this be merged into math_.h, so that there's no need >> for an additional #include "isnan.h"? > > If many other modules want isnan() without libm, it would make sense. I was under the impr

Re: new module 'isnan-nolibm'

2007-02-24 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Bruno Haible on 2/24/2007 7:08 PM: > Cygwin: isnan() is a function, defined in cygwin.dll No, on cygwin, isnan is a macro in that wraps the internal functions __isnan{,lf}, and the isnan entry point in cygwin1.dll exists only for ba

Re: new module 'isnan-nolibm'

2007-02-24 Thread Bruno Haible
Eric Blake asked: > For that matter, isnan() is specified to be a macro, not a function. On > what platforms does the macro in the system truly rely on a libm > function? On AIX, OSF/1, HP-UX: AIX 4.3.2: isnan() is a function, defined in libm OSF/1 4.0d: isnan() is a function, defined in lib

Re: new module 'isnan-nolibm'

2007-02-24 Thread Bruno Haible
Daniel Jacobowitz wrote: > That hasn't been the full story for a while. FPA (the obsolete, > usually emulated floating point format) does this, but all modern > systems use VFP word ordering, even if they have only software > floating point. Thanks for pointing this out. I'm changing the macro to

Re: new module 'isnan-nolibm'

2007-02-24 Thread Bruno Haible
Ben Pfaff asked: > > * lib/isnan.h: New file. > Could/should this be merged into math_.h, so that there's no need > for an additional #include "isnan.h"? If many other modules want isnan() without libm, it would make sense. If only *printf routines need it - and that's the current hypothesis

Re: new module 'isnan-nolibm'

2007-02-24 Thread Daniel Jacobowitz
On Sat, Feb 24, 2007 at 08:10:02PM +0100, Bruno Haible wrote: > dnl On ARM, integer types are stored in little-endian byte order, > dnl but floats are stored in big-endian word order. > AC_EGREP_CPP([mixed_endianness], [ > #if defined arm || defined __arm || defined __

Re: new module 'isnan-nolibm'

2007-02-24 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Eric Blake on 2/24/2007 12:56 PM: > According to Bruno Haible on 2/24/2007 12:10 PM: >> But >> isnan() is available in libm on many systems (AIX, Cygwin, HP-UX, OSF/1, >> Solaris) > > Correction - on cygwin, libm is a dummy library to mer

Re: new module 'isnan-nolibm'

2007-02-24 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Bruno Haible on 2/24/2007 12:10 PM: > But > isnan() is available in libm on many systems (AIX, Cygwin, HP-UX, OSF/1, > Solaris) Correction - on cygwin, libm is a dummy library to merely pacify people who insist on using -lm unnecessarily,

Re: new module 'isnan-nolibm'

2007-02-24 Thread Ben Pfaff
Bruno Haible <[EMAIL PROTECTED]> writes: > 2007-02-24 Bruno Haible <[EMAIL PROTECTED]> > > * modules/isnan-nolibm: New file. > * lib/isnan.h: New file. > * lib/isnan.c: New file. > * m4/isnan.m4: New file. Could/should this be merged into math_.h, so that there's no need

new module 'isnan-nolibm'

2007-02-24 Thread Bruno Haible
Hi, A printf substitute should be able to print numbers in hexadecimal notation (conversion 'a' or 'A'), and for this is needs to test whether a number is NaN. The 'x == x' trick doesn't do it, because - as far as I know - this can trap if x is a signalling NaN. So we need an isnan() function. But