From owner-cvs-all@FreeBSD.ORG Fri Aug 1 01:24:39 2008 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7E751065671; Fri, 1 Aug 2008 01:24:39 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 94D2A8FC0C; Fri, 1 Aug 2008 01:24:39 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.2/8.14.2) with ESMTP id m711Od1N095339; Fri, 1 Aug 2008 01:24:39 GMT (envelope-from das@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.2/8.14.1/Submit) id m711OdXj095338; Fri, 1 Aug 2008 01:24:39 GMT (envelope-from das@repoman.freebsd.org) Message-Id: <200808010124.m711OdXj095338@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to das@repoman.freebsd.org using -f From: David Schultz Date: Fri, 1 Aug 2008 01:24:25 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/lib/msun/src e_acosf.c e_asinf.c e_atan2f.c s_atanf.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Aug 2008 01:24:39 -0000 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