%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%%  bigfloat_int.tex        LiDIA documentation
%%
%%  This file contains the documentation of the class bigfloat_int
%%  
%%  Copyright (c) 1997 by the LiDIA Group
%%
%%  Authors: Patrick Theobald
%%  

\markright{\BF{bigfloat\_int}}
\begin{lidia_man}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\NAME
\BF{bigfloat\_int} \DOTFILL multiprecision floating point interval 
arithmetic
\label{bigfloat_int}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\ABSTRACT
\BF{bigfloat\_int} is a class for doing multiprecision interval 
arithmetic over \MATH{\R}. It supports for example arithmetic 
operations, comparisons,  the  square root function, the 
exponential function, the logarithmical function,  
(inverse) trigonometric functions etc. 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\DESCRIPTION
A variable of type \BF{bigfloat\_int} consists of two bigfloats \MATH{Upp}
and \MATH{Low}. These are used to determine an interval in
\MATH{\R}. Each operation or function described in the following
is applied to each of these two values. The first
result generated from \MATH{Upp} is rounded up
and the second result generated from \MATH{Low} is rounded down. 
So we can ensure, that the real result lies in the
interval described by \MATH{[Low, Upp]}.
Before declaring a \BF{bigfloat\_int} it is possible to set the
decimal precision \MATH{p} for the member variables by

\begin{center}
\TT{bigfloat::precision(p)}
\end{center}

For further informations we refer to the description of the class \BF{bigfloat}, page
\pageref{bigfloat_class}.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\CONS
\fcode{ct}{bigfloat\_int}{}
{initializes \MATH{Upp} and \MATH{Low} with 0.}

\fcode{ct}{bigfloat\_int}{int value}
{initializes \MATH{Upp} and \MATH{Low} with \MATH{value}.}

\fcode{ct}{bigfloat\_int}{long value}
{initializes \MATH{Upp} and \MATH{Low} with \MATH{value}.}

\fcode{ct}{bigfloat\_int}{unsigned long value}
{initializes \MATH{Upp} and \MATH{Low} with \MATH{value}.}

\fcode{ct}{bigfloat\_int}{double value}
{initializes \MATH{Upp} and \MATH{Low} with \MATH{value}.}

\fcode{ct}{bigfloat\_int}{const bigint \&value}
{initializes \MATH{Upp} and \MATH{Low} with \MATH{value}.}

\fcode{ct}{bigfloat\_int}{const bigint \&\k const bigint \&}
{initializes a \BF{bigfloat\_int} with the result of the floating point division
of two \BF{bigint}s.}

\fcode{ct}{bigfloat\_int}{const bigrational \& \MATH{b}}
{initializes a \BF{bigfloat\_int} with the result of the floating point division
of the numerator and the denominator of \MATH{b}.}

\fcode{ct}{bigfloat\_int}{const bigfloat\_int \&value}
{creates a copy of \MATH{value}.}

\fcode{ct}{bigfloat\_int}{const bigfloat \&value}
{initializes \MATH{Upp} and \MATH{Low} with \MATH{value}.}

\fcode{ct}{bigfloat\_int}{const bigfloat \&\k const bigfloat \&}
{initializes a \BF{bigfloat\_int} with the result of the floating point division
of two \BF{bigfloat}s.}

\fcode{dt}{\SIM bigfloat\_int}{}
{deletes the bigfloat\_int object.}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\ASGN
Let \MATH{a} be of type \BF{bigfloat\_int}. The operator \TT{=} is
overloaded. For  efficiency reasons the following functions are
also implemented:

\fcode{void}{a.assign\_zero}{}
{ \MATH{a = 0}.}

\fcode{void}{a.assign\_one}{}
{ \MATH{a = 1}.}

\fcode{void}{a.assign}{int i}
{ \MATH{a = i}.}

\fcode{void}{a.assign}{long l}
{ \MATH{a = l}.}

\fcode{void}{a.assign}{unsigned long ul}
{ \MATH{a = ul}.}

\fcode{void}{a.assign}{double d}
{ \MATH{a = d}.}

\fcode{void}{a.assign}{const bigint \& I}
{ \MATH{a = I}.}

\fcode{void}{a.assign}{const bigint \& I\k const bigint \& J}
{ \MATH{a = I / J} (floating point division) if \MATH{J \NEQ 0}.
Otherwise the \TT{lidia\_error\_handler} will be invoked.}

