lemon/math.h
changeset 68 a315a588a20d
child 209 765619b7cbb2
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/lemon/math.h	Thu Feb 07 22:25:42 2008 +0000
     1.3 @@ -0,0 +1,63 @@
     1.4 +/* -*- C++ -*-
     1.5 + *
     1.6 + * This file is a part of LEMON, a generic C++ optimization library
     1.7 + *
     1.8 + * Copyright (C) 2003-2008
     1.9 + * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    1.10 + * (Egervary Research Group on Combinatorial Optimization, EGRES).
    1.11 + *
    1.12 + * Permission to use, modify and distribute this software is granted
    1.13 + * provided that this copyright notice appears in all copies. For
    1.14 + * precise terms see the accompanying LICENSE file.
    1.15 + *
    1.16 + * This software is provided "AS IS" with no warranty of any kind,
    1.17 + * express or implied, and with no claim as to its suitability for any
    1.18 + * purpose.
    1.19 + *
    1.20 + */
    1.21 +
    1.22 +#ifndef LEMON_MATH_H
    1.23 +#define LEMON_MATH_H
    1.24 +
    1.25 +///\ingroup misc
    1.26 +///\file
    1.27 +///\brief Some extensions to the standard \c cmath library.
    1.28 +///
    1.29 +///Some extensions to the standard \c cmath library.
    1.30 +///
    1.31 +///This file includes the standard math library (cmath).
    1.32 +
    1.33 +#include<cmath>
    1.34 +
    1.35 +namespace lemon {
    1.36 +
    1.37 +  /// \addtogroup misc
    1.38 +  /// @{
    1.39 +  
    1.40 +  /// The Euler constant
    1.41 +  const long double E       = 2.7182818284590452353602874713526625L;
    1.42 +  /// log_2(e)
    1.43 +  const long double LOG2E   = 1.4426950408889634073599246810018921L;
    1.44 +  /// log_10(e)
    1.45 +  const long double LOG10E  = 0.4342944819032518276511289189166051L;
    1.46 +  /// ln(2)
    1.47 +  const long double LN2     = 0.6931471805599453094172321214581766L;
    1.48 +  /// ln(10)
    1.49 +  const long double LN10    = 2.3025850929940456840179914546843642L;
    1.50 +  /// pi
    1.51 +  const long double PI      = 3.1415926535897932384626433832795029L;
    1.52 +  /// pi/2
    1.53 +  const long double PI_2    = 1.5707963267948966192313216916397514L;
    1.54 +  /// pi/4
    1.55 +  const long double PI_4    = 0.7853981633974483096156608458198757L;
    1.56 +  /// sqrt(2)
    1.57 +  const long double SQRT2   = 1.4142135623730950488016887242096981L;
    1.58 +  /// 1/sqrt(2)
    1.59 +  const long double SQRT1_2 = 0.7071067811865475244008443621048490L;
    1.60 +  
    1.61 +
    1.62 +  /// @}
    1.63 +
    1.64 +} //namespace lemon
    1.65 +
    1.66 +#endif //LEMON_TOLERANCE_H