Conversation
Attempt to add support for rational numbers and different variable types: boolean, number, integer, ratio, rational, float and real.
- rational-ordeal in rational-tests.lisp - variable-type-tests in variable-types.lisp
Changed rational-ordeal to use cl:defun.
New versions of: - assert!-notv-equalv (number optimization) fro swapneils version - print-variable
- Minor fix.
- New tests.
- Removed nickname (moved to om-compat only).
- Changes in screamer-version and formatting.
- Version 4.0.1 - rational support
- new information about rational numbers support and version 4.0.1
- fixed typo in README
- restored screamer-version
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rational numbers are now supported in Screamer. The
following functions have been added:
A-RANDOM-MEMBER-OF
A-RATIONAL
A-RATIONAL-ABOVE
A-RATIONAL-BELOW
A-RATIONAL-BETWEEN
A-RATIO
A-RATIO-ABOVE
A-RATIO-BELOW
A-RATIO-BETWEEN
RATIONALPV
A-RATIONALV
A-RATIONAL-BETWEENV
A-RATIONAL-ABOVEV
A-RATIONAL-BELOWV
RATIOPV
A-RATIOV
A-RATIO-BETWEENV
A-RATIO-ABOVEV
A-RATIO-BELOWV
FLOATPV
A-FLOATV
A-FLOAT-ABOVEV
A-FLOAT-BELOWV
A-FLOAT-BETWEENV
The following functions have been modified to support rational numbers:
LINEAR-FORCE
DIVIDE-AND-CONQUER-FORCE
The following functions have been added to support Farey sequences (unexported):
RATIOP
FAREY-NEXT-VALUE
FAREY-PREV-VALUE
MAKE-FAREY-GENERATOR-START
CLOSEST-RATIONAL-LOWER
CLOSEST-RATIONAL-UPPER
CLOSEST-RATIO-LOWER
CLOSEST-RATIO-UPPER
RATIONALS-BETWEEN
RATIOS-BETWEEN
VARIABLE POSSIBLY-NONINTEGER-RATIONAL? SLOT
VARIABLE MAX-DENOM SLOT
Additions and fixes from swapneils update (see nikodemus#34)
SEQUENCEP (FROM ALEXANDRIA, SEE https://alexandria.common-lisp.dev/)
MAPPEND (FROM ALEXANDRIA, IBID.)
APPLY-NONDETERMINISTIC FIX
MAPCAR-NONDETERMINISTIC
ASSERT!-NOTV-EQUALV FIX
VARIABLE DEPENDENCIES SLOT
Constraint package functions modified to use the new variable generators (see initial commit ):
New tests files and tests.lisp modifications
Examples (third argument of rational/ratio generators are the maximum ratio denominator):
SEE ADDITIONAL EXAMPLES IN RATIONAL-TESTS.LISP