\fcode{void}{a.assign}{const bigrational \& R}
{ \MATH{a = R}.}

\fcode{void}{a.assign}{const bigfloat\_int \& bf}
{ \MATH{a = bf}.}

\fcode{void}{a.assign}{const bigfloat \& F}
{ \MATH{a = F}.}

\fcode{void}{a.assign}{const bigfloat \& I\k const bigfloat \& J}
{ \MATH{a = I / J} (floating point division) if \MATH{J \NEQ 0}.
Otherwise the \TT{lidia\_error\_handler} will be invoked.}

\cfcode{void}{a.dble}{double \& d}
{approximats the value of \MATH{a} by a \BF{double} \MATH{d}.}

\cfcode{void}{a.Approx}{}
{ \MATH{a.Low = a.Upp = \frac{(a.Low + a.Upp)}{2}}.}

\cfcode{void}{a.approx}{bigfloat \& d}
{ \MATH{d = \frac{(a.Low + a.Upp)}{2}}.}

\cfcode{void}{a.int\_length}{bigfloat \& d}
{ \MATH{d = {|a.Low + a. Upp|}}.}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\ARTH
The following operators are overloaded and can be used in exactly
the same way as in C:

\begin{center}
\TT{(unary) -, ++, --}\\
\TT{(binary) +, -, *, /}\\
\TT{(binary with assignment) +=, -=, *=, /=}
\end{center}

To avoid copying all operators exist also as functions:

\fcode{void}{add}{bigfloat\_int \& c\k const bigfloat\_int \& a\k const bigfloat\_int \& b}
{ \MATH{c = a + b}.}

\fcode{void}{add}{bigfloat\_int \& c\k const bigfloat\_int \& a\k long i}
{ \MATH{c = a + i}.}

\fcode{void}{add}{bigfloat\_int \& c\k long i\k const bigfloat\_int \& b}
{ \MATH{c = i + b}.}


\fcode{void}{subtract}{bigfloat\_int \& c\k const bigfloat\_int \& a\k const bigfloat\_int \& b}
{ \MATH{c = a - b}.}

\fcode{void}{subtract}{bigfloat\_int \& c\k const bigfloat\_int \& a\k long i}
{ \MATH{c = a - i}.}

\fcode{void}{subtract}{bigfloat\_int \& c\k long i\k const bigfloat\_int \& b}
{ \MATH{c = i - b}.}


\fcode{void}{multiply}{bigfloat\_int \& c\k const bigfloat\_int \& a\k const bigfloat\_int \& b}
{ \MATH{c = a * b}.}

\fcode{void}{multiply}{bigfloat\_int \& c\k const bigfloat\_int \& a\k long i}
{ \MATH{c = a * i}.}

\fcode{void}{multiply}{bigfloat\_int \& c\k long i\k const bigfloat\_int \& b}
{ \MATH{c = i * b}.}


\fcode{void}{divide}{bigfloat\_int \& c\k const bigfloat\_int \& a\k const bigfloat\_int \& b}
{ \MATH{c = a / b}, if \MATH{b \NEQ 0}. Otherwise the \TT{lidia\_error\_handler} will be invoked.}

\fcode{void}{divide}{bigfloat\_int \& c\k const bigfloat\_int \& a\k long i}
{ \MATH{c = a / i}, if \MATH{i \NEQ 0}. Otherwise the \TT{lidia\_error\_handler} will be invoked.}

\fcode{void}{divide}{bigfloat\_int \& c\k long i\k const bigfloat\_int \& b}
{ \MATH{c = i / b}, if \MATH{b \NEQ 0}. Otherwise the \TT{lidia\_error\_handler} will be invoked.}


\fcode{void}{a.negate}{}
{ \MATH{a = -a}.}

\fcode{void}{negate}{bigfloat\_int \& a\k const bigfloat\_int \& b}
{ \MATH{a = -b}.}


\fcode{void}{a.invert}{}
{ \MATH{a = 1 / a}, if \MATH{a \NEQ 0}. Otherwise the \TT{lidia\_error\_handler} will be invoked.}

\fcode{void}{invert}{bigfloat\_int \& a\k const bigfloat\_int \& b}
{ \MATH{a = 1 / b}, if \MATH{b \NEQ 0}. Otherwise the \TT{lidia\_error\_handler} will be invoked.}

