@sheetxl/formulas 0.8.0-beta.1 → 0.8.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/README.md +15 -22
  2. package/browser/cjs/B6vy56yEA1I3B74O.cjs +1 -0
  3. package/browser/cjs/BcROQ4pvVajDQ1em.cjs +1 -0
  4. package/browser/cjs/{CRx1WvmgBjT8WVyB.cjs → C0g87ndP2zMUbX6f.cjs} +1 -1
  5. package/browser/cjs/C9q3zr8iCIoYDrdA.cjs +1 -0
  6. package/browser/cjs/CVHc_cJddJk7J3Zt.cjs +1 -0
  7. package/browser/cjs/{EeOVMRq7TuptFKTc.cjs → DF4l8xrxkcLkgExp.cjs} +1 -1
  8. package/browser/cjs/{Du4jBiFxRIF1OjD4.cjs → Dtxj9JR14A-uliu5.cjs} +1 -1
  9. package/browser/cjs/{CpJJh4UnFl1_qFui.cjs → Dx7GQ4ALtNG3kshu.cjs} +1 -1
  10. package/browser/cjs/index.cjs +1 -1
  11. package/{node/esm/Crb70T1Sp1S4uzq4.mjs → browser/esm/2fdplP7jj4bf9aCO.mjs} +2 -2
  12. package/browser/esm/{Bsb5i9Jq-Q8RTmvi.mjs → B7oeajl5_4jZhg1U.mjs} +1 -1
  13. package/browser/esm/{C7mAHEhFYDwSEU6O.mjs → BHET8V48YsNHt6OQ.mjs} +1 -1
  14. package/browser/esm/{DKFABgVKeBMflym9.mjs → BTdrlwsC44d78M6y.mjs} +1 -1
  15. package/browser/esm/{DtqLXxtPFISlNoUd.mjs → Bn3FsWESsJTzyaf4.mjs} +1 -1
  16. package/{node/esm/CCGjvL3YYwY09qF-.mjs → browser/esm/Bo7Cdsg6xFJcfM2I.mjs} +1 -1
  17. package/{node/esm/D2miaIrotHbpdWei.mjs → browser/esm/C-oFWt8pnPP-GVRA.mjs} +1 -1
  18. package/{node/esm/CkG4LZN-kb7plKXG.mjs → browser/esm/C5BfcrpiUcRVOBhm.mjs} +69 -4
  19. package/{node/esm/C9jpXFBeugwmOTbx.mjs → browser/esm/CCVWnizQrKmoAuCq.mjs} +2 -2
  20. package/browser/esm/{B7750ljsJF3qA9kU.mjs → COY1_1oXpyxOqH8F.mjs} +37 -3
  21. package/{node/esm/CG1Fn8D-2DrQZoD5.mjs → browser/esm/COxwtE73KoR2iWjR.mjs} +1 -1
  22. package/{node/esm/HgVmqQQhKQ_2v0HD.mjs → browser/esm/CiV3-7Z2N5XTPGpW.mjs} +2 -2
  23. package/{node/esm/CWAtVXxcIz86XLzE.mjs → browser/esm/Cvqs42hxCdRyGkOU.mjs} +1 -1
  24. package/browser/esm/{BYRjnggsufwbb27W.mjs → CyZAJHWFmctZ67Gr.mjs} +1 -1
  25. package/browser/esm/{-f-RKKojiLg94hp9.mjs → D0bH0XCUaTcJPN0I.mjs} +51 -11
  26. package/{node/esm/BzNFsi4RXuJrn_1n.mjs → browser/esm/D47uFhCNkVeulQHC.mjs} +1 -1
  27. package/{node/esm/Ct1gudv1TKk-5FMO.mjs → browser/esm/DFmMjSD0S1dmLV9j.mjs} +48 -2
  28. package/browser/esm/{B3pEie3jQN0SvV5B.mjs → DQFv41Ho5OgGtsO6.mjs} +1 -1
  29. package/browser/esm/{BR2ai1V5dGPphpRf.mjs → DZQP6n94wjUf7gh-.mjs} +2 -5
  30. package/browser/esm/{Cdl7ZalV6WPZHHRE.mjs → dInAtbi5okqOaY-T.mjs} +1 -1
  31. package/browser/esm/index.mjs +4863 -5072
  32. package/browser/esm/{Cyvobf2wi0quDD3U.mjs → jigjASYVbU6Fnqi2.mjs} +1 -1
  33. package/browser/esm/{CltdofO5ik8g_wQ8.mjs → lGpYdO1T9FmC6pk7.mjs} +1 -1
  34. package/browser/esm/{BM1YhvA2ppUZ3QLB.mjs → o_58F5W4flwhkBQc.mjs} +1 -1
  35. package/browser/esm/{CVv3DuciDQrnFFeu.mjs → vtj_jhVSTyj6cY8v.mjs} +1 -1
  36. package/browser/esm/{0amsHACCOHE_JjXI.mjs → y5kSs5KEnqsOSkuQ.mjs} +1 -1
  37. package/licenses/dependencies.txt +0 -33
  38. package/node/esm/{DxRD19RVMzj2YvKF.mjs → 2KrV5IunXEqYRPKJ.mjs} +1 -1
  39. package/{browser/esm/Crb70T1Sp1S4uzq4.mjs → node/esm/2fdplP7jj4bf9aCO.mjs} +2 -2
  40. package/{browser/esm/Ct1gudv1TKk-5FMO.mjs → node/esm/B8Q2nBHA3421d2De.mjs} +48 -2
  41. package/node/esm/{C7mAHEhFYDwSEU6O.mjs → BHET8V48YsNHt6OQ.mjs} +1 -1
  42. package/node/esm/{DKFABgVKeBMflym9.mjs → BTdrlwsC44d78M6y.mjs} +1 -1
  43. package/node/esm/{DtqLXxtPFISlNoUd.mjs → Bn3FsWESsJTzyaf4.mjs} +1 -1
  44. package/{browser/esm/CCGjvL3YYwY09qF-.mjs → node/esm/Bo7Cdsg6xFJcfM2I.mjs} +1 -1
  45. package/node/esm/{ZUay0bTGgyrF8e04.mjs → Bx-wAScb1XcOsbcE.mjs} +1 -1
  46. package/{browser/esm/D2miaIrotHbpdWei.mjs → node/esm/C-oFWt8pnPP-GVRA.mjs} +1 -1
  47. package/{browser/esm/CkG4LZN-kb7plKXG.mjs → node/esm/C5BfcrpiUcRVOBhm.mjs} +69 -4
  48. package/{browser/esm/C9jpXFBeugwmOTbx.mjs → node/esm/CCVWnizQrKmoAuCq.mjs} +2 -2
  49. package/node/esm/{B7750ljsJF3qA9kU.mjs → COY1_1oXpyxOqH8F.mjs} +37 -3
  50. package/{browser/esm/CG1Fn8D-2DrQZoD5.mjs → node/esm/COxwtE73KoR2iWjR.mjs} +1 -1
  51. package/{browser/esm/HgVmqQQhKQ_2v0HD.mjs → node/esm/CiV3-7Z2N5XTPGpW.mjs} +2 -2
  52. package/node/esm/{DDajoVNkJB39_Fkx.mjs → CqHyaF_3jzclX-4h.mjs} +1 -1
  53. package/{browser/esm/CWAtVXxcIz86XLzE.mjs → node/esm/Cvqs42hxCdRyGkOU.mjs} +1 -1
  54. package/{browser/esm/BzNFsi4RXuJrn_1n.mjs → node/esm/D47uFhCNkVeulQHC.mjs} +1 -1
  55. package/node/esm/{B8rSUcOwH6g4MUgm.mjs → DEvaxgU5D42eGtON.mjs} +1 -1
  56. package/node/esm/{BR2ai1V5dGPphpRf.mjs → DZQP6n94wjUf7gh-.mjs} +2 -5
  57. package/node/esm/{Cdl7ZalV6WPZHHRE.mjs → dInAtbi5okqOaY-T.mjs} +1 -1
  58. package/node/esm/index.mjs +5525 -3899
  59. package/node/esm/{-f-RKKojiLg94hp9.mjs → jVWpjaeDtzGmzWIs.mjs} +51 -11
  60. package/node/esm/{Cyvobf2wi0quDD3U.mjs → jigjASYVbU6Fnqi2.mjs} +1 -1
  61. package/node/esm/{CltdofO5ik8g_wQ8.mjs → lGpYdO1T9FmC6pk7.mjs} +1 -1
  62. package/node/esm/{2TCIoMd-SYs6i4-N.mjs → ly86gfj1I6wMAUqu.mjs} +1 -1
  63. package/node/esm/{CVv3DuciDQrnFFeu.mjs → vtj_jhVSTyj6cY8v.mjs} +1 -1
  64. package/package.json +4 -5
  65. package/types/src/.generated/decl/dateTime/Date.decl.d.ts +2 -1
  66. package/types/src/.generated/decl/information/Information.decl.d.ts +2 -1
  67. package/types/src/.generated/decl/lookupReference/Reference.decl.d.ts +2 -1
  68. package/types/src/.generated/decl/mathTrig/Math.decl.d.ts +2 -1
  69. package/types/src/.generated/desc/dateTime/Date.desc.d.ts +2 -1
  70. package/types/src/.generated/desc/information/Information.desc.d.ts +2 -1
  71. package/types/src/.generated/desc/lookupReference/Reference.desc.d.ts +2 -1
  72. package/types/src/.generated/desc/mathTrig/Math.desc.d.ts +2 -1
  73. package/types/src/_utils/AValues.d.ts +30 -0
  74. package/types/src/_utils/AggregateIFS.d.ts +3 -1
  75. package/types/src/_utils/Arithmetic.d.ts +36 -0
  76. package/types/src/_utils/Combinatorics.d.ts +20 -0
  77. package/types/src/_utils/Distributions.d.ts +94 -0
  78. package/types/src/_utils/Errors.d.ts +1 -20
  79. package/types/src/_utils/FirstCell.d.ts +32 -0
  80. package/types/src/_utils/Matrix.d.ts +31 -0
  81. package/types/src/_utils/SpecialFunctions.d.ts +91 -0
  82. package/types/src/_utils/X87.d.ts +28 -0
  83. package/types/src/database/Database.d.ts +25 -25
  84. package/types/src/dateTime/Date.d.ts +250 -41
  85. package/types/src/engineering/Bessel.d.ts +9 -9
  86. package/types/src/engineering/Bitwise.d.ts +35 -35
  87. package/types/src/engineering/Convert.d.ts +3 -3
  88. package/types/src/engineering/Engineering.d.ts +5 -5
  89. package/types/src/engineering/Error.d.ts +9 -9
  90. package/types/src/engineering/Imaginary.d.ts +54 -54
  91. package/types/src/information/Information.d.ts +118 -49
  92. package/types/src/japanese/Date.d.ts +2 -2
  93. package/types/src/japanese/Text.d.ts +1 -1
  94. package/types/src/logical/Logical.d.ts +45 -39
  95. package/types/src/lookupReference/GroupBy.d.ts +4 -4
  96. package/types/src/lookupReference/PivotBy.d.ts +4 -4
  97. package/types/src/lookupReference/Reference.d.ts +212 -86
  98. package/types/src/mathTrig/Math.d.ts +499 -152
  99. package/types/src/mathTrig/Trig.d.ts +26 -22
  100. package/types/src/operators/Operators.d.ts +15 -15
  101. package/types/src/statistical/Distribution.d.ts +157 -161
  102. package/types/src/statistical/Statistical.d.ts +37 -37
  103. package/types/src/testing/Testing.d.ts +2 -2
  104. package/types/src/text/Text.d.ts +119 -54
  105. package/types/src/thai/Text.d.ts +1 -1
  106. package/types/src/web/FilterXML.d.ts +1 -1
  107. package/types/src/web/Web.d.ts +2 -2
  108. package/browser/cjs/49_x589Na12sizKK.cjs +0 -1
  109. package/browser/cjs/C9C-pr-T_ThweQX9.cjs +0 -1
  110. package/browser/cjs/DCIlWcGDrp-5PDoA.cjs +0 -1
  111. package/browser/cjs/Kvn916ebqGc4t6hv.cjs +0 -1
