Previous Page Next Page Contents

Dom::Real -- the field of real numbers

Introduction

Dom::Real is the field of real numbers represented by elements of the kernel domains DOM_INT, DOM_RAT, DOM_FLOAT and DOM_EXPR.

Creating Elements

Dom::Real(x)

Parameters

x - An expression of type DOM_INT, DOM_RAT or DOM_FLOAT. An expression of type DOM_EXPR is also allowed if it is of type Type::Arithmetical and if it contains no indeterminates which are not of type Type::ConstantIdents and if it contains no imaginary part.

Categories

Cat::DifferentialRing

, Cat::Field, Cat::OrderedSet

Related Domains

Dom::Complex, Dom::Float, Dom::Integer, Dom::Numerical, Dom::Rational

Details

Method _less: Boolean operator ``less''

Method _leequal: Boolean operator ``less or equal''

Method _power: power operator

Method conjugate: complex conjugate

Method Im: imaginary part of a real number

Method random: random number generation

Method Re: real part of a real number

Method convert: conversion of objects

Method convert_to: conversion to other domains

Example 1

>> Dom::Real(2/3)
                                    2/3
>> Dom::Real(0.5666)
                                  0.5666

Example 2

>> Dom::Real(PI)
                                    PI
>> Dom::Real(sin(2))
                                  sin(2)
>> Dom::Real(sin(2/3 * I) + 3)
      Error: illegal arguments [Dom::Real::new]
>> Dom::Real(sin(x))
      Error: illegal arguments [Dom::Real::new]

Super-Domain

Dom::Complex

Axioms

Ax::systemRep

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

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000