Capabilities
| Category | Examples | Accuracy |
|---|---|---|
| Arithmetic | 2+2=4, 15*3=45 | 100% |
| Algebra | x^2 - 1 = (x-1)(x+1) | 100% |
| Calculus | Derivatives, Integrals, Limits | 100% |
| Trigonometry | sin(π/2) = 1, cos(0) = 1 | 100% |
| Logarithms | log(e) = 1, ln(e^x) = x | 100% |
| Financial | Compound interest, NPV, IRR | 100% |
| Statistics | Mean, std dev, percentiles | 100% |
Quick Start
Core Operations
1. Expression Evaluation
Verify that an expression equals a value:2. Identity Verification
Check if two expressions are mathematically equivalent:log(x) at x = -1) are skipped rather than causing a false negative.
3. Derivatives
Verify calculus derivatives:4. Integrals
Verify indefinite and definite integrals:5. Limits
Financial Calculations
Compound Interest
Net Present Value (NPV)
Internal Rate of Return (IRR)
Error Handling
When verification fails, QWED provides detailed error information:Exact SymPy arithmetic
When SymPy is available, the math engine evaluates expressions using SymPy-native types (sympy.Integer, sympy.Float) instead of Python built-in int and float. This prevents floating-point drift during intermediate computation and ensures that comparisons between LLM answers and verified results use symbolic simplification rather than string matching alone.
Decimal precision
The math engine acceptsDecimal values for exact arithmetic, which is especially useful for financial calculations:
use_decimal=True (the default), the engine uses Decimal internally regardless of whether you pass a float or Decimal.
Tolerance settings
For floating-point comparisons:Edge Cases
| Scenario | Behavior |
|---|---|
| Division by zero | Returns error, not verified |
| Undefined expressions | Returns “UNDEFINED” status |
| Complex numbers | Fully supported |
| Very large numbers | Uses arbitrary precision |
| Symbolic variables | Verified algebraically |
Performance
| Operation | Avg Latency | Throughput |
|---|---|---|
| Simple arithmetic | 1.5ms | 690/sec |
| Complex expression | 5ms | 200/sec |
| Identity proof | 10ms | 100/sec |
Next Steps
- Logic Engine - Verify logical constraints
- Code Engine - Verify code correctness
- API Reference - Full API documentation