#numbers #decompose #decompose-float

decompose-float

decompose floating point numbers

1 unstable release

Uses new Rust 2024

new 0.1.0 May 5, 2025

#1183 in Algorithms

MIT license

24KB
549 lines

Decompose-Float

A simple library that decomposes floating point numbers and gives you { is_neg: bool, exp: i32, mantissa: u128 }. It supports f16 and f128 types via f16 and f128 features. The features are not enabled by default: you have to enable them if you need.

It handles subnormal numbers, infinities and NaNs correctly (I hope so).

If you want to use f16 or f128 feature, you have to use a nightly version of rust.

No runtime deps

Features