This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
Dodgy functions (was: [ANNOUNCEMENT] TEST RELEASE: Cygwin 2.5.0-0.8)
- From: Achim Gratz <Stromeko at nexgo dot de>
- To: cygwin-apps at cygwin dot com
- Date: Thu, 24 Mar 2016 14:29:39 +0100
- Subject: Dodgy functions (was: [ANNOUNCEMENT] TEST RELEASE: Cygwin 2.5.0-0.8)
- Authentication-results: sourceware.org; auth=none
- References: <announce dot 20160318203409 dot GA11113 at calimero dot vinschen dot de> <56EC6BDA dot 7050505 at cornell dot edu> <20160318214509 dot GD11113 at calimero dot vinschen dot de> <8760whmn3a dot fsf at Rainer dot invalid> <20160320152540 dot GG11113 at calimero dot vinschen dot de> <87wpoxkm28 dot fsf at Rainer dot invalid> <56EF0583 dot 5030302 at cygwin dot com>
Yaakov Selkowitz writes:
>> Doing that seems to have changed the behaviour of sprintf and now one of
>> the tests involving NaN and the %a format fails. Ideas?
>
> Can you be more specific?
I've finally drilled to the bottom of this (on 64bit so far, but the
issues and workarounds are quite likely similar on 32bit). One part of
the problem was that not all symbols are accessible via the import
libraries libc.a and libm.a (sys_errlst and tzname get recognized
additionally if you look at libcygwin.a) . The second part of the
problem is that finite and finitel seem to not work correctly. These
get picked up when I either extract symbols from libm.a, libcygwin.a or
let Configure check for the presence of those symbols with a test
program instead of nm (which picks them up from libcygwin presumably).
Long story short, they seem to report a finite value on at least some
NaN constructs and then the %a format for the Perl sprintf outputs those
bits as a hex FP number rather than just printing "NaN". On 64bit the
culprit is actually finitel, of course, since Perl gets compiled with
long doubles.
Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
Factory and User Sound Singles for Waldorf Q+, Q and microQ:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds