Date: Fri, 1 Aug 2008 01:24:25 +0000 (UTC) From: David Schultz <das@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/lib/msun/src e_acosf.c e_asinf.c e_atan2f.c s_atanf.c Message-ID: <200808010124.m711OdXj095338@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
das 2008-08-01 01:24:25 UTC FreeBSD src repository Modified files: lib/msun/src e_acosf.c e_asinf.c e_atan2f.c s_atanf.c Log: SVN rev 181100 on 2008-08-01 01:24:25Z by das Fix some problems with asinf(), acosf(), atanf(), and atan2f(): - Adjust several constants for float precision. Some thresholds that were appropriate for double precision were never changed when these routines were converted to float precision. This has an impact on performance but not accuracy. (Submitted by bde.) - Reduce the degrees of the polynomials used. A smaller degree suffices for float precision. - In asinf(), use double arithmetic in part of the calculation to avoid a corner case and some complicated arithmetic involving a division and some buggy constants. This improves performance and accuracy. Max error (ulps): asinf acosf atanf before 0.925 0.782 0.852 after 0.743 0.804 0.852 As bde points out, it's cheaper for asin*() and acos*() to use polynomials instead of rational functions, but that's a task for another day. Revision Changes Path 1.10 +11 -17 src/lib/msun/src/e_acosf.c 1.11 +18 -35 src/lib/msun/src/e_asinf.c 1.10 +2 -2 src/lib/msun/src/e_atan2f.c 1.10 +11 -17 src/lib/msun/src/s_atanf.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200808010124.m711OdXj095338>