Well, if it were Aldor, you would have "keyword arguments". See Section 6.3 of http://www.aldor.org/docs/aldorug.pdf . I don't think that works in SPAD (yet).
However, what does the underlying GSL actually do? Do they allow optional parameters? Or have they different function(name)s? I actually would try to map the GSL function name to SPAD with the same argument list. > 2. Improper integrals: GSLL has three separate functions: qagi > (integrating from -inf to +inf), qagiu (integrating from a to inf, a being > finite), and qagil (integrating from -inf to b). For each function it > makes a substitution so that the integral is defined between 0 and 1 - you > can see the substitutions in the gsl source file integration/qags.c. Thus > the GSLL tests for qagi, qagiu, and qagil independently. The approach > taken in Maxima is to have just one function, which they call quad_qagi, > which can be used for any integral involving infinity, and which makes the > appropriate substitution depending on which of the limits is finite. If you look at http://fricas.github.io/api/Infinity.html you find the domain constructor OrderedCompletion. I bet you want OrderedCompletion DoubleFloat (let's abbreviat that by OCDF). So you would allow OCDF instead of just DF for the limits. Or maybe you even want something like Segment OCDF, then it would be possible to write foo(f, minusInfinity()..plusInfinity) foo(f, 5.3..plusInfinity) foo(f, 1.1..2.7) for the integral bounds. Inside that function you take what OrderedCompletion provides you to single out finite or infinite bounds and call the respective gsll function. finite? http://fricas.github.io/api/OrderedCompletion.html#index-1 infinite? http://fricas.github.io/api/OrderedCompletion.html#index-2 whatInfinity http://fricas.github.io/api/OrderedCompletion.html#index-8 > 3. Names of functions: gslIntegrationQng, integrationQng, quadQng...? > (I like the last because it's short!) Well, if quadQng is known and common in GSL, why not. Otherwise, you should think of how a user would find your function in FriCAS. I guess, it's never a bad idea to have 'integrate' or something similar in the name, if the function deals with that. Don't worry about long names. The user has the macro system to deal with too much typing. Ralf -- 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.
