Owl_base_mathsSourceMaths: fundamental and advanced mathematical functions.
``add x y``
``sub x y``
``mul x y``
``div x y``
``atan2 x y``
``abs x``
``neg x``
``floor x``
``ceil x``
``round x``
``trunc x``
``sqr x``
``sqrt x``
``pow x``
``exp x``
``log x``
``log2 x``
``log10 x``
``sigmod x``
``signum x``
``relu x``
``sin x``
``cos x``
``tan x``
``asin x``
``acos x``
``atan x``
``sinh x``
``cosh x``
``tanh x``
``asinh x``
``acosh x``
``atanh x``
``is_nan x`` returns ``true`` if ``x`` is ``nan``.
``is_inf x`` returns ``true`` if ``x`` is ``infinity`` or ``neg_infinity``.
``is_odd x`` returns ``true`` if ``x`` is odd.
``is_even x`` returns ``true`` if ``x`` is even.
``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`.