public abstract class RealNum extends Complex implements java.lang.Comparable
Constructor and Description |
---|
RealNum() |
Modifier and Type | Method and Description |
---|---|
Numeric |
abs() |
abstract Numeric |
add(java.lang.Object obj,
int k)
Return this + k * obj.
|
static RealNum |
add(RealNum x,
RealNum y,
int k) |
RealNum |
angle() |
java.math.BigDecimal |
asBigDecimal() |
static RealNum |
asRealNumOrNull(java.lang.Object value) |
int |
classifyFinite()
Check if value is finite, infinite, or NaN.
|
int |
compareTo(java.lang.Object o)
Implements the Comparable interface.
|
Quaternion |
conjugate() |
RealNum |
cos() |
abstract Numeric |
div(java.lang.Object obj) |
static RealNum |
divide(RealNum x,
RealNum y) |
Complex |
exp() |
RealNum |
im()
The value of the imaginary component, as a RealNum.
|
abstract boolean |
isNegative() |
static boolean |
isReal(java.lang.Object value) |
boolean |
isZero() |
Complex |
log() |
RealNum |
max(RealNum x) |
RealNum |
min(RealNum x) |
abstract Numeric |
mul(java.lang.Object obj) |
RealNum |
re()
The value of the real component, as a RealNum.
|
RealNum |
rneg() |
abstract int |
sign()
Return 1 if
>0 ; 0 if ==0 ; -1 if <0 ; -2 if NaN . |
RealNum |
sin() |
Complex |
sqrt() |
RealNum |
tan() |
static RealNum |
times(RealNum x,
RealNum y) |
RatNum |
toExact()
Convert to an exact number.
|
static IntNum |
toExactInt(double value)
Converts an integral double (such as a toInt result) to an IntNum.
|
static IntNum |
toExactInt(double value,
int rounding_mode)
Converts real to an exact integer, with specified rounding mode.
|
IntNum |
toExactInt(int rounding_mode)
Converts to an exact integer, with specified rounding mode.
|
RealNum |
toInexact() |
static double |
toInt(double d,
int rounding_mode)
Converts a real to an integer, according to a specified rounding mode.
|
RealNum |
toInt(int rounding_mode)
Converts a real to an integer, according to a specified rounding mode.
|
static IntNum |
toScaledInt(double f,
int k)
Convert double to (rounded) integer, after multiplying by 10**k.
|
IntNum |
toScaledInt(int k)
Convert this to (rounded) integer, after multiplying by 10**k.
|
static IntNum |
toScaledInt(RatNum r,
int k)
Convert rational to (rounded) integer, after multiplying by 10**k.
|
static java.lang.String |
toStringDecimal(java.lang.String dstr) |
static java.lang.String |
toStringScientific(double d) |
static java.lang.String |
toStringScientific(float d) |
static java.lang.String |
toStringScientific(java.lang.String dstr)
Convert result of Double.toString or Float.toString to
scientific notation.
|
static int |
toStringScientific(java.lang.String dstr,
java.lang.StringBuffer sbuf) |
Quaternion |
unitQuaternion() |
Quaternion |
unitVector() |
Quaternion |
vectorPart() |
add, addReversed, colatitude, compare, compare, complexPart, divide, divReversed, equals, equals, imMinusOne, imOne, isExact, jm, km, longitude, make, make, mulReversed, neg, neg, polar, polar, power, times, toString
add, compare, divide, doubleImagValue, doubleJmagValue, doubleKmagValue, doubleRealValue, doubleValue, equals, jmMinusOne, jmOne, kmMinusOne, kmOne, longValue, make, make, neg, number, polar, polar, power, times
add, compare, compareReversed, dimensions, divide, imValue, jmValue, kmValue, make, make, make, reValue, times, unit
public final RealNum re()
Quantity
public final RealNum im()
Quantity
public final Quaternion vectorPart()
vectorPart
in class Complex
public final Quaternion unitVector()
unitVector
in class Complex
public final Quaternion unitQuaternion()
unitQuaternion
in class Complex
public final Quaternion conjugate()
public static boolean isReal(java.lang.Object value)
public static RealNum asRealNumOrNull(java.lang.Object value)
public abstract boolean isNegative()
public int classifyFinite()
Complex
classifyFinite
in class Complex
public abstract int sign()
>0
; 0 if ==0
; -1 if <0
; -2 if NaN
.public abstract Numeric add(java.lang.Object obj, int k)
Numeric
public RealNum rneg()
public RatNum toExact()
inexact->exact
(for real numbers).public static double toInt(double d, int rounding_mode)
public RealNum toInt(int rounding_mode)
public IntNum toExactInt(int rounding_mode)
public static IntNum toExactInt(double value, int rounding_mode)
public static IntNum toExactInt(double value)
public static IntNum toScaledInt(double f, int k)
public static IntNum toScaledInt(RatNum r, int k)
public IntNum toScaledInt(int k)
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public java.math.BigDecimal asBigDecimal()
public static java.lang.String toStringScientific(float d)
public static java.lang.String toStringScientific(double d)
public static java.lang.String toStringScientific(java.lang.String dstr)
public static int toStringScientific(java.lang.String dstr, java.lang.StringBuffer sbuf)
public static java.lang.String toStringDecimal(java.lang.String dstr)