Skip to content
Permalink
Browse files
Fix float accuracy issues
  • Loading branch information
CrazyHZM committed Apr 12, 2019
1 parent 5a74492 commit 0b6215c36585d86ea67918e3819b5d9051b82e8e
Showing 1 changed file with 2 additions and 0 deletions.
@@ -106,6 +106,8 @@ public void writeObject(Object obj, AbstractHessianOutput out)
break;

case FLOAT:
out.writeDouble(Double.parseDouble(((Number) obj).floatValue() + ""));
break;
case DOUBLE:
out.writeDouble(((Number) obj).doubleValue());
break;

0 comments on commit 0b6215c

Please sign in to comment.