#float #floating #bar #rational

floating_bar

Representing rational numbers using the floating-bar number type

4 releases

✓ Uses Rust 2018 edition

0.1.3 Apr 23, 2019
0.1.2 Apr 22, 2019
0.1.1 Jan 21, 2019
0.1.0 Jan 21, 2019

#302 in Data structures

41 downloads per month

0BSD license

61KB
1.5K SLoC

Floating Bar

Provides the floating-bar type, which allows for efficient representation of rational numbers without loss of precision. It is based on this blog post.

For more information, refer to the library documentation.

Use

To use this library, add the following to your Cargo.toml:

[dependencies]
floating_bar = "0.1.0"

Contributing

Pull requests welcome! There are plenty of unimplemented!() methods that one can fill in. Make sure that the documentation matches the functionality, and to add a unit test for it. If you don't wish to write a test, just add the function for it and leave it for someone else to fill it in.

License

This project is licensed under the BSD Zero Clause License. In general it means you can do whatever you want with it, but there are no warranties and I'm not held liable for whatever happens.

Dependencies

~13KB