[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-developer] choose the better expand
From: |
Francois Maltey |
Subject: |
Re: [Axiom-developer] choose the better expand |
Date: |
29 Mar 2006 08:54:27 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 |
Dear Bill, Martin, William, and other... thanks a lot !
Yesterday I finish a first version of expand sin_cos,
expand sinh_cosh, expand tan_tanh, ...
Now I will improve it thanks to your previous reponses.
And I have theses other questions. This time every one is very short :
1/ what is the << import >> command in a *.spad file.
Martin and Bill give me exemples with import complex or import list.
2/ I can extract an integer from EXPR INTEGER by
fct (x:R) == if R is Integer then x::Integer else -999
but this doesn't work for Expression Complex Integer
or Expression Fraction Integer.
Can I test in an unknow Ring R if x is a (n:Integer) * 1$R or not.
No one of my tries with a lot of
retractIfCan(x)@Union(Integer, "failed") compile.
3/ I find pretty to expand cos (a+%i*b) with sin/sinh/cos/cosh
but I don't find how to detect a ring as R = Complex S, use real
and imag, and make conversion back as cos a + %i*sinh b,...
4/ Do you want [for Martin I believe] a
expand (factorial (n+1)) and an expand (factorial (n-1)) to
(n+1)*factorial n and factorial n / n.
5/ Do you prefer :
a-expand (sin (2*x+y)) gives an Expression in sin x, sin y, cos x... of corse.
b-expand (sin (3)) remains sin (3) [or do you prefer with sin 1 and cos 1]
c-expand (sin (3*expressions without variables)) remains the same.
I believe that everybody agree to a and b.
But what do I choose for c ?
must I transform sin (sqrt (2) + sqrt (3)) or not ?
6/ Do you see other usefull expand ?
7/ Do you prefer only one expand as above, or do I make a
expand (..., "sincos"), expand (..., "sinhcosh"),
expand (..., "tantanh") or expand (..., "exp").
In this case what is the second argument in others functions of axiom :
a String, a Symbol, a list of ...
8/ In the package TRMANIP, I divide an expression with an Integer by :
n := c::Integer
a1 := (a::F)/(n::R::F)
is it the shortest way in use or not ?
9/ at every call of expand there is a
num := numer arg
den := denom arg
b := reductum num / den
b ^= 0 =>
Is the computation of b at each call is short (1 single machine operation)
or long (with a factor or a gcd call) ?
Perhaps it's maybe possible to compute with leadingMonomial num, reductum num
without quotient. Do you have any advise ?
Thanks a lot !
François, in France