@@ -1,433 +1,780 @@
1
- import { IRange, Scalar, IReferenceRange, AcceptError, AcceptRefError, Repeating, Omittable } from '@sheetxl/primitives';
1
+ import { IRange, Scalar, Volatile, IReferenceRange, AcceptError, Repeating, Omittable, NoLift, NoFilter, ReportType } from '@sheetxl/primitives';
2
2
  /**
3
- * @summary Returns the absolute value of a number, a number without its sign.
3
+ * Returns the absolute value of a number, a number without its sign.
4
4
  * @param number is the real number for which you want the absolute value.
5
5
  */
6
6
  export declare function ABS(number: number): number;
7
7
  /**
8
- * @summary Returns an aggregate in a list or database.
8
+ * The calculation AGGREGATE performs.
9
+ *
10
+ * @remarks
11
+ * Declared `ReportType`, as every numeric built-in enum is: Excel TRUNCATES this argument (`9.9`
12
+ * is SUM, measured), which an enum's gate does not, so the body keeps the verdict. Also the
13
+ * overload discriminant of DESIGN-REPEATING §6: 14-19 take a trailing `k`.
14
+ */
15
+ declare enum AggregateFunction {
16
+ /**
17
+ * The average of the values.
18
+ * @name AVERAGE
19
+ */
20
+ Average = 1,
21
+ /**
22
+ * How many values are numbers.
23
+ * @name COUNT
24
+ */
25
+ Count = 2,
26
+ /**
27
+ * How many values are not empty.
28
+ * @name COUNTA
29
+ */
30
+ CountA = 3,
31
+ /**
32
+ * The largest value.
33
+ * @name MAX
34
+ */
35
+ Max = 4,
36
+ /**
37
+ * The smallest value.
38
+ * @name MIN
39
+ */
40
+ Min = 5,
41
+ /**
42
+ * The product of the values.
43
+ * @name PRODUCT
44
+ */
45
+ Product = 6,
46
+ /**
47
+ * The standard deviation of a sample.
48
+ * @name STDEV.S
49
+ */
50
+ StdevS = 7,
51
+ /**
52
+ * The standard deviation of a whole population.
53
+ * @name STDEV.P
54
+ */
55
+ StdevP = 8,
56
+ /**
57
+ * The sum of the values.
58
+ * @name SUM
59
+ */
60
+ Sum = 9,
61
+ /**
62
+ * The variance of a sample.
63
+ * @name VAR.S
64
+ */
65
+ VarS = 10,
66
+ /**
67
+ * The variance of a whole population.
68
+ * @name VAR.P
69
+ */
70
+ VarP = 11,
71
+ /**
72
+ * The middle value.
73
+ * @name MEDIAN
74
+ */
75
+ Median = 12,
76
+ /**
77
+ * The most frequent value.
78
+ * @name MODE.SNGL
79
+ */
80
+ ModeSngl = 13,
81
+ /**
82
+ * The k-th largest value.
83
+ * @name LARGE
84
+ */
85
+ Large = 14,
86
+ /**
87
+ * The k-th smallest value.
88
+ * @name SMALL
89
+ */
90
+ Small = 15,
91
+ /**
92
+ * The k-th percentile, k from 0 to 1 inclusive.
93
+ * @name PERCENTILE.INC
94
+ */
95
+ PercentileInc = 16,
96
+ /**
97
+ * The quartile k, from 0 to 4 inclusive.
98
+ * @name QUARTILE.INC
99
+ */
100
+ QuartileInc = 17,
101
+ /**
102
+ * The k-th percentile, k from 0 to 1 exclusive.
103
+ * @name PERCENTILE.EXC
104
+ */
105
+ PercentileExc = 18,
106
+ /**
107
+ * The quartile k, from 1 to 3 exclusive.
108
+ * @name QUARTILE.EXC
109
+ */
110
+ QuartileExc = 19
111
+ }
112
+ /**
113
+ * What AGGREGATE leaves out.
114
+ *
115
+ * @remarks
116
+ * Declared `ReportType`, as every numeric built-in enum is: Excel TRUNCATES this argument (`6.9`
117
+ * is 6, measured), which an enum's gate does not, so the body keeps the verdict.
118
+ */
119
+ declare enum AggregateOptions {
120
+ /**
121
+ * Ignore nested SUBTOTAL and AGGREGATE functions.
122
+ * @name Ignore nested SUBTOTAL and AGGREGATE functions
123
+ */
124
+ IgnoreNested = 0,
125
+ /**
126
+ * Ignore hidden rows, nested SUBTOTAL and AGGREGATE functions.
127
+ * @name Ignore hidden rows, nested SUBTOTAL and AGGREGATE functions
128
+ */
129
+ IgnoreHiddenNested = 1,
130
+ /**
131
+ * Ignore error values, nested SUBTOTAL and AGGREGATE functions.
132
+ * @name Ignore error values, nested SUBTOTAL and AGGREGATE functions
133
+ */
134
+ IgnoreErrorsNested = 2,
135
+ /**
136
+ * Ignore hidden rows, error values, nested SUBTOTAL and AGGREGATE functions.
137
+ * @name Ignore hidden rows, error values, nested SUBTOTAL and AGGREGATE functions
138
+ */
139
+ IgnoreHiddenErrorsNested = 3,
140
+ /**
141
+ * Ignore nothing.
142
+ * @name Ignore nothing
143
+ */
144
+ IgnoreNothing = 4,
145
+ /**
146
+ * Ignore hidden rows.
147
+ * @name Ignore hidden rows
148
+ */
149
+ IgnoreHidden = 5,
150
+ /**
151
+ * Ignore error values.
152
+ * @name Ignore error values
153
+ */
154
+ IgnoreErrors = 6,
155
+ /**
156
+ * Ignore hidden rows and error values.
157
+ * @name Ignore hidden rows and error values
158
+ */
159
+ IgnoreHiddenErrors = 7
160
+ }
161
+ /**
162
+ * Returns an aggregate in a list or database.
9
163
  * @param functionNum The function to use: 1-19.
10
164
  * @param options The options for the aggregate: 0-7.
11
165
  * @param array The ranges to aggregate.
12
166
  * @param KOrRest If functionNum is 14-19, this is the k value. Otherwise, this is the first of the ranges to aggregate.
13
167
  *
14
168
  * @remarks
15
- * | functionNum | Function |
16
- * |--------------|-----------------|
17
- * | 1 | AVERAGE |
18
- * | 2 | COUNT |
19
- * | 3 | COUNTA |
20
- * | 4 | MAX |
21
- * | 5 | MIN |
22
- * | 6 | PRODUCT |
23
- * | 7 | STDEV |
24
- * | 8 | STDEVP |
25
- * | 9 | SUM |
26
- * | 10 | VAR |
27
- * | 11 | VARP |
28
- * | 12 | MEDIAN |
29
- * | 13 | MODE.SNGL |
30
- * | 14 | LARGE |
31
- * | 15 | SMALL |
32
- * | 16 | PERCENTILE.INC |
33
- * | 17 | QUARTILE.INC |
34
- * | 18 | PERCENTILE.EXC |
35
- * | 19 | QUARTILE.EXC |
36
- *
37
- * | options | Behavior |
38
- * |---------|-------------------------------------------------------|
39
- * | 0 | Ignore nested SUBTOTAL and AGGREGATE functions |
40
- * | 1 | Ignore hidden rows, nested SUBTOTAL and AGGREGATE |
41
- * | 2 | Ignore error values, nested SUBTOTAL and AGGREGATE |
42
- * | 3 | Ignore hidden rows, errors, nested SUBTOTAL/AGGREGATE |
43
- * | 4 | Ignore nothing |
44
- * | 5 | Ignore hidden rows |
45
- * | 6 | Ignore error values |
46
- * | 7 | Ignore hidden rows and error values |
47
- *
48
- * Note: nested SUBTOTAL/AGGREGATE calls within ref ranges are not excluded
49
- * from the calculation in this implementation. This matches the behavior of
50
- * most spreadsheet engines but differs from Excel in edge cases where
51
- * SUBTOTAL results appear within the referenced range.
52
- */
53
- export declare function AGGREGATE(functionNum: number, options: number, array: AcceptRefError<IRange>, ...KOrRest: AcceptRefError<IRange>[]): Scalar;
54
- /**
55
- * @summary Converts a Roman numeral to Arabic.
169
+ * Nested SUBTOTAL and AGGREGATE results are always excluded, regardless of `options`.
170
+ */
171
+ export declare function AGGREGATE(functionNum: ReportType<AggregateFunction>, options: ReportType<AggregateOptions>, array: ReportType<IRange>, ...KOrRest: Repeating<IRange, 254>): Scalar;
172
+ /**
173
+ * Converts a Roman numeral to Arabic.
56
174
  * @param text is the Roman numeral you want to convert.
57
175
  */
