Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Mar 2019 00:58:47 +1100 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Steve Kargl <sgk@troutmask.apl.washington.edu>
Cc:        freebsd-numerics@freebsd.org
Subject:   Re: Update ENTERI() macro
Message-ID:  <20190309005153.H6410@besplex.bde.org>
In-Reply-To: <20190308030415.GA28796@troutmask.apl.washington.edu>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190309005153.H6410>