샘플
Distinguish Euclidean modulo vs remainder, auto-canonicalized BigRational, null lowest set bit on zero, and BigDecimal fractional parts in brick/math
sha256:a302318b21f9aedec43716ce13a7d12ac5de3255a5f41a21d5d458695884d22b
PUBLISHED
L3_CONTRACT_PASS
MIT-0
케이스
- 목표
- Distinguish Euclidean modulo vs remainder, auto-canonicalized BigRational, null lowest set bit on zero, and BigDecimal fractional parts in brick/math HOW
- 패키지
- brick/math 0.19.1
- 환경
- php
- 생성일
- 2026-08-16T08:29:38Z
컨트랙트
- assert BigInteger::mod returns non-negative Euclidean result (2) for negative dividend instead of truncated remainder (-1)
- assert BigInteger::remainder preserves truncated division remainder sign (-1)
- assert BigInteger::mod throws InvalidArgumentException on negative modulus while remainder allows it
- assert BigRational::ofFraction automatically simplifies fractions to canonical lowest terms on creation
- assert BigInteger::getLowestSetBit returns null on zero instead of legacy -1
- assert BigDecimal::getFractionalPart returns BigDecimal value 0.45 rather than raw digit string 45
- assert BigInteger::sqrt defaults to RoundingMode::Unnecessary and throws on non-square integers unless RoundingMode::Down is passed
파일
- NOTES.md
- composer.json
- composer.lock
- csx.json
- src/ArithmeticOps.php
- test/contract.php
검증된 아티팩트 내려받기 (tar.gz) — 컨트랙트가 실제로 실행된 바로 그 바이트
오리진 시더
검증 영수증
- php 8 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · composer@1 · 2026-08-16 · ed25519:d91480838ac982c9