"Bill Page" <[EMAIL PROTECTED]> writes:
> > I looked at this again. First, to answer Bill's question: "why isn't
> > UnivariateTaylorSeriesODESolver exposed?" These are really
> > internal functions. I think as an intermediate measure, exposing
> > makes sense. But really, we should explicitely package call such
> > things.
> >
>
> I am not convinced. What do you mean by "really internal functions"?
> If it is internal, why is it exported? Perhaps some other aspect of
> this design needs to be reconsidered. Maybe 'fixedPointExquo" is being
> defined in the wrong place?
Well, I want to say that it's probably not useful to the end user, and thus
shouldn't pollute the namespace. But maybe I'm wrong.
> > the result of div2exquo is then compiled with compiledFunction$MKF. It
> > relies on the behavior of compiledFunction$MKF to interpret "operators".
>
> So this notion of "compiled function" depends explicitly on the behavior of
> the interpreter and thus what is "exposed" and what is not? That does not
> sound right.
That's indeed the case, and that's why I suggest that compiledFunction$MKF
should take an InputForm, because there we can control package calling etc.
> > Actually, I think the approach to pass compiledFunction an Expression here
> > is flawed.
It's probably not so difficult to get this right. There are only few functions
involved, in the case of #301, checkOrder1 is the toplevel function. opex is
the fixedPointExquo "operator". Note that div2exquo is called recursively by
k2exquo. It seems that all div2exquo does is to replace *every* division by
fixPointExquo, even in the arguments of operators. That doesn't really seem
right, either, see below.
Actually, I think the whole package is quite flawed. It should at least do
proper checking whether it can deal with the given function or not.
k2exquo : K -> F
k2exquo k ==
is?(op := operator k, "%diff"::Symbol) =>
error "Improper differential equation"
kernel(op, [div2exquo f for f in argument k]$List(F))
smp2exquo : P -> F
smp2exquo p ==
map(k2exquo, #1::F, p)$PolynomialCategoryLifting(IndexedExponents K,
K, R, P, F)
div2exquo : F -> F
div2exquo f ==
one?(d := denom f) => f
opex(smp2exquo numer f, smp2exquo d)
...
checkOrder1: (F, OP, K, SY, F) -> F
checkOrder1(diffeq, y, yx, x, sy) ==
div2exquo subst(diffRhs(differentiate(yx::F,x),diffeq),[yx],[sy])
Martin
(10) -> seriesSolve(sum(1/z,z=1..n)*D(a(x),x)+2*a x,a,x=0,[1])
There are 1 exposed and 0 unexposed library operations named
fixedPointExquo having 2 argument(s) but none was determined to
be applicable. Use HyperDoc Browse, or issue
)display op fixedPointExquo
to learn more about the available operations. Perhaps
package-calling the operation or using coercions on the arguments
will allow you to apply the operation.
Cannot find a definition or applicable library operation named
fixedPointExquo with argument type(s)
PositiveInteger
Variable(%V)
Perhaps you should use "@" to indicate the required return type,
or "$" to specify which version of the function you need.
FriCAS will attempt to step through and interpret the code.
Compiling function %CJ with type List(UnivariateTaylorSeries(
Expression(Integer),x,0)) -> UnivariateTaylorSeries(Expression(
Integer),x,0)
There are 1 exposed and 0 unexposed library operations named
fixedPointExquo having 2 argument(s) but none was determined to
be applicable. Use HyperDoc Browse, or issue
)display op fixedPointExquo
to learn more about the available operations. Perhaps
package-calling the operation or using coercions on the arguments
will allow you to apply the operation.
Cannot find a definition or applicable library operation named
fixedPointExquo with argument type(s)
PositiveInteger
Variable(%V)
Perhaps you should use "@" to indicate the required return type,
or "$" to specify which version of the function you need.
(10) -> seriesSolve(sum(sin z,z=1..n)*D(a(x),x)+2*a x,a,x=0,[1])
There are no library operations named %defsum
Use HyperDoc Browse or issue
)what op %defsum
to learn if there is any operation containing " %defsum " in its
name.
Cannot find a definition or applicable library operation named
%defsum with argument type(s)
Expression(Integer)
Variable(%CL)
Variable(z)
PositiveInteger
Variable(n)
Perhaps you should use "@" to indicate the required return type,
or "$" to specify which version of the function you need.
FriCAS will attempt to step through and interpret the code.
Compiling function %CN with type List(UnivariateTaylorSeries(
Expression(Integer),x,0)) -> UnivariateTaylorSeries(Expression(
Integer),x,0)
There are no library operations named %defsum
Use HyperDoc Browse or issue
)what op %defsum
to learn if there is any operation containing " %defsum " in its
name.
Cannot find a definition or applicable library operation named
%defsum with argument type(s)
Expression(Integer)
Variable(%CL)
Variable(z)
PositiveInteger
Variable(n)
Perhaps you should use "@" to indicate the required return type,
or "$" to specify which version of the function you need.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/fricas-devel?hl=en
-~----------~----~----~----~------~----~------~--~---