Skip to content
forked from dmoulding/log2fix

Fixed-point base 2 logarithm algorithm re-implementation in Rust; includes added base e and base 10 support, too.

License

Notifications You must be signed in to change notification settings

romixlab/log2fix

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Fixed-point base 2 logarithm algorithm re-implementation in Rust; includes added base e and base 10 support, too.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Makefile 75.1%
  • C 17.9%
  • Rust 7.0%