# HG changeset patch
# User Alpar Juttner <alpar@cs.elte.hu>
# Date 1202423618 0
# Node ID 914ffb9b3798b0aafe2647aa62f190e5480e5092
# Parent  9de02aa380deef0eaa8604d0f6dace8bd3e39499# Parent  a315a588a20d2754c0789feca235ddfc14ef0cc3
Merge

diff -r 9de02aa380de -r 914ffb9b3798 lemon/Makefile.am
--- a/lemon/Makefile.am	Thu Feb 07 21:23:23 2008 +0000
+++ b/lemon/Makefile.am	Thu Feb 07 22:33:38 2008 +0000
@@ -20,6 +20,7 @@
 	lemon/error.h \
 	lemon/list_graph.h \
 	lemon/maps.h \
+	lemon/math.h \
         lemon/random.h \
         lemon/tolerance.h
 
diff -r 9de02aa380de -r 914ffb9b3798 lemon/math.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lemon/math.h	Thu Feb 07 22:33:38 2008 +0000
@@ -0,0 +1,63 @@
+/* -*- C++ -*-
+ *
+ * This file is a part of LEMON, a generic C++ optimization library
+ *
+ * Copyright (C) 2003-2008
+ * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
+ * (Egervary Research Group on Combinatorial Optimization, EGRES).
+ *
+ * Permission to use, modify and distribute this software is granted
+ * provided that this copyright notice appears in all copies. For
+ * precise terms see the accompanying LICENSE file.
+ *
+ * This software is provided "AS IS" with no warranty of any kind,
+ * express or implied, and with no claim as to its suitability for any
+ * purpose.
+ *
+ */
+
+#ifndef LEMON_MATH_H
+#define LEMON_MATH_H
+
+///\ingroup misc
+///\file
+///\brief Some extensions to the standard \c cmath library.
+///
+///Some extensions to the standard \c cmath library.
+///
+///This file includes the standard math library (cmath).
+
+#include<cmath>
+
+namespace lemon {
+
+  /// \addtogroup misc
+  /// @{
+  
+  /// The Euler constant
+  const long double E       = 2.7182818284590452353602874713526625L;
+  /// log_2(e)
+  const long double LOG2E   = 1.4426950408889634073599246810018921L;
+  /// log_10(e)
+  const long double LOG10E  = 0.4342944819032518276511289189166051L;
+  /// ln(2)
+  const long double LN2     = 0.6931471805599453094172321214581766L;
+  /// ln(10)
+  const long double LN10    = 2.3025850929940456840179914546843642L;
+  /// pi
+  const long double PI      = 3.1415926535897932384626433832795029L;
+  /// pi/2
+  const long double PI_2    = 1.5707963267948966192313216916397514L;
+  /// pi/4
+  const long double PI_4    = 0.7853981633974483096156608458198757L;
+  /// sqrt(2)
+  const long double SQRT2   = 1.4142135623730950488016887242096981L;
+  /// 1/sqrt(2)
+  const long double SQRT1_2 = 0.7071067811865475244008443621048490L;
+  
+
+  /// @}
+
+} //namespace lemon
+
+#endif //LEMON_TOLERANCE_H
diff -r 9de02aa380de -r 914ffb9b3798 lemon/random.h
--- a/lemon/random.h	Thu Feb 07 21:23:23 2008 +0000
+++ b/lemon/random.h	Thu Feb 07 22:33:38 2008 +0000
@@ -67,9 +67,10 @@
 #include <vector>
 
 #include <ctime>
-#include <cmath>
 
+#include <lemon/math.h>
 #include <lemon/dim2.h>
+
 ///\ingroup misc
 ///\file
 ///\brief Mersenne Twister random number generator
@@ -759,7 +760,7 @@
     {
       double xi,nu;
       const double delta = k-std::floor(k);
-      const double v0=M_E/(M_E-delta);
+      const double v0=E/(E-delta);
       do {
 	double V0=1.0-real<double>();
 	double V1=1.0-real<double>();