coins.util
Class FloatConst

java.lang.Object
  extended bycoins.util.FloatConst

public abstract class FloatConst
extends java.lang.Object

..............(..............).

...................................................................................................................................... ..........................................................2......................

..............IEEE 754..............(....................)............ .................................................................................................................... ..............................................

....(........................)..................................................................................................

......................................................(*....................)

............
16..................11*5
......24*8
......53*11
x86..........6415
4......113*15


Nested Class Summary
static class FloatConst.RoundingMode
          .........................................
 
Field Summary
static FloatConst F32_0
          ........0.0
static FloatConst F32_1
          ........1.0
static FloatConst F64_0
          ........0.0
static FloatConst F64_1
          ........1.0
static FloatConst.RoundingMode ROUND_MINUS
          ..........................
static FloatConst.RoundingMode ROUND_NEAREST
          ......................
static FloatConst.RoundingMode ROUND_PLUS
          ..........................
static FloatConst.RoundingMode ROUND_ZERO
          ..........................
 
Method Summary
abstract  FloatConst add(FloatConst c)
          ....this+c.......................
abstract  IntConst convfi(int size, FloatConst.RoundingMode r)
          .....................................................................................
abstract  FloatConst convft(int msize, int esize)
          .................................................................................
abstract  FloatConst convfx(int msize, int esize)
          .................................................................................
abstract  FloatConst div(FloatConst c)
          ....this/c.......................
abstract  double doubleValue()
          ....................double...........
abstract  boolean equals(java.lang.Object o)
          .................................................................
abstract  int esize()
          .......................
abstract  float floatValue()
          ....................float...........
static FloatConst fromBigIntegerBits(int msize, int esize, java.math.BigInteger bits)
          ........................................................................................................(..................).................................................
static FloatConst fromExplicitBigIntegerBits(int msize, int esize, java.math.BigInteger bits)
          ........................................................................................................(..................).................................................
abstract  int hashCode()
          .........................................
abstract  int msize()
          .......................
abstract  FloatConst mul(FloatConst c)
          ....this*c.......................
abstract  FloatConst neg()
          ....-this.......................
abstract  FloatConst sub(FloatConst c)
          ....this-c.......................
abstract  java.math.BigDecimal toBigDecimal()
          ....................BigDecimal...............
abstract  java.math.BigInteger toBigInteger(FloatConst.RoundingMode r)
          ............................................BigInteger...............
abstract  java.math.BigInteger toBigIntegerBits()
          ..................................................(..................)..............BigInteger...............
abstract  java.lang.String toDecimalString()
          ....................10...................
abstract  java.math.BigInteger toExplicitBigIntegerBits()
          ..................................................(..................)..............BigInteger...............
abstract  java.lang.String toString()
          .....................................
abstract  IntConst tsteq(FloatConst c, int size)
          this==c......1................0.......................................
abstract  IntConst tstges(FloatConst c, int size)
          this>=c......1................0.......................................
abstract  IntConst tstgts(FloatConst c, int size)
          this>c......1................0.......................................
abstract  IntConst tstles(FloatConst c, int size)
          this<=c......1................0.......................................
abstract  IntConst tstlts(FloatConst c, int size)
          this<c......1................0.......................................
abstract  IntConst tstne(FloatConst c, int size)
          this!=c......1................0.......................................
static FloatConst valueOf(int msize, int esize, java.math.BigDecimal val)
          ................................................(BigDecimal)...........................
static FloatConst valueOf(int msize, int esize, java.math.BigInteger val)
          ................................................(bigInteger)...........................
static FloatConst valueOf(int msize, int esize, double val)
          ................................................(double)...........................
static FloatConst valueOf(int msize, int esize, long val)
          ................................................(long)...........................
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

F32_0

public static final FloatConst F32_0
........0.0


F32_1

public static final FloatConst F32_1
........1.0


F64_0

public static final FloatConst F64_0
........0.0


F64_1

public static final FloatConst F64_1
........1.0


ROUND_NEAREST

public static final FloatConst.RoundingMode ROUND_NEAREST
......................


ROUND_MINUS

public static final FloatConst.RoundingMode ROUND_MINUS
..........................


ROUND_PLUS

public static final FloatConst.RoundingMode ROUND_PLUS
..........................


ROUND_ZERO

public static final FloatConst.RoundingMode ROUND_ZERO
..........................

Method Detail

valueOf

public static FloatConst valueOf(int msize,
                                 int esize,
                                 double val)
................................................(double)........................... ....................................................................

Throws:
IllegalArgumentException - ..................3..1073741823..............................2..30..............

valueOf

public static FloatConst valueOf(int msize,
                                 int esize,
                                 java.math.BigDecimal val)
