This is the mail archive of the gsl-discuss@sourceware.org mailing list for the GSL project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi, It seems that the exponential of the logarithm of the Pochhammer symbol with second argument equal to zero is NOT one. Consider the following little program, which should print two times the number 1 separated by a space /* -- START test.c */ #include <stdio.h> #include <math.h> #include <gsl/gsl_sf_gamma.h> int main(){ printf("exp(log(poch))=%g poch=%g\n", exp( gsl_sf_lnpoch(7,0)),gsl_sf_poch(7,0)); return 0; } /* -- END test.c */ If I compile it with #gcc -Wall test.c -lgsl -lgslcblas -lm -o test and run #./test I get: #exp(log(poch))=2.71828 poch=1 What's going on? I can't see any mistake in my code. Best, Giulio. -- Giulio Bottazzi PGP Key ID:BAB0A33F giulio.bottazzi@libero.it http://www.sssup.it/~bottazzi
Attachment:
pgp00000.pgp
Description: PGP signature
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |