Does SPAD support optional arguments to functions? The default absolute error (as defined in gsll: calculus/numerical-integration.lisp) is only 1.0d-5. We might wish to decrease this error. In which case the definition of gslIntegrationQng in gsl.spad needs to include some optional arguments which can then be passed to the function in gsl.lisp.
On Wed, Oct 28, 2015 at 1:11 PM, Bill Page <bill.p...@newsynthesis.org> wrote: > On 27 October 2015 at 21:34, Waldek Hebisch <hebi...@math.uni.wroc.pl> > wrote: > > > > Expanding on Bill's answer: this code is an abuse (wrong). The > > core thing is that FriCAS list are homogeneous: all elements have > > the same type. In Lisp lists are allowed to have elements of > > different Lisp types. The integration routine returns two > > machine float and one machine integer. On Lisp side Bill packs > > this into a list. But on Spad side this List in an illegal > > object, so Bill lies and tells Spad compiler that the list > > contains DoubleFloat-s. Then he has to use 'pretend' to > > tell Spad compiler that the third element is in fact an > > integer. Currently this works, but will break down if > > Spad compiler becomes only slightly smarter: claiming that > > something is both DoubleFloat and Integer is a contradiction > > and may lead to wrong code or compile time error. > > > > Yes, guilty. :) But this was only the first solution I could think of > and so far this is just proof-of-concept code. There are other ways > in Lisp of dealing with functions that return multiple values but this > is only possible in FriCAS at a higher level, e.g. by use of Record. > Perhaps there is some easy way of using routines already available in > BOOT to construct a Record value directly? It would take me some time > to find it. Do you know Waldek? Or can you suggest a different > possible permanent solution? > > -- > You received this message because you are subscribed to a topic in the > Google Groups "FriCAS - computer algebra system" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/fricas-devel/q18Av7P3jnM/unsubscribe. > To unsubscribe from this group and all its topics, 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. > -- [image: http://www.facebook.com/alasdair.mcandrew] <http://www.facebook.com/alasdair.mcandrew> [image: https://plus.google.com/+AlasdairMcAndrew/posts] <https://plus.google.com/+AlasdairMcAndrew/posts> [image: https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108] <https://www.linkedin.com/pub/alasdair-mcandrew/a/178/108> [image: https://twitter.com/amca01] <https://twitter.com/amca01> [image: http://numbersandshapes.net] <http://numbersandshapes.net> -- 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.