Skip to content

Commit f39d34d

Browse files
authored
Apply suggestions from code review
Co-authored-by: Athan <kgryte@gmail.com> Signed-off-by: Athan <kgryte@gmail.com>
1 parent c9ec417 commit f39d34d

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

lib/node_modules/@stdlib/math/base/special/hyp2f1/lib/hyp2f1negcequalbc.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,20 +58,17 @@ function hyp2f1NegCEqualBC( a, b, x ) {
5858
collector = 1.0;
5959
sum = 1.0;
6060

61-
if ( !( abs( b ) < 1.0e5 ) ) {
61+
if ( abs( b ) >= 1.0e5 ) {
6262
return NaN;
6363
}
64-
6564
for ( k = 1; k <= -b; k++ ) {
66-
collector *= ( a + k - 1.0 ) * x / k;
65+
collector *= ( ( a + k - 1.0 ) * x ) / k;
6766
collectorMax = max( abs( collector ), collectorMax );
6867
sum += collector;
6968
}
70-
7169
if ( 1.0e-16 * ( 1.0 + ( collectorMax / abs( sum ) ) ) > 1.0e-7 ) {
7270
return NaN;
7371
}
74-
7572
return sum;
7673
}
7774

0 commit comments

Comments
 (0)