Here is the result of the C version.
gcc -Wall intro.c -lgslcblas -lgsl -o intro
J0(5) = -1.775967713143382642471124199801124632358551025391e-01
For grins I DEFINED the
printf() and used it instead of the SB FORMAT() function.
DEFINE "printf NONE DOUBLE 3 STRING DOUBLE DOUBLE"
DLL("printf \"J0(%g) = %.48e\n\" 5.0 " & DLL("gsl_sf_bessel_J0 " & 5.0))
J0(5) = -1.775970000000000048601123125990852713584899902344e-01
My guess at this point is the problem is with GTK-Server and returning extended precision values.
Updatev = 1.775967713143382642471124199801124632358551025391e-01
PRINT FORMAT("J0(%g) = %.48e\n", 5.0, v)
J0(5) = 1.775967713143382642471124199801124632358551025391e-01
I'm convinced I have a GTK-Server issue with DOUBLE returns.
I thought I would try doing simple math with the extended precision variable to see what the affect might be.
v = 1.775967713143382642471124199801124632358551025391e-01
PRINT FORMAT("J0(%g) = %.48e\n", 5.0, v - .01)
J0(5) = 1.675967713143382553653282229788601398468017578125e-01
Doing the same on
Wolfram Alpha produces a different result after a certain point in the precision.