[fix](cast) wrong result while cast const to double then to string (#31657)
Issue Number: close #31514
This commit is contained in:
@ -137,6 +137,11 @@ public class FloatLiteral extends NumericLiteralExpr {
|
||||
}
|
||||
NumberFormat nf = NumberFormat.getInstance();
|
||||
nf.setGroupingUsed(false);
|
||||
if (type == Type.FLOAT) {
|
||||
nf.setMaximumFractionDigits(7);
|
||||
} else {
|
||||
nf.setMaximumFractionDigits(16);
|
||||
}
|
||||
return nf.format(value);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user