axiom-mail
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

## Re: [fricas-devel] Re: [Axiom-mail] InputForm

 From: Ralf Hemmecke Subject: Re: [fricas-devel] Re: [Axiom-mail] InputForm Date: Wed, 03 Jun 2009 15:49:26 +0200 User-agent: Thunderbird 2.0.0.21 (X11/20090409)

```On 06/03/2009 02:35 PM, Martin Rubey wrote:
```
```Ralf Hemmecke <address@hidden> writes:

```
```Is there an easy way to get a linear output (not 2d-output), i.e.,
which looks exactly like the input?
```
```
```
(1) -> x+y^2
```         2
(1)  y  + x
Type: Polynomial(Integer)
(2) -> (x+y^2 )::INFORM

(2)  (+ (** y 2) x)
Type: InputForm
(3) -> unparse((x+y^2 )::INFORM)

(3)  "y^2+x"
Type: String

This is, in my opinion a hack, in case you want linear *output*.  It
should be relatively easy though, to provide something similar to
TexFormat, that provides a coercion from outputform to "linearform".
Would actually be nice.
```
```
I don't yet know what unparse does, but do you think that

lin z == unparse(z::InputForm)::Symbol::OutputForm

should do the job also for other expressions than polynomials?

Seems to be working for matrices...

(5) -> m:=matrix [[1,2],[3,4]]

+1  2+
(5)  |    |
+3  4+
Type: Matrix(Integer)
(6) -> lin m
Compiling function lin with type Matrix(Integer) -> OutputForm

(6)  matrix([[1,2],[3,4]])
Type: OutputForm

Thanks a lot!!!

Ralf

```

reply via email to

 [Prev in Thread] Current Thread [Next in Thread]