From owner-freebsd-numerics@FreeBSD.ORG Mon Aug 13 20:16:32 2012 Return-Path: Delivered-To: freebsd-numerics@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 92C37106566B for ; Mon, 13 Aug 2012 20:16:32 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) by mx1.freebsd.org (Postfix) with ESMTP id 6ACE48FC0C for ; Mon, 13 Aug 2012 20:16:32 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.5/8.14.5) with ESMTP id q7DKGQ9P054218; Mon, 13 Aug 2012 13:16:26 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.5/8.14.5/Submit) id q7DKGQaA054217; Mon, 13 Aug 2012 13:16:26 -0700 (PDT) (envelope-from sgk) Date: Mon, 13 Aug 2012 13:16:26 -0700 From: Steve Kargl To: Stephen Montgomery-Smith Message-ID: <20120813201626.GA54144@troutmask.apl.washington.edu> References: <20120805030609.R3101@besplex.bde.org> <501D9C36.2040207@missouri.edu> <20120805175106.X3574@besplex.bde.org> <501EC015.3000808@missouri.edu> <20120805191954.GA50379@troutmask.apl.washington.edu> <20120807205725.GA10572@server.rulingia.com> <20120809025220.N4114@besplex.bde.org> <5027F07E.9060409@missouri.edu> <20120814003614.H3692@besplex.bde.org> <50295887.2010608@missouri.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <50295887.2010608@missouri.edu> User-Agent: Mutt/1.4.2.3i Cc: freebsd-numerics@freebsd.org, Bruce Evans Subject: Re: Complex arg-trig functions X-BeenThere: freebsd-numerics@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 13 Aug 2012 20:16:32 -0000 On Mon, Aug 13, 2012 at 02:41:59PM -0500, Stephen Montgomery-Smith wrote: > > Also, you made the comment that in the float version, all the 0.5 should > become 0.5F. Two questions: > 1. Doesn't the compiler do this conversion for me? float x, y; y = 0.5 * x; The conversion is effectively 'y = 0.5 * (double)x' where now the rhs is evaluated in double (53-bit precision). If you have 'y = 0.5f * x', then the rhs side is evaluate in float (24-bit precision). For a more complicated, expression whether one computes in 53 rather than 24 bits can have an effect on the outcome. -- Steve