fixed-exp 0.1.0

Exponentiation for fixed-point numbers
Documentation
  • Coverage
  • 100%
    6 out of 6 items documented3 out of 6 items with examples
  • Size
  • Source code size: 30.48 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.73 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 47s Average build duration of successful builds.
  • all releases: 47s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • toasteater

fixed-exp

crates.io docs.rs

Exponentiation for fixed-point numbers.

[dependencies]
fixed-exp = "0.1.0"

Usage

This crate provides powi and powf for most fixed number types through the FixedPowI and FixedPowF extension traits:

use fixed::types::I32F32;
use fixed_exp::{FixedPowI, FixedPowF};

let x = I32F32::from_num(4.0);
assert_eq!(I32F32::from_num(1024.0), x.powi(5));
assert_eq!(I32F32::from_num(8.0), x.powf(I32F32::from_num(1.5)));

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.