Re: copysign on MSVC

2011-10-09 Thread Bruno Haible
> 2011-10-09 Bruno Haible > > copysign: Provide replacement. While at it, I also added modules for 'copysignf' and 'copysignl'. 2011-10-09 Bruno Haible New module 'copysignf'. * lib/math.in.h (copysignf): New declarati

copysign on MSVC

2011-10-09 Thread Bruno Haible
MSVC 9 does not have the copysign() function. Here's the workaround. 2011-10-09 Bruno Haible copysign: Provide replacement. * lib/math.in.h (copysign): New declaration. * lib/copysign.c: New file. * m4/copysign.m4: New file. * m4/math_h.m4 (gl_M

[PATCH] copysign: enhance tests

2010-11-05 Thread Eric Blake
* modules/copysign-tests (Files): Add minus-zero.h. * tests/test-copysign.c (main): Also test zeros. Signed-off-by: Eric Blake --- I was about to fix strtod to use copysign to work around the icc bug; the first step is to strengthen the test to prove that it will work with icc. I've t

copysign

2010-07-31 Thread Bruno Haible
On glibc systems, use of copysign() does not require linking with libm. This patch ensures that COPYSIGN_LIBM gets set to empty rather than to -lm. 2010-07-31 Bruno Haible copysign: Does not require -lm on glibc systems. * modules/copysign (configure.ac): Use gl_MATHFUNC, not

Re: show-portability output (was: Re: 'signbit' patch to use 'copysign' if available)

2007-04-10 Thread Bruno Haible
Eric Blake wrote: > > $ ./show-portability copysignf > > libcmacosx-10.3 > > libcygwin cygwin > > libmcygwin > > The show-portability script output is a bit confusing for cygwin. Yes, > the fuction copysignf is provided by linking with cygwin1.dll. But o

Re: 'signbit' patch to use 'copysign' if available

2007-04-10 Thread Bruno Haible
Paul Eggert wrote: > Here's a proposed patch to 'signbit' to have it use 'copysign' if > available. I'm applying this patch instead, that takes into account the previous discussions. > In Solaris, copysign is in -lm. If we can't assume -lm then

Re: unions and aliasing (was: Re: 'signbit' patch to use 'copysign' if available)

2007-04-10 Thread Bruno Haible
Hello Paul, > >> Normally the 'signbit' implementation relies on undefined behavior, as > >> it accesses the "wrong" member of a union > > > > This is the point of a 'union'. The code is not casting pointers; it is > > using 'union's for the purpose they were defined for. > > Nevertheless, the be

Re: 'signbit' patch to use 'copysign' if available

2007-04-10 Thread Bruno Haible
Paul Eggert wrote: > > Globally, I think this is backwards: 'copysign' is a more general function > > than 'signbit', > > That's true in general but this is a special case. 'copysign' has > been standardized since 1985, is well understoo

Re: 'signbit' patch to use 'copysign' if available

2007-04-09 Thread Paul Eggert
Bruno Haible <[EMAIL PROTECTED]> writes: > Globally, I think this is backwards: 'copysign' is a more general function > than 'signbit', That's true in general but this is a special case. 'copysign' has been standardized since 1985, is well under

Re: 'signbit' patch to use 'copysign' if available

2007-04-07 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Bruno Haible on 4/7/2007 4:23 AM: > $ ./show-portability copysignf > libcmacosx-10.3 > libcygwin cygwin > libmcygwin The show-portability script output is a bit confusing for cygwin. Yes, the fuc

Re: 'signbit' patch to use 'copysign' if available

2007-04-07 Thread Bruno Haible
Hi Paul, > Here's a proposed patch to 'signbit' to have it use 'copysign' if > available. Globally, I think this is backwards: 'copysign' is a more general function than 'signbit', since it takes 2 arguments. And the usual way to return a boole

'signbit' patch to use 'copysign' if available

2007-04-06 Thread Paul Eggert
Here's a proposed patch to 'signbit' to have it use 'copysign' if available. Normally the 'signbit' implementation relies on undefined behavior, as it accesses the "wrong" member of a union; but when copysign is available the implementation can use co