Representing rationals with Integer Constraints
This is a quick and dirty post attempting rational (fraction) math with Prolog's integer constraint library. CLPFD works well for integer math, but it is not built to handle decimal values. This limits where you can use CLPFD, if a domain has even a single non-integer value, you'll have to …
more ...