Differences and limitations


The not operator

The Trinc-Prolog engine implements the built-in-predicate 'not' like a prefix operator. The difference is best explained by the following example:

    test( X ) :- not( a(X), b(X) ).

If the Trinc-Prolog engine tries to prove the body of "test" it encounters the not operator and then continues proving the clauses "a(X)" and "b(X)". Other prolog interpreters stop on finding the 'not' operator with 2 arguments and report that "not/2" is unknown as it is implemented like a built-in-predicate with an arity of 1.

It is advisable to use the \+ (not provable) operator. The \+ operator is also defined in the Prolog ISO standard.

Range and precision of numbers

Integers are stored as 32 bits numbers and floating point numbers are stored as 64 bit reals. The minimum and maximum values are:

Negative integer -2147483646
Positive integer +2147483646
Smallest floating point value 2.2250738585072014E-308
Largest floating point value +1.7976931348623158E+308

The floating point numbers are represented in the IEEE 64 bit real format, the default precision of floating-point numbers is 15 digits.

Trinc Prolog limitations

[top] [up]

 

info@trinc-prolog.com