| Did you know ... | Search Documentation: |
| Pack logtalk -- logtalk-3.98.0/docs/apis/_sources/natural_0.rst.txt |
.. index:: single: natural .. _natural/0:
.. rst-class:: right
object
naturalNatural numbers data type predicates.
| Availability:
| logtalk_load(types(loader))
| Author: Paulo Moura | Version: 2:0:0 | Date: 2026-02-02
| Compilation flags:
| static, context_switching_calls
| Extends:
| public :ref:`integer <integer/0>`
| 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:`integer/0::between/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:`integer/0::plus/3` Â :ref:`integer/0::power_sequence/4` Â :ref:`integer/0::sequence/3` Â :ref:`integer/0::sequence/4` Â :ref:`termp/0::singletons/2` Â :ref:`termp/0::subsumes/2` Â :ref:`termp/0::subterm/2` Â :ref:`integer/0::succ/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
.. index:: factorial/2 .. _natural/0::factorial/2:
factorial/2 ^^^^^^^^^^^^^^^
Computes the factorial of a non-negative integer.
| Compilation flags:
| static
| Template:
| factorial(N,Factorial)
| Mode and number of proofs:
| factorial(+non_negative_integer,-non_negative_integer) - one
.. index:: binomial/3 .. _natural/0::binomial/3:
binomial/3 ^^^^^^^^^^^^^^
Computes the binomial coefficient. N must be greater than or equal to K (fails otherwise).
| Compilation flags:
| static
| Template:
| binomial(N,K,Binomial)
| Mode and number of proofs:
| binomial(+non_negative_integer,+non_negative_integer,-non_negative_integer) - zero_or_one
(no local declarations; see entity ancestors if any)
(no local declarations; see entity ancestors if any)
(none)