makes calculations on lists. Action can be one of +, -, * or /
list2 may also be a single number, in which case
this number will be used for all elements in list1
eg.:
% lmath_calc {1 2 3.2 4} + {1 2 3.2 4}
2.0 4.0 6.4 8.0
lmath_sum ?list?
returns the sum of the numbers in the list
lmath_between ?list?
returns the average of the numbers in the list.
lmath_min ?list?
returns the minimum of the numbers in the list
lmath_max ?list?
returns the maximum of the numbers in the list
lmath_filter list filter ?filterpos? ?unfilteredvalue?
applies the filter by sliding it over the list, multiplying all elements of the filter with
the current elements in the list, and changing the list element in the middle of the
filter (or at filterpos) with the sum of the products.
The numbers at the beginning and end of the list that are not covered by the filter, are given the value
of the first, respectively last element that can be calculated, unless a value for these is
explicitly given (unfilteredvalue)
returns the filtered list