4.27.2 General purpose arithmetic
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • Built-in Predicates
        • Arithmetic
          • General purpose arithmetic
            • >/2
            • </2
            • =</2
            • >=/2
            • =\=/2
            • =:=/2
            • is/2
            • Arithmetic types
            • Rational number examples
            • Rational numbers or floats
            • IEEE 754 floating point arithmetic
            • Floating point arithmetic precision
            • Arithmetic Functions
    • Packages
Availability:built-in
[ISO]-Number is +Expr
True when Number is the value to which Expr evaluates. Typically, is/2 should be used with unbound left operand. If equality is to be tested, =:=/2 should be used. For example:

?- 1 is sin(pi/2). Fails! sin(pi/2) evaluates to the float 1.0, which does not unify with the integer 1.
?- 1 =:= sin(pi/2). Succeeds as expected.