Commit Graph

825 Commits

Author SHA1 Message Date
Sébastien Loriot a65be14cb1 update operator== for Sqrt_extension. I was only valid in case objects had the same extension. 2011-05-04 11:36:18 +00:00
Sébastien Loriot c8b96139c6 *GMP_arithmetic_kernel now always define Integer and Rational even when Gmpfi
is not available.

*Add default empty struct for Get_arithmetic_kernel. That way we can test if
a specialization is avaible. I used it for the default case of Root_of_traits.
When a number type not known by CGAL is used to instanciate Root_of_traits,
the field type used to instanciate Sqrt_extension is made using Quotient.

*Patch of Lazy_exact_nt constructor from another Lazy_exact_nt type.
In revision 61559, that constructor was retricted to the case the exact type
is implicitely constructed from the other exact type. Now the old behavior is
back but only if it is explicitely called (patch from Marc Glisse).

*Update To_double specialization of Sqrt_extension to use the same formula
than To_interval so that the double value is contained in the interval.

*update root_of_2 test-suite to use Sqrt_extension and that they behave
similarly
2011-05-04 07:32:31 +00:00
Sébastien Loriot 659dcd26b3 is_rational() from one_root_number is replaced by !is_extended() from Sqrt_extension 2011-05-02 10:13:35 +00:00
Sébastien Loriot 506aebdfd5 use forward declaration of Sqrt_extension (detected by a bug in Algebraic_kernel_d test-suite). 2011-05-02 09:45:02 +00:00
Sébastien Loriot 81f8f69ffe merge from next 2011-04-28 18:44:10 +00:00
Laurent Rineau 3c02e07b23 Try to fix my last revision about cmake_policy, with CMake-2.6.x
CMake gives an error if one tries to use cmake_policy(VERSION x.y.z) if
x.y.z is greater than the current CMake version.
2011-04-28 17:45:22 +00:00
Sébastien Loriot 9176663964 the lib now compiles.
move Get_arithmetic_kernel specialization into MP_Float.h
reorder declaration of to_double(Sqrt_extension<MP_Float>)

Sqrt_extension need specialization of Real_embeddable_traits
and Algebraic_structure_traits.
2011-04-28 16:44:00 +00:00
Laurent Rineau c97205f085 Global handling of CMake policies (second part)
We declare 
  cmake_minimum_required(VERSION 2.6.2)
but we also use
  cmake_policy(VERSION 2.8.4)
to declare that our CMake scripts are OK with all the defaults of CMake policies
as of CMake-2.8.4. That shuts down the warnings of CMake-2.8.4.

That way, we no longer need any declaration of specific policies.

Those two lines must be present and maintained in all our CMakeLists.txt
files (the one for the libraries, and also the one for examples and demos,
and maybe tests).
2011-04-28 10:55:56 +00:00
Laurent Rineau 0631943153 Uniform capitalization in our CMake script: use lowercase for commands 2011-04-28 10:36:18 +00:00
Sébastien Loriot b365ee3416 merge next into branch 2011-04-28 09:01:01 +00:00
Laurent Rineau ca5c92e034 Global maintenance of CMakeLists.txt: CMake minimal version is -2.6.2
The documentation of CGAL says that the minimal version of CMake must be
CMake-2.6.2.
  - change cmake_minimum_required to VERSION 2.6.2
  - no longer any need for the policy CMP0003 (was for 2.4.x)
  - no longer any need for CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS (was for 2.4)
2011-04-27 17:58:27 +00:00
Sébastien Loriot d5c2355419 merge the modification from experimental packages to
the candidate branch of the feature + few name bug fixes
2011-04-12 11:34:37 +00:00
Andreas Fabri bce0e8c4b4 Add sse2 based functions for fabs, min, and max 2011-04-01 14:01:17 +00:00
Andreas Fabri 58fcb7fd62 Add an implementation for fabs(double) that uses SSE2 intrinsics
It can be enabled by defining CGAL_USE_SSE2_FABS
2011-03-31 14:45:41 +00:00
Luis Peñaranda ff0beeac79 Added small comment on reference counting in Gmpfr reference manual.
Changed the calls mpfr_get_z_exp -> mpfr_get_z_2exp for MPFR>2 (the old
function name may be deprecated in future versions).
Added comments in the Gmpfr code about Gmpfr destructors.
Updated my mail address in source files.
2011-03-22 07:59:52 +00:00
Laurent Rineau 5030f1e929 Add macro CGAL_MSVC_USE_STD_FABS
On Windows, with MSVC, std::fabs is an intrinsic function with /Oi (implied
with /O1, /O2, and so on) *if* /fp:strict is not used. We should reevaluate
the need to use /fp:strict (and maybe use /fp:precise, the default,
combined with #pragma fenv_access).

First step: bench! This macro will help.
2011-03-21 10:27:07 +00:00
Andreas Fabri 7e3561ecb8 No need for BOOST_PREVENT_MACRO_SUBSTITUTION 2011-03-13 17:44:26 +00:00
Luis Peñaranda b0dc067936 Applied Alexander Kobel's patch to Gmpfi_type.h, to avoid loosing references
to the endpoints. This patch fixes a memory leak.
2011-03-10 12:12:30 +00:00
Marc Glisse 879c4eb81c Enable implicit Lazy_exact_nt conversions only if there exists an implicit
conversion between the exact types.

I'll add something similar for explicit conversions if required.
2011-03-08 10:27:31 +00:00
Eric Berberich 1df7c1c87f added missing include 2011-03-07 13:50:17 +00:00
Sébastien Loriot 8ce2048aea add #include<CGAL/config.h> before any directive CGAL_USE_* 2011-03-02 18:52:57 +00:00
Sébastien Loriot 42bb0cb07e revert unneeded commit 2011-02-28 17:02:19 +00:00
Sébastien Loriot a3d1cb41b1 change assertion for MSVC and Sun CC 2011-02-28 16:26:20 +00:00
Laurent Rineau da95064578 Update the \ccPkgHowToCiteCgal tag for CGAL-3.8 (2011). 2011-02-24 15:21:10 +00:00
Marc Glisse 23473bb1ff simplify/optimize 2011-02-24 12:35:04 +00:00
Sébastien Loriot a2cec87f46 replace remaing fabs in include files by CGAL::abs 2011-02-18 15:37:40 +00:00
Laurent Rineau bbfa01b928 Add a constructor of Gmpq from unsigned int.
(Note that Gmpq is not interoperable with unsigned int.)
2011-01-11 14:21:12 +00:00
Marc Glisse 92921b3a2a Fix istream>>Quotient at EOF 2010-12-20 20:48:26 +00:00
Sébastien Loriot caee29cb4a Inverse functor for Lazy_exact_nt based types 2010-11-08 14:52:56 +00:00
Michael Hemmer f89eaf1a8f add functor Inverse 2010-11-07 07:53:01 +00:00
Andreas Fabri 94ddbe6842 put fit_in_double(Lazy_exact_nt) in namespace 'internal' 2010-10-18 13:36:23 +00:00
Laurent Rineau 9277a77b72 Fix all svn:keywords in */include/ 2010-10-04 11:00:27 +00:00
Sébastien Loriot 7fad7427e6 typo 2010-09-27 08:52:41 +00:00
Sébastien Loriot 45610571a3 avoid warning on intel strict ansi (constant expression) 2010-09-27 06:47:26 +00:00
Sébastien Loriot d3c8d09655 add a simple function to test operator>> of CORE::Expr 2010-09-24 14:06:57 +00:00
Daniel Russel 973edb7abd add cctype for isspace 2010-09-20 17:36:42 +00:00
Sylvain Pion fe04258e2a Remove myself from maintainer files. 2010-09-15 12:32:09 +00:00
Andreas Fabri 43437dbfd7 Add an intermediate typedef so that static_assert compiles with VC10 2010-09-07 14:39:56 +00:00
Michael Hemmer 1e9ffa492f remove useless test about exactness for int 2010-09-01 08:59:20 +00:00
Michael Hemmer a21ca48e4a fix tag swap for is_exact and is_numerical_sensitve 2010-08-27 11:20:16 +00:00
Michael Hemmer 90592c6011 avoid constructions 2010-08-25 16:06:42 +00:00
Laurent Rineau 793f32ff96 Fix a compilation bug with recent Boost. test(NT) must be fully qualified:
::test.


The error message was:
/home/lrineau/CGAL/boost/1.44-beta1/include/boost/type_traits/has_new_operator.hpp: In function 'int main()':
/home/lrineau/CGAL/boost/1.44-beta1/include/boost/type_traits/has_new_operator.hpp:24: error: 'template<class U, U x> struct boost::detail::test' is not a function,
/home/lrineau/CGAL/CGAL-3.7-I-139/cmake/platforms/x86-64_Linux-2.6_g++-4.4.4_F13/test/Number_types/to_interval_test.cpp:30: error:   conflict with 'template<class NT> void test(const NT&)'
/home/lrineau/CGAL/CGAL-3.7-I-139/cmake/platforms/x86-64_Linux-2.6_g++-4.4.4_F13/test/Number_types/to_interval_test.cpp:73: error:   in call to 'test'
2010-08-19 12:05:16 +00:00
Laurent Rineau 1ca243eaa3 Merge:
| ------------------------------------------------------------------------
  | r58141 | lrineau | 2010-08-18 15:08:04 +0200 (Wed, 18 Aug 2010) | 5 lines
  | Changed paths:
  |    M /branches/CGAL-3.7-branch/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Float_traits.h
  |    M /branches/CGAL-3.7-branch/Number_types/include/CGAL/CORE_BigFloat.h
  | 
  | Fix the "bug" of CORE-1.7 in 64 bits. The bug was actually in CGAL
  | Number_types and Algebraic_kernel_d! The basis of CORE::BigFloat is not
  | 2^14: it is 2^CORE::CHUNK_BIT. CORE::CHUNK_BIT is 14 in 32 bits, but *30*
  | in 64 bits!
  | 
  | ------------------------------------------------------------------------

Update: See revision 58145. 
  -- Laurent Rineau Wed Aug 18 16:26:15 CEST 2010
2010-08-18 13:48:03 +00:00
Sylvain Pion ce7e20980a Refine error message for Intel compiler. 2010-08-13 13:26:35 +00:00
Marc Glisse c404653478 Use accessors. By the way, I don't understand why inf() and sup() return
a const double&: it's not like double is so large we can't return it by
value.
2010-08-11 12:05:28 +00:00
Michael Hemmer c42d61581d fix problem with x86-64_Linux-2.6_g++-4.4.0_F13 2010-08-10 09:32:01 +00:00
Sylvain Pion ee8454ad5b interval_support.cpp is not longer in this directory. 2010-08-10 09:02:13 +00:00
Sylvain Pion f20f2f45c5 Qualify calls to min/max with CGAL:: to avoid ambiguity with std::min/max. 2010-08-10 08:55:55 +00:00
Sylvain Pion 7e8a50b7ae Qualify to avoid ADL issue with boost::detail::test. 2010-08-10 08:49:17 +00:00
Sébastien Loriot c55460707b typos 2010-08-06 14:47:44 +00:00