1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//! # **ToBit trait** - *IEEE 754 bit conversion*
// Copyright (c) 2025 SpaceCell Enterprises Ltd
// SPDX-License-Identifier: AGPL-3.0-or-later
// Commercial licensing available. See LICENSE and LICENSING.md.
/// Generic trait for converting floating-point types to their IEEE 754 bit representation.
///
/// Unifies access to a `to_bits` method across different floating-point types,
/// enabling generic operation on floating-point bit patterns.
///
/// # Type Parameters
/// The associated `Bits` type represents the unsigned integer type with equivalent
/// bit width to the floating-point type, supporting equality comparison and hashing.
///
/// # Implementation Requirements
/// Implementations must preserve IEEE 754 bit layout and handle special values
/// (NaN, infinity, signed zero) according to standard specifications.
/// Implementation for 32-bit IEEE 754 single-precision floating-point values.
///
/// Maps to the corresponding 32-bit unsigned integer bit pattern, preserving
/// all floating-point special values including NaN bit patterns and signed zeros.
/// Implementation for 64-bit IEEE 754 double-precision floating-point values.
///
/// Maps to the corresponding 64-bit unsigned integer bit pattern, preserving
/// all floating-point special values including NaN bit patterns and signed zeros.