From owner-freebsd-numerics@freebsd.org Sat Sep 8 04:49:39 2018 Return-Path: Delivered-To: freebsd-numerics@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0930FE788B for ; Sat, 8 Sep 2018 04:49:39 +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 356208592E for ; Sat, 8 Sep 2018 04:49:39 +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 w884nV5A052904 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 7 Sep 2018 21:49:31 -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 w884nVaO052903; Fri, 7 Sep 2018 21:49:31 -0700 (PDT) (envelope-from sgk) Date: Fri, 7 Sep 2018 21:49:31 -0700 From: Steve Kargl To: Bruce Evans Cc: freebsd-numerics@freebsd.org Subject: Re: j0 (and y0) in the range 2 <= x < (p/2)*log(2) Message-ID: <20180908044931.GA52882@troutmask.apl.washington.edu> Reply-To: sgk@troutmask.apl.washington.edu References: <20180903235724.GA95333@troutmask.apl.washington.edu> <20180905201540.D1142@besplex.bde.org> <20180905152104.GA26453@troutmask.apl.washington.edu> <20180906034525.A2959@besplex.bde.org> <20180905190223.GA27865@troutmask.apl.washington.edu> <20180906202658.K978@besplex.bde.org> <20180906223026.GA43005@troutmask.apl.washington.edu> <20180907230825.A933@besplex.bde.org> <20180907175406.GA49351@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180907175406.GA49351@troutmask.apl.washington.edu> User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: freebsd-numerics@freebsd.org X-Mailman-Version: 2.1.27 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: Sat, 08 Sep 2018 04:49:39 -0000 On Fri, Sep 07, 2018 at 10:54:06AM -0700, Steve Kargl wrote: > > I'll probably try a different approach tomorrow. j0(x), > cc, and ss are smoothly varying functions of x. u and v > appear to be slowly varying (in small intervals), so we can > have > > j0(x) = sqrt(1/pi) * (cc(x) *u-ss(x) *v) / sqrt(x). > j0(x+e) = sqrt(1/pi) * (cc(x+e)*u-ss(x+e)*v) / sqrt(x+e). > > where e is some small perturbution. Two equation and two > unknowns is easily solved. Simply need to do this across > the interval to generate u(x) and v(x). > I may have have a better approach! j0(x) = sqrt(1/pi) * (cc(x) * u - ss(x) * v) / sqrt(x) y0(x) = sqrt(1/pi) * (cc(x) * u + ss(x) * v) / sqrt(x) j0(x) + y0(x) = 2 * sqrt(1/pi) * cc(x) * u j0(x) - y0(x) = - 2 * sqrt(1/pi) * ss(x) * v So, we have u = (j0 + y0) / (2 * sqrt(1/pi) * cc) v = (y0 - j0) / (s * sqrt(1/pi) * ss) Thus, we can find u = r/s or u = 1 + r/s and v = r/s. -- Steve