log2fix

Crates.iolog2fix
lib.rslog2fix
version0.1.0
sourcesrc
created_at2021-06-23 12:46:41.392888
updated_at2021-06-23 12:46:41.392888
descriptionno_std fixed-point base 2, e and 10 logarithm algorithm implementation
homepage
repositoryhttps://github.com/romixlab/log2fix
max_upload_size
id413910
size23,567
Roman Isaikin (romixlab)

documentation

README

API:

pub fn log2fix(x: u32, precision: usize) -> i32
pub fn logefix(x: u32, precision: usize) -> i32
pub fn log10fix(x: u32, precision: usize) -> i32

You can play around with a cli example:

cargo run --example cli

Based on https://github.com/dmoulding/log2fix C implementation.

Commit count: 6

cargo fmt