Skip to content

Commit

Permalink
Use const generics for fixed precision arithmetic.
Browse files Browse the repository at this point in the history
  • Loading branch information
gendx committed Sep 14, 2024
1 parent 30201c0 commit 270d931
Show file tree
Hide file tree
Showing 6 changed files with 260 additions and 203 deletions.
4 changes: 2 additions & 2 deletions src/arithmetic/approx_rational.rs
Original file line number Diff line number Diff line change
Expand Up @@ -598,8 +598,8 @@ impl Rational<BigInt> for ApproxRational {
true
}

fn description() -> &'static str {
"exact rational arithmetic with rounding of keep factors (6 decimal places)"
fn description() -> String {
"exact rational arithmetic with rounding of keep factors (6 decimal places)".to_owned()
}

fn div_up_as_keep_factor(&self, rhs: &Self) -> Self {
Expand Down
4 changes: 2 additions & 2 deletions src/arithmetic/exact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ where
true
}

fn description() -> &'static str {
"exact rational arithmetic"
fn description() -> String {
"exact rational arithmetic".to_owned()
}

fn div_up_as_keep_factor(&self, rhs: &Self) -> Self {
Expand Down
Loading

0 comments on commit 270d931

Please sign in to comment.