Previous Page Next Page Contents

Dom::ArithmeticalExpression -- the domains of arithmetical expressions

Introduction

Dom::ArithmeticalExpression creates the domain of arithmetical expressions built up by the system functions and operators like + and *.

Creating Elements

Dom::ArithmeticalExpression(x)

Parameters

x - an arithmetical expression

Categories

Cat::BaseCategory

Related Domains

Dom::Expression

Details

Entries

key

The name of this domain.

one

The neutral element w.r.t. "_mult": the constant 1.

zero

The neutral element w.r.t. "_plus": the constant 0.

Method _divide: divides arithmetical expressions

Method _invert: inverts an arithmetical expression

Method _mult: multiplies arithmetical expressions

Method _negate: negates an arithmetical expression

Method _plus: adds arithmetical expressions

Method _power: power operator

Method _subtract: subtracts an arithmetical expression

Method D: differential operator for functions

Method diff: differentiates an arithmetical expression

Method intmult: multiplies an arithmetical expression with an integer

Method iszero: test for zero

Method max: maximum of numbers

Method min: minimum of numbers

Method norm: norm of an arithmetical expression

Method convert: check for being an arithmetical expression

Example 1

For brevity, we will use AE as a shorthand notation for Dom::ArithmeticalExpression:

>> AE := Dom::ArithmeticalExpression
                        Dom::ArithmeticalExpression

An element of this domain can not be created as follows:

>> e := AE(2*sin(x) + f(x)/y)
                                         f(x)
                              2 sin(x) + ----
                                          y

Since Dom::ArithmeticalExpression is a faēcade domain, e is not a domain element, but an expression:

>> domtype(e)
                                 DOM_EXPR

The fact that no error was returned yields the information that e is an arithmetical expression. This can also be checked as follows:

>> testtype(e,AE)
                                   TRUE

In contrast to its super-domain Dom::Expression, this domain only allows elements which are valid arguments for the arithmetical functions, thus the following yields an error:

>> AE([a, b]) 
      Error: illegal arguments [Dom::ArithmeticalExpression::new]

Super-Domain

Dom::Expression

Axioms

Ax::systemRep

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000