Expand description
Shared mathematical functions for the Batuta stack.
Provides common math operations (statistics, special functions) used across pmat, trueno, aprender, and trueno-viz.
Functions§
- cosine_
similarity - Compute cosine similarity between two f64 vectors.
- cosine_
similarity_ f32 - Compute cosine similarity between two f32 vectors.
- erf
- Compute the error function erf(x) using the Abramowitz & Stegun approximation.
- erf_f32
- Compute erf(x) with f32 precision.
- std_dev
- Compute sample standard deviation of a slice (Bessel’s correction, n-1).
- std_
dev_ f32 - Compute sample standard deviation for f32 data.
- std_
dev_ f32_ with_ mean - Compute sample standard deviation for f32 data given a pre-computed mean.
- std_
dev_ with_ mean - Compute sample standard deviation given a pre-computed mean.
- usage_
percent - Compute usage percentage from used/total byte counts.