We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6bedf7 commit ad128eaCopy full SHA for ad128ea
ext/bcmath/libbcmath/src/sqrt.c
@@ -68,13 +68,11 @@ bool bc_sqrt(bc_num *num, size_t scale)
68
/* fast path */
69
70
/* Calculate the initial guess. */
71
- BC_VECTOR guess_vector;
+ BC_VECTOR guess_vector = 1;
72
if (num_cmp_one == BCMATH_RIGHT_GREATER) {
73
/* The number is between 0 and 1. Guess should start at 1. */
74
- guess_vector = 1;
75
cscale = (*num)->n_scale;
76
} else {
77
- guess_vector = 10;
78
for (size_t i = 0; i < (*num)->n_len >> 1; i++) {
79
guess_vector *= BASE;
80
}
0 commit comments