58
176
  export declare function ARABIC(text: string): number;
59
177
  /**
60
- * @summary Converts a number into a text representation with the given radix (base).
178
+ * Converts a number into a text representation with the given radix (base).
61
179
  * @param number is the number that you want to convert.
62
180
  * @param radix is the base Radix that you want to convert the number into.
63
181
  * @param minLength is the minimum length of the returned string.
182
+ *
183
+ * @remarks
184
+ * Zero has NO digits and `min_length` only pads them: `BASE(0,16,0)` is the empty string, and
185
+ * `BASE(0,16)` is "0" because an ABSENT `min_length` is 1 where an empty slot is 0.
186
+ *
187
+ * `number` and `min_length` are refused on the RAW argument, before the truncation each of them
188
+ * takes, so `BASE(-0.5,16)` is `#NUM!`. The pad reaches 255 characters and no further.
64
189
  */
65
- export declare function BASE(number: number, radix: number, minLength?: number): string | number;
190
+ export declare function BASE(number: number, radix: number, minLength?: Omittable<number>): string | number;
66
191
  /**
67
- * @summary Rounds a number up, to the nearest multiple of significance.
192
+ * Rounds a number up, to the nearest multiple of significance.
68
193
  * @param number is the value you want to round.
69
194
  * @param significance is the multiple to which you want to round.
70
195
  * @category Compatibility
71
196
  */
72
197
  export declare function CEILING(number: number, significance: number): number;
