POV-Ray : Newsgroups : povray.off-topic : It's all statistics : Re: It's all statistics Server Time
29 Jul 2024 18:29:49 EDT (-0400)
  Re: It's all statistics  
From: Le Forgeron
Date: 29 Jun 2011 08:54:59
Message: <4e0b20a3@news.povray.org>
Le 29/06/2011 14:21, Invisible a écrit :
>> Division by a power of 2 is numerically very stable for binary
>> arithmetics: It is just subtraction of the exponent. :-)
> 
> OK. But that still leaves me with the problem of computing the binomial
> coefficient in the first place. Simply generating two vast numbers and
> then expecting their quotient to be computed accurately isn't a very
> good idea. I could probably use Pascal's triangle to compute it more
> directly. (Let's face it, computing the factorials is iterative anyway.)
> 
> Given that the number I eventually want to arrive at is actually 10^-10,
> it seems quite daft to arrive at that by computing huge integers.
> 
> (And this still doesn't help me if I want a P-value.)
> 
>> So where is the problem in calculating such expressions?
> 
> I don't have a copy of Maxima.

Included in any decent distribution... let's troll an OS war again (not!)
That's not Mathematica's license fee.

> 
> But that doesn't matter, because Wolfram Alpha can similarly give you a
> numerical answer almost instantly.
> 
> The real problem is that I want to write computer software which
> computes P-values for the results it obtains. The fact that all these
> distributions are so numerically intractable to operate with makes that
> a rather difficult task.

If you want to play with big numbers by yourself, there is C libraries
about that. They are often used in cryptography but can be used to
perform computation on unlimited integers.

Have a look at GNU MP for instance.

-- 
Software is like dirt - it costs time and money to change it and move it
around.

Just because you can't see it, it doesn't weigh anything,
and you can't drill a hole in it and stick a rivet into it doesn't mean
it's free.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.