FloatingPoint16Value class
A representation of an FP16 floating-point value.
- Inheritance
-
- Object
- FloatingPointValue
- FloatingPoint16Value
Constructors
- FloatingPoint16Value.new({required LogicValue sign, required LogicValue exponent, required LogicValue mantissa})
-
Constructor for a FP16 floating point value.
factory
- FloatingPoint16Value.uninitialized()
- Creates an unpopulated version, intended to be called with the populator.
Properties
- bias → int
-
Return the bias of this FloatingPointValue, the offset of the
exponent, also representing the zero exponent
2^0 = 1
.no setterinherited - explicitJBit → bool
-
Return
true
if the JBit is explicitly represented in the mantissa.no setterinherited - exponent ↔ LogicValue
-
The exponent of the FloatingPointValue: this is biased about a midpoint
for positive and negative exponents.
latefinalinherited
- exponentWidth → int
-
The exponent width.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isAnInfinity → bool
-
Return
true
if the represented floating point number is considered infinity or negative infinity.no setterinherited - isAZero → 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 - 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 - mantissa ↔ LogicValue
-
The mantissa of the floating point.
latefinalinherited
- mantissaWidth → int
-
The mantissa width.
final
- maxExponent → int
-
Return the maximum exponent of this FloatingPointValue.
no setterinherited
- minExponent → int
-
Return the minimum exponent of this FloatingPointValue.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sign ↔ LogicValue
-
The sign of the FloatingPointValue: 1 means a negative value.
latefinalinherited
- subNormalAsZero → bool
-
Return
true
if subnormal numbers are treated as zero.no setterinherited - supportsInfinities → bool
-
Indicates whether FloatingPointConstants.positiveInfinity and
FloatingPointConstants.negativeInfinity representations are supported.
no setterinherited
- value → LogicValue
-
The full floating point value concatenated as a LogicValue.
latefinalinherited
Methods
-
abs(
) → FloatingPointValue -
Absolute value operation for FloatingPointValue.
inherited
-
canonicalize(
) → FloatingPointValue -
Return the cananocalized form of FloatingPointValue which
has the leading 1 at the front of the mantissa, or further right if
subnormal.
inherited
-
clonePopulator(
) → FloatingPointValuePopulator< FloatingPointValue> -
Creates a FloatingPointValuePopulator for the same type as
this
and with the same widths.override -
compareTo(
Object other) → int -
Floating point comparison to implement Comparable.
inherited
-
getSpecialConstantComponents(
FloatingPointConstants constantFloatingPoint) → ({LogicValue exponent, LogicValue mantissa, LogicValue sign})? -
Returns a tuple of LogicValues for the sign, exponent, and
mantissa components of a special constant, or
null
if the constant does not have special components.This is useful for constants like NaN, infinity, etc., in certain types of floating point representations.inherited -
isLegalValue(
) → bool -
Check if the mantissa and exponent stored are compatible.
inherited
-
isNormal(
) → bool -
Return
true
if this FloatingPointValue 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 isAZero.inherited -
negate(
) → FloatingPointValue -
Negate operation for FloatingPointValue.
inherited
-
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
-
toString(
{bool integer = false}) → String -
Return a string representation of FloatingPointValue.
inherited
-
ulp(
) → FloatingPointValue -
Compute the unit in the last place for the given FloatingPointValue.
inherited
-
validate(
) → void -
Validate the FloatingPointValue to ensure widths and other
characteristics are legal.
inherited
-
withinRounding(
FloatingPointValue other) → bool -
Return
true
if the other FloatingPointValue is within a rounding error of this value.inherited
Operators
-
operator *(
FloatingPointValue multiplicand) → FloatingPointValue -
Multiply operation for FloatingPointValue.
inherited
-
operator +(
FloatingPointValue addend) → FloatingPointValue -
Addition operation for FloatingPointValue.
inherited
-
operator -(
FloatingPointValue subend) → FloatingPointValue -
Subtract operation for FloatingPointValue.
inherited
-
operator /(
FloatingPointValue divisor) → FloatingPointValue -
Divide operation for FloatingPointValue.
inherited
-
operator <(
FloatingPointValue other) → bool -
Less-than operator for FloatingPointValue.
inherited
-
operator <=(
FloatingPointValue other) → bool -
Less-than-or-equal operator for FloatingPointValue.
inherited
-
operator ==(
Object other) → bool -
Equality operator for FloatingPointValue.
inherited
-
operator >(
FloatingPointValue other) → bool -
Greater-than operator for FloatingPointValue.
inherited
-
operator >=(
FloatingPointValue other) → bool -
Greater-than-or-equal operator for FloatingPointValue.
inherited
-
operator unary-(
) → FloatingPointValue -
Negate the FloatingPointValue.
inherited
Static Methods
-
populator(
) → FloatingPointValuePopulator< FloatingPoint16Value> -
Creates a FloatingPointValuePopulator, which can then be used to
complete construction using population functions.
override