[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tolerance in binopdf.m
From: |
Jordi Gutiérrez Hermoso |
Subject: |
Re: tolerance in binopdf.m |
Date: |
Tue, 20 Sep 2011 23:17:33 -0500 |
On 20 September 2011 22:50, Ben Abbott <address@hidden> wrote:
> Looking at these individually ...
>
> printf ("%.17f\n", log (0.5))
> -0.69314718055994529
> printf ("%.17f\n", gammaln (3))
> 0.69314718055994540
>
> Does anyone have any insight regarding this?
>
> What does Linux give for these two?
Well, I'm not sure that Linux has anything to do with it, but the GNU
C library I'm using seems to define lgamma, which is a C99 function,
and is ultimately the function my system calls for Octave's gammaln.
Can you grep your config.log for the HAVE_LGAMMA macro? Did it get
defined to 1? If not, this may explain it, as you would have a
different implementation of lgamma that could account for the
difference. From my reading of the code, if the native C function
isn't found, Octave will instead call the SLATEC dlgams Fortran
function from libcruft/slatec-fn/dlgams.f.
HTH,
- Jordi G. H.
- Overhaul of statistical distribution functions, Rik, 2011/09/20
- Re: Overhaul of statistical distribution functions, Ben Abbott, 2011/09/20
- Re: Overhaul of statistical distribution functions, Michael D Godfrey, 2011/09/20
- Re: tolerance in binopdf.m, Rik, 2011/09/20
- Re: tolerance in binopdf.m, Ben Abbott, 2011/09/20
- Re: tolerance in binopdf.m, Ben Abbott, 2011/09/20
- Re: tolerance in binopdf.m,
Jordi Gutiérrez Hermoso <=
- Re: tolerance in binopdf.m, Tatsuro MATSUOKA, 2011/09/21
- Re: tolerance in binopdf.m, Michael D Godfrey, 2011/09/21
- Re: tolerance in binopdf.m, Ben Abbott, 2011/09/21
- Re: tolerance in binopdf.m, Rik, 2011/09/21
- Re: tolerance in binopdf.m, Marco Atzeri, 2011/09/21
- Re: tolerance in binopdf.m, Jordi Gutiérrez Hermoso, 2011/09/21
- Re: tolerance in binopdf.m, Michael D Godfrey, 2011/09/21
- Re: tolerance in binopdf.m, Michael D Godfrey, 2011/09/21
- Re: tolerance in binopdf.m, Ben Abbott, 2011/09/21
- Re: tolerance in binopdf.m, Ben Abbott, 2011/09/21