@@ -31,11 +31,13 @@ To print very large numbers - https://github.com/RobTillaart/PrintHelpers
3131- https://github.com/RobTillaart/Correlation
3232- https://github.com/RobTillaart/GST - Golden standard test metrics
3333- https://github.com/RobTillaart/Histogram
34+ - https://github.com/RobTillaart/infiniteAverage
3435- https://github.com/RobTillaart/RunningAngle
3536- https://github.com/RobTillaart/RunningAverage
3637- https://github.com/RobTillaart/RunningMedian
3738- https://github.com/RobTillaart/statHelpers - combinations & permutations
3839- https://github.com/RobTillaart/Statistic
40+ - https://github.com/RobTillaart/Student
3941
4042
4143## Interface
@@ -56,7 +58,8 @@ The limits mentioned is the n for which all k still work.
5658
5759If you need a larger n but k is near 0 the functions will still work.
5860To which value of k the formulas work differs per value for n.
59- No formula found, and build in an overflow detection takes overhead, so that is not done.
61+ No formula found, and to build in an overflow detection takes extra overhead,
62+ so that is not implemented.
6063
6164
6265- ** nextPermutation<Type >(array, size)** given an array of type T it finds the next permutation
@@ -69,7 +72,7 @@ other same code examples exist.
6972
7073- ** uint32_t factorial(n)** exact up to n = 12.
7174- ** uint64_t factorial64(n)** exact up to n = 20. (Print 64 bit integers with my printHelpers)
72- - ** double dfactorial(n)** not exact up to n = 34 ( 4 byte) or n = 170 (8 byte).
75+ - ** double dfactorial(n)** not exact up to n = 34. (double == 4 byte) or n = 170 (double == 8 byte).
7376- ** double stirling(n)** approximation function for factorial (right magnitude).
7477Constant run-time.
7578
@@ -108,12 +111,14 @@ This formula allows to calculate the value of n! indirectly.
108111- ** double dSkipFactorial(uint32_t n, uint32_t skip)**
109112
110113SkipFactorials are like factorials and semiFactorials but they skip ** skip** numbers.
114+ Thus skipFactorial(n, 2) is the same as semiFactorial(n).
115+
111116- ** skipFactorial(12, 4)** = 12 x 8 x 4 = 384
112117- ** skipFactorial(17, 5)** = 17 x 12 x 7 x 2 = 2856
113118- ** skipFactorial(n, 1)** == ** factorial(n)**
114119- ** skipFactorial(n, 2)** == ** semiFactorial(n)**
115120
116- As the maximum depends on both n and step sizze there is no single maximum for n.
121+ As the maximum depends on both n and step size there is no single maximum for n.
117122This is similar to combinations and permutations.
118123
119124An indicative table of maxima per function call, the larger the skip, the larger the maximum n.
@@ -127,6 +132,7 @@ Note that for skip <= 10 n still is an 8 bit number.
127132| dSkipFactorial | 300 | | | | | double (8 bytes)
128133
129134Note that for the function the ** max / skip** is decreasing when ** skip grows** .
135+ Expectation is that ** max** roughly doubles when ** skip** doubles (to be investigated).
130136
131137
132138### Combinations
@@ -148,20 +154,20 @@ No formula found, and build in an overflow detection takes overhead, so that is
148154
149155
150156- ** combPascal(n, k)** n = 0 .. 30 but due to double recursion per iteration it takes
151- time and a lot of it for larger values. Added for recreational purposes, limited tested .
152- Uses Pascal's triangle.
157+ time and a lot of it for larger values. Added for recreational / educational purposes .
158+ The function is only tested for small values. Uses Pascal's triangle.
153159
154160
155161## Notes
156162
157- - ** perm1** is a sketch in the examples that shows a recursive permutation algorithm.
163+ - ** perm1.ino ** is a sketch in the examples that shows a recursive permutation algorithm.
158164It generates all permutations of a given char string and allows you to process every instance.
159165This sketch is added to this library as it fits in the context.
160166
161167
162168## Experimental
163169
164- #### 32 bit numbers
170+ ### 32 bit numbers
165171
166172- ** void bigFactorial(uint32_t n, double &mantissa, uint32_t &exponent)**
167173returns a double mantissa between 0 and 10, and an integer exponent.
@@ -184,7 +190,7 @@ Not investigated what its maximum value is, but it should be higher than **51867
184190of combinations is always smaller than number of permutations.
185191
186192
187- #### 64 bit numbers- not investigated
193+ ### 64 bit numbers- not investigated
188194
189195To have support for huge numbers one could upgrade the code to use uint64_t as parameter and
190196internally but calculating these values could take a lot of time, although ** bigPermutations64(n, k)**
0 commit comments