object
natural
Natural numbers data type predicates.
logtalk_load(types(loader))static, context_switching_callsPublic predicates
factorial/2
Computes the factorial of a non-negative integer.
staticfactorial(N,Factorial)factorial(+non_negative_integer,-non_negative_integer) - onefibonacci/2
Computes the Fibonacci number of a non-negative integer.
staticfibonacci(N,Fibonacci)fibonacci(+non_negative_integer,-non_negative_integer) - onelucas/2
Computes the Lucas number of a non-negative integer.
staticlucas(N,Lucas)lucas(+non_negative_integer,-non_negative_integer) - onefalling_factorial/3
Computes the falling factorial. N must be greater than or equal to K (fails otherwise).
staticfalling_factorial(N,K,FallingFactorial)falling_factorial(+non_negative_integer,+non_negative_integer,-non_negative_integer) - zero_or_onerising_factorial/3
Computes the rising factorial.
staticrising_factorial(N,K,RisingFactorial)rising_factorial(+non_negative_integer,+non_negative_integer,-non_negative_integer) - onecatalan/2
Computes the Catalan number of a non-negative integer.
staticcatalan(N,Catalan)catalan(+non_negative_integer,-non_negative_integer) - onesubfactorial/2
Computes the subfactorial of a non-negative integer.
staticsubfactorial(N,Subfactorial)subfactorial(+non_negative_integer,-non_negative_integer) - onebell/2
Computes the Bell number of a non-negative integer.
staticbell(N,Bell)bell(+non_negative_integer,-non_negative_integer) - onestirling_first/3
Computes the unsigned Stirling number of the first kind. N must be greater than or equal to K (fails otherwise).
staticstirling_first(N,K,Stirling)stirling_first(+non_negative_integer,+non_negative_integer,-non_negative_integer) - zero_or_onestirling_second/3
Computes the Stirling number of the second kind. N must be greater than or equal to K (fails otherwise).
staticstirling_second(N,K,Stirling)stirling_second(+non_negative_integer,+non_negative_integer,-non_negative_integer) - zero_or_onepartition_number/2
Computes the partition number of a non-negative integer.
staticpartition_number(N,PartitionNumber)partition_number(+non_negative_integer,-non_negative_integer) - onebinomial/3
Computes the binomial coefficient. N must be greater than or equal to K (fails otherwise).
staticbinomial(N,K,Binomial)binomial(+non_negative_integer,+non_negative_integer,-non_negative_integer) - zero_or_onemultinomial/2
Computes the multinomial coefficient for a list of non-negative integers.
staticmultinomial(Integers,Multinomial)multinomial(+list(non_negative_integer),-non_negative_integer) - oneProtected predicates
(no local declarations; see entity ancestors if any)
Private predicates
(no local declarations; see entity ancestors if any)
Operators
(none)