Package java.math

Examples of java.math.BigDecimal.scaleByPowerOfTen()


    }

    int magnitude = 0;
    // now iterate to get the approximate magnitude
    while (tmpVal.compareTo(BigDecimal.ONE) > 0) {
      tmpVal = tmpVal.scaleByPowerOfTen (-1);
      magnitude++;
    }
   
    // return it in the appropriate way
    if (smallerThanOne) return - magnitude;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.