.. index:: single: float .. _float/0: .. rst-class:: right **object** ``float`` ========= Floating point numbers data type predicates. | **Availability:** | ``logtalk_load(types(loader))`` | **Author:** Paulo Moura | **Version:** 1:7:0 | **Date:** 2025-02-25 | **Compilation flags:** | ``static, context_switching_calls`` | **Extends:** | ``public`` :ref:`number ` | **Remarks:** | (none) | **Inherited public predicates:** |  :ref:`comparingp/0::(<)/2`  :ref:`comparingp/0::(=:=)/2`  :ref:`comparingp/0::(=<)/2`  :ref:`comparingp/0::(=\=)/2`  :ref:`number/0::=~= / 2`  :ref:`comparingp/0::(>)/2`  :ref:`comparingp/0::(>=)/2`  :ref:`number/0::approximately_equal/2`  :ref:`number/0::approximately_equal/3`  :ref:`termp/0::check/1`  :ref:`termp/0::depth/2`  :ref:`number/0::essentially_equal/3`  :ref:`termp/0::ground/1`  :ref:`termp/0::new/1`  :ref:`termp/0::numbervars/1`  :ref:`termp/0::numbervars/3`  :ref:`termp/0::occurs/2`  :ref:`termp/0::singletons/2`  :ref:`termp/0::subsumes/2`  :ref:`termp/0::subterm/2`  :ref:`number/0::tolerance_equal/4`  :ref:`termp/0::valid/1`  :ref:`termp/0::variables/2`  :ref:`termp/0::variant/2`  :ref:`termp/0::varnumbers/2`  :ref:`termp/0::varnumbers/3`   .. contents:: :local: :backlinks: top Public predicates ----------------- .. index:: between/4 .. _float/0::between/4: ``between/4`` ^^^^^^^^^^^^^ Enumerates by backtracking a sequence of ``N`` equally spaced floats in the interval ``[Lower,Upper]``. Assumes ``N > 0`` and ``Lower =< Upper``; fails otherwise. | **Compilation flags:** | ``static`` | **Template:** | ``between(Lower,Upper,N,Float)`` | **Mode and number of proofs:** | ``between(+float,+float,+positive_integer,-float)`` - ``zero_or_more`` ------------ .. index:: sequence/4 .. _float/0::sequence/4: ``sequence/4`` ^^^^^^^^^^^^^^ Generates a list with the sequence of ``N`` equally spaced floats in the interval ``[Lower,Upper]``. Assumes ``N > 0`` and ``Lower =< Upper``; fails otherwise. | **Compilation flags:** | ``static`` | **Template:** | ``sequence(Lower,Upper,N,List)`` | **Mode and number of proofs:** | ``sequence(+float,+float,+positive_integer,-list(float))`` - ``zero_or_one`` ------------ .. index:: sequence/5 .. _float/0::sequence/5: ``sequence/5`` ^^^^^^^^^^^^^^ Generates a list with the sequence of ``Step`` spaced floats in the interval ``[Lower,Upper]``. Also returns the length of the list. Assumes ``Lower =< Upper``; fails otherwise. | **Compilation flags:** | ``static`` | **Template:** | ``sequence(Lower,Upper,Step,List,Length)`` | **Mode and number of proofs:** | ``sequence(+float,+float,+float,-list(float),-positive_integer)`` - ``zero_or_one`` ------------ Protected predicates -------------------- (no local declarations; see entity ancestors if any) Private predicates ------------------ (no local declarations; see entity ancestors if any) Operators --------- (none)