copasi API  0.1
copasi/mathematics.h
Go to the documentation of this file.
00001 /* Begin CVS Header
00002    $Source: /fs/turing/cvs/copasi_dev/copasi/mathematics.h,v $
00003    $Revision: 1.7 $
00004    $Name: Build-33 $
00005    $Author: shoops $
00006    $Date: 2006/04/27 01:34:21 $
00007    End CVS Header */
00008 
00009 // Copyright © 2005 by Pedro Mendes, Virginia Tech Intellectual
00010 // Properties, Inc. and EML Research, gGmbH.
00011 // All rights reserved.
00012 
00013 #ifndef COPASI_mathematics
00014 #define COPASI_mathematics
00015 
00016 #include <math.h>
00017 #ifndef M_PI
00018 #define M_PI           3.14159265358979323846  /* pi */
00019 #endif
00020 #ifndef M_E
00021 #define M_E            2.7182818284590452354   /* e */
00022 #endif
00023 
00024 #ifdef WIN32 // These are not part of ANSI C and Visual C++ 6.0 misses them.
00025 
00026 #ifndef CYGWIN
00027 static inline double asinh(double value)
00028 {return log(value + sqrt(value * value + 1.0));}
00029 
00030 static inline double acosh(double value)
00031 {return log(value + sqrt(value * value - 1.0));}
00032 
00033 static inline double atanh(double value)
00034 {return (.5 * log((1.0 + value) / (1.0 - value)));}
00035 #endif //CYGWIN
00036 
00037 #endif // WIN32
00038 
00039 #endif // COPASI_mathematics
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines