On 2 November 2015 at 18:51, Alasdair McAndrew <[email protected]> wrote: > > Very nice! I have been trying to extend your (Bill's) original programs (with > "pretend Integer") but these seem much nicer -
Although there is no explicit use of 'pretend' there is still some implicit "pretending" going on behind the scenes. The main point however is to try to do most of the work in Spad without pretend so that things are as type-safe and representation independent as possible. > although I don't fully understand how they work (nothing like starting from > the bottom, is there?). I very much appreciate every time you ask a question... > You can also implement qagp - which requires a user-given list of > singularities - with something like: > > (defun gslintegration gagp (per f a b S) > (let* A (grid:make-foreign-array 'double-float :dimensions (length S) > :initial-contents S)) > (apply (|mkLispFunction2| per) > (multiple-value-list (gsl:integration-qagp (|mkLispFunction1| f) a b A)))) > Please is the slightly revised code for integrationQagp at https://github.com/billpage/gsla > I haven't tested this yet, but I've tested its components. You can also > include optional > parameters (abserr, relerr etc). Can I leave that for you to do based on the example that I sent in another email? :) > By the way, where is "per" defined? > The function that is passed to the parameter 'per' is defined in the Spad code. Cheers, Bill Page. -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/fricas-devel. For more options, visit https://groups.google.com/d/optout.
