#![allow(non_snake_case)]
use crate::fixed_point::domains::symbolic::rational::RationalNumber;
#[allow(unused_imports)]
#[cfg(not(feature = "embedded"))]
use crate::fixed_point::domains::binary_fixed::I256;
#[allow(unused_imports)]
use crate::fixed_point::domains::binary_fixed::I512;
#[cfg(feature = "rebuild-tables")]
include!(concat!(env!("OUT_DIR"), "/mathematical_constants.rs"));
#[cfg(not(feature = "rebuild-tables"))]
include!("../../../../generated_tables/mathematical_constants.rs");
pub struct SymbolicConstants;
impl SymbolicConstants {
pub fn pi_high_precision() -> RationalNumber {
let (num_words, den_words) = MathematicalConstants::PI();
let num = I512::from_words(num_words);
let den = I512::from_words(den_words);
RationalNumber::from_i512_pair(num, den)
}
pub fn e_high_precision() -> RationalNumber {
let (num_words, den_words) = MathematicalConstants::E();
let num = I512::from_words(num_words);
let den = I512::from_words(den_words);
RationalNumber::from_i512_pair(num, den)
}
pub fn sqrt_2_high_precision() -> RationalNumber {
let (num_words, den_words) = MathematicalConstants::SQRT_2();
let num = I512::from_words(num_words);
let den = I512::from_words(den_words);
RationalNumber::from_i512_pair(num, den)
}
pub fn ln_2_high_precision() -> RationalNumber {
let (num_words, den_words) = MathematicalConstants::LN_2();
let num = I512::from_words(num_words);
let den = I512::from_words(den_words);
RationalNumber::from_i512_pair(num, den)
}
pub fn golden_ratio_high_precision() -> RationalNumber {
let (num_words, den_words) = MathematicalConstants::GOLDEN_RATIO();
let num = I512::from_words(num_words);
let den = I512::from_words(den_words);
RationalNumber::from_i512_pair(num, den)
}
pub fn sqrt_3_high_precision() -> RationalNumber {
let (num_words, den_words) = MathematicalConstants::SQRT_3();
let num = I512::from_words(num_words);
let den = I512::from_words(den_words);
RationalNumber::from_i512_pair(num, den)
}
pub fn ln_10() -> RationalNumber {
let (num_words, den_words) = MathematicalConstants::LN_10();
RationalNumber::from_i512_pair(I512::from_words(num_words), I512::from_words(den_words))
}
}