focus expression text field at startup -> version 1.2
[LeanCalc.git] / help / hmean
1 NAME
2     hmean - harmonic mean of a number of values
3
4 SYNOPSIS
5     hmean(x_1, x_2, ...)
6
7 TYPES
8     x_1, ...    arithmetic or list
9
10     return      determined by types of arguments, or null
11
12 DESCRIPTION
13     The null value is returned if there are no arguments.
14
15     If there are n non-list arguments x_1, x_2, ... and the
16     required operations are defined, hmean(x_1, x_2, ...) returns the
17     value of:
18
19         n/(inverse(x_1) + inverse(x_2) + ... + inverse(x_n)).
20
21     If an argument x_i is a list as defined by list(y_1, ..., y_m)
22     this is treated as if in (x_1, x_2, ...), x_i is replaced by
23     y_1, ..., y_m.
24
25
26 EXAMPLE
27     > c = config("mode", "frac")
28     > print hmean(1), hmean(1,2), hmean(1,2,3), hmean(1,2,3,4), hmean(1,2,0,3)
29     1 4/3 18/11 48/25 0
30
31 LIMITS
32     The number of arguments is not to exceed 100.
33
34 LINK LIBRARY
35     none
36
37 SEE ALSO
38     avg
39