From 73c96b99f14d4b2a353e0ffc8111c36fca3f854b Mon Sep 17 00:00:00 2001 From: Michael Hemmer Date: Wed, 10 Dec 2008 12:47:02 +0000 Subject: [PATCH] more precise text about precision and rounding mode --- Modular_arithmetic/doc_tex/Modular_arithmetic/main.tex | 8 ++++---- .../doc_tex/Modular_arithmetic_ref/Residue.tex | 7 ++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Modular_arithmetic/doc_tex/Modular_arithmetic/main.tex b/Modular_arithmetic/doc_tex/Modular_arithmetic/main.tex index 72a1607004d..a88f0575aa6 100644 --- a/Modular_arithmetic/doc_tex/Modular_arithmetic/main.tex +++ b/Modular_arithmetic/doc_tex/Modular_arithmetic/main.tex @@ -29,8 +29,9 @@ Please note that the implementation of class \ccc{CGAL::Residue} requires a mant precision according to the IEEE Standard for Floating-Point Arithmetic (IEEE 754). However, on some processors the traditional FPU uses an extended precision. Hence, it is indispensable that the proper mantissa length is enforced before performing -any arithmetic operations. For instance you may use \ccc{CGAL::Protect_FPU_rounding} with -\ccc{CGAL_FE_TONEAREST}, which enforces the required precision as a side effect. +any arithmetic operations. Moreover, it is required that numbers are rounded to the +next nearest value. This can be ensured using \ccc{CGAL::Protect_FPU_rounding} with +\ccc{CGAL_FE_TONEAREST}, which also enforces the required precision as a side effect. \begin{ccAdvanced} In case the flag \ccc{CGAL_HAS_THREADS} @@ -67,5 +68,4 @@ The class \ccc{CGAL::Residue} is based on the C-code of Sylvain Pion et. al. as it was presented in \cite{bepp-sdrns-99}. The remaining part of the package is the result of the integration process -of the NumeriX library of EXACUS \cite{beh+-eeeafcs-05} into CGAL. - +of the NumeriX library of EXACUS \cite{beh+-eeeafcs-05} into CGAL. \ No newline at end of file diff --git a/Modular_arithmetic/doc_tex/Modular_arithmetic_ref/Residue.tex b/Modular_arithmetic/doc_tex/Modular_arithmetic_ref/Residue.tex index 02dee56c3fd..a5d4ff4ac2e 100644 --- a/Modular_arithmetic/doc_tex/Modular_arithmetic_ref/Residue.tex +++ b/Modular_arithmetic/doc_tex/Modular_arithmetic_ref/Residue.tex @@ -17,13 +17,14 @@ old prime and can be reused after restoring the old prime. Since the type is based on double arithmetic the prime is restricted to values less than $2^{26}$. The initial value of $p$ is 67111067. - + Please note that the implementation of class \ccc{CGAL::Residue} requires a mantissa precision according to the IEEE Standard for Floating-Point Arithmetic (IEEE 754). However, on some processors the traditional FPU uses an extended precision. Hence, it is indispensable that the proper mantissa length is enforced before performing -any arithmetic operations. For instance you may use \ccc{CGAL::Protect_FPU_rounding} with -\ccc{CGAL_FE_TONEAREST}, which enforces the required precision as a side effect. +any arithmetic operations. Moreover, it is required that numbers are rounded to the +next nearest value. This can be ensured using \ccc{CGAL::Protect_FPU_rounding} with +\ccc{CGAL_FE_TONEAREST}, which also enforces the required precision as a side effect. In case the flag \ccc{CGAL_HAS_THREADS} is undefined the prime is just stored in a static member