[Gambas-user] Gambas3 and Gnu scientific library
John Spikowski
support at ...2529...
Sat May 21 23:10:07 CEST 2011
On Sat, 2011-05-21 at 22:27 +0300, Jussi Lahtinen wrote:
> Gambas!
> http://www.wolframalpha.com/input/?i=besselj0%285%29
>
> Jussi
>
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
<further testing ...>
v = 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.
More information about the User
mailing list