|
From: garap <ga...@py...> - 2010-02-15 13:28:46
|
Hi,
The built-in function 'ibeta()' may have two problem, GNUPLOT 4.2.6 and 4.4.0rc1(Linux).
Type these two lines and see the result,
set logscale y
plot[0:0.10] ibeta(10.0,500.0,x)
---
This result has two plobrem.
(1)The built in function, ibeta(10,500,x), returns 2 at 0.02<x<0.07.
See "src/specfun.c".
The function 'confrac()' returns -1 at error,
but the function 'ibeta()', that calls 'confrac()', returns -1 or 2.
>static double
>ibeta(double a, double b, double x)
>{
> ...
> /* Swap a, b if necessary for more efficient evaluation */
> return a < x * (a + b) ? 1.0 - confrac(b, a, 1.0 - x) : confrac(a, b, x);
(2) The function 'ibeta()' returns "undefined value" for right(valid) arguments.
See "src/specfun.c".
At first, the function 'confrac()' returns an error status when Ahi=0.
At second, the variable 'Ahi' may be 0 when log(Ahi) is not too small.
> /* Set up continued fraction expansion evaluation. */
> Ahi = gp_exp(GAMMA(Apb) + a * log(x) + b * log(1.0 - x) -
> GAMMA(a + 1.0) - GAMMA(b));
Thanks,
Garap
|