Function functions (o2scl_hdf)¶
-
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)
, andsin(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. usea>(-1)
instead ofa>-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) [for x<-1 only].
Other functions:
abs(x), ceil(x), floor(x), if(t,x,y) [If t>0.5 then x, otherwise y.], isfinite(x), isinf(x), isnan(x), max(x,y), min(x,y), and sqrt1pm1(x) [√(1+x)-1].
Special values:
false = 0, true = 1, rand (experimental) = random number
Use
acol -help function
to get more information on the type-specific command calledfunction
.