Re: bin/170206: complex arcsinh, log, etc.

2012-07-29 Thread Stephen Montgomery-Smith
On 07/29/2012 07:08 AM, Bruce Evans wrote: On Sat, 28 Jul 2012, Stephen Montgomery-Smith wrote: On 07/28/2012 09:31 PM, Bruce Evans wrote: On Sat, 28 Jul 2012, Stephen Montgomery-Smith wrote: OK. This clog really seems to work. x*x + y*y - 1 is computed with a ULP less than 0.8. The rest

Re: bin/170206: complex arcsinh, log, etc.

2012-07-29 Thread Bruce Evans
On Sat, 28 Jul 2012, Stephen Montgomery-Smith wrote: On 07/28/2012 09:31 PM, Bruce Evans wrote: On Sat, 28 Jul 2012, Stephen Montgomery-Smith wrote: OK. This clog really seems to work. x*x + y*y - 1 is computed with a ULP less than 0.8. The rest of the errors seem to be due to the implemen

Re: bin/170206: complex arcsinh, log, etc.

2012-07-28 Thread Bruce Evans
The following reply was made to PR bin/170206; it has been noted by GNATS. From: Bruce Evans To: Stephen Montgomery-Smith Cc: Bruce Evans , freebsd-bugs@FreeBSD.org, freebsd-gnats-sub...@freebsd.org, Stephen Montgomery-Smith Subject: Re: bin/170206: complex arcsinh, log, etc

Re: bin/170206: complex arcsinh, log, etc.

2012-07-28 Thread Bruce Evans
On Sat, 28 Jul 2012, Stephen Montgomery-Smith wrote: On 07/28/2012 11:15 AM, Stephen Montgomery-Smith wrote: On 07/28/2012 10:46 AM, Stephen Montgomery-Smith wrote: OK. This clog really seems to work. x*x + y*y - 1 is computed with a ULP less than 0.8. The rest of the errors seem to be due

Re: bin/170206: complex arcsinh, log, etc.

2012-07-28 Thread Stephen Montgomery-Smith
On 07/28/2012 09:31 PM, Bruce Evans wrote: On Sat, 28 Jul 2012, Stephen Montgomery-Smith wrote: OK. This clog really seems to work. x*x + y*y - 1 is computed with a ULP less than 0.8. The rest of the errors seem to be due to the implementation of log1p. The ULP of the final answer seems to

Re: bin/170206: complex arcsinh, log, etc.

2012-07-28 Thread Bruce Evans
On Sat, 28 Jul 2012, Stephen Montgomery-Smith wrote: OK. This clog really seems to work. x*x + y*y - 1 is computed with a ULP less than 0.8. The rest of the errors seem to be due to the implementation of log1p. The ULP of the final answer seems to be never bigger than a little over 2. I re

Re: bin/170206: complex arcsinh, log, etc.

2012-07-28 Thread Stephen Montgomery-Smith
The following reply was made to PR bin/170206; it has been noted by GNATS. From: Stephen Montgomery-Smith To: Bruce Evans Cc: freebsd-bugs@freebsd.org, freebsd-gnats-sub...@freebsd.org, Stephen Montgomery-Smith Subject: Re: bin/170206: complex arcsinh, log, etc. Date: Sat, 28 Jul 2012

Re: bin/170206: complex arcsinh, log, etc.

2012-07-28 Thread Stephen Montgomery-Smith
The following reply was made to PR bin/170206; it has been noted by GNATS. From: Stephen Montgomery-Smith To: Bruce Evans Cc: freebsd-bugs@freebsd.org, freebsd-gnats-sub...@freebsd.org, Stephen Montgomery-Smith Subject: Re: bin/170206: complex arcsinh, log, etc. Date: Sat, 28 Jul 2012

Re: bin/170206: complex arcsinh, log, etc.

2012-07-28 Thread Stephen Montgomery-Smith
On 07/28/2012 04:46 PM, Stephen Montgomery-Smith wrote: Here are some diffs to catrig.c so that it completely passes Peter Jeremy's program www.rulingia.com/~peter/ctest.c. That is, it seems to get all the infs and nans correct. And I think I messed up these diffs as well. Can we try this ins

Re: bin/170206: complex arcsinh, log, etc.

2012-07-28 Thread Stephen Montgomery-Smith
On 07/28/2012 06:12 PM, Stephen Montgomery-Smith wrote: On 07/28/2012 11:15 AM, Stephen Montgomery-Smith wrote: On 07/28/2012 10:46 AM, Stephen Montgomery-Smith wrote: OK. This clog really seems to work. x*x + y*y - 1 is computed with a ULP less than 0.8. The rest of the errors seem to be du

Re: bin/170206: complex arcsinh, log, etc.

2012-07-28 Thread Bruce Evans
The following reply was made to PR bin/170206; it has been noted by GNATS. From: Bruce Evans To: Stephen Montgomery-Smith Cc: Bruce Evans , freebsd-bugs@FreeBSD.org, freebsd-gnats-sub...@freebsd.org, Stephen Montgomery-Smith Subject: Re: bin/170206: complex arcsinh, log, etc

Re: bin/170206: complex arcsinh, log, etc.

2012-07-28 Thread Bruce Evans
On Sat, 28 Jul 2012, Stephen Montgomery-Smith wrote: On 07/28/2012 10:46 AM, Stephen Montgomery-Smith wrote: OK. This clog really seems to work. x*x + y*y - 1 is computed with a ULP less than 0.8. The rest of the errors seem to be due to the implementation of log1p. The ULP of the final ans

Re: bin/170206: complex arcsinh, log, etc.

2012-07-28 Thread Stephen Montgomery-Smith
The following reply was made to PR bin/170206; it has been noted by GNATS. From: Stephen Montgomery-Smith To: Bruce Evans Cc: freebsd-bugs@freebsd.org, freebsd-gnats-sub...@freebsd.org, Stephen Montgomery-Smith Subject: Re: bin/170206: complex arcsinh, log, etc. Date: Sat, 28 Jul 2012

Re: bin/170206: complex arcsinh, log, etc.

2012-07-28 Thread Stephen Montgomery-Smith
On 07/28/2012 11:15 AM, Stephen Montgomery-Smith wrote: On 07/28/2012 10:46 AM, Stephen Montgomery-Smith wrote: OK. This clog really seems to work. x*x + y*y - 1 is computed with a ULP less than 0.8. The rest of the errors seem to be due to the implementation of log1p. The ULP of the final a

Re: bin/170206: complex arcsinh, log, etc.

2012-07-28 Thread Stephen Montgomery-Smith
The following reply was made to PR bin/170206; it has been noted by GNATS. From: Stephen Montgomery-Smith To: Bruce Evans Cc: freebsd-bugs@freebsd.org, freebsd-gnats-sub...@freebsd.org, Stephen Montgomery-Smith Subject: Re: bin/170206: complex arcsinh, log, etc. Date: Sat, 28 Jul 2012

Re: bin/170206: complex arcsinh, log, etc.

2012-07-28 Thread Stephen Montgomery-Smith
Here are some diffs to catrig.c so that it completely passes Peter Jeremy's program www.rulingia.com/~peter/ctest.c. That is, it seems to get all the infs and nans correct. --- catrig.c-old1 2012-07-28 15:00:46.0 -0500 +++ catrig.c 2012-07-28 16:39:24.0 -0500 @@ -89,7 +89,7 @@

Re: bin/170206: complex arcsinh, log, etc.

2012-07-28 Thread Stephen Montgomery-Smith
The following reply was made to PR bin/170206; it has been noted by GNATS. From: Stephen Montgomery-Smith To: Bruce Evans Cc: freebsd-bugs@freebsd.org, freebsd-gnats-sub...@freebsd.org, Stephen Montgomery-Smith Subject: Re: bin/170206: complex arcsinh, log, etc. Date: Sat, 28 Jul 2012

