FloatingPoint8E4M3Value class
The E4M3 representation of a 8-bit floating point value as defined in FP8 Formats for Deep Learning.
- Inheritance
-
- Object
- FloatingPointValue
- FloatingPoint8E4M3Value
Constructors
- FloatingPoint8E4M3Value({required LogicValue sign, required LogicValue exponent, required LogicValue mantissa})
- Constructor for a double precision floating point value
- FloatingPoint8E4M3Value.ofBigInts(BigInt exponent, BigInt mantissa, {bool sign = false})
- FloatingPoint8E4M3Value constructor from a set of BigInts of the binary representation
- FloatingPoint8E4M3Value.ofBinaryStrings(String sign, String exponent, String mantissa)
- FloatingPoint8E4M3Value constructor from string representation of individual bitfields
- FloatingPoint8E4M3Value.ofDouble(double inDouble)
-
Numeric conversion of a FloatingPoint8E4M3Value from a host double
factory
- FloatingPoint8E4M3Value.ofInts(int exponent, int mantissa, {bool sign = false})
- FloatingPoint8E4M3Value constructor from a set of ints of the binary representation
- FloatingPoint8E4M3Value.ofLogicValue(LogicValue val)
-
Construct a FloatingPoint8E4M3Value from a Logic word
factory
- FloatingPoint8E4M3Value.ofSpacedBinaryString(String fp)
- FloatingPoint8E4M3Value constructor from spaced string representation of individual bitfields
- FloatingPoint8E4M3Value.ofString(String fp, {int radix = 2})
- FloatingPoint8E4M3Value constructor from a single string representing space-separated bitfields
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
- 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
- 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
Methods
-
abs(
) → FloatingPointValue -
Absolute value operation for FloatingPointValue
inherited
-
compareTo(
Object other) → int -
Floating point comparison to implement Comparable<>
inherited
-
isNaN(
) → bool -
Return true if the represented floating point number is considered
NaN or 'Not a Number' due to overflow
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
-
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
-
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
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 ==(
Object other) → bool -
Return the bias of this FP format
inherited
Static Properties
Constants
- exponentWidth → const int
- The exponent width
- mantissaWidth → const int
- The mantissa width