Sorry. Enough to correct the output of 'domainOf':
(1) -> domainOf(taylor(1,x=-1))
(1) UnivariateTaylorSeries(Expression(Integer()),x,0()(0))
Type: OutputForm
(2) -> )co fricas/src/algebra/any.spad
Compiling FriCAS source code from file
/home/wspage/fricas/src/algebra/any.spad using old system
compiler.
...
domainOf x ==
if #(x.dm)>1 then
hconcat(destruct(form2String(x.dm)$Lisp) pretend List OutputForm)
else
form2String(x.dm)$Lisp
...
(2) -> domainOf(taylor(1,x=-1))
(2) UnivariateTaylorSeries(Expression(Integer),x,-1)
Type: OutputForm
I got interested in this when Martin asked if there was some way to
return the type of an expression to the Sage interface. 'typeOf' does
not produce a useful result for this example
(3) -> typeOf(taylor(1,x=-1))
(3) Any
On 18 August 2016 at 19:38, Waldek Hebisch <[email protected]> wrote:
> Bill Page wrote:
>>
>> Maybe enough of this "interpreter magic" is in the 'form2String' function.
>>
>> (1) -> )r /home/wspage/typeof
>>
>> typeof(t:Any):OutputForm ==
>> if #(dom t)>1 then
>> hconcat(destruct form2String(dom t)$Lisp :: List OutputForm)
>> else
>> form2String(dom t)$Lisp
>
> Enough for what? You did not say what you really want to do.
> It seems that what you want is textual representation of
> FriCAS type. But what do you want to do with such representation?
> What 'dom' gives you via Lisp printing routines gives you
> textual representation, which AFAICS is faithful, that is
> the type can be reconstructed from the text.
>
--
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.