package orsetto
- Overview
- No Docs
You can search for identifiers within the package.
in-package search v0.2.0
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=81283687ce3204263bc955a332dd7b90bf5b648a990c01160f33aaa77d80962f
md5=7346293aa013c2a8974c6fb7c521166a
doc/orsetto.cf/Cf_endian_core/index.html
Module Cf_endian_core
Utility functions for safe operations with byte-order sensitive data.
Overview
Ancillary internal functions used to check the validity of numeric quantity and octet sequence subrange parameters in the Cf_endian
interface.
Signatures
module type Unsafe = sig ... end
The functions in this module offer fast unsafe operations that provide correct behavior only when the parameters are valid, i.e. when the position and length are valid for the string or byte sequence, and when integer and float quantities can converted between representations without error.
module type Safe = sig ... end
This module type defines octet encoding and decoding schemes for the various integer and floating point types.
Modules
module Unsafe_octet : sig ... end
Include this module to include operations single-octet types.
Exception raised when conversion to binary16 or binary32 truncates the fractional part or overflows the exponent.
Use of_fp16_bits n
to convert a binary16 format integer representation of IEEE-754 "half-precision" floating point number.
Use to_fp16_bits n
to convert a floating point number into its binary16 format integer representation of IEEE-754 "half-precision" floating point. Raises Imprecise
if conversion truncates the fractional part or overflows the exponent.
Use to_fp32_bits n
to convert a floating point number into its binary32 format integer representation of IEEE-754 "single-precision" floating point. Raises Imprecise
if conversion truncates the fractional part or overflows the exponent.
Use to_fp16_bits n
to convert a floating point number into its binary16 format integer representation of IEEE-754 "half-precision" floating point. Fractional bits beyond the first ten are truncated. If the exponent is out of range, then infinity is returned. If n = nan
then result is the distinguished binary16 form of a signaling NaN.
Use to_fp32_bits n
to convert a floating point number into its binary32 format integer representation of IEEE-754 "single-precision" floating point. Fractional bits beyond the first ten are truncated. If the exponent is out of range, then infinity is returned. If n = nan
then result is the distinguished binary32 form of a signaling NaN.