package owl-base
- Overview
- No Docs
You can search for identifiers within the package.
in-package search v0.2.0
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=cb9b596d7a2166630e385381f5dcb7cc6c2a4afebd32b2811db3e4b4fe008f3c
sha512=940c0953ee3fce453787e0820df42f4f3852413ba0a1af9d18af128d90a76bf9c93aaa3af42bd80be938b0b53ed0f546a1972ecc5fad7dd35247cea5e699b78f
doc/owl-base/Owl_base_maths/index.html
Module Owl_base_maths
Maths: fundamental and advanced mathematical functions.
Basic functions
Error functions
Helper functions
``is_inf x`` returns ``true`` if ``x`` is ``infinity`` or ``neg_infinity``.
``is_pow2 x`` return ``true`` if ``x`` is integer power of 2, e.g. 32, 64, etc.
``same_sign x y`` returns ``true`` if ``x`` and ``y`` have the same sign, otherwise it returns ``false``. Positive and negative zeros are special cases and always returns ``true``.
``is_simplex x`` checks whether ``x`` is simplex. In other words, :math:`\sum_i^K x_i = 1` and :math:`x_i \ge 0, \forall x_i \in 1,K
`.
``is_prime x`` returns ``true`` if ``x`` is a prime number. The function is deterministic for all numbers representable by an int. The function uses the Rabin–Miller primality test.