[Gambas-user] Gambas3 and Gnu scientific library

John Spikowski support at ...2529...
Sat May 21 21:24:54 CEST 2011


On Sat, 2011-05-21 at 22:04 +0300, Jussi Lahtinen wrote:
> And BTW, Gambas gives more accurate result!
> Gambas; -0.177596771314338
> Actual;    -0.177596771314338304347397013074758711071130356008509128990...
> 
> Jussi
> 

J0(5) = -1.775970000000000326156879282279987819492816925049e-01

I would be interest to know which is actually correct. (Gambas or
ScriptBasic) 

Here is a C version to try.

#include <stdio.h>
#include <gsl/gsl_sf_bessel.h>

int
main (void)
{
  double x = 5.0;
  double y = gsl_sf_bessel_J0 (x);
  printf ("J0(%g) = %.48e\n", x, y);
  return 0;
}







More information about the User mailing list