Skip to main content

Crate mathsolver

Crate mathsolver 

Source
Expand description

mathsolver — BYOK AI math solver with independent verification.

An answer is only verified: true when the model’s verification expression (pure arithmetic) is evaluated locally by this crate and matches the answer numerically. No model output is ever executed as code.

Structs§

MathSolver
BYOK client for an OpenAI-compatible endpoint.
SolveOptions
SolveResult
SolverError

Constants§

SYSTEM_PROMPT

Functions§

default_transport
eval_expression
Evaluate a pure arithmetic expression string to a number (no variables).
eval_expression_with
Evaluate with variable bindings from let-statements.
run_check
Substitute {x} with the computed answer; passes when value ~ 0.
run_program
Execute a model-generated JS-dialect program (let / assignment / result).

Type Aliases§

Env
TransportFn