Re: bin/170206: complex arcsinh, log, etc.

2012-07-28 Thread Stephen Montgomery-Smith
On 07/28/2012 10:46 AM, Stephen Montgomery-Smith wrote: OK. This clog really seems to work. x*x + y*y - 1 is computed with a ULP less than 0.8. The rest of the errors seem to be due to the implementation of log1p. The ULP of the final answer seems to be never bigger than a little over 2.

Re: bin/170206: complex arcsinh, log, etc.

2012-07-28 Thread Stephen Montgomery-Smith
The following reply was made to PR bin/170206; it has been noted by GNATS. From: Stephen Montgomery-Smith To: Bruce Evans Cc: freebsd-bugs@freebsd.org, freebsd-gnats-sub...@freebsd.org, Stephen Montgomery-Smith Subject: Re: bin/170206: complex arcsinh, log, etc. Date: Sat, 28 Jul 2012

Re: bin/170206: complex arcsinh, log, etc.

2012-07-28 Thread Stephen Montgomery-Smith
The following reply was made to PR bin/170206; it has been noted by GNATS. From: Stephen Montgomery-Smith To: Bruce Evans Cc: freebsd-bugs@freebsd.org, freebsd-gnats-sub...@freebsd.org, Stephen Montgomery-Smith Subject: Re: bin/170206: complex arcsinh, log, etc. Date: Sat, 28 Jul 2012

Re: bin/170206: complex arcsinh, log, etc.

2012-07-28 Thread Stephen Montgomery-Smith
OK. This clog really seems to work. x*x + y*y - 1 is computed with a ULP less than 0.8. The rest of the errors seem to be due to the implementation of log1p. The ULP of the final answer seems to be never bigger than a little over 2. ___ freebsd-

Re: bin/170206: complex arcsinh, log, etc.

2012-07-28 Thread Stephen Montgomery-Smith
On 07/28/2012 02:35 AM, Bruce Evans wrote: On Sat, 28 Jul 2012, Stephen Montgomery-Smith wrote: On 07/28/2012 12:25 AM, Bruce Evans wrote: #defineDEDBL_EPSILON// for clarity (1) 1 + DE/2= 1 (half way case rounded down to even) (2) 1 + DE/2 + DE/2 = 1

Re: bin/170206: complex arcsinh, log, etc.

2012-07-28 Thread Bruce Evans
On Sat, 28 Jul 2012, Stephen Montgomery-Smith wrote: Yes, everywhere I said "double precision" I meant "doubled precision." I think the papers by Hull et al were perfectly happy with a ULP of around 4. I have been trying to do a little better, but like you I am noticing that log1p isn't that g

Re: bin/170206: complex arcsinh, log, etc.

2012-07-28 Thread Bruce Evans
The following reply was made to PR bin/170206; it has been noted by GNATS. From: Bruce Evans To: Stephen Montgomery-Smith Cc: Bruce Evans , freebsd-bugs@freebsd.org, freebsd-gnats-sub...@freebsd.org, Stephen Montgomery-Smith Subject: Re: bin/170206: complex arcsinh, log, etc

Re: bin/170206: complex arcsinh, log, etc.

2012-07-28 Thread Bruce Evans
On Sat, 28 Jul 2012, Stephen Montgomery-Smith wrote: On 07/28/2012 12:25 AM, Bruce Evans wrote: #defineDEDBL_EPSILON// for clarity (1) 1 + DE/2= 1 (half way case rounded down to even) (2) 1 + DE/2 + DE/2 = 1 (double rounding) (3) DE/2 + DE/2 + 1 =

Re: bin/170206: complex arcsinh, log, etc.

