]> gitweb.factorcode.org Git - factor.git/blob - extra/math/extras/extras-docs.factor
math.extras: more maths functions.
[factor.git] / extra / math / extras / extras-docs.factor
1 ! Copyright (C) 2012 John Benediktsson
2 ! See http://factorcode.org/license.txt for BSD license
3
4 USING: help.markup help.syntax math sequences ;
5
6 IN: math.extras
7
8 HELP: bernoulli
9 { $values { "p" integer } { "n" rational } }
10 { $description "Return the Bernoulli number " { $snippet "p" } "." } ;
11
12 HELP: sterling
13 { $values { "n" integer } { "k" integer } { "x" integer } }
14 { $description "Return the Stirling number of the second kind for a set with " { $snippet "n" } " elements partitioned into " { $snippet "k" } " disjoint non-empty sets." } ;
15
16 HELP: chi2
17 { $values { "actual" sequence } { "expected" sequence } { "n" real } }
18 { $description "Return the chi-squared metric between " { $snippet "actual" } " and " { $snippet "expected" } " observations." } ;
19
20 HELP: chi2P
21 { $values { "chi" real } { "df" real } { "p" real } }
22 { $description "Returns the inverse chi-squared value according to " { $snippet "P(chi|df) = P(df/2,chi/2)" } "." } ;
23
24 HELP: bartlett
25 { $values { "n" integer } { "seq" sequence } }
26 { $description "Return the Bartlett window." } ;
27
28 HELP: hanning
29 { $values { "n" integer } { "seq" sequence } }
30 { $description "Return the Hanning window." } ;
31
32 HELP: hamming
33 { $values { "n" integer } { "seq" sequence } }
34 { $description "Return the Hamming window." } ;
35
36 HELP: blackman
37 { $values { "n" integer } { "seq" sequence } }
38 { $description "Return the Blackman window." } ;
39
40 HELP: nan-sum
41 { $values { "seq" sequence } { "n" number } }
42 { $description "Return the " { $link sum } " of " { $snippet "seq" } " treating any NaNs as zero." } ;
43
44 HELP: nan-min
45 { $values { "seq" sequence } { "n" number } }
46 { $description "Return the " { $link infimum } " of " { $snippet "seq" } " ignoring any NaNs." } ;
47
48 HELP: nan-max
49 { $values { "seq" sequence } { "n" number } }
50 { $description "Return the " { $link supremum } " of " { $snippet "seq" } " ignoring any NaNs." } ;
51
52 HELP: sinc
53 { $values { "x" number } { "y" number } }
54 { $description "Returns the " { $link sinc } " function, calculated according to " { $snippet "sin(pi * x) / (pi * x)" } ". The name " { $link sinc } " is short for \"sine cardinal\" or \"sinus cardinalis\"." }
55 { $notes { $snippet "0 sinc" } " is the limit value of 1." } ;