From m@echler @ending from @t@t@m@th@ethz@ch  Thu Jan 10 11:07:45 2019
From: m@echler @ending from @t@t@m@th@ethz@ch (Martin Maechler)
Date: Thu, 10 Jan 2019 11:07:45 +0100
Subject: [Rd] Bug in dt() function in stats - accuracy only 6 dp.
In-Reply-To: <168306009c1.cfa68936250531.4734375789261380744@zoho.com>
References: <168301b928b.e9668824246620.3977017311338014196@zoho.com>
 <168306009c1.cfa68936250531.4734375789261380744@zoho.com>
Message-ID: <23607.6513.948878.283560@stat.math.ethz.ch>

>>>>> mark chappell via R-devel 
>>>>>     on Wed, 9 Jan 2019 13:10:26 +1100 writes:

    > Hi I believe the dt() function in stats has small areas of
    > inaccuracy.



    > SmallRangeMostDetaileddf150.png shows this occurring in
    > the 10-11th decimal place.



    > MyD4 is computed using Myt_NC(), at the bottom of BugL.R -
    > my function is very slow due to using mpfr, but i believe

    > accurate to the accuracy of genhypergeo() which it uses -
    > 14-15 dp.



    > LargeRangeDiffdf150.png, which is difference between dt()
    > and my function, shows spikes across -1.5 < x < 1.5.



    > I assumed probably only a problem for large df, but
    > SmallRangeCloseZerodf20.png, shows actually more of a
    > problem with
    > df = 20.? Accuracy seems to be only to 6 decimal places.

We did not get a single piece of R code.
Maybe you've wanted to attach the 'BugL.R' R script mentioned
above, but failed to use 'text/plain'  MIME encoding?

Note: If this is about using *non*central t-distribution (as the
 above "NC" suggests), then this is *not* a bug per se,
as the help page *does* mention that the acuracy there is reduced.

Still, I have created an R bugzilla account for you to report
there, i.e.,  https://bugs.r-project.org/

Best,
Martin


    > Using R version 3.5.2.

    > Cheers

    > Mark

    > [DELETED ATTACHMENT SmallRangeMostDetaileddf150.png, PNG image]
    > [DELETED ATTACHMENT LargeRangeDiffdf150.png, PNG image]
    > [DELETED ATTACHMENT SmallRangeCloseZerodf20.png, PNG image]



[Rd] Bug in dt() function in stats - accuracy only 6 dp.
Martin Maechler