FloatingPointBF16Value class
A representation of a BF16 floating-point value.
- Inheritance
-
- Object
- FloatingPointValue
- FloatingPointBF16Value
Constructors
- FloatingPointBF16Value({required LogicValue sign, required LogicValue exponent, required LogicValue mantissa})
- Constructor for a single precision floating point value
- FloatingPointBF16Value.getFloatingPointConstant(FloatingPointConstants constantFloatingPoint)
-
Return the FloatingPointBF16Value representing the constant specified
factory
- FloatingPointBF16Value.ofBigInts(BigInt exponent, BigInt mantissa, {bool sign = false})
- FloatingPointBF16Value constructor from a set of BigInts of the binary representation
- FloatingPointBF16Value.ofBinaryStrings(String sign, String exponent, String mantissa)
- FloatingPointBF16Value constructor from string representation of individual bitfields
- FloatingPointBF16Value.ofDouble(double inDouble)
-
Numeric conversion of a FloatingPointBF16Value from a host double
factory
- FloatingPointBF16Value.ofDoubleUnrounded(double inDouble)
-
Convert a floating point number into a FloatingPointBF16Value
representation. This form performs NO ROUNDING.
factory
- FloatingPointBF16Value.ofInts(int exponent, int mantissa, {bool sign = false})
- FloatingPointBF16Value constructor from a set of ints of the binary representation
- FloatingPointBF16Value.ofLogicValue(LogicValue val)
-
Construct a FloatingPointBF16Value from a Logic word
factory
- FloatingPointBF16Value.ofSpacedBinaryString(String fp)
- FloatingPointBF16Value constructor from spaced string representation of individual bitfields
- FloatingPointBF16Value.ofString(String fp, {int radix = 2})
- FloatingPointBF16Value constructor from a single string representing space-separated bitfields
- FloatingPointBF16Value.random(Random rv, {bool normal = false})
-
Generate a random FloatingPointBF16Value, supplying random seed
rv
.factory
Properties
- bias → int
-
Return the bias of this FloatingPointValue.
no setterinherited
- constrainedExponentWidth → int
-
constrainedExponentWidth is the hard-coded exponent width of the
sub-class of this floating-point value
no setteroverride
- constrainedMantissaWidth → int
-
constrainedMantissaWidth is the hard-coded mantissa width of the
sub-class of this floating-point value
no setteroverride
- exponent → LogicValue
-
The exponent of the floating point: this is biased about a midpoint for
positive and negative exponents
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- infinity → FloatingPointValue
-
Abbreviation Functions for common constants
Return the Infinity value for this FloatingPointValue size.
no setterinherited
- isAnInfinity → bool
-
Return true if the represented floating point number is considered
infinity or negative infinity
no setterinherited
- isExponentAllOnes → bool
-
Test if exponent is all '1's.
no setterinherited
- isExponentAllZeros → bool
-
Test if exponent is all '0's.
no setterinherited
- isMantissaAllZeroes → bool
-
Test if mantissa is all '0's.
no setterinherited
- isNaN → bool
-
Return true if the represented floating point number is considered
NaN or 'Not a Number'
no setterinherited
- isZero → bool
-
Return true if the represented floating point number is zero. Note
that the equality operator will treat
FloatingPointConstants.positiveZero
and FloatingPointConstants.negativeZero as equal.
no setterinherited
- mantissa → LogicValue
-
The mantissa of the floating point
finalinherited
- maxExponent → int
-
Return the maximum exponent of this FloatingPointValue.
no setterinherited
- minExponent → int
-
Return the minimum exponent of this FloatingPointValue.
no setterinherited
- nan → FloatingPointValue
-
Return the Negative Infinity value for this FloatingPointValue size.
no setterinherited
- negativeInfinity → FloatingPointValue
-
Return the Negative Infinity value for this FloatingPointValue size.
no setterinherited
- one → FloatingPointValue
-
Return the value one for this FloatingPointValue size.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sign → LogicValue
-
The sign of the value: 1 means a negative value
finalinherited
- value → LogicValue
-
The full floating point value bit storage
finalinherited
- zero → FloatingPointValue
-
Return the Negative Infinity value for this FloatingPointValue size.
no setterinherited
Methods
-
abs(
) → FloatingPointBF16Value -
Absolute value operation for FloatingPointBF16Value
override
-
compareTo(
Object other) → int -
Floating point comparison to implement Comparable<>
inherited
-
isNormal(
) → bool -
Return a Logic true if this FloatingPointVa;ie contains a normal number,
defined as having mantissa in the range [1,2)
inherited
-
isSubnormal(
) → bool -
Return true if the represented floating point number is considered
'subnormal', including isZero.
inherited
-
negate(
) → FloatingPointBF16Value -
Negate operation for FloatingPointBF16Value
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDouble(
) → double -
Return the value of the floating point number in a Dart double type.
inherited
-
toMappedSubtype(
) → FloatingPointValue -
Converts this FloatingPointValue to a FloatingPointValue with the same
sign, exponent, and mantissa using the constructor provided in
subtypeConstructorMap if available, otherwise using the default
constructor.
inherited
-
toString(
{bool integer = false}) → String -
Return a string representation of FloatingPointValue.
if
integer
is true, return sign, exponent, mantissa as integers. ifinteger
is false, return sign, exponent, mantissa as ibinary strings.inherited -
ulp(
) → FloatingPointValue -
Compute the unit in the last place for the given FloatingPointValue
inherited
-
withinRounding(
FloatingPointValue other) → bool -
Return true if the other FloatingPointValue is within a rounding
error of this value.
inherited
Operators
-
operator *(
covariant FloatingPointBF16Value multiplicand) → FloatingPointBF16Value -
Multiply operation for FloatingPointBF16Value
override
-
operator +(
covariant FloatingPointBF16Value addend) → FloatingPointBF16Value -
Addition operation for FloatingPointBF16Value
override
-
operator -(
covariant FloatingPointBF16Value subend) → FloatingPointBF16Value -
Subtract operation for FloatingPointBF16Value
override
-
operator /(
covariant FloatingPointBF16Value divisor) → FloatingPointBF16Value -
Divide operation for FloatingPointBF16Value
override
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- exponentWidth → const int
- The exponent width
- mantissaWidth → const int
- The mantissa width