- java.lang.Object
-
- org.kink_lang.kink.HostResultCore
-
- org.kink_lang.kink.Val
-
- org.kink_lang.kink.NumVal
-
- All Implemented Interfaces:
HostResult
public class NumVal extends Val
A num val.A num val consists of two integers: mantissa and scale. The num val represents an decimal number (mantissa * 10**(-scale)). Kink runtimes must support arbitrary range for mantissa as far as the memory is not exhausted, and at least the range [-32767, +32767] for scale.
In this implementation, a num val is backed by a Java BigDecimal. The mantissa is the “unscaled value” of BigDecimal, and the scale is the “scale” of BigDecimal.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object arg)
BigDecimal
getBigDecimal()
Returns the big decimal number.int
hashCode()
String
toString()
-
Methods inherited from class org.kink_lang.kink.Val
getIdentity, getVar, getVarSymHandleSet, hasVar, makeHostResultCore, setVar
-
-
-
-
Method Detail
-
getBigDecimal
public BigDecimal getBigDecimal()
Returns the big decimal number.- Returns:
- the big decimal number.
-
-