Boost logo

Boost Users :

From: John Maddock (john_at_[hidden])
Date: 2007-04-25 12:07:35


Arnaldur Gylfason wrote:
> A few results need comment.
> ->t quantile max diff: 4.07907e-14
> ->t quantile max rel diff: inf
> Here division by 0 gives inf. max diff is quite acceptable though.
> Some guards should be placed to handle 0 or near 0 but I haven't done
> it. I'm not worried about
> the accuracy but anyone may feel free to remedy this.
> ->cauchy quantile max diff: 2.17426e-12
> ->cauchy quantile max rel diff: 0.104537
> Here we are almost surely again dividing by something near 0. Similar
> comments as above apply.

If you can give me the specific input that causes the difference, we can use
functions.wolfram.com to check who's right.

> ->lgamma max diff: 1.13687e-13
> ->lgamma max rel diff: 0.211576
> Same old story

Again can you provide the specific values so we can double check?

> R t quantile: 12.88
> boost::math t quantile: 56.15
> R F pdf: 0.06
> boost::math F pdf: 0.05
> R F cdf: 0.07
> boost::math F cdf: 0.85
> R F quantile: 18.59
> boost::math F quantile: 54.54
>
> The results vary somewhat but this would be acceptable for my
> applications.
> quantile functions seem to be somewhat slower in boost::math than in
> R. Maybe they're more accurate. More detailed analysis would be
> called for if people are concerned about this.

The longer times are being taken on functions that require the incomplete
beta to be inverted. It's possible to do *much* better if you only need a
couple of digits precision, but what approach R takes I don't know.

> The 2 test programs are attached to this message. If they're somehow
> scrambled,
> anyone can write to me and ask for them.
>
> Last but certainly not the least, my compliments to the authors of
> boost::math ;-)

On behalf of all of us, many thanks!

John.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net