If one argument evaluates to an integer and the other to a float, the integer is coerced to a float before the comparison is made. Note that two floating-point numbers are equal if and only if they have the same bit pattern. Because of rounding error, it is not normally useful to compare two floats for equality. An arithmetic expression is a term built from numbers, variables, and functors that represent arithmetic functions. At the time of evaluation, each variable in an arithmetic expression must be bound to a number or another arithmetic expression.
Some arithmetic operations can also detect overflows.
They also raise exceptions. Only certain functors are permitted in arithmetic expressions. These are listed below, together with a description of their arithmetic meanings. For the rest of the section, X and Y are considered to be arithmetic expressions. If integer addition results in an overflow, a representation error is raised.