From: Rich Felker <dalias@aerifal.cx>
To: musl@lists.openwall.com
Subject: Re: vfprintf.c:(.text+0xc6c): undefined reference to `__signbitl'
Date: Tue, 9 Apr 2013 21:18:25 -0400 [thread overview]
Message-ID: <20130410011824.GA315@brightrain.aerifal.cx> (raw)
In-Reply-To: <7a37c76ee25fa3c3de54644f67e86a2f.squirrel@alpha.tmit.bme.hu>
On Tue, Apr 09, 2013 at 10:15:40PM +0200, meres5@alpha.tmit.bme.hu wrote:
> Hi!
>
> I have good, and bad news concerning this issue!
>
> >
> > this is bad, it is 'double-double' long double format
> > which means broken long double arithmetics
> >
>
> Its the out of the box debian, installed on our
> old IBM eServer pSeries 615 (7029 6C3).
> Surprisingly a native PPC host/target/and everything. . .
>
> > if you want to play with static linking then it's better
> > not to use soft-float long double, that ruins it a lot
>
> Well, we won't made any REAL (floating point) thing on this
> old machine. Performance is not an issue here.
>
> > (every trivial program will get an entire floating point
> > emulation library linked in from libgcc pulled in by printf
> > so the students will get the impression that static linking
> > always gives bloated binaries..)
>
> The picture is not that bad.
> Finally I managed to unleash the two functions in question
> in ~/src/musl-0.9.9/src/math: __signbitl and __fpclassifyl with some
> #if bombing and voilla!
Just providing those functions does not mean "it worked". Important
floating point code in musl, including printf, scanf, and strtod,
assumes that long double arithmetic conforms to IEEE requirements. IBM
double-double format does not, and it will result in seriously broken
behavior, at least incorrect processing of floating point values, but
possibly even including infinite loops or crashing. You should not try
to hack in support for double-double unless you really know what
you're doing, and even then it's a bad idea.
If on the other hand your toolchain is using IEEE quad precision
128-bit long-double, then these functions should work fine, and your
only problem will be insufficient precision in the long-double math
library and a few other broken functions.
Rich
next prev parent reply other threads:[~2013-04-10 1:18 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-08 19:39 meres5
2013-04-08 20:05 ` Szabolcs Nagy
2013-04-08 20:41 ` meres5
2013-04-08 21:26 ` Szabolcs Nagy
2013-04-09 20:15 ` meres5
2013-04-09 22:38 ` Szabolcs Nagy
2013-04-10 1:18 ` Rich Felker [this message]
2013-04-10 10:55 ` meres5
2013-04-10 8:24 ` John Spencer
2013-04-10 9:47 ` Szabolcs Nagy
2013-04-10 14:14 ` Isaac Dunham
2013-04-10 14:31 ` Rich Felker
2013-08-11 21:30 ` Justin Cormack
2013-04-10 5:14 ` Rob Landley
2013-04-10 6:21 ` Rich Felker
2013-04-08 20:09 ` Rich Felker
2013-04-08 20:47 ` meres5
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130410011824.GA315@brightrain.aerifal.cx \
--to=dalias@aerifal.cx \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).