mirror of https://github.com/CGAL/cgal
39 lines
1.2 KiB
C
39 lines
1.2 KiB
C
// ============================================================================
|
|
//
|
|
// Copyright (c) 1998 The CGAL Consortium
|
|
//
|
|
// This software and related documentation is part of an INTERNAL release
|
|
// of the Computational Geometry Algorithms Library (CGAL). It is not
|
|
// intended for general use.
|
|
//
|
|
// ----------------------------------------------------------------------------
|
|
//
|
|
// release :
|
|
// release_date :
|
|
//
|
|
// file : include/CGAL/Interval_arithmetic/IA_Gmpz.h
|
|
// revision : $Revision$
|
|
// revision_date : $Date$
|
|
// package : Interval Arithmetic
|
|
// author(s) : Sylvain Pion <Sylvain.Pion@sophia.inria.fr>
|
|
//
|
|
// coordinator : INRIA Sophia-Antipolis (<Mariette.Yvinec@sophia.inria.fr>)
|
|
//
|
|
// ============================================================================
|
|
|
|
#ifndef CGAL_IA_GMPZ_H
|
|
#define CGAL_IA_GMPZ_H
|
|
|
|
// We choose the lazy approach, which is good enough: we take the double
|
|
// approximation, which is guaranted 1 bit error max, and return an interval
|
|
// around this value.
|
|
|
|
inline CGAL_Interval_nt_advanced CGAL_to_Interval_nt_advanced
|
|
(const CGAL_Gmpz &z)
|
|
{
|
|
return CGAL_Interval_nt_advanced (CGAL_to_double(z)) +
|
|
CGAL_Interval_nt_advanced::smallest;
|
|
}
|
|
|
|
#endif // CGAL_IA_GMPZ_H
|