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

4.27.2.5 Floating point arithmetic precision

SWI-Prolog represents floats using the C double type. On virtually all modern hardware this implies it uses 64-bit IEEEĀ 754 floating point numbers. See also section 4.27.2.4. All floating point arithmetic is performed using C. Different C compilers, different C math libraries and different hardware floating point support may yield different results for the same expression on different instances of SWI-Prolog.