| Package | Description |
|---|---|
| gnu.kawa.functions |
Various core run-time functions and operators.
|
| gnu.kawa.lispexpr |
Support classes for compiling and running Lisp languages.
|
| gnu.kawa.xml |
Classes for using XML within Kawa.
|
| gnu.math |
Supports various numeric
types, including complex numbers, efficient bignums, exact rational
numbers, units.
|
| Modifier and Type | Method and Description |
|---|---|
static RatNum |
Arithmetic.asRatNum (java.lang.Object value) |
| Modifier and Type | Method and Description |
|---|---|
static RatNum |
LangObjType.coerceRatNum (java.lang.Object value) |
| Modifier and Type | Class and Description |
|---|---|
class |
XInteger
An integer that is an instance of a more specific integer type.
|
| Modifier and Type | Class and Description |
|---|---|
class |
IntFraction
Implementation of exact rational numbers a ratio of two IntNums.
|
class |
IntNum
A class for infinite-precision integers.
|
| Modifier and Type | Method and Description |
|---|---|
static RatNum |
RatNum.add (RatNum x,
RatNum y,
int k) |
static RatNum |
RatNum.asRatNumOrNull (java.lang.Object value) |
static RatNum |
RatNum.divide (RatNum x,
RatNum y) |
static RatNum |
RatNum.infinity (int sign)
Return exact "rational" infinity.
|
static RatNum |
RatNum.make (IntNum num,
IntNum den) |
static RatNum |
RatNum.neg (RatNum x) |
RatNum |
RatNum.rneg () |
static RatNum |
RatNum.times (RatNum x,
RatNum y) |
RatNum |
RatNum.toExact () |
RatNum |
RealNum.toExact ()
Convert to an exact number.
|
static RatNum |
DFloNum.toExact (double value)
Converts to the closest exact rational value.
|
static RatNum |
RatNum.valueOf (java.math.BigDecimal value) |
| Modifier and Type | Method and Description |
|---|---|
static RatNum |
RatNum.add (RatNum x,
RatNum y,
int k) |
static int |
RatNum.compare (RatNum x,
RatNum y) |
static RatNum |
RatNum.divide (RatNum x,
RatNum y) |
static boolean |
RatNum.equals (RatNum x,
RatNum y) |
static RatNum |
RatNum.neg (RatNum x) |
static RatNum |
RatNum.times (RatNum x,
RatNum y) |
static IntNum |
RealNum.toScaledInt (RatNum r,
int k)
Convert rational to (rounded) integer, after multiplying by 10**k.
|