Skip to content

Commit 3b4cb29

Browse files
committed
parser.Values: use PrismUtils.formatDouble for double formatting
Fixes issue #1. git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11760 bbc10eb1-c90d-0410-af57-cb519fbb1720
1 parent ee4f2d2 commit 3b4cb29

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

prism/src/parser/Values.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
import parser.type.TypeInt;
3838
import prism.ModelInfo;
3939
import prism.PrismLangException;
40+
import prism.PrismUtils;
4041

4142
/**
4243
* Class to store a list of typed constant/variable values.
@@ -486,9 +487,7 @@ private String valToString(Object o)
486487
String s;
487488

488489
if (o instanceof Double) {
489-
NumberFormat nf = DecimalFormat.getInstance(Locale.UK);
490-
nf.setMaximumFractionDigits(6);
491-
s = nf.format(((Double)o).doubleValue());
490+
s = PrismUtils.formatDouble((double)o);
492491
} else {
493492
s = o.toString();
494493
}

0 commit comments

Comments
 (0)