Base.Maths

This document is auto-generated for Owl’s APIs. #41 entries have been extracted. timestamp: 2018-04-16 13:12:54

Github: {Signature} {Implementation}

Basic functions

val add : float -> float -> float

add x y

source code

val sub : float -> float -> float

sub x y

source code

val mul : float -> float -> float

mul x y

source code

val div : float -> float -> float

div x y

source code

val atan2 : float -> float -> float

atan2 x y

source code

val abs : float -> float

abs x

source code

val neg : float -> float

neg x

source code

val floor : float -> float

floor x

source code

val ceil : float -> float

ceil x

source code

val round : float -> float

round x

source code

val trunc : float -> float

trunc x

source code

val sqr : float -> float

sqr x

source code

val sqrt : float -> float

sqrt x

source code

val pow : float -> float -> float

pow x

source code

val exp : float -> float

exp x

source code

val log : float -> float

log x

source code

val log2 : float -> float

log2 x

source code

val log10 : float -> float

log10 x

source code

val sigmoid : float -> float

sigmod x

source code

val signum : float -> float

signum x

source code

val relu : float -> float

relu x

source code

val sin : float -> float

sin x

source code

val cos : float -> float

cos x

source code

val tan : float -> float

tan x

source code

val asin : float -> float

asin x

source code

val acos : float -> float

acos x

source code

val atan : float -> float

atan x

source code

val sinh : float -> float

sinh x

source code

val cosh : float -> float

cosh x

source code

val tanh : float -> float

tanh x

source code

val asinh : float -> float

asinh x

source code

val acosh : float -> float

acosh x

source code

val atanh : float -> float

atanh x

source code

Helper functions

val is_nan : float -> bool

is_nan x returns true if x is nan.

source code

val is_inf : float -> bool

is_inf x returns true if x is infinity or neg_infinity.

source code

val is_odd : int -> bool

is_odd x returns true if x is odd.

source code

val is_even : int -> bool

is_even x returns true if x is even.

source code

val is_pow2 : int -> bool

is_pow2 x return true if x is integer power of 2, e.g. 32, 64, etc.

source code

val same_sign : float -> float -> bool

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.

source code