73
198
  /**
199
+ * Rounds a number up, to the nearest integer or to the nearest multiple of significance.
74
200
  * @name CEILING.MATH
75
- * @summary Rounds a number up, to the nearest integer or to the nearest multiple of significance.
76
201
  * @param number is the real number you want to round.
77
- * @param significance when given and nonzero this function will round away from zero.
202
+ * @param significance is the multiple to which you want to round.
203
+ * @param mode when given and nonzero this function will round away from zero.
78
204
  */
79
205
  export declare function CEILING_MATH(number: number, significance?: Omittable<number>, mode?: number): number;
80
206
  /**
207
+ * Rounds a number up to the nearest integer or to the nearest multiple of significance.
81
208
  * @name CEILING.PRECISE
82
- * @summary Rounds a number up to the nearest integer or to the nearest multiple of significance.
83
209
  * @param number is the real number you want to round.
84
210
  * @param significance is the multiple to which you want to round.
85
211
  * @category Compatibility
86
212
  */
87
213
  export declare function CEILING_PRECISE(number: number, significance?: Omittable<number>): number;
88
214
  /**
215
+ * Rounds a number up, to the nearest multiple of significance.
89
216
  * @name ECMA.CEILING
90
- * @summary Rounds a number up, to the nearest multiple of significance.
91
217
  * @param number is the value you want to round.
92
218
  * @param significance is the multiple to which you want to round.
93
219
  * @category Compatibility
94
220
  */
95
221
  export declare function ECMA_CEILING(number: number, significance: number): number;
96
222
  /**
97
- * @summary Returns the number of combinations for a given number of items.
223
+ * Returns the number of combinations for a given number of items.
98
224
  * @param number is the total number of items.
99
225
  * @param numberChosen is the number of items in each combination.
100
226
  */
101
227
  export declare function COMBIN(number: number, numberChosen: number): number;
102
228
  /**
103
- * @summary Returns the number of combinations with repetitions for a given number of items.
229
+ * Returns the number of combinations with repetitions for a given number of items.
104
230
  * @param number is the total number of items.
105
231
  * @param numberChosen is the number of items in each combination.
106
232
  */
107
233
  export declare function COMBINA(number: number, numberChosen: number): number;
108
234
  /**
109
- * @summary Converts a text representation of a number in a given base into a decimal number.
235
+ * Converts a text representation of a number in a given base into a decimal number.
110
236
  * @param number is the number that you want to convert.
111
237
  * @param radix is the base Radix of the number you are converting.
112
238
  */
113
239
  export declare function DECIMAL(number: string, radix: number): number;
114
240
  /**
115
- * @summary Converts radians to degrees.
241
+ * Converts radians to degrees.
116
242
  * @param angle is the angle in radians that you want to convert.
117
243
  */
118
244
  export declare function DEGREES(angle: number): number;
119
245
  /**
120
- * @summary Rounds a positive number up and negative number down to the nearest even integer.
246
+ * Rounds a positive number up and negative number down to the nearest even integer.
121
247
  * @param number is the value to round.
122
248
  */
123
249
  export declare function EVEN(number: number): number;
124
250
  /**
125
- * @summary Returns e raised to the power of a given number.
251
+ * Returns e raised to the power of a given number.
126
252
  * @param number is the exponent applied to the base e. The constant e equals 2.71828182845904, the base of the natural logarithm.
127
253
  */
128
254
  export declare function EXP(number: number): number;
129
255
  /**
130
- * @summary Returns the factorial of a number, equal to 1*2*3*...* Number.
256
+ * Returns the factorial of a number, equal to 1*2*3*...* Number.
131
257
  * @param number is the nonnegative number you want the factorial for.
258
+ *
259
+ * @remarks
260
+ * Alone among the combinatorial functions, FACT reads its argument at fifteen significant
261
+ * digits before truncating it: `FACT(0.0006*10000)` is 720, the factorial of 6, where the
262
+ * double is 5.999999999999999 and FACTDOUBLE, COMBIN, GCD, LCM, BASE and ROMAN all answer for
263
+ * 5. The sign is refused BEFORE that truncation, so `FACT(-0.5)` is `#NUM!` where the truncated
264
+ * argument would be zero.
265
+ *
266
+ * 170 is the last factorial that fits a double.
132
267
  */
133
268
  export declare function FACT(number: number): number;
134
269
  /**
135
- * @summary Returns the double factorial of a number.
270
+ * Returns the double factorial of a number.
136
271
  * @param number is the value for which to return the double factorial.
272
+ *
273
+ * @remarks
274
+ * `FACTDOUBLE(TRUE)` is `#VALUE!` and `FACTDOUBLE(A1:A3)` is `#VALUE!`, where FACT coerces the
275
+ * boolean and spills the reference — the two sit in one family and are declared differently.
276
+ *
277
+ * The bound is on the RAW argument (`FACTDOUBLE(-1.5)` is `#NUM!` and `FACTDOUBLE(-0.9)` is 1),
278
+ * and the odd tail runs to 301 before it overflows, two steps past the even one.
137
279
  */
138
- export declare function FACTDOUBLE(number: number): number;
280
+ export declare function FACTDOUBLE(number: NoLift<Omittable<AcceptError<Scalar>>>): number;
139
281
  /**
140
- * @summary Rounds a number down to the nearest multiple of significance.
282
+ * Rounds a number down to the nearest multiple of significance.
141
283
  * @param number is the real number you want to round.
142
284
  * @param significance is the multiple to which you want to round. Number and Significance must either both be positive or both be negative.
143
285
  * @category Compatibility
144
286
  */
145
287
  export declare function FLOOR(number: number, significance: number): number;
146
288
  /**
289
+ * Rounds a number down, to the nearest integer or to the nearest multiple of significance.
147
290
  * @name FLOOR.MATH
148
- * @summary Rounds a number down, to the nearest integer or to the nearest multiple of significance.
149
291
  * @param number is the real number you want to round.
150
292
  * @param significance is the multiple to which you want to round.
151
293
  * @param mode when given and nonzero this function will round towards zero.
152
294
  */
153
295
  export declare function FLOOR_MATH(number: number, significance?: Omittable<number>, mode?: Omittable<number>): Scalar;
154
296
  /**
297
+ * Rounds a number down to the nearest integer or to the nearest multiple of significance.
155
298
  * @name FLOOR.PRECISE
156
- * @summary Rounds a number down to the nearest integer or to the nearest multiple of significance.
157
299
  * @param number is the real number you want to round.
158
300
  * @param significance is the multiple to which you want to round.
159
301
  */
160
302
  export declare function FLOOR_PRECISE(number: number, significance?: Omittable<number>): number;
161
303
  /**
162
- * @summary Returns the greatest common divisor.
304
+ * Returns the greatest common divisor.
163
305
  * @param number are 1 to 255 values.
164
- * @compat atp
165
306
  */
166
- export declare function GCD(number: number[]): number;
307
+ export declare function GCD(number: NoFilter<number>[]): number;
167
308
  /**
168
- * @summary Rounds a number down to the nearest integer.
309
+ * Rounds a number down to the nearest integer.
169
310
  * @param number is the real number you want to round down to an integer.
170
311
  */
171
312
  export declare function INT(number: number): number;
172
313
  /**
314
+ * Rounds a number up to the nearest integer.
173
315
  * @name ISO.CEILING
174
- * @summary Rounds a number up to the nearest integer.
175
316
  * @param number is the real number you want to round up to an integer.
176
317
  * @param significance is the multiple to which you want to round number.
177
318
  * @category Compatibility
178
319
  */
179
- export declare function ISO_CEILING(number: number, significance?: number): number;
320
+ export declare function ISO_CEILING(number: number, significance?: Omittable<number>): number;
180
321
  /**
181
- * @summary Returns the least common multiple.
322
+ * Returns the least common multiple.
182
323
  * @param number are 1 to 255 values for which you want the least common multiple.
183
- * @compat atp
184
324
  */
