As you commanded (files attached) :) What I do not understand yet: what's the meaning of the other two values? Did you already look into the gsll sources?
*(gsll:integration-qng (lambda (x) (exp (- (* x x)))) 0.0 1.0) 0.7468241328124271 8.291413475940725e-15 21 kfp@helix:~/Development/GSL$ fricas -nox viewman not present, disabling graphics Checking for foreign routines AXIOM="/usr/local/lib/fricas/target/x86_64-unknown-linux" spad-lib="/usr/local/lib/fricas/target/x86_64-unknown-linux/lib/libspad.so" foreign routines found openServer result 0 FriCAS Computer Algebra System Version: FriCAS 2014-12-18 Timestamp: Son Okt 25 19:16:29 CET 2015 ----------------------------------------------------------------------------- Issue )copyright to view copyright notices. Issue )summary for a summary of useful system commands. Issue )quit to leave FriCAS and return to shell. ----------------------------------------------------------------------------- (1) -> )co gsl Compiling FriCAS source code from file /home/kfp/Development/GSL/gsl.spad using old system compiler. Value = T To load "gsll": Load 1 ASDF system: gsll ; Loading "gsll" ............. Value = ("gsll") Value = T GSL abbreviates package gsl ------------------------------------------------------------------------ initializing NRLIB GSL for gsl compiling into NRLIB GSL compiling exported gslIntegrationQng : (DoubleFloat -> DoubleFloat,DoubleFloat,DoubleFloat) -> DoubleFloat Time: 0.01 SEC. (time taken in buildFunctor: 0) ;;; *** |gsl| REDEFINED ;;; *** |gsl| REDEFINED Time: 0.00 SEC. Cumulative Statistics for Constructor gsl Time: 0.01 seconds finalizing NRLIB GSL Processing gsl for Browser database: --------constructor--------- --------(gslIntegrationQng ((DoubleFloat) (Mapping (DoubleFloat) (DoubleFloat)) (DoubleFloat) (DoubleFloat)))--------- ; compiling file "/home/kfp/Development/GSL/GSL.NRLIB/GSL.lsp" (written 26 OCT 2015 03:36:40 AM): ; file: /home/kfp/Development/GSL/GSL.NRLIB/GSL.lsp ; in: SDEFUN |GSL;gslIntegrationQng;M3Df;1| ; (BOOT::SDEFUN BOOT::|GSL;gslIntegrationQng;M3Df;1| ; ((BOOT::|f| BOOT::|Mapping| (BOOT::|DoubleFloat|) ; (BOOT::|DoubleFloat|)) ; (BOOT::|a| BOOT::|DoubleFloat|) ; (BOOT::|b| BOOT::|DoubleFloat|) (BOOT::$ BOOT::|DoubleFloat|)) ; (GSLL:INTEGRATION-QNG (BOOT::|mkLispFunction1| BOOT::|f|) ; BOOT::|a| BOOT::|b|)) ; --> DEFUN PROGN SB-IMPL::%DEFUN SB-IMPL::%DEFUN SB-INT:NAMED-LAMBDA ; ==> ; #'(SB-INT:NAMED-LAMBDA BOOT::|GSL;gslIntegrationQng;M3Df;1| ; (BOOT::|f| BOOT::|a| BOOT::|b| BOOT::$) ; (BLOCK BOOT::|GSL;gslIntegrationQng;M3Df;1| ; (GSLL:INTEGRATION-QNG (BOOT::|mkLispFunction1| BOOT::|f|) BOOT::|a| ; BOOT::|b|))) ; ; caught STYLE-WARNING: ; The variable $ is defined but never used. ; ; compilation unit finished ; caught 1 STYLE-WARNING condition ; /home/kfp/Development/GSL/GSL.NRLIB/GSL.fasl written ; compilation finished in 0:00:00.054 ------------------------------------------------------------------------ gsl is now explicitly exposed in frame frame1 gsl will be automatically loaded when needed from /home/kfp/Development/GSL/GSL.NRLIB/GSL (1) -> DF ==> DoubleFloat f:=(x:DF):DF+->exp(-x^2) g(x:DF):DF == exp(-x^2) gslIntegrationQng(f,0.0::DF,1.0::DF) Type: Void (2) -> (2) theMap(*1;anonymousFunction;0;frame1;internal) Type: (DoubleFloat -> DoubleFloat) (3) -> Function declaration g : DoubleFloat -> DoubleFloat has been added to workspace. Type: Void (4) -> (4) 0.7468241328124271 Type: DoubleFloat (5) -> gslIntegrationQng(g,0.0::DF,1.0::DF) Compiling function g with type DoubleFloat -> DoubleFloat (5) 0.7468241328124271 Type: DoubleFloat (6) -> Am 26.10.2015 um 03:23 schrieb Bill Page: > Ah, OK cool. > > So next: Write a small Lisp wrapper function to call the the foreign > routine and return it's values as a list or maybe an array? > > --- > > wspage@suse:~> export SBCL_HOME=/usr/local/lib/sbcl > wspage@suse:~> fricas -nox > Checking for foreign routines > AXIOM="/usr/local/lib/fricas/target/x86_64-suse-linux" > spad-lib="/usr/local/lib/fricas/target/x86_64-suse-linux/lib/libspad.so" > foreign routines found > openServer result 0 > FriCAS Computer Algebra System > Version: FriCAS 2014-12-18 > Timestamp: Sun Oct 25 21:18:13 EDT 2015 > ----------------------------------------------------------------------------- > Issue )copyright to view copyright notices. > Issue )summary for a summary of useful system commands. > Issue )quit to leave FriCAS and return to shell. > ----------------------------------------------------------------------------- > > > (1) -> )fin > * (load "~/quicklisp/setup") > > T > * (ql:quickload "gsll") > To load "gsll": > Load 1 ASDF system: > gsll > ; Loading "gsll" > ............. > ("gsll") > * (|spad|) > (1) -> )lisp (gsll:integration-qng (lambda (x) (exp (- (* x x)))) 0.0 1.0) > > Value = 0.7468241328124271 > (1) -> > > --- > > On 25 October 2015 at 21:55, Kurt Pagani <nil...@gmail.com> wrote: >> >> >>> Don't know how to REQUIRE SB-BSD-SOCKETS >> usually indicates that SBCL_HOME is not set. >> >> Did you? >> > -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel+unsubscr...@googlegroups.com. To post to this group, send email to fricas-devel@googlegroups.com. Visit this group at http://groups.google.com/group/fricas-devel. For more options, visit https://groups.google.com/d/optout.
(in-package :boot) (import 'gsll:integration-qng) ; more ... (defun |lambdaFuncallSpad| (f) (lambda (x) (funcall f x nil))) (defun |mkLispFunction1| (f) (lambda (x) (spadcall x f))) (defun |lispFromSpad| (f dom args) (let ((spadf (|getFunctionFromDomain| f (list dom) args))) (lambda (x) (spadcall x spadf))))
)lisp (load "~/quicklisp/setup") )lisp (ql:quickload "gsll") )lisp (load "gsl.lisp") )abbrev package GSL gsl ++ Date Created: ++ License: ++ Date Last Updated: ++ Basic Operations: ++ Related Domains: ++ Also See: ++ AMS Classifications: ++ Keywords: ++ Examples: ++ References: ++ ++ Description: ++ ++ gsl() : Exports == Implementation where DF ==> DoubleFloat Exports == with gslIntegrationQng : (DF -> DF,DF,DF) -> DF ++ \spad{\gslIntegrationQng} applies the Gauss-Kronrod 10-point, ++ 21-point, 43-point and 87-point integration rules in succession Implementation == add gslIntegrationQng(f,a,b) == INTEGRATION_-QNG(mkLispFunction1(f@(DF->DF))$Lisp,a,b)$Lisp