Crate hexf

Source
Expand description

Hexadecimal float support for Rust 1.45 or later.

use hexf::{hexf32, hexf64};

assert_eq!(hexf32!("0x1.99999ap-4"), 0.1f32);
assert_eq!(hexf64!("0x1.999999999999ap-4"), 0.1f64);

Macrosยง

  • Expands to a f32 value with given hexadecimal representation.
  • Expands to a f64 value with given hexadecimal representation.