| tests whether the argument is a floating-point number.
float(+Term)
float/1 succeeds if Term is a floating-point number otherwise it fails.
Arguments
Term term
Examples
| float(7.11). |
Succeeds. |
| X=4.3*2, float(X). |
Succeeds.
| | float(4.3*2). |
Fails. |
| float(7).
| Fails.
|
Standard
This predicate is part of the ISO-Prolog Standard.
See also
atom/1,
atomic/1,
compound/1,
integer/1,
nonvar/1,
number/1,
var/1,
|