annotate lib/swig/swigwin-2.0.11/Lib/math.i @ 2346:37bb43874e59

Слияние
author Ritor1
date Mon, 07 Apr 2014 19:15:31 +0600
parents b3009adc0e2f
children
rev   line source
1899
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1 /* -----------------------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2 * math.i
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
3 *
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
4 * SWIG library file for floating point operations.
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
5 * ----------------------------------------------------------------------------- */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
6
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
7 %module math
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
8 %{
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
9 #include <math.h>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
10 %}
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
11
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
12 extern double cos(double x);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
13 /* Cosine of x */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
14
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
15 extern double sin(double x);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
16 /* Sine of x */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
17
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
18 extern double tan(double x);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
19 /* Tangent of x */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
20
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
21 extern double acos(double x);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
22 /* Inverse cosine in range [-PI/2,PI/2], x in [-1,1]. */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
23
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
24 extern double asin(double x);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
25 /* Inverse sine in range [0,PI], x in [-1,1]. */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
26
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
27 extern double atan(double x);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
28 /* Inverse tangent in range [-PI/2,PI/2]. */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
29
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
30 extern double atan2(double y, double x);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
31 /* Inverse tangent of y/x in range [-PI,PI]. */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
32
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
33 extern double cosh(double x);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
34 /* Hyperbolic cosine of x */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
35
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
36 extern double sinh(double x);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
37 /* Hyperbolic sine of x */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
38
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
39 extern double tanh(double x);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
40 /* Hyperbolic tangent of x */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
41
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
42 extern double exp(double x);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
43 /* Natural exponential function e^x */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
44
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
45 extern double log(double x);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
46 /* Natural logarithm ln(x), x > 0 */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
47
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
48 extern double log10(double x);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
49 /* Base 10 logarithm, x > 0 */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
50
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
51 extern double pow(double x, double y);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
52 /* Power function x^y. */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
53
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
54 extern double sqrt(double x);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
55 /* Square root. x >= 0 */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
56
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
57 extern double fabs(double x);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
58 /* Absolute value of x */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
59
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
60 extern double ceil(double x);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
61 /* Smallest integer not less than x, as a double */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
62
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
63 extern double floor(double x);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
64 /* Largest integer not greater than x, as a double */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
65
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
66 extern double fmod(double x, double y);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
67 /* Floating-point remainder of x/y, with the same sign as x. */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
68
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
69 #define M_E 2.7182818284590452354
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
70 #define M_LOG2E 1.4426950408889634074
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
71 #define M_LOG10E 0.43429448190325182765
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
72 #define M_LN2 0.69314718055994530942
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
73 #define M_LN10 2.30258509299404568402
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
74 #define M_PI 3.14159265358979323846
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
75 #define M_PI_2 1.57079632679489661923
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
76 #define M_PI_4 0.78539816339744830962
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
77 #define M_1_PI 0.31830988618379067154
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
78 #define M_2_PI 0.63661977236758134308
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
79 #define M_2_SQRTPI 1.12837916709551257390
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
80 #define M_SQRT2 1.41421356237309504880
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
81 #define M_SQRT1_2 0.70710678118654752440
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
82