protocol
ieee_754_fields_protocol
IEEE 754 exact bit-field support library protocol. Intended to be implemented by parameterized objects such as ieee_754_fields(Precision, ByteOrder).
logtalk_load(ieee_754(loader))staticPublic predicates
classify/2
Classifies an IEEE 754 encoding source term as zero, subnormal, normal, infinity, or not_a_number for the selected precision and byte order. Supported source terms are bytes(Bytes) and bits(Bits).
staticclassify(Source,Class)classify(++compound,--atom) - one_or_errorSource is a variable:instantiation_errorSource is neither a variable nor a valid source term:domain_error(ieee_754_source,Source)Source does not contain a valid encoding for the selected object:domain_error(ieee_754_encoding,Source)fields/5
Extracts the exact IEEE 754 sign bit, exponent bits, mantissa bits, and classification from a source term.
staticfields(Source,Sign,ExponentBits,MantissaBits,Class)fields(++compound,--integer,--integer,--integer,--atom) - one_or_errorSource is a variable:instantiation_errorSource is neither a variable nor a valid source term:domain_error(ieee_754_source,Source)Source does not contain a valid encoding for the selected object:domain_error(ieee_754_encoding,Source)finite_binary_rational/4
Extracts the exact finite IEEE 754 value as (-1)^Sign * Significand * 2^Exponent from a source term. Zero encodings return a zero significand and exponent 0.
staticfinite_binary_rational(Source,Sign,Significand,Exponent)finite_binary_rational(++compound,--integer,--integer,--integer) - one_or_errorSource is a variable:instantiation_errorSource is neither a variable nor a valid source term:domain_error(ieee_754_source,Source)Source does not contain a valid encoding for the selected object:domain_error(ieee_754_encoding,Source)Source does not encode a finite IEEE 754 value:domain_error(ieee_754_finite_encoding,Source)nan_payload/2
Extracts the raw NaN mantissa payload bits from a source term.
staticnan_payload(Source,PayloadBits)nan_payload(++compound,--integer) - one_or_errorSource is a variable:instantiation_errorSource is neither a variable nor a valid source term:domain_error(ieee_754_source,Source)Source does not contain a valid encoding for the selected object:domain_error(ieee_754_encoding,Source)Source does not encode a NaN value:domain_error(ieee_754_nan_encoding,Source)nan_kind/2
Classifies a NaN source term as quiet or signaling using the exact IEEE 754 quiet/signaling discriminator bit for the selected precision.
staticnan_kind(Source,Kind)nan_kind(++compound,--atom) - one_or_errorSource is a variable:instantiation_errorSource is neither a variable nor a valid source term:domain_error(ieee_754_source,Source)Source does not contain a valid encoding for the selected object:domain_error(ieee_754_encoding,Source)Source does not encode a NaN value:domain_error(ieee_754_nan_encoding,Source)precision/1
Returns the selected IEEE 754 precision. Expected values are half, single, or double.
staticprecision(Precision)precision(-atom) - oneorder/1
Returns the selected byte order. Expected values are big or little.
staticorder(ByteOrder)order(-atom) - onebyte_count/1
Returns the number of bytes used by the selected precision.
staticbyte_count(ByteCount)byte_count(-integer) - oneProtected predicates
(none)
Private predicates
(none)
Operators
(none)