Previous Page Next Page Contents

Dom::Complex -- the field of complex numbers

Introduction

Dom::Complex is the field of complex numbers represented by elements of the domains DOM_INT, DOM_RAT, DOM_FLOAT, DOM_COMPLEX and DOM_EXPR.

Creating Elements

Dom::Complex(x)

Parameters

x - An expression of type DOM_INT, DOM_RAT, DOM_FLOAT, DOM_COMPLEX. An expression of type DOM_EXPR is also possible if it is of type Type::Arithmetical and if it contains only indeterminates which are of type Type::ConstantIdents or if it contains no indeterminates.

Categories

Cat::DifferentialRing

, Cat::Field

Related Domains

Dom::Float, Dom::Integer, Dom::Numerical, Dom::Rational, Dom::Real

Details

Entries

characteristic

the characteristic of this field is 0.

one

the unit element; it equals 1.

zero

The zero element; it equals 0.

Method _divide: divide numbers

Method _invert: invert numbers

Method _mult: multiplies numbers

Method _negate: negate numbers

Method _plus: add numbers

Method _power: power operator

Method _unequal: inequalities

Method conjugate: conversion to a basic type

Method D: differential operator

Method diff: differentiates

Method equal: equations

Method expr: conversion to a basic type

Method iszero: zero test

Method norm: the absolute value of a number

Method random: random number generation

Method unequal: inequalities

Method convert: conversion into this domain

Method convert_to: conversion to other domains

Method normal: normal form of objects

Example 1

Creating some complex numbers using Dom::Complex:

>> Dom::Complex(2/3)
                                    2/3
>> Dom::Complex(2/3 + 4*I)
                                 2/3 + 4 I

Example 2

It's also possible to use expressions or constants for creating an element of Dom::Complex:

>> Dom::Complex(PI)
                                    PI
>> Dom::Complex(sin(2))
                                  sin(2)
>> Dom::Complex(sin(2/3*I) + 3)
                              I sinh(2/3) + 3

If the expression cannot be converted to an element of Dom::Complex we will get an error message:

>> Dom::Complex(sin(x))
      Error: illegal arguments [Dom::Complex::new]

Super-Domain

Dom::ArithmeticalExpression

Axioms

Ax::systemRep

, Ax::efficientOperation("_divide"), Ax::efficientOperation("_mult"), Ax::efficientOperation("_invert")

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000