Re: How to convert a Polynomial Integer into String

Themos Tsikas <[email protected]>
Newsgroups gmane.comp.mathematics.axiom.user
Organization NAG Ltd
Message-ID <[email protected]>
Hello


(1) -> df :=D(exp(x) + 2*x,x)

          x
   (1)  %e  + 2
                                                     Type: Expression Integer
(2) -> f1: TextFile := open("df.txt", "output")

   (2)  "df.txt"
                                                               Type: TextFile
(3) -> for i in tex(df::TexFormat)  repeat writeLine!(f1,i)
                                                                   Type: Void
(4) -> close! f1

   (4)  "df.txt"
                                                               Type: TextFile
On Saturday 24 May 2008, Shing Hing Man wrote:
> I am trying to write the following (tex expression of)
> variable df into a text file.
>
> (20) -> df :=D(exp(x) + 2*x,x);
> (20) ->
>
> Type: Expression Integer
> (21) -> df
> (21) ->
> $$
> {e \sp x}+2
> \leqno(21)
> $$
>
>
> Type: Expression Integer
>
>
> I could use the command File(Expression Integer) as
> described in
> section 9.24 of the Axiom book.
>
> Alternatively, I am trying to use the command TextFile
>
>
> f1: TextFile := open("df.txt", "output");
>
> writeLine!(f1,df);
>
> close! f1;
>
>
> But I get an error complaining  the second parameter
>  in writeLine!(*,*)
> should be of type String.
> How to convert df into a String ?
>
>
> Thanks advance for any assistance!
>
> I am using  version axiom-mar2008.
>
>
> Shin
>
> Home page : http://www.lombok.demon.co.uk/
>
>
>
>       __________________________________________________________
> Sent from Yahoo! Mail.
> A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html
>
>
> _______________________________________________
> Axiom-mail mailing list
> [email protected]
> http://lists.nongnu.org/mailman/listinfo/axiom-mail
>
> ________________________________________________________________________
> This e-mail has been scanned for all viruses by Star.
> ________________________________________________________________________



________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 
________________________________________________________________________
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.