big-rational-str 0.1.0

Format and parse BigRationals to/from decimal numbers
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use std::str::FromStr;
use crate::{big_rational_to_str, str_to_big_rational};
use num::BigRational;

#[test]
fn test0() {
    println!("{}", big_rational_to_str(BigRational::from_str("1/6").unwrap()))
}

#[test]
fn test1() {
    println!("{}", big_rational_to_str(str_to_big_rational("1.0(54)").unwrap()))
}