Skip to content

Fast-math wrapper and convenient numeric functions for approximate floating point operations in Rust

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

robsmith11/fastfloat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fastfloat

Latest version Documentation

Inspired and based on @bluss's fast-floats: https://github.com/bluss/fast-floats

I wrote this to speed up my numeric projects, but it should be useful for most scientific computing applications.

The API is unstable and subject to change. A nightly rustc is required. Any feedback, bug reports, and pull requests are very welcome.

Example

use fastfloat::*;

fn main() {
    let v:Vec<F32> = (0..1000).map(|x| (fa(x as f32) * 0.01).fastexp()).collect();
    let s:F32 = v.iter().sum();
    
    println!("Sum: {}, Avg: {}", s, s / 1e3);
}

License

Dual-licensed to be compatible with the Rust project.

Licensed under the Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0 or the MIT license http://opensource.org/licenses/MIT, at your option. This file may not be copied, modified, or distributed except according to those terms.

About

Fast-math wrapper and convenient numeric functions for approximate floating point operations in Rust

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages