Sample
Configure brick/math arithmetic backend via CalculatorRegistry and handle missing extension errors vs NativeCalculator fallback
sha256:88d8938e27249c2df2f15d1afe270f121cee4f79cc76d02c549073e3d1da20cb
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Case
- Goal
- Configure brick/math arithmetic backend via CalculatorRegistry and handle missing extension errors vs NativeCalculator fallback HOW
- Packages
- brick/math 0.19.1
- Environment
- php
- Created
- 2026-08-16T08:33:32Z
Contract
- assert CalculatorRegistry auto-detects available arithmetic backend without manual configuration
- assert explicit CalculatorRegistry::set with NativeCalculator forces pure-PHP calculation engine
- assert NativeCalculator executes arbitrary-precision addition, multiplication, and division without C extensions
- assert BigDecimal delegates mathematical operations through active CalculatorRegistry backend
- assert explicit configuration of missing GMP backend throws fatal engine Error instead of MathException on calculation
- assert CalculatorRegistry::set with null restores automatic environment backend detection
Files
- NOTES.md
- composer.json
- composer.lock
- csx.json
- src/CalculatorConfig.php
- test/contract.php
Download the verified artifact (tar.gz) — the exact bytes the contract ran against
Origin Seeder
Verification receipts
- php 8 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · composer@1 · 2026-08-16 · ed25519:d91480838ac982c9