category
ieee_754_common(Precision,ByteOrder)
Shared IEEE 754 exact bit and byte handling predicates for the high-level codec and low-level field inspection objects.
logtalk_load(ieee_754(loader))staticPublic predicates
(no local declarations; see entity ancestors if any)
Protected predicates
source_bits/2
Validates and normalizes a source term into canonical-order unsigned integer bits for the selected precision and byte order.
staticsource_bits(Source,Bits)source_bits(++compound,--integer) - one_or_errorbits_fields/5
Extracts exact IEEE 754 sign, exponent bits, mantissa bits, and a class atom from a validated bit pattern.
staticbits_fields(Bits,Sign,ExponentBits,MantissaBits,Class)bits_fields(+integer,-integer,-integer,-integer,-atom) - onebits_finite_binary_rational/4
Extracts an exact finite IEEE 754 value from a validated bit pattern as (-1)^Sign * Significand * 2^Exponent.
staticbits_finite_binary_rational(Bits,Sign,Significand,Exponent)bits_finite_binary_rational(+integer,-integer,-integer,-integer) - zero_or_onebits_nan_payload/2
Extracts the raw NaN mantissa payload bits from a validated bit pattern.
staticbits_nan_payload(Bits,PayloadBits)bits_nan_payload(+integer,-integer) - zero_or_onebits_nan_kind/2
Classifies a validated NaN bit pattern as quiet or signaling using the quiet/signaling discriminator bit for the selected precision.
staticbits_nan_kind(Bits,Kind)bits_nan_kind(+integer,-atom) - zero_or_onecanonical_nan_bits/1
Returns the canonical quiet NaN bit pattern for the selected precision.
staticcanonical_nan_bits(Bits)canonical_nan_bits(-integer) - onenan_bits/1
True when the validated bit pattern encodes a NaN value for the selected precision.
staticnan_bits(Bits)nan_bits(+integer) - zero_or_onevalid_bits/1
True when the integer fits in the selected precision bit width.
staticvalid_bits(Bits)valid_bits(+integer) - zero_or_onecanonical_order_bytes/3
Converts byte lists from the selected byte order to canonical big-endian order.
staticcanonical_order_bytes(ByteOrder,Bytes,CanonicalBytes)canonical_order_bytes(+atom,+list(integer),-list(integer)) - oneorder_bytes/3
Converts canonical big-endian bytes to the selected byte order.
staticorder_bytes(ByteOrder,CanonicalBytes,Bytes)order_bytes(+atom,+list(integer),-list(integer)) - onebytes_tail/3
Builds a difference list from a byte list.
staticbytes_tail(Bytes,DifferenceList,Tail)bytes_tail(+list(integer),-list(integer),?list(integer)) - onebytes_to_unsigned_integer/2
Converts canonical-order bytes into an unsigned integer.
staticbytes_to_unsigned_integer(Bytes,Integer)bytes_to_unsigned_integer(+list(integer),-integer) - onebytes_to_unsigned_integer/3
Worker predicate for converting canonical-order bytes into an unsigned integer.
staticbytes_to_unsigned_integer(Bytes,Integer0,Integer)bytes_to_unsigned_integer(+list(integer),+integer,-integer) - oneinteger_to_bytes/3
Converts an unsigned integer into a canonical-order byte list with the requested length.
staticinteger_to_bytes(Count,Integer,Bytes)integer_to_bytes(+integer,+integer,-list(integer)) - onezero_bits/2
Returns the zero encoding bits with the requested sign bit.
staticzero_bits(Sign,Bits)zero_bits(+integer,-integer) - onezero_from_sign/2
Constructs a positive or negative floating-point zero from a sign bit.
staticzero_from_sign(Sign,Zero)zero_from_sign(+integer,-float) - oneapply_float_sign/3
Applies a sign bit to a positive floating-point magnitude.
staticapply_float_sign(Sign,Magnitude,Value)apply_float_sign(+integer,+float,-float) - oneprecision_spec/5
Returns the exponent width, mantissa width, exponent bias, and byte count for a supported IEEE 754 precision.
staticprecision_spec(Precision,ExponentWidth,MantissaWidth,Bias,ByteCount)precision_spec(+atom,-integer,-integer,-integer,-integer) - onePrivate predicates
(no local declarations; see entity ancestors if any)
Operators
(none)