Skip to content

Commit 617d963

Browse files
committed
Use operator assignment and update comments
1 parent f44b6dd commit 617d963

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

lib/node_modules/@stdlib/math/base/special/gammaincinv/lib/higher_newton.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ function higherNewton( x0, a, m, p, q, lgama, invfp, pcase ) {
8484
r = -invfp * x;
8585
}
8686
if ( pcase ) {
87-
// gammainc( x, s[, regularized = true ][, upper = false ] )
87+
// Call: gammainc( x, s[, regularized = true ][, upper = false ] )
8888
px = gammainc( x, a, true, false );
8989
ck0 = -r * ( px - p );
9090
} else {
91-
// gammainc( x, s[, regularized = true ][, upper = true ] )
91+
// Call: gammainc( x, s[, regularized = true ][, upper = true ] )
9292
qx = gammainc( x, a, true, true );
9393
ck0 = r * ( qx - q );
9494
}

lib/node_modules/@stdlib/math/base/special/gcd/lib/binary_gcd.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -49,27 +49,27 @@ function gcd( a, b ) {
4949
}
5050
// Reduce `a` and/or `b` to odd numbers and keep track of the greatest power of 2 dividing both `a` and `b`...
5151
while ( a%2 === 0 && b%2 === 0 ) {
52-
a = a / 2; // right shift
53-
b = b / 2; // right shift
54-
k = k * 2; // left shift
52+
a /= 2; // right shift
53+
b /= 2; // right shift
54+
k *= 2; // left shift
5555
}
5656
// Reduce `a` to an odd number...
5757
while ( a%2 === 0 ) {
58-
a = a / 2; // right shift
58+
a /= 2; // right shift
5959
}
6060
// Henceforth, `a` is always odd...
6161
while ( b ) {
6262
// Remove all factors of 2 in `b`, as they are not common...
6363
while ( b%2 === 0 ) {
64-
b = b / 2; // right shift
64+
b /= 2; // right shift
6565
}
6666
// `a` and `b` are both odd. Swap values such that `b` is the larger of the two values, and then set `b` to the difference (which is even)...
6767
if ( a > b ) {
6868
t = b;
6969
b = a;
7070
a = t;
7171
}
72-
b = b - a; // b=0 iff b=a
72+
b -= a; // b=0 iff b=a
7373
}
7474
// Restore common factors of 2...
7575
return k * a;

lib/node_modules/@stdlib/math/base/special/sinpi/lib/sinpi.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ function sinpi( x ) {
9292
return sin( PI*r );
9393
}
9494
if ( ar < 1.75 ) {
95-
ar = ar - 1.5;
95+
ar -= 1.5;
9696
return -copysign( cos( PI*ar ), r );
9797
}
98-
r = r - copysign( 2.0, r );
98+
r -= copysign( 2.0, r );
9999
return sin( PI*r );
100100
}
101101

lib/node_modules/@stdlib/math/base/tools/continued-fraction/lib/basic.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ function continuedFractionA( gen, factor, maxIter ) {
8181
}
8282
D = 1.0 / D;
8383
delta = C * D;
84-
f = f * delta;
84+
f *= delta;
8585
}
8686
} while ( v && ( abs( delta - 1.0 ) > factor ) && --maxIter ); // eslint-disable-line no-plusplus
8787

@@ -134,7 +134,7 @@ function continuedFractionB( gen, factor, maxIter ) {
134134
}
135135
D = 1.0 / D;
136136
delta = C * D;
137-
f = f * delta;
137+
f *= delta;
138138
}
139139
} while ( v && ( abs( delta - 1.0 ) > factor ) && --maxIter ); // eslint-disable-line no-plusplus
140140
return f;

0 commit comments

Comments
 (0)