Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Aug 2012 23:13:03 -0000
From:      Peter Jeremy <peter@rulingia.com>
To:        Stephen Montgomery-Smith <stephen@missouri.edu>
Cc:        Diane Bruce <db@db.net>, Bruce Evans <brde@optusnet.com.au>, John Baldwin <jhb@freebsd.org>, David Chisnall <theraven@freebsd.org>, Bruce Evans <bde@freebsd.org>, Steve Kargl <sgk@troutmask.apl.washington.edu>, David Schultz <das@freebsd.org>, Warner Losh <imp@bsdimp.com>
Subject:   Re: Use of C99 extra long double math functions after r236148
Message-ID:  <20120721043052.GB73662@server.rulingia.com>
Resent-Message-ID: <20120812231256.GX20453@server.rulingia.com>
In-Reply-To: <500A139D.2090803@missouri.edu>
References:  <20120719205347.T2601@besplex.bde.org> <50084322.7020401@missouri.edu> <20120720035001.W4053@besplex.bde.org> <50085441.4090305@missouri.edu> <20120720162953.N2162@besplex.bde.org> <20120720184114.B2790@besplex.bde.org> <50097128.6030405@missouri.edu> <20120721032448.X5744@besplex.bde.org> <500A0DCF.4030707@missouri.edu> <500A139D.2090803@missouri.edu>

next in thread | previous in thread | raw e-mail | index | archive | help

--MW5yreqqjyrRcusr
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On 2012-Jul-20 21:27:41 -0500, Stephen Montgomery-Smith <stephen@missouri.e=
du> wrote:
>The way they handle the real part of clog(z), log(hypot(x,y)), when=20
>hypot(x,y) is close to 1, is to do the calculation in double precision.=20
>  So to do it properly, we need a double double precision arithmetic,=20
>which we don't have.

Actually, we do.  r230363 includes both extended and quad long-double
emulation code in lib/libc/softfloat.  There's also ld128 code under
lib/libc/sparc64/fpu.

>The paper says that simulating double precision arithmetic using single=20
>arithmetic is slow, so I would think the same is true for quad-precision.

It depends how much af the arithmetic needs to be in more-than-double
precision.  Possibly, careful choice of partitioning would allow double
precision to be used for most values with multi-precision only needed
some of the time.

I expect catanh() will run into similar problems evaluating
clog((1 + z)/(1 - z)).  Something like clog1p() would help when z=20
is close to 1, as will using alternative expansions.

>Does the inexact flag also raise the SIGFPE signal?

It's under program control - see feenableexcept() and fedisableexcept(),

--=20
Peter Jeremy

--MW5yreqqjyrRcusr
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)

iEYEARECAAYFAlAKMHwACgkQ/opHv/APuIdDewCfdQfziJIblEBpobdLeISWPnRV
OUcAoMDn0liv1DgjH4J8NmH2xnXSPcAe
=NIRR
-----END PGP SIGNATURE-----

--MW5yreqqjyrRcusr--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120721043052.GB73662>