Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
8cb82bd5
Commit
8cb82bd5
authored
Feb 20, 2001
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename some constants for easier readability.
parent
14e26408
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
Modules/cmathmodule.c
Modules/cmathmodule.c
+8
-8
No files found.
Modules/cmathmodule.c
View file @
8cb82bd5
...
...
@@ -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
[]
=
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment