Bill Page wrote:
> 
> But
> 
> (1) -> ts:UnivariateTaylorSeries(Expression(Integer),x,0)
<snip>

If you know what is needed type, then it is easy to get it:

(5) -> ts := taylor(x, x=1)

   (5)  1 + (x - 1)
                                                                    Type: Any
(7) -> any_to_T(a, T) == a::T
                                                                   Type: Void
(8) -> any_to_T(ts, UnivariateTaylorSeries(Expression(Integer),x,1))
   Cannot compile conversion for types involving local variables. In 
      particular, could not compile the expression involving :: #2 
   FriCAS will attempt to step through and interpret the code.

   (8)  1 + (x - 1)
                        Type: UnivariateTaylorSeries(Expression(Integer),x,1)

(more systematic way would use AnyFunctions1).  There are also
Boot level utilities that do equivalent things.  The point is
that library function returns Any and in original case iterpreter
has no clue that you want different type.  Once you declared type
of 'ts' it is essentially the same as using:

taylor(x, x=1)::UnivariateTaylorSeries(Expression(Integer),x,1)

That is, after obtaing value interpreter tries to coerce it to
requested type...

-- 
                              Waldek Hebisch

-- 
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 https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to