From owner-freebsd-numerics@freebsd.org Fri Apr 28 04:18:51 2017 Return-Path: Delivered-To: freebsd-numerics@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 542DDD53230; Fri, 28 Apr 2017 04:18:51 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "troutmask", Issuer "troutmask" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 36C457B5; Fri, 28 Apr 2017 04:18:51 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.15.2/8.15.2) with ESMTPS id v3S4In0M013553 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 27 Apr 2017 21:18:49 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.15.2/8.15.2/Submit) id v3S4Intr013552; Thu, 27 Apr 2017 21:18:49 -0700 (PDT) (envelope-from sgk) Date: Thu, 27 Apr 2017 21:18:49 -0700 From: Steve Kargl To: freebsd-numerics@freebsd.org Cc: freebsd-hackers@freebsd.org Subject: Re: Implementation of half-cycle trignometric functions Message-ID: <20170428041849.GA13544@troutmask.apl.washington.edu> Reply-To: sgk@troutmask.apl.washington.edu References: <20170409220809.GA25076@troutmask.apl.washington.edu> <20170427231411.GA11346@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170427231411.GA11346@troutmask.apl.washington.edu> User-Agent: Mutt/1.7.2 (2016-11-26) X-BeenThere: freebsd-numerics@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Discussions of high quality implementation of libm functions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Apr 2017 04:18:51 -0000 On Thu, Apr 27, 2017 at 04:14:11PM -0700, Steve Kargl wrote: > > > > The code is attached the bug reportr. > > > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218514 > > > > I have attached a new diff to the bugzilla report. The > diff is 3090 lines and won't be broadcast the mailing list. > > This diff includes fixes for a few inconsequential bugs > and implements modified Estrin's method for sum a few > ploynomials. If you want the previous Horner's method > then add -DHORNER to your CFLAGS. > Grrrr. Find a sloppy theshold can be fun. Index: src/s_cospif.c =================================================================== --- src/s_cospif.c (revision 1916) +++ src/s_cospif.c (working copy) @@ -61,7 +61,7 @@ SET_FLOAT_WORD(ax, ix); if (ix < 0x3f800000) { /* |x| < 1 */ - if (ix < 0x39000000) { /* |x| < 0x1p-13 */ + if (ix < 0x38800000) { /* |x| < 0x1p-14 */ if (huge + ax > 0) /* Raise inexact iff != 0. */ return (1); } -- Steve 20170425 https://www.youtube.com/watch?v=VWUpyCsUKR4 20161221 https://www.youtube.com/watch?v=IbCHE-hONow