@chapter Expression Evaluation
@c man begin EXPRESSION EVALUATION
-When evaluating an arithemetic expression, Libav uses an internal
+When evaluating an arithmetic expression, Libav uses an internal
formula evaluator, implemented through the @file{libavutil/eval.h}
interface.
@item abs(x)
@item squish(x)
@item gauss(x)
+@item isinf(x)
+Return 1.0 if @var{x} is +/-INFINITY, 0.0 otherwise.
@item isnan(x)
Return 1.0 if @var{x} is NAN, 0.0 otherwise.
@item ld(var)
Allow to load the value of the internal variable with number
-@var{var}, which was previosly stored with st(@var{var}, @var{expr}).
+@var{var}, which was previously stored with st(@var{var}, @var{expr}).
The function returns the loaded value.
@item while(cond, expr)
@item sqrt(expr)
Compute the square root of @var{expr}. This is equivalent to
"(@var{expr})^.5".
+
+@item not(expr)
+Return 1.0 if @var{expr} is zero, 0.0 otherwise.
@end table
Note that:
A*B + not(A)*C
@end example
-When A evaluates to either 1 or 0, that is the same as
-@example
-A*B + eq(A,0)*C
-@end example
-
In your C code, you can extend the list of unary and binary functions,
and define recognized constants, so that they are available for your
expressions.