Skip to content

Commit 064582a

Browse files
committed
braces
1 parent 1cc1810 commit 064582a

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎src/main/java/com/thealgorithms/maths/SigmoidActivation.java‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,13 @@ public static double activate(double x) {
2222
}
2323
// Saving from unnecessary and heavy calculations.
2424
// lim x->-inf sigmoid(x) will return number very close to 0
25-
if (x < -745) return 0.0;
25+
if (x < -745) {
26+
return 0.0;
27+
}
2628
// lim x->inf sigmoid(x) will return number very close to 1
27-
if (x > 745) return 1.0;
29+
if (x > 745) {
30+
return 1.0;
31+
}
2832
// sigmoid function's formula
2933
return 1.0 / (1 + Math.exp((-1) * x));
3034
}

0 commit comments

Comments
 (0)