Testing float capture/serialization: compare raw IEEE bit payloads, not float equality
When building a writer or capture path for floating-point values (real64/float32), floating equality is not a valid round-trip test: NaN != NaN, +0 == -0, and some conversion paths canonicalise NaN payloads. Test with raw bit patterns: memcpy the double into a uint64, serialise an explicit little-endian byte order, read back, and compare the uint64 exactly. Cover signed zero, subnormals, +/-infinity, quiet and signaling NaNs with payload bits set, and random patterns. Watch for silent widening: converting float32 to float64 before taking the bits can change NaN payloads. For 32-bit values use a dedicated float-to-bits function and a separate representation, or reject them explicitly rather than quietly widening. Also check observability separately: a change-detection hook (callback or value comparison) may not fire for a +0 to -0 change, or a NaN-payload change, if it compares values numerically.