summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-02-20 20:36:38 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-02-20 20:36:38 (GMT)
commit8cb82bd5fb91ab45b24d863f89947b67c9839af5 (patch)
treea9eb90d593ac1ba9e47f4c0e0dec11edfd4e584f /Modules
parent14e26408f357b7ded82808a9454a85089ef1b1b0 (diff)
downloadcpython-8cb82bd5fb91ab45b24d863f89947b67c9839af5.zip
cpython-8cb82bd5fb91ab45b24d863f89947b67c9839af5.tar.gz
cpython-8cb82bd5fb91ab45b24d863f89947b67c9839af5.tar.bz2
Rename some constants for easier readability.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/cmathmodule.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/Modules/cmathmodule.c b/Modules/cmathmodule.c
index 839e069..cc7b1f0 100644
--- a/Modules/cmathmodule.c
+++ b/Modules/cmathmodule.c
@@ -24,10 +24,10 @@
/* First, the C functions that do the real work */
/* constants */
-static Py_complex c_1 = {1., 0.};
+static Py_complex c_one = {1., 0.};
static Py_complex c_half = {0.5, 0.};
static Py_complex c_i = {0., 1.};
-static Py_complex c_i2 = {0., 0.5};
+static Py_complex c_halfi = {0., 0.5};
/* forward declarations */
staticforward Py_complex c_log(Py_complex);
@@ -39,7 +39,7 @@ 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))))))));
+ c_sqrt(c_diff(c_one,c_prod(x,x))))))));
}
static char c_acos_doc[] =
@@ -53,8 +53,8 @@ c_acosh(Py_complex x)
{
Py_complex z;
z = c_sqrt(c_half);
- z = c_log(c_prod(z, c_sum(c_sqrt(c_sum(x,c_1)),
- c_sqrt(c_diff(x,c_1)))));
+ z = c_log(c_prod(z, c_sum(c_sqrt(c_sum(x,c_one)),
+ c_sqrt(c_diff(x,c_one)))));
return c_sum(z, z);
}
@@ -85,7 +85,7 @@ c_asinh(Py_complex x)
{
/* Break up long expression for WATCOM */
Py_complex z;
- z = c_sum(c_1,c_prod(x, x));
+ z = c_sum(c_one, c_prod(x, x));
return c_log(c_sum(c_sqrt(z), x));
}
@@ -98,7 +98,7 @@ static char c_asinh_doc[] =
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 c_prod(c_halfi,c_log(c_quot(c_sum(c_i,x),c_diff(c_i,x))));
}
static char c_atan_doc[] =
@@ -110,7 +110,7 @@ static char c_atan_doc[] =
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 c_prod(c_half,c_log(c_quot(c_sum(c_one,x),c_diff(c_one,x))));
}
static char c_atanh_doc[] =