-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This change now makes the BigDecimal get created eagerly, and accounts for NaN and Infinity. The previous implementation would have failed in these cases. NodeValidationVisitor now uses the computed BigDecimal rather than create a one-off each time. It also doesn't recreate the already available BigDecimcal of the range trait. This change deprecates isNaturalNumber since that method was poorly named. A natural number is an integer >= 1, but we were including 0 (which is likely why some callers assumed it asserts >= 0). This also adds an isNegative method since multiple callers need to assert that a NumberNode contains a non-negative value.
- Loading branch information
Showing
3 changed files
with
96 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters