This commit was generated by cvs2svn to compensate for changes in r417,

which included commits to RCS files with non-trunk default branches.
This commit is contained in:
Sylvain Pion 1998-08-14 11:32:48 +00:00
parent fc9c84c747
commit d76b1fdd02
3 changed files with 16 additions and 19 deletions

View File

@ -12,8 +12,8 @@
// release_date : // release_date :
// //
// file : include/CGAL/Interval_arithmetic.h // file : include/CGAL/Interval_arithmetic.h
// revision : 1.2 // revision : 1.3
// revision_date : 16 December 1997 // revision_date : 6 February 1998
// author(s) : Sylvain Pion <Sylvain.Pion@sophia.inria.fr> // author(s) : Sylvain Pion <Sylvain.Pion@sophia.inria.fr>
// //
// coordinator : INRIA Sophia-Antipolis (<Herve.Bronnimann@sophia.inria.fr>) // coordinator : INRIA Sophia-Antipolis (<Herve.Bronnimann@sophia.inria.fr>)
@ -24,14 +24,6 @@
// - CGAL_Interval_nt_advanced (do the FPU tricks yourself) // - CGAL_Interval_nt_advanced (do the FPU tricks yourself)
// - CGAL_Interval_nt (derived from the other one) // - CGAL_Interval_nt (derived from the other one)
/*
* TODO:
* - get/set FPU rounding modes.
* - Check_assertions, when it's needed.
* - don't force (check if it's ok) the precision: long doubles internally
* are great !
*/
#ifndef CGAL_INTERVAL_ARITHMETIC_H #ifndef CGAL_INTERVAL_ARITHMETIC_H
#define CGAL_INTERVAL_ARITHMETIC_H #define CGAL_INTERVAL_ARITHMETIC_H
@ -49,7 +41,9 @@ public:
inline CGAL_Interval_nt_advanced(double i, double s) inline CGAL_Interval_nt_advanced(double i, double s)
{ {
// Check assertion i<=s. #ifndef CGAL_NO_PRECONDITIONS
assert(i<=s);
#endif
inf = -i; sup = s; inf = -i; sup = s;
} }
@ -214,12 +208,12 @@ public:
inline bool operator==(const CGAL_Interval_nt_advanced& d) const inline bool operator==(const CGAL_Interval_nt_advanced& d) const
{ {
return (inf>=d.inf && sup>=-d.inf) || (d.inf>=inf && d.sup>=-inf); return !(*this != d);
} }
inline bool operator!=(const CGAL_Interval_nt_advanced& d) const inline bool operator!=(const CGAL_Interval_nt_advanced& d) const
{ {
return !(*this == d); return (*this < d) || (d < *this);
} }
inline bool operator<(const CGAL_Interval_nt_advanced& d) const inline bool operator<(const CGAL_Interval_nt_advanced& d) const
@ -229,7 +223,7 @@ public:
inline bool operator>(const CGAL_Interval_nt_advanced& d) const inline bool operator>(const CGAL_Interval_nt_advanced& d) const
{ {
return (-inf > d.sup); return (d.sup < -inf);
} }
inline bool operator<=(const CGAL_Interval_nt_advanced& d) const inline bool operator<=(const CGAL_Interval_nt_advanced& d) const
@ -253,7 +247,7 @@ public:
} }
protected: protected:
// "inf" stores the opposite of the inferior bound. // "inf" stores the __opposite__ of the inferior bound.
// "sup" stores the upper bound of the interval. // "sup" stores the upper bound of the interval.
double inf, sup; double inf, sup;
}; };

View File

@ -12,8 +12,8 @@
// release_date : // release_date :
// //
// file : include/CGAL/_FPU.h // file : include/CGAL/_FPU.h
// revision : 1.2 // revision : 1.3
// revision_date : 16 December 1997 // revision_date : 6 February 1998
// author(s) : Sylvain Pion <Sylvain.Pion@sophia.inria.fr> // author(s) : Sylvain Pion <Sylvain.Pion@sophia.inria.fr>
// //
// coordinator : INRIA Sophia-Antipolis (<Herve.Bronnimann@sophia.inria.fr>) // coordinator : INRIA Sophia-Antipolis (<Herve.Bronnimann@sophia.inria.fr>)
@ -29,6 +29,9 @@
* *
* I try to make it work with gcc/g++/cc/CC. * I try to make it work with gcc/g++/cc/CC.
* And I also try to provide the equivalent assembly code for GNU C. * And I also try to provide the equivalent assembly code for GNU C.
*
* TODO: Check the exception flags, according to Christoph's remarks/code.
* (ie should we erase all, should we save&restore, etc...)
*/ */
#if defined(__osf__) #if defined(__osf__)
@ -249,4 +252,4 @@ static inline void _FPU_set_rounding_to_minus_infinity (void)
#endif #endif
} }
#endif #endif /* _FPU_H */

View File

@ -1 +1 @@
1.2 (16 Dec 97) 1.3 (16 Dec 97)