Go to the
previous,
next chapter.
This file defines some common standard functions for real and interval arguments.
Additionally the following constants are defined:
- Constant:
REAL Constant::Pi
- The value 3.14159....
- Constant:
REAL Constant::TwoPi
- Twice the value of
Constant::Pi
.
- Constant:
REAL Constant::PiHalf
- Half of the value of
Constant::Pi
.
- Constant:
REAL Constant::PiQuarter
- A quarter of the value of
Constant::Pi
.
- Constant:
REAL Constant::e
- The Euler constant 2.71828....
- Constant:
REAL Constant::Sqrt2
- The square root of two.
- Constant:
REAL Constant::InvSqrt2
- The square root of 0.5.
- Constant:
REAL Constant::Ln10
- The natural logarithm of ten.
Due to the automatic initialization of the constants given above,
the object file belonging to Functions.h must be linked to the executable
code. This is generally done automatically. If not, define in your program a global
variable as e.g.
Constant ConstantAutomaticInit;
to initialize the constants.
The following standard functions are provided. All of them return a
REAL
result.
- Function:
REAL Sin (REAL x)
- Returns the sine of x.
- Function:
REAL Cos (REAL x)
- Returns the cosine of x.
- Function:
REAL Tan (REAL x)
- Returns the tangens of x.
- Function:
REAL ArcSin (REAL x)
- Returns the arcus sine of x.
- Function:
REAL ArcCos (REAL x)
- Returns the arcus cosine of x.
- Function:
REAL ArcTan (REAL x)
- Returns the arcus tangens of x.
- Function:
REAL Sinh (REAL x)
- Returns the hyperbolic sine of x.
- Function:
REAL Cosh (REAL x)
- Returns the hyperbolic cosine of x.
- Function:
REAL Tanh (REAL x)
- Returns the hyperbolic tangens of x.
- Function:
REAL ArSinh (REAL x)
- Returns the inverse hyperbolic sine of x.
- Function:
REAL ArCosh (REAL x)
- Returns the inverse hyperbolic cosine of x.
- Function:
REAL ArTanh (REAL x)
- Returns the inverse hyperbolic tangens of x.
- Function:
REAL Exp (REAL x)
- Returns the Euler constant to the power of x.
- Function:
REAL Log (REAL x)
- Returns the natural logarithm of x.
- Function:
REAL Log10 (REAL x)
- Returns the decadic logarithm of x.
- Function:
REAL Sqr (REAL x)
- Returns the square of x.
- Function:
REAL Sqrt (REAL x)
- Returns the square root of x.
- Function:
REAL Root (REAL x, INT i)
- Returns the i-th root of x.
- Function:
REAL Power (REAL x, INT i)
- Returns x to the power of i.
- Function:
REAL Power (REAL x, REAL y)
- Returns x to the power of y.
- Function:
REAL Abs (REAL x)
- Returns the absolute value of x.
- Function:
REAL Min (REAL x, REAL y)
- Returns the minimum of x and y.
- Function:
REAL Max (REAL x, REAL y)
- Returns the maximum of x and y.
For interval results, the following functions are provided which return an
enclosure of the true result.
- Function:
INTERVAL Sin (INTERVAL x)
- Returns the sine of x.
- Function:
INTERVAL Cos (INTERVAL x)
- Returns the cosine of x.
- Function:
INTERVAL Tan (INTERVAL x)
- Returns the tangens of x.
- Function:
INTERVAL ArcSin (INTERVAL x)
- Returns the arcus sine of x.
- Function:
INTERVAL ArcCos (INTERVAL x)
- Returns the arcus cosine of x.
- Function:
INTERVAL ArcTan (INTERVAL x)
- Returns the arcus tangens of x.
- Function:
INTERVAL Sinh (INTERVAL x)
- Returns the hyperbolic sine of x.
- Function:
INTERVAL Cosh (INTERVAL x)
- Returns the hyperbolic cosine of x.
- Function:
INTERVAL Tanh (INTERVAL x)
- Returns the hyperbolic tangens of x.
- Function:
INTERVAL ArSinh (INTERVAL x)
- Returns the area hyperbolic sine of x.
- Function:
INTERVAL ArCosh (INTERVAL x)
- Returns the area hyperbolic cosine of x.
- Function:
INTERVAL ArTanh (INTERVAL x)
- Returns the area hyperbolic tangens of x.
- Function:
INTERVAL Exp (INTERVAL x)
- Returns the Euler constant to the power of x.
- Function:
INTERVAL Log (INTERVAL x)
- Returns the natural logarithm of x.
- Function:
INTERVAL Log10 (INTERVAL x)
- Returns the decadic logarithm of x.
- Function:
INTERVAL Sqr (INTERVAL x)
- Returns the square of x.
- Function:
INTERVAL Sqrt (INTERVAL x)
- Returns the square root of x.
- Function:
INTERVAL Root (INTERVAL x, INT i)
- Returns the i-th root of x.
- Function:
INTERVAL Power (INTERVAL x, INT i)
- Returns x to the power of i.
- Function:
INTERVAL Power (INTERVAL x, INTERVAL y)
- Returns x to the power of y.
- Function:
INTERVAL IAbs (INTERVAL x)
- Returns an interval enclosing all absolute values of the values contained in x.
Note that this is different to the definition of the absolute value of an interval,
because the latter yields a REAL
result.
For example:
x = Hull (-1.0, 2.0);
Abs(x)
=> 2.0
IAbs(x)
=> [0.0, 2.0]
This means that IAbs
is an inclusion function of the mathematical absolute
value function.