login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Edit detail for SandBoxExpresssionComplex revision 1 of 1

1
Editor: Bill Page
Time: 2014/08/10 17:33:42 GMT+0
Note:

changed:
-
\begin{axiom}
msqrt:=operator('msqrt)
conj1:Ruleset(Integer,Complex Integer,Expression Complex Integer) := ruleset([ _
  rule sqrt(-1)*:a==msqrt(-1)*a, _
  rule -sqrt(-1)*:a==-msqrt(-1)*a _
]$List RewriteRule(Integer,Complex Integer,Expression Complex Integer) )
conj2:RewriteRule(Integer,Complex Integer,Expression(Complex Integer)):= rule msqrt(-1)==-sqrt(-1)
conj(z)==conj2 conj1 z
conj(a+%i*b)
\end{axiom}


fricas
(1) -> msqrt:=operator('msqrt)

\label{eq1}msqrt(1)
Type: BasicOperator?
fricas
conj1:Ruleset(Integer,Complex Integer,Expression Complex Integer) := ruleset([ _
  rule sqrt(-1)*:a==msqrt(-1)*a, _
  rule -sqrt(-1)*:a==-msqrt(-1)*a _
]$List RewriteRule(Integer,Complex Integer,Expression Complex Integer) )

\label{eq2}\begin{array}{@{}l}
\displaystyle
\left\{{= = \left({{i \  a}, \:{{msqrt \left({- 1}\right)}\  a}}\right)}, \:{= = \left({-{i \  a}, \: -{{msqrt \left({- 1}\right)}\  a}}\right)}\right\} 
(2)
Type: Ruleset(Integer,Complex(Integer),Expression(Complex(Integer)))
fricas
conj2:RewriteRule(Integer,Complex Integer,Expression(Complex Integer)):= rule msqrt(-1)==-sqrt(-1)

\label{eq3}= = \left({{msqrt \left({- 1}\right)}, \: - i}\right)(3)
Type: RewriteRule?(Integer,Complex(Integer),Expression(Complex(Integer)))
fricas
conj(z)==conj2 conj1 z
Type: Void
fricas
conj(a+%i*b)
fricas
Compiling function conj with type Polynomial(Complex(Integer)) -> 
      Expression(Complex(Integer))

\label{eq4}-{i \  b}+ a(4)
Type: Expression(Complex(Integer))