Navigation: Up, Table of Contents, Bibliography, Index, Title Page

GNU Multiple Precision Integer (CGAL_Gmpz)

Definition

An object of the class CGAL_Gmpz is an arbitrary precision integer based on the GNU Multiple Precision Arithmetic Library.

#include <CGAL/Gmpz.h>

Creation

CGAL_Gmpz q;
creates an uninitialized multiple precision integer q.

CGAL_Gmpz q ( int i);
creates an multiple precision integer initialized with i.

CGAL_Gmpz q ( double d);
creates an multiple precision integer initialized with the integral part of d.

Operations

The arithmetic operations +, -, *, /, +=, -=, *=, /=, -(unary), the comparison operations <, <=, >, >=, ==, != and the stream operations are all available.

The following functions are added to fulfill the CGAL requirements on number types.

double CGAL_to_double ( g)
returns some double approximation to g.
bool CGAL_is_valid ( g)
returns true
bool CGAL_is_finite ( g)
returns true
CGAL_io_Operator CGAL_io_tag ( g)

Implementation

CGAL_Gmpzs are reference counted.


Navigation: Up, Table of Contents, Bibliography, Index, Title Page
The CGAL Project. 22 January 1999.