185
- export declare function LCM(number: number[]): number;
325
+ export declare function LCM(number: NoFilter<number>[]): number;
186
326
  /**
187
- * @summary Returns the natural logarithm of a number.
327
+ * Returns the natural logarithm of a number.
188
328
  * @param number is the positive real number for which you want the natural logarithm.
189
329
  */
190
330
  export declare function LN(number: number): number;
191
331
  /**
192
- * @summary Returns the logarithm of a number to the base you specify.
332
+ * Returns the logarithm of a number to the base you specify.
193
333
  * @param number is the positive real number for which you want the logarithm.
194
334
  * @param base is the base of the logarithm.
335
+ *
336
+ * @remarks
337
+ * An OMITTED base is 0 and therefore `#NUM!` — `LOG(8,)` does not fall back to 10 the way an
338
+ * absent one does, and neither does a blank cell. An absent one is `LOG10` exactly, which is not
339
+ * the same double as `LN(number)/LN(10)`.
195
340
  */
196
341
  export declare function LOG(number: number, base?: number): number;
197
342
  /**
198
- * @summary Returns the base-10 logarithm of a number.
343
+ * Returns the base-10 logarithm of a number.
199
344
  * @param number is the positive real number for which you want the base-10 logarithm.
200
345
  */
201
346
  export declare function LOG10(number: number): number;
202
347
  /**
203
- * @summary Returns the matrix determinant of an array.
348
+ * Returns the matrix determinant of an array.
204
349
  * @param array is a numeric array with an equal number of rows and columns, either a cell range or an array constant.
350
+ *
351
+ * @remarks
352
+ * A scalar and a single cell are a 1x1 matrix, so `MDETERM(5)` is 5; any other shape that is not
353
+ * square is `#VALUE!`, a whole-column reference and a union included.
354
+ *
355
+ * The answer of a SINGULAR matrix is not zero. It is whatever the elimination leaves —
356
+ * `MDETERM({1,2,3;4,5,6;7,8,9})` is 6.661338147750939E-16 and its transpose is exactly 0 — so
357
+ * there is no tolerance anywhere in the body.
205
358
  */
206
- export declare function MDETERM(array: IRange<number>): Scalar;
359
+ export declare function MDETERM(array: IRange): Scalar;
207
360
  /**
208
- * @summary Returns the inverse matrix for the matrix stored in an array.
361
+ * Returns the inverse matrix for the matrix stored in an array.
209
362
  * @param array is a numeric array with an equal number of rows and columns, either a cell range or an array constant.
363
+ *
364
+ * @remarks
365
+ * A zero PIVOT is `#NUM!` and nothing else is: a matrix that is merely close to singular
366
+ * inverts, and answers the large numbers that follow from it — the exactly singular
367
+ * `{1,2,3;4,5,6;7,8,9}` inverts to entries near 9E15 rather than being refused.
368
+ *
369
+ * Like MDETERM, it is a 1x1 matrix that a scalar and a single cell describe (`MINVERSE(5)` is
370
+ * 0.2), and any non-numeric member is `#VALUE!`.
210
371
  */
211
- export declare function MINVERSE(array: IRange<number>): Scalar[][];
372
+ export declare function MINVERSE(array: IRange): Scalar[][];
212
373
  /**
213
- * @summary Returns the matrix product of two arrays, an array with the same number of rows as array1 and columns as array2.
374
+ * Returns the matrix product of two arrays, an array with the same number of rows as array1 and columns as array2.
214
375
  * @param array1 is the first array of numbers to multiply and must have the same number of columns as Array2 has rows.
215
376
  * @param array2 is the second array of numbers to multiply and must have the same number of columns as Array1 has rows.
377
+ *
378
+ * @remarks
379
+ * The shape rule is the INNER dimensions, not squareness, so a 2x2 against a 2x3 answers a 2x3.
380
+ * Two scalars are two 1x1 matrices and multiply, while a scalar against a matrix is `#VALUE!` —
381
+ * there is no broadcast here.
382
+ *
383
+ * Each cell is a SEQUENTIAL sum from zero, left to right, which is observable wherever the terms
384
+ * cancel: `MMULT({1,1E16,-1E16},{1;1;1})` is 0 and the same three numbers reordered are 1.
216
385
  */
217
- export declare function MMULT(array1: IRange<number>, array2: IRange<number>): Scalar[][];
386
+ export declare function MMULT(array1: IRange, array2: IRange): Scalar[][];
218
387
  /**
219
- * @summary Returns the remainder after a number is divided by a divisor.
388
+ * Returns the remainder after a number is divided by a divisor.
220
389
  * @param number is the number for which you want to find the remainder after the division is performed.
221
390
  * @param divisor is the number by which you want to divide Number.
222
391
  */
223
392
  export declare function MOD(number: number, divisor: number): number;
224
393
  /**
225
- * @summary Returns a number rounded to the desired multiple.
394
+ * Returns a number rounded to the desired multiple.
226
395
  * @param number is the value to round.
227
396
  * @param multiple is the multiple to which you want to round number.
397
+ * @remarks
398
+ * `MROUND(A1:A3,3)` is `#VALUE!` where the native `MOD(A1:A3,3)` spills three results, and an
399
+ * ARRAY constant still lifts at the same slot (`MROUND({1.5;-2.5},3)` spills two).
228
400
  */
229
- export declare function MROUND(number: number, multiple: number): number;
401
+ export declare function MROUND(number: NoLift<Omittable<AcceptError<Scalar>>>, multiple: NoLift<Omittable<AcceptError<Scalar>>>): number;
230
402
  /**
231
- * @summary Returns the multinomial of a set of numbers.
403
+ * Returns the multinomial of a set of numbers.
232
404
  * @param number are 1 to 255 values for which you want the multinomial.
233
- * @compat atp
234
405
  */
235
- export declare function MULTINOMIAL(number: number[]): number;
406
+ export declare function MULTINOMIAL(number: NoFilter<number>[]): number;
236
407
  /**
237
- * @summary Returns the unit matrix for the specified dimension.
408
+ * Returns the unit matrix for the specified dimension.
238
409
  * @param dimension is an integer specifying the dimension of the unit matrix that you want to return.
410
+ *
411
+ * @remarks
412
+ * The dimension is the RAW double, truncated: `MUNIT(0.0006*10000)` is the 5x5 identity, where
413
+ * SEQUENCE and RANDARRAY read the same expression at fifteen significant digits and build six.
414
+ * A dimension that truncates to zero or below is `#VALUE!`.
415
+ *
416
+ * A dimension too large to build is neither an error nor a matrix — it is an EMPTY array, whose
417
+ * `ROWS`, `COLUMNS`, `COUNT` and `SUM` are all 0.
239
418
  */
240
419
  export declare function MUNIT(dimension: number): IRange;
241
420
  /**
242
- * @summary Rounds a positive number up and negative number down to the nearest odd integer.
421
+ * Rounds a positive number up and negative number down to the nearest odd integer.
243
422
  * @param number is the value to round.
244
423
  */
245
424
  export declare function ODD(number: number): number;
246
425
  /**
247
- * @summary Returns the percentage of a subset of a given data set.
426
+ * Returns the percentage of a subset of a given data set.
248
427
  * @param dataSubset is the subset.
249
428
  * @param dataAll is the data set.
250
429
  */
