Relates :
|
A DESCRIPTION OF THE PROBLEM : I find the following slow path in BigDecimal: // Somewhat inefficient, but guaranteed to work. return Double.parseDouble(this.toString()) Since JDK-7131192 : BigInteger.doubleValue() is depressingly slow is now available, something faster could be done. It suggest doing unscaledValue().doubleValue() * Math.exp(scale()*Math.log(10))
|