[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Problème avec tgamma()



Je cherche à utiliser la fonction tgamma() en c. Malgré les informations
des manpages debian, le prototype de la fonction n'est pas trouvé
(contrairement à la fonction lgamma() ) :

Manpage :

SYNOPSIS
       #include <math.h>

       double tgamma(double x);
CONFORME À
       C99.

Source du programma :

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

int main()
{
  printf("%f\n", tgamma(2.0));

  return 0;
}


Résultat de la compilation :

% gcc -Wall test.c -lm
test.c: Dans la fonction « main »:
test.c:7: attention : implicit declaration of function `tgamma'
test.c:7: attention : format double, arg type différent (arg 2)


J'espère que ma question n'est pas trop hors-sujet. A ce propos, est-ce
que les headers standard sont communs à toutes les distributions linux?

Merci d'avance
--
Hervé

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: