Re: Use of C99 extra long double math functions after r236148

看板FB_current作者時間13年前 (2012/06/03 18:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串41/100 (看更多)
--tThc/1wpZn/ma/RB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2012-May-28 13:31:59 -0700, Steve Kargl <sgk@troutmask.apl.washington.ed= u> wrote: >On Mon, May 28, 2012 at 11:01:24AM -0500, Stephen Montgomery-Smith wrote: >> One thing that could be done is to have a "math/cephes" port that adds= =20 >> the extra C99 math functions. This is already done in the math/sage=20 >> port, using a rather clever patch due to Peter Jeremy, that applies to= =20 >> the cephes code. =2E.. >This is a horrible, horrible, horrible idea. Have you >looked at the cephes code, particularly the complex.h >functions? The cephes code is somewhat a mess layout-wise. Algorithmetically, it seems somewhat variable - some functions are implemented (hopefully correctly) using semi-numerical techniques, whereas others just use mathematical identities which will result in precision loss - though most of the functions include accuracy information. I agree it would be far preferable to have a properly validated C99 libm with all functions having maximum errors of a no more than a few LSB over their complete domain, as well as correct support for signed zeroes, infinities and signalling and non-signalling NaNs but that is a non-trivial undertaking. In the interim, how should FreeBSD handle apps that want a C99 libm? 1) Fail to build them 2) Provide possibly imperfect fallbacks for the unimplemented bits. If someone (I don't have the expertise) wants to identify the cephes functions that are sub-standard, we can include link-time warnings (as done for eg gets(3)) when they are used. --=20 Peter Jeremy --tThc/1wpZn/ma/RB Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk/D9nQACgkQ/opHv/APuIfj8gCgw6KYe5/QGi6YKRKYEIxX0Kf4 WmMAnj4GQenT3LmA9RWalUEtvZ/PIUgH =oWgS -----END PGP SIGNATURE----- --tThc/1wpZn/ma/RB--
文章代碼(AID): #1FopqnzX (FB_current)
討論串 (同標題文章)
完整討論串 (本文為第 41 之 100 篇):
文章代碼(AID): #1FopqnzX (FB_current)