Skip to content

brk/xj_hexfloat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xj_hexfloat

A thin wrapper around hexfloat2 whose Display always emits an explicit + sign in the binary exponent.

hexfloat2:   0x1.0p0   0x1.8p6   0x1.0p-1
xj_hexfloat: 0x1.0p+0  0x1.8p+6  0x1.0p-1

Negative exponents and special values (inf, NaN) are passed through unchanged.

Usage

use xj_hexfloat::HexFloat;

let s = format!("{}", HexFloat::from(1.5f32));
assert_eq!(s, "0x1.8p+0");

About

Tiny wrapper around the `hexfloat2` crate with POSIX-matching output

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages