support for Decimal.isInfitite and isNan

This commit is contained in:
sergeych committed 2026-03-31 19:13:45 +03:00
1 parent a976702caf
commit 6e9333844e
4 files changed
+36

No files matched your search

+11
View File
@@ -166,6 +166,17 @@ assertEquals(2.9, "2.9".d.toReal())
Use `toReal()` only when you are willing to return to binary floating-point semantics.
## Non-Finite Checks
`Decimal` values are always finite, so these helpers exist for API symmetry with `Real` and always return `false`:
```lyng
import lyng.decimal
assertEquals(false, "2.9".d.isInfinite())
assertEquals(false, "2.9".d.isNaN())
```
## Division Context
Division is the operation where precision and rounding matter most.