\fcode{bigfloat\_int}{inverse}{const bigfloat\_int \& a}
{returns \MATH{1 / a}, if \MATH{a \NEQ 0}. Otherwise the
  \TT{lidia\_error\_handler} will be invoked.}

\fcode{void}{inc}{bigfloat\_int \& a}
{ \MATH{a = a + 1}.}

\fcode{void}{dec}{bigfloat\_int \& a}
{ \MATH{a = a - 1}.}

\fcode{void}{square}{bigfloat\_int \& c\k const bigfloat\_int \& a}
{ \MATH{c = \MATH{a^2}}.}

\fcode{bigfloat\_int}{square}{const bigfloat\_int \& a}
{returns \MATH{a^2}.}


\fcode{void}{sqrt}{bigfloat\_int \& c\k const bigfloat\_int \& a}
{ \MATH{c = }\MATH{\SQRT{a}}, where \MATH{a >= 0}. If \MATH{a < 0},
the \TT{lidia\_error\_handler} will be invoked.}

\fcode{bigfloat\_int}{sqrt}{const bigfloat\_int \& a}
{returns \MATH{\SQRT{a}}, where \MATH{a >= 0}. If \MATH{a < 0},
the \TT{lidia\_error\_handler} will be invoked.}


%\fcode{void}{sqr}{bigfloat\_int \& c\k const bigfloat\_int \& a}
%{ \MATH{c = \MATH{a^2}}.}

%\fcode{bigfloat\_int}{sqr}{const bigfloat\_int \& a}
%{returns \MATH{a^2}.}


\fcode{void}{power}{bigfloat\_int \& c\k const bigfloat\_int \& a\k const bigfloat\_int \& b}
{ \MATH{c = }\MATH{a^b}, where \MATH{b > 0}. If \MATH{b \LEQ 0}, 
the \TT{lidia\_error\_handler} will be invoked.}

%\fcode{bigfloat\_int}{power}{const bigfloat\_int \& a\k const bigfloat\_int \& b}
%{returns \MATH{a^b}, where \MATH{b > 0}. If \MATH{b \LEQ 0}, 
%the \TT{lidia\_error\_handler} will be invoked.}

\fcode{void}{power}{bigfloat\_int \& c\k const bigfloat\_int \& a\k long \& b}
{ \MATH{c = }\MATH{a^b}, where \MATH{b > 0}. If \MATH{b \LEQ 0}, 
the \TT{lidia\_error\_handler} will be invoked.}

%\fcode{bigfloat\_int}{power}{bigfloat\_int \& c\k const bigfloat\_int \& a\k long \& b}
%{returns \MATH{a^b}, where \MATH{b > 0}. If \MATH{b \LEQ 0}, 
%the \TT{lidia\_error\_handler} will be invoked.}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\COMP
Let \MATH{a} and \MATH{b} be of type \BF{bigfloat\_int}.  The  binary
operators \TT{!=}, \TT{>}, \TT{<} are overloaded
and can be used in exactly the same way as in C. \MATH{a != b} means 
that \MATH{a.Low > b.Upp} or \MATH{a.Upp < b.Low}. \MATH{a > b} is
true, if \MATH{a.Low > b.Upp}. In the same way \MATH{a < b} is defined. 

\cfcode{bool}{a.contains\_zero}{}
{returns \TRUE\ if \MATH{a.Low <= 0 <= a.Upp}, \FALSE\ otherwise.}

\cfcode{bool}{a.is\_gt\_zero}{}
{returns \TRUE\ if \MATH{a.Low > 0}, \FALSE\ otherwise.}

\cfcode{bool}{a.is\_lt\_zero}{}
{returns \TRUE\ if \MATH{a.Upp < 0}, \FALSE\ otherwise.}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\BASIC
Let \MATH{a} be of type \BF{bigfloat\_int}.

\cfcode{int}{a.sign}{}
{returns 1 if \MATH{a.Low > 0}, \MATH{-1} if \MATH{a.Upp < 0} and \MATH{0} otherwise.}

\fcode{int}{sign}{const bigfloat\_int \& a}
{returns 1 if \MATH{a.Low > 0}, \MATH{-1} if \MATH{a.Upp < 0} and \MATH{0} otherwise.}


