public inbox for gsl-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Brian Gough <bjg@network-theory.co.uk>
To: jonathan@leto.net
Cc: gsl-discuss@sources.redhat.com
Subject: Re: sf_gamma questions
Date: Wed, 19 Dec 2001 13:20:00 -0000	[thread overview]
Message-ID: <15374.32302.25067.317593@debian> (raw)
In-Reply-To: <20011204000727.A11609@leto.net>

Jonathan Leto writes:
 > --- gamma.c.orig	Mon Dec  3 23:21:36 2001
 > +++ gamma.c	Mon Dec  3 23:53:27 2001
 > @@ -1247,7 +1247,14 @@
 >  int
 >  gsl_sf_gamma_e(const double x, gsl_sf_result * result)
 >  {
 > +  /* if x is an integer as far as we can tell, return factorial(x-1) 
 > +     this gives us much better precision when x>19 or so */
 > +  if(y < GSL_DBL_EPSILON ){
 > +	gsl_sf_fact_e((int) x - 1,result);

Thanks. I've added something along these lines but in the function
gamma_xgthalf, which is used in several places and so gives some other
opportunities to gain from a bit of extra accuracy.

Brian

WARNING: multiple messages have this Message-ID
From: Brian Gough <bjg@network-theory.co.uk>
To: jonathan@leto.net
Cc: gsl-discuss@sources.redhat.com
Subject: Re: sf_gamma questions
Date: Mon, 03 Dec 2001 15:28:00 -0000	[thread overview]
Message-ID: <15374.32302.25067.317593@debian> (raw)
Message-ID: <20011203152800.ycc5Ymc9D9ZXF4qZgmM7ecND6xD24Otzb5ulgCIy1Ic@z> (raw)
In-Reply-To: <20011204000727.A11609@leto.net>

Jonathan Leto writes:
 > --- gamma.c.orig	Mon Dec  3 23:21:36 2001
 > +++ gamma.c	Mon Dec  3 23:53:27 2001
 > @@ -1247,7 +1247,14 @@
 >  int
 >  gsl_sf_gamma_e(const double x, gsl_sf_result * result)
 >  {
 > +  /* if x is an integer as far as we can tell, return factorial(x-1) 
 > +     this gives us much better precision when x>19 or so */
 > +  if(y < GSL_DBL_EPSILON ){
 > +	gsl_sf_fact_e((int) x - 1,result);

Thanks. I've added something along these lines but in the function
gamma_xgthalf, which is used in several places and so gives some other
opportunities to gain from a bit of extra accuracy.

Brian

  parent reply	other threads:[~2001-12-19 13:20 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-19 13:20 Jonathan Leto
2001-11-26 23:50 ` Jonathan Leto
2001-12-19 13:20 ` Jonathan Leto
2001-12-19 13:20 ` Dan, Ho-Jin
2001-11-28 12:19   ` Dan, Ho-Jin
2001-12-19 13:20 ` Brian Gough
2001-11-29  1:08   ` Brian Gough
2001-12-19 13:20   ` Jonathan Leto
2001-12-01 18:46     ` Jonathan Leto
2001-12-19 13:20     ` Jonathan Leto
2001-12-19 13:20     ` Brian Gough [this message]
2001-12-03 15:28       ` Brian Gough
2002-12-31  9:55 Dherminder Kainth
2002-01-03  2:18 ` Dherminder Kainth
2002-12-31  9:55 ` Brian Gough
2002-01-05 11:37   ` 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=15374.32302.25067.317593@debian \
    --to=bjg@network-theory.co.uk \
    --cc=gsl-discuss@sources.redhat.com \
    --cc=jonathan@leto.net \
    /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).