Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Jul 2012 23:20:06 GMT
From:      Stephen Montgomery-Smith <stephen@missouri.edu>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/170206: complex arcsinh, log, etc.
Message-ID:  <201207282320.q6SNK6Uh030957@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/170206; it has been noted by GNATS.

From: Stephen Montgomery-Smith <stephen@missouri.edu>
To: Bruce Evans <brde@optusnet.com.au>
Cc: freebsd-bugs@freebsd.org, FreeBSD-gnats-submit@freebsd.org,
        Stephen Montgomery-Smith <stephen@freebsd.org>
Subject: Re: bin/170206: complex arcsinh, log, etc.
Date: Sat, 28 Jul 2012 18:12:07 -0500

 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 answer seems to be never bigger than a little over 2.
 >>
 >>
 >
 >
 > Also, I don't think the problem is due to the implementation of log1p.
 > If you do an error analysis of log(1+x) where x is about exp(-1)-1, and
 > x is correct to within 0.8 ULP, I suspect that about 2.5 ULP is the best
 > you can do for the final answer:
 >
 > relative_error(log(1+x)) = fabs(1/((1+x) log(1+x))) * relative_error(x)
 >                    = 1.58 * relative_error(x)
 >
 > Given that log1p has itself a ULP of about 1, and relative error in x is
 > 0.8, and considering x=exp(-1)-1, this gives a ULP at around 1.58*0.8+1
 > = 2.3.  And that is what I observed.
 >
 > (Here "=" means approximately equal to.)
 
 And I should add that I just realized that ULP isn't quite the same as 
 relative error, so an extra factor of up to 2 could make its way into 
 the calculations.
 



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