From owner-freebsd-numerics@FreeBSD.ORG Fri Jun 28 05:12:56 2013 Return-Path: Delivered-To: freebsd-numerics@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2FEBA7CF for ; Fri, 28 Jun 2013 05:12:56 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (50-196-151-174-static.hfc.comcastbusiness.net [50.196.151.174]) by mx1.freebsd.org (Postfix) with ESMTP id 13AB71270 for ; Fri, 28 Jun 2013 05:12:56 +0000 (UTC) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.7/8.14.2) with ESMTP id r5S5CsSc004253; Thu, 27 Jun 2013 22:12:54 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by zim.MIT.EDU (8.14.7/8.14.2/Submit) id r5S5CrwZ004252; Thu, 27 Jun 2013 22:12:53 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Date: Thu, 27 Jun 2013 22:12:53 -0700 From: David Schultz To: Bruce Evans Subject: Re: sincos? Message-ID: <20130628051253.GB3590@zim.MIT.EDU> References: <20130627013502.GA37295@troutmask.apl.washington.edu> <20130628103209.H1008@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130628103209.H1008@besplex.bde.org> Cc: enh , Steve Kargl , freebsd-numerics@freebsd.org X-BeenThere: freebsd-numerics@freebsd.org X-Mailman-Version: 2.1.14 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 Jun 2013 05:12:56 -0000 Steve had some patches for this that could have been committed years ago if people would stop quibbling about it. :) I put it on the TODO list on the wiki for a reason! Merging sin() and cos() is basically all there is to it. The advantages to having it are: 1. It's faster when computing the sine and cosine of large angles, because the arg reduction only has to be done once. In particular, functions like cexp() can benefit. 2. Most math libraries have it, even though it's not standardized. The disadvantage is that someone has to spend 15 minutes writing it, plus do some testing...