\fcode{void}{a.absolute\_value}{}
{ \MATH{a =} \MATH{|a|}.}

\fcode{bigfloat\_int}{abs}{const bigfloat\_int \& a}
{returns \MATH{|a|}.}


\fcode{void}{besselj}{bigfloat\_int \& c\k int n\k const bigfloat\_int \& a}
{ \MATH{c = }\MATH{J_n(a)} (Bessel Function of first kind and integer order).}

\fcode{bigfloat\_int}{besselj}{int n\k const bigfloat\_int \& a}
{returns \MATH{J_n(a)} (Bessel Function of first kind and integer order).}


\fcode{void}{ceil}{bigint \& c\k const bigfloat\_int \& a}
{ \MATH{c = \LCEIL a \RCEIL}, i.e. \MATH{c} is the smallest
integer which is greater than or equal to \MATH{a.Upp}.}

\fcode{bigint }{ceil}{const bigfloat\_int \& a}
{returns \MATH{\LCEIL a \RCEIL}, i.e. \MATH{c} is the smallest
integer which is greater than or equal to \MATH{a.Upp}.}


\fcode{void}{floor}{bigint \& c\k const bigfloat\_int \& a}
{ \MATH{c = \LFLOOR a \RFLOOR}, i.e. \MATH{c} is the largest
integer which is less than or equal to \MATH{a.Low}.}

\fcode{bigint}{floor}{const bigfloat\_int \& a}
{returns \MATH{\LFLOOR a \RFLOOR}, i.e. \MATH{c} is the largest
integer which is less than or equal to \MATH{a.Low}.}


\fcode{void}{round}{bigint \& c\k const bigfloat\_int \& a}
{ \MATH{c = \LFLOOR a.Low + 1/2 \RFLOOR} if \MATH{\LFLOOR a.Low + 1/2
    \RFLOOR = \LFLOOR a.Upp + 1/2 \RFLOOR}. Otherwise the
    lidia\_error\_handler will be invoked.}

\fcode{bigint}{round}{const bigfloat\_int \& a}
{ returns \MATH{\LFLOOR a.Low + 1/2 \RFLOOR} if \MATH{\LFLOOR a.Low + 1/2
    \RFLOOR = \LFLOOR a.Upp + 1/2 \RFLOOR}. Otherwise the
    lidia\_error\_handler will be invoked.}


\fcode{void}{truncate}{bigint \& c\k const bigfloat\_int \& a}
{ \MATH{c = \TT{sign}(a) * floor(|a|)}.}

\fcode{bigint}{truncate}{const bigfloat\_int \& a}
{returns \MATH{\TT{sign}(a) * floor(|a|)}.}


\fcode{void}{exp}{bigfloat\_int \& c\k const bigfloat\_int \& a}
{ \MATH{c = e^a}.}

\fcode{bigfloat\_int}{exp}{const bigfloat\_int \& a}
{returns \MATH{e^a}.}


\fcode{void}{log}{bigfloat\_int \& c\k const bigfloat\_int \& a}
{ \MATH{c = log(a)} (natural logarithm to base \MATH{e} = 2.718...),
where \MATH{a > 0}. If \MATH{a \LEQ 0}, the \TT{lidia\_error\_handler}
will be invoked.}

\fcode{bigfloat\_int}{log}{const bigfloat\_int \& a}
{returns \MATH{log(a)} (natural logarithm to base \MATH{e} =
2.718...), where \MATH{a > 0}. If \MATH{a \LEQ 0} the
\TT{lidia\_error\_handler} will be invoked.}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\STITLE{(Inverse) Trigonometric Functions}
Note that the arguments of the trigonometrical functions are
supposed to be given as radiants.

\fcode{void}{sin}{bigfloat\_int \& c\k const bigfloat\_int \& a}
{ \MATH{c = \TT{sin}(a)}.}

\fcode{bigfloat\_int}{sin}{const bigfloat\_int \& a}
{returns \MATH{\TT{sin}(a)}.}


\fcode{void}{cos}{bigfloat\_int \& c\k const bigfloat\_int \& a}
{ \MATH{c = \TT{cos}(a)}.}

\fcode{bigfloat\_int}{cos}{const bigfloat\_int \& a}
{returns \MATH{\TT{cos}(a)}.}


