medusa.georgios.enhanced_mcl
Class DoubleFormat
- java.lang.Object
-
- medusa.georgios.enhanced_mcl.DoubleFormat
-
public class DoubleFormat extends java.lang.ObjectDoubleFormat 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 doubleformat(double x, int ndigits)Format the number x with n significant digits.
-
DMelt 3.0 © DataMelt by jWork.ORG