summaryrefslogtreecommitdiffstats
path: root/Modules/_decimal/libmpdec
diff options
context:
space:
mode:
authorStefan Krah <skrah@bytereef.org>2012-04-18 16:08:20 (GMT)
committerStefan Krah <skrah@bytereef.org>2012-04-18 16:08:20 (GMT)
commitaecaf0b663d53047f039cca2776cddee66df892e (patch)
tree955b0d358519abf8408d33c6a06ec353f8bcecdd /Modules/_decimal/libmpdec
parent6369f77d2006d878cd5e360d9b41c0a85fe74403 (diff)
downloadcpython-aecaf0b663d53047f039cca2776cddee66df892e.zip
cpython-aecaf0b663d53047f039cca2776cddee66df892e.tar.gz
cpython-aecaf0b663d53047f039cca2776cddee66df892e.tar.bz2
Fix comments and whitespace.
Diffstat (limited to 'Modules/_decimal/libmpdec')
-rw-r--r--Modules/_decimal/libmpdec/mpdecimal.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/Modules/_decimal/libmpdec/mpdecimal.c b/Modules/_decimal/libmpdec/mpdecimal.c
index b456db4..e59dec0 100644
--- a/Modules/_decimal/libmpdec/mpdecimal.c
+++ b/Modules/_decimal/libmpdec/mpdecimal.c
@@ -2484,7 +2484,7 @@ mpd_qand(mpd_t *result, const mpd_t *a, const mpd_t *b,
}
result->data[i++] = z;
- /* scan the rest of y for digit > 1 */
+ /* scan the rest of y for digits > 1 */
for (; k < MPD_RDIGITS; k++) {
ybit = y % 10;
y /= 10;
@@ -2492,7 +2492,7 @@ mpd_qand(mpd_t *result, const mpd_t *a, const mpd_t *b,
goto invalid_operation;
}
}
- /* scan the rest of big for digit > 1 */
+ /* scan the rest of big for digits > 1 */
for (; i < big->len; i++) {
y = big->data[i];
for (k = 0; k < MPD_RDIGITS; k++) {
@@ -2571,7 +2571,7 @@ mpd_qinvert(mpd_t *result, const mpd_t *a, const mpd_context_t *ctx,
}
for (i = 0; i < len; i++) {
- x = (i < a->len) ? a->data[i] : 0;
+ x = (i < a->len) ? a->data[i] : 0;
z = 0;
for (k = 0; k < MPD_RDIGITS; k++) {
xbit = x % 10;
@@ -2674,7 +2674,7 @@ mpd_qor(mpd_t *result, const mpd_t *a, const mpd_t *b,
z += (xbit|ybit) ? mpd_pow10[k] : 0;
}
- /* scan and copy the rest of y for digit > 1 */
+ /* scan for digits > 1 and copy the rest of y */
for (; k < MPD_RDIGITS; k++) {
ybit = y % 10;
y /= 10;
@@ -2684,7 +2684,7 @@ mpd_qor(mpd_t *result, const mpd_t *a, const mpd_t *b,
z += ybit*mpd_pow10[k];
}
result->data[i++] = z;
- /* scan and copy the rest of big for digit > 1 */
+ /* scan for digits > 1 and copy the rest of big */
for (; i < big->len; i++) {
y = big->data[i];
for (k = 0; k < MPD_RDIGITS; k++) {
@@ -2710,7 +2710,7 @@ invalid_operation:
}
/*
- * Rotate the coefficient of a by b->data digits. b must be an integer with
+ * Rotate the coefficient of 'a' by 'b' digits. 'b' must be an integer with
* exponent 0.
*/
void
@@ -2993,7 +2993,7 @@ mpd_qxor(mpd_t *result, const mpd_t *a, const mpd_t *b,
z += (xbit^ybit) ? mpd_pow10[k] : 0;
}
- /* scan and copy the rest of y for digit > 1 */
+ /* scan for digits > 1 and copy the rest of y */
for (; k < MPD_RDIGITS; k++) {
ybit = y % 10;
y /= 10;
@@ -3003,7 +3003,7 @@ mpd_qxor(mpd_t *result, const mpd_t *a, const mpd_t *b,
z += ybit*mpd_pow10[k];
}
result->data[i++] = z;
- /* scan and copy the rest of big for digit > 1 */
+ /* scan for digits > 1 and copy the rest of big */
for (; i < big->len; i++) {
y = big->data[i];
for (k = 0; k < MPD_RDIGITS; k++) {