Skip to content

Commit c205d2e

Browse files
committed
Change default float and double values to minimum representable values.
Previously, we were using the minimum positive value as the `minValue`.
1 parent 6b92235 commit c205d2e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sbe-tool/src/main/java/uk/co/real_logic/sbe/PrimitiveValue.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ public enum Representation
197197
/**
198198
* Maximum value representation for a single precision 32-bit floating point type.
199199
*/
200-
public static final float MIN_VALUE_FLOAT = Float.MIN_VALUE;
200+
public static final float MIN_VALUE_FLOAT = -Float.MAX_VALUE;
201201

202202
/**
203203
* Maximum value representation for a single precision 32-bit floating point type.
@@ -212,7 +212,7 @@ public enum Representation
212212
/**
213213
* Minimum value representation for a double precision 64-bit floating point type.
214214
*/
215-
public static final double MIN_VALUE_DOUBLE = Double.MIN_VALUE;
215+
public static final double MIN_VALUE_DOUBLE = -Double.MAX_VALUE;
216216

217217
/**
218218
* Maximum value representation for a double precision 64-bit floating point type.

0 commit comments

Comments
 (0)