\fcode{void}{tan}{bigfloat\_int \& c\k const bigfloat\_int \& a}
{ \MATH{c = \TT{tan}(a)} if \MATH{(2k+1)\;\pi/2 \not\in a}, \MATH{k \IN \Z}.
Otherwise the behaviour is undefined.}

\fcode{bigfloat\_int}{tan}{const bigfloat\_int \& a}
{returns \MATH{\TT{tan}(a)} if \MATH{(2k+1)\;\pi/2 \not\in a}, \MATH{k \IN \Z}.
Otherwise the behaviour is undefined.}


\fcode{void}{cot}{bigfloat\_int \& c\k const bigfloat\_int \& a}
{ \MATH{c = \TT{cot}(a)} if \MATH{a \not\ni k\;\pi}, \MATH{k \IN \Z}.
Otherwise the behaviour is undefined.}

\fcode{bigfloat\_int}{cot}{const bigfloat\_int \& a}
{returns \MATH{\TT{cot}(a)} if \MATH{a \not\ni k\;\pi}, \MATH{k \IN \Z}.
Otherwise the behaviour is undefined.}


\fcode{void}{asin}{bigfloat\_int \& c\k const bigfloat\_int \& a}
{ \MATH{c = \TT{arcsin}(a)} if \MATH{a \subset [ -1, 1 ] }.
Otherwise the \TT{lidia\_error\_handler} will be invoked.}

\fcode{bigfloat\_int}{asin}{const bigfloat\_int \& a}
{returns \MATH{\TT{arcsin}(a)} if \MATH{a \subset [ -1, 1 ]}.
Otherwise the \TT{lidia\_error\_handler} will be invoked.}


\fcode{void}{acos}{bigfloat\_int \& c\k const bigfloat\_int \& a}
{ \MATH{c = \TT{arccos}(a)} if \MATH{a \subset [ -1, 1 ]}.
Otherwise the \TT{lidia\_error\_handler} will be invoked.}

\fcode{bigfloat\_int}{acos}{const bigfloat\_int \& a}
{returns \MATH{\TT{arccos}(a)} if \MATH{a \subset [ -1, 1 ]}.
Otherwise the \TT{lidia\_error\_handler} will be invoked.}


\fcode{void}{atan}{bigfloat\_int \& c\k const bigfloat\_int \& a}
{ \MATH{c = \TT{arctan}(a)}.}

\fcode{bigfloat\_int}{atan}{const bigfloat\_int \& a}
{returns \MATH{\TT{arctan}(a)}.}


