Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Sep 2023 10:32:18 +0200
From:      Alexander Leidinger <Alexander@Leidinger.net>
To:        sgk@troutmask.apl.washington.edu
Cc:        Paul Zimmermann <Paul.Zimmermann@inria.fr>, freebsd-hackers@freebsd.org
Subject:   Re: Accuracy of Mathematical Functions
Message-ID:  <8849166a6a2deb6ebc1f307d6e8a66a9@Leidinger.net>
In-Reply-To: <ZRMeBEZxce0xcA4U@troutmask.apl.washington.edu>
References:  <p9u0h6ni1hwy.fsf@coriandre.loria.fr> <1395eeabc6d404997f6a09a7b39d3da5@Leidinger.net> <ZRMeBEZxce0xcA4U@troutmask.apl.washington.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)

--=_115d35aedc6ac8327e40df12a22c806f
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII;
 format=flowed

Am 2023-09-26 20:08, schrieb Steve Kargl:
> On Tue, Sep 26, 2023 at 03:26:16PM +0200, Alexander Leidinger wrote:
>> Am 2023-09-25 15:50, schrieb Paul Zimmermann:
>> 
>> > We have updated our comparison:
>> >
>> > https://members.loria.fr/PZimmermann/papers/accuracy.pdf
>> >
>> > This new update includes for the first time the FreeBSD math library,
>> > whose accuracy is quite good, except:
>> 
>> I wonder how those functions/libs you tested compare in terms of 
>> speed...
>> It would allow to provide a hint to the question
>>   "Which lib is the fastest and fulfills the needs in terms of 
>> accuracy for
>> the intended use-case?"
>> 
>> I agree that the best way to do this requires to run all libs on the 
>> same
>> hardware and OS, which is not feasible in your approach. What may be
>> feasible is to compare the relative performance of those subsets, 
>> which you
>> run on the same hardware.
>> 
> 
> Speed vs accuracy is always a trade-off.  Consider

Yes.

[examples]
> The latter is more accurate, but its underlying algorithm
> uses summation-and-carry of the ascending series.  This
> algorithm is sensitive to compiler options, so I haven't
> pushed it FreeBSD (, yet).

A thought just crossed my mind... should we consider to provide two ABI 
compatible math libs, one fast (and "acceptable accurate"... whatever 
this means), and one accurate (and this one being the default to link 
against)? Users then could use libmap.conf(5) to use the one according 
to their needs.

Bye,
Alexander.

-- 
http://www.Leidinger.net Alexander@Leidinger.net: PGP 0x8F31830F9F2772BF
http://www.FreeBSD.org    netchild@FreeBSD.org  : PGP 0x8F31830F9F2772BF

--=_115d35aedc6ac8327e40df12a22c806f
Content-Type: application/pgp-signature;
 name=signature.asc
Content-Disposition: attachment;
 filename=signature.asc;
 size=833
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEER9UlYXp1PSd08nWXEg2wmwP42IYFAmUT6KIACgkQEg2wmwP4
2IZAdg//dfmGI7OY601xsx4Z0NU1s6XPDp1PlarmgdTxHuIhBVlfcGTwnXM75tBp
SBj43NMniMaODfg5ZjOlVXflwYGH/4AraerRHkTniXIC6ebziAl39LxKI1iQ9PCk
7ppUxno4fy+dcOYYS25qLZtRheLOvGvAz6jr2ncxtfw/qYsr6AVcv2uV7xulzX6h
OqGqGAlAOHmbFYLkFen7gPptcPvIe67NMvbkNRZigK3WaVz7N1jEi6wwhZ0HiDG9
++vvkn3EOWgzEFduD5yAWwOMzg6wBU8fBcocsNz2zLwmRU869Bu4vZTkcXsEb0Ld
oOm5wgGbQvt5K01aBob6/662BILO2cNPUobxnd+YekqcTCthnVZ3Jl7Xow74bJo5
cc4JMu/9qz19MmkVgoeHXsTC8cdufDL6WRg5IVHPbLeKX92VzYXFWrpj0TmjOhTI
ASWPTbH1F+OXGrhT1ESIgYdGhDRCH+7qhnbkwNq/U6Ypd+WAhUQWYRrvmlsGTIrE
Y3svItO6n/7I11xV05QmwE8+yPYBomx8ksBMK2OPHegG7sbd323dtNU8FTsekRmz
6c0cwZhGn0PVvmuUdcMZFJ2DfX8q6C0f6dvCYE3uNBd8/6wYZLzqxdEQpprpL7eW
S9jV+n6fI9l48giJgbqX12BhIGN25eYxVTWgw7TPiWAVODTuHtY=
=vIcM
-----END PGP SIGNATURE-----

--=_115d35aedc6ac8327e40df12a22c806f--



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