Function functions (o2scl_hdf)

O2scl : Function List

void o2scl_hdf::functions()

Functions for acol.

Functions can be created using the operators and functions listed below. Examples are x==5 && y<1, acos(-1), and sin(x>5). Comparison operators result in either 1.0 (true) or 0.0 (false).

There are two additional limitations. First, in order to avoid confusion between arguments and functions, use parenthesis and quotes, i.e. "(-x*2)" instead of -x*2. Also, do not use a unary minus next to a binary operator, i.e. use a>(-1) instead of a>-1.

Operators:

() ^ * / % + - == != < > && || << >> >= <=

Power functions:

sqrt(x), cbrt(x), pow(x,y), and hypot(x,y)

Exponential functions:

exp(x), log(x), log10(x), log1p(x), and expm1(x)

Trigonometric functions:

asin(x), acos(x), atan(x), sinh(x), cosh(x), tanh(x), asinh(x), acosh(x), atanh(x), and atan2(y,x)

Exponential functions:

erf(x) [2/sqrt(pi) ∫_0^{x} exp(-t^2) dt], erfc(x) [2/sqrt(pi) ∫_x^∞ exp(-t^2) dt = 1-erf(x)], tgamma(x) [∫ t_0^∞ t^{x-1} exp(-t) dt = (x-1)! for ints], and lgamma(x) [ln |tgamma(x)|]

Bessel functions:

cyl_bessel_i(nu,x) [i.e. Iᵥ(x)], cyl_bessel_j(nu,x) [i.e. Jᵥ(x)], cyl_bessel_k(nu,x) [i.e. Kᵥ(x)], and cyl_neumann(nu,x) [i.e. Yᵥ(x)].

Additional integrals (experimental):

fdint(nu,x) [Fermi-Dirac integ., ∫_0^∞ t^nu/(exp(t-x)+1)], beint(nu,x) [Bose-Einstein integ. ∫_0^∞ t^nu/(exp(t-x)-1)], and polylog(nu,x).

Other functions:

abs(x), min(x,y), max(x,y), floor(x), ceil(x), sqrt1pm1(x) [√(1+x)-1], and if(t,x,y) [If t>0.5 then x, otherwise y.]

Special values:

false = 0, true = 1, rand(experimental) = random number

Use acol -help function to get more information on the type-specific command called function .