7 // SWIG file for floating point operations
 
  11  * Revision 1.1  2002/04/29 19:56:49  RD
 
  12  * Since I have made several changes to SWIG over the years to accomodate
 
  13  * special cases and other things in wxPython, and since I plan on making
 
  14  * several more, I've decided to put the SWIG sources in wxPython's CVS
 
  15  * instead of relying on maintaining patches.  This effectivly becomes a
 
  16  * fork of an obsolete version of SWIG, :-( but since SWIG 1.3 still
 
  17  * doesn't have some things I rely on in 1.1, not to mention that my
 
  18  * custom patches would all have to be redone, I felt that this is the
 
  19  * easier road to take.
 
  21  * Revision 1.1.1.1  1999/02/28 02:00:53  beazley
 
  24  * Revision 1.1  1996/05/22 17:27:01  beazley
 
  34 %section "SWIG Math Module",after,info,nosort,pre,chop_left=3,chop_bottom=0,chop_top=0,chop_right=0,skip=1
 
  39 This module provides access to the C math library and contains most
 
  40 of the functions in <math.h>.  Most scripting languages already provide
 
  41 math support, but in certain cases, this module can provide more
 
  45 %subsection "Functions"
 
  48 extern double   cos(double x);
 
  51 extern double   sin(double x);
 
  54 extern double   tan(double x);
 
  57 extern double   acos(double x);
 
  58 /* Inverse cosine in range [-PI/2,PI/2], x in [-1,1]. */
 
  60 extern double   asin(double x);
 
  61 /* Inverse sine in range [0,PI], x in [-1,1]. */
 
  63 extern double   atan(double x);
 
  64 /* Inverse tangent in range [-PI/2,PI/2]. */
 
  66 extern double   atan2(double y, double x);
 
  67 /* Inverse tangent of y/x in range [-PI,PI]. */
 
  69 extern double   cosh(double x);
 
  70 /* Hyperbolic cosine of x */
 
  72 extern double   sinh(double x);
 
  73 /* Hyperbolic sine of x */
 
  75 extern double   tanh(double x);
 
  76 /* Hyperbolic tangent of x */
 
  78 extern double   exp(double x);
 
  79 /* Natural exponential function e^x */
 
  81 extern double   log(double x);
 
  82 /* Natural logarithm ln(x), x > 0 */
 
  84 extern double   log10(double x);
 
  85 /* Base 10 logarithm, x > 0 */
 
  87 extern double   pow(double x, double y);
 
  88 /* Power function x^y. */
 
  90 extern double   sqrt(double x);
 
  91 /* Square root. x >= 0 */
 
  93 extern double   fabs(double x);
 
  94 /* Absolute value of x */
 
  96 extern double   ceil(double x);
 
  97 /* Smallest integer not less than x, as a double */
 
  99 extern double   floor(double x);
 
 100 /* Largest integer not greater than x, as a double */
 
 102 extern double   fmod(double x, double y);
 
 103 /* Floating-point remainder of x/y, with the same sign as x. */
 
 105 %subsection "Mathematical constants",noinfo
 
 107 #define M_E             2.7182818284590452354
 
 108 #define M_LOG2E         1.4426950408889634074
 
 109 #define M_LOG10E        0.43429448190325182765
 
 110 #define M_LN2           0.69314718055994530942
 
 111 #define M_LN10          2.30258509299404568402
 
 112 #define M_PI            3.14159265358979323846
 
 113 #define M_PI_2          1.57079632679489661923
 
 114 #define M_PI_4          0.78539816339744830962
 
 115 #define M_1_PI          0.31830988618379067154
 
 116 #define M_2_PI          0.63661977236758134308
 
 117 #define M_2_SQRTPI      1.12837916709551257390
 
 118 #define M_SQRT2         1.41421356237309504880
 
 119 #define M_SQRT1_2       0.70710678118654752440