251
- export declare function PERCENTOF(dataSubset: IRange<number>, dataAll: IRange<number>): number;
430
+ export declare function PERCENTOF(dataSubset: ReportType<IRange<number>>, dataAll: ReportType<IRange<number>>): number;
252
431
  /**
253
- * @summary Returns the value of Pi, 3.14159265358979, accurate to 15 digits.
432
+ * Returns the value of Pi, 3.14159265358979, accurate to 15 digits.
254
433
  */
255
434
  export declare function PI(): number;
256
435
  /**
257
- * @summary Returns the result of a number raised to a power.
436
+ * Returns the result of a number raised to a power.
258
437
  * @param number is the base number, any real number.
259
438
  * @param power is the exponent, to which the base number is raised.
260
439
  */
261
440
  export declare function POWER(number: number, power: number): number;
262
441
  /**
263
- * @summary Multiplies all the numbers given as arguments.
442
+ * Multiplies all the numbers given as arguments.
264
443
  * @param number are 1 to 255 numbers, logical values, or text representations of numbers that you want to multiply.
444
+ *
445
+ * @remarks
446
+ * The EMPTY product is 0 rather than 1: `PRODUCT(A1:A3)` over three blank or three text cells is
447
+ * 0, and so is `PRODUCT(A1)` on a blank cell. The identity only appears once something numeric
448
+ * has been multiplied, so `PRODUCT(A1:A3,2)` over the same three cells is 2.
449
+ *
450
+ * The accumulation is left to right and nothing rescues an intermediate overflow:
451
+ * `PRODUCT(1E200,1E200,1E-200)` is `#NUM!` where the same three in the other order answer 1E200.
265
452
  */
266
453
  export declare function PRODUCT(number: IRange<number>[]): number;
267
454
  /**
268
- * @summary Returns the integer portion of a division.
455
+ * Returns the integer portion of a division.
269
456
  * @param numerator is the dividend.
270
457
  * @param denominator is the divisor.
458
+ * @remarks
459
+ * `QUOTIENT(A1:A3,3)` is `#VALUE!` where the native `MOD(A1:A3,3)` spills; an array constant
460
+ * still lifts.
271
461
  */
272
- export declare function QUOTIENT(numerator: number, denominator: number): number;
462
+ export declare function QUOTIENT(numerator: NoLift<Omittable<AcceptError<Scalar>>>, denominator: NoLift<Omittable<AcceptError<Scalar>>>): number;
273
463
  /**
274
- * @summary Converts degrees to radians.
464
+ * Converts degrees to radians.
275
465
  * @param angle is an angle in degrees that you want to convert.
276
466
  */
277
467
  export declare function RADIANS(angle: number): number;
278
468
  /**
279
- * @summary Returns a random number greater than or equal to 0 and less than 1, evenly distributed (changes on recalculation).
469
+ * Returns a random number greater than or equal to 0 and less than 1, evenly distributed (changes on recalculation).
470
+ *
471
+ * @remarks
472
+ * The draw carries 53 bits — it is a multiple of 2^-53, not of 2^-32 — and never reaches 1.
280
473
  */
281
- export declare function RAND(): number;
474
+ export declare function RAND(): Volatile<number>;
282
475
  /**
283
- * @summary Returns an array of random numbers.
476
+ * Returns an array of random numbers.
284
477
  * @param rows the number of rows in the returned array.
285
478
  * @param columns the number of columns in the returned array.
286
479
  * @param min the minimum number you would like returned.
287
480
  * @param max the maximum number you would like returned.
288
481
  * @param integer return an integer or a decimal value. TRUE for an integer, FALSE for a decimal number.
482
+ *
483
+ * @remarks
484
+ * `integer` is a LOGICAL slot and reads like one: a number coerces (0 is FALSE, anything else
485
+ * TRUE) and TEXT does not, numeric text included, where every other slot here parses it. Absent,
486
+ * omitted and blank all mean FALSE.
487
+ *
488
+ * In integer mode a bound that is not a whole number is `#VALUE!` rather than being truncated,
489
+ * and both ends are INCLUSIVE; the decimal mode's `max` is not (`RANDARRAY(1,1,0,1)` never
490
+ * answers 1). `min` above `max` is `#VALUE!` in both modes.
289
491
  */
290
- export declare function RANDARRAY(rows?: number, columns?: number, min?: number, max?: number, integer?: boolean): IRange;
492
+ export declare function RANDARRAY(rows?: Omittable<number>, columns?: Omittable<number>, min?: Omittable<number>, max?: Omittable<number>, integer?: Omittable<boolean>): Volatile<IRange>;
291
493
  /**
292
- * @summary Returns a random number between the numbers you specify.
494
+ * Returns a random number between the numbers you specify.
293
495
  * @param bottom is the smallest integer RANDBETWEEN will return.
294
496
  * @param top is the largest integer RANDBETWEEN will return.
497
+ *
498
+ * @remarks
499
+ * Both bounds are taken to their CEILING, and the raw double is what is read:
500
+ * `RANDBETWEEN(2.2,2.2)` is 3 and `RANDBETWEEN(0.07*100,0.07*100)` is 8, where the rounding
501
+ * family's fifteen-digit reading would say 7. The refusal is decided BEFORE that ceiling, on the
502
+ * arguments as given — `RANDBETWEEN(2.5,2.2)` is `#NUM!` although both ends ceil to 3.
503
+ *
504
+ * The arguments are read RIGHT TO LEFT, so a fault in `top` outranks one in `bottom`.
295
505
  */
296
- export declare function RANDBETWEEN(bottom: Scalar, top: Scalar): number;
506
+ export declare function RANDBETWEEN(bottom: NoLift<Omittable<AcceptError<Scalar>>>, top: NoLift<Omittable<AcceptError<Scalar>>>): Volatile<number>;
297
507
  /**
298
- * @summary Converts an Arabic numeral to Roman, as text.
508
+ * Converts an Arabic numeral to Roman, as text.
299
509
  * @param number is the Arabic numeral you want to convert.
300
510
  * @param form is the number specifying the type of Roman numeral you want.
511
+ *
512
+ * @remarks
513
+ * `form` runs 0 (classic) to 4 (most concise) and is also read as a LOGICAL: `ROMAN(499,TRUE)`
514
+ * is the classic "CDXCIX" and `ROMAN(499,FALSE)` is "ID". Anything outside 0..4 is `#VALUE!`.
515
+ *
516
+ * A concise form replaces a four-of-a-kind by a subtraction from a larger numeral, and repeats
517
+ * that at most `form` times: 499 is "CDXCIX", "LDVLIV", "XDIX", "VDIV", "ID" as the form rises.
301
518
  */
302
- export declare function ROMAN(number: number, form?: number): Scalar;
519
+ export declare function ROMAN(number: number, form?: Omittable<Scalar>): Scalar;
303
520
  /**
304
- * @summary Rounds a number to a specified number of digits.
521
+ * Rounds a number to a specified number of digits.
305
522
  * @param number is the number you want to round.
306
523
  * @param numDigits is the number of digits to which you want to round. Negative rounds to the left of the decimal point to the nearest integer.
307
524
  */
308
525
  export declare function ROUND(number: number, numDigits: number): number;
309
526
  /**
310
- * @summary Rounds a number down, toward zero.
527
+ * Rounds a number down, toward zero.
311
528
  * @param number is any real number that you want rounded down.
312
529
  * @param numDigits is the number of digits to which you want to round. Negative rounds to the left of the decimal point to the nearest integer.
313
530
  */
314
531
  export declare function ROUNDDOWN(number: number, numDigits: number): number;
315
532
  /**
316
- * @summary Rounds a number up, away from zero.
533
+ * Rounds a number up, away from zero.
317
534
  * @param number is any real number that you want rounded up.
318
535
  * @param numDigits is the number of digits to which you want to round. Negative rounds to the left of the decimal point to the nearest integer.
319
536
  */
