From owner-freebsd-numerics@freebsd.org Fri Mar 8 13:58:51 2019 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 60CAE153DD79 for ; Fri, 8 Mar 2019 13:58:51 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 7D5A774C84 for ; Fri, 8 Mar 2019 13:58:50 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c122-106-155-65.carlnfd1.nsw.optusnet.com.au (c122-106-155-65.carlnfd1.nsw.optusnet.com.au [122.106.155.65]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 059E1432CD3; Sat, 9 Mar 2019 00:58:47 +1100 (AEDT) Date: Sat, 9 Mar 2019 00:58:47 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Steve Kargl cc: freebsd-numerics@freebsd.org Subject: Re: Update ENTERI() macro In-Reply-To: <20190308030415.GA28796@troutmask.apl.washington.edu> Message-ID: <20190309005153.H6410@besplex.bde.org> References: <20190227161906.GA77785@troutmask.apl.washington.edu> <20190228060920.R4413@besplex.bde.org> <20190304212159.GA12587@troutmask.apl.washington.edu> <20190305153243.Y1349@besplex.bde.org> <20190306055201.GA40298@troutmask.apl.washington.edu> <20190306225811.P2731@besplex.bde.org> <20190306184829.GA44023@troutmask.apl.washington.edu> <20190307061214.R4911@besplex.bde.org> <20190306214233.GA23159@troutmask.apl.washington.edu> <20190308002245.GA26338@troutmask.apl.washington.edu> <20190308030415.GA28796@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=P6RKvmIu c=1 sm=1 tr=0 a=hrcDgRrNnVuIsdOiM/DCpA==:117 a=kj9zAlcOel0A:10 a=JMbnHHhEAjw9J1_4nJ8A:9 a=CjuIK1q_8ugA:10 X-Rspamd-Queue-Id: 7D5A774C84 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of brde@optusnet.com.au designates 211.29.132.246 as permitted sender) smtp.mailfrom=brde@optusnet.com.au X-Spamd-Result: default: False [-6.18 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; RCVD_IN_DNSWL_LOW(-0.10)[246.132.29.211.list.dnswl.org : 127.0.5.1]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:211.29.132.0/23]; FREEMAIL_FROM(0.00)[optusnet.com.au]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[optusnet.com.au]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RECEIVED_SPAMHAUS_PBL(0.00)[65.155.106.122.zen.spamhaus.org : 127.0.0.11]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: extmail.optusnet.com.au]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.92)[-0.924,0]; IP_SCORE(-2.95)[ip: (-7.71), ipnet: 211.28.0.0/14(-3.89), asn: 4804(-3.10), country: AU(-0.04)]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[optusnet.com.au]; ASN(0.00)[asn:4804, ipnet:211.28.0.0/14, country:AU]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-numerics@freebsd.org X-Mailman-Version: 2.1.29 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, 08 Mar 2019 13:58:51 -0000 On Thu, 7 Mar 2019, Steve Kargl wrote: > On Thu, Mar 07, 2019 at 04:22:45PM -0800, Steve Kargl wrote: >> >> Make that 3 bugs. >> >> Index: ld80/k_expl.h >> =================================================================== >> --- ld80/k_expl.h (revision 344600) >> +++ ld80/k_expl.h (working copy) >> @@ -285,7 +285,7 @@ >> y = cimagl(z); >> __k_expl(x, &hi, &lo, &k); >> >> - exp_x = (lo + hi) * 0x1p16382; >> + exp_x = (lo + hi) * 0x1p16382L; >> expt += k - 16382; >> >> scale1 = 1; >> @@ -292,9 +292,9 @@ >> half_expt = expt / 2; >> SET_LDBL_EXPSIGN(scale1, BIAS + half_expt); >> scale2 = 1; >> - SET_LDBL_EXPSIGN(scale1, BIAS + expt - half_expt); >> + SET_LDBL_EXPSIGN(scale2, BIAS + expt - half_expt); Oops. > This bug appears in ld128/k_expl.h. The other two bugs > are not present or were fixed at some point. All 3 are in both ld*/k_expl.h. This one is is fixed or not present in my src/k_exp[f].c. >> >> - return (CMPLXL(cos(y) * exp_x * scale1 * scale2, >> + return (CMPLXL(cosl(y) * exp_x * scale1 * scale2, One like this is fixed or not present in src/k_expf.c. >> sinl(y) * exp_x * scale1 * scale2)); >> } >> #endif /* _COMPLEX_H */ Bruce