MantissaExponent
Keywords: com.sharkysoft.math.MantissaExponent class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| sharkysoft.com
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sharkysoft.math
Class MantissaExponent

    java.lang.Object
      com.sharkysoft.math.MantissaExponent

public final class MantissaExponent
extends java.lang.Object

Real value in scientific notation.

Details: A `MantissaExponent` represents the base 10 "scientific notation" of a real value. Instances of this class are returned exclusively by `MathToolbox.toScientificNotation`.

Author:
  Sharky

Field Summary
`protected int` | `mnExponent` Exponent.
`protected java.math.BigDecimal` | `mpMantissa` Mantissa.
`static int` | `NAN` Exponent value for NaN.
`static int` | `NEG_INF` Exponent value for NaN.
`static int` | `POS_INF` Exponent value for NaN.

Method Summary
`int` | `getExponent()` Retrieves Exponent property.
`java.math.BigDecimal` | `getMantissa()` Retrieves Mantissa property.
`java.lang.String` | `toString()` Generates scientific notation string.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### NAN

    public static final int NAN

  Exponent value for NaN.

  Details: If `getMantissa()` for an instance of `MantissaExponent` returns `null` and `getExponent()` for the same instance returns `NAN`, then the instance represents the NaN value.

  See Also:
    Constant Field Values

### NEG_INF

    public static final int NEG_INF

  Exponent value for NaN.

  Details: If `getMantissa()` for an instance of `MantissaExponent` returns `null` and `getExponent()` for the same instance returns `NEG_INF`, then the instance represents negative infinity.

  See Also:
    Constant Field Values

### POS_INF

    public static final int POS_INF

  Exponent value for NaN.

  Details: If `getMantissa()` for an instance of `MantissaExponent` returns `null` and `getExponent()` for the same instance returns `POS_INF`, then the instance represents positive infinity.

  See Also:
    Constant Field Values

### mpMantissa

    protected final java.math.BigDecimal mpMantissa

  Mantissa.

  Details: Property `Mantissa` is the mantissa part of the scientific notation.

  See Also:
    `getMantissa()`

### mnExponent

    protected final int mnExponent

  Exponent.

  Details: Property `Exponent` is the exponent part of the scientific notation.

  See Also:
    `getExponent()`

Method Detail

### getMantissa

    public java.math.BigDecimal getMantissa()

  Retrieves Mantissa property.

  Returns:
    current value
  See Also:
    `mpMantissa`

### getExponent

    public int getExponent()

  Retrieves Exponent property.

  Returns:
    current value
  See Also:
    `mnExponent`

### toString

    public java.lang.String toString()

  Generates scientific notation string.

  Details: `toString` renders this real value to a string in scientific notation, using the format "Mantissa*10^Exponent". If this value is not rational (i.e., NaN or Infinite), then this method returns the same string as `Float.toString(float)` would for these special values.

  Returns:
    the string

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| sharkysoft.com
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1997-2004 Sharkysoft (sharkysoft.com). All rights reserved.