320
537
  export declare function ROUNDUP(number: number, numDigits: number): number;
321
538
  /**
322
- * @summary Returns a sequence of numbers.
539
+ * Returns a sequence of numbers.
323
540
  * @param rows the number of rows to return.
324
541
  * @param columns the number of columns to return.
325
542
  * @param start the first number in the sequence.
326
543
  * @param step the amount to increment each subsequent value in the sequence.
544
+ *
545
+ * @remarks
546
+ * The values ACCUMULATE rather than being computed from the index: `SEQUENCE(1,3,1,0.1)` ends at
547
+ * 1.2000000000000002, which `start + i * step` does not produce, and a two-dimensional answer is
548
+ * the same running sum read in row-major order.
327
549
  */
328
550
  export declare function SEQUENCE(rows: Omittable<number>, columns?: Omittable<number>, start?: Omittable<number>, step?: Omittable<number>): IRange;
329
551
  /**
330
- * @summary Returns the sum of a power series based on the formula.
552
+ * Returns the sum of a power series based on the formula.
331
553
  * @param x is the input value to the power series.
332
554
  * @param n is the initial power to which you want to raise x.
333
555
  * @param m is the step by which to increase n for each term in the series.
334
556
  * @param coefficients is a set of coefficients by which each successive power of x is multiplied.
557
+ *
558
+ * @remarks
559
+ * `n` and `m` are REAL exponents, not counts — `SERIESSUM(2,-0.5,1,{12,18,24})` answers.
560
+ *
561
+ * Coefficients are taken in row-major order from a range of any shape, and a BLANK member is
562
+ * skipped rather than read as zero, so it does not consume a power: three cells holding 12,
563
+ * blank, 18 are the series `12·x^n + 18·x^(n+m)`. A member that is text — numeric text included
564
+ * — is `#VALUE!`, where the same text in GCD, LCM or MULTINOMIAL would be coerced.
565
+ *
566
+ * A term whose power is undefined contributes NOTHING rather than failing the sum:
567
+ * `SERIESSUM(-2,1,0.5,{12,18,24})` is 72, the first and third terms alone, where the second
568
+ * raises a negative base to a fractional power. A power that OVERFLOWS is still `#NUM!`, and so
569
+ * is a zero base at a non-positive exponent.
335
570
  */
336
- export declare function SERIESSUM(x: number, n: number, m: number, coefficients: IRange): number;
571
+ export declare function SERIESSUM(x: NoLift<Omittable<AcceptError<Scalar>>>, n: NoLift<Omittable<AcceptError<Scalar>>>, m: NoLift<Omittable<AcceptError<Scalar>>>, coefficients: Omittable<AcceptError<IRange>>): number;
337
572
  /**
338
- * @summary Returns the sign of a number: 1 if the number is positive, zero if the number is zero, or -1 if the number is negative.
573
+ * Returns the sign of a number: 1 if the number is positive, zero if the number is zero, or -1 if the number is negative.
339
574
  * @param number is any real number.
340
575
  */
341
576
  export declare function SIGN(number: number): number;
342
577
  /**
343
- * @summary Returns the square root of a number.
578
+ * Returns the square root of a number.
344
579
  * @param number is the number for which you want the square root.
345
580
  */
346
581
  export declare function SQRT(number: number): number;
347
582
  /**
348
- * @summary Returns the square root of (number * Pi).
583
+ * Returns the square root of (number * Pi).
349
584
  * @param number is the number by which p is multiplied.
585
+ * @remarks
586
+ * The category's one Analysis ToolPak name, and it behaves like one where its native neighbors
587
+ * do not: `SQRTPI(TRUE)` is `#VALUE!` where `SQRT(TRUE)` is 1, and `SQRTPI(A1:A3)` is `#VALUE!`
588
+ * where every native sibling spills three results. An array CONSTANT still lifts.
589
+ *
590
+ * The product is taken before the root, so a `number` whose `number * Pi` overflows is `#NUM!`
591
+ * even though its own square root is ordinary: `SQRTPI(1E307*17)` is `#NUM!` and
592
+ * `SQRT(1E307*17)` is 1.3E154.
350
593
  */
351
- export declare function SQRTPI(number: number): number;
594
+ export declare function SQRTPI(number: NoLift<Omittable<AcceptError<Scalar>>>): number;
352
595
  /**
353
- * @summary Returns a subtotal in a list or database.
596
+ * The calculation SUBTOTAL performs; 101-111 leave out hidden rows.
597
+ *
598
+ * @remarks
599
+ * Declared `ReportType`, as every numeric built-in enum is: Excel TRUNCATES this argument (`9.9`
600
+ * is SUM, measured), which an enum's gate does not, so the body keeps the verdict. Excel labels
601
+ * 101-111 with the bare function name, as 1-11; a member name keys the descriptor and the
602
+ * language packs, so each must be unique.
603
+ */
604
+ declare enum SubtotalFunction {
605
+ /**
606
+ * The average of the values.
607
+ * @name AVERAGE
608
+ */
609
+ Average = 1,
610
+ /**
611
+ * How many values are numbers.
612
+ * @name COUNT
613
+ */
614
+ Count = 2,
615
+ /**
616
+ * How many values are not empty.
617
+ * @name COUNTA
618
+ */
619
+ CountA = 3,
620
+ /**
621
+ * The largest value.
622
+ * @name MAX
623
+ */
624
+ Max = 4,
625
+ /**
626
+ * The smallest value.
627
+ * @name MIN
628
+ */
629
+ Min = 5,
630
+ /**
631
+ * The product of the values.
632
+ * @name PRODUCT
633
+ */
634
+ Product = 6,
635
+ /**
636
+ * The standard deviation of a sample.
637
+ * @name STDEV
638
+ */
639
+ Stdev = 7,
640
+ /**
641
+ * The standard deviation of a whole population.
642
+ * @name STDEVP
643
+ */
644
+ StdevP = 8,
645
+ /**
646
+ * The sum of the values.
647
+ * @name SUM
648
+ */
649
+ Sum = 9,
650
+ /**
651
+ * The variance of a sample.
652
+ * @name VAR
653
+ */
654
+ Var = 10,
655
+ /**
656
+ * The variance of a whole population.
657
+ * @name VARP
658
+ */
659
+ VarP = 11,
660
+ /**
661
+ * The average of the values, leaving out hidden rows.
662
+ * @name AVERAGE (visible rows)
663
+ */
664
+ AverageVisible = 101,
665
+ /**
666
+ * How many values are numbers, leaving out hidden rows.
667
+ * @name COUNT (visible rows)
668
+ */
669
+ CountVisible = 102,
670
+ /**
671
+ * How many values are not empty, leaving out hidden rows.
672
+ * @name COUNTA (visible rows)
673
+ */
674
+ CountAVisible = 103,
675
+ /**
676
+ * The largest value, leaving out hidden rows.
677
+ * @name MAX (visible rows)
678
+ */
679
+ MaxVisible = 104,
680
+ /**
681
+ * The smallest value, leaving out hidden rows.
682
+ * @name MIN (visible rows)
683
+ */
684
+ MinVisible = 105,
685
+ /**
686
+ * The product of the values, leaving out hidden rows.
687
+ * @name PRODUCT (visible rows)
688
+ */
689
+ ProductVisible = 106,
690
+ /**
691
+ * The standard deviation of a sample, leaving out hidden rows.
692
+ * @name STDEV (visible rows)
693
+ */
694
+ StdevVisible = 107,
695
+ /**
696
+ * The standard deviation of a whole population, leaving out hidden rows.
697
+ * @name STDEVP (visible rows)
698
+ */
699
+ StdevPVisible = 108,
700
+ /**
701
+ * The sum of the values, leaving out hidden rows.
702
+ * @name SUM (visible rows)
703
+ */
704
+ SumVisible = 109,
705
+ /**
706
+ * The variance of a sample, leaving out hidden rows.
707
+ * @name VAR (visible rows)
708
+ */
709
+ VarVisible = 110,
710
+ /**
711
+ * The variance of a whole population, leaving out hidden rows.
712
+ * @name VARP (visible rows)
713
+ */
714
+ VarPVisible = 111
715
+ }
716
+ /**
717
+ * Returns a subtotal in a list or database.
354
718
  * @param functionNum is the number 1 to 11 that specifies the summary function for the subtotal.
355
719
  * @param ref are 1 to 254 ranges or references for which you want the subtotal.
356
720
  *
357
721
  * @remarks
358
- * | functionNum (includes hidden rows) | functionNum (ignores hidden rows) | Function |
359
- |-------------------------------------|-------------------------------------|----------|
360
- | 1 | 101 | AVERAGE |
361
- | 2 | 102 | COUNT |
362
- | 3 | 103 | COUNTA |
363
- | 4 | 104 | MAX |
364
- | 5 | 105 | MIN |
365
- | 6 | 106 | PRODUCT |
366
- | 7 | 107 | STDEV |
367
- | 8 | 108 | STDEVP |
368
- | 9 | 109 | SUM |
369
- | 10 | 110 | VAR |
370
- | 11 | 111 | VARP |
371
- *
372
- * Note: nested SUBTOTAL/AGGREGATE calls within ref ranges are not excluded
373
- * from the calculation in this implementation. This matches the behavior of
374
- * most spreadsheet engines but differs from Excel in edge cases where
375
- * SUBTOTAL results appear within the referenced range.
376
- */
377
- export declare function SUBTOTAL(functionNum: number, // 1 - 11
378
- ref: AcceptError<IReferenceRange>[]): Scalar;
379
- /**
380
- * @summary Adds all the numbers in a range of cells.
722
+ * Nested SUBTOTAL and AGGREGATE results within ref are always excluded.
723
+ */
724
+ export declare function SUBTOTAL(functionNum: ReportType<SubtotalFunction>, ref: IReferenceRange[]): Scalar;
725
+ /**
726
+ * Adds all the numbers in a range of cells.
381
727
  * @param number are 1 to 255 numbers to sum. Logical values and text are ignored in cells, included if typed as arguments.
382
728
  */