................................................(BigDecimal)........................... ............................................................................................................

Throws:
IllegalArgumentException - ..................3..1073741823..............................2..30..............

valueOf

public static FloatConst valueOf(int msize,
                                 int esize,
                                 long val)
................................................(long)........................... ....................................................................

Throws:
IllegalArgumentException - ..................3..1073741823..............................2..30..............

valueOf

public static FloatConst valueOf(int msize,
                                 int esize,
                                 java.math.BigInteger val)
................................................(bigInteger)........................... ....................................................................

Throws:
IllegalArgumentException - ..................3..1073741823..............................2..30..............

fromBigIntegerBits

public static FloatConst fromBigIntegerBits(int msize,
                                            int esize,
                                            java.math.BigInteger bits)
........................................................................................................(..................)................................................. ..............NaN..........................................................

Throws:
IllegalArgumentException - ..................3..1073741823..............................2..30..............

fromExplicitBigIntegerBits

public static FloatConst fromExplicitBigIntegerBits(int msize,
                                                    int esize,
                                                    java.math.BigInteger bits)
........................................................................................................(..................)................................................. ......................0..............0............................ ......................1..............0..................1........ ..............NaN..........................................................

Throws:
IllegalArgumentException - ..................3..1073741823..............................2..30..............

msize

public abstract int msize()
....................... ...................................................................... ......................


esize

public abstract int esize()
....................... ...................................................................... ......................


add

public abstract FloatConst add(FloatConst c)
....this+c.......................

Throws:
IllegalArgumentException - ..................................................................

sub

public abstract FloatConst sub(FloatConst c)
....this-c.......................

Throws:
IllegalArgumentException - ..................................................................

mul

public abstract FloatConst mul(FloatConst c)
....this*c.......................

Throws:
IllegalArgumentException - ..................................................................

div

public abstract FloatConst div(FloatConst c)
....this/c.......................

Throws:
IllegalArgumentException - ..................................................................

neg

public abstract FloatConst neg()
....-this.......................


tsteq

public abstract IntConst tsteq(FloatConst c,
                               int size)
this==c......1................0.......................................

Throws:
IllegalArgumentException - ..................................................................

tstne

public abstract IntConst tstne(FloatConst c,
                               int size)
this!=c......1................0.......................................

Throws:
IllegalArgumentException - ..................................................................

tstlts

public abstract IntConst tstlts(FloatConst c,
                                int size)
this<c......1................0.......................................

Throws:
IllegalArgumentException - ..................................................................

tstgts

public abstract IntConst tstgts(FloatConst c,
                                int size)
this>c......1................0.......................................

Throws:
IllegalArgumentException - ..................................................................

tstles

public abstract IntConst tstles(FloatConst c,
                                int size)
this<=c......1................0.......................................

Throws:
IllegalArgumentException - ..................................................................

tstges

public abstract IntConst tstges(FloatConst c,
                                int size)
this>=c......1................0.......................................

Throws:
IllegalArgumentException - ..................................................................

convfx

public abstract FloatConst convfx(int msize,
                                  int esize)
.................................................................................

Throws:
IllegalArgumentException - ..............................1073741823..............................................30..................

convft

public abstract FloatConst convft(int msize,
                                  int esize)
................................................................................. ....................................................................

Throws:
IllegalArgumentException - ..................3..............................................2..............................

convfi

public abstract IntConst convfi(int size,
                                FloatConst.RoundingMode r)
..................................................................................... ..............................................................................

Throws:
IllegalArgumentException - ................................NaN......

floatValue

public abstract float floatValue()
....................float...........


doubleValue

public abstract double doubleValue()
....................double...........


toBigDecimal

public abstract java.math.BigDecimal toBigDecimal()
....................BigDecimal............... BigDecimal..............(10scale*this)............................


toBigInteger

public abstract java.math.BigInteger toBigInteger(FloatConst.RoundingMode r)
............................................BigInteger...............

Throws:
IllegalArgumentException - ................................NaN......

toBigIntegerBits

public abstract java.math.BigInteger toBigIntegerBits()
..................................................(..................)..............BigInteger...............


toExplicitBigIntegerBits

public abstract java.math.BigInteger toExplicitBigIntegerBits()
..................................................(..................)..............BigInteger............... ........msb....................................0........


equals

public abstract boolean equals(java.lang.Object o)
.................................................................


hashCode

public abstract int hashCode()
.........................................


toString

public abstract java.lang.String toString()
..................................... ................"(FloatConst F24+8 1.25)"..............


toDecimalString

public abstract java.lang.String toDecimalString()
....................10................... ................"1.25"..............