Skip to main content

spreadsheet_ods_formula/generated/
stat.rs

1//! 
2//! The following are statistical functions (functions that report information 
3//! on a set of numbers). Some functions that could also be considered 
4//! statistical functions, such as SUM, are listed elsewhere.
5
6use crate::*;
7#[allow(unused_imports)]
8use crate::stat::*;
9
10/// Calculates the average of the absolute deviations of the values in list.
11///
12/// [documentfoundation->AVEDEV](https://wiki.documentfoundation.org/Documentation/Calc_Functions/AVEDEV)
13///
14/// __Syntax__: 
15/// ```ods
16///     AVEDEV({ N: NumberSequenceList}+ )
17/// ```
18///
19/// __Constraints__:
20/// None.
21///
22/// __Semantics__:
23/// For a list N containing n numbers x1 to xn, with average x, AVEDEV(N) is 
24/// equal to:
25///
26/// __See also__: [crate::of::sum()], [crate::of::average()], 
27#[inline]
28pub fn avedev<A: Sequence>(n: A) -> FnNumber1<A> {
29    FnNumber1("AVEDEV", n)
30}
31
32/// Average the set of numbers
33///
34/// [documentfoundation->AVERAGE](https://wiki.documentfoundation.org/Documentation/Calc_Functions/AVERAGE)
35///
36/// __Syntax__: 
37/// ```ods
38///     AVERAGE({ N: NumberSequence}+ )
39/// ```
40///
41/// __Constraints__:
42/// At least one Number included. Returns an Error if no Numbers provided.
43///
44/// __Semantics__:
45/// Computes SUM(N) / COUNT(N).
46///
47/// __See also__: [crate::of::sum()], [crate::of::count()], 
48#[inline]
49pub fn average<A: Sequence>(n: A) -> FnNumber1<A> {
50    FnNumber1("AVERAGE", n)
51}
52
53/// Average values, including values of type Text and Logical.
54///
55/// [documentfoundation->AVERAGEA](https://wiki.documentfoundation.org/Documentation/Calc_Functions/AVERAGEA)
56///
57/// __Syntax__: 
58/// ```ods
59///     AVERAGEA({ N: Any}+ )
60/// ```
61///
62/// __Constraints__:
63/// At least one value included. Returns an Error if no value provided.
64///
65/// __Semantics__:
66/// A variant of the AVERAGE function that includes values of type Text and 
67/// Logical. Text values are treated as number 0. Logical TRUE is treated as 1 
68/// and FALSE is treated as 0. Empty cells are not included. Any N may be of 
69/// type ReferenceList.
70///
71/// __See also__: [crate::of::average()], 
72#[inline]
73pub fn averagea<A: Sequence>(n: A) -> FnNumber1<A> {
74    FnNumber1("AVERAGEA", n)
75}
76
77/// Average the values of cells in a range that meet a criteria.
78///
79/// [documentfoundation->AVERAGEIF](https://wiki.documentfoundation.org/Documentation/Calc_Functions/AVERAGEIF)
80///
81/// __Syntax__: 
82/// ```ods
83///     AVERAGEIF( R: Reference; C: Criterion )
84/// ```
85///
86/// __Constraints__:
87/// Does not accept constant values as reference parameters.
88///
89/// __Semantics__:
90/// If reference A is omitted, averages the values of cells in the reference 
91/// range R that meet the Criterion C (4.11.8). If reference A is given, 
92/// averages the values of cells of a range that is constructed using the top 
93/// left cell of reference A and applying the dimensions, shape and size, of 
94/// reference R. If no cell in range R matches the Criterion C, an Error is 
95/// returned. If no Numbers are in the range to be averaged, an Error is 
96/// returned.
97/// 
98/// The values returned may vary depending upon the 
99/// HOST-USE-REGULAR-EXPRESSIONS or HOST-USE-WILDCARDS or 
100/// HOST-SEARCH-CRITERIA-MUST-APPLY-TO-WHOLE-CELL properties. 3.4
101///
102/// __See also__: [crate::of::averageifs()], [crate::of::countif()], [crate::of::sumif()], [crate::of::infix operator "="()], [crate::of::infix operator "<>"()], [crate::of::infix operator ordered comparison ("<", "<=", ">", ">=")()], [crate::of::averageif_()], 
103#[inline]
104pub fn averageif<A: Reference, B: Criterion>(r: A, c: B) -> FnNumber2<A, B> {
105    FnNumber2("AVERAGEIF", r, c)
106}
107
108/// Average the values of cells in a range that meet a criteria.
109///
110/// [documentfoundation->AVERAGEIF](https://wiki.documentfoundation.org/Documentation/Calc_Functions/AVERAGEIF)
111///
112/// __Syntax__: 
113/// ```ods
114///     AVERAGEIF( R: Reference; C: Criterion; A: Reference )
115/// ```
116///
117/// __Constraints__:
118/// Does not accept constant values as reference parameters.
119///
120/// __Semantics__:
121/// If reference A is omitted, averages the values of cells in the reference 
122/// range R that meet the Criterion C (4.11.8). If reference A is given, 
123/// averages the values of cells of a range that is constructed using the top 
124/// left cell of reference A and applying the dimensions, shape and size, of 
125/// reference R. If no cell in range R matches the Criterion C, an Error is 
126/// returned. If no Numbers are in the range to be averaged, an Error is 
127/// returned.
128/// 
129/// The values returned may vary depending upon the 
130/// HOST-USE-REGULAR-EXPRESSIONS or HOST-USE-WILDCARDS or 
131/// HOST-SEARCH-CRITERIA-MUST-APPLY-TO-WHOLE-CELL properties. 3.4
132///
133/// __See also__: [crate::of::averageifs()], [crate::of::countif()], [crate::of::sumif()], [crate::of::infix operator "="()], [crate::of::infix operator "<>"()], [crate::of::infix operator ordered comparison ("<", "<=", ">", ">=")()], [crate::of::averageif()], 
134#[inline]
135pub fn averageif_<A: Reference, B: Criterion, C: Reference>(r: A, c: B, a: C) -> FnNumber3<A, B, C> {
136    FnNumber3("AVERAGEIF", r, c, a)
137}
138
139/// returns the value of the probability density function or the cumulative 
140/// distribution function for the beta distribution.
141///
142/// [documentfoundation->BETADIST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/BETADIST)
143///
144/// __Syntax__: 
145/// ```ods
146///     BETADIST( x: Number; α: Number; β: Number )
147/// ```
148///
149/// __Constraints__:
150/// α > 0, β > 0, a < b,
151/// If α < 1, then the density function has a pole at x = a.
152/// If β < 1, then the density function has a pole at x = b.
153/// In both cases, if x = a respectively x = b and Cumulative = FALSE, an Error 
154/// is returned.
155///
156/// __Semantics__:
157/// If Cumulative is FALSE, BETADIST returns 0 if x < a or x > b and the value
158/// 
159/// otherwise.
160/// 
161/// If Cumulative is TRUE, BETADIST returns 0 if x < a, 1 if x > b, and the 
162/// value
163/// 
164/// otherwise.
165///
166/// __Note__:
167/// With substitution
168/// ≝
169/// 
170/// the term can be written as
171///
172/// __See also__: [crate::of::betainv()], [crate::of::betadist_()], [crate::of::betadist__()], [crate::of::betadist___()], 
173#[inline]
174pub fn betadist<A: Number, B: Number, C: Number>(x: A, alpha: B, beta: C) -> FnNumber3<A, B, C> {
175    FnNumber3("BETADIST", x, alpha, beta)
176}
177
178/// returns the value of the probability density function or the cumulative 
179/// distribution function for the beta distribution.
180///
181/// [documentfoundation->BETADIST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/BETADIST)
182///
183/// __Syntax__: 
184/// ```ods
185///     BETADIST( x: Number; α: Number; β: Number; a: Number )
186/// ```
187///
188/// __Constraints__:
189/// α > 0, β > 0, a < b,
190/// If α < 1, then the density function has a pole at x = a.
191/// If β < 1, then the density function has a pole at x = b.
192/// In both cases, if x = a respectively x = b and Cumulative = FALSE, an Error 
193/// is returned.
194///
195/// __Semantics__:
196/// If Cumulative is FALSE, BETADIST returns 0 if x < a or x > b and the value
197/// 
198/// otherwise.
199/// 
200/// If Cumulative is TRUE, BETADIST returns 0 if x < a, 1 if x > b, and the 
201/// value
202/// 
203/// otherwise.
204///
205/// __Note__:
206/// With substitution
207/// ≝
208/// 
209/// the term can be written as
210///
211/// __See also__: [crate::of::betainv()], [crate::of::betadist()], [crate::of::betadist__()], [crate::of::betadist___()], 
212#[inline]
213pub fn betadist_<A: Number, B: Number, C: Number, D: Number>(x: A, alpha: B, beta: C, a: D) -> FnNumber4<A, B, C, D> {
214    FnNumber4("BETADIST", x, alpha, beta, a)
215}
216
217/// returns the value of the probability density function or the cumulative 
218/// distribution function for the beta distribution.
219///
220/// [documentfoundation->BETADIST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/BETADIST)
221///
222/// __Syntax__: 
223/// ```ods
224///     BETADIST( x: Number; α: Number; β: Number; a: Number; b: Number )
225/// ```
226///
227/// __Constraints__:
228/// α > 0, β > 0, a < b,
229/// If α < 1, then the density function has a pole at x = a.
230/// If β < 1, then the density function has a pole at x = b.
231/// In both cases, if x = a respectively x = b and Cumulative = FALSE, an Error 
232/// is returned.
233///
234/// __Semantics__:
235/// If Cumulative is FALSE, BETADIST returns 0 if x < a or x > b and the value
236/// 
237/// otherwise.
238/// 
239/// If Cumulative is TRUE, BETADIST returns 0 if x < a, 1 if x > b, and the 
240/// value
241/// 
242/// otherwise.
243///
244/// __Note__:
245/// With substitution
246/// ≝
247/// 
248/// the term can be written as
249///
250/// __See also__: [crate::of::betainv()], [crate::of::betadist()], [crate::of::betadist_()], [crate::of::betadist___()], 
251#[inline]
252pub fn betadist__<A: Number, B: Number, C: Number, D: Number, E: Number>(x: A, alpha: B, beta: C, a: D, b: E) -> FnNumber5<A, B, C, D, E> {
253    FnNumber5("BETADIST", x, alpha, beta, a, b)
254}
255
256/// returns the value of the probability density function or the cumulative 
257/// distribution function for the beta distribution.
258///
259/// [documentfoundation->BETADIST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/BETADIST)
260///
261/// __Syntax__: 
262/// ```ods
263///     BETADIST( x: Number; α: Number; β: Number; a: Number; b: Number; Cumulative: Logical )
264/// ```
265///
266/// __Constraints__:
267/// α > 0, β > 0, a < b,
268/// If α < 1, then the density function has a pole at x = a.
269/// If β < 1, then the density function has a pole at x = b.
270/// In both cases, if x = a respectively x = b and Cumulative = FALSE, an Error 
271/// is returned.
272///
273/// __Semantics__:
274/// If Cumulative is FALSE, BETADIST returns 0 if x < a or x > b and the value
275/// 
276/// otherwise.
277/// 
278/// If Cumulative is TRUE, BETADIST returns 0 if x < a, 1 if x > b, and the 
279/// value
280/// 
281/// otherwise.
282///
283/// __Note__:
284/// With substitution
285/// ≝
286/// 
287/// the term can be written as
288///
289/// __See also__: [crate::of::betainv()], [crate::of::betadist()], [crate::of::betadist_()], [crate::of::betadist__()], 
290#[inline]
291pub fn betadist___<A: Number, B: Number, C: Number, D: Number, E: Number, F: Logical>(x: A, alpha: B, beta: C, a: D, b: E, cumulative: F) -> FnNumber6<A, B, C, D, E, F> {
292    FnNumber6("BETADIST", x, alpha, beta, a, b, cumulative)
293}
294
295/// returns the inverse of BETADIST(x;α;β;A;B;TRUE()).
296///
297/// [documentfoundation->BETAINV](https://wiki.documentfoundation.org/Documentation/Calc_Functions/BETAINV)
298///
299/// __Syntax__: 
300/// ```ods
301///     BETAINV( P: Number; α: Number; β: Number )
302/// ```
303///
304/// __Constraints__:
305/// 0 ≤ P ≤ 1, α > 0, β > 0, A < B
306///
307/// __Semantics__:
308/// BETAINV returns the unique number x in the closed interval from A to B such 
309/// that BETADIST(x;α;β;A;B) = P.
310///
311/// __See also__: [crate::of::betadist()], [crate::of::betainv_()], [crate::of::betainv__()], 
312#[inline]
313pub fn betainv<A: Number, B: Number, C: Number>(p: A, alpha: B, beta: C) -> FnNumber3<A, B, C> {
314    FnNumber3("BETAINV", p, alpha, beta)
315}
316
317/// returns the inverse of BETADIST(x;α;β;A;B;TRUE()).
318///
319/// [documentfoundation->BETAINV](https://wiki.documentfoundation.org/Documentation/Calc_Functions/BETAINV)
320///
321/// __Syntax__: 
322/// ```ods
323///     BETAINV( P: Number; α: Number; β: Number; A: Number )
324/// ```
325///
326/// __Constraints__:
327/// 0 ≤ P ≤ 1, α > 0, β > 0, A < B
328///
329/// __Semantics__:
330/// BETAINV returns the unique number x in the closed interval from A to B such 
331/// that BETADIST(x;α;β;A;B) = P.
332///
333/// __See also__: [crate::of::betadist()], [crate::of::betainv()], [crate::of::betainv__()], 
334#[inline]
335pub fn betainv_<A: Number, B: Number, C: Number, D: Number>(p: A, alpha: B, beta: C, a: D) -> FnNumber4<A, B, C, D> {
336    FnNumber4("BETAINV", p, alpha, beta, a)
337}
338
339/// returns the inverse of BETADIST(x;α;β;A;B;TRUE()).
340///
341/// [documentfoundation->BETAINV](https://wiki.documentfoundation.org/Documentation/Calc_Functions/BETAINV)
342///
343/// __Syntax__: 
344/// ```ods
345///     BETAINV( P: Number; α: Number; β: Number; A: Number; B: Number )
346/// ```
347///
348/// __Constraints__:
349/// 0 ≤ P ≤ 1, α > 0, β > 0, A < B
350///
351/// __Semantics__:
352/// BETAINV returns the unique number x in the closed interval from A to B such 
353/// that BETADIST(x;α;β;A;B) = P.
354///
355/// __See also__: [crate::of::betadist()], [crate::of::betainv()], [crate::of::betainv_()], 
356#[inline]
357pub fn betainv__<A: Number, B: Number, C: Number, D: Number, E: Number>(p: A, alpha: B, beta: C, a: D, b: E) -> FnNumber5<A, B, C, D, E> {
358    FnNumber5("BETAINV", p, alpha, beta, a, b)
359}
360
361/// Returns the probability of a trial result using binomial distribution.
362///
363/// [documentfoundation->BINOM.DIST.RANGE](https://wiki.documentfoundation.org/Documentation/Calc_Functions/BINOM.DIST.RANGE)
364///
365/// __Syntax__: 
366/// ```ods
367///     BINOM.DIST.RANGE( N: Integer; P: Number; S: Integer )
368/// ```
369///
370/// __Constraints__:
371/// 0 ≤ P ≤ 1, 0 ≤ S ≤ S2 ≤ N
372///
373/// __Semantics__:
374/// Let N be a total number of independent trials, and P be a probability of 
375/// success for each trial. This function returns the probability that the 
376/// number of successful trials shall be exactly S. If the optional parameter 
377/// S2 is provided, this function returns the probability that the number of 
378/// successful trials shall lie between S and S2 inclusive.
379/// 
380/// This function is computed as follows:
381/// 
382/// If S2 is not given, let S2 = S. Then the function returns the value of
383///
384/// __See also__: [crate::of::binomdist()], [crate::of::binom_dist_range_()], 
385#[inline]
386pub fn binom_dist_range<A: Number, B: Number, C: Number>(n: A, p: B, s: C) -> FnNumber3<A, B, C> {
387    FnNumber3("BINOM.DIST.RANGE", n, p, s)
388}
389
390/// Returns the probability of a trial result using binomial distribution.
391///
392/// [documentfoundation->BINOM.DIST.RANGE](https://wiki.documentfoundation.org/Documentation/Calc_Functions/BINOM.DIST.RANGE)
393///
394/// __Syntax__: 
395/// ```ods
396///     BINOM.DIST.RANGE( N: Integer; P: Number; S: Integer; S2: Integer )
397/// ```
398///
399/// __Constraints__:
400/// 0 ≤ P ≤ 1, 0 ≤ S ≤ S2 ≤ N
401///
402/// __Semantics__:
403/// Let N be a total number of independent trials, and P be a probability of 
404/// success for each trial. This function returns the probability that the 
405/// number of successful trials shall be exactly S. If the optional parameter 
406/// S2 is provided, this function returns the probability that the number of 
407/// successful trials shall lie between S and S2 inclusive.
408/// 
409/// This function is computed as follows:
410/// 
411/// If S2 is not given, let S2 = S. Then the function returns the value of
412///
413/// __See also__: [crate::of::binomdist()], [crate::of::binom_dist_range()], 
414#[inline]
415pub fn binom_dist_range_<A: Number, B: Number, C: Number, D: Number>(n: A, p: B, s: C, s2: D) -> FnNumber4<A, B, C, D> {
416    FnNumber4("BINOM.DIST.RANGE", n, p, s, s2)
417}
418
419/// Returns the binomial distribution.
420///
421/// [documentfoundation->BINOMDIST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/BINOMDIST)
422///
423/// __Syntax__: 
424/// ```ods
425///     BINOMDIST( S: Integer; N: Integer; P: Number; Cumulative: Logical )
426/// ```
427///
428/// __Constraints__:
429/// 0 ≤ P ≤ 1; 0 ≤ S ≤ N
430///
431/// __Semantics__:
432/// If Cumulative is FALSE, this function returns the same result as 
433/// BINOM.DIST.RANGE(N;P;S). If Cumulative is TRUE, it is equivalent to calling 
434/// BINOM.DIST.RANGE(N;P;0;S).
435///
436/// __See also__: [crate::of::binom_dist_range()], 
437#[inline]
438pub fn binomdist<A: Number, B: Number, C: Number, D: Logical>(s: A, n: B, p: C, cumulative: D) -> FnNumber4<A, B, C, D> {
439    FnNumber4("BINOMDIST", s, n, p, cumulative)
440}
441
442/// returns the right-tail probability for the χ2-distribution.
443///
444/// [documentfoundation->LEGACY.CHIDIST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/LEGACY.CHIDIST)
445///
446/// __Syntax__: 
447/// ```ods
448///     LEGACY.CHIDIST( X: Number; DegreesOfFreedom: Number )
449/// ```
450///
451/// __Constraints__:
452/// DegreesOfFreedom is a positive integer.
453///
454/// __Semantics__:
455/// In the following n is DegreesOfFreedom. LEGACY.CHIDIST returns 1 for X ≤ 
456/// 0 and the value
457/// 
458/// for X > 0.
459///
460/// __See also__: [crate::of::chisqdist()], [crate::of::legacy_chitest()], 
461#[inline]
462pub fn legacy_chidist<A: Number, B: Number>(x: A, degrees_of_freedom: B) -> FnNumber2<A, B> {
463    FnNumber2("LEGACY.CHIDIST", x, degrees_of_freedom)
464}
465
466/// returns the value of the probability density function or the cumulative 
467/// distribution function for the χ2-distribution.
468///
469/// [documentfoundation->CHISQDIST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/CHISQDIST)
470///
471/// __Syntax__: 
472/// ```ods
473///     CHISQDIST( X: Number; DegreesOfFreedom: Number )
474/// ```
475///
476/// __Constraints__:
477/// DegreesOfFreedom is a positive integer.
478///
479/// __Semantics__:
480/// In the following n is DegreesOfFreedom.
481/// 
482/// If Cumulative is FALSE, CHISQDIST returns 0 for X ≤ 0 and the value
483/// 
484/// for X > 0.
485/// 
486/// If Cumulative is TRUE, CHISQDIST returns 0 for X ≤ 0 and the value
487/// 
488/// for X > 0.
489///
490/// __See also__: [crate::of::legacy_chidist()], [crate::of::chisqdist_()], 
491#[inline]
492pub fn chisqdist<A: Number, B: Number>(x: A, degrees_of_freedom: B) -> FnNumber2<A, B> {
493    FnNumber2("CHISQDIST", x, degrees_of_freedom)
494}
495
496/// returns the value of the probability density function or the cumulative 
497/// distribution function for the χ2-distribution.
498///
499/// [documentfoundation->CHISQDIST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/CHISQDIST)
500///
501/// __Syntax__: 
502/// ```ods
503///     CHISQDIST( X: Number; DegreesOfFreedom: Number; Cumulative: Logical )
504/// ```
505///
506/// __Constraints__:
507/// DegreesOfFreedom is a positive integer.
508///
509/// __Semantics__:
510/// In the following n is DegreesOfFreedom.
511/// 
512/// If Cumulative is FALSE, CHISQDIST returns 0 for X ≤ 0 and the value
513/// 
514/// for X > 0.
515/// 
516/// If Cumulative is TRUE, CHISQDIST returns 0 for X ≤ 0 and the value
517/// 
518/// for X > 0.
519///
520/// __See also__: [crate::of::legacy_chidist()], [crate::of::chisqdist()], 
521#[inline]
522pub fn chisqdist_<A: Number, B: Number, C: Logical>(x: A, degrees_of_freedom: B, cumulative: C) -> FnNumber3<A, B, C> {
523    FnNumber3("CHISQDIST", x, degrees_of_freedom, cumulative)
524}
525
526/// returns the inverse of LEGACY.CHIDIST(x; DegreesOfFreedom).
527///
528/// [documentfoundation->LEGACY.CHIINV](https://wiki.documentfoundation.org/Documentation/Calc_Functions/LEGACY.CHIINV)
529///
530/// __Syntax__: 
531/// ```ods
532///     LEGACY.CHIINV( P: Number; DegreesOfFreedom: Number )
533/// ```
534///
535/// __Constraints__:
536/// DegreesOfFreedom is a positive integer and 0 < P ≤ 1.
537///
538/// __Semantics__:
539/// LEGACY.CHIINV returns the unique number x such that LEGACY.CHIDIST(x; 
540/// DegreesOfFreedom) = P.
541///
542/// __See also__: [crate::of::legacy_chidist()], 
543#[inline]
544pub fn legacy_chiinv<A: Number, B: Number>(p: A, degrees_of_freedom: B) -> FnNumber2<A, B> {
545    FnNumber2("LEGACY.CHIINV", p, degrees_of_freedom)
546}
547
548/// returns the inverse of CHISQDIST(x; DegreesOfFreedom; TRUE()).
549///
550/// [documentfoundation->CHISQINV](https://wiki.documentfoundation.org/Documentation/Calc_Functions/CHISQINV)
551///
552/// __Syntax__: 
553/// ```ods
554///     CHISQINV( P: Number; DegreesOfFreedom: Number )
555/// ```
556///
557/// __Constraints__:
558/// DegreesOfFreedom is a positive integer and 0 < P ≤ 1 .
559///
560/// __Semantics__:
561/// CHISQINV returns the unique number x ≥ 0 such that CHISQDIST(x; 
562/// DegreesOfFreedom;TRUE()) = P.
563///
564/// __See also__: [crate::of::chisqdist()], 
565#[inline]
566pub fn chisqinv<A: Number, B: Number>(p: A, degrees_of_freedom: B) -> FnNumber2<A, B> {
567    FnNumber2("CHISQINV", p, degrees_of_freedom)
568}
569
570/// Returns some Chi square goodness-for-fit test.
571///
572/// [documentfoundation->LEGACY.CHITEST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/LEGACY.CHITEST)
573///
574/// __Syntax__: 
575/// ```ods
576///     LEGACY.CHITEST( A: Array; E: Array )
577/// ```
578///
579/// __Constraints__:
580/// 
581/// ROWS(A) = ROWS(E)
582/// COLUMNS(A) = COLUMNS(E)
583/// COLUMNS(A) * ROWS(A) > 1
584///
585/// __Semantics__:
586/// 
587/// For an empty element or an element of type Text or Boolean in A the element 
588/// at the corresponding position of E is ignored, and vice versa.
589/// 
590/// •A: actual observation data.
591/// 
592/// •E: expected values.
593/// 
594/// First a Chi square statistic is calculated:
595/// 
596/// Then LEGACY.CHIDIST is called with the Chi-square value and a degree of 
597/// freedom (df):
598///
599/// __See also__: [crate::of::columns()], [crate::of::rows()], [crate::of::legacy_chidist()], 
600#[inline]
601pub fn legacy_chitest<A: Array, B: Array>(a: A, e: B) -> FnNumber2<A, B> {
602    FnNumber2("LEGACY.CHITEST", a, e)
603}
604
605/// Returns the confidence interval for a population mean.
606///
607/// [documentfoundation->CONFIDENCE](https://wiki.documentfoundation.org/Documentation/Calc_Functions/CONFIDENCE)
608///
609/// __Syntax__: 
610/// ```ods
611///     CONFIDENCE( Alpha: Number; Stddev: Number; Size: Number )
612/// ```
613///
614/// __Constraints__:
615/// 0 < Alpha < 1; Stddev > 0, Size ≥ 1
616///
617/// __Semantics__:
618/// Calling this function is equivalent to calling
619/// NORMINV(1 - Alpha / 2; 0; 1) * Stddev / SQRT (Size)
620///
621/// __See also__: [crate::of::norminv()], [crate::of::sqrt()], 
622#[inline]
623pub fn confidence<A: Number, B: Number, C: Number>(alpha: A, stddev: B, size: C) -> FnNumber3<A, B, C> {
624    FnNumber3("CONFIDENCE", alpha, stddev, size)
625}
626
627/// Calculates the correlation coefficient of values in N1 and N2.
628///
629/// [documentfoundation->CORREL](https://wiki.documentfoundation.org/Documentation/Calc_Functions/CORREL)
630///
631/// __Syntax__: 
632/// ```ods
633///     CORREL( N1: Array; N2: Array )
634/// ```
635///
636/// __Constraints__:
637/// COLUMNS(N1) = COLUMNS(N2), ROWS(N1) = ROWS(N2), both sequences shall 
638/// contain at least one number at corresponding positions each.
639///
640/// __Semantics__:
641/// Has the same value as COVAR(N1;N2) / STDEVP(N1) * (STDEVP(N2)). The CORREL 
642/// function actually is identical to the PEARSON function.
643/// 
644/// For an empty element or an element of type Text or Boolean in N1 the 
645/// element at the corresponding position of N2 is ignored, and vice versa.
646///
647/// __See also__: [crate::of::columns()], [crate::of::rows()], [crate::of::covar()], [crate::of::stdevp()], [crate::of::pearson()], 
648#[inline]
649pub fn correl<A: Array, B: Array>(n1: A, n2: B) -> FnNumber2<A, B> {
650    FnNumber2("CORREL", n1, n2)
651}
652
653/// Calculates covariance of two cell ranges.
654///
655/// [documentfoundation->COVAR](https://wiki.documentfoundation.org/Documentation/Calc_Functions/COVAR)
656///
657/// __Syntax__: 
658/// ```ods
659///     COVAR( N1: Array; N2: Array )
660/// ```
661///
662/// __Constraints__:
663/// COLUMNS(N1) = COLUMNS(N2), ROWS(N1) = ROWS(N2), both sequences shall 
664/// contain at least one number at corresponding positions each.
665///
666/// __Semantics__:
667/// returns
668/// 
669/// where
670/// is the result of calling AVERAGE(N1), and
671/// is the result of calling AVERAGE(N2), and N is the number of terms in the 
672/// sum.
673/// 
674/// For an empty element or an element of type Text or Boolean in N1 the 
675/// element at the corresponding position of N2 is ignored, and vice versa.
676///
677/// __See also__: [crate::of::columns()], [crate::of::rows()], [crate::of::average()], 
678#[inline]
679pub fn covar<A: Array, B: Array>(n1: A, n2: B) -> FnNumber2<A, B> {
680    FnNumber2("COVAR", n1, n2)
681}
682
683/// Returns the smallest value for which the cumulative binomial distribution 
684/// is greater than or equal to a criterion value.
685///
686/// [documentfoundation->CRITBINOM](https://wiki.documentfoundation.org/Documentation/Calc_Functions/CRITBINOM)
687///
688/// __Syntax__: 
689/// ```ods
690///     CRITBINOM( Trials: Number; SP: Number; Alpha: Number )
691/// ```
692///
693/// __Constraints__:
694/// Trials ≥ 0, 0 ≤ SP ≤ 1, 0 ≤ Alpha ≤ 1
695///
696/// __Semantics__:
697/// 
698/// •Trials: the total number of trials.
699/// 
700/// •SP: the probability of success for one trial.
701/// 
702/// •Alpha: the threshold probability to be reached or exceeded.
703///
704/// __See also__: 
705#[inline]
706pub fn critbinom<A: Number, B: Number, C: Number>(trials: A, s_p: B, alpha: C) -> FnNumber3<A, B, C> {
707    FnNumber3("CRITBINOM", trials, s_p, alpha)
708}
709
710/// Calculates sum of squares of deviations.
711///
712/// [documentfoundation->DEVSQ](https://wiki.documentfoundation.org/Documentation/Calc_Functions/DEVSQ)
713///
714/// __Syntax__: 
715/// ```ods
716///     DEVSQ({ N: NumberSequence}+ )
717/// ```
718///
719/// __Semantics__:
720/// returns
721/// 
722/// where a is the result of calling AVERAGE(N).
723///
724/// __See also__: 
725#[inline]
726pub fn devsq<A: Sequence>(n: A) -> FnNumber1<A> {
727    FnNumber1("DEVSQ", n)
728}
729
730/// returns the value of the probability density function or the cumulative 
731/// distribution function for the exponential distribution.
732///
733/// [documentfoundation->EXPONDIST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/EXPONDIST)
734///
735/// __Syntax__: 
736/// ```ods
737///     EXPONDIST( X: Number; lambda: Number )
738/// ```
739///
740/// __Constraints__:
741/// lambda > 0
742///
743/// __Semantics__:
744/// If Cumulative is FALSE, EXPONDIST returns 0 if X < 0 and the value
745/// 
746/// otherwise.
747/// 
748/// If Cumulative is TRUE, EXPONDIST returns 0 if X < 0 and the value
749/// 
750/// otherwise.
751///
752/// __See also__: [crate::of::expondist_()], 
753#[inline]
754pub fn expondist<A: Number, B: Number>(x: A, lambda: B) -> FnNumber2<A, B> {
755    FnNumber2("EXPONDIST", x, lambda)
756}
757
758/// returns the value of the probability density function or the cumulative 
759/// distribution function for the exponential distribution.
760///
761/// [documentfoundation->EXPONDIST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/EXPONDIST)
762///
763/// __Syntax__: 
764/// ```ods
765///     EXPONDIST( X: Number; lambda: Number; Cumulative: Logical )
766/// ```
767///
768/// __Constraints__:
769/// lambda > 0
770///
771/// __Semantics__:
772/// If Cumulative is FALSE, EXPONDIST returns 0 if X < 0 and the value
773/// 
774/// otherwise.
775/// 
776/// If Cumulative is TRUE, EXPONDIST returns 0 if X < 0 and the value
777/// 
778/// otherwise.
779///
780/// __See also__: [crate::of::expondist()], 
781#[inline]
782pub fn expondist_<A: Number, B: Number, C: Logical>(x: A, lambda: B, cumulative: C) -> FnNumber3<A, B, C> {
783    FnNumber3("EXPONDIST", x, lambda, cumulative)
784}
785
786/// returns the value of the probability density function or the cumulative 
787/// distribution function for the F-distribution.
788///
789/// [documentfoundation->FDIST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/FDIST)
790///
791/// __Syntax__: 
792/// ```ods
793///     FDIST( X: Number; R1: Number; R2: Number )
794/// ```
795///
796/// __Constraints__:
797/// R1 and R2 are positive integers
798///
799/// __Semantics__:
800/// 
801/// •R1: the degrees of freedom in the numerator of the F distribution.
802/// 
803/// •R2: the degrees of freedom in the denominator of the F distribution.
804/// 
805/// If Cumulative is FALSE, FDIST returns 0 if X < 0, an Error if the numerator 
806/// degrees of freedom R1 = 1 and X = 0, and the value
807/// 
808/// otherwise.
809/// If the numerator degrees of freedom R1 = 1, then the density function has a 
810/// pole at X = 0, the subterm
811/// is not defined.
812/// 
813/// If Cumulative is TRUE, FDIST returns 0 if X < 0 and the value
814/// 
815/// otherwise.
816///
817/// __See also__: [crate::of::legacy_fdist()], [crate::of::fdist_()], 
818#[inline]
819pub fn fdist<A: Number, B: Number, C: Number>(x: A, r1: B, r2: C) -> FnNumber3<A, B, C> {
820    FnNumber3("FDIST", x, r1, r2)
821}
822
823/// returns the value of the probability density function or the cumulative 
824/// distribution function for the F-distribution.
825///
826/// [documentfoundation->FDIST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/FDIST)
827///
828/// __Syntax__: 
829/// ```ods
830///     FDIST( X: Number; R1: Number; R2: Number; Cumulative: Logical )
831/// ```
832///
833/// __Constraints__:
834/// R1 and R2 are positive integers
835///
836/// __Semantics__:
837/// 
838/// •R1: the degrees of freedom in the numerator of the F distribution.
839/// 
840/// •R2: the degrees of freedom in the denominator of the F distribution.
841/// 
842/// If Cumulative is FALSE, FDIST returns 0 if X < 0, an Error if the numerator 
843/// degrees of freedom R1 = 1 and X = 0, and the value
844/// 
845/// otherwise.
846/// If the numerator degrees of freedom R1 = 1, then the density function has a 
847/// pole at X = 0, the subterm
848/// is not defined.
849/// 
850/// If Cumulative is TRUE, FDIST returns 0 if X < 0 and the value
851/// 
852/// otherwise.
853///
854/// __See also__: [crate::of::legacy_fdist()], [crate::of::fdist()], 
855#[inline]
856pub fn fdist_<A: Number, B: Number, C: Number, D: Logical>(x: A, r1: B, r2: C, cumulative: D) -> FnNumber4<A, B, C, D> {
857    FnNumber4("FDIST", x, r1, r2, cumulative)
858}
859
860/// returns the area of the right tail of the probability density function for 
861/// the F-distribution.
862///
863/// [documentfoundation->LEGACY.FDIST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/LEGACY.FDIST)
864///
865/// __Syntax__: 
866/// ```ods
867///     LEGACY.FDIST( X: Number; R1: Number; R2: Number )
868/// ```
869///
870/// __Constraints__:
871/// R1 and R2 are positive integers
872///
873/// __Semantics__:
874/// 
875/// LEGACY.FDIST returns Error if x < 0 and the value
876/// 
877/// otherwise.
878/// 
879/// Note that the latter is (1-FDIST(x; r1; r2;TRUE())).
880///
881/// __See also__: [crate::of::fdist()], 
882#[inline]
883pub fn legacy_fdist<A: Number, B: Number, C: Number>(x: A, r1: B, r2: C) -> FnNumber3<A, B, C> {
884    FnNumber3("LEGACY.FDIST", x, r1, r2)
885}
886
887/// returns the inverse of FDIST(x;R1;R2;TRUE()).
888///
889/// [documentfoundation->FINV](https://wiki.documentfoundation.org/Documentation/Calc_Functions/FINV)
890///
891/// __Syntax__: 
892/// ```ods
893///     FINV( P: Number; R1: Number; R2: Number )
894/// ```
895///
896/// __Constraints__:
897/// 0 ≤ P < 1, R1 and R2 are positive integers
898///
899/// __Semantics__:
900/// FINV returns the unique non-negative number x such that FDIST(x;R1;R2) = P.
901///
902/// __See also__: [crate::of::fdist()], [crate::of::legacy_fdist()], [crate::of::legacy_finv()], 
903#[inline]
904pub fn finv<A: Number, B: Number, C: Number>(p: A, r1: B, r2: C) -> FnNumber3<A, B, C> {
905    FnNumber3("FINV", p, r1, r2)
906}
907
908/// returns the inverse of LEGACY.FDIST(x;R1;R2).
909///
910/// [documentfoundation->LEGACY.FINV](https://wiki.documentfoundation.org/Documentation/Calc_Functions/LEGACY.FINV)
911///
912/// __Syntax__: 
913/// ```ods
914///     LEGACY.FINV( P: Number; R1: Number; R2: Number )
915/// ```
916///
917/// __Constraints__:
918/// 0 < P ≤ 1, R1 and R2 are positive integers
919///
920/// __Semantics__:
921/// LEGACY.FINV returns the unique non-negative number x such that 
922/// LEGACY.FDIST(x;R1;R2) = P.
923///
924/// __See also__: [crate::of::fdist()], [crate::of::legacy_fdist()], [crate::of::finv()], 
925#[inline]
926pub fn legacy_finv<A: Number, B: Number, C: Number>(p: A, r1: B, r2: C) -> FnNumber3<A, B, C> {
927    FnNumber3("LEGACY.FINV", p, r1, r2)
928}
929
930/// returns the Fisher transformation.
931///
932/// [documentfoundation->FISHER](https://wiki.documentfoundation.org/Documentation/Calc_Functions/FISHER)
933///
934/// __Syntax__: 
935/// ```ods
936///     FISHER( R: Number )
937/// ```
938///
939/// __Constraints__:
940/// -1 < R < 1
941///
942/// __Semantics__:
943/// Returns the Fisher transformation with a sample correlation R. This 
944/// function computes
945/// 
946/// where ln is the natural logarithm function.
947/// 
948/// FISHER is a synonym for ATANH.
949///
950/// __See also__: [crate::of::atanh()], 
951#[inline]
952pub fn fisher<A: Number>(r: A) -> FnNumber1<A> {
953    FnNumber1("FISHER", r)
954}
955
956/// returns the inverse Fisher transformation.
957///
958/// [documentfoundation->FISHERINV](https://wiki.documentfoundation.org/Documentation/Calc_Functions/FISHERINV)
959///
960/// __Syntax__: 
961/// ```ods
962///     FISHERINV( R: Number )
963/// ```
964///
965/// __Constraints__:
966/// none
967///
968/// __Semantics__:
969/// Returns the inverse Fisher transformation. This function computes
970/// 
971/// FISHERINV is a synonym for TANH.
972///
973/// __See also__: [crate::of::tanh()], 
974#[inline]
975pub fn fisherinv<A: Number>(r: A) -> FnNumber1<A> {
976    FnNumber1("FISHERINV", r)
977}
978
979/// Extrapolates future values based on existing x and y values.
980///
981/// [documentfoundation->FORECAST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/FORECAST)
982///
983/// __Syntax__: 
984/// ```ods
985///     FORECAST( Value: Number; Data_Y: Array; Data_X: Array )
986/// ```
987///
988/// __Constraints__:
989/// COLUMNS(Data_Y) = COLUMNS(Data_X), ROWS(Data_Y) = ROWS(Data_X)
990///
991/// __Semantics__:
992/// 
993/// •Value: the x-value, for which the y-value on the linear regression is to 
994/// be returned.
995/// 
996/// •Data_Y: the array or range of known y-values.
997/// 
998/// •Data_X: the array or range of known x-values.
999/// 
1000/// For an empty element or an element of type Text or Boolean in Data_Y the 
1001/// element at the corresponding position of Data_X is ignored, and vice versa.
1002///
1003/// __See also__: [crate::of::columns()], [crate::of::rows()], 
1004#[inline]
1005pub fn forecast<A: Number, B: Array, C: Array>(value: A, data_y: B, data_x: C) -> FnNumber3<A, B, C> {
1006    FnNumber3("FORECAST", value, data_y, data_x)
1007}
1008
1009/// Categorizes values into intervals and counts the number of values in each 
1010/// interval.
1011///
1012/// [documentfoundation->FREQUENCY](https://wiki.documentfoundation.org/Documentation/Calc_Functions/FREQUENCY)
1013///
1014/// __Syntax__: 
1015/// ```ods
1016///     FREQUENCY( Data: NumberSequenceList; Bins: NumberSequenceList )
1017/// ```
1018///
1019/// __Constraints__:
1020/// Values in Bins shall be sorted in ascending order and Bins shall be a 
1021/// column vector. Evaluators may accept unsorted values in bins.
1022///
1023/// __Semantics__:
1024/// Counts the number of values for each interval given by the border values in 
1025/// Bins .
1026/// The values in Bins determine the upper boundaries of the intervals. The 
1027/// intervals include the upper boundarie. The returned array is a column 
1028/// vector and has one more element than Bins ; the last element represents the 
1029/// number of all elements greater than the last value in Bins . If Bins is 
1030/// empty, all values in Data are counted. The values in the result array are 
1031/// ordered matching the original order of Bins . If the values in Bins are not 
1032/// sorted in ascending order, they are sorted internally to form category 
1033/// intervals and the counts of Data values are "unsorted" to the original 
1034/// order of Bins. If Data is empty, the value of all elements in the returned 
1035/// array is 0.
1036/// 
1037/// Data: The data, that should be categorized and counted according to the 
1038/// given intervals.
1039/// Bins: The upper boundaries determining the intervals the values in data 
1040/// should be grouped by.
1041///
1042/// __See also__: 
1043#[inline]
1044pub fn frequency<A: Sequence, B: Sequence>(data: A, bins: B) -> FnArray2<A, B> {
1045    FnArray2("FREQUENCY", data, bins)
1046}
1047
1048/// Calculates the probability of an F-test.
1049///
1050/// [documentfoundation->FTEST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/FTEST)
1051///
1052/// __Syntax__: 
1053/// ```ods
1054///     FTEST( Data_1: NumberSequence; Data_2: NumberSequence )
1055/// ```
1056///
1057/// __Constraints__:
1058/// Data_1 and Data_2 shall both contain at least 2 numbers and shall both have 
1059/// nonzero variances
1060///
1061/// __Semantics__:
1062/// 
1063/// Calculates a two-sided P-value to decide, whether the difference in the 
1064/// variances of the two data sets are significant enough to reject the 
1065/// hypothesise, that both sets come from normally distributed populations with 
1066/// the same variances.
1067/// Suppose the data set Data_1 is a sample of size
1068/// from a normal distribution and has the sample variance
1069/// , and the data set Data_2 is a sample of size
1070/// from a normal distribution and has the sample variance
1071/// .
1072/// 
1073/// Get the value
1074/// as the area of the right tail beyond
1075/// of the F‑distribution with numerator degrees of freedom
1076/// and denominator degrees of freedom
1077/// .
1078/// 
1079/// FTEST returns twice the minimum of the values
1080/// and
1081/// .See also TTEST 6.18.81
1082///
1083/// __See also__: 
1084#[inline]
1085pub fn ftest<A: Sequence, B: Sequence>(data_1: A, data_2: B) -> FnNumber2<A, B> {
1086    FnNumber2("FTEST", data_1, data_2)
1087}
1088
1089/// returns the value of the probability density function or the cumulative 
1090/// distribution function for the Gamma distribution.
1091///
1092/// [documentfoundation->GAMMADIST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/GAMMADIST)
1093///
1094/// __Syntax__: 
1095/// ```ods
1096///     GAMMADIST( X: Number; α: Number; β: Number )
1097/// ```
1098///
1099/// __Constraints__:
1100/// α > 0, β > 0
1101///
1102/// __Semantics__:
1103/// If Cumulative is FALSE, GAMMADIST returns 0 if X < 0 and the value
1104/// 
1105/// otherwise.
1106/// 
1107/// If Cumulative is TRUE(), GAMMADIST returns 0 if X < 0 and the value
1108/// 
1109/// otherwise.
1110///
1111/// __See also__: [crate::of::gamma()], [crate::of::gammainv()], [crate::of::gammadist_()], 
1112#[inline]
1113pub fn gammadist<A: Number, B: Number, C: Number>(x: A, alpha: B, beta: C) -> FnNumber3<A, B, C> {
1114    FnNumber3("GAMMADIST", x, alpha, beta)
1115}
1116
1117/// returns the value of the probability density function or the cumulative 
1118/// distribution function for the Gamma distribution.
1119///
1120/// [documentfoundation->GAMMADIST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/GAMMADIST)
1121///
1122/// __Syntax__: 
1123/// ```ods
1124///     GAMMADIST( X: Number; α: Number; β: Number; Cumulative: Logical )
1125/// ```
1126///
1127/// __Constraints__:
1128/// α > 0, β > 0
1129///
1130/// __Semantics__:
1131/// If Cumulative is FALSE, GAMMADIST returns 0 if X < 0 and the value
1132/// 
1133/// otherwise.
1134/// 
1135/// If Cumulative is TRUE(), GAMMADIST returns 0 if X < 0 and the value
1136/// 
1137/// otherwise.
1138///
1139/// __See also__: [crate::of::gamma()], [crate::of::gammainv()], [crate::of::gammadist()], 
1140#[inline]
1141pub fn gammadist_<A: Number, B: Number, C: Number, D: Logical>(x: A, alpha: B, beta: C, cumulative: D) -> FnNumber4<A, B, C, D> {
1142    FnNumber4("GAMMADIST", x, alpha, beta, cumulative)
1143}
1144
1145/// returns the inverse of GAMMADIST(X;α;β;TRUE).
1146///
1147/// [documentfoundation->GAMMAINV](https://wiki.documentfoundation.org/Documentation/Calc_Functions/GAMMAINV)
1148///
1149/// __Syntax__: 
1150/// ```ods
1151///     GAMMAINV( P: Number; α: Number; β: Number )
1152/// ```
1153///
1154/// __Constraints__:
1155/// 0 ≤ P < 1, α > 0, β > 0
1156///
1157/// __Semantics__:
1158/// GAMMAINV returns the unique number X ≥ 0 such that GAMMAINV(X;α;β) = P.
1159///
1160/// __See also__: [crate::of::gammadist()], 
1161#[inline]
1162pub fn gammainv<A: Number, B: Number, C: Number>(p: A, alpha: B, beta: C) -> FnNumber3<A, B, C> {
1163    FnNumber3("GAMMAINV", p, alpha, beta)
1164}
1165
1166/// Returns 0.5 less than the standard normal cumulative distribution
1167///
1168/// [documentfoundation->GAUSS](https://wiki.documentfoundation.org/Documentation/Calc_Functions/GAUSS)
1169///
1170/// __Syntax__: 
1171/// ```ods
1172///     GAUSS( X: Number )
1173/// ```
1174///
1175/// __Semantics__:
1176/// Returns NORMDIST(X;0;1;TRUE())-0.5
1177///
1178/// __See also__: [crate::of::normdist()], 
1179#[inline]
1180pub fn gauss<A: Number>(x: A) -> FnNumber1<A> {
1181    FnNumber1("GAUSS", x)
1182}
1183
1184/// returns the geometric mean of a sequence
1185///
1186/// [documentfoundation->GEOMEAN](https://wiki.documentfoundation.org/Documentation/Calc_Functions/GEOMEAN)
1187///
1188/// __Syntax__: 
1189/// ```ods
1190///     GEOMEAN({ N: NumberSequenceList}+ )
1191/// ```
1192///
1193/// __Semantics__:
1194/// Returns the geometric mean of a given sequence. That means
1195/// 
1196/// where n is a result of calling COUNT(N).
1197///
1198/// __See also__: [crate::of::count()], 
1199#[inline]
1200pub fn geomean<A: Sequence>(n: A) -> FnNumber1<A> {
1201    FnNumber1("GEOMEAN", n)
1202}
1203
1204/// Returns predicted values based on an exponential regression.
1205///
1206/// [documentfoundation->GROWTH](https://wiki.documentfoundation.org/Documentation/Calc_Functions/GROWTH)
1207///
1208/// __Syntax__: 
1209/// ```ods
1210///     GROWTH( KnownY: Array )
1211/// ```
1212///
1213/// __Constraints__:
1214/// (COLUMNS(KnownY) = COLUMNS(KnownX) and ROWS(KnownY) = ROWS(KnownX)) or 
1215/// (COLUMNS(KnownY) = 1 and ROWS(KnownY) = ROWS(KnownX) and COLUMNS(KnownX) = 
1216/// COLUMNS(NewX)) or (COLUMNS(KnownY) = COLUMNS(KnownX) and ROWS(KnownY) = 1 
1217/// and ROWS(KnownX) = ROWS(NewX))
1218///
1219/// __Semantics__:
1220/// 
1221/// •KnownY: The set of known y-values to be used to determine the regression 
1222/// equation
1223/// 
1224/// •KnownX: The set of known x-values to be used to determine the regression 
1225/// equation. If omitted or an empty parameter, it is set to the sequence 
1226/// 1,2,3,…,k , where
1227/// 
1228/// k = ROWS(KnownY) ∙ COLUMNS(KnownY)
1229/// 
1230/// •NewX: The set of x-values for which predicted y-values are to be 
1231/// calculated. If omitted or an empty parameter, it is set to KnownX.
1232/// 
1233/// Const: If set to FALSE, the model constant a is equal to 0.
1234/// LOGEST(KnownY ; KnownX; Const; FALSE) either returns an error or an array 
1235/// with 1 row and n+1 columns. If it returns an error then so does GROWTH. If 
1236/// it returns an array, we call the entries in that array
1237/// .
1238/// Let
1239/// denote the entry in the ith row and jth column of NewX.
1240/// If COLUMNS(KnownY ) = COLUMNS(KnownX) and ROWS(KnownY ) = ROWS(KnownX), 
1241/// then GROWTH returns an array with ROWS(NewX) rows and COLUMNS(NewX) column, 
1242/// such that the entry in its ith row and jth column is
1243/// .
1244/// Otherwise, if COLUMNS(KnownY ) = 1 and ROWS(KnownY ) = ROWS(KnownX) and 
1245/// COLUMNS(KnownX) = COLUMNS(NewX), then GROWTH returns an array with 
1246/// ROWS(NewX) rows and 1 column, such that the entry in the ith row is
1247/// .
1248/// Otherwise, if COLUMNS(KnownY ) = COLUMNS(KnownX) and ROWS(KnownY ) = 1 and 
1249/// ROWS(KnownX) = ROWS(NewX), then GROWTH returns an array with 1 row and 
1250/// COLUMNS(NewX) columns, such that the entry in the jth column is
1251/// .
1252///
1253/// __See also__: [crate::of::columns()], [crate::of::rows()], [crate::of::logest()], [crate::of::trend()], [crate::of::growth_()], [crate::of::growth__()], [crate::of::growth___()], 
1254#[inline]
1255pub fn growth<A: Array>(known_y: A) -> FnArray1<A> {
1256    FnArray1("GROWTH", known_y)
1257}
1258
1259/// Returns predicted values based on an exponential regression.
1260///
1261/// [documentfoundation->GROWTH](https://wiki.documentfoundation.org/Documentation/Calc_Functions/GROWTH)
1262///
1263/// __Syntax__: 
1264/// ```ods
1265///     GROWTH( KnownY: Array; KnownX: Array )
1266/// ```
1267///
1268/// __Constraints__:
1269/// (COLUMNS(KnownY) = COLUMNS(KnownX) and ROWS(KnownY) = ROWS(KnownX)) or 
1270/// (COLUMNS(KnownY) = 1 and ROWS(KnownY) = ROWS(KnownX) and COLUMNS(KnownX) = 
1271/// COLUMNS(NewX)) or (COLUMNS(KnownY) = COLUMNS(KnownX) and ROWS(KnownY) = 1 
1272/// and ROWS(KnownX) = ROWS(NewX))
1273///
1274/// __Semantics__:
1275/// 
1276/// •KnownY: The set of known y-values to be used to determine the regression 
1277/// equation
1278/// 
1279/// •KnownX: The set of known x-values to be used to determine the regression 
1280/// equation. If omitted or an empty parameter, it is set to the sequence 
1281/// 1,2,3,…,k , where
1282/// 
1283/// k = ROWS(KnownY) ∙ COLUMNS(KnownY)
1284/// 
1285/// •NewX: The set of x-values for which predicted y-values are to be 
1286/// calculated. If omitted or an empty parameter, it is set to KnownX.
1287/// 
1288/// Const: If set to FALSE, the model constant a is equal to 0.
1289/// LOGEST(KnownY ; KnownX; Const; FALSE) either returns an error or an array 
1290/// with 1 row and n+1 columns. If it returns an error then so does GROWTH. If 
1291/// it returns an array, we call the entries in that array
1292/// .
1293/// Let
1294/// denote the entry in the ith row and jth column of NewX.
1295/// If COLUMNS(KnownY ) = COLUMNS(KnownX) and ROWS(KnownY ) = ROWS(KnownX), 
1296/// then GROWTH returns an array with ROWS(NewX) rows and COLUMNS(NewX) column, 
1297/// such that the entry in its ith row and jth column is
1298/// .
1299/// Otherwise, if COLUMNS(KnownY ) = 1 and ROWS(KnownY ) = ROWS(KnownX) and 
1300/// COLUMNS(KnownX) = COLUMNS(NewX), then GROWTH returns an array with 
1301/// ROWS(NewX) rows and 1 column, such that the entry in the ith row is
1302/// .
1303/// Otherwise, if COLUMNS(KnownY ) = COLUMNS(KnownX) and ROWS(KnownY ) = 1 and 
1304/// ROWS(KnownX) = ROWS(NewX), then GROWTH returns an array with 1 row and 
1305/// COLUMNS(NewX) columns, such that the entry in the jth column is
1306/// .
1307///
1308/// __See also__: [crate::of::columns()], [crate::of::rows()], [crate::of::logest()], [crate::of::trend()], [crate::of::growth()], [crate::of::growth__()], [crate::of::growth___()], 
1309#[inline]
1310pub fn growth_<A: Array, B: Array>(known_y: A, known_x: B) -> FnArray2<A, B> {
1311    FnArray2("GROWTH", known_y, known_x)
1312}
1313
1314/// Returns predicted values based on an exponential regression.
1315///
1316/// [documentfoundation->GROWTH](https://wiki.documentfoundation.org/Documentation/Calc_Functions/GROWTH)
1317///
1318/// __Syntax__: 
1319/// ```ods
1320///     GROWTH( KnownY: Array; KnownX: Array; NewX: Array )
1321/// ```
1322///
1323/// __Constraints__:
1324/// (COLUMNS(KnownY) = COLUMNS(KnownX) and ROWS(KnownY) = ROWS(KnownX)) or 
1325/// (COLUMNS(KnownY) = 1 and ROWS(KnownY) = ROWS(KnownX) and COLUMNS(KnownX) = 
1326/// COLUMNS(NewX)) or (COLUMNS(KnownY) = COLUMNS(KnownX) and ROWS(KnownY) = 1 
1327/// and ROWS(KnownX) = ROWS(NewX))
1328///
1329/// __Semantics__:
1330/// 
1331/// •KnownY: The set of known y-values to be used to determine the regression 
1332/// equation
1333/// 
1334/// •KnownX: The set of known x-values to be used to determine the regression 
1335/// equation. If omitted or an empty parameter, it is set to the sequence 
1336/// 1,2,3,…,k , where
1337/// 
1338/// k = ROWS(KnownY) ∙ COLUMNS(KnownY)
1339/// 
1340/// •NewX: The set of x-values for which predicted y-values are to be 
1341/// calculated. If omitted or an empty parameter, it is set to KnownX.
1342/// 
1343/// Const: If set to FALSE, the model constant a is equal to 0.
1344/// LOGEST(KnownY ; KnownX; Const; FALSE) either returns an error or an array 
1345/// with 1 row and n+1 columns. If it returns an error then so does GROWTH. If 
1346/// it returns an array, we call the entries in that array
1347/// .
1348/// Let
1349/// denote the entry in the ith row and jth column of NewX.
1350/// If COLUMNS(KnownY ) = COLUMNS(KnownX) and ROWS(KnownY ) = ROWS(KnownX), 
1351/// then GROWTH returns an array with ROWS(NewX) rows and COLUMNS(NewX) column, 
1352/// such that the entry in its ith row and jth column is
1353/// .
1354/// Otherwise, if COLUMNS(KnownY ) = 1 and ROWS(KnownY ) = ROWS(KnownX) and 
1355/// COLUMNS(KnownX) = COLUMNS(NewX), then GROWTH returns an array with 
1356/// ROWS(NewX) rows and 1 column, such that the entry in the ith row is
1357/// .
1358/// Otherwise, if COLUMNS(KnownY ) = COLUMNS(KnownX) and ROWS(KnownY ) = 1 and 
1359/// ROWS(KnownX) = ROWS(NewX), then GROWTH returns an array with 1 row and 
1360/// COLUMNS(NewX) columns, such that the entry in the jth column is
1361/// .
1362///
1363/// __See also__: [crate::of::columns()], [crate::of::rows()], [crate::of::logest()], [crate::of::trend()], [crate::of::growth()], [crate::of::growth_()], [crate::of::growth___()], 
1364#[inline]
1365pub fn growth__<A: Array, B: Array, C: Array>(known_y: A, known_x: B, new_x: C) -> FnArray3<A, B, C> {
1366    FnArray3("GROWTH", known_y, known_x, new_x)
1367}
1368
1369/// Returns predicted values based on an exponential regression.
1370///
1371/// [documentfoundation->GROWTH](https://wiki.documentfoundation.org/Documentation/Calc_Functions/GROWTH)
1372///
1373/// __Syntax__: 
1374/// ```ods
1375///     GROWTH( KnownY: Array; KnownX: Array; NewX: Array; Const: Logical )
1376/// ```
1377///
1378/// __Constraints__:
1379/// (COLUMNS(KnownY) = COLUMNS(KnownX) and ROWS(KnownY) = ROWS(KnownX)) or 
1380/// (COLUMNS(KnownY) = 1 and ROWS(KnownY) = ROWS(KnownX) and COLUMNS(KnownX) = 
1381/// COLUMNS(NewX)) or (COLUMNS(KnownY) = COLUMNS(KnownX) and ROWS(KnownY) = 1 
1382/// and ROWS(KnownX) = ROWS(NewX))
1383///
1384/// __Semantics__:
1385/// 
1386/// •KnownY: The set of known y-values to be used to determine the regression 
1387/// equation
1388/// 
1389/// •KnownX: The set of known x-values to be used to determine the regression 
1390/// equation. If omitted or an empty parameter, it is set to the sequence 
1391/// 1,2,3,…,k , where
1392/// 
1393/// k = ROWS(KnownY) ∙ COLUMNS(KnownY)
1394/// 
1395/// •NewX: The set of x-values for which predicted y-values are to be 
1396/// calculated. If omitted or an empty parameter, it is set to KnownX.
1397/// 
1398/// Const: If set to FALSE, the model constant a is equal to 0.
1399/// LOGEST(KnownY ; KnownX; Const; FALSE) either returns an error or an array 
1400/// with 1 row and n+1 columns. If it returns an error then so does GROWTH. If 
1401/// it returns an array, we call the entries in that array
1402/// .
1403/// Let
1404/// denote the entry in the ith row and jth column of NewX.
1405/// If COLUMNS(KnownY ) = COLUMNS(KnownX) and ROWS(KnownY ) = ROWS(KnownX), 
1406/// then GROWTH returns an array with ROWS(NewX) rows and COLUMNS(NewX) column, 
1407/// such that the entry in its ith row and jth column is
1408/// .
1409/// Otherwise, if COLUMNS(KnownY ) = 1 and ROWS(KnownY ) = ROWS(KnownX) and 
1410/// COLUMNS(KnownX) = COLUMNS(NewX), then GROWTH returns an array with 
1411/// ROWS(NewX) rows and 1 column, such that the entry in the ith row is
1412/// .
1413/// Otherwise, if COLUMNS(KnownY ) = COLUMNS(KnownX) and ROWS(KnownY ) = 1 and 
1414/// ROWS(KnownX) = ROWS(NewX), then GROWTH returns an array with 1 row and 
1415/// COLUMNS(NewX) columns, such that the entry in the jth column is
1416/// .
1417///
1418/// __See also__: [crate::of::columns()], [crate::of::rows()], [crate::of::logest()], [crate::of::trend()], [crate::of::growth()], [crate::of::growth_()], [crate::of::growth__()], 
1419#[inline]
1420pub fn growth___<A: Array, B: Array, C: Array, D: Logical>(known_y: A, known_x: B, new_x: C, const_: D) -> FnArray4<A, B, C, D> {
1421    FnArray4("GROWTH", known_y, known_x, new_x, const_)
1422}
1423
1424/// returns the harmonic mean of a sequence
1425///
1426/// [documentfoundation->HARMEAN](https://wiki.documentfoundation.org/Documentation/Calc_Functions/HARMEAN)
1427///
1428/// __Syntax__: 
1429/// ```ods
1430///     HARMEAN({ N: NumberSequenceList}+ )
1431/// ```
1432///
1433/// __Semantics__:
1434/// Returns the harmonic mean of a given sequence. That means
1435/// 
1436/// where a1,a2,...,an are the numbers of the sequence N and n is a result of 
1437/// calling COUNT(N).
1438///
1439/// __See also__: [crate::of::count()], 
1440#[inline]
1441pub fn harmean<A: Sequence>(n: A) -> FnNumber1<A> {
1442    FnNumber1("HARMEAN", n)
1443}
1444
1445/// The hypergeometric distribution returns the number of successes in a 
1446/// sequence of n draws from a finite population without replacement.
1447///
1448/// [documentfoundation->HYPGEOMDIST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/HYPGEOMDIST)
1449///
1450/// __Syntax__: 
1451/// ```ods
1452///     HYPGEOMDIST( X: Integer; T: Integer; M: Integer; N: Integer )
1453/// ```
1454///
1455/// __Constraints__:
1456/// 0 ≤ X ≤ T ≤ N, 0 ≤ M ≤ N
1457///
1458/// __Semantics__:
1459/// 
1460/// •X: the number of successes in T trials
1461/// 
1462/// •T: the number of trials
1463/// 
1464/// •M: the number of successes in the population
1465/// 
1466/// •N: the total population
1467/// 
1468/// •Cumulative : a Logical parameter.
1469/// 
1470/// If Cumulative is FALSE, return the probability of exactly X successes. If 
1471/// Cumulative is TRUE, return the probability of at most X successes. If 
1472/// omitted, FALSE is assumed.
1473/// 
1474/// If Cumulative is FALSE, HYPGEOMDIST returns
1475/// 
1476/// If Cumulative is TRUE, HYPGEOMDIST returns
1477///
1478/// __See also__: [crate::of::hypgeomdist_()], 
1479#[inline]
1480pub fn hypgeomdist<A: Number, B: Number, C: Number, D: Number>(x: A, t: B, m: C, n: D) -> FnNumber4<A, B, C, D> {
1481    FnNumber4("HYPGEOMDIST", x, t, m, n)
1482}
1483
1484/// The hypergeometric distribution returns the number of successes in a 
1485/// sequence of n draws from a finite population without replacement.
1486///
1487/// [documentfoundation->HYPGEOMDIST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/HYPGEOMDIST)
1488///
1489/// __Syntax__: 
1490/// ```ods
1491///     HYPGEOMDIST( X: Integer; T: Integer; M: Integer; N: Integer; Cumulative: Logical )
1492/// ```
1493///
1494/// __Constraints__:
1495/// 0 ≤ X ≤ T ≤ N, 0 ≤ M ≤ N
1496///
1497/// __Semantics__:
1498/// 
1499/// •X: the number of successes in T trials
1500/// 
1501/// •T: the number of trials
1502/// 
1503/// •M: the number of successes in the population
1504/// 
1505/// •N: the total population
1506/// 
1507/// •Cumulative : a Logical parameter.
1508/// 
1509/// If Cumulative is FALSE, return the probability of exactly X successes. If 
1510/// Cumulative is TRUE, return the probability of at most X successes. If 
1511/// omitted, FALSE is assumed.
1512/// 
1513/// If Cumulative is FALSE, HYPGEOMDIST returns
1514/// 
1515/// If Cumulative is TRUE, HYPGEOMDIST returns
1516///
1517/// __See also__: [crate::of::hypgeomdist()], 
1518#[inline]
1519pub fn hypgeomdist_<A: Number, B: Number, C: Number, D: Number, E: Logical>(x: A, t: B, m: C, n: D, cumulative: E) -> FnNumber5<A, B, C, D, E> {
1520    FnNumber5("HYPGEOMDIST", x, t, m, n, cumulative)
1521}
1522
1523/// Returns the y-intercept of the linear regression line for the given data.
1524///
1525/// [documentfoundation->INTERCEPT](https://wiki.documentfoundation.org/Documentation/Calc_Functions/INTERCEPT)
1526///
1527/// __Syntax__: 
1528/// ```ods
1529///     INTERCEPT( Data_Y: Array; Data_X: Array )
1530/// ```
1531///
1532/// __Constraints__:
1533/// COLUMNS(Data_X) = COLUMNS(Data_Y), ROWS(Data_X) = ROWS(Data_Y)
1534///
1535/// __Semantics__:
1536/// 
1537/// INTERCEPT returns the intercept (a) calculated as described in 6.18.41 for 
1538/// the function call LINEST(Data_Y,Data_X,FALSE()).
1539/// 
1540/// For an empty element or an element of type Text or Boolean in Data_Y the 
1541/// element at the corresponding position of Data_X is ignored, and vice versa.
1542///
1543/// __See also__: [crate::of::columns()], [crate::of::rows()], 
1544#[inline]
1545pub fn intercept<A: Array, B: Array>(data_y: A, data_x: B) -> FnNumber2<A, B> {
1546    FnNumber2("INTERCEPT", data_y, data_x)
1547}
1548
1549/// Return the kurtosis (“peakedness”) of a data set.
1550///
1551/// [documentfoundation->KURT](https://wiki.documentfoundation.org/Documentation/Calc_Functions/KURT)
1552///
1553/// __Syntax__: 
1554/// ```ods
1555///     KURT({ X: NumberSequenceList}+ )
1556/// ```
1557///
1558/// __Constraints__:
1559/// COUNT(X) ≥ 4, STDEV(X) ≠ 0
1560///
1561/// __Semantics__:
1562/// 
1563/// Kurtosis characterizes the relative peakedness or flatness of a 
1564/// distribution compared with the normal distribution. Positive kurtosis 
1565/// indicates a relatively peaked distribution (compared to the normal 
1566/// distribution), while negative kurtosis indicates a relatively flat 
1567/// distribution.
1568/// 
1569/// where s is the sample standard deviation, and n is the number of numbers.
1570///
1571/// __See also__: [crate::of::stdev()], 
1572#[inline]
1573pub fn kurt<A: Sequence>(x: A) -> FnNumber1<A> {
1574    FnNumber1("KURT", x)
1575}
1576
1577/// Finds the nth largest value in a list.
1578///
1579/// [documentfoundation->LARGE](https://wiki.documentfoundation.org/Documentation/Calc_Functions/LARGE)
1580///
1581/// __Syntax__: 
1582/// ```ods
1583///     LARGE( List: NumberSequenceList; N: Number|Array )
1584/// ```
1585///
1586/// __Constraints__:
1587/// ROUNDUP(N;0) = N. If the resulting N is <1 or larger than the size of List, 
1588/// Error is returned
1589///
1590/// __Semantics__:
1591/// If N is an array of numbers, an array of largest values is returned.
1592///
1593/// __See also__: [crate::of::small()], [crate::of::roundup()], 
1594#[inline]
1595pub fn large<A: Sequence, B: NumberOrArray>(list: A, n: B) -> FnArray2<A, B> {
1596    FnArray2("LARGE", list, n)
1597}
1598
1599/// Returns the parameters of the (simple or multiple) linear regression 
1600/// equation for the given data and, optionally, statistics on this regression.
1601///
1602/// [documentfoundation->LINEST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/LINEST)
1603///
1604/// __Syntax__: 
1605/// ```ods
1606///     LINEST( KnownY: Array )
1607/// ```
1608///
1609/// __Constraints__:
1610/// (COLUMNS(KnownY) = COLUMNS(KnownX) and ROWS(KnownY) = ROWS(KnownX)) or 
1611/// (COLUMNS(KnownY) = 1 and ROWS(KnownY) = ROWS(KnownX)) or (COLUMNS(KnownY) = 
1612/// COLUMNS(KnownX) and ROWS(KnownY) = 1)
1613///
1614/// __Semantics__:
1615/// 
1616/// •KnownY: The set of y-values for the equation
1617/// 
1618/// •KnownX: The set of x-values for the equation. If omitted or an empty 
1619/// parameter, it is set to the sequence 1,2,3,…,k , where k = ROWS(KnownY) 
1620/// ∙ COLUMNS(KnownY).
1621/// 
1622/// •Const: If set to FALSE, the model constant a is equal to 0.
1623/// 
1624/// •Stats: If FALSE, only the regression coefficient is to be calculated. If 
1625/// set to TRUE, the result will include other statistical data.
1626/// 
1627/// If any of the entries in KnownY and KnownX do not convert to Number, LINEST 
1628/// returns an error.
1629/// 
1630/// ** Some formulas **
1631///
1632/// __See also__: [crate::of::columns()], [crate::of::rows()], [crate::of::linest_()], [crate::of::linest__()], [crate::of::linest___()], 
1633#[inline]
1634pub fn linest<A: Array>(known_y: A) -> FnArray1<A> {
1635    FnArray1("LINEST", known_y)
1636}
1637
1638/// Returns the parameters of the (simple or multiple) linear regression 
1639/// equation for the given data and, optionally, statistics on this regression.
1640///
1641/// [documentfoundation->LINEST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/LINEST)
1642///
1643/// __Syntax__: 
1644/// ```ods
1645///     LINEST( KnownY: Array; KnownX: Array )
1646/// ```
1647///
1648/// __Constraints__:
1649/// (COLUMNS(KnownY) = COLUMNS(KnownX) and ROWS(KnownY) = ROWS(KnownX)) or 
1650/// (COLUMNS(KnownY) = 1 and ROWS(KnownY) = ROWS(KnownX)) or (COLUMNS(KnownY) = 
1651/// COLUMNS(KnownX) and ROWS(KnownY) = 1)
1652///
1653/// __Semantics__:
1654/// 
1655/// •KnownY: The set of y-values for the equation
1656/// 
1657/// •KnownX: The set of x-values for the equation. If omitted or an empty 
1658/// parameter, it is set to the sequence 1,2,3,…,k , where k = ROWS(KnownY) 
1659/// ∙ COLUMNS(KnownY).
1660/// 
1661/// •Const: If set to FALSE, the model constant a is equal to 0.
1662/// 
1663/// •Stats: If FALSE, only the regression coefficient is to be calculated. If 
1664/// set to TRUE, the result will include other statistical data.
1665/// 
1666/// If any of the entries in KnownY and KnownX do not convert to Number, LINEST 
1667/// returns an error.
1668/// 
1669/// ** Some formulas **
1670///
1671/// __See also__: [crate::of::columns()], [crate::of::rows()], [crate::of::linest()], [crate::of::linest__()], [crate::of::linest___()], 
1672#[inline]
1673pub fn linest_<A: Array, B: Array>(known_y: A, known_x: B) -> FnArray2<A, B> {
1674    FnArray2("LINEST", known_y, known_x)
1675}
1676
1677/// Returns the parameters of the (simple or multiple) linear regression 
1678/// equation for the given data and, optionally, statistics on this regression.
1679///
1680/// [documentfoundation->LINEST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/LINEST)
1681///
1682/// __Syntax__: 
1683/// ```ods
1684///     LINEST( KnownY: Array; KnownX: Array; Const: Logical )
1685/// ```
1686///
1687/// __Constraints__:
1688/// (COLUMNS(KnownY) = COLUMNS(KnownX) and ROWS(KnownY) = ROWS(KnownX)) or 
1689/// (COLUMNS(KnownY) = 1 and ROWS(KnownY) = ROWS(KnownX)) or (COLUMNS(KnownY) = 
1690/// COLUMNS(KnownX) and ROWS(KnownY) = 1)
1691///
1692/// __Semantics__:
1693/// 
1694/// •KnownY: The set of y-values for the equation
1695/// 
1696/// •KnownX: The set of x-values for the equation. If omitted or an empty 
1697/// parameter, it is set to the sequence 1,2,3,…,k , where k = ROWS(KnownY) 
1698/// ∙ COLUMNS(KnownY).
1699/// 
1700/// •Const: If set to FALSE, the model constant a is equal to 0.
1701/// 
1702/// •Stats: If FALSE, only the regression coefficient is to be calculated. If 
1703/// set to TRUE, the result will include other statistical data.
1704/// 
1705/// If any of the entries in KnownY and KnownX do not convert to Number, LINEST 
1706/// returns an error.
1707/// 
1708/// ** Some formulas **
1709///
1710/// __See also__: [crate::of::columns()], [crate::of::rows()], [crate::of::linest()], [crate::of::linest_()], [crate::of::linest___()], 
1711#[inline]
1712pub fn linest__<A: Array, B: Array, C: Logical>(known_y: A, known_x: B, const_: C) -> FnArray3<A, B, C> {
1713    FnArray3("LINEST", known_y, known_x, const_)
1714}
1715
1716/// Returns the parameters of the (simple or multiple) linear regression 
1717/// equation for the given data and, optionally, statistics on this regression.
1718///
1719/// [documentfoundation->LINEST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/LINEST)
1720///
1721/// __Syntax__: 
1722/// ```ods
1723///     LINEST( KnownY: Array; KnownX: Array; Const: Logical; Stats: Logical )
1724/// ```
1725///
1726/// __Constraints__:
1727/// (COLUMNS(KnownY) = COLUMNS(KnownX) and ROWS(KnownY) = ROWS(KnownX)) or 
1728/// (COLUMNS(KnownY) = 1 and ROWS(KnownY) = ROWS(KnownX)) or (COLUMNS(KnownY) = 
1729/// COLUMNS(KnownX) and ROWS(KnownY) = 1)
1730///
1731/// __Semantics__:
1732/// 
1733/// •KnownY: The set of y-values for the equation
1734/// 
1735/// •KnownX: The set of x-values for the equation. If omitted or an empty 
1736/// parameter, it is set to the sequence 1,2,3,…,k , where k = ROWS(KnownY) 
1737/// ∙ COLUMNS(KnownY).
1738/// 
1739/// •Const: If set to FALSE, the model constant a is equal to 0.
1740/// 
1741/// •Stats: If FALSE, only the regression coefficient is to be calculated. If 
1742/// set to TRUE, the result will include other statistical data.
1743/// 
1744/// If any of the entries in KnownY and KnownX do not convert to Number, LINEST 
1745/// returns an error.
1746/// 
1747/// ** Some formulas **
1748///
1749/// __See also__: [crate::of::columns()], [crate::of::rows()], [crate::of::linest()], [crate::of::linest_()], [crate::of::linest__()], 
1750#[inline]
1751pub fn linest___<A: Array, B: Array, C: Logical, D: Logical>(known_y: A, known_x: B, const_: C, stats: D) -> FnArray4<A, B, C, D> {
1752    FnArray4("LINEST", known_y, known_x, const_, stats)
1753}
1754
1755/// Returns the parameters of an exponential regression equation for the given 
1756/// data obtained by linearizing this intrinsically linear response function 
1757/// and returns, optionally, statistics on this regression.
1758///
1759/// [documentfoundation->LOGEST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/LOGEST)
1760///
1761/// __Syntax__: 
1762/// ```ods
1763///     LOGEST( KnownY: Array )
1764/// ```
1765///
1766/// __Constraints__:
1767/// (COLUMNS(KnownY) = COLUMNS(KnownX) and ROWS(KnownY) = ROWS(KnownX)) or 
1768/// (COLUMNS(KnownY) = 1 and ROWS(KnownY) = ROWS(KnownX)) or (COLUMNS(KnownY) = 
1769/// COLUMNS(KnownX) and ROWS(KnownY) = 1)
1770///
1771/// __Semantics__:
1772/// 
1773/// •KnownY: The set of y-values for the equation
1774/// 
1775/// •KnownX: The set of x-values for the equation. If omitted or an empty 
1776/// parameter, it is set to the sequence 1,2,3,…,k, where k = ROWS(KnownY) 
1777/// ∙ COLUMNS(KnownY).
1778/// 
1779/// •Const: If set to FALSE, the model constant a is equal to 0.
1780/// 
1781/// •Stats: If FALSE, only the regression coefficient is to be calculated. If 
1782/// set to TRUE, the result will include other statistical data.
1783/// 
1784/// If any of the entries in KnownY and KnownX do not convert to Number or if 
1785/// any of the entries in KnownY is negative, LOGEST returns an error.
1786/// 
1787/// ** Some formulas **
1788///
1789/// __See also__: [crate::of::columns()], [crate::of::rows()], [crate::of::logest_()], [crate::of::logest__()], [crate::of::logest___()], 
1790#[inline]
1791pub fn logest<A: Array>(known_y: A) -> FnArray1<A> {
1792    FnArray1("LOGEST", known_y)
1793}
1794
1795/// Returns the parameters of an exponential regression equation for the given 
1796/// data obtained by linearizing this intrinsically linear response function 
1797/// and returns, optionally, statistics on this regression.
1798///
1799/// [documentfoundation->LOGEST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/LOGEST)
1800///
1801/// __Syntax__: 
1802/// ```ods
1803///     LOGEST( KnownY: Array; KnownX: Array )
1804/// ```
1805///
1806/// __Constraints__:
1807/// (COLUMNS(KnownY) = COLUMNS(KnownX) and ROWS(KnownY) = ROWS(KnownX)) or 
1808/// (COLUMNS(KnownY) = 1 and ROWS(KnownY) = ROWS(KnownX)) or (COLUMNS(KnownY) = 
1809/// COLUMNS(KnownX) and ROWS(KnownY) = 1)
1810///
1811/// __Semantics__:
1812/// 
1813/// •KnownY: The set of y-values for the equation
1814/// 
1815/// •KnownX: The set of x-values for the equation. If omitted or an empty 
1816/// parameter, it is set to the sequence 1,2,3,…,k, where k = ROWS(KnownY) 
1817/// ∙ COLUMNS(KnownY).
1818/// 
1819/// •Const: If set to FALSE, the model constant a is equal to 0.
1820/// 
1821/// •Stats: If FALSE, only the regression coefficient is to be calculated. If 
1822/// set to TRUE, the result will include other statistical data.
1823/// 
1824/// If any of the entries in KnownY and KnownX do not convert to Number or if 
1825/// any of the entries in KnownY is negative, LOGEST returns an error.
1826/// 
1827/// ** Some formulas **
1828///
1829/// __See also__: [crate::of::columns()], [crate::of::rows()], [crate::of::logest()], [crate::of::logest__()], [crate::of::logest___()], 
1830#[inline]
1831pub fn logest_<A: Array, B: Array>(known_y: A, known_x: B) -> FnArray2<A, B> {
1832    FnArray2("LOGEST", known_y, known_x)
1833}
1834
1835/// Returns the parameters of an exponential regression equation for the given 
1836/// data obtained by linearizing this intrinsically linear response function 
1837/// and returns, optionally, statistics on this regression.
1838///
1839/// [documentfoundation->LOGEST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/LOGEST)
1840///
1841/// __Syntax__: 
1842/// ```ods
1843///     LOGEST( KnownY: Array; KnownX: Array; Const: Logical )
1844/// ```
1845///
1846/// __Constraints__:
1847/// (COLUMNS(KnownY) = COLUMNS(KnownX) and ROWS(KnownY) = ROWS(KnownX)) or 
1848/// (COLUMNS(KnownY) = 1 and ROWS(KnownY) = ROWS(KnownX)) or (COLUMNS(KnownY) = 
1849/// COLUMNS(KnownX) and ROWS(KnownY) = 1)
1850///
1851/// __Semantics__:
1852/// 
1853/// •KnownY: The set of y-values for the equation
1854/// 
1855/// •KnownX: The set of x-values for the equation. If omitted or an empty 
1856/// parameter, it is set to the sequence 1,2,3,…,k, where k = ROWS(KnownY) 
1857/// ∙ COLUMNS(KnownY).
1858/// 
1859/// •Const: If set to FALSE, the model constant a is equal to 0.
1860/// 
1861/// •Stats: If FALSE, only the regression coefficient is to be calculated. If 
1862/// set to TRUE, the result will include other statistical data.
1863/// 
1864/// If any of the entries in KnownY and KnownX do not convert to Number or if 
1865/// any of the entries in KnownY is negative, LOGEST returns an error.
1866/// 
1867/// ** Some formulas **
1868///
1869/// __See also__: [crate::of::columns()], [crate::of::rows()], [crate::of::logest()], [crate::of::logest_()], [crate::of::logest___()], 
1870#[inline]
1871pub fn logest__<A: Array, B: Array, C: Logical>(known_y: A, known_x: B, const_: C) -> FnArray3<A, B, C> {
1872    FnArray3("LOGEST", known_y, known_x, const_)
1873}
1874
1875/// Returns the parameters of an exponential regression equation for the given 
1876/// data obtained by linearizing this intrinsically linear response function 
1877/// and returns, optionally, statistics on this regression.
1878///
1879/// [documentfoundation->LOGEST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/LOGEST)
1880///
1881/// __Syntax__: 
1882/// ```ods
1883///     LOGEST( KnownY: Array; KnownX: Array; Const: Logical; Stats: Logical )
1884/// ```
1885///
1886/// __Constraints__:
1887/// (COLUMNS(KnownY) = COLUMNS(KnownX) and ROWS(KnownY) = ROWS(KnownX)) or 
1888/// (COLUMNS(KnownY) = 1 and ROWS(KnownY) = ROWS(KnownX)) or (COLUMNS(KnownY) = 
1889/// COLUMNS(KnownX) and ROWS(KnownY) = 1)
1890///
1891/// __Semantics__:
1892/// 
1893/// •KnownY: The set of y-values for the equation
1894/// 
1895/// •KnownX: The set of x-values for the equation. If omitted or an empty 
1896/// parameter, it is set to the sequence 1,2,3,…,k, where k = ROWS(KnownY) 
1897/// ∙ COLUMNS(KnownY).
1898/// 
1899/// •Const: If set to FALSE, the model constant a is equal to 0.
1900/// 
1901/// •Stats: If FALSE, only the regression coefficient is to be calculated. If 
1902/// set to TRUE, the result will include other statistical data.
1903/// 
1904/// If any of the entries in KnownY and KnownX do not convert to Number or if 
1905/// any of the entries in KnownY is negative, LOGEST returns an error.
1906/// 
1907/// ** Some formulas **
1908///
1909/// __See also__: [crate::of::columns()], [crate::of::rows()], [crate::of::logest()], [crate::of::logest_()], [crate::of::logest__()], 
1910#[inline]
1911pub fn logest___<A: Array, B: Array, C: Logical, D: Logical>(known_y: A, known_x: B, const_: C, stats: D) -> FnArray4<A, B, C, D> {
1912    FnArray4("LOGEST", known_y, known_x, const_, stats)
1913}
1914
1915/// returns the inverse of LOGNORMDIST(x;Mean;StandardDeviation,TRUE()).
1916///
1917/// [documentfoundation->LOGINV](https://wiki.documentfoundation.org/Documentation/Calc_Functions/LOGINV)
1918///
1919/// __Syntax__: 
1920/// ```ods
1921///     LOGINV( P: Number )
1922/// ```
1923///
1924/// __Constraints__:
1925/// StandardDeviation > 0 and 0 < P < 1.
1926///
1927/// __Semantics__:
1928/// LOGINV returns the unique number x such that 
1929/// LOGNORMDIST(x;Mean;StandardDeviation;TRUE()) = P.
1930///
1931/// __See also__: [crate::of::lognormdist()], [crate::of::loginv_()], [crate::of::loginv__()], 
1932#[inline]
1933pub fn loginv<A: Number>(p: A) -> FnNumber1<A> {
1934    FnNumber1("LOGINV", p)
1935}
1936
1937/// returns the inverse of LOGNORMDIST(x;Mean;StandardDeviation,TRUE()).
1938///
1939/// [documentfoundation->LOGINV](https://wiki.documentfoundation.org/Documentation/Calc_Functions/LOGINV)
1940///
1941/// __Syntax__: 
1942/// ```ods
1943///     LOGINV( P: Number; Mean: Number )
1944/// ```
1945///
1946/// __Constraints__:
1947/// StandardDeviation > 0 and 0 < P < 1.
1948///
1949/// __Semantics__:
1950/// LOGINV returns the unique number x such that 
1951/// LOGNORMDIST(x;Mean;StandardDeviation;TRUE()) = P.
1952///
1953/// __See also__: [crate::of::lognormdist()], [crate::of::loginv()], [crate::of::loginv__()], 
1954#[inline]
1955pub fn loginv_<A: Number, B: Number>(p: A, mean: B) -> FnNumber2<A, B> {
1956    FnNumber2("LOGINV", p, mean)
1957}
1958
1959/// returns the inverse of LOGNORMDIST(x;Mean;StandardDeviation,TRUE()).
1960///
1961/// [documentfoundation->LOGINV](https://wiki.documentfoundation.org/Documentation/Calc_Functions/LOGINV)
1962///
1963/// __Syntax__: 
1964/// ```ods
1965///     LOGINV( P: Number; Mean: Number; StandardDeviation: Number )
1966/// ```
1967///
1968/// __Constraints__:
1969/// StandardDeviation > 0 and 0 < P < 1.
1970///
1971/// __Semantics__:
1972/// LOGINV returns the unique number x such that 
1973/// LOGNORMDIST(x;Mean;StandardDeviation;TRUE()) = P.
1974///
1975/// __See also__: [crate::of::lognormdist()], [crate::of::loginv()], [crate::of::loginv_()], 
1976#[inline]
1977pub fn loginv__<A: Number, B: Number, C: Number>(p: A, mean: B, standard_deviation: C) -> FnNumber3<A, B, C> {
1978    FnNumber3("LOGINV", p, mean, standard_deviation)
1979}
1980
1981/// returns the value of the probability density function or the cumulative 
1982/// distribution function for the lognormal distribution with the mean and 
1983/// standard deviation given.
1984///
1985/// [documentfoundation->LOGNORMDIST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/LOGNORMDIST)
1986///
1987/// __Syntax__: 
1988/// ```ods
1989///     LOGNORMDIST( X: Number )
1990/// ```
1991///
1992/// __Constraints__:
1993/// sigma > 0; X > 0 if Cumulative is FALSE
1994///
1995/// __Semantics__:
1996/// If Cumulative is FALSE, LOGNORMDIST returns the value
1997/// 
1998/// If Cumulative is TRUE, LOGNORMDIST returns the value
1999/// 
2000/// if X > 0 and 0 otherwise.
2001///
2002/// __See also__: [crate::of::lognormdist_()], [crate::of::lognormdist__()], [crate::of::lognormdist___()], 
2003#[inline]
2004pub fn lognormdist<A: Number>(x: A) -> FnNumber1<A> {
2005    FnNumber1("LOGNORMDIST", x)
2006}
2007
2008/// returns the value of the probability density function or the cumulative 
2009/// distribution function for the lognormal distribution with the mean and 
2010/// standard deviation given.
2011///
2012/// [documentfoundation->LOGNORMDIST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/LOGNORMDIST)
2013///
2014/// __Syntax__: 
2015/// ```ods
2016///     LOGNORMDIST( X: Number; mu: Number )
2017/// ```
2018///
2019/// __Constraints__:
2020/// sigma > 0; X > 0 if Cumulative is FALSE
2021///
2022/// __Semantics__:
2023/// If Cumulative is FALSE, LOGNORMDIST returns the value
2024/// 
2025/// If Cumulative is TRUE, LOGNORMDIST returns the value
2026/// 
2027/// if X > 0 and 0 otherwise.
2028///
2029/// __See also__: [crate::of::lognormdist()], [crate::of::lognormdist__()], [crate::of::lognormdist___()], 
2030#[inline]
2031pub fn lognormdist_<A: Number, B: Number>(x: A, mu: B) -> FnNumber2<A, B> {
2032    FnNumber2("LOGNORMDIST", x, mu)
2033}
2034
2035/// returns the value of the probability density function or the cumulative 
2036/// distribution function for the lognormal distribution with the mean and 
2037/// standard deviation given.
2038///
2039/// [documentfoundation->LOGNORMDIST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/LOGNORMDIST)
2040///
2041/// __Syntax__: 
2042/// ```ods
2043///     LOGNORMDIST( X: Number; mu: Number; sigma: Number )
2044/// ```
2045///
2046/// __Constraints__:
2047/// sigma > 0; X > 0 if Cumulative is FALSE
2048///
2049/// __Semantics__:
2050/// If Cumulative is FALSE, LOGNORMDIST returns the value
2051/// 
2052/// If Cumulative is TRUE, LOGNORMDIST returns the value
2053/// 
2054/// if X > 0 and 0 otherwise.
2055///
2056/// __See also__: [crate::of::lognormdist()], [crate::of::lognormdist_()], [crate::of::lognormdist___()], 
2057#[inline]
2058pub fn lognormdist__<A: Number, B: Number, C: Number>(x: A, mu: B, sigma: C) -> FnNumber3<A, B, C> {
2059    FnNumber3("LOGNORMDIST", x, mu, sigma)
2060}
2061
2062/// returns the value of the probability density function or the cumulative 
2063/// distribution function for the lognormal distribution with the mean and 
2064/// standard deviation given.
2065///
2066/// [documentfoundation->LOGNORMDIST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/LOGNORMDIST)
2067///
2068/// __Syntax__: 
2069/// ```ods
2070///     LOGNORMDIST( X: Number; mu: Number; sigma: Number; Cumulative: Logical )
2071/// ```
2072///
2073/// __Constraints__:
2074/// sigma > 0; X > 0 if Cumulative is FALSE
2075///
2076/// __Semantics__:
2077/// If Cumulative is FALSE, LOGNORMDIST returns the value
2078/// 
2079/// If Cumulative is TRUE, LOGNORMDIST returns the value
2080/// 
2081/// if X > 0 and 0 otherwise.
2082///
2083/// __See also__: [crate::of::lognormdist()], [crate::of::lognormdist_()], [crate::of::lognormdist__()], 
2084#[inline]
2085pub fn lognormdist___<A: Number, B: Number, C: Number, D: Logical>(x: A, mu: B, sigma: C, cumulative: D) -> FnNumber4<A, B, C, D> {
2086    FnNumber4("LOGNORMDIST", x, mu, sigma, cumulative)
2087}
2088
2089/// Return the maximum from a set of numbers.
2090///
2091/// [documentfoundation->MAX](https://wiki.documentfoundation.org/Documentation/Calc_Functions/MAX)
2092///
2093/// __Syntax__: 
2094/// ```ods
2095///     MAX({ N: NumberSequenceList}+ )
2096/// ```
2097///
2098/// __Constraints__:
2099/// None.
2100///
2101/// __Semantics__:
2102/// Returns the value of the maximum number in the list passed in. Non-numbers 
2103/// are ignored. Note that if Logical types are a distinct type, they are not 
2104/// included.
2105///
2106/// __See also__: [crate::of::maxa()], [crate::of::min()], 
2107#[inline]
2108pub fn max<A: Sequence>(n: A) -> FnNumber1<A> {
2109    FnNumber1("MAX", n)
2110}
2111
2112/// Return the maximum from a set of values, including values of type Text and 
2113/// Logical.
2114///
2115/// [documentfoundation->MAXA](https://wiki.documentfoundation.org/Documentation/Calc_Functions/MAXA)
2116///
2117/// __Syntax__: 
2118/// ```ods
2119///     MAXA({ N: Any}+ )
2120/// ```
2121///
2122/// __Constraints__:
2123/// None.
2124///
2125/// __Semantics__:
2126/// A variation of the MAX function that includes values of type Text and 
2127/// Logical. Text values are treated as number 0. Logical TRUE is treated as 1, 
2128/// and FALSE is treated as 0. Empty cells are not included. Any N may be of 
2129/// type ReferenceList.
2130///
2131/// __See also__: [crate::of::max()], [crate::of::min()], [crate::of::mina()], 
2132#[inline]
2133pub fn maxa<A: Sequence>(n: A) -> FnNumber1<A> {
2134    FnNumber1("MAXA", n)
2135}
2136
2137/// Returns the median (middle) value in the list.
2138///
2139/// [documentfoundation->MEDIAN](https://wiki.documentfoundation.org/Documentation/Calc_Functions/MEDIAN)
2140///
2141/// __Syntax__: 
2142/// ```ods
2143///     MEDIAN({ X: NumberSequenceList}+ )
2144/// ```
2145///
2146/// __Semantics__:
2147/// 
2148/// MEDIAN logically ranks the numbers (lowest to highest). If given an odd 
2149/// number of values, MEDIAN returns the middle value. If given an even number 
2150/// of values, MEDIAN returns the arithmetic average of the two middle values.
2151///
2152/// __See also__: 
2153#[inline]
2154pub fn median<A: Sequence>(x: A) -> FnNumber1<A> {
2155    FnNumber1("MEDIAN", x)
2156}
2157
2158/// Return the minimum from a set of numbers.
2159///
2160/// [documentfoundation->MIN](https://wiki.documentfoundation.org/Documentation/Calc_Functions/MIN)
2161///
2162/// __Syntax__: 
2163/// ```ods
2164///     MIN({ N: NumberSequenceList}+ )
2165/// ```
2166///
2167/// __Constraints__:
2168/// None.
2169///
2170/// __Semantics__:
2171/// Returns the value of the minimum number in the list passed in. Returns zero 
2172/// if no numbers are provided in the list. What happens when MIN is provided 0 
2173/// parameters is implementation-defined, but MIN() with no parameters should 
2174/// return 0.
2175///
2176/// __See also__: [crate::of::max()], [crate::of::mina()], 
2177#[inline]
2178pub fn min<A: Sequence>(n: A) -> FnNumber1<A> {
2179    FnNumber1("MIN", n)
2180}
2181
2182/// Return the minimum from a set of values, including values of type Text and 
2183/// Logical.
2184///
2185/// [documentfoundation->MINA](https://wiki.documentfoundation.org/Documentation/Calc_Functions/MINA)
2186///
2187/// __Syntax__: 
2188/// ```ods
2189///     MINA({ N: Any}+ )
2190/// ```
2191///
2192/// __Constraints__:
2193/// None.
2194///
2195/// __Semantics__:
2196/// A variation of the MIN function that includes values of type Text and 
2197/// Logical. Text values are treated as number 0. Logical TRUE is treated as 1, 
2198/// and FALSE is treated as 0. Empty cells are not included. What happens when 
2199/// MINA is provided 0 parameters is implementation-defined. Any N may be of 
2200/// type ReferenceList.
2201///
2202/// __See also__: [crate::of::min()], [crate::of::maxa()], 
2203#[inline]
2204pub fn mina<A: Sequence>(n: A) -> FnNumber1<A> {
2205    FnNumber1("MINA", n)
2206}
2207
2208/// Returns the most common value in a data set.
2209///
2210/// [documentfoundation->MODE](https://wiki.documentfoundation.org/Documentation/Calc_Functions/MODE)
2211///
2212/// __Syntax__: 
2213/// ```ods
2214///     MODE({ N: NumberSequence}+ )
2215/// ```
2216///
2217/// __Semantics__:
2218/// Returns the most common value in a data set. If there are more than one 
2219/// values with the same largest frequency, returns the smallest value. If the 
2220/// number sequence does no contain at least two equal values, the MODE is not 
2221/// defined, as no most common value can be found, and an Error is returned.
2222///
2223/// __See also__: 
2224#[inline]
2225pub fn mode<A: Sequence>(n: A) -> FnNumber1<A> {
2226    FnNumber1("MODE", n)
2227}
2228
2229/// Returns the negative binomial distribution.
2230///
2231/// [documentfoundation->NEGBINOMDIST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/NEGBINOMDIST)
2232///
2233/// __Syntax__: 
2234/// ```ods
2235///     NEGBINOMDIST( X: Integer; R: Integer; Prob: Number )
2236/// ```
2237///
2238/// __Arguments__:
2239/// 
2240/// •X: The number of failures.
2241/// 
2242/// •R: The threshold number of successes.
2243/// 
2244/// •Prob: The probability of a success.
2245///
2246/// __Constraints__:
2247/// 
2248/// •If (X + R - 1) ≤ 0, NEGBINOMDIST returns an Error.
2249/// 
2250/// •If Prob < 0 or Prob > 1, NEGBINOMDIST returns an Error.
2251///
2252/// __Semantics__:
2253/// 
2254/// NEGBINOMDIST returns the probability that there will be X failures before 
2255/// the R-th success, when the constant probability of a success is Prob.
2256///
2257/// __Note__:
2258/// This function is similar to the binomial distribution, except that the 
2259/// number of successes is fixed, and the number of trials is variable. Like 
2260/// the binomial, trials are assumed to be independent.
2261///
2262/// __See also__: 
2263#[inline]
2264pub fn negbinomdist<A: Number, B: Number, C: Number>(x: A, r: B, prob: C) -> FnNumber3<A, B, C> {
2265    FnNumber3("NEGBINOMDIST", x, r, prob)
2266}
2267
2268/// returns the value of the probability density function or the cumulative 
2269/// distribution function for the normal distribution with the mean and 
2270/// standard deviation given.
2271///
2272/// [documentfoundation->NORMDIST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/NORMDIST)
2273///
2274/// __Syntax__: 
2275/// ```ods
2276///     NORMDIST( X: Number; Mean: Number; StandardDeviation: Number )
2277/// ```
2278///
2279/// __Constraints__:
2280/// StandardDeviation > 0.
2281///
2282/// __Semantics__:
2283/// In the following mu is Mean and sigma is StandardDeviation.
2284/// 
2285/// If Cumulative is FALSE, NORMDIST returns the value
2286/// 
2287/// If Cumulative is TRUE, NORMDIST returns the value
2288///
2289/// __See also__: [crate::of::legacy_normsdist()], [crate::of::normdist_()], 
2290#[inline]
2291pub fn normdist<A: Number, B: Number, C: Number>(x: A, mean: B, standard_deviation: C) -> FnNumber3<A, B, C> {
2292    FnNumber3("NORMDIST", x, mean, standard_deviation)
2293}
2294
2295/// returns the value of the probability density function or the cumulative 
2296/// distribution function for the normal distribution with the mean and 
2297/// standard deviation given.
2298///
2299/// [documentfoundation->NORMDIST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/NORMDIST)
2300///
2301/// __Syntax__: 
2302/// ```ods
2303///     NORMDIST( X: Number; Mean: Number; StandardDeviation: Number; Cumulative: Logical )
2304/// ```
2305///
2306/// __Constraints__:
2307/// StandardDeviation > 0.
2308///
2309/// __Semantics__:
2310/// In the following mu is Mean and sigma is StandardDeviation.
2311/// 
2312/// If Cumulative is FALSE, NORMDIST returns the value
2313/// 
2314/// If Cumulative is TRUE, NORMDIST returns the value
2315///
2316/// __See also__: [crate::of::legacy_normsdist()], [crate::of::normdist()], 
2317#[inline]
2318pub fn normdist_<A: Number, B: Number, C: Number, D: Logical>(x: A, mean: B, standard_deviation: C, cumulative: D) -> FnNumber4<A, B, C, D> {
2319    FnNumber4("NORMDIST", x, mean, standard_deviation, cumulative)
2320}
2321
2322/// returns the inverse of NORMDIST(x;Mean;StandardDeviation,TRUE()).
2323///
2324/// [documentfoundation->NORMINV](https://wiki.documentfoundation.org/Documentation/Calc_Functions/NORMINV)
2325///
2326/// __Syntax__: 
2327/// ```ods
2328///     NORMINV( P: Number; Mean: Number; StandardDeviation: Number )
2329/// ```
2330///
2331/// __Constraints__:
2332/// StandardDeviation > 0 and 0 < P < 1.
2333///
2334/// __Semantics__:
2335/// NORMINV returns the unique number x such that 
2336/// NORMDIST(x;Mean;StandardDeviation;TRUE()) = P.
2337///
2338/// __See also__: [crate::of::normdist()], 
2339#[inline]
2340pub fn norminv<A: Number, B: Number, C: Number>(p: A, mean: B, standard_deviation: C) -> FnNumber3<A, B, C> {
2341    FnNumber3("NORMINV", p, mean, standard_deviation)
2342}
2343
2344/// returns the value of the cumulative distribution function for the standard 
2345/// normal distribution.
2346///
2347/// [documentfoundation->LEGACY.NORMSDIST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/LEGACY.NORMSDIST)
2348///
2349/// __Syntax__: 
2350/// ```ods
2351///     LEGACY.NORMSDIST( X: Number )
2352/// ```
2353///
2354/// __Constraints__:
2355/// None
2356///
2357/// __Semantics__:
2358/// LEGACY.NORMSDIST returns the value
2359/// 
2360/// This is exactly NORMDIST(X;0;1;TRUE()).
2361///
2362/// __See also__: [crate::of::normdist()], [crate::of::legacy_normsinv()], 
2363#[inline]
2364pub fn legacy_normsdist<A: Number>(x: A) -> FnNumber1<A> {
2365    FnNumber1("LEGACY.NORMSDIST", x)
2366}
2367
2368/// returns the inverse of LEGACY.NORMSDIST(X).
2369///
2370/// [documentfoundation->LEGACY.NORMSINV](https://wiki.documentfoundation.org/Documentation/Calc_Functions/LEGACY.NORMSINV)
2371///
2372/// __Syntax__: 
2373/// ```ods
2374///     LEGACY.NORMSINV( P: Number )
2375/// ```
2376///
2377/// __Constraints__:
2378/// 0 < P < 1.
2379///
2380/// __Semantics__:
2381/// LEGACY.NORMSINV returns NORMINV (P).
2382///
2383/// __See also__: [crate::of::norminv()], [crate::of::legacy_normsdist()], 
2384#[inline]
2385pub fn legacy_normsinv<A: Number>(p: A) -> FnNumber1<A> {
2386    FnNumber1("LEGACY.NORMSINV", p)
2387}
2388
2389/// PEARSON returns the Pearson correlation coefficient of two data sets
2390///
2391/// [documentfoundation->PEARSON](https://wiki.documentfoundation.org/Documentation/Calc_Functions/PEARSON)
2392///
2393/// __Syntax__: 
2394/// ```ods
2395///     PEARSON( IndependentValues: Array; DependentValues: Array )
2396/// ```
2397///
2398/// __Constraints__:
2399/// COLUMNS(IndependentValues) = COLUMNS(DependentValues), 
2400/// ROWS(IndependentValues) = ROWS(DependentValues), both sequences shall 
2401/// contain at least one number at corresponding positions each.
2402///
2403/// __Semantics__:
2404/// 
2405/// •IndependentValues: represents the array of the first data set. 
2406/// (X-Values)
2407/// 
2408/// •DependentValues: represents the array of the second data set. (Y-Values)
2409/// 
2410/// For an empty element or an element of type Text or Boolean in 
2411/// IndependentValues the element at the corresponding position of 
2412/// DependentValues is ignored, and vice versa.
2413///
2414/// __See also__: [crate::of::columns()], [crate::of::rows()], 
2415#[inline]
2416pub fn pearson<A: Array, B: Array>(independent_values: A, dependent_values: B) -> FnNumber2<A, B> {
2417    FnNumber2("PEARSON", independent_values, dependent_values)
2418}
2419
2420/// Calculates the x-th sample percentile among the values in range.
2421///
2422/// [documentfoundation->PERCENTILE](https://wiki.documentfoundation.org/Documentation/Calc_Functions/PERCENTILE)
2423///
2424/// __Syntax__: 
2425/// ```ods
2426///     PERCENTILE( Data: NumberSequenceList; X: Number )
2427/// ```
2428///
2429/// __Constraints__:
2430/// 
2431/// •COUNT(Data) > 0
2432/// 
2433/// •0 ≤ X ≤ 1
2434/// 
2435/// •Semantics:
2436/// 
2437/// •Data: The array or range of values to get the percentile from.
2438/// •X: The percentile value between 0 and 1, inclusive. If X is not a 
2439/// multiple of
2440/// 
2441/// , PERCENTILE interpolates to obtain the value between two data points.
2442/// , PERCENTILE interpolates to obtain the value between two data points.
2443/// 
2444/// Returns the X-th sample percentile of data values in Data. A percentile 
2445/// returns the scale value for a data series which goes from the smallest 
2446/// (Alpha = 0) to the largest value (Alpha = 1) of a data series. For Alpha = 
2447/// 25%, the percentile means the first quartile; Alpha = 50% is the MEDIAN.
2448///
2449/// __See also__: [crate::of::count()], [crate::of::max()], [crate::of::max()], [crate::of::median()], [crate::of::min()], [crate::of::percentrank()], [crate::of::quartile()], [crate::of::rank()], 
2450#[inline]
2451pub fn percentile<A: Sequence, B: Number>(data: A, x: B) -> FnNumber2<A, B> {
2452    FnNumber2("PERCENTILE", data, x)
2453}
2454
2455/// Returns the percentage rank of a value in a sample.
2456///
2457/// [documentfoundation->PERCENTRANK](https://wiki.documentfoundation.org/Documentation/Calc_Functions/PERCENTRANK)
2458///
2459/// __Syntax__: 
2460/// ```ods
2461///     PERCENTRANK( Data: NumberSequenceList; X: Number )
2462/// ```
2463///
2464/// __Constraints__:
2465/// 
2466/// •COUNT(Data) > 0
2467/// 
2468/// •MIN(Data) ≤ X ≤ MAX(Data)
2469/// 
2470/// •INT(Significance) = Significance; Significance ≥ 1
2471///
2472/// __Semantics__:
2473/// 
2474/// •Data: the array or range of data with numeric values.
2475/// 
2476/// •X: the value whose rank is to be determined.
2477/// 
2478/// •Significance: an optional value that identifies the number of 
2479/// significant digits for the returned percentage value. If omitted, a value 
2480/// of 3 is used (0.xxx).
2481/// 
2482/// Returns the rank of a value in a data set Data as a percentage of the data 
2483/// set, a value between 0 and 1, inclusive. This function can be used to 
2484/// evaluate the relative standing of a value within a data set.
2485/// 
2486/// For COUNT(Data) > 1, PERCENTRANK returns r / (COUNT(Data) -1), where r is 
2487/// the rank of X in Data. The rank of the lowest number in Data is 0, and of 
2488/// the next lowest number 1, and so on. If X is not in Data, it is assigned a 
2489/// fractional rank proportionately between the rank of the numbers on either 
2490/// side. Specifically, if X lies between Y and Z = Y + 1 (Y < X < Z) with Y 
2491/// being the largest number smaller than X and Z the smallest number larger 
2492/// than X, and where Y has rank ry, the rank of X is calculated as
2493/// 
2494/// In the special case where COUNT(Data) = 1, the only valid value for X is 
2495/// the single value in Data, in which case PERCENTRANK returns 1.
2496///
2497/// __See also__: [crate::of::count()], [crate::of::int()], [crate::of::max()], [crate::of::min()], [crate::of::percentile()], [crate::of::rank()], [crate::of::percentrank_()], 
2498#[inline]
2499pub fn percentrank<A: Sequence, B: Number>(data: A, x: B) -> FnNumber2<A, B> {
2500    FnNumber2("PERCENTRANK", data, x)
2501}
2502
2503/// Returns the percentage rank of a value in a sample.
2504///
2505/// [documentfoundation->PERCENTRANK](https://wiki.documentfoundation.org/Documentation/Calc_Functions/PERCENTRANK)
2506///
2507/// __Syntax__: 
2508/// ```ods
2509///     PERCENTRANK( Data: NumberSequenceList; X: Number; Significance: Integer )
2510/// ```
2511///
2512/// __Constraints__:
2513/// 
2514/// •COUNT(Data) > 0
2515/// 
2516/// •MIN(Data) ≤ X ≤ MAX(Data)
2517/// 
2518/// •INT(Significance) = Significance; Significance ≥ 1
2519///
2520/// __Semantics__:
2521/// 
2522/// •Data: the array or range of data with numeric values.
2523/// 
2524/// •X: the value whose rank is to be determined.
2525/// 
2526/// •Significance: an optional value that identifies the number of 
2527/// significant digits for the returned percentage value. If omitted, a value 
2528/// of 3 is used (0.xxx).
2529/// 
2530/// Returns the rank of a value in a data set Data as a percentage of the data 
2531/// set, a value between 0 and 1, inclusive. This function can be used to 
2532/// evaluate the relative standing of a value within a data set.
2533/// 
2534/// For COUNT(Data) > 1, PERCENTRANK returns r / (COUNT(Data) -1), where r is 
2535/// the rank of X in Data. The rank of the lowest number in Data is 0, and of 
2536/// the next lowest number 1, and so on. If X is not in Data, it is assigned a 
2537/// fractional rank proportionately between the rank of the numbers on either 
2538/// side. Specifically, if X lies between Y and Z = Y + 1 (Y < X < Z) with Y 
2539/// being the largest number smaller than X and Z the smallest number larger 
2540/// than X, and where Y has rank ry, the rank of X is calculated as
2541/// 
2542/// In the special case where COUNT(Data) = 1, the only valid value for X is 
2543/// the single value in Data, in which case PERCENTRANK returns 1.
2544///
2545/// __See also__: [crate::of::count()], [crate::of::int()], [crate::of::max()], [crate::of::min()], [crate::of::percentile()], [crate::of::rank()], [crate::of::percentrank()], 
2546#[inline]
2547pub fn percentrank_<A: Sequence, B: Number, C: Number>(data: A, x: B, significance: C) -> FnNumber3<A, B, C> {
2548    FnNumber3("PERCENTRANK", data, x, significance)
2549}
2550
2551/// returns the number of permutations of k objects taken from n objects.
2552///
2553/// [documentfoundation->PERMUT](https://wiki.documentfoundation.org/Documentation/Calc_Functions/PERMUT)
2554///
2555/// __Syntax__: 
2556/// ```ods
2557///     PERMUT( N: Integer; K: Integer )
2558/// ```
2559///
2560/// __Constraints__:
2561/// N ≥ 0; K ≥ 0; N ≥ K
2562///
2563/// __Semantics__:
2564/// PERMUT returns
2565///
2566/// __See also__: 
2567#[inline]
2568pub fn permut<A: Number, B: Number>(n: A, k: B) -> FnNumber2<A, B> {
2569    FnNumber2("PERMUT", n, k)
2570}
2571
2572/// Returns the number of permutations for a given number of objects 
2573/// (repetition allowed).
2574///
2575/// [documentfoundation->PERMUTATIONA](https://wiki.documentfoundation.org/Documentation/Calc_Functions/PERMUTATIONA)
2576///
2577/// __Syntax__: 
2578/// ```ods
2579///     PERMUTATIONA( Total: Integer; Chosen: Integer )
2580/// ```
2581///
2582/// __Constraints__:
2583/// Total ≥ 0, Chosen ≥ 0
2584///
2585/// __Semantics__:
2586/// Given Total number of objects, return the number of permutations containing 
2587/// Chosen number of objects, with repetition permitted. The result is 1 if 
2588/// Total = 0 and Chosen = 0, otherwise the result is
2589///
2590/// __See also__: 
2591#[inline]
2592pub fn permutationa<A: Number, B: Number>(total: A, chosen: B) -> FnNumber2<A, B> {
2593    FnNumber2("PERMUTATIONA", total, chosen)
2594}
2595
2596/// Returns the values of the density function for a standard normal 
2597/// distribution.
2598///
2599/// [documentfoundation->PHI](https://wiki.documentfoundation.org/Documentation/Calc_Functions/PHI)
2600///
2601/// __Syntax__: 
2602/// ```ods
2603///     PHI( N: Number )
2604/// ```
2605///
2606/// __Semantics__:
2607/// PHI(N) is a synonym for NORMDIST(N,0,1,FALSE()).
2608///
2609/// __See also__: [crate::of::normdist()], 
2610#[inline]
2611pub fn phi<A: Number>(n: A) -> FnNumber1<A> {
2612    FnNumber1("PHI", n)
2613}
2614
2615/// returns the probability or the cumulative distribution function for the 
2616/// Poisson distribution
2617///
2618/// [documentfoundation->POISSON](https://wiki.documentfoundation.org/Documentation/Calc_Functions/POISSON)
2619///
2620/// __Syntax__: 
2621/// ```ods
2622///     POISSON( X: Integer; lambda: Number )
2623/// ```
2624///
2625/// __Constraints__:
2626/// lambda > 0, X ≥ 0
2627///
2628/// __Semantics__:
2629/// If Cumulative is FALSE, POISSON returns the value
2630/// 
2631/// If Cumulative is TRUE, POISSON returns the value
2632///
2633/// __See also__: [crate::of::poisson_()], 
2634#[inline]
2635pub fn poisson<A: Number, B: Number>(x: A, lambda: B) -> FnNumber2<A, B> {
2636    FnNumber2("POISSON", x, lambda)
2637}
2638
2639/// returns the probability or the cumulative distribution function for the 
2640/// Poisson distribution
2641///
2642/// [documentfoundation->POISSON](https://wiki.documentfoundation.org/Documentation/Calc_Functions/POISSON)
2643///
2644/// __Syntax__: 
2645/// ```ods
2646///     POISSON( X: Integer; lambda: Number; Cumulative: Logical )
2647/// ```
2648///
2649/// __Constraints__:
2650/// lambda > 0, X ≥ 0
2651///
2652/// __Semantics__:
2653/// If Cumulative is FALSE, POISSON returns the value
2654/// 
2655/// If Cumulative is TRUE, POISSON returns the value
2656///
2657/// __See also__: [crate::of::poisson()], 
2658#[inline]
2659pub fn poisson_<A: Number, B: Number, C: Logical>(x: A, lambda: B, cumulative: C) -> FnNumber3<A, B, C> {
2660    FnNumber3("POISSON", x, lambda, cumulative)
2661}
2662
2663/// Returns the probability that a discrete random variable lies between two 
2664/// limits.
2665///
2666/// [documentfoundation->PROB](https://wiki.documentfoundation.org/Documentation/Calc_Functions/PROB)
2667///
2668/// __Syntax__: 
2669/// ```ods
2670///     PROB( Data: Array; Probability: Array; Start: Number )
2671/// ```
2672///
2673/// __Constraints__:
2674/// 
2675/// •The sum of the probabilities in Probability shall equal 1.
2676/// 
2677/// •All values in Probability shall be > 0 and ≤ 1.
2678/// 
2679/// •COUNT(Data) = COUNT(Probability)
2680///
2681/// __Semantics__:
2682/// 
2683/// •Data: the array or range of data in the sample ( the Number values in 
2684/// this array or range are referred to below as
2685/// 
2686/// ).
2687/// ).
2688/// •Probability: the array or range of the corresponding probabilities ( the 
2689/// Number values in this array or range are referred to below as
2690/// 
2691/// ).
2692/// ).
2693/// 
2694/// •Start: the start value (lower bound) of the interval whose probabilities 
2695/// are to be summed.
2696/// 
2697/// •End: (optional) the end value (upper bound) of the interval whose 
2698/// probabilities are to be summed. If omitted, End = Start is used.
2699/// 
2700/// Suppose that
2701/// denotes the indicator function that is 1 if
2702/// and 0 otherwise.
2703/// 
2704/// Then PROB returns
2705/// 
2706/// i.e. the sum of all probabilities
2707/// whose corresponding data value
2708/// satisfies
2709/// . Note that if
2710/// then PROB returns 0 since in this case
2711/// for all i.
2712///
2713/// __See also__: [crate::of::count()], [crate::of::prob_()], 
2714#[inline]
2715pub fn prob<A: Array, B: Array, C: Number>(data: A, probability: B, start: C) -> FnNumber3<A, B, C> {
2716    FnNumber3("PROB", data, probability, start)
2717}
2718
2719/// Returns the probability that a discrete random variable lies between two 
2720/// limits.
2721///
2722/// [documentfoundation->PROB](https://wiki.documentfoundation.org/Documentation/Calc_Functions/PROB)
2723///
2724/// __Syntax__: 
2725/// ```ods
2726///     PROB( Data: Array; Probability: Array; Start: Number; End: Number )
2727/// ```
2728///
2729/// __Constraints__:
2730/// 
2731/// •The sum of the probabilities in Probability shall equal 1.
2732/// 
2733/// •All values in Probability shall be > 0 and ≤ 1.
2734/// 
2735/// •COUNT(Data) = COUNT(Probability)
2736///
2737/// __Semantics__:
2738/// 
2739/// •Data: the array or range of data in the sample ( the Number values in 
2740/// this array or range are referred to below as
2741/// 
2742/// ).
2743/// ).
2744/// •Probability: the array or range of the corresponding probabilities ( the 
2745/// Number values in this array or range are referred to below as
2746/// 
2747/// ).
2748/// ).
2749/// 
2750/// •Start: the start value (lower bound) of the interval whose probabilities 
2751/// are to be summed.
2752/// 
2753/// •End: (optional) the end value (upper bound) of the interval whose 
2754/// probabilities are to be summed. If omitted, End = Start is used.
2755/// 
2756/// Suppose that
2757/// denotes the indicator function that is 1 if
2758/// and 0 otherwise.
2759/// 
2760/// Then PROB returns
2761/// 
2762/// i.e. the sum of all probabilities
2763/// whose corresponding data value
2764/// satisfies
2765/// . Note that if
2766/// then PROB returns 0 since in this case
2767/// for all i.
2768///
2769/// __See also__: [crate::of::count()], [crate::of::prob()], 
2770#[inline]
2771pub fn prob_<A: Array, B: Array, C: Number, D: Number>(data: A, probability: B, start: C, end: D) -> FnNumber4<A, B, C, D> {
2772    FnNumber4("PROB", data, probability, start, end)
2773}
2774
2775/// Returns a quartile of a set of data points.
2776///
2777/// [documentfoundation->QUARTILE](https://wiki.documentfoundation.org/Documentation/Calc_Functions/QUARTILE)
2778///
2779/// __Syntax__: 
2780/// ```ods
2781///     QUARTILE( Data: NumberSequence; Quart: Integer )
2782/// ```
2783///
2784/// __Constraints__:
2785/// 
2786/// •COUNT(Data) > 0
2787/// 
2788/// •0 ≤ Quart ≤ 4
2789///
2790/// __Semantics__:
2791/// 
2792/// •Data: The cell range or data array of numeric values.
2793/// 
2794/// •Quart: The number of the quartile to return.
2795/// 
2796/// If Quart = 0, the minimum value is returned, which is equivalent to the 
2797/// MIN() function.
2798/// 
2799/// If Quart = 1, the value of the 25th percentile is returned.
2800/// 
2801/// If Quart = 2, the value of the 50th percentile is returned, which is 
2802/// equivalent to the MEDIAN() function.
2803/// 
2804/// If Quart = 3, the value of the 75th percentile is returned.
2805/// 
2806/// If Quart = 4, the maximum value is returned, which is equivalent to the 
2807/// MAX() function.
2808/// 
2809/// Based on the statistical rank of the data points in Data, QUARTILE returns 
2810/// the percentile value indicated by Quart. The percentile is calculated as 
2811/// Quart divided by 4. An algorithm to calculate the percentile for a set of 
2812/// data points is given in the definition of PERCENTILE.
2813///
2814/// __See also__: [crate::of::count()], [crate::of::max()], [crate::of::median()], [crate::of::min()], [crate::of::percentile()], [crate::of::percentrank()], [crate::of::rank()], 
2815#[inline]
2816pub fn quartile<A: Sequence, B: Number>(data: A, quart: B) -> FnNumber2<A, B> {
2817    FnNumber2("QUARTILE", data, quart)
2818}
2819
2820/// Returns the rank of a number in a list of numbers.
2821///
2822/// [documentfoundation->RANK](https://wiki.documentfoundation.org/Documentation/Calc_Functions/RANK)
2823///
2824/// __Syntax__: 
2825/// ```ods
2826///     RANK( Value: Number; Data: NumberSequenceList )
2827/// ```
2828///
2829/// __Constraints__:
2830/// Value shall exist in Data.
2831///
2832/// __Semantics__:
2833/// The RANK function returns the rank of a value within a list.
2834/// 
2835/// •Value: the number for which to determine the rank.
2836/// 
2837/// •Data: numbers used to determine the ranking.
2838/// 
2839/// •Order: specifies how to rank the numbers:
2840/// If 0 or omitted, Data is ranked in descending order.
2841/// If not 0, Data is ranked in ascending order.
2842/// 
2843/// If a number in Data occurs more than once it is given the same rank, but 
2844/// increments the rank for subsequent different numbers. If Value does not 
2845/// exist in Data an Error is returned.
2846///
2847/// __See also__: [crate::of::rank_()], 
2848#[inline]
2849pub fn rank<A: Number, B: Sequence>(value: A, data: B) -> FnNumber2<A, B> {
2850    FnNumber2("RANK", value, data)
2851}
2852
2853/// Returns the rank of a number in a list of numbers.
2854///
2855/// [documentfoundation->RANK](https://wiki.documentfoundation.org/Documentation/Calc_Functions/RANK)
2856///
2857/// __Syntax__: 
2858/// ```ods
2859///     RANK( Value: Number; Data: NumberSequenceList; Order: Number )
2860/// ```
2861///
2862/// __Constraints__:
2863/// Value shall exist in Data.
2864///
2865/// __Semantics__:
2866/// The RANK function returns the rank of a value within a list.
2867/// 
2868/// •Value: the number for which to determine the rank.
2869/// 
2870/// •Data: numbers used to determine the ranking.
2871/// 
2872/// •Order: specifies how to rank the numbers:
2873/// If 0 or omitted, Data is ranked in descending order.
2874/// If not 0, Data is ranked in ascending order.
2875/// 
2876/// If a number in Data occurs more than once it is given the same rank, but 
2877/// increments the rank for subsequent different numbers. If Value does not 
2878/// exist in Data an Error is returned.
2879///
2880/// __See also__: [crate::of::rank()], 
2881#[inline]
2882pub fn rank_<A: Number, B: Sequence, C: Number>(value: A, data: B, order: C) -> FnNumber3<A, B, C> {
2883    FnNumber3("RANK", value, data, order)
2884}
2885
2886/// Returns the square of the Pearson product moment correlation coefficient.
2887///
2888/// [documentfoundation->RSQ](https://wiki.documentfoundation.org/Documentation/Calc_Functions/RSQ)
2889///
2890/// __Syntax__: 
2891/// ```ods
2892///     RSQ( ArrayY: Array; ArrayX: Array )
2893/// ```
2894///
2895/// __Constraints__:
2896/// 
2897/// The arguments shall be either numbers or names, arrays, or references that 
2898/// contain numbers.
2899/// 
2900/// If an array or reference argument contains Text, Logical values, or empty 
2901/// cells, those values are ignored; however, cells with the value zero are 
2902/// included.
2903/// 
2904/// If ArrayY and ArrayX are empty or have a different number of data points, 
2905/// then #N/A is returned.
2906/// 
2907/// COLUMNS(ArrayY) = COLUMNS(ArrayX), ROWS(ArrayY) = ROWS(ArrayX)Semantics: 
2908/// The r-squared value can be interpreted as the proportion of the variance in 
2909/// y attributable to the variance in x.
2910/// 
2911/// The result of the RSQ function is the same as PEARSON * PEARSON.
2912/// 
2913/// For an empty element or an element of type Text or Boolean in ArrayY the 
2914/// element at the corresponding position of ArrayX is ignored, and vice versa.
2915///
2916/// __See also__: [crate::of::columns()], [crate::of::rows()], [crate::of::pearson()], 
2917#[inline]
2918pub fn rsq<A: Array, B: Array>(array_y: A, array_x: B) -> FnNumber2<A, B> {
2919    FnNumber2("RSQ", array_y, array_x)
2920}
2921
2922/// Estimates the skewness of a distribution using a sample set of numbers.
2923///
2924/// [documentfoundation->SKEW](https://wiki.documentfoundation.org/Documentation/Calc_Functions/SKEW)
2925///
2926/// __Syntax__: 
2927/// ```ods
2928///     SKEW({ Sample: NumberSequenceList}+ )
2929/// ```
2930///
2931/// __Constraints__:
2932/// The sequence shall contain three numbers at least.
2933///
2934/// __Semantics__:
2935/// Estimates the skewness of a distribution using a sample set of numbers.
2936/// Given the expectation value
2937/// and the standard deviation estimate
2938/// , the skewness becomes
2939///
2940/// __See also__: [crate::of::skewp()], 
2941#[inline]
2942pub fn skew<A: Sequence>(sample: A) -> FnNumber1<A> {
2943    FnNumber1("SKEW", sample)
2944}
2945
2946/// Calculates the skewness of a distribution using the population of a random 
2947/// variable.
2948///
2949/// [documentfoundation->SKEWP](https://wiki.documentfoundation.org/Documentation/Calc_Functions/SKEWP)
2950///
2951/// __Syntax__: 
2952/// ```ods
2953///     SKEWP({ Population: NumberSequence}+ )
2954/// ```
2955///
2956/// __Constraints__:
2957/// The sequence shall contain three numbers at least.
2958///
2959/// __Semantics__:
2960/// Calculates the skewness of a distribution using the population, i.e. the 
2961/// possible outcomes, of a random variable.
2962/// Given the expectation value
2963/// and the standard deviation sigma,the skewness becomes
2964///
2965/// __See also__: [crate::of::skew()], 
2966#[inline]
2967pub fn skewp<A: Sequence>(population: A) -> FnNumber1<A> {
2968    FnNumber1("SKEWP", population)
2969}
2970
2971/// Calculates the slope of the linear regression line.
2972///
2973/// [documentfoundation->SLOPE](https://wiki.documentfoundation.org/Documentation/Calc_Functions/SLOPE)
2974///
2975/// __Syntax__: 
2976/// ```ods
2977///     SLOPE( Y: Array; X: Array )
2978/// ```
2979///
2980/// __Constraints__:
2981/// COLUMNS(Y) = COLUMNS(X), ROWS(Y) = ROWS(X), both sequences shall contain at 
2982/// least one number at corresponding positions each.
2983///
2984/// __Semantics__:
2985/// Calculates the slope of the linear regression line.
2986/// 
2987/// For an empty element or an element of type Text or Boolean in Y the element 
2988/// at the corresponding position of X is ignored, and vice versa.
2989///
2990/// __See also__: [crate::of::columns()], [crate::of::rows()], [crate::of::intercept()], [crate::of::steyx()], 
2991#[inline]
2992pub fn slope<A: Array, B: Array>(y: A, x: B) -> FnNumber2<A, B> {
2993    FnNumber2("SLOPE", y, x)
2994}
2995
2996/// Finds the nth smallest value in a list.
2997///
2998/// [documentfoundation->SMALL](https://wiki.documentfoundation.org/Documentation/Calc_Functions/SMALL)
2999///
3000/// __Syntax__: 
3001/// ```ods
3002///     SMALL( List: NumberSequenceList; N: Integer|Array )
3003/// ```
3004///
3005/// __Constraints__:
3006/// ROUNDDOWN(N;0) = N, effectively being INT(N) = N for positive numbers. If 
3007/// the resulting N is <1 or larger than the size of List, Error is returned.
3008///
3009/// __Semantics__:
3010/// If N is an array of numbers, an array of smallest values is returned.
3011///
3012/// __See also__: [crate::of::int()], [crate::of::large()], [crate::of::rounddown()], 
3013#[inline]
3014pub fn small<A: Sequence, B: NumberOrArray>(list: A, n: B) -> FnArray2<A, B> {
3015    FnArray2("SMALL", list, n)
3016}
3017
3018/// Calculates a normalized value of a random variable.
3019///
3020/// [documentfoundation->STANDARDIZE](https://wiki.documentfoundation.org/Documentation/Calc_Functions/STANDARDIZE)
3021///
3022/// __Syntax__: 
3023/// ```ods
3024///     STANDARDIZE( Value: Number; Mean: Number; Sigma: Number )
3025/// ```
3026///
3027/// __Constraints__:
3028/// Sigma > 0
3029///
3030/// __Semantics__:
3031/// Calculates a normalized value of a random variable.
3032///
3033/// __See also__: [crate::of::gauss()], 
3034#[inline]
3035pub fn standardize<A: Number, B: Number, C: Number>(value: A, mean: B, sigma: C) -> FnNumber3<A, B, C> {
3036    FnNumber3("STANDARDIZE", value, mean, sigma)
3037}
3038
3039/// Compute the sample standard deviation of a set of numbers.
3040///
3041/// [documentfoundation->STDEV](https://wiki.documentfoundation.org/Documentation/Calc_Functions/STDEV)
3042///
3043/// __Syntax__: 
3044/// ```ods
3045///     STDEV({ N: NumberSequenceList}+ )
3046/// ```
3047///
3048/// __Constraints__:
3049/// At least two numbers shall be included. Returns an Error if less than two 
3050/// Numbers are provided.
3051///
3052/// __Semantics__:
3053/// Computes the sample standard deviation s, where
3054/// 
3055/// Note that s is not the same as the standard deviation of the set, sigma, 
3056/// which uses n rather than n − 1.
3057///
3058/// __See also__: [crate::of::stdevp()], [crate::of::average()], 
3059#[inline]
3060pub fn stdev<A: Sequence>(n: A) -> FnNumber1<A> {
3061    FnNumber1("STDEV", n)
3062}
3063
3064/// Calculate the standard deviation using a sample set of values, including 
3065/// values of type Text and Logical.
3066///
3067/// [documentfoundation->STDEVA](https://wiki.documentfoundation.org/Documentation/Calc_Functions/STDEVA)
3068///
3069/// __Syntax__: 
3070/// ```ods
3071///     STDEVA({ Sample: Any}+ )
3072/// ```
3073///
3074/// __Constraints__:
3075/// COUNTA(Sample) > 1.
3076///
3077/// __Semantics__:
3078/// Unlike the STDEV function, includes values of type Text and Logical. Text 
3079/// values are treated as number 0. Logical TRUE is treated as 1, and FALSE is 
3080/// treated as 0. Empty cells are not included.
3081/// 
3082/// The handling of string constants as parameters is implementation-defined. 
3083/// Either, string constants are converted to numbers, if possible and 
3084/// otherwise, they are treated as 0, or string constants are always treated as 
3085/// 0.
3086/// 
3087/// Suppose the resulting sequence of values is x1, x2, …, xn. Then let
3088/// 
3089/// STDEVA returns
3090///
3091/// __See also__: [crate::of::counta()], [crate::of::stdev()], 
3092#[inline]
3093pub fn stdeva<A: Sequence>(sample: A) -> FnNumber1<A> {
3094    FnNumber1("STDEVA", sample)
3095}
3096
3097/// Calculates the standard deviation using the population of a random 
3098/// variable, including values of type Text and Logical.
3099///
3100/// [documentfoundation->STDEVP](https://wiki.documentfoundation.org/Documentation/Calc_Functions/STDEVP)
3101///
3102/// __Syntax__: 
3103/// ```ods
3104///     STDEVP({ N: NumberSequence}+ )
3105/// ```
3106///
3107/// __Constraints__:
3108/// COUNT(N) ≥ 1.
3109///
3110/// __Semantics__:
3111/// Computes the standard deviation of the set sigma, where
3112/// 
3113/// Note that sigma is not the same as the sample standard deviation, s, which 
3114/// uses n − 1 rather than n.
3115///
3116/// __See also__: [crate::of::count()], [crate::of::stdev()], [crate::of::average()], 
3117#[inline]
3118pub fn stdevp<A: Sequence>(n: A) -> FnNumber1<A> {
3119    FnNumber1("STDEVP", n)
3120}
3121
3122/// Calculates the standard deviation using the population of a random 
3123/// variable, including values of type Text and Logical.
3124///
3125/// [documentfoundation->STDEVPA](https://wiki.documentfoundation.org/Documentation/Calc_Functions/STDEVPA)
3126///
3127/// __Syntax__: 
3128/// ```ods
3129///     STDEVPA({ Sample: Any}+ )
3130/// ```
3131///
3132/// __Constraints__:
3133/// COUNTA(Sample) ≥ 1.
3134///
3135/// __Semantics__:
3136/// Unlike the STDEV function, includes values of type Text and Logical. Text 
3137/// values are treated as number 0. Logical TRUE is treated as 1, and FALSE is 
3138/// treated as 0. Empty cells are not included.
3139/// Given the expectation value
3140/// the standard deviation becomes
3141/// 
3142/// In the sequence, only Numbers and Logical types are considered; cells with 
3143/// Text are converted to 0; other types are ignored. If Logical types are a 
3144/// distinct type, they are still included, with TRUE considered 1 and FALSE 
3145/// considered 0. Any Sample may be of type ReferenceList.
3146/// 
3147/// The handling of string constants as parameters is implementation-defined. 
3148/// Either, string constants are converted to numbers, if possible and 
3149/// otherwise, they are treated as zero, or string constants are always treated 
3150/// as zero.
3151///
3152/// __See also__: [crate::of::counta()], [crate::of::stdevp()], 
3153#[inline]
3154pub fn stdevpa<A: Sequence>(sample: A) -> FnNumber1<A> {
3155    FnNumber1("STDEVPA", sample)
3156}
3157
3158/// Calculates the standard error of the predicted y value for each x in the 
3159/// regression.
3160///
3161/// [documentfoundation->STEYX](https://wiki.documentfoundation.org/Documentation/Calc_Functions/STEYX)
3162///
3163/// __Syntax__: 
3164/// ```ods
3165///     STEYX( MeasuredY: Array; X: Array )
3166/// ```
3167///
3168/// __Constraints__:
3169/// COLUMNS(MeasuredY) = COLUMNS(X), ROWS(MeasuredY) = ROWS(X), both sequences 
3170/// shall contain at least three numbers at corresponding positions each.
3171///
3172/// __Semantics__:
3173/// Calculates the standard error of the predicted y value for each x in the 
3174/// regression.
3175/// 
3176/// For an empty element or an element of type Text or Boolean in MeasuredY the 
3177/// element at the corresponding position of X is ignored, and vice versa.
3178///
3179/// __See also__: [crate::of::columns()], [crate::of::rows()], [crate::of::intercept()], [crate::of::slope()], 
3180#[inline]
3181pub fn steyx<A: Array, B: Array>(measured_y: A, x: B) -> FnNumber2<A, B> {
3182    FnNumber2("STEYX", measured_y, x)
3183}
3184
3185/// Returns the area to the tail or tails of the probability density function 
3186/// of the t-distribution.
3187///
3188/// [documentfoundation->LEGACY.TDIST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/LEGACY.TDIST)
3189///
3190/// __Syntax__: 
3191/// ```ods
3192///     LEGACY.TDIST( X: Number; Df: Integer; Tails: Integer )
3193/// ```
3194///
3195/// __Constraints__:
3196/// X ≥ 0, Df ≥ 1, Tails = 1 or 2
3197///
3198/// __Semantics__:
3199/// Then LEGACY.TDIST returns
3200/// 
3201/// where
3202/// 
3203/// Note that Df denotes the degrees of freedom of the t-distribution and Γ is 
3204/// the Gamma function.
3205///
3206/// __See also__: [crate::of::gamma()], [crate::of::betadist()], [crate::of::binomdist()], [crate::of::chisqdist()], [crate::of::expondist()], [crate::of::fdist()], [crate::of::gammadist()], [crate::of::gauss()], [crate::of::hypgeomdist()], [crate::of::lognormdist()], [crate::of::negbinomdist()], [crate::of::normdist()], [crate::of::poisson()], [crate::of::weibull()], 
3207#[inline]
3208pub fn legacy_tdist<A: Number, B: Number, C: Number>(x: A, df: B, tails: C) -> FnNumber3<A, B, C> {
3209    FnNumber3("LEGACY.TDIST", x, df, tails)
3210}
3211
3212/// Calculates the inverse of the two-tailed t-distribution.
3213///
3214/// [documentfoundation->TINV](https://wiki.documentfoundation.org/Documentation/Calc_Functions/TINV)
3215///
3216/// __Syntax__: 
3217/// ```ods
3218///     TINV( Probability: Number; DegreeOfFreedom: Integer )
3219/// ```
3220///
3221/// __Constraints__:
3222/// 0 < Probability ≤ 1, DegreeOfFreedom ≥ 1
3223///
3224/// __Semantics__:
3225/// Calculates the inverse of the two-tailed t-distribution.
3226///
3227/// __See also__: [crate::of::legacy_tdist()], 
3228#[inline]
3229pub fn tinv<A: Number, B: Number>(probability: A, degree_of_freedom: B) -> FnNumber2<A, B> {
3230    FnNumber2("TINV", probability, degree_of_freedom)
3231}
3232
3233/// Returns predicted values based on a simple or multiple linear regression.
3234///
3235/// [documentfoundation->TREND](https://wiki.documentfoundation.org/Documentation/Calc_Functions/TREND)
3236///
3237/// __Syntax__: 
3238/// ```ods
3239///     TREND( KnownY: Array )
3240/// ```
3241///
3242/// __Constraints__:
3243/// (COLUMNS(KnownY) = COLUMNS(KnownX) and ROWS(KnownY) = ROWS(KnownX)) or 
3244/// (COLUMNS(KnownY) = 1 and ROWS(KnownY) = ROWS(KnownX) and COLUMNS(KnownX) = 
3245/// COLUMNS(NewX)) or (COLUMNS(KnownY) = COLUMNS(KnownX) and ROWS(KnownY) = 1 
3246/// and ROWS(KnownX) = ROWS(NewX))
3247///
3248/// __Semantics__:
3249/// 
3250/// KnownY: The set of known y-values to be used to determine the regression 
3251/// equation
3252/// 
3253/// KnownX: The set of known x-values to be used to determine the regression 
3254/// equation. If omitted or an empty parameter, it is set to the sequence 
3255/// 1,2,3,…,k, where k = ROWS(KnownY) ∙ COLUMNS(KnownY).
3256/// 
3257/// NewX: The set of x-values for which predicted y-values are to be 
3258/// calculated. If omitted or an empty parameter, it is set to KnownX.
3259/// 
3260/// Const: If set to FALSE, the model constant a is equal to 0.
3261/// LINEST(KnownY; KnownX; Const; FALSE()) either returns an error an array 
3262/// with 1 row and n + 1 columns. If it returns an error then so does TREND. If 
3263/// it returns an array, we call the entries in that array
3264/// .
3265/// Let
3266/// denote the entry in the ith row and jth column of NewX.
3267/// If COLUMNS(KnownY) = COLUMNS(KnownX) and ROWS(KnownY) = ROWS(KnownX), then 
3268/// TREND returns an array with ROWS(NewX) rows and COLUMNS(NewX) column, such 
3269/// that the entry in its ith row and jth column is
3270/// .
3271/// Otherwise, if COLUMNS(KnownY) = 1 and ROWS(KnownY) = ROWS(KnownX) and 
3272/// COLUMNS(KnownX) = COLUMNS(NewX), then TREND returns an array with 
3273/// ROWS(NewX) rows and 1 column, such that the entry in the ith row is
3274/// .
3275/// Otherwise, if COLUMNS(KnownY) = COLUMNS(KnownX) and ROWS(KnownY) = 1 and 
3276/// ROWS(KnownX) = ROWS(NewX), then TREND returns an array with 1 row and 
3277/// COLUMNS(NewX) columns, such that the entry in the jth column is
3278/// .
3279///
3280/// __See also__: [crate::of::columns()], [crate::of::rows()], [crate::of::intercept()], [crate::of::linest()], [crate::of::slope()], [crate::of::steyx()], [crate::of::trend_()], [crate::of::trend__()], [crate::of::trend___()], 
3281#[inline]
3282pub fn trend<A: Array>(known_y: A) -> FnArray1<A> {
3283    FnArray1("TREND", known_y)
3284}
3285
3286/// Returns predicted values based on a simple or multiple linear regression.
3287///
3288/// [documentfoundation->TREND](https://wiki.documentfoundation.org/Documentation/Calc_Functions/TREND)
3289///
3290/// __Syntax__: 
3291/// ```ods
3292///     TREND( KnownY: Array; KnownX: Array )
3293/// ```
3294///
3295/// __Constraints__:
3296/// (COLUMNS(KnownY) = COLUMNS(KnownX) and ROWS(KnownY) = ROWS(KnownX)) or 
3297/// (COLUMNS(KnownY) = 1 and ROWS(KnownY) = ROWS(KnownX) and COLUMNS(KnownX) = 
3298/// COLUMNS(NewX)) or (COLUMNS(KnownY) = COLUMNS(KnownX) and ROWS(KnownY) = 1 
3299/// and ROWS(KnownX) = ROWS(NewX))
3300///
3301/// __Semantics__:
3302/// 
3303/// KnownY: The set of known y-values to be used to determine the regression 
3304/// equation
3305/// 
3306/// KnownX: The set of known x-values to be used to determine the regression 
3307/// equation. If omitted or an empty parameter, it is set to the sequence 
3308/// 1,2,3,…,k, where k = ROWS(KnownY) ∙ COLUMNS(KnownY).
3309/// 
3310/// NewX: The set of x-values for which predicted y-values are to be 
3311/// calculated. If omitted or an empty parameter, it is set to KnownX.
3312/// 
3313/// Const: If set to FALSE, the model constant a is equal to 0.
3314/// LINEST(KnownY; KnownX; Const; FALSE()) either returns an error an array 
3315/// with 1 row and n + 1 columns. If it returns an error then so does TREND. If 
3316/// it returns an array, we call the entries in that array
3317/// .
3318/// Let
3319/// denote the entry in the ith row and jth column of NewX.
3320/// If COLUMNS(KnownY) = COLUMNS(KnownX) and ROWS(KnownY) = ROWS(KnownX), then 
3321/// TREND returns an array with ROWS(NewX) rows and COLUMNS(NewX) column, such 
3322/// that the entry in its ith row and jth column is
3323/// .
3324/// Otherwise, if COLUMNS(KnownY) = 1 and ROWS(KnownY) = ROWS(KnownX) and 
3325/// COLUMNS(KnownX) = COLUMNS(NewX), then TREND returns an array with 
3326/// ROWS(NewX) rows and 1 column, such that the entry in the ith row is
3327/// .
3328/// Otherwise, if COLUMNS(KnownY) = COLUMNS(KnownX) and ROWS(KnownY) = 1 and 
3329/// ROWS(KnownX) = ROWS(NewX), then TREND returns an array with 1 row and 
3330/// COLUMNS(NewX) columns, such that the entry in the jth column is
3331/// .
3332///
3333/// __See also__: [crate::of::columns()], [crate::of::rows()], [crate::of::intercept()], [crate::of::linest()], [crate::of::slope()], [crate::of::steyx()], [crate::of::trend()], [crate::of::trend__()], [crate::of::trend___()], 
3334#[inline]
3335pub fn trend_<A: Array, B: Array>(known_y: A, known_x: B) -> FnArray2<A, B> {
3336    FnArray2("TREND", known_y, known_x)
3337}
3338
3339/// Returns predicted values based on a simple or multiple linear regression.
3340///
3341/// [documentfoundation->TREND](https://wiki.documentfoundation.org/Documentation/Calc_Functions/TREND)
3342///
3343/// __Syntax__: 
3344/// ```ods
3345///     TREND( KnownY: Array; KnownX: Array; NewX: Array )
3346/// ```
3347///
3348/// __Constraints__:
3349/// (COLUMNS(KnownY) = COLUMNS(KnownX) and ROWS(KnownY) = ROWS(KnownX)) or 
3350/// (COLUMNS(KnownY) = 1 and ROWS(KnownY) = ROWS(KnownX) and COLUMNS(KnownX) = 
3351/// COLUMNS(NewX)) or (COLUMNS(KnownY) = COLUMNS(KnownX) and ROWS(KnownY) = 1 
3352/// and ROWS(KnownX) = ROWS(NewX))
3353///
3354/// __Semantics__:
3355/// 
3356/// KnownY: The set of known y-values to be used to determine the regression 
3357/// equation
3358/// 
3359/// KnownX: The set of known x-values to be used to determine the regression 
3360/// equation. If omitted or an empty parameter, it is set to the sequence 
3361/// 1,2,3,…,k, where k = ROWS(KnownY) ∙ COLUMNS(KnownY).
3362/// 
3363/// NewX: The set of x-values for which predicted y-values are to be 
3364/// calculated. If omitted or an empty parameter, it is set to KnownX.
3365/// 
3366/// Const: If set to FALSE, the model constant a is equal to 0.
3367/// LINEST(KnownY; KnownX; Const; FALSE()) either returns an error an array 
3368/// with 1 row and n + 1 columns. If it returns an error then so does TREND. If 
3369/// it returns an array, we call the entries in that array
3370/// .
3371/// Let
3372/// denote the entry in the ith row and jth column of NewX.
3373/// If COLUMNS(KnownY) = COLUMNS(KnownX) and ROWS(KnownY) = ROWS(KnownX), then 
3374/// TREND returns an array with ROWS(NewX) rows and COLUMNS(NewX) column, such 
3375/// that the entry in its ith row and jth column is
3376/// .
3377/// Otherwise, if COLUMNS(KnownY) = 1 and ROWS(KnownY) = ROWS(KnownX) and 
3378/// COLUMNS(KnownX) = COLUMNS(NewX), then TREND returns an array with 
3379/// ROWS(NewX) rows and 1 column, such that the entry in the ith row is
3380/// .
3381/// Otherwise, if COLUMNS(KnownY) = COLUMNS(KnownX) and ROWS(KnownY) = 1 and 
3382/// ROWS(KnownX) = ROWS(NewX), then TREND returns an array with 1 row and 
3383/// COLUMNS(NewX) columns, such that the entry in the jth column is
3384/// .
3385///
3386/// __See also__: [crate::of::columns()], [crate::of::rows()], [crate::of::intercept()], [crate::of::linest()], [crate::of::slope()], [crate::of::steyx()], [crate::of::trend()], [crate::of::trend_()], [crate::of::trend___()], 
3387#[inline]
3388pub fn trend__<A: Array, B: Array, C: Array>(known_y: A, known_x: B, new_x: C) -> FnArray3<A, B, C> {
3389    FnArray3("TREND", known_y, known_x, new_x)
3390}
3391
3392/// Returns predicted values based on a simple or multiple linear regression.
3393///
3394/// [documentfoundation->TREND](https://wiki.documentfoundation.org/Documentation/Calc_Functions/TREND)
3395///
3396/// __Syntax__: 
3397/// ```ods
3398///     TREND( KnownY: Array; KnownX: Array; NewX: Array; Const: Logical )
3399/// ```
3400///
3401/// __Constraints__:
3402/// (COLUMNS(KnownY) = COLUMNS(KnownX) and ROWS(KnownY) = ROWS(KnownX)) or 
3403/// (COLUMNS(KnownY) = 1 and ROWS(KnownY) = ROWS(KnownX) and COLUMNS(KnownX) = 
3404/// COLUMNS(NewX)) or (COLUMNS(KnownY) = COLUMNS(KnownX) and ROWS(KnownY) = 1 
3405/// and ROWS(KnownX) = ROWS(NewX))
3406///
3407/// __Semantics__:
3408/// 
3409/// KnownY: The set of known y-values to be used to determine the regression 
3410/// equation
3411/// 
3412/// KnownX: The set of known x-values to be used to determine the regression 
3413/// equation. If omitted or an empty parameter, it is set to the sequence 
3414/// 1,2,3,…,k, where k = ROWS(KnownY) ∙ COLUMNS(KnownY).
3415/// 
3416/// NewX: The set of x-values for which predicted y-values are to be 
3417/// calculated. If omitted or an empty parameter, it is set to KnownX.
3418/// 
3419/// Const: If set to FALSE, the model constant a is equal to 0.
3420/// LINEST(KnownY; KnownX; Const; FALSE()) either returns an error an array 
3421/// with 1 row and n + 1 columns. If it returns an error then so does TREND. If 
3422/// it returns an array, we call the entries in that array
3423/// .
3424/// Let
3425/// denote the entry in the ith row and jth column of NewX.
3426/// If COLUMNS(KnownY) = COLUMNS(KnownX) and ROWS(KnownY) = ROWS(KnownX), then 
3427/// TREND returns an array with ROWS(NewX) rows and COLUMNS(NewX) column, such 
3428/// that the entry in its ith row and jth column is
3429/// .
3430/// Otherwise, if COLUMNS(KnownY) = 1 and ROWS(KnownY) = ROWS(KnownX) and 
3431/// COLUMNS(KnownX) = COLUMNS(NewX), then TREND returns an array with 
3432/// ROWS(NewX) rows and 1 column, such that the entry in the ith row is
3433/// .
3434/// Otherwise, if COLUMNS(KnownY) = COLUMNS(KnownX) and ROWS(KnownY) = 1 and 
3435/// ROWS(KnownX) = ROWS(NewX), then TREND returns an array with 1 row and 
3436/// COLUMNS(NewX) columns, such that the entry in the jth column is
3437/// .
3438///
3439/// __See also__: [crate::of::columns()], [crate::of::rows()], [crate::of::intercept()], [crate::of::linest()], [crate::of::slope()], [crate::of::steyx()], [crate::of::trend()], [crate::of::trend_()], [crate::of::trend__()], 
3440#[inline]
3441pub fn trend___<A: Array, B: Array, C: Array, D: Logical>(known_y: A, known_x: B, new_x: C, const_: D) -> FnArray4<A, B, C, D> {
3442    FnArray4("TREND", known_y, known_x, new_x, const_)
3443}
3444
3445/// Returns the mean of a data set, ignoring a proportion of high and low 
3446/// values.
3447///
3448/// [documentfoundation->TRIMMEAN](https://wiki.documentfoundation.org/Documentation/Calc_Functions/TRIMMEAN)
3449///
3450/// __Syntax__: 
3451/// ```ods
3452///     TRIMMEAN( DataSet: NumberSequenceList; CutOffFraction: Number )
3453/// ```
3454///
3455/// __Constraints__:
3456/// 0 ≤ CutOffFraction < 1
3457///
3458/// __Semantics__:
3459/// Returns the mean of a data set, ignoring a proportion of high and low 
3460/// values.
3461/// 
3462/// Let n denote the number of elements in the data set and let
3463/// 
3464/// be the values in the data set sorted in ascending order. Moreover let
3465/// 
3466/// Then TRIMMEAN returns the value
3467///
3468/// __See also__: [crate::of::average()], [crate::of::geomean()], [crate::of::harmean()], 
3469#[inline]
3470pub fn trimmean<A: Sequence, B: Number>(data_set: A, cut_off_fraction: B) -> FnNumber2<A, B> {
3471    FnNumber2("TRIMMEAN", data_set, cut_off_fraction)
3472}
3473
3474/// Calculates the p-value of a 2-sample t-test.
3475///
3476/// [documentfoundation->TTEST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/TTEST)
3477///
3478/// __Syntax__: 
3479/// ```ods
3480///     TTEST( X: Array; Y: Array; Tails: Integer; Type: Integer )
3481/// ```
3482///
3483/// __Constraints__:
3484/// COUNT(X) > 1, COUNT(Y) > 1, Tails = 1 or 2, Type = 1,2, or 3,
3485/// (COUNT(X) = COUNT(Y) or Type ≠ 1)
3486/// 
3487/// COLUMNS(X) = COLUMNS(Y), ROWS(X) = ROWS(Y)
3488///
3489/// __Semantics__:
3490/// Let X1, X2, …,Xn be the numbers in the sequence X and Y1, Y2, …,Ym be 
3491/// the numbers in the sequence Y. Then
3492/// 
3493/// and
3494/// 
3495/// Moreover let
3496/// 
3497/// and
3498/// 
3499/// where Γ is the Gamma function.
3500/// 
3501/// (1)If type = 1, TTEST calculates the p-value for a paired-sample comparison 
3502/// of means test. Note that in this case due to the above constraints n = m. 
3503/// With
3504/// 
3505/// and
3506/// 
3507/// TTEST returns
3508/// 
3509/// (2)If Type = 2, TTEST calculates the p-value of a comparison of means for 
3510/// independent samples from populations with equal variance. With
3511/// 
3512/// (1)
3513/// 
3514/// and
3515/// 
3516/// TTEST returns
3517/// 
3518/// (3)If Type = 3, TTEST calculates the p-value of a comparison of means for 
3519/// independent samples from populations with not necessarily equal variances. 
3520/// With
3521/// 
3522/// (2)
3523/// 
3524/// and
3525/// 
3526/// TTEST returns
3527/// 
3528/// For an empty element or an element of type Text or Boolean in X the element 
3529/// at the corresponding position of Y is ignored, and vice versa.
3530///
3531/// __See also__: [crate::of::columns()], [crate::of::count()], [crate::of::rows()], [crate::of::ftest()], [crate::of::legacy_tdist()], [crate::of::ztest()], 
3532#[inline]
3533pub fn ttest<A: Array, B: Array, C: Number, D: Number>(x: A, y: B, tails: C, type_: D) -> FnNumber4<A, B, C, D> {
3534    FnNumber4("TTEST", x, y, tails, type_)
3535}
3536
3537/// Compute the sample variance of a set of numbers.
3538///
3539/// [documentfoundation->VAR](https://wiki.documentfoundation.org/Documentation/Calc_Functions/VAR)
3540///
3541/// __Syntax__: 
3542/// ```ods
3543///     VAR({ N: NumberSequence}+ )
3544/// ```
3545///
3546/// __Constraints__:
3547/// At least two numbers shall be included. Returns an Error if less than two 
3548/// Numbers are provided.
3549///
3550/// __Semantics__:
3551/// Computes the sample variance s2, where
3552/// 
3553/// Note that s2 is not the same as the variance of the set, sigma2, which uses 
3554/// n rather than n − 1.
3555///
3556/// __See also__: [crate::of::varp()], [crate::of::stdev()], [crate::of::average()], 
3557#[inline]
3558pub fn var<A: Sequence>(n: A) -> FnNumber1<A> {
3559    FnNumber1("VAR", n)
3560}
3561
3562/// Estimates the variance using a sample set of values, including values of 
3563/// type Text and Logical.
3564///
3565/// [documentfoundation->VARA](https://wiki.documentfoundation.org/Documentation/Calc_Functions/VARA)
3566///
3567/// __Syntax__: 
3568/// ```ods
3569///     VARA({ Sample: Any}+ )
3570/// ```
3571///
3572/// __Constraints__:
3573/// The sequence shall contain two numbers at least.
3574///
3575/// __Semantics__:
3576/// Unlike the VAR function, includes values of type Text and Logical. Text 
3577/// values are treated as number 0. Logical TRUE is treated as 1, and FALSE is 
3578/// treated as 0. Empty cells are not included.
3579/// Given the expectation value
3580/// the estimated variance becomes
3581/// 
3582/// In the sequence, only Numbers and Logical types are considered; cells with 
3583/// Text are converted to 0; other types are ignored. If Logical types are a 
3584/// distinct type, they are still included, with TRUE considered 1 and FALSE 
3585/// considered 0. Any Sample may be of type ReferenceList.
3586/// 
3587/// The handling of string constants as parameters is implementation-defined. 
3588/// Either, string constants are converted to numbers, if possible and 
3589/// otherwise, they are treated as zero, or string constants are always treated 
3590/// as zero.
3591///
3592/// __See also__: [crate::of::var()], 
3593#[inline]
3594pub fn vara<A: Sequence>(sample: A) -> FnNumber1<A> {
3595    FnNumber1("VARA", sample)
3596}
3597
3598/// Compute the variance of the set for a set of numbers.
3599///
3600/// [documentfoundation->VARP](https://wiki.documentfoundation.org/Documentation/Calc_Functions/VARP)
3601///
3602/// __Syntax__: 
3603/// ```ods
3604///     VARP({ N: NumberSequence}+ )
3605/// ```
3606///
3607/// __Constraints__:
3608/// COUNT(N) ≥ 1
3609///
3610/// __Semantics__:
3611/// Computes the variance of the set sigma2, where
3612/// 
3613/// Note that sigma2 is not the same as the sample variance, s2, which uses n 
3614/// − 1 rather than n.
3615/// 
3616/// If only one number is provided, returns 0.
3617///
3618/// __See also__: [crate::of::count()], [crate::of::var()], [crate::of::stdevp()], [crate::of::average()], 
3619#[inline]
3620pub fn varp<A: Sequence>(n: A) -> FnNumber1<A> {
3621    FnNumber1("VARP", n)
3622}
3623
3624/// Calculates the variance using the population of the distribution, including 
3625/// values of type Text and Logical.
3626///
3627/// [documentfoundation->VARPA](https://wiki.documentfoundation.org/Documentation/Calc_Functions/VARPA)
3628///
3629/// __Syntax__: 
3630/// ```ods
3631///     VARPA({ Sample: Any}+ )
3632/// ```
3633///
3634/// __Constraints__:
3635/// COUNTA(Sample) ≥ 1.
3636///
3637/// __Semantics__:
3638/// Unlike the VARP function, includes values of type Text and Logical. Text 
3639/// values are treated as number 0. Logical TRUE is treated as 1, and FALSE is 
3640/// treated as 0. Empty cells are not included.
3641/// Given the expectation value
3642/// the variance becomes
3643/// 
3644/// In the sequence, only Numbers and Logical types are considered; cells with 
3645/// Text are converted to 0; other types are ignored. If Logical types are a 
3646/// distinct type, they are still included, with TRUE considered 1 and FALSE 
3647/// considered 0. Any Sample may be of type ReferenceList.
3648/// 
3649/// The handling of string constants as parameters is implementation-defined. 
3650/// Either, string constants are converted to numbers, if possible and 
3651/// otherwise, they are treated as zero, or string constants are always treated 
3652/// as zero.
3653///
3654/// __See also__: [crate::of::counta()], [crate::of::varp()], 
3655#[inline]
3656pub fn varpa<A: Sequence>(sample: A) -> FnNumber1<A> {
3657    FnNumber1("VARPA", sample)
3658}
3659
3660/// Calculates the Weibull distribution.
3661///
3662/// [documentfoundation->WEIBULL](https://wiki.documentfoundation.org/Documentation/Calc_Functions/WEIBULL)
3663///
3664/// __Syntax__: 
3665/// ```ods
3666///     WEIBULL( Value: Number; Shape: Number; Scale: Number; Cumulative: Logical )
3667/// ```
3668///
3669/// __Constraints__:
3670/// Value ≥ 0; Shape > 0; Scale > 0
3671///
3672/// __Semantics__:
3673/// Calculates the Weibull distribution at the position Value.
3674/// 
3675/// If Cumulative is FALSE, the probability density function is calculated:
3676/// 
3677/// If Cumulative is TRUE, the cumulative distribution function is calculated:
3678///
3679/// __See also__: [crate::of::betadist()], [crate::of::binomdist()], [crate::of::chisqdist()], [crate::of::expondist()], [crate::of::fdist()], [crate::of::gammadist()], [crate::of::gauss()], [crate::of::hypgeomdist()], [crate::of::lognormdist()], [crate::of::negbinomdist()], [crate::of::normdist()], [crate::of::poisson()], [crate::of::legacy_tdist()], 
3680#[inline]
3681pub fn weibull<A: Number, B: Number, C: Number, D: Logical>(value: A, shape: B, scale: C, cumulative: D) -> FnNumber4<A, B, C, D> {
3682    FnNumber4("WEIBULL", value, shape, scale, cumulative)
3683}
3684
3685/// Calculates the probability of observing a sample mean as large or larger 
3686/// than the mean of the given sample for samples drawn from a normal 
3687/// distribution.
3688///
3689/// [documentfoundation->ZTEST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/ZTEST)
3690///
3691/// __Syntax__: 
3692/// ```ods
3693///     ZTEST( Sample: NumberSequenceList; Mean: Number )
3694/// ```
3695///
3696/// __Constraints__:
3697/// The sequence Sample shall contain at least two numbers.
3698///
3699/// __Semantics__:
3700/// Calculates the probability of observing a sample mean as large or larger 
3701/// than the mean of the given Sample for samples drawn from a normal 
3702/// distribution with the given mean Mean and the given standard deviation 
3703/// Sigma. If Sigma is omitted, it is estimated from Sample, using STDEV.
3704///
3705/// __See also__: [crate::of::ftest()], [crate::of::ttest()], [crate::of::ztest_()], 
3706#[inline]
3707pub fn ztest<A: Sequence, B: Number>(sample: A, mean: B) -> FnNumber2<A, B> {
3708    FnNumber2("ZTEST", sample, mean)
3709}
3710
3711/// Calculates the probability of observing a sample mean as large or larger 
3712/// than the mean of the given sample for samples drawn from a normal 
3713/// distribution.
3714///
3715/// [documentfoundation->ZTEST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/ZTEST)
3716///
3717/// __Syntax__: 
3718/// ```ods
3719///     ZTEST( Sample: NumberSequenceList; Mean: Number; Sigma: Number )
3720/// ```
3721///
3722/// __Constraints__:
3723/// The sequence Sample shall contain at least two numbers.
3724///
3725/// __Semantics__:
3726/// Calculates the probability of observing a sample mean as large or larger 
3727/// than the mean of the given Sample for samples drawn from a normal 
3728/// distribution with the given mean Mean and the given standard deviation 
3729/// Sigma. If Sigma is omitted, it is estimated from Sample, using STDEV.
3730///
3731/// __See also__: [crate::of::ftest()], [crate::of::ttest()], [crate::of::ztest()], 
3732#[inline]
3733pub fn ztest_<A: Sequence, B: Number, C: Number>(sample: A, mean: B, sigma: C) -> FnNumber3<A, B, C> {
3734    FnNumber3("ZTEST", sample, mean, sigma)
3735}
3736
3737/// Uses the probability mass function of the binomial distribution to 
3738/// calculate the probability of a specific number of successful trial 
3739/// outcomes, or a range of successful trial outcomes. The binomial 
3740/// distribution is a discrete probability distribution that is used to analyze 
3741/// data in many domains.
3742///
3743/// [documentfoundation->B](https://wiki.documentfoundation.org/Documentation/Calc_Functions/B)
3744///
3745/// __Syntax__: 
3746/// ```ods
3747///     B( Trials: Integer; SP: Number; T_1: Integer )
3748/// ```
3749///
3750/// __Info2__:
3751/// Returns a real number in the range [0, 1], which is the probability for the 
3752/// given arguments.
3753///
3754/// __Semantics__:
3755/// 
3756/// Trials is a non-negative integer, or a reference to a cell containing that 
3757/// integer, that is the total number of independent trials.
3758/// 
3759/// SP is a real number (expressed as a percentage, such as 2.5%, or a decimal 
3760/// fraction, such as 0.025), or a reference to a cell containing that number, 
3761/// that is the probability of a successful outcome on each trial. As a 
3762/// probability, SP lies in the range [0, 1] (or equivalently 0% ≤ SP ≤ 
3763/// 100%).
3764/// 
3765/// T 1 is a non-negative integer, or a reference to a cell containing that 
3766/// integer, that specifies the lower limit for the number of successful 
3767/// trials.
3768/// 
3769/// T 2 is a non-negative integer, or a reference to a cell containing that 
3770/// integer, that specifies the upper limit for the number of successful 
3771/// trials. If T 2 is omitted, the function calculates the probability that the 
3772/// number of successful trials shall be exactly T 1. If T 2 is provided, the 
3773/// function calculates the probability that the number of successful trials 
3774/// shall lie between T 1 and T 2 inclusive.
3775/// 
3776/// If any of Trials, SP, T 1, and T 2 is non-numeric, then B reports a #VALUE! 
3777/// error.
3778/// If any of Trials, T 1, and T 2 is a non-integer value, then B truncates it 
3779/// to an integer value.
3780/// If SP is less than 0.0 or greater than 1.0, then B reports an invalid 
3781/// argument error (Err:502).
3782/// For the case when T 2 is omitted, B checks (after any truncation) that 
3783/// Trials ≥ 0, T 1 ≥ 0, and Trials ≥ T 1. If any of these checks fail, 
3784/// then B reports an invalid argument error (Err:502).
3785/// For the case when T 2 is provided, B checks (after any truncation) that T 1 
3786/// ≥ 0, T 2 ≥ T 1, and Trials ≥ T 2. If any of these checks fail, then B 
3787/// reports an invalid argument error (Err:502).
3788/// 
3789/// Info:
3790/// 
3791/// The formula for B is:
3792/// 
3793/// <math xmlns="http://www.w3.org/1998/Math/MathML"><mstyle 
3794/// displaystyle="true" scriptlevel="0"><mrow><mtext>B</mtext><mo 
3795/// stretchy="false">(</mo><mi>n</mi><mo>;</mo><mstyle scriptlevel="0"><mspace 
3796/// width="mediummathspace"></mspace></mstyle><mi>p</mi><mo>;</mo><mstyle 
3797/// scriptlevel="0"><mspace 
3798/// width="mediummathspace"></mspace></mstyle><mi>k</mi><mn>1</mn><mo>;</mo><mstyle 
3799/// scriptlevel="0"><mspace 
3800/// width="mediummathspace"></mspace></mstyle><mi>k</mi><mn>2</mn><mo 
3801/// stretchy="false">)</mo><mtext>&#xA0;</mtext><mo>=</mo><mtext>&#xA0;</mtext><munderover><mo 
3802/// data-mjx-texclass="OP">&#x2211;</mo><mrow><mi>i</mi><mo>=</mo><mi>k</mi><mn>1</mn></mrow><mrow><mi>k</mi><mn>2</mn></mrow></munderover><mfrac><mrow><mi>n</mi><mo>!</mo></mrow><mrow><mi>i</mi><mo>!</mo><mo 
3803/// stretchy="false">(</mo><mi>n</mi><mo>&#x2212;</mo><mi>i</mi><mo 
3804/// stretchy="false">)</mo><mo>!</mo></mrow></mfrac><mstyle 
3805/// scriptlevel="0"><mspace 
3806/// width="mediummathspace"></mspace></mstyle><mo>&#xD7;</mo><mstyle 
3807/// scriptlevel="0"><mspace 
3808/// width="mediummathspace"></mspace></mstyle><msup><mi>p</mi><mrow><mi>i</mi></mrow></msup><mstyle 
3809/// scriptlevel="0"><mspace 
3810/// width="mediummathspace"></mspace></mstyle><mo>&#xD7;</mo><mstyle 
3811/// scriptlevel="0"><mspace width="mediummathspace"></mspace></mstyle><mo 
3812/// stretchy="false">(</mo><mn>1</mn><mo>&#x2212;</mo><mi>p</mi><msup><mo 
3813/// stretchy="false">)</mo><mrow><mi>n</mi><mo>&#x2212;</mo><mi>i</mi></mrow></msup></mrow></mstyle></math>
3814/// 
3815/// If the final argument (T 2) is omitted, then set k2 to the value of k1 in 
3816/// this equation, effectively removing the summation operation.
3817///
3818/// __See also__: [crate::of::b_()], 
3819#[inline]
3820pub fn b<A: Number, B: Number, C: Number>(trials: A, s_p: B, t_1: C) -> FnNumber3<A, B, C> {
3821    FnNumber3("B", trials, s_p, t_1)
3822}
3823
3824/// Uses the probability mass function of the binomial distribution to 
3825/// calculate the probability of a specific number of successful trial 
3826/// outcomes, or a range of successful trial outcomes. The binomial 
3827/// distribution is a discrete probability distribution that is used to analyze 
3828/// data in many domains.
3829///
3830/// [documentfoundation->B](https://wiki.documentfoundation.org/Documentation/Calc_Functions/B)
3831///
3832/// __Syntax__: 
3833/// ```ods
3834///     B( Trials: Integer; SP: Number; T_1: Integer; T_2: Integer )
3835/// ```
3836///
3837/// __Info2__:
3838/// Returns a real number in the range [0, 1], which is the probability for the 
3839/// given arguments.
3840///
3841/// __Semantics__:
3842/// 
3843/// Trials is a non-negative integer, or a reference to a cell containing that 
3844/// integer, that is the total number of independent trials.
3845/// 
3846/// SP is a real number (expressed as a percentage, such as 2.5%, or a decimal 
3847/// fraction, such as 0.025), or a reference to a cell containing that number, 
3848/// that is the probability of a successful outcome on each trial. As a 
3849/// probability, SP lies in the range [0, 1] (or equivalently 0% ≤ SP ≤ 
3850/// 100%).
3851/// 
3852/// T 1 is a non-negative integer, or a reference to a cell containing that 
3853/// integer, that specifies the lower limit for the number of successful 
3854/// trials.
3855/// 
3856/// T 2 is a non-negative integer, or a reference to a cell containing that 
3857/// integer, that specifies the upper limit for the number of successful 
3858/// trials. If T 2 is omitted, the function calculates the probability that the 
3859/// number of successful trials shall be exactly T 1. If T 2 is provided, the 
3860/// function calculates the probability that the number of successful trials 
3861/// shall lie between T 1 and T 2 inclusive.
3862/// 
3863/// If any of Trials, SP, T 1, and T 2 is non-numeric, then B reports a #VALUE! 
3864/// error.
3865/// If any of Trials, T 1, and T 2 is a non-integer value, then B truncates it 
3866/// to an integer value.
3867/// If SP is less than 0.0 or greater than 1.0, then B reports an invalid 
3868/// argument error (Err:502).
3869/// For the case when T 2 is omitted, B checks (after any truncation) that 
3870/// Trials ≥ 0, T 1 ≥ 0, and Trials ≥ T 1. If any of these checks fail, 
3871/// then B reports an invalid argument error (Err:502).
3872/// For the case when T 2 is provided, B checks (after any truncation) that T 1 
3873/// ≥ 0, T 2 ≥ T 1, and Trials ≥ T 2. If any of these checks fail, then B 
3874/// reports an invalid argument error (Err:502).
3875/// 
3876/// Info:
3877/// 
3878/// The formula for B is:
3879/// 
3880/// <math xmlns="http://www.w3.org/1998/Math/MathML"><mstyle 
3881/// displaystyle="true" scriptlevel="0"><mrow><mtext>B</mtext><mo 
3882/// stretchy="false">(</mo><mi>n</mi><mo>;</mo><mstyle scriptlevel="0"><mspace 
3883/// width="mediummathspace"></mspace></mstyle><mi>p</mi><mo>;</mo><mstyle 
3884/// scriptlevel="0"><mspace 
3885/// width="mediummathspace"></mspace></mstyle><mi>k</mi><mn>1</mn><mo>;</mo><mstyle 
3886/// scriptlevel="0"><mspace 
3887/// width="mediummathspace"></mspace></mstyle><mi>k</mi><mn>2</mn><mo 
3888/// stretchy="false">)</mo><mtext>&#xA0;</mtext><mo>=</mo><mtext>&#xA0;</mtext><munderover><mo 
3889/// data-mjx-texclass="OP">&#x2211;</mo><mrow><mi>i</mi><mo>=</mo><mi>k</mi><mn>1</mn></mrow><mrow><mi>k</mi><mn>2</mn></mrow></munderover><mfrac><mrow><mi>n</mi><mo>!</mo></mrow><mrow><mi>i</mi><mo>!</mo><mo 
3890/// stretchy="false">(</mo><mi>n</mi><mo>&#x2212;</mo><mi>i</mi><mo 
3891/// stretchy="false">)</mo><mo>!</mo></mrow></mfrac><mstyle 
3892/// scriptlevel="0"><mspace 
3893/// width="mediummathspace"></mspace></mstyle><mo>&#xD7;</mo><mstyle 
3894/// scriptlevel="0"><mspace 
3895/// width="mediummathspace"></mspace></mstyle><msup><mi>p</mi><mrow><mi>i</mi></mrow></msup><mstyle 
3896/// scriptlevel="0"><mspace 
3897/// width="mediummathspace"></mspace></mstyle><mo>&#xD7;</mo><mstyle 
3898/// scriptlevel="0"><mspace width="mediummathspace"></mspace></mstyle><mo 
3899/// stretchy="false">(</mo><mn>1</mn><mo>&#x2212;</mo><mi>p</mi><msup><mo 
3900/// stretchy="false">)</mo><mrow><mi>n</mi><mo>&#x2212;</mo><mi>i</mi></mrow></msup></mrow></mstyle></math>
3901/// 
3902/// If the final argument (T 2) is omitted, then set k2 to the value of k1 in 
3903/// this equation, effectively removing the summation operation.
3904///
3905/// __See also__: [crate::of::b()], 
3906#[inline]
3907pub fn b_<A: Number, B: Number, C: Number, D: Number>(trials: A, s_p: B, t_1: C, t_2: D) -> FnNumber4<A, B, C, D> {
3908    FnNumber4("B", trials, s_p, t_1, t_2)
3909}
3910
3911/// Calculates beta distribution values from either the probability density 
3912/// function or the cumulative distribution function.
3913/// 
3914/// The beta distribution is a family of continuous probability distributions 
3915/// that can be used to model random variables that lie within finite bounds. 
3916/// The distribution has two characteristic positive real numbers, usually 
3917/// denoted as alpha (α) and beta (β), that control its shape. In many cases 
3918/// the beta distribution is defined on the range [0, 1] but in the more 
3919/// general case can be defined on a range [a, b], where a and b are the lower 
3920/// and upper bounds of the distribution (a < b).
3921///
3922/// [documentfoundation->BETA.DIST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/BETA.DIST)
3923///
3924/// __Syntax__: 
3925/// ```ods
3926///     BETA.DIST( Number: Number; Alpha: Number; Beta: Number; Cumulative: Logical )
3927/// ```
3928///
3929/// __Info2__:
3930/// Returns a non-negative real number, which is the beta distribution value 
3931/// for the given arguments. For the probability density function, the value 
3932/// returned lies in the range [0, +∞). For the cumulative distribution 
3933/// function, the value returned lies in the range [0, 1].
3934///
3935/// __Semantics__:
3936/// 
3937/// Number is a real number, or a reference to a cell containing that number, 
3938/// which is the value of the random variable that is to be used in the 
3939/// calculation. Number must lie in the range [Start, End].
3940/// 
3941/// Alpha is a positive real number, or a reference to a cell containing that 
3942/// number, which is the value of one of the two parameters that control the 
3943/// shape of the beta distribution.
3944/// 
3945/// Beta is a positive real number, or a reference to a cell containing that 
3946/// number, which is the value of the second of the two parameters that control 
3947/// the shape of the beta distribution.
3948/// 
3949/// Cumulative is a logical value, or a reference to a cell containing that 
3950/// value, that determines whether the required probability is taken from the 
3951/// probability density function or the cumulative distribution function. If 
3952/// Cumulative is set to 0 or FALSE, a value from the probability density 
3953/// function is calculated. For any other values of Cumulative, a value from 
3954/// the cumulative distribution function is calculated.
3955/// 
3956/// Start is a real number, or a reference to a cell containing that number, 
3957/// which is the lower bound of the distribution. If omitted, the default value 
3958/// of 0.0 is used.
3959/// 
3960/// End is a real number, or a reference to a cell containing that number, 
3961/// which is the upper bound of the distribution. If omitted, the default value 
3962/// of 1.0 is used.
3963/// 
3964/// If any of Number, Alpha, Beta, Start, or End is non-numeric, then BETA.DIST 
3965/// reports a #VALUE! error.
3966/// If either Alpha or Beta is less than or equal to 0.0, then BETA.DIST 
3967/// reports an invalid argument error (Err:502).
3968/// If Number is less than Start or greater than End, then BETA.DIST reports an 
3969/// invalid argument error (Err:502).
3970/// Other errors may arise depending on the exact combination of values passed 
3971/// as arguments to BETA.DIST.
3972/// 
3973/// Additional details:
3974/// 
3975/// Calc's BETADIST and BETA.DIST functions perform similar calculations. 
3976/// However, there are differences between the two functions with respect to 
3977/// the order of their arguments and the conditions placed on argument values. 
3978/// The requirements for BETADIST are specified in ODF 1.2; BETA.DIST is 
3979/// provided for interoperability with Microsoft Excel.
3980///
3981/// __See also__: [crate::of::beta_dist_()], [crate::of::beta_dist__()], 
3982#[inline]
3983pub fn beta_dist<A: Number, B: Number, C: Number, D: Logical>(number: A, alpha: B, beta: C, cumulative: D) -> FnNumber4<A, B, C, D> {
3984    FnNumber4("BETA.DIST", number, alpha, beta, cumulative)
3985}
3986
3987/// Calculates beta distribution values from either the probability density 
3988/// function or the cumulative distribution function.
3989/// 
3990/// The beta distribution is a family of continuous probability distributions 
3991/// that can be used to model random variables that lie within finite bounds. 
3992/// The distribution has two characteristic positive real numbers, usually 
3993/// denoted as alpha (α) and beta (β), that control its shape. In many cases 
3994/// the beta distribution is defined on the range [0, 1] but in the more 
3995/// general case can be defined on a range [a, b], where a and b are the lower 
3996/// and upper bounds of the distribution (a < b).
3997///
3998/// [documentfoundation->BETA.DIST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/BETA.DIST)
3999///
4000/// __Syntax__: 
4001/// ```ods
4002///     BETA.DIST( Number: Number; Alpha: Number; Beta: Number; Cumulative: Logical; Start: Number )
4003/// ```
4004///
4005/// __Info2__:
4006/// Returns a non-negative real number, which is the beta distribution value 
4007/// for the given arguments. For the probability density function, the value 
4008/// returned lies in the range [0, +∞). For the cumulative distribution 
4009/// function, the value returned lies in the range [0, 1].
4010///
4011/// __Semantics__:
4012/// 
4013/// Number is a real number, or a reference to a cell containing that number, 
4014/// which is the value of the random variable that is to be used in the 
4015/// calculation. Number must lie in the range [Start, End].
4016/// 
4017/// Alpha is a positive real number, or a reference to a cell containing that 
4018/// number, which is the value of one of the two parameters that control the 
4019/// shape of the beta distribution.
4020/// 
4021/// Beta is a positive real number, or a reference to a cell containing that 
4022/// number, which is the value of the second of the two parameters that control 
4023/// the shape of the beta distribution.
4024/// 
4025/// Cumulative is a logical value, or a reference to a cell containing that 
4026/// value, that determines whether the required probability is taken from the 
4027/// probability density function or the cumulative distribution function. If 
4028/// Cumulative is set to 0 or FALSE, a value from the probability density 
4029/// function is calculated. For any other values of Cumulative, a value from 
4030/// the cumulative distribution function is calculated.
4031/// 
4032/// Start is a real number, or a reference to a cell containing that number, 
4033/// which is the lower bound of the distribution. If omitted, the default value 
4034/// of 0.0 is used.
4035/// 
4036/// End is a real number, or a reference to a cell containing that number, 
4037/// which is the upper bound of the distribution. If omitted, the default value 
4038/// of 1.0 is used.
4039/// 
4040/// If any of Number, Alpha, Beta, Start, or End is non-numeric, then BETA.DIST 
4041/// reports a #VALUE! error.
4042/// If either Alpha or Beta is less than or equal to 0.0, then BETA.DIST 
4043/// reports an invalid argument error (Err:502).
4044/// If Number is less than Start or greater than End, then BETA.DIST reports an 
4045/// invalid argument error (Err:502).
4046/// Other errors may arise depending on the exact combination of values passed 
4047/// as arguments to BETA.DIST.
4048/// 
4049/// Additional details:
4050/// 
4051/// Calc's BETADIST and BETA.DIST functions perform similar calculations. 
4052/// However, there are differences between the two functions with respect to 
4053/// the order of their arguments and the conditions placed on argument values. 
4054/// The requirements for BETADIST are specified in ODF 1.2; BETA.DIST is 
4055/// provided for interoperability with Microsoft Excel.
4056///
4057/// __See also__: [crate::of::beta_dist()], [crate::of::beta_dist__()], 
4058#[inline]
4059pub fn beta_dist_<A: Number, B: Number, C: Number, D: Logical, E: Number>(number: A, alpha: B, beta: C, cumulative: D, start: E) -> FnNumber5<A, B, C, D, E> {
4060    FnNumber5("BETA.DIST", number, alpha, beta, cumulative, start)
4061}
4062
4063/// Calculates beta distribution values from either the probability density 
4064/// function or the cumulative distribution function.
4065/// 
4066/// The beta distribution is a family of continuous probability distributions 
4067/// that can be used to model random variables that lie within finite bounds. 
4068/// The distribution has two characteristic positive real numbers, usually 
4069/// denoted as alpha (α) and beta (β), that control its shape. In many cases 
4070/// the beta distribution is defined on the range [0, 1] but in the more 
4071/// general case can be defined on a range [a, b], where a and b are the lower 
4072/// and upper bounds of the distribution (a < b).
4073///
4074/// [documentfoundation->BETA.DIST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/BETA.DIST)
4075///
4076/// __Syntax__: 
4077/// ```ods
4078///     BETA.DIST( Number: Number; Alpha: Number; Beta: Number; Cumulative: Logical; Start: Number; End: Number )
4079/// ```
4080///
4081/// __Info2__:
4082/// Returns a non-negative real number, which is the beta distribution value 
4083/// for the given arguments. For the probability density function, the value 
4084/// returned lies in the range [0, +∞). For the cumulative distribution 
4085/// function, the value returned lies in the range [0, 1].
4086///
4087/// __Semantics__:
4088/// 
4089/// Number is a real number, or a reference to a cell containing that number, 
4090/// which is the value of the random variable that is to be used in the 
4091/// calculation. Number must lie in the range [Start, End].
4092/// 
4093/// Alpha is a positive real number, or a reference to a cell containing that 
4094/// number, which is the value of one of the two parameters that control the 
4095/// shape of the beta distribution.
4096/// 
4097/// Beta is a positive real number, or a reference to a cell containing that 
4098/// number, which is the value of the second of the two parameters that control 
4099/// the shape of the beta distribution.
4100/// 
4101/// Cumulative is a logical value, or a reference to a cell containing that 
4102/// value, that determines whether the required probability is taken from the 
4103/// probability density function or the cumulative distribution function. If 
4104/// Cumulative is set to 0 or FALSE, a value from the probability density 
4105/// function is calculated. For any other values of Cumulative, a value from 
4106/// the cumulative distribution function is calculated.
4107/// 
4108/// Start is a real number, or a reference to a cell containing that number, 
4109/// which is the lower bound of the distribution. If omitted, the default value 
4110/// of 0.0 is used.
4111/// 
4112/// End is a real number, or a reference to a cell containing that number, 
4113/// which is the upper bound of the distribution. If omitted, the default value 
4114/// of 1.0 is used.
4115/// 
4116/// If any of Number, Alpha, Beta, Start, or End is non-numeric, then BETA.DIST 
4117/// reports a #VALUE! error.
4118/// If either Alpha or Beta is less than or equal to 0.0, then BETA.DIST 
4119/// reports an invalid argument error (Err:502).
4120/// If Number is less than Start or greater than End, then BETA.DIST reports an 
4121/// invalid argument error (Err:502).
4122/// Other errors may arise depending on the exact combination of values passed 
4123/// as arguments to BETA.DIST.
4124/// 
4125/// Additional details:
4126/// 
4127/// Calc's BETADIST and BETA.DIST functions perform similar calculations. 
4128/// However, there are differences between the two functions with respect to 
4129/// the order of their arguments and the conditions placed on argument values. 
4130/// The requirements for BETADIST are specified in ODF 1.2; BETA.DIST is 
4131/// provided for interoperability with Microsoft Excel.
4132///
4133/// __See also__: [crate::of::beta_dist()], [crate::of::beta_dist_()], 
4134#[inline]
4135pub fn beta_dist__<A: Number, B: Number, C: Number, D: Logical, E: Number, F: Number>(number: A, alpha: B, beta: C, cumulative: D, start: E, end: F) -> FnNumber6<A, B, C, D, E, F> {
4136    FnNumber6("BETA.DIST", number, alpha, beta, cumulative, start, end)
4137}
4138
4139/// Calculates the inverse of the cumulative distribution function for a beta 
4140/// distribution.
4141/// 
4142/// The beta distribution is a family of continuous probability distributions 
4143/// that can be used to model random variables that lie within finite bounds. 
4144/// The distribution has two characteristic positive real numbers, usually 
4145/// denoted as alpha (α) and beta (β), that control its shape. In many cases 
4146/// the beta distribution is defined on the range [0, 1] but in the more 
4147/// general case can be defined on a range [a, b], where a and b are the lower 
4148/// and upper bounds of the distribution (a < b).
4149///
4150/// [documentfoundation->BETA.INV](https://wiki.documentfoundation.org/Documentation/Calc_Functions/BETA.INV)
4151///
4152/// __Syntax__: 
4153/// ```ods
4154///     BETA.INV( Number: Number; Alpha: Number; Beta: Number )
4155/// ```
4156///
4157/// __Info2__:
4158/// Returns a real number, which is the value of the random variable that would 
4159/// give the specified probability in the cumulative distribution function for 
4160/// the specified beta distribution. The returned value will lie within the 
4161/// defined range of the distribution.
4162///
4163/// __Semantics__:
4164/// 
4165/// Number is a real number, or a reference to a cell containing that number, 
4166/// which is a probability in the cumulative distribution function of the beta 
4167/// distribution function. Number lies in the range [0, 1].
4168/// 
4169/// Alpha is a positive real number, or a reference to a cell containing that 
4170/// number, which is the value of one of the two parameters that control the 
4171/// shape of the beta distribution.
4172/// 
4173/// Beta is a positive real number, or a reference to a cell containing that 
4174/// number, which is the value of the second of the two parameters that control 
4175/// the shape of the beta distribution.
4176/// 
4177/// Start is a real number, or a reference to a cell containing that number, 
4178/// which is the lower bound of the distribution. If omitted, the default value 
4179/// of 0.0 is used.
4180/// 
4181/// End is a real number, or a reference to a cell containing that number, 
4182/// which is the upper bound of the distribution. If omitted, the default value 
4183/// of 1.0 is used.
4184/// 
4185/// If any of Number, Alpha, Beta, Start, or End is non-numeric, then BETA.INV 
4186/// reports a #VALUE! error.
4187/// If either Alpha or Beta is less than or equal to 0.0, then BETA.INV reports 
4188/// an invalid argument error (Err:502).
4189/// If Number is less than 0.0 or greater than 1.0, then BETA.INV reports an 
4190/// invalid argument error (Err:502).
4191/// If Start is greater than or equal to End, then BETA.INV reports an invalid 
4192/// argument error (Err:502).
4193/// 
4194/// Info:
4195/// 
4196/// Calc's BETAINV and BETA.INV functions perform the same calculations. The 
4197/// requirements for BETAINV are specified in ODF 1.2; BETA.INV is provided for 
4198/// interoperability with Microsoft Excel.
4199///
4200/// __See also__: [crate::of::beta_inv_()], [crate::of::beta_inv__()], 
4201#[inline]
4202pub fn beta_inv<A: Number, B: Number, C: Number>(number: A, alpha: B, beta: C) -> FnNumber3<A, B, C> {
4203    FnNumber3("BETA.INV", number, alpha, beta)
4204}
4205
4206/// Calculates the inverse of the cumulative distribution function for a beta 
4207/// distribution.
4208/// 
4209/// The beta distribution is a family of continuous probability distributions 
4210/// that can be used to model random variables that lie within finite bounds. 
4211/// The distribution has two characteristic positive real numbers, usually 
4212/// denoted as alpha (α) and beta (β), that control its shape. In many cases 
4213/// the beta distribution is defined on the range [0, 1] but in the more 
4214/// general case can be defined on a range [a, b], where a and b are the lower 
4215/// and upper bounds of the distribution (a < b).
4216///
4217/// [documentfoundation->BETA.INV](https://wiki.documentfoundation.org/Documentation/Calc_Functions/BETA.INV)
4218///
4219/// __Syntax__: 
4220/// ```ods
4221///     BETA.INV( Number: Number; Alpha: Number; Beta: Number; Start: Number )
4222/// ```
4223///
4224/// __Info2__:
4225/// Returns a real number, which is the value of the random variable that would 
4226/// give the specified probability in the cumulative distribution function for 
4227/// the specified beta distribution. The returned value will lie within the 
4228/// defined range of the distribution.
4229///
4230/// __Semantics__:
4231/// 
4232/// Number is a real number, or a reference to a cell containing that number, 
4233/// which is a probability in the cumulative distribution function of the beta 
4234/// distribution function. Number lies in the range [0, 1].
4235/// 
4236/// Alpha is a positive real number, or a reference to a cell containing that 
4237/// number, which is the value of one of the two parameters that control the 
4238/// shape of the beta distribution.
4239/// 
4240/// Beta is a positive real number, or a reference to a cell containing that 
4241/// number, which is the value of the second of the two parameters that control 
4242/// the shape of the beta distribution.
4243/// 
4244/// Start is a real number, or a reference to a cell containing that number, 
4245/// which is the lower bound of the distribution. If omitted, the default value 
4246/// of 0.0 is used.
4247/// 
4248/// End is a real number, or a reference to a cell containing that number, 
4249/// which is the upper bound of the distribution. If omitted, the default value 
4250/// of 1.0 is used.
4251/// 
4252/// If any of Number, Alpha, Beta, Start, or End is non-numeric, then BETA.INV 
4253/// reports a #VALUE! error.
4254/// If either Alpha or Beta is less than or equal to 0.0, then BETA.INV reports 
4255/// an invalid argument error (Err:502).
4256/// If Number is less than 0.0 or greater than 1.0, then BETA.INV reports an 
4257/// invalid argument error (Err:502).
4258/// If Start is greater than or equal to End, then BETA.INV reports an invalid 
4259/// argument error (Err:502).
4260/// 
4261/// Info:
4262/// 
4263/// Calc's BETAINV and BETA.INV functions perform the same calculations. The 
4264/// requirements for BETAINV are specified in ODF 1.2; BETA.INV is provided for 
4265/// interoperability with Microsoft Excel.
4266///
4267/// __See also__: [crate::of::beta_inv()], [crate::of::beta_inv__()], 
4268#[inline]
4269pub fn beta_inv_<A: Number, B: Number, C: Number, D: Number>(number: A, alpha: B, beta: C, start: D) -> FnNumber4<A, B, C, D> {
4270    FnNumber4("BETA.INV", number, alpha, beta, start)
4271}
4272
4273/// Calculates the inverse of the cumulative distribution function for a beta 
4274/// distribution.
4275/// 
4276/// The beta distribution is a family of continuous probability distributions 
4277/// that can be used to model random variables that lie within finite bounds. 
4278/// The distribution has two characteristic positive real numbers, usually 
4279/// denoted as alpha (α) and beta (β), that control its shape. In many cases 
4280/// the beta distribution is defined on the range [0, 1] but in the more 
4281/// general case can be defined on a range [a, b], where a and b are the lower 
4282/// and upper bounds of the distribution (a < b).
4283///
4284/// [documentfoundation->BETA.INV](https://wiki.documentfoundation.org/Documentation/Calc_Functions/BETA.INV)
4285///
4286/// __Syntax__: 
4287/// ```ods
4288///     BETA.INV( Number: Number; Alpha: Number; Beta: Number; Start: Number; End: Number )
4289/// ```
4290///
4291/// __Info2__:
4292/// Returns a real number, which is the value of the random variable that would 
4293/// give the specified probability in the cumulative distribution function for 
4294/// the specified beta distribution. The returned value will lie within the 
4295/// defined range of the distribution.
4296///
4297/// __Semantics__:
4298/// 
4299/// Number is a real number, or a reference to a cell containing that number, 
4300/// which is a probability in the cumulative distribution function of the beta 
4301/// distribution function. Number lies in the range [0, 1].
4302/// 
4303/// Alpha is a positive real number, or a reference to a cell containing that 
4304/// number, which is the value of one of the two parameters that control the 
4305/// shape of the beta distribution.
4306/// 
4307/// Beta is a positive real number, or a reference to a cell containing that 
4308/// number, which is the value of the second of the two parameters that control 
4309/// the shape of the beta distribution.
4310/// 
4311/// Start is a real number, or a reference to a cell containing that number, 
4312/// which is the lower bound of the distribution. If omitted, the default value 
4313/// of 0.0 is used.
4314/// 
4315/// End is a real number, or a reference to a cell containing that number, 
4316/// which is the upper bound of the distribution. If omitted, the default value 
4317/// of 1.0 is used.
4318/// 
4319/// If any of Number, Alpha, Beta, Start, or End is non-numeric, then BETA.INV 
4320/// reports a #VALUE! error.
4321/// If either Alpha or Beta is less than or equal to 0.0, then BETA.INV reports 
4322/// an invalid argument error (Err:502).
4323/// If Number is less than 0.0 or greater than 1.0, then BETA.INV reports an 
4324/// invalid argument error (Err:502).
4325/// If Start is greater than or equal to End, then BETA.INV reports an invalid 
4326/// argument error (Err:502).
4327/// 
4328/// Info:
4329/// 
4330/// Calc's BETAINV and BETA.INV functions perform the same calculations. The 
4331/// requirements for BETAINV are specified in ODF 1.2; BETA.INV is provided for 
4332/// interoperability with Microsoft Excel.
4333///
4334/// __See also__: [crate::of::beta_inv()], [crate::of::beta_inv_()], 
4335#[inline]
4336pub fn beta_inv__<A: Number, B: Number, C: Number, D: Number, E: Number>(number: A, alpha: B, beta: C, start: D, end: E) -> FnNumber5<A, B, C, D, E> {
4337    FnNumber5("BETA.INV", number, alpha, beta, start, end)
4338}
4339
4340/// Calculates binomial distribution probabilities from either the probability 
4341/// mass function or the cumulative distribution function. The binomial 
4342/// distribution is a discrete probability distribution that is used to analyze 
4343/// data in many domains.
4344///
4345/// [documentfoundation->BINOM.DIST](https://wiki.documentfoundation.org/Documentation/Calc_Functions/BINOM.DIST)
4346///
4347/// __Syntax__: 
4348/// ```ods
4349///     BINOM.DIST( X: Integer; Trials: Integer; SP: Number; C: Logical )
4350/// ```
4351///
4352/// __Info2__:
4353/// Returns a real number in the range [0, 1], which is the binomial 
4354/// distribution probability for the given arguments.
4355///
4356/// __Semantics__:
4357/// 
4358/// X is a non-negative integer, or a reference to a cell containing that 
4359/// integer, that is the number of trial successes for which the probability is 
4360/// required.
4361/// 
4362/// Trials is a non-negative integer, or a reference to a cell containing that 
4363/// integer, that is the total number of independent trials.
4364/// 
4365/// SP is a real number (expressed as a percentage, such as 2.5%, or a decimal 
4366/// fraction, such as 0.025), or a reference to a cell containing that number, 
4367/// that is the probability of a successful outcome on each trial. As a 
4368/// probability, SP lies in the range [0, 1] (or equivalently 0% ≤ SP ≤ 
4369/// 100%).
4370/// 
4371/// C is a logical value, or a reference to a cell containing that value, that 
4372/// determines whether the required probability is taken from the probability 
4373/// mass function or the cumulative distribution function. If C is set to 0 or 
4374/// FALSE, a value from the probability mass function is calculated. For any 
4375/// other values of C, a value from the cumulative distribution function is 
4376/// calculated.
4377/// 
4378/// If any of X, Trials, SP, and C is non-numeric, then BINOM.DIST reports a 
4379/// #VALUE! error.
4380/// If either of X or Trials is a non-integer value, then BINOM.DIST truncates 
4381/// it to an integer value.
4382/// If SP is less than 0.0 or greater than 1.0, then BINOM.DIST reports an 
4383/// invalid argument error (Err:502).
4384/// BINOM.DIST checks (after any truncation) that Trials ≥ 0, X ≥ 0, and 
4385/// Trials ≥ X. If any of these checks fail, then BINOM.DIST reports an 
4386/// invalid argument error (Err:502).
4387/// 
4388/// Info:
4389/// 
4390/// Calc's BINOM.DIST and BINOMDIST functions perform the same calculations. 
4391/// The requirements for BINOMDIST are specified in ODF 1.2; BINOM.DIST is 
4392/// provided for interoperability with Microsoft Excel.
4393///
4394/// __See also__: 
4395#[inline]
4396pub fn binom_dist<A: Number, B: Number, C: Number, D: Logical>(x: A, trials: B, s_p: C, c: D) -> FnNumber4<A, B, C, D> {
4397    FnNumber4("BINOM.DIST", x, trials, s_p, c)
4398}
4399
4400/// Given the total number of independent trials and the probability of a 
4401/// successful outcome on each trial, BINOM.INV determines the minimum number 
4402/// of trial successes for which the binomial cumulative density function gives 
4403/// a probability of greater than or equal to a supplied criterion probability.
4404///
4405/// [documentfoundation->BINOM.INV](https://wiki.documentfoundation.org/Documentation/Calc_Functions/BINOM.INV)
4406///
4407/// __Syntax__: 
4408/// ```ods
4409///     BINOM.INV( Trials: Integer; SP: Number; Alpha: Number )
4410/// ```
4411///
4412/// __Info2__:
4413/// Returns a non-negative integer, which is the minimum number of trial 
4414/// successes for the given arguments.
4415///
4416/// __Semantics__:
4417/// 
4418/// Trials is a non-negative integer, or a reference to a cell containing that 
4419/// integer, that is the total number of independent trials.
4420/// 
4421/// SP is a real number (expressed as a percentage, such as 2.5%, or a decimal 
4422/// fraction, such as 0.025), or a reference to a cell containing that number, 
4423/// that is the probability of a successful outcome on each trial. As a 
4424/// probability, SP lies in the range [0, 1] (or equivalently 0% ≤ SP ≤ 
4425/// 100%).
4426/// 
4427/// Alpha is a real number (expressed as a percentage, such as 2.5%, or a 
4428/// decimal fraction, such as 0.025), or a reference to a cell containing that 
4429/// number, that is the criterion probability to be reached or exceeded. As a 
4430/// probability, Alpha lies in the range [0, 1] (or equivalently 0% ≤ Alpha 
4431/// ≤ 100%).
4432/// 
4433/// If any of Trials, SP, and Alpha is non-numeric, then BINOM.INV reports a 
4434/// #VALUE! error.
4435/// If Trials is a non-integer value, then BINOM.INV truncates it to an integer 
4436/// value.
4437/// If Trials is a less than 0, then BINOM.INV reports an invalid argument 
4438/// error (Err:502).
4439/// If either SP or Alpha is less than 0.0 or greater than 1.0, then BINOM.INV 
4440/// reports an invalid argument error (Err:502).
4441/// 
4442/// Info:
4443/// 
4444/// Calc's CRITBINOM and BINOM.INV functions perform the same calculations. The 
4445/// requirements for CRITBINOM are specified in ODF 1.2; BINOM.INV is provided 
4446/// for interoperability with Microsoft Excel.
4447///
4448/// __See also__: 
4449#[inline]
4450pub fn binom_inv<A: Number, B: Number, C: Number>(trials: A, s_p: B, alpha: C) -> FnNumber3<A, B, C> {
4451    FnNumber3("BINOM.INV", trials, s_p, alpha)
4452}