Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

doubles.h

Go to the documentation of this file.
00001 /* -*- mode: C++; c-file-style: "stroustrup"; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
00002 /*********************************************************************
00003  *
00004  * Filename : doubles.h
00005  *
00006  * Basic stuff on doubles.
00007  *
00008  * This file is a part of the UPPAAL toolkit.
00009  * Copyright (c) 1995 - 2003, Uppsala University and Aalborg University.
00010  * All right reserved.
00011  *
00012  * $Id: doubles.h,v 1.2 2005/06/20 16:27:03 adavid Exp $
00013  *
00014  *********************************************************************/
00015 
00016 #ifndef INCLUDE_BASE_DOUBLES_H
00017 #define INCLUDE_BASE_DOUBLES_H
00018 
00019 #include <float.h>
00020 
00021 /* Epsilon */
00022 #define base_EPSILON (DBL_EPSILON*10)
00023 
00024 /* Comparisons between doubles with epsilon error */
00025 
00026 #define IS_GT(X,Y) ((X) > (Y)+base_EPSILON)
00027 #define IS_LT(X,Y) ((X) < (Y)-base_EPSILON)
00028 #define IS_GE(X,Y) ((X) > (Y)-base_EPSILON)
00029 #define IS_LE(X,Y) ((X) < (Y)+base_EPSILON)
00030 #define IS_EQ(X,Y) (IS_GE(X,Y) && IS_LE(X,Y))
00031 
00032 #endif // INCLUDE_BASE_DOUBLES_H

Generated on Fri Jun 30 00:02:30 2006 for Module base by  doxygen 1.4.2