[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-mail] Ugly representation of square roots in console mode
From: |
Martin Rubey |
Subject: |
Re: [Axiom-mail] Ugly representation of square roots in console mode |
Date: |
24 May 2008 10:24:55 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 |
"Alasdair McAndrew" <address@hidden> writes:
> Axiom represents square roots by a mixture of ascii symbols which are
> supposed to approximate the square root sign, so that sqrt(2)+sqrt(3) looks
> like
>
> +-+ +-+
> \|3 + \|2
>
> (You'll need to view the above in a monospaced font). And n-th roots are
> even worse: 2^(1/3)+3^(1/4) comes out as
>
> 4+-+ 3+-+
> \|3 + \|2
>
> This is just ugly.
It seems that taste differs: I find the above very beautiful and nice to read.
> Can axiom, be coerced to represent n-th and square roots in one of these
> simpler forms?
I think that should be doable: look at
(13) -> (2^(1/3))::OUTFORM::SEX
(13) (ROOT 2 3)
Type: SExpression
(14) -> (2^(1/x))::OUTFORM::SEX
(14) (** 2 (/ 1 x))
Type: SExpression
so you could just modify the responsible lines in OutputForm
root: $ -> $
++ root(f) creates a form for the square root of form f.
root: ($, $) -> $
++ root(f,n) creates a form for the nth root of form f.
root a == [eform ROOT, a]
root(a,b) == [eform ROOT, a, b]
to your liking, i.e., something like
root a == a ** (1/2)
root(a, b) == a ** (1/b)
You should then recompile outform.spad, and see whether it works.
Martin