summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorStefan Krah <skrah@bytereef.org>2012-09-23 13:46:09 (GMT)
committerStefan Krah <skrah@bytereef.org>2012-09-23 13:46:09 (GMT)
commit7e6523fbd7641b61a795c303ec46cfc25b6098fc (patch)
tree6c8e57a0faa0dd6e0c8f7a2b97505068f05a7494 /Modules
parent2b7a71d6e592dcc8257b1007fffd2fdd3cd193af (diff)
downloadcpython-7e6523fbd7641b61a795c303ec46cfc25b6098fc.zip
cpython-7e6523fbd7641b61a795c303ec46cfc25b6098fc.tar.gz
cpython-7e6523fbd7641b61a795c303ec46cfc25b6098fc.tar.bz2
Use C-style comments.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_decimal/libmpdec/mpdecimal.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/Modules/_decimal/libmpdec/mpdecimal.c b/Modules/_decimal/libmpdec/mpdecimal.c
index 0558d5e..05f7628 100644
--- a/Modules/_decimal/libmpdec/mpdecimal.c
+++ b/Modules/_decimal/libmpdec/mpdecimal.c
@@ -5063,28 +5063,28 @@ _karatsuba_rec(mpd_uint_t *c, const mpd_uint_t *a, const mpd_uint_t *b,
return;
}
- m = (la+1)/2; // ceil(la/2)
+ m = (la+1)/2; /* ceil(la/2) */
/* lb <= m < la */
if (lb <= m) {
/* lb can now be larger than la-m */
if (lb > la-m) {
- lt = lb + lb + 1; // space needed for result array
- mpd_uint_zero(w, lt); // clear result array
- _karatsuba_rec(w, b, a+m, w+lt, lb, la-m); // b*ah
+ lt = lb + lb + 1; /* space needed for result array */
+ mpd_uint_zero(w, lt); /* clear result array */
+ _karatsuba_rec(w, b, a+m, w+lt, lb, la-m); /* b*ah */
}
else {
- lt = (la-m) + (la-m) + 1; // space needed for result array
- mpd_uint_zero(w, lt); // clear result array
- _karatsuba_rec(w, a+m, b, w+lt, la-m, lb); // ah*b
+ lt = (la-m) + (la-m) + 1; /* space needed for result array */
+ mpd_uint_zero(w, lt); /* clear result array */
+ _karatsuba_rec(w, a+m, b, w+lt, la-m, lb); /* ah*b */
}
- _mpd_baseaddto(c+m, w, (la-m)+lb); // add ah*b*B**m
+ _mpd_baseaddto(c+m, w, (la-m)+lb); /* add ah*b*B**m */
- lt = m + m + 1; // space needed for the result array
- mpd_uint_zero(w, lt); // clear result array
- _karatsuba_rec(w, a, b, w+lt, m, lb); // al*b
- _mpd_baseaddto(c, w, m+lb); // add al*b
+ lt = m + m + 1; /* space needed for the result array */
+ mpd_uint_zero(w, lt); /* clear result array */
+ _karatsuba_rec(w, a, b, w+lt, m, lb); /* al*b */
+ _mpd_baseaddto(c, w, m+lb); /* add al*b */
return;
}
@@ -5360,34 +5360,34 @@ _karatsuba_rec_fnt(mpd_uint_t *c, const mpd_uint_t *a, const mpd_uint_t *b,
return 1;
}
- m = (la+1)/2; // ceil(la/2)
+ m = (la+1)/2; /* ceil(la/2) */
/* lb <= m < la */
if (lb <= m) {
/* lb can now be larger than la-m */
if (lb > la-m) {
- lt = lb + lb + 1; // space needed for result array
- mpd_uint_zero(w, lt); // clear result array
- if (!_karatsuba_rec_fnt(w, b, a+m, w+lt, lb, la-m)) { // b*ah
+ lt = lb + lb + 1; /* space needed for result array */
+ mpd_uint_zero(w, lt); /* clear result array */
+ if (!_karatsuba_rec_fnt(w, b, a+m, w+lt, lb, la-m)) { /* b*ah */
return 0; /* GCOV_UNLIKELY */
}
}
else {
- lt = (la-m) + (la-m) + 1; // space needed for result array
- mpd_uint_zero(w, lt); // clear result array
- if (!_karatsuba_rec_fnt(w, a+m, b, w+lt, la-m, lb)) { // ah*b
+ lt = (la-m) + (la-m) + 1; /* space needed for result array */
+ mpd_uint_zero(w, lt); /* clear result array */
+ if (!_karatsuba_rec_fnt(w, a+m, b, w+lt, la-m, lb)) { /* ah*b */
return 0; /* GCOV_UNLIKELY */
}
}
- _mpd_baseaddto(c+m, w, (la-m)+lb); // add ah*b*B**m
+ _mpd_baseaddto(c+m, w, (la-m)+lb); /* add ah*b*B**m */
- lt = m + m + 1; // space needed for the result array
- mpd_uint_zero(w, lt); // clear result array
- if (!_karatsuba_rec_fnt(w, a, b, w+lt, m, lb)) { // al*b
+ lt = m + m + 1; /* space needed for the result array */
+ mpd_uint_zero(w, lt); /* clear result array */
+ if (!_karatsuba_rec_fnt(w, a, b, w+lt, m, lb)) { /* al*b */
return 0; /* GCOV_UNLIKELY */
}
- _mpd_baseaddto(c, w, m+lb); // add al*b
+ _mpd_baseaddto(c, w, m+lb); /* add al*b */
return 1;
}