Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Aug 2012 23:12:46 -0000
From:      Stephen Montgomery-Smith <stephen@missouri.edu>
To:        Bruce Evans <brde@optusnet.com.au>
Cc:        Diane Bruce <db@db.net>, John Baldwin <jhb@freebsd.org>, David Chisnall <theraven@freebsd.org>, Bruce Evans <bde@freebsd.org>, Steve Kargl <sgk@troutmask.apl.washington.edu>, David Schultz <das@freebsd.org>, Peter Jeremy <peter@rulingia.com>, Warner Losh <imp@bsdimp.com>
Subject:   Re: Use of C99 extra long double math functions after r236148
Message-ID:  <500C1F51.7050209@missouri.edu>
Resent-Message-ID: <20120812231239.GU20453@server.rulingia.com>
In-Reply-To: <20120722125300.P2246@besplex.bde.org>
References:  <20120714120432.GA70706@server.rulingia.com> <5004A5C7.1040405@missouri.edu> <5004DEA9.1050001@missouri.edu> <20120717200931.U6624@besplex.bde.org> <5006D13D.2080702@missouri.edu> <20120718205625.GA409@troutmask.apl.washington.edu> <500725F2.7060603@missouri.edu> <20120719025345.GA1376@troutmask.apl.washington.edu> <50077987.1080307@missouri.edu> <20120719032706.GA1558@troutmask.apl.washington.edu> <5007826D.7060806@missouri.edu> <5007AD41.9070000@missouri.edu> <20120719205347.T2601@besplex.bde.org> <50084322.7020401@missouri.edu> <20120720035001.W4053@besplex.bde.org> <50085441.4090305@missouri.edu> <20120720162953.N2162@besplex.bde.org> <20120720184114.B2790@besplex.bde.org> <50097128.6030405@missouri.edu> <20120721032448.X5744@besplex.bde.org> <5009BD6C.9050301@missouri.edu> <20120721123522.T877@besplex.bde.org> <500A2565.9090009@missouri.edu> <20120721181204.A1702@besplex.bde.org> <500B594D.1020305@missouri.edu> <20120722125300.P2246@besplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------040203020507050000080401
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

On 07/22/2012 01:19 AM, Bruce Evans wrote:

>> 2.  I have thought more about the problem of computing clog(z) when
>> |z| is close to 1.  I now think it might even require precision that
>> is 3 times better than double precision.
>> It is possible that you could, by chance, pick x and y so that |z| = 1
>> + 1e30.  (I wrote a test program, and this did
>                               e-30 here and elsewhere
>> actually happen a few times.)  So when you compute x^2+y^2-1, if you
>> do it using double double precision, you will get 2e30, but only the
>> most significant digits will be accurate.  The ULP will be about
>> 1e15.  You need triple double precision to get ULP's close to 1.
>
> Hmm, I'm not seeing such cases except when |x| or |y| is 1 and the other
> is tiny.

That was my mistake.  I didn't have enough precision in mpfr to use it 
as a proper reference!  Now I tested my code, and I seem to be getting 
ULP's consistently less than 2!

I am attaching my clog code and my test code.  I go in and manually 
change the test code to test around a different range of values.


--------------040203020507050000080401--



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