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, valueOf abs, 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, vectorPart add, colatitude, compare, complexPart, divide, equals, imMinusOne, imOne, jm, km, longitude, make, make, neg, polar, polar, power, times add, compare, divide, doubleImagValue, doubleJmagValue, doubleKmagValue, doubleRealValue, equals, jmMinusOne, jmOne, kmMinusOne, kmOne, make, make, neg, number, polar, polar, power, times add, compare, dimensions, divide, imValue, jmValue, kmValue, make, make, make, reValue, times, unit add, asNumericOrNull, div_inv, floatValue, geq, grt, intValue, mul_ident, sub, toString byteValue, shortValueclone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic final IntNum denominator()
denominator in class RatNum public final boolean isNegative()
isNegative in class RealNum public final int sign()
RealNum >0; 0 if ==0; -1 if <0; -2 if NaN.public final int compare(java.lang.Object obj)
Numeric this 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 Quantity public Numeric add(java.lang.Object y, int k)
Numeric public Numeric addReversed(Numeric x, int k)
Numeric x+k&this.addReversed in class Complex public Numeric mulReversed(Numeric x)
mulReversed in class Complex public Numeric divReversed(Numeric x)
divReversed in class Complex public static IntFraction neg(IntFraction x)
public long longValue()
longValue in class Quaternion public double doubleValue()
Quantity doubleValue in class Quaternion public 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