>> U==>Union(DoubleFloat, Integer)
> (9) -> PRETTYPRINT(2::U)$Lisp
> (0 . 2.0)
>
> (9) ()
> Type: SExpression
When I look at this
(1) -> DF==>DoubleFloat;Z==>Integer
(2) -> R==>Record(result:DF, abserr:DF, neval:Integer)
(6) -> r: R := [2.0, 3.0, 17]
(6) [result= 2.0,abserr= 3.0,neval= 17]
Type: Record(result: DoubleFloat,abserr: DoubleFloat,neval: Integer)
(7) -> PRETTYPRINT(r)$Lisp
#(2.0 3.0 17)
it looks as if a record is internally stored as a lisp vector, no?
Concerning (from Alasdair's gsl.lisp)
; Return multiple values as a list
(defun integration-qng-list (f a b epsabs epsrel)
(multiple-value-list (integration-qng f a b epsabs epsrel)))
Maybe it would be easiest for Alasdair to turn the lisp value (that is
returned from the GSL function integration-png) into such an array.
I.e. instead of multiple-value-list he should call a function to produce
the array/record. (Sorry, no idea what that function is.)
In the .spad file instead of
r:List
DF:=INTEGRATION_-QNG_-LIST(mkLispFunction1(f@(DF->DF))$Lisp,a,b,epsabs,epsrel)$Lisp
[r(1),r(2),r(3) pretend Integer]
there would then simply by
R ==> Record(result:DF, abserr:DF, neval:Integer)
r: R :=
NTEGRATION_-QNG_-LIST(mkLispFunction1(f@(DF->DF))$Lisp,a,b,epsabs,epsrel)$Lisp
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.