@GinoD : Well, the math parser understands most of the 'usual' functions. The reference documentation from G'MIC says a bit more about it (
http://gmic.sourceforge.net/reference.shtml#section9).
Here is a copy paste of the relevant paragraphs, for this filter :
Quote:
- The math parser understands the following set of functions, operators and variables:
_ Usual operators: || (logical or), && (logical and), | (bitwise or), & (bitwise and),
!=, ==, <=, >=, <, >, << (left bitwise shift), >> (right bitwise shift), -, +, *, /,
% (modulo), ^ (power), ! (logical not), ~ (bitwise not).
_ Usual functions: sin(), cos(), tan(), asin(), acos(), atan(), sinh(), cosh(), tanh(),
log(), log2(), log10(), exp(), sign(), abs(), atan2(), round(), narg(), arg(),
isval(), isnan(), isinf(), isint(), isbool(), rol() (left bit rotation),
ror() (right bit rotation), min(), max(), sinc(), int().
Function 'atan2()' is the version of atan() with two arguments 'y,x' (as in C/C++).
Function 'narg()' returns the number of specified arguments.
Function 'arg(i,a_1,..,a_n)' returns the ith argument a_i.
Functions 'min()' and 'max()' can be called with an arbitrary number of arguments.
Functions 'isval()', 'isnan()', 'isinf()', 'isbool()' can be used to test the type of
a given number or expression.
_ The variable names below are pre-defined. They cannot be overloaded:
. 'w': width of the associated image, if any (0 otherwise).
. 'h': height of the associated image, if any (0 otherwise).
. 'd': depth of the associated image, if any (0 otherwise).
. 's': spectrum of the associated image, if any (0 otherwise).
. 'x': current processed column of the associated image, if any (0 otherwise).
. 'y': current processed row of the associated image, if any (0 otherwise).
. 'z': current processed slice of the associated image, if any (0 otherwise).
. 'c': current processed channel of the associated image, if any (0 otherwise).
. 'i': current processed pixel value (i.e. value located at (x,y,z,c)) of the
associated image, if any (0 otherwise).
. 'im','iM','ia','iv': Respectively the minimum, maximum, average values and
variance of the associated image, if any (0 otherwise).
. 'xm','ym','zm','cm': The pixel coordinates of the minimum value in the associated
image, if any (0 otherwise).
. 'xM','yM','zM','cM': The pixel coordinates of the maximum value in the
associated image, if any (0 otherwise).
. 'pi': value of pi, i.e. 3.1415926..
. 'e': value of e, i.e. 2.71828..
. '?' or 'u': a random value between [0,1], following a uniform distribution.
. 'g': a random value, following a gaussian distribution of variance 1
(roughly in [-5,5]).
_ These special operators can be used:
. ';': expression separator. The returned value is always the last encountered
expression. For instance expression '1;2;pi' is evaluated as 'pi'.
. '=': variable assignment. Variables in mathematical parser can only refer to.
numerical values. Variable names are case-sensitive. Use this operator in
conjunction with ';' to define complex evaluable expressions, such as
't=cos(x);3*t^2+2*t+1'.
These variables remain local to the mathematical parser and cannot be accessed
outside the evaluated expression.