gnu.kawa.functions
public class Arithmetic extends Object
Field Summary | |
---|---|
static int | BIGDECIMAL_CODE Promotion code for java.math.BigDecimal. |
static int | BIGINTEGER_CODE Promotion code for java.math.BigInteger. |
static int | DOUBLE_CODE Promotion code double/Double. |
static int | FLOAT_CODE Promotion code float/Float. |
static int | FLONUM_CODE Promotion code for gnu.math.FloNum. |
static int | INTNUM_CODE Promotion code for gnu.math.IntNum. |
static int | INT_CODE Promotion code for byte/Byte, short/Short, int/Integer. |
static int | LONG_CODE Promotion code for long/Long. |
static int | NUMERIC_CODE Promotion code for other gnu.math.Numeric. |
static int | RATNUM_CODE Promotion code for gnu.math.RatNum. |
static IntNum | ten_exp_9 |
Method Summary | |
---|---|
static BigDecimal | asBigDecimal(Object value) |
static BigInteger | asBigInteger(Object value) |
static double | asDouble(Object value) |
static float | asFloat(Object value) |
static int | asInt(Object value) |
static IntNum | asIntNum(BigDecimal value) |
static IntNum | asIntNum(BigInteger value) |
static IntNum | asIntNum(Object value) |
static long | asLong(Object value) |
static Numeric | asNumeric(Object value) |
static RatNum | asRatNum(Object value) |
static int | classifyValue(Object value) |
static Object | convert(Object value, int code) Coerce a number to one of the Arithmetic.XXX_CODE types.
|
static String | toString(Object number, int radix) Convert a number to a String.
|