TorchLean API

FloatLib.Floats.Formats.BinaryInterchange.StaticByte.Conversion.Instances

Ordinary interfaces and exact conversion for static-byte formats #

Every nominal static-byte family uses the same descriptor-level rules for literals, negation, comparison, and display. Defining those instances here keeps standards packages focused on their encodings and kernels instead of repeating adapters around the binary proof model.

Natural and decimal literals are rounded once from exact rationals; they never pass through a host floating-point value. This module also installs the exact decoder, explicit-policy quantizer, and default quantization context shared by these families.

@[instance_reducible]

Print the mathematical binary value rather than the compact byte carrier.

@[instance_reducible]

Compare through the exact-width binary model.

NaNs remain unordered, signed zeros compare equal, and finite-only descriptors inherit the same descriptor-generic rule without a format-specific comparison implementation.

@[instance_reducible]

Round a natural literal once, to nearest with ties to even, in the destination descriptor.

@[instance_reducible]

Round a decimal or scientific literal once from its exact rational value.

@[instance_reducible]

Negate the proof-model value and repack it into the same direct byte carrier.

@[instance_reducible]

Every nominal static-byte binary destination uses the shared explicit binary policy.

@[instance_reducible]

Context-free conversion uses the canonical binary conversion context.