\fcode{void}{atan2}{bigfloat\_int \& c\k const bigfloat\_int \& a\k const bigfloat\_int \& b}
{ \MATH{c = \TT{arctan}(a / b)} in the range of \MATH{[ -\pi, \pi [},
i.e. atan2(a, b) calculates the argument (respectively phase) of \MATH{a, b}.}

\fcode{bigfloat\_int}{atan2}{const bigfloat\_int \& a\k const bigfloat\_int \& b}
{returns \MATH{\TT{arctan}(a / b)} in the range of \MATH{[ -\pi, \pi [},
i.e. atan2(a, b) calculates the argument (respectively phase) of \MATH{a, b}.}

\fcode{void}{acot}{bigfloat\_int \& c\k const bigfloat\_int \& a}
{ \MATH{c = \TT{arccot}(a)}.}

\fcode{bigfloat\_int}{acot}{const bigfloat\_int \& a}
{returns \MATH{\TT{arccot}(a)}.}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\STITLE{(Inverse) Hyperbolic Trigonometric Functions}
\fcode{void}{sinh}{bigfloat\_int \& c\k const bigfloat\_int \& a}
{ \MATH{c = \TT{sinh}(a)}.}

\fcode{bigfloat\_int}{sinh}{const bigfloat\_int \& a}
{returns \MATH{\TT{sinh}(a)}.}


\fcode{void}{cosh}{bigfloat\_int \& c\k const bigfloat\_int \& a}
{ \MATH{c = \TT{cosh}(a)}.}

\fcode{bigfloat\_int}{cosh}{const bigfloat\_int \& a}
{returns \MATH{\TT{cosh}(a)}.}


\fcode{void}{tanh}{bigfloat\_int \& c\k const bigfloat\_int \& a}
{ \MATH{c = \TT{tanh}(a)}.}

\fcode{bigfloat\_int}{tanh}{const bigfloat\_int \& a}
{returns \MATH{\TT{tanh}(a)}.}


\fcode{void}{coth}{bigfloat\_int \& c\k const bigfloat\_int \& a}
{ \MATH{c = \TT{coth}(a)}.}

\fcode{bigfloat\_int}{coth}{const bigfloat\_int \& a}
{returns \MATH{\TT{coth}(a)}.}


\fcode{void}{asinh}{bigfloat\_int \& c\k const bigfloat\_int \& a}
{ \MATH{c = \TT{arcsinh}(a)}.}

\fcode{bigfloat\_int}{asinh}{const bigfloat\_int \& a}
{returns \MATH{\TT{arcsinh}(a)}.}


\fcode{void}{acosh}{bigfloat\_int \& c\k const bigfloat\_int \& a}
{ \MATH{c = \TT{arccosh}(a)}, where \MATH{a \GEQ 1}.}

\fcode{bigfloat\_int}{acosh}{const bigfloat\_int \& a}
{returns \MATH{\TT{arccosh}(a)}, where \MATH{a \GEQ 1}.}


\fcode{void}{atanh}{bigfloat\_int \& c\k const bigfloat\_int \& a}
{ \MATH{c = \TT{arctanh}(a)}, where \MATH{a \subset ]-1, 1[}.}

\fcode{bigfloat\_int}{atanh}{const bigfloat\_int \& a}
{returns \MATH{\TT{arctanh}(a)}, where \MATH{a \subset ] -1, 1 [}.}


\fcode{void}{acoth}{bigfloat\_int \& c\k const bigfloat\_int \& a}
{ \MATH{c = \TT{arccoth}(a)}, where \MATH{a \subset \R\SETMINUS [-1, 1]}.}

\fcode{bigfloat\_int}{acoth}{const bigfloat\_int \& a}
{returns \MATH{\TT{arccoth}(a)}, where \MATH{a \subset \R \SETMINUS [ -1,
    1 ]}.}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\STITLE{Swap Function}

\fcode{void}{swap}{bigfloat\_int \& a\k bigfloat\_int \& b}
{swaps the values of \MATH{a} and \MATH{b}.}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\STITLE{Constants}
Constants are calculated according to the precision set in the
initialization phase (i.e. \TT{bigfloat::precision}).

\fcode{void}{constant\_E}{bigfloat\_int \& a}
{ \MATH{a = e = 2.718281828459....}}

\fcode{void}{constant\_Pi}{bigfloat\_int \& a}
{ \MATH{a = \pi = 3.141592653589....}}

\fcode{void}{constant\_Euler}{bigfloat\_int \& a}
{ \MATH{a = \gamma = 0.5772156649....}}

\fcode{void}{constant\_Catalan}{bigfloat\_int \& a}
{ \MATH{a = G = 0.9159655941....}}

\fcode{bigfloat\_int}{E}{}{}
\fcode{bigfloat\_int}{Pi}{}{}
\fcode{bigfloat\_int}{Euler}{}{}
\fcode{bigfloat\_int}{Catalan}{}{}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\IO
Let \MATH{a} be of type \BF{bigfloat\_int}.

\BF{istream} operator \TT{>>} and \BF{ostream} operator \TT{<<}
are overloaded. 

The used format is: 
\begin{verbatim}
  (Low,Upp)
\end{verbatim}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\SEEALSO
\BF{bigfloat}, \BF{bigrational}, \BF{bigcomplex}.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\NOTES

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\EXAMPLES
The  following  program  calculates  the number \MATH{\SQRT{\pi}}
to 100 decimal places.


\begin{verbatim}
 #include <LiDIA/bigfloat_int.h>

 int main()
 {
   bigfloat::precision(100);
   bigfloat_int x = sqrt(pi());
   cout << "\n sqrt(pi) = " << x << flush;
   return 0;
 }

\end{verbatim}

An extensive example  of \BF{bigfloat\_int} can be found in {\LiDIA}'s
installation directory under

\begin{center}
\TT{src/simple\_classes/bigfloat\_int\_appl.c}
\end{center}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\AUTHOR
Original Code by Nigel Smart.\\
Documentation and some changes by Patrick Theobald.

\end{lidia_man}



