staticforward Py_complex c_sqrt();
-static Py_complex c_acos(x)
- Py_complex x;
+static Py_complex c_acos(Py_complex x)
{
return c_neg(c_prodi(c_log(c_sum(x,c_prod(c_i,
c_sqrt(c_diff(c_1,c_prod(x,x))))))));
Return the arc cosine of x.";
-static Py_complex c_acosh(x)
- Py_complex x;
+static Py_complex c_acosh(Py_complex x)
{
Py_complex z;
z = c_sqrt(c_half);
Return the hyperbolic arccosine of x.";
-static Py_complex c_asin(x)
- Py_complex x;
+static Py_complex c_asin(Py_complex x)
{
Py_complex z;
z = c_sqrt(c_half);
Return the arc sine of x.";
-static Py_complex c_asinh(x)
- Py_complex x;
+static Py_complex c_asinh(Py_complex x)
{
/* Break up long expression for WATCOM */
Py_complex z;
Return the hyperbolic arc sine of x.";
-static Py_complex c_atan(x)
- Py_complex x;
+static Py_complex c_atan(Py_complex x)
{
return c_prod(c_i2,c_log(c_quot(c_sum(c_i,x),c_diff(c_i,x))));
}
Return the arc tangent of x.";
-static Py_complex c_atanh(x)
- Py_complex x;
+static Py_complex c_atanh(Py_complex x)
{
return c_prod(c_half,c_log(c_quot(c_sum(c_1,x),c_diff(c_1,x))));
}
Return the hyperbolic arc tangent of x.";
-static Py_complex c_cos(x)
- Py_complex x;
+static Py_complex c_cos(Py_complex x)
{
Py_complex r;
r.real = cos(x.real)*cosh(x.imag);
Return the cosine of x.";
-static Py_complex c_cosh(x)
- Py_complex x;
+static Py_complex c_cosh(Py_complex x)
{
Py_complex r;
r.real = cos(x.imag)*cosh(x.real);
Return the hyperbolic cosine of x.";
-static Py_complex c_exp(x)
- Py_complex x;
+static Py_complex c_exp(Py_complex x)
{
Py_complex r;
double l = exp(x.real);
Return the exponential value e**x.";
-static Py_complex c_log(x)
- Py_complex x;
+static Py_complex c_log(Py_complex x)
{
Py_complex r;
double l = hypot(x.real,x.imag);
Return the natural logarithm of x.";
-static Py_complex c_log10(x)
- Py_complex x;
+static Py_complex c_log10(Py_complex x)
{
Py_complex r;
double l = hypot(x.real,x.imag);
/* internal function not available from Python */
-static Py_complex c_prodi(x)
- Py_complex x;
+static Py_complex c_prodi(Py_complex x)
{
Py_complex r;
r.real = -x.imag;
}
-static Py_complex c_sin(x)
- Py_complex x;
+static Py_complex c_sin(Py_complex x)
{
Py_complex r;
r.real = sin(x.real)*cosh(x.imag);
Return the sine of x.";
-static Py_complex c_sinh(x)
- Py_complex x;
+static Py_complex c_sinh(Py_complex x)
{
Py_complex r;
r.real = cos(x.imag)*sinh(x.real);
Return the hyperbolic sine of x.";
-static Py_complex c_sqrt(x)
- Py_complex x;
+static Py_complex c_sqrt(Py_complex x)
{
Py_complex r;
double s,d;
Return the square root of x.";
-static Py_complex c_tan(x)
- Py_complex x;
+static Py_complex c_tan(Py_complex x)
{
Py_complex r;
double sr,cr,shi,chi;
Return the tangent of x.";
-static Py_complex c_tanh(x)
- Py_complex x;
+static Py_complex c_tanh(Py_complex x)
{
Py_complex r;
double si,ci,shr,chr;
}
static PyObject *
-math_1(args, func)
- PyObject *args;
- Py_complex (*func)(Py_complex);
+math_1(PyObject *args, Py_complex (*func)(Py_complex))
{
Py_complex x;
if (!PyArg_ParseTuple(args, "D", &x))
}
#define FUNC1(stubname, func) \
- static PyObject * stubname(self, args) PyObject *self, *args; { \
+ static PyObject * stubname(PyObject *self, PyObject *args) { \
return math_1(args, func); \
}