Skip to content

Commit 77ece75

Browse files
committed
fixed range check
1 parent 4398243 commit 77ece75

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/at/syntaxerror/ieee754/Floating.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ public Floating(int signum, BigDecimal value) {
7676
this.type = FloatingType.INFINITE;
7777
}
7878

79-
// else if(value.abs().compareTo(getCodec().getMinSubnormalValue().getBigDecimal()) < 0) { // underflow => zero
80-
// this.value = BigDecimal.ZERO;
81-
// this.type = FloatingType.FINITE;
82-
// }
79+
else if(value.abs().compareTo(getCodec().getMinSubnormalValue().getBigDecimal()) < 0) { // underflow => zero
80+
this.value = BigDecimal.ZERO;
81+
this.type = FloatingType.FINITE;
82+
}
8383

8484
else {
8585
this.value = value;

0 commit comments

Comments
 (0)