pub mod angle;
pub mod complex;
pub mod combinatoric;
pub mod miscellaneous;
pub mod power;
pub mod print;
pub mod probability; pub mod round;
pub mod sequence;
pub mod trigonometry;
#[cfg(feature = "numerical")]
use crate::numerical::builtin::Builtin;
#[cfg(feature = "numerical")]
use std::collections::HashMap;
use std::sync::OnceLock;
#[cfg(feature = "numerical")]
pub fn all() -> &'static HashMap<&'static str, Box<dyn Builtin>> {
use angle::*;
use complex::*;
use combinatoric::*;
use miscellaneous::*;
use power::*;
use print::*;
use probability::*;
use round::*;
use sequence::*;
use trigonometry::*;
static FUNCTIONS: OnceLock<HashMap<&'static str, Box<dyn Builtin>>> = OnceLock::new();
macro_rules! build {
($($name:literal $upname:ident),* $(,)?) => {
[
$(
($name, Box::new($upname) as Box<dyn Builtin>),
)*
]
.into_iter()
.collect()
};
}
FUNCTIONS.get_or_init(||
build! {
"print" Print,
"sin" Sin,
"cos" Cos,
"tan" Tan,
"csc" Csc,
"sec" Sec,
"cot" Cot,
"asin" Asin,
"acos" Acos,
"atan" Atan,
"atan2" Atan2,
"acsc" Acsc,
"asec" Asec,
"acot" Acot,
"sinh" Sinh,
"cosh" Cosh,
"tanh" Tanh,
"csch" Csch,
"sech" Sech,
"coth" Coth,
"asinh" Asinh,
"acosh" Acosh,
"atanh" Atanh,
"acsch" Acsch,
"asech" Asech,
"acoth" Acoth,
"dtr" Dtr,
"rad" Dtr, "rtd" Rtd,
"deg" Rtd, "circle" Circle,
"exp" Exp,
"ln" Ln,
"log" Log,
"scientific" Scientific,
"pow" Pow,
"sqrt" Sqrt,
"cbrt" Cbrt,
"root" Root,
"hypot" Hypot,
"re" Re,
"im" Im,
"arg" Arg,
"conj" Conj,
"fib" Fib,
"ncr" Ncr,
"npr" Npr,
"erf" Erf,
"erfc" Erfc,
"inverf" Inverf,
"normpdf" Normpdf,
"normcdf" Normcdf,
"invnorm" Invnorm,
"geompdf" Geompdf,
"geomcdf" Geomcdf,
"binompdf" Binompdf,
"binomcdf" Binomcdf,
"poisspdf" Poisspdf,
"poisscdf" Poisscdf,
"siground" Siground,
"round" Round,
"ceil" Ceil,
"floor" Floor,
"trunc" Trunc,
"abs" Abs,
"bool" Bool,
"rand" Rand,
"factorial" Factorial,
"gamma" Gamma,
"lerp" Lerp,
"invlerp" Invlerp,
"min" Min,
"max" Max,
"clamp" Clamp,
"gcf" Gcf,
"lcm" Lcm,
"sign" Sign,
"size" Size,
}
)
}