Package com.extentech.toolkit

Examples of com.extentech.toolkit.CompatibleBigDecimal.doubleValue()


      // check if we should be returning a whole number or a decimal
      int moveLen = num.indexOf("E") - num.indexOf(".") - 1;
      if (expNum >= moveLen) {
        if (negative) {
          return "-"
              + String.valueOf(Math.round(outNumD.doubleValue()));
        } else {
          return String.valueOf(Math.round(outNumD.doubleValue()));
        }
      }
      Object[] args = new Object[0];
View Full Code Here


      if (expNum >= moveLen) {
        if (negative) {
          return "-"
              + String.valueOf(Math.round(outNumD.doubleValue()));
        } else {
          return String.valueOf(Math.round(outNumD.doubleValue()));
        }
      }
      Object[] args = new Object[0];
      // args[0] = outNumD;
      Object res = ResourceLoader.executeIfSupported(outNumD, args,
View Full Code Here

      } else if (num.indexOf(".") != -1) {
        int pos = num.indexOf(".");
        preString = num.substring(0, 1) + "."
            + num.substring(1, num.indexOf("."));
        CompatibleBigDecimal d = new CompatibleBigDecimal(num);
        if (d.doubleValue() < 1 && d.doubleValue() != 0) {
          // it is a very small value, ie 1.0E-10
          int counter = 0;
          while (d.doubleValue() < 1) {
            d = new CompatibleBigDecimal(d.movePointRight(1));
            counter++;
View Full Code Here

      } else if (num.indexOf(".") != -1) {
        int pos = num.indexOf(".");
        preString = num.substring(0, 1) + "."
            + num.substring(1, num.indexOf("."));
        CompatibleBigDecimal d = new CompatibleBigDecimal(num);
        if (d.doubleValue() < 1 && d.doubleValue() != 0) {
          // it is a very small value, ie 1.0E-10
          int counter = 0;
          while (d.doubleValue() < 1) {
            d = new CompatibleBigDecimal(d.movePointRight(1));
            counter++;
View Full Code Here

            + num.substring(1, num.indexOf("."));
        CompatibleBigDecimal d = new CompatibleBigDecimal(num);
        if (d.doubleValue() < 1 && d.doubleValue() != 0) {
          // it is a very small value, ie 1.0E-10
          int counter = 0;
          while (d.doubleValue() < 1) {
            d = new CompatibleBigDecimal(d.movePointRight(1));
            counter++;
          }
          String retStr = d.toCompatibleString() + "E-" + counter;
          return retStr;
View Full Code Here

            + num.substring(num.indexOf("E") + 1, num.length());
        fullString = preString + postString;
      } else if (num.indexOf(".") != -1) {
        int pos = num.indexOf(".");
        CompatibleBigDecimal d = new CompatibleBigDecimal(num);
        if (d.doubleValue() < 1 && d.doubleValue() != 0) {
          // it is a very small value, ie 1.0E-10
          int counter = 0;
          while (d.doubleValue() < 1) {
            d = new CompatibleBigDecimal(d.movePointRight(1));
            counter++;
View Full Code Here

            + num.substring(num.indexOf("E") + 1, num.length());
        fullString = preString + postString;
      } else if (num.indexOf(".") != -1) {
        int pos = num.indexOf(".");
        CompatibleBigDecimal d = new CompatibleBigDecimal(num);
        if (d.doubleValue() < 1 && d.doubleValue() != 0) {
          // it is a very small value, ie 1.0E-10
          int counter = 0;
          while (d.doubleValue() < 1) {
            d = new CompatibleBigDecimal(d.movePointRight(1));
            counter++;
View Full Code Here

        int pos = num.indexOf(".");
        CompatibleBigDecimal d = new CompatibleBigDecimal(num);
        if (d.doubleValue() < 1 && d.doubleValue() != 0) {
          // it is a very small value, ie 1.0E-10
          int counter = 0;
          while (d.doubleValue() < 1) {
            d = new CompatibleBigDecimal(d.movePointRight(1));
            counter++;
          }
          String retStr = d.toCompatibleString() + "E-" + counter;
          return retStr;
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.