[Python-3000] adding gamma and error functions to math module

Mark Dickinson dickinsm at gmail.com
Wed Jul 16 18:55:06 CEST 2008

On Wed, Jul 16, 2008 at 5:03 PM, nirinA raseliarison
<nirina at mail.blueline.mg> wrote:
> with the gamma from gcc under linux,
> which uses the MPFR library,

Are you sure it uses MPFR?  I thought that for gcc 4.3, MPFR was used only for
compile-time constant expressions.  For a call to tgamma whose argument is
not known at compile time, the usual libm function should be used.

For example, on my machine, if I compile
and run the following code:

#include <stdio.h>
#include <stdlib.h>
#include <math.h>

double f(double x) {
  return tgamma(x);

int main() {
  printf("%.16g\n", tgamma(12.0));
  printf("%.16g\n", f(12.0));

I get the results:



More information about the Python-3000 mailing list