rectform
-- the domain of
expressions being splitted into real and imaginary partrectform
is the domain of arithmetical expressions
being splitted into their real and imaginary part (if possible), i.e.,
an expression z of this domain is kept in the form
Re(z) + I*Im(z), if possible.
rectform(z)
z |
- | an arithmetical expression |
rectform
for a detailed description
and examples about working with elements of the domain
rectform
.An element z of rectform
consists of three
operands:
You can apply (almost) each function to elements of
rectform
, functions which mainly expect arithmetical
expressions as their input.
For example, you may add or multiply those elements, or apply
functions such as expand
and diff
to them. The result of such an
operation, which is not explicitely overloaded by a method of
rectform
(see below), is an element of
rectform
.
This ``automatic overloading'' works as follows: Each argument of
the operation, which is an element of rectform
, is
converted to an expression using the method "expr"
(see
below). Then, the operation is applied and the result is re-converted
to an element of rectform
.
Use the function expr
to convert an element of rectform
to an arithmetical
expression (as an element of a kernel domain).
The functions Re
and
Im
return the real and
imaginary part of elements of rectform
.
Evaluating an object of type rectform
returns
itself.
Calling an element of rectform
as a function yields the
object itself, regardless of the arguments. The arguments are
not evaluated.
_mult(rectform z, any
x...)
rectform
._mult
for elements of
rectform
, i.e., you may use it in the form
z*x*...
, or in functional notation: _mult(z,
x...)
._plus(rectform z, any
x...)
rectform
._plus
for elements of
rectform
, i.e., you may use it in the form z+x+
...
, or in functional notation: _plus(z,
x...)
._power(rectform z, any x)
rectform
._power
for elements of
rectform
, i.e., you may use it in the form
z^x
, or in functional notation: _power(z,
x)
.conjugate(rectform z)
z
and returns the
result as an element of rectform
.conjugate
for elements of
rectform
, i.e., you may use it in the form
conjugate(z)
.float(rectform z)
z
by
applying float
to
z
. The result is of the domain type DOM_FLOAT
.
The precision of the approximation depends on the environment
variable DIGITS
.
float
for elements
of rectform
, i.e., you may use it in the form
float(z)
.Re(rectform z)
z
.Re
for elements of rectform
,
i.e., you may use it in the form Re(z)
.Im(rectform z)
z
.Im
for elements of rectform
,
i.e., you may use it in the form Im(z)
.iszero(rectform z)
TRUE
if z
is zero, i.e, the three
operands of z
are zero.iszero
for elements of
rectform
, i.e., you may use it in the form
iszero(z)
.nops(rectform z)
z
, which is 3 for
any element of rectform
.nops
for elements of
rectform
, i.e., you may use it in the form
nops(z)
.op(rectform z, positive
integer i)
i
-th operand of z
(see above
for a description of the operands of such elements).FAIL
, if i
is greater than 3
(i.e., the number of operands of z
).op
for elements of rectform
,
i.e., you may use it in the form op(z, i)
.convert(any x)
x
to an element of the domain
type rectform
, if x
is an arithmetical
expression (see Type::Arithmetical
). Otherwise
FAIL
is returned.convert_to(rectform z, any T)
z
to an element of domain
type T
, or, if T
is not a domain, to the
domain type of T
.z
is
converted to an arithmetical expression using the method
"expr"
. Then, the method "convert"
of the
domain T
(or its domain type) is called to perform the
conversion.expr
to convert z
to an object of a kernel domain.expr(rectform z)
z
to an element of a kernel domain, i.e., the
expression o1 + I*o2 + o3
is returned, where o1,
o2
and o3
are the operands of z
.expr2text(rectform z)
z
to a string.expr2text
for elements of
rectform
, i.e., you may use it in the form
expr2text(z)
.testtype(rectform z, domain T)
z
can be converted to an element of the
domain T
, and returns TRUE
or
FALSE
, respectively.z
is
converted to an arithmetical expression using the method
"expr"
. After this, the function testtype
is called and its result
is returned.testtype
.TeX(rectform z)
z
.generate::TeX
.length(rectform z)
f
, which is the length of the
expression o1 + I*o2 + o3
, where o1, o2
and
o3
are the operands of z
.length
for elements of
rectform
, i.e., you may use it in the form
length(z)
.print(rectform z)
o1 + I*o2 + o3
,
where o1, o2
and o3
are the operands of
z
.print
for printing elements of
rectform
to the screen.