Skip to content

Deterministic trig: pin error budget + deterministic oracle for audit test #177

@flyingrobots

Description

@flyingrobots

Background:

  • crates/warp-core/tests/deterministic_sin_cos_tests.rs contains test_sin_cos_error_budget_wip, currently #[ignore] because it compares against platform libm-derived f64 trig.

Goal:

  • Replace the reference/oracle with a deterministic one (or a pinned golden-vector oracle) and establish an explicit, documented error budget for the LUT-backed warp_core::math::trig backend.

Exit criteria:

  • Define and document acceptable max ULP / absolute error for sin and cos over a specified domain (e.g. [-2TAU, 2TAU]).
  • Implement deterministic measurement that does not depend on host libm (e.g. precomputed vectors or a deterministic polynomial reference).
  • Un-ignore the test (or split into deterministic golden + optional audit).

Notes:

  • Determinism requirement: sin(-x) must be the exact bitwise negation of sin(x); cos(-x) must match cos(x).

Metadata

Metadata

Assignees

No one assigned

    Labels

    coreEcho Core TechnologiesmathMathematicsruntimeRuntime coretaskSmall, 1–3h task

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions