I cannot find why I received java.lang.ArithmeticException: Invalid operation
when using a large decimal number.
public static String E (int exponent, String value){ BigDecimal ten= new BigDecimal("10"); BigDecimal tempValue=new BigDecimal (value); return tempValue.multiply(ten.pow(exponent)).toString(); }
Some of the indicators have values, such as -27
. Is there any way around this, since it would be difficult to preserve the original values ββwith many zeros. I chose BigDecimal because I needed precision.
thanks
source share