bug-gsl
[Top][All Lists]
Advanced

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

Re: [Bug-gsl] bug in gsl_sf_synchrotron_1


From: John Houck
Subject: Re: [Bug-gsl] bug in gsl_sf_synchrotron_1
Date: Mon, 16 Jan 2006 10:41:36 -0500
User-agent: Mutt/1.5.9i

On Mon, Jan 16, 2006 at 14:31 +0000, Brian Gough wrote:
> John Houck writes:
>  > Here are some computed values of the function and its first
>  > differences in the neighborhood of this point:
>  > 
>  >     x                F(x)           delta-F(x)
>  > 4.212000000e-08  7.478926692e-03  -5.918277062e-07
>  > 4.213000000e-08  7.479518519e-03  -5.917340625e-07
>  > 4.214000000e-08  7.480110253e-03  -5.151888128e-07  <---
>  > 4.215000000e-08  7.480625442e-03  -5.915287484e-07
>  > 4.216000000e-08  7.481216971e-03  -5.914352158e-07
>  > 
> 
> Can you send the test program you used to generate this output,
> thanks.
>

Sure - I've appended a short test program.
Thanks,
-John


#include <stdio.h>
#include <gsl/gsl_errno.h>
#include <gsl/gsl_integration.h>
#include <gsl/gsl_sf_synchrotron.h>

#define NUM 6

int main (void)
{
   int i, n = NUM;
   double f[NUM];
   double x[NUM] =
     {4.212e-8, 4.213e-8, 4.214e-8, 4.215e-8, 4.216e-8, 4.217e-8};

   for (i = 0; i < n; i++)
     {
        f[i] = gsl_sf_synchrotron_1 (x[i]);
     }

   for (i = 0; i < n-1; i++)
     {
        fprintf (stdout, "%15.9e  %15.9e  %15.9e\n",
                 x[i], f[i], f[i]-f[i+1]);
     }

   return 0;
}




reply via email to

[Prev in Thread] Current Thread [Next in Thread]