mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Pascal Cuoq <cuoq@trust-in-soft.com>
To: "musl@lists.openwall.com" <musl@lists.openwall.com>
Subject: Re: Looking for a libm suitable for float128 (using softfloat or softfp)
Date: Sat, 31 Aug 2019 12:25:08 +0000	[thread overview]
Message-ID: <F518F36D-C58E-4E76-BE05-7142255B9FAF@trust-in-soft.com> (raw)
In-Reply-To: <CA+fZqCXeq0=j9ik7MaaFhjOCuq7x_4WSTaN4cf5YUFiDKuXytg@mail.gmail.com>


> On 31 Aug 2019, at 13:33, ardi <ardillasdelmonte@gmail.com> wrote:
> 
> Hi,
> 
> I'm looking for a software implementation of libm that can deal with
> the IEEE float128 (float128 as implemented by either the John Hauser's
> softfloat or Fabrice Bellard's softfp libraries).
> 
> Looking at the musl source in src/math it certainly implements long
> double versions of all libm functions, and it seems that the source
> code makes checks to confirm whether to use the Intel 80bit long
> double, or a 128bit long double, so, at first glance I think musl
> could be a great choice for this task.

As far as I know, most functions are not implemented for binary128 in musl.

Yes, there are long double version of everything and #ifdefs for the cases where long double is binary64, double-extended or binary128, but binary128 is not actually implemented. In most cases you will be worse off than if you had opted for double-extended:

https://git.musl-libc.org/cgit/musl/tree/src/math/powl.c?id=6ad514e4e278f0c3b18eb2db1d45638c9af1c07f#n517

#elif LDBL_MANT_DIG == 113 && LDBL_MAX_EXP == 16384
// TODO: broken implementation to make things compile
long double powl(long double x, long double y)
{
	return pow(x, y);
}
#endif




      parent reply	other threads:[~2019-08-31 12:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-31 11:33 ardi
2019-08-31 12:25 ` Szabolcs Nagy
2019-08-31 12:25 ` Pascal Cuoq [this message]

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=F518F36D-C58E-4E76-BE05-7142255B9FAF@trust-in-soft.com \
    --to=cuoq@trust-in-soft.com \
    --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).