Geogram  Version 1.8.9-rc
A programming library of geometric algorithms
multi_precision.h File Reference

Implementation of multi-precision arithmetics. More...

#include <geogram/basic/common.h>
#include <geogram/basic/numeric.h>
#include <geogram/basic/memory.h>
#include <geogram/basic/assert.h>
#include <iostream>
#include <sstream>
#include <new>
#include <math.h>

Go to the source code of this file.

Classes

class  GEO::expansion
 Represents numbers in arbitrary precision with a low-level API. More...
 

Namespaces

 GEO
 Global Vorpaline namespace.
 

Functions

Sign GEO::sign_of_expansion_determinant (const expansion &a00, const expansion &a01, const expansion &a10, const expansion &a11)
 Computes the sign of a 2x2 determinant. More...
 
Sign GEO::sign_of_expansion_determinant (const expansion &a00, const expansion &a01, const expansion &a02, const expansion &a10, const expansion &a11, const expansion &a12, const expansion &a20, const expansion &a21, const expansion &a22)
 Computes the sign of a 3x3 determinant. More...
 
Sign GEO::sign_of_expansion_determinant (const expansion &a00, const expansion &a01, const expansion &a02, const expansion &a03, const expansion &a10, const expansion &a11, const expansion &a12, const expansion &a13, const expansion &a20, const expansion &a21, const expansion &a22, const expansion &a23, const expansion &a30, const expansion &a31, const expansion &a32, const expansion &a33)
 Computes the sign of a 4x4 determinant. More...
 
void GEO::grow_expansion_zeroelim (const expansion &e, double b, expansion &h)
 Adds a scalar to an expansion, eliminating zero components from the output expansion. More...
 
void GEO::scale_expansion_zeroelim (const expansion &e, double b, expansion &h)
 Multiplies an expansion by a scalar, eliminating zero components from the output expansion. More...
 
void GEO::fast_expansion_sum_zeroelim (const expansion &e, const expansion &f, expansion &h)
 Sums two expansions, eliminating zero components from the output expansion (sets h = e + f). More...
 
void GEO::fast_expansion_diff_zeroelim (const expansion &e, const expansion &f, expansion &h)
 Computes the difference of two expansions, eliminating zero components from the output expansion. More...
 

Variables

double GEO::expansion_splitter_
 
double GEO::expansion_epsilon_
 

Detailed Description

Implementation of multi-precision arithmetics.

Multi-precision arithmetics based on expansions, as described by Jonathan Shewchuk in: Adaptive Precision Floating-Point Arithmetic and Fast Robust Geometric Predicates, Discrete & Computational Geometry 18(3):305-363, October 1997

Definition in file multi_precision.h.