public inbox for gsl-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Giulio Bottazzi <giulio.bottazzi@libero.it>
To: gsl-discuss@sourceware.org
Subject: problem with gsl_sf_lnpoch
Date: Fri, 29 Sep 2006 17:01:00 -0000	[thread overview]
Message-ID: <20060929190112.49d85f61.giulio.bottazzi@libero.it> (raw)

[-- Attachment #1: Type: text/plain, Size: 769 bytes --]

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 #2: Type: application/pgp-signature, Size: 189 bytes --]

             reply	other threads:[~2006-09-29 17:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-29 17:01 Giulio Bottazzi [this message]
2006-09-29 17:26 ` James Theiler
2006-10-02 19:25 ` Brian Gough

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060929190112.49d85f61.giulio.bottazzi@libero.it \
    --to=giulio.bottazzi@libero.it \
    --cc=gsl-discuss@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).