User manual
mikroBasic PRO for PIC32
MikroElektronika
609
Prototype
sub function cosh(dim x as oat) as oat
Description Function returns the hyperbolic cosine of x, dened mathematically as (e
x
+e
-x
)/2. If the value of x
is too large (if overow occurs), the function fails.
Example
res = cosh(PI/3.) ‘ res = 1.600286
Prototype
sub function exp(dim x as oat) as oat
Description Function returns the value of e — the base of natural logarithms — raised to the power x (i.e. ex).
Example
res = exp(0.5) ‘ res = 1.648721
Prototype
sub function fabs(dim d as oat) as oat
Description Function returns the absolute (i.e. positive) value of d.
Example
res = fabs(-1.3) ‘ res = 1.3
Prototype
sub function oor(dim x as oat) as oat
Description Function returns the value of parameter x rounded down to the nearest integer.
Example
res = oor(15.258) ‘ res = 15.000000
Prototype
sub function frexp(dim value as oat, dim byref eptr as integer) as oat
Description The function splits a oating-point value value into a normalized fraction and an integral power of 2.
The return value is a normalized fraction and the integer exponent is stored in the object pointed to
by eptr.
Prototype
sub function eval_poly(dim x as oat, dim byref d as array[10] of oat, dim
n as integer) as oat
Description Function Calculates polynom for number x, with coefcients stored in d[], for degree n.
cosh
exp
fabs
oor
frexp
eval_poly