summaryrefslogtreecommitdiffstats
path: root/Python/pymath.c
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-05-09 14:46:46 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-05-09 14:46:46 (GMT)
commitc83ea137d7e717f764e2f31fc2544f522de7d857 (patch)
treeccfdacfdcdc4ed68e56324a07b6f25ab5327bdcd /Python/pymath.c
parent368ede83d9c96004dc5c489511936a588537f410 (diff)
downloadcpython-c83ea137d7e717f764e2f31fc2544f522de7d857.zip
cpython-c83ea137d7e717f764e2f31fc2544f522de7d857.tar.gz
cpython-c83ea137d7e717f764e2f31fc2544f522de7d857.tar.bz2
Untabify C files. Will watch buildbots.
Diffstat (limited to 'Python/pymath.c')
-rw-r--r--Python/pymath.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/Python/pymath.c b/Python/pymath.c
index 83105f2..827a773 100644
--- a/Python/pymath.c
+++ b/Python/pymath.c
@@ -7,9 +7,9 @@
thus rounding from extended precision to double precision. */
double _Py_force_double(double x)
{
- volatile double y;
- y = x;
- return y;
+ volatile double y;
+ y = x;
+ return y;
}
#endif
@@ -34,21 +34,21 @@ void _Py_set_387controlword(unsigned short cw) {
#ifndef HAVE_HYPOT
double hypot(double x, double y)
{
- double yx;
+ double yx;
- x = fabs(x);
- y = fabs(y);
- if (x < y) {
- double temp = x;
- x = y;
- y = temp;
- }
- if (x == 0.)
- return 0.;
- else {
- yx = y/x;
- return x*sqrt(1.+yx*yx);
- }
+ x = fabs(x);
+ y = fabs(y);
+ if (x < y) {
+ double temp = x;
+ x = y;
+ y = temp;
+ }
+ if (x == 0.)
+ return 0.;
+ else {
+ yx = y/x;
+ return x*sqrt(1.+yx*yx);
+ }
}
#endif /* HAVE_HYPOT */
@@ -56,12 +56,12 @@ double hypot(double x, double y)
double
copysign(double x, double y)
{
- /* use atan2 to distinguish -0. from 0. */
- if (y > 0. || (y == 0. && atan2(y, -1.) > 0.)) {
- return fabs(x);
- } else {
- return -fabs(x);
- }
+ /* use atan2 to distinguish -0. from 0. */
+ if (y > 0. || (y == 0. && atan2(y, -1.) > 0.)) {
+ return fabs(x);
+ } else {
+ return -fabs(x);
+ }
}
#endif /* HAVE_COPYSIGN */
@@ -73,7 +73,7 @@ round(double x)
absx = fabs(x);
y = floor(absx);
if (absx - y >= 0.5)
- y += 1.0;
+ y += 1.0;
return copysign(y, x);
}
#endif /* HAVE_ROUND */