2012-07-27 Thread Stephen Montgomery-Smith
The following reply was made to PR bin/170206; it has been noted by GNATS. From: Stephen Montgomery-Smith To: Bruce Evans Cc: Stephen Montgomery-Smith , freebsd-gnats-sub...@freebsd.org, freebsd-bugs@freebsd.org Subject: Re: bin/170206: complex arcsinh, log, etc. Date: Sat, 28 Jul 2012

Re: bin/170206: complex arcsinh, log, etc.

2012-07-27 Thread Stephen Montgomery-Smith
On 07/28/2012 12:25 AM, Bruce Evans wrote: On Fri, 27 Jul 2012, Stephen Montgomery-Smith wrote: On 07/27/2012 09:26 AM, Bruce Evans wrote: % hm1 = -1; % for (i=0;i<12;i++) hm1 += val[i]; % return (cpack(0.5 * log1p(hm1), atan2(y, x))); It is the trailing terms that I think don't

Re: bin/170206: complex arcsinh, log, etc.

2012-07-27 Thread Stephen Montgomery-Smith
The following reply was made to PR bin/170206; it has been noted by GNATS. From: Stephen Montgomery-Smith To: Bruce Evans Cc: Stephen Montgomery-Smith , freebsd-gnats-sub...@freebsd.org, freebsd-bugs@FreeBSD.org Subject: Re: bin/170206: complex arcsinh, log, etc. Date: Sat, 28 Jul 2012

Re: bin/170206: complex arcsinh, log, etc.

2012-07-27 Thread Stephen Montgomery-Smith
Yes, everywhere I said "double precision" I meant "doubled precision." I think the papers by Hull et al were perfectly happy with a ULP of around 4. I have been trying to do a little better, but like you I am noticing that log1p isn't that good either. I have tried some other things. I am

Re: bin/170206: complex arcsinh, log, etc.

2012-07-27 Thread Bruce Evans
The following reply was made to PR bin/170206; it has been noted by GNATS. From: Bruce Evans To: Stephen Montgomery-Smith Cc: Bruce Evans , Stephen Montgomery-Smith , freebsd-gnats-sub...@freebsd.org, freebsd-bugs@freebsd.org Subject: Re: bin/170206: complex arcsinh, log, etc

Re: bin/170206: complex arcsinh, log, etc.

2012-07-27 Thread Bruce Evans
On Fri, 27 Jul 2012, Stephen Montgomery-Smith wrote: On 07/27/2012 09:26 AM, Bruce Evans wrote: % hm1 = -1; % for (i=0;i<12;i++) hm1 += val[i]; % return (cpack(0.5 * log1p(hm1), atan2(y, x))); It is the trailing terms that I think don't work right here. You sort them and add from

Re: bin/170206: complex arcsinh, log, etc.

2012-07-27 Thread Bruce Evans
The following reply was made to PR bin/170206; it has been noted by GNATS. From: Bruce Evans To: Stephen Montgomery-Smith Cc: Bruce Evans , Stephen Montgomery-Smith , freebsd-gnats-sub...@freebsd.org, freebsd-bugs@FreeBSD.org Subject: Re: bin/170206: complex arcsinh, log, etc

Re: bin/170206: complex arcsinh, log, etc.

2012-07-27 Thread Bruce Evans
On Fri, 27 Jul 2012, Stephen Montgomery-Smith wrote: On 07/27/2012 09:26 AM, Bruce Evans wrote: VC> > For clog, the worst case that I've found so far has x^2+y^2-1 ~= 1e-47: VC> > VC> > x = 0.9995559107901499373838305473327636718750 VC> > y = VC> > 0.000298023

Re: bin/170206: complex arcsinh, log, etc.

2012-07-27 Thread Stephen Montgomery-Smith
The following reply was made to PR bin/170206; it has been noted by GNATS. From: Stephen Montgomery-Smith To: Bruce Evans Cc: Stephen Montgomery-Smith , freebsd-gnats-sub...@freebsd.org, freebsd-bugs@freebsd.org Subject: Re: bin/170206: complex arcsinh, log, etc. Date: Fri, 27 Jul 2012

