Math Functions¶
Linear algebra¶
Unary functions¶
These functions are element-wise unary functions, and have common signature:
function_name(
size, # size of the input/output array
vec, # input array
result, # output array containing the result (overwritten)
)
Following functions are available:
brahmap.math.sin
: sine functionbrahmap.math.cos
: cosine functionbrahmap.math.tan
: tangent functionbrahmap.math.asin
: arcsine functionbrahmap.math.acos
: arccosine functionbrahmap.math.atan
: arctangent functionbrahmap.math.exp
: exponential function, \(e^x\)brahmap.math.exp2
: exponential function with base 2, \(2^x\)brahmap.math.log
: natural logarithm functionbrahmap.math.log2
: base-2 logarithm functionbrahmap.math.sqrt
: square-root functionbrahmap.math.cbrt
: cube-root function
dtype
hints¶
DTypeFloat
: type-hint for thedtype
of floating-point numbersDTypeInt
: type-hint for thedtype
of signed integersDTypeUInit
: type-hint for thedtype
of unsigned integersDTypeBool
: type-hint for thedtype
of bools