onemathDocs
onemath docs
Everything about OneMath: getting started, the elementary functions and how they are checked, exact predicates, the evaluation order behind every type, the fixed-point bridge, inertia tensors, and the hash matrix.
Start
Getting startedInstall OneMath for .NET 10 and use its correctly rounded functions, vectors and matrices, exact predicates and fixed-point bridge, with results that are the same bits on every platform.OverviewDeterministic math for .NET (RecursiveAI.OneMath): vectors, matrices, quaternions, elementary functions and exact geometric predicates that give the same bits on every OS, CPU, runtime, WebAssembly mode and thread count. Only IEEE-exact + - * / and sqrt decide a result; every…
Functions and predicates
Elementary functionsMath64 (double) and Math32 (float32) in RecursiveAI.OneMath: Sin Cos Tan SinCos Asin Acos Atan Atan2 Exp Exp2 Expm1 Log Log2 Log10 Log1p Pow Cbrt Hypot Sinh Cosh Tanh.Exact predicatesNormative description of RecursiveAI.OneMath.Predicates. A port that follows this text produces the same signs on every input, and the same expansion components in the internal engine.
Types and conversions
Evaluation orderNormative: a port must evaluate in this order to produce the same bits.Fixed-point bridgeA deterministic game host keeps world coordinates in Q31.32: a signed 64-bit integer (the raw value) holding the value times 2^32. FixedBridge converts the raw long to and from floating point. It has no dependency on any fixed-point type.Inertia and eigen decompositionNormative: a port must evaluate in this order to produce the same bits. Both precisions (F = binary32, D = binary64) use the same code with the type swapped. Everything follows the rules of evaluation-order.md: only + - * / and the correctly rounded square root, each rounded…