dwvisser.math
Class UncertainNumber
java.lang.Object
|
+--dwvisser.math.UncertainNumber
- All Implemented Interfaces:
- java.io.Serializable
- public class UncertainNumber
- extends java.lang.Object
- implements java.io.Serializable
- See Also:
- Serialized Form
Field Summary |
double |
error
The uncertainty. |
double |
value
The best estimate of the value. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
value
public double value
- The best estimate of the value.
error
public double error
- The uncertainty.
UncertainNumber
public UncertainNumber(double value,
double error)
- Constructor.
UncertainNumber
public UncertainNumber(double value)
plus
public UncertainNumber plus(UncertainNumber x)
minus
public UncertainNumber minus(UncertainNumber x)
minus
public UncertainNumber minus(double x)
times
public UncertainNumber times(UncertainNumber x)
times
public UncertainNumber times(double x)
divide
public UncertainNumber divide(UncertainNumber x)
divide
public UncertainNumber divide(double x)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
plusMinusString
public java.lang.String plusMinusString()
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
main
public static void main(java.lang.String[] args)