Skip to content

Commit

Permalink
Use tanh-sinh algorithm to integrate and improve differenate precision (
Browse files Browse the repository at this point in the history
#158)

* feat: preliminary Tanh-Sinh implementation

* feat: another way to implement tanh-sinh

* feat: get rid of the pre_calculated stuff (failed to run)

* feat: tanh-sinh complete, boole's back for first calculation

* feat: higher percision derivatives function

* fix: qthsh char error

* chore: remove a stuff

* chore: testing function and pure qthsh

* chore: remove boole_rule

* chore: bring integrate_function back
  • Loading branch information
BenderBlog authored Aug 7, 2024
1 parent 23f6da4 commit c998d0e
Show file tree
Hide file tree
Showing 2 changed files with 1,057 additions and 68 deletions.
15 changes: 15 additions & 0 deletions kalk/src/kalk_value/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,21 @@ impl KalkValue {
}
}

pub fn is_finite(&self) -> bool {
//#[cfg(feature = "rug")]
if let KalkValue::Number(real, imaginary, _) = self {
real.is_finite() && imaginary.is_finite()
} else {
false
}
//#[cfg(not(feature = "rug"))]
//if let KalkValue::Number(real, imaginary, _) = self {
// real.is_finite() && imaginary.is_finite()
//} else {
// false
//}
}

pub fn to_scientific_notation(
&self,
complex_number_type: ComplexNumberType,
Expand Down
Loading

0 comments on commit c998d0e

Please sign in to comment.