383
729
  export declare function SUM(number: IRange<number>[]): number;
384
730
  /**
385
- * @summary Adds the cells specified by a given condition or criteria.
731
+ * Adds the cells specified by a given condition or criteria.
386
732
  * @param range is the range of cells you want evaluated.
387
733
  * @param criteria is the condition or criteria in the form of a number, expression, or text that defines which cells will be added.
388
734
  * @param sumRange are the actual cells to sum. If omitted, the cells in range are used.
389
735
  */
390
- export declare function SUMIF(range: AcceptError<IReferenceRange>, criteria: AcceptError<Scalar>, sumRange?: AcceptError<IReferenceRange>): Scalar;
736
+ export declare function SUMIF(range: IReferenceRange, criteria: AcceptError<Scalar>, sumRange?: IReferenceRange): Scalar;
391
737
  /**
392
- * @summary Adds the cells specified by a given set of conditions or criteria.
738
+ * Adds the cells specified by a given set of conditions or criteria.
393
739
  * @param sumRange are the actual cells to sum.
394
740
  * @param criteria the ranges to evaluate and the conditions to evaluate them against.
395
741
  * @param criteria.criteriaRange is the range of cells you want evaluated for the particular condition.
396
742
  * @param criteria.criteria is the condition or criteria in the form of a number, expression, or text that defines which cells will be added.
397
743
  */
398
- export declare function SUMIFS(sumRange: AcceptError<IRange>, criteria: Repeating<[criteriaRange: AcceptError<IReferenceRange>, criteria: AcceptError<Scalar>]>): Scalar;
744
+ export declare function SUMIFS(sumRange: IReferenceRange, criteria: Repeating<[criteriaRange: IReferenceRange, criteria: AcceptError<Scalar>]>): Scalar;
399
745
  /**
400
- * @summary Returns the sum of the products of corresponding ranges or arrays.
746
+ * Returns the sum of the products of corresponding ranges or arrays.
401
747
  * @param array are 2 to 255 arrays for which you want to multiply and then add components. All arrays must have the same dimensions.
402
748
  */
403
749
  export declare function SUMPRODUCT(array: IRange[]): number;
404
750
  /**
405
- * @summary Returns the sum of the squares of the arguments. The arguments can be numbers, arrays, names, or references to cells that contain numbers.
751
+ * Returns the sum of the squares of the arguments. The arguments can be numbers, arrays, names, or references to cells that contain numbers.
406
752
  * @param number are 1 to 255 numbers, arrays, names, or references to arrays for which you want the sum of the squares.
407
753
  */
408
754
  export declare function SUMSQ(number: IRange<number>[]): number;
409
755
  /**
410
- * @summary Sums the differences between the squares of two corresponding ranges or arrays.
756
+ * Sums the differences between the squares of two corresponding ranges or arrays.
411
757
  * @param arrayX is the first range or array of numbers and can be a number or name, array, or reference that contains numbers.
412
758
  * @param arrayY is the second range or array of numbers and can be a number or name, array, or reference that contains numbers.
413
759
  */
414
- export declare function SUMX2MY2(arrayX: AcceptError<IRange>, arrayY: AcceptError<IRange>): number;
760
+ export declare function SUMX2MY2(arrayX: IRange, arrayY: IRange): number;
415
761
  /**
416
- * @summary Returns the sum total of the sums of squares of numbers in two corresponding ranges or arrays.
762
+ * Returns the sum total of the sums of squares of numbers in two corresponding ranges or arrays.
417
763
  * @param arrayX is the first range or array of numbers and can be a number or name, array, or reference that contains numbers.
418
764
  * @param arrayY is the second range or array of numbers and can be a number or name, array, or reference that contains numbers.
419
765
  */
420
- export declare function SUMX2PY2(arrayX: AcceptError<IRange>, arrayY: AcceptError<IRange>): number;
766
+ export declare function SUMX2PY2(arrayX: IRange, arrayY: IRange): number;
421
767
  /**
422
- * @summary Sums the squares of the differences in two corresponding ranges or arrays.
768
+ * Sums the squares of the differences in two corresponding ranges or arrays.
423
769
  * @param arrayX is the first range or array of numbers and can be a number or name, array, or reference that contains numbers.
424
770
  * @param arrayY is the second range or array of numbers and can be a number or name, array, or reference that contains numbers.
425
771
  */
426
- export declare function SUMXMY2(arrayX: AcceptError<IRange>, arrayY: AcceptError<IRange>): number;
772
+ export declare function SUMXMY2(arrayX: IRange, arrayY: IRange): number;
427
773
  /**
428
- * @summary Truncates a number to an integer by removing the decimal, or fractional, part of the number.
774
+ * Truncates a number to an integer by removing the decimal, or fractional, part of the number.
429
775
  * @param number is the number you want to truncate.
430
776
  * @param numDigits is a number specifying the precision of the truncation.
431
777
  */
432
778
  export declare function TRUNC(number: number, numDigits?: number): number;
779
+ export {};
433
780
  //# sourceMappingURL=Math.d.ts.map