[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

C gamma-funktion i math.h



Jeg har læst på nettet at math.h indeholder gammafunktionen. Desværre
synes det ikke at virke for mig. Jeg har lavet et lille testprogram, som
giver flg. fejl:

sslug@sslug web]$ gcc matematik.c -o matematik
/tmp/ccuXxVmY.o(.text+0x25):
In function `main': 
: undefined reference to `lgamma' 
collect2: ld
returned 1 exit status

programmet ser således ud:

#include <stdio.h>
#include <math.h>
                                                                                                                                                            
int main()
{
  int x=5;
  double test = lgamma(x);
  printf("lgamma(5) = %5.2f\n", test);
  return 0;
}

Hvad er der galt og hvordan kan jeg se hvilke funktioner der ligger i de
forskellige moduler, som math.h?

MVH,
Christian Nielsen


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 22:43 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *