<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Nov 1, 2015 at 5:10 AM, Alasdair McAndrew <span dir="ltr"><<a href="mailto:amca01@gmail.com" target="_blank">amca01@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div>Hello,<br><br></div>I am using the excellent gsll package (in the first instance), to provide an interface to quadpack for the mathematics system FriCAS.  I'm slowly going through calculus/numerical-integration.lisp one function at a time and writing each one into FriCAS as I go.  This means writing functions in FriCAS's own language SPAD which interface with gsll.<br><br></div>This is made harder by me being a lisp newbie.<br><br></div>However, I've come to integration-QAGP, and I've tried to run the test command (having first defined the function it calls).  However, all I get is errors.<br><br></div>I'm using SBCL in emacs-slime, and I have installed gsll with quicklisp, so that I can call an integration routine with<br><br>* (gsll:integration-qng (lambda (x) (exp (- (* x x)))) 0.0 1.0)<br clear="all"><div><div><div><br></div><div>But the commands<br><br>* (defun integration-test-f454 (x)<br>  (* (expt x 3) (* (log (abs (* (- (expt x 2) 1.0d0) (- (expt x 2) 2.0d0)))))))<br><br>* (gsll:integration-QAGp<br>  'integration-test-f454<br>  (grid:copy-to (vector 0.0d0 1.0d0 (sqrt 2.0d0) 3.0d0))<br>  0.0d0 1.0d-3 1000)<br><br></div><div>just produces a long list of errors. Is "grid" a standard library, or does it need to be loaded first?  (Told you I was a newbie...)<br><br></div><div>Thanks<span class=""><font color="#888888"><br></font></span></div><span class=""><font color="#888888"><div>Alasdair<br></div><div><div><div>--<br></div></div></div></font></span></div></div></div></blockquote><div><br></div><div>Try this<br><br>(setf grid:*default-grid-type* 'grid:foreign-array)<br>(gsll:integration-QAGp 'integration-test-f454 (grid:grid 0.0d0 1.0d0 (sqrt 2.0d0) 3.0d0) 0.0d0 1.0d-3 1000)<br><br></div><div>and let us know what happens.<br><br></div><div>Thanks,<br></div><div>Liam<br></div></div></div></div>