Re: bin/170206: complex arcsinh, log, etc.

2012-07-27 Thread Stephen Montgomery-Smith
On 07/27/2012 09:26 AM, Bruce Evans wrote: VC> > For clog, the worst case that I've found so far has x^2+y^2-1 ~= 1e-47: VC> > VC> > x = 0.9995559107901499373838305473327636718750 VC> > y = VC> > 0.000298023223876953091912775497878893005143652317201485857367516

Re: bin/170206: complex arcsinh, log, etc.

2012-07-27 Thread Stephen Montgomery-Smith
The following reply was made to PR bin/170206; it has been noted by GNATS. From: Stephen Montgomery-Smith To: Bruce Evans Cc: Stephen Montgomery-Smith , freebsd-gnats-sub...@freebsd.org, freebsd-bugs@freebsd.org Subject: Re: bin/170206: complex arcsinh, log, etc. Date: Fri, 27 Jul 2012

Re: bin/170206: complex arcsinh, log, etc.

2012-07-27 Thread Stephen Montgomery-Smith
On 07/27/2012 09:26 AM, Bruce Evans wrote: % hm1 = -1; % for (i=0;i<12;i++) hm1 += val[i]; % return (cpack(0.5 * log1p(hm1), atan2(y, x))); It is the trailing terms that I think don't work right here. You sort them and add from high to low, but normally it is necessary to add from

Re: bin/170206: complex arcsinh, log, etc.

2012-07-27 Thread Stephen Montgomery-Smith
The following reply was made to PR bin/170206; it has been noted by GNATS. From: Stephen Montgomery-Smith To: Bruce Evans Cc: Stephen Montgomery-Smith , freebsd-gnats-sub...@freebsd.org, freebsd-bugs@freebsd.org Subject: Re: bin/170206: complex arcsinh, log, etc. Date: Fri, 27 Jul 2012

Re: bin/170206: complex arcsinh, log, etc.

2012-07-27 Thread Stephen Montgomery-Smith
On 07/27/2012 09:26 AM, Bruce Evans wrote: On Wed, 25 Jul 2012, Stephen Montgomery-Smith wrote: This function seems to be able to compute clog with a worst case relative error of 4 or 5 ULP. ... I lost your previous reply about this after reading just the first part. Please resend if interest

Re: bin/170206: complex arcsinh, log, etc.

2012-07-27 Thread Bruce Evans
The following reply was made to PR bin/170206; it has been noted by GNATS. From: Bruce Evans To: Stephen Montgomery-Smith Cc: freebsd-gnats-sub...@freebsd.org, freebsd-bugs@freebsd.org Subject: Re: bin/170206: complex arcsinh, log, etc. Date: Sat, 28 Jul 2012 00:26:56 +1000 (EST) On Wed, 25

Re: bin/170206: complex arcsinh, log, etc.

2012-07-27 Thread Bruce Evans
On Wed, 25 Jul 2012, Stephen Montgomery-Smith wrote: This function seems to be able to compute clog with a worst case relative error of 4 or 5 ULP. ... I lost your previous reply about this after reading just the first part. Please resend if interested. First part recovered by vidcontrol: V

Re: bin/170206: complex arcsinh, log, etc.

2012-07-26 Thread Stephen Montgomery-Smith
The following reply was made to PR bin/170206; it has been noted by GNATS. From: Stephen Montgomery-Smith To: bug-follo...@freebsd.org, step...@freebsd.org Cc: Subject: Re: bin/170206: complex arcsinh, log, etc. Date: Thu, 26 Jul 2012 23:50:03 -0500 Oops - error in the comments for catanh

bin/170206: complex arcsinh, log, etc.

2012-07-26 Thread Stephen Montgomery-Smith
>Number: 170206 >Category: bin >Synopsis: complex arcsinh, log, etc. >Confidential: no >Severity: non-critical >Priority: low >Responsible:freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >S