Documentation of 'medusa.georgios.enhanced_mcl.DoubleFormat' Java class
DoubleFormat
medusa.georgios.enhanced_mcl

Class DoubleFormat



  • public class DoubleFormat
    extends java.lang.Object
    DoubleFormat formats double numbers into a specified digit format. The difference to NumberFormat and DecimalFormat is that this DigitFormat is based on a strategy to focus on a given number of nonzero digits, for which it rounds numbers if necessary. In addition, it is possible to format a number into a String that has a specified length, with a strategy to first obey the significant-digit rule and then try to either space-pad the string on the left or shorten the string by rounding, converting to mantissa-exponent format or indicating overflow or underflow. Although the class does not yield separator-aligned numbers, it yields a readable output.
    • Constructor Summary

      Constructors 
      Constructor and Description
      DoubleFormat() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static double format(double x, int ndigits)
      Format the number x with n significant digits.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DoubleFormat

        public DoubleFormat()
    • Method Detail

      • format

        public static double format(double x,
                                    int ndigits)
        Format the number x with n significant digits.
        Parameters:
        x -
        ndigits -
        Returns:

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.