public class IntFraction extends RatNum implements java.io.Externalizable
| Constructor and Description |
|---|
IntFraction(IntNum num,
IntNum den) |
| Modifier and Type | Method and Description |
|---|---|
Numeric |
add(java.lang.Object y,
int k)
Return this + k * obj.
|
Numeric |
addReversed(Numeric x,
int k)
Calculate x+k&this.
|
int |
compare(java.lang.Object obj)
Return an integer for which of
this or obj is larger. |
int |
compareReversed(Numeric x) |
IntNum |
denominator() |
Numeric |
div(java.lang.Object y) |
Numeric |
divReversed(Numeric x) |
double |
doubleValue()
The value of the real component, as a double.
|
boolean |
isNegative() |
long |
longValue() |
Numeric |
mul(java.lang.Object y) |
Numeric |
mulReversed(Numeric x) |
Numeric |
neg() |
static IntFraction |
neg(IntFraction x) |
IntNum |
numerator() |
void |
readExternal(java.io.ObjectInput in) |
int |
sign()
Return 1 if
>0; 0 if ==0; -1 if <0; -2 if NaN. |
java.lang.String |
toString(int radix) |
void |
writeExternal(java.io.ObjectOutput out) |
add, asRatNumOrNull, classifyFinite, compare, divide, equals, equals, infinity, isExact, isZero, make, neg, power, rationalize, rneg, times, toExact, toExactInt, toInt, valueOfabs, add, angle, asBigDecimal, asRealNumOrNull, compareTo, conjugate, cos, divide, exp, im, isReal, log, max, min, re, sin, sqrt, tan, times, toExactInt, toExactInt, toInexact, toInt, toScaledInt, toScaledInt, toScaledInt, toStringDecimal, toStringScientific, toStringScientific, toStringScientific, toStringScientific, unitQuaternion, unitVector, vectorPartadd, colatitude, compare, complexPart, divide, equals, imMinusOne, imOne, jm, km, longitude, make, make, neg, polar, polar, power, timesadd, compare, divide, doubleImagValue, doubleJmagValue, doubleKmagValue, doubleRealValue, equals, jmMinusOne, jmOne, kmMinusOne, kmOne, make, make, neg, number, polar, polar, power, timesadd, compare, dimensions, divide, imValue, jmValue, kmValue, make, make, make, reValue, times, unitpublic final IntNum denominator()
denominator in class RatNumpublic final boolean isNegative()
isNegative in class RealNumpublic final int sign()
RealNum>0; 0 if ==0; -1 if <0; -2 if NaN.public final int compare(java.lang.Object obj)
Numericthis or obj is larger.
Return 1 if this>obj; 0 if this==obj;
-1 if this<obj;
-2 if this!=obj otherwise (for example if either is NaN);
-3 if not comparable (incompatible types).public int compareReversed(Numeric x)
compareReversed in class Quantitypublic Numeric add(java.lang.Object y, int k)
Numericpublic Numeric addReversed(Numeric x, int k)
NumericaddReversed in class Complexpublic Numeric mulReversed(Numeric x)
mulReversed in class Complexpublic Numeric divReversed(Numeric x)
divReversed in class Complexpublic static IntFraction neg(IntFraction x)
public long longValue()
longValue in class Quaternionpublic double doubleValue()
QuantitydoubleValue in class Quaternionpublic void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOExceptionpublic void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOExceptionjava.lang.ClassNotFoundException