Skip to content

Commit 3726e25

Browse files
committed
Comments
1 parent 4437e8a commit 3726e25

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

ext/bcmath/libbcmath/src/recmul.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,6 @@ static void bc_standard_square(bc_num n1, size_t n1len, bc_num *prod)
190190
size_t n1_arr_size = (n1len + BC_VECTOR_SIZE - 1) / BC_VECTOR_SIZE;
191191
size_t prod_arr_size = (prodlen + BC_VECTOR_SIZE - 1) / BC_VECTOR_SIZE;
192192

193-
/*
194-
* let's say that N is the max of n1len and n2len (and a multiple of BC_VECTOR_SIZE for simplicity),
195-
* then this sum is <= N/BC_VECTOR_SIZE + N/BC_VECTOR_SIZE + N/BC_VECTOR_SIZE + N/BC_VECTOR_SIZE - 1
196-
* which is equal to N - 1 if BC_VECTOR_SIZE is 4, and N/2 - 1 if BC_VECTOR_SIZE is 8.
197-
*/
198193
BC_VECTOR *buf = safe_emalloc(n1_arr_size + n1_arr_size + prod_arr_size, sizeof(BC_VECTOR), 0);
199194

200195
BC_VECTOR *n1_vector = buf;
@@ -301,7 +296,7 @@ bc_num bc_square(bc_num n1, size_t scale)
301296
size_t full_scale = n1->n_scale + n1->n_scale;
302297
size_t prod_scale = MIN(full_scale, MAX(scale, n1->n_scale));
303298

304-
/* Do the multiply */
299+
/* Do the square */
305300
if (len1 <= BC_VECTOR_SIZE) {
306301
bc_fast_square(n1, len1, &prod);
307302
} else {

0 commit comments

Comments
 (0)