editRepresentation and printing of floating point numbers

SWI-Prolog internally represents floats using the C-language type double. On most today systems this implies using a 64-bit IEEE representation. All floating point math functions are based on the C math-library.

The write/1 predicate and friends use the dtoa library by David M. Gay that prints floating point numbers with the minimal number of digits such that read/1 reads back the same value. If you want floats printed with a specific number of digits, use format/2:

?- A is pi, format('Pi = ~5f~n', [A]).
Pi = 3.14159
A = 3.141592653589793.

Floating point numbers are not exact. If you want exact arthmetic, please check out SWI-Prolog's support for rational numbers in the manual.