java - Format BigDecimal without scientific notation with full precission -
i'd convert bigdecimal string printing purposes print out digits without scientific notation. example:
bigdecimal d = bigdecimal.valueof(12334535345456700.12345634534534578901); string out = d.tostring(); // or perform formatting needs done system.out.println(out);
i'd 12334535345456700.12345634534534578901 printed. right get: 1.23345353454567e+16.
to preserve precision bigdecimal
need pass value in string
bigdecimal d = new bigdecimal("12334535345456700.12345634534534578901"); system.out.println(d.toplainstring());
Comments
Post a Comment