FloatingPointValuePopulator<FpvType extends FloatingPointValue> class
A populator for FloatingPointValues, a utility that can populate various forms of FloatingPointValues.
Constructors
- FloatingPointValuePopulator(FpvType _unpopulated)
-
Creates a FloatingPointValuePopulator for the given
_unpopulated
FloatingPointValue.
Properties
- bias → int
-
The bias of floating point value.
no setter
- exponentWidth → int
-
The width of the exponent field.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- mantissaWidth → int
-
The width of the mantissa field.
no setter
- maxExponent → int
-
The maximum exponent value.
no setter
- minExponent → int
-
The minimum exponent value.
no setter
- nan → FpvType
-
Creates a new FloatingPointValue representing
FloatingPointConstants.nan.
no setter
- negativeInfinity → FpvType
-
Creates a new FloatingPointValue representing
FloatingPointConstants.negativeInfinity.
no setter
- negativeZero → FpvType
-
Creates a new FloatingPointValue representing
FloatingPointConstants.negativeZero.
no setter
- one → FpvType
-
Creates a new FloatingPointValue representing
FloatingPointConstants.one.
no setter
- positiveInfinity → FpvType
-
Creates a new FloatingPointValue representing
FloatingPointConstants.positiveInfinity.
no setter
- positiveZero → FpvType
-
Creates a new FloatingPointValue representing
FloatingPointConstants.positiveZero.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
ofBigInts(
BigInt exponent, BigInt mantissa, {bool sign = false}) → FpvType - FloatingPointValue constructor from a set of BigInts of the binary representation and the size of the exponent and mantissa
-
ofBinaryStrings(
String sign, String exponent, String mantissa) → FpvType - FloatingPointValue constructor from a binary string representation of individual bitfields
-
ofConstant(
FloatingPointConstants constantFloatingPoint) → FpvType -
Creates a new FloatingPointValue represented by the given
constantFloatingPoint
. -
ofDouble(
double inDouble, {FloatingPointRoundingMode roundingMode = FloatingPointRoundingMode.roundNearestEven}) → FpvType - Convert from double using its native binary representation
-
ofDoubleUnrounded(
double inDouble) → FpvType - Convert a floating point number into a FloatingPointValue representation. This form performs NO ROUNDING.
-
ofFloatingPoint(
FloatingPoint fp) → FpvType -
Extracts a FloatingPointValue from a FloatingPoint's current
value
. -
ofFloatingPointPrevious(
FloatingPoint fp) → FpvType? -
Extracts a FloatingPointValue from a FloatingPoint's
previousValue
. -
ofInts(
int exponent, int mantissa, {bool sign = false}) → FpvType - FloatingPointValue constructor from a set of ints of the binary representation and the size of the exponent and mantissa
-
ofLogicValue(
LogicValue val) → FpvType - Construct a FloatingPointValue from a LogicValue
-
ofSpacedBinaryString(
String fp) → FpvType - FloatingPointValue constructor from a single binary string representing space-separated bitfields in the order of sign, exponent, mantissa.
-
ofString(
String fp, {int radix = 2}) → FpvType - FloatingPointValue constructor from a radix-encoded string representation and the size of the exponent and mantissa
-
populate(
{required LogicValue sign, required LogicValue exponent, required LogicValue mantissa}) → FpvType -
Populates the FloatingPointValue with the given
sign
,exponent
, andmantissa
, then performs additional validation. -
random(
Random rv, {bool normal = false}) → FpvType -
Generate a random FloatingPointValue, supplying random seed
rv
. -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited