|
From: CM <mon...@gm...> - 2006-09-24 21:48:34
|
On 9/24/06, Hans-Bernhard Br=F6ker <br...@ph...> wrote:
>
> CM wrote:
>
> > No, that's not what I'm seeing. I'm seeing a graph with dotted lines
> > but no function output. I have posted one more picture, this time the
> > result of running
> >
> > plot [1:2] gamma(x)
> >
> > It's rather interesting, and I'm afraid not terribly enlightening.
>
> Actually, it is. It matches my original guess perfectly. It shows
> exactly what you would get if signgam is random garbage, which just so
> happens to equal -5.58e8. This is because the implementation of the
> user-visible function gamma() is internally:
>
> double gamma(gamma x) {
> return exp(GAMMA(x)) * signgam;
> }
>
> [see specfun.c:f_gamma()], where GAMMA is either lgamma(), gamma(), or
> gnuplot's own lngamma(), depending on availability. The correct values
> of gamma(1) and gamma(2) are 1.0, yours are -5.58e08, but other than
> that, the shape is quite right. I get exactly your plot, but for
>
> plot [1:2] -5.58e8*gamma(x)
>
> Please check your config.log's lines about signgam.
configure:8573: checking whether signgam is declared
configure:8607: gcc -c -g -O2 -I/usr/X11R6/include conftest.c >&5
configure:8613: $? =3D 0
configure:8620: test -z "$ac_c_werror_flag" || test ! -s conftest.err
configure:8623: $? =3D 0
configure:8630: test -s conftest.o
configure:8633: $? =3D 0
configure:8645: result: yes
Is this what you expected?
The true test would be that while gamma() is wrong, lgamma() plots
> correctly.
Aha. Yes. lgamma does, in fact, do the right thing.
- C
|