@sheetxl/formulas 0.7.28-beta.4 → 0.8.0-beta.10
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.
- package/README.md +15 -22
- package/browser/esm/{DQXZXiayIDbfnOUM.mjs → -sN4SmS9cUOrcjVR.mjs} +1 -1
- package/browser/esm/{K0CU2XaCnJJwh9a5.mjs → 0Q46gxHg8afOLJ7K.mjs} +37 -3
- package/{node/esm/B2zbBC2YuaYszbHd.mjs → browser/esm/B-Ig6HWcV53g7Zy0.mjs} +1 -1
- package/browser/esm/{ec8i9mVgadWEbuYy.mjs → B3LvTqivuAJYZW9O.mjs} +1 -1
- package/browser/esm/{CB4iUafw8x-4z_ff.mjs → B52kG70ukWJKrVHl.mjs} +2 -5
- package/browser/esm/{BXyQ76W9hObzOdf2.mjs → B9GCCzx3ZtHrtgsZ.mjs} +1 -1
- package/{node/esm/CmxGNGhfoNTz4Ku7.mjs → browser/esm/BCRhRyTDe0QO3_TF.mjs} +2 -2
- package/browser/esm/{DNz39xRoqy8IPYb3.mjs → BTygNwyrCzzpikEl.mjs} +1 -1
- package/{node/esm/BIxWkCV-r5U5zPnQ.mjs → browser/esm/C1TlAj8cFI90ziZT.mjs} +51 -11
- package/browser/esm/{Ctxig2_c-GErg911.mjs → C2WtsJFzD2GtwSHc.mjs} +69 -4
- package/{node/esm/BM0KaGfI1Lqav17f.mjs → browser/esm/C2nw0NszguSU0idO.mjs} +1 -1
- package/browser/esm/{AuzqFslmIMxseCn8.mjs → CXDwT-uLbi_ZUF6Q.mjs} +1 -1
- package/browser/esm/{jFM2MqBdxFWP6QmN.mjs → CXvEGkvOOLo4v17T.mjs} +1 -1
- package/browser/esm/{B2b-ZmAhe94pNDT0.mjs → CYtUFqOZCtbGw6Sa.mjs} +1 -1
- package/browser/esm/{DIUPlZfIoj507k-C.mjs → CpGJ_hA0h7CW4Jwu.mjs} +1 -1
- package/{node/esm/CWI62PClHru85-mL.mjs → browser/esm/CrfZkfvKRkK2qzpP.mjs} +1 -1
- package/browser/esm/{BHG0YIMg5kOV3mNl.mjs → D-w_d2PrWN8kwM-Z.mjs} +1 -1
- package/browser/esm/{VRXC1SwOYSkv1Vs4.mjs → DG5YNbA9Ya6Uu3DG.mjs} +1 -1
- package/{node/esm/ymPI-MJUjuYe2n5v.mjs → browser/esm/DO9cbfqY2roOBQQi.mjs} +1 -1
- package/{node/esm/Co7O0P5yM1i0exNK.mjs → browser/esm/DYoyWWN86dEdpzVg.mjs} +1 -1
- package/browser/esm/{wDeMNrClyQscDTwZ.mjs → D_PYZQxUASNNORTU.mjs} +48 -2
- package/{node/esm/DjFalvyAcEOwNagC.mjs → browser/esm/KekfJtUQq6sPOmPq.mjs} +1 -1
- package/browser/esm/{DiV1y5wtlmlsRDfm.mjs → PDRj7r-fmSBrQgPS.mjs} +1 -1
- package/browser/esm/index.mjs +5186 -5889
- package/licenses/dependencies.txt +0 -33
- package/node/esm/{DQXZXiayIDbfnOUM.mjs → -sN4SmS9cUOrcjVR.mjs} +1 -1
- package/node/esm/{K0CU2XaCnJJwh9a5.mjs → 0Q46gxHg8afOLJ7K.mjs} +37 -3
- package/{browser/esm/B2zbBC2YuaYszbHd.mjs → node/esm/B-Ig6HWcV53g7Zy0.mjs} +1 -1
- package/node/esm/{CB4iUafw8x-4z_ff.mjs → B52kG70ukWJKrVHl.mjs} +2 -5
- package/node/esm/{BXyQ76W9hObzOdf2.mjs → B9GCCzx3ZtHrtgsZ.mjs} +1 -1
- package/{browser/esm/CmxGNGhfoNTz4Ku7.mjs → node/esm/BCRhRyTDe0QO3_TF.mjs} +2 -2
- package/node/esm/{Dnrd8jP_j1AWCUX6.mjs → BN0QCtL-dZU8U-hd.mjs} +1 -1
- package/node/esm/{8_dh9QnzvNBCvWpp.mjs → Bp4XujtHH5z4dKlz.mjs} +1 -1
- package/{browser/esm/BIxWkCV-r5U5zPnQ.mjs → node/esm/C--VBbIp253pJfw9.mjs} +51 -11
- package/node/esm/{BsBiI5HHw7jjXgp5.mjs → C-jlV3objhN9hpyt.mjs} +1 -1
- package/node/esm/{D1iK18Nn8mRQo6Fk.mjs → C1Qq-yVzO0uZUnVb.mjs} +1 -1
- package/node/esm/{Ctxig2_c-GErg911.mjs → C2WtsJFzD2GtwSHc.mjs} +69 -4
- package/{browser/esm/BM0KaGfI1Lqav17f.mjs → node/esm/C2nw0NszguSU0idO.mjs} +1 -1
- package/node/esm/{B2b-ZmAhe94pNDT0.mjs → CYtUFqOZCtbGw6Sa.mjs} +1 -1
- package/node/esm/{DcSbVdpEmRbpaZf0.mjs → Cf28UVIhJr5Y-_24.mjs} +1 -1
- package/node/esm/{wDeMNrClyQscDTwZ.mjs → CkO4Hx9aLq7m3emI.mjs} +48 -2
- package/{browser/esm/CWI62PClHru85-mL.mjs → node/esm/CrfZkfvKRkK2qzpP.mjs} +1 -1
- package/node/esm/{BHG0YIMg5kOV3mNl.mjs → D-w_d2PrWN8kwM-Z.mjs} +1 -1
- package/node/esm/{VRXC1SwOYSkv1Vs4.mjs → DG5YNbA9Ya6Uu3DG.mjs} +1 -1
- package/{browser/esm/ymPI-MJUjuYe2n5v.mjs → node/esm/DO9cbfqY2roOBQQi.mjs} +1 -1
- package/{browser/esm/Co7O0P5yM1i0exNK.mjs → node/esm/DYoyWWN86dEdpzVg.mjs} +1 -1
- package/{browser/esm/DjFalvyAcEOwNagC.mjs → node/esm/KekfJtUQq6sPOmPq.mjs} +1 -1
- package/node/esm/{DiV1y5wtlmlsRDfm.mjs → PDRj7r-fmSBrQgPS.mjs} +1 -1
- package/node/esm/index.mjs +5778 -4648
- package/package.json +6 -8
- package/types/src/.generated/decl/dateTime/Date.decl.d.ts +2 -1
- package/types/src/.generated/decl/information/Information.decl.d.ts +2 -1
- package/types/src/.generated/decl/lookupReference/Reference.decl.d.ts +2 -1
- package/types/src/.generated/decl/mathTrig/Math.decl.d.ts +2 -1
- package/types/src/.generated/desc/dateTime/Date.desc.d.ts +2 -1
- package/types/src/.generated/desc/information/Information.desc.d.ts +2 -1
- package/types/src/.generated/desc/lookupReference/Reference.desc.d.ts +2 -1
- package/types/src/.generated/desc/mathTrig/Math.desc.d.ts +2 -1
- package/types/src/_utils/AValues.d.ts +30 -0
- package/types/src/_utils/AggregateIFS.d.ts +5 -3
- package/types/src/_utils/Arithmetic.d.ts +36 -0
- package/types/src/_utils/Combinatorics.d.ts +20 -0
- package/types/src/_utils/Distributions.d.ts +94 -0
- package/types/src/_utils/Errors.d.ts +1 -20
- package/types/src/_utils/FirstCell.d.ts +32 -0
- package/types/src/_utils/Matrix.d.ts +31 -0
- package/types/src/_utils/SpecialFunctions.d.ts +91 -0
- package/types/src/_utils/X87.d.ts +28 -0
- package/types/src/database/Database.d.ts +25 -25
- package/types/src/dateTime/Date.d.ts +250 -41
- package/types/src/engineering/Bessel.d.ts +9 -9
- package/types/src/engineering/Bitwise.d.ts +35 -35
- package/types/src/engineering/Convert.d.ts +3 -3
- package/types/src/engineering/Engineering.d.ts +5 -5
- package/types/src/engineering/Error.d.ts +9 -9
- package/types/src/engineering/Imaginary.d.ts +54 -54
- package/types/src/information/Information.d.ts +124 -55
- package/types/src/japanese/Date.d.ts +2 -2
- package/types/src/japanese/Text.d.ts +1 -1
- package/types/src/logical/Logical.d.ts +45 -39
- package/types/src/lookupReference/Reference.d.ts +212 -86
- package/types/src/mathTrig/Math.d.ts +499 -149
- package/types/src/mathTrig/Trig.d.ts +26 -22
- package/types/src/operators/Operators.d.ts +15 -15
- package/types/src/statistical/Distribution.d.ts +157 -161
- package/types/src/statistical/Statistical.d.ts +37 -37
- package/types/src/testing/Testing.d.ts +2 -2
- package/types/src/text/Text.d.ts +119 -54
- package/types/src/thai/Text.d.ts +1 -1
- package/types/src/web/FilterXML.d.ts +1 -1
- package/types/src/web/Web.d.ts +2 -2
- package/browser/cjs/1XrWGMP3GmsQOMIX.cjs +0 -1
- package/browser/cjs/49_x589Na12sizKK.cjs +0 -1
- package/browser/cjs/4nReftSsKWmnRdtf.cjs +0 -1
- package/browser/cjs/507hQYooKKjnRzsZ.cjs +0 -1
- package/browser/cjs/BAxVLKkxFgI6cXnR.cjs +0 -1
- package/browser/cjs/BK0SCfN_VZYqBxoQ.cjs +0 -1
- package/browser/cjs/Btc0Nzu40VYOpzLX.cjs +0 -1
- package/browser/cjs/C9C-pr-T_ThweQX9.cjs +0 -1
- package/browser/cjs/CJYewYJ5Z3iojl7J.cjs +0 -1
- package/browser/cjs/CRx1WvmgBjT8WVyB.cjs +0 -1
- package/browser/cjs/CV4KQsHluMqo1I2Q.cjs +0 -1
- package/browser/cjs/CXlzsh_WHCOsErJ1.cjs +0 -1
- package/browser/cjs/CpJJh4UnFl1_qFui.cjs +0 -1
- package/browser/cjs/CrZlUtdX1h2RUnCP.cjs +0 -1
- package/browser/cjs/D8-KovdJ0LjxqCe2.cjs +0 -1
- package/browser/cjs/DCIlWcGDrp-5PDoA.cjs +0 -1
- package/browser/cjs/DDnGLOLTqLFsdUDS.cjs +0 -1
- package/browser/cjs/DG2kqsWRUtVugjay.cjs +0 -1
- package/browser/cjs/DM7-R_ltoLbA9jde.cjs +0 -1
- package/browser/cjs/DNKyaSruDogoBd2H.cjs +0 -1
- package/browser/cjs/Du4jBiFxRIF1OjD4.cjs +0 -1
- package/browser/cjs/EeOVMRq7TuptFKTc.cjs +0 -1
- package/browser/cjs/Kvn916ebqGc4t6hv.cjs +0 -1
- package/browser/cjs/aONv0Ys3C8xmnaR8.cjs +0 -1
- package/browser/cjs/index.cjs +0 -1
- package/browser/cjs/z_rZE1OHFPpdGBh4.cjs +0 -1
- package/browser/esm/74anAHR6YDREjbgI.mjs +0 -24
- package/browser/esm/BebVPCumXxQqABDP.mjs +0 -21
- package/node/esm/74anAHR6YDREjbgI.mjs +0 -24
- package/node/esm/BebVPCumXxQqABDP.mjs +0 -21
- package/types/src/.generated/decl/lookupReference/GroupBy.decl.d.ts +0 -4
- package/types/src/.generated/decl/lookupReference/PivotBy.decl.d.ts +0 -4
- package/types/src/.generated/desc/lookupReference/GroupBy.desc.d.ts +0 -4
- package/types/src/.generated/desc/lookupReference/PivotBy.desc.d.ts +0 -4
- package/types/src/lookupReference/GroupBy.d.ts +0 -19
- package/types/src/lookupReference/PivotBy.d.ts +0 -24
|
@@ -1,430 +1,780 @@
|
|
|
1
|
-
import { IRange, Scalar, IReferenceRange, AcceptError,
|
|
1
|
+
import { IRange, Scalar, Volatile, IReferenceRange, AcceptError, Repeating, Omittable, NoLift, NoFilter, ReportType } from '@sheetxl/primitives';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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:
|
|
280
|
+
export declare function FACTDOUBLE(number: NoLift<Omittable<AcceptError<Scalar>>>): number;
|
|
139
281
|
/**
|
|
140
|
-
*
|
|
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
|
-
*
|
|
304
|
+
* Returns the greatest common divisor.
|
|
163
305
|
* @param number are 1 to 255 values.
|
|
164
306
|
*/
|
|
165
|
-
export declare function GCD(number:
|
|
307
|
+
export declare function GCD(number: NoFilter<number>[]): number;
|
|
166
308
|
/**
|
|
167
|
-
*
|
|
309
|
+
* Rounds a number down to the nearest integer.
|
|
168
310
|
* @param number is the real number you want to round down to an integer.
|
|
169
311
|
*/
|
|
170
312
|
export declare function INT(number: number): number;
|
|
171
313
|
/**
|
|
314
|
+
* Rounds a number up to the nearest integer.
|
|
172
315
|
* @name ISO.CEILING
|
|
173
|
-
* @summary Rounds a number up to the nearest integer.
|
|
174
316
|
* @param number is the real number you want to round up to an integer.
|
|
175
317
|
* @param significance is the multiple to which you want to round number.
|
|
176
318
|
* @category Compatibility
|
|
177
319
|
*/
|
|
178
|
-
export declare function ISO_CEILING(number: number, significance?: number): number;
|
|
320
|
+
export declare function ISO_CEILING(number: number, significance?: Omittable<number>): number;
|
|
179
321
|
/**
|
|
180
|
-
*
|
|
322
|
+
* Returns the least common multiple.
|
|
181
323
|
* @param number are 1 to 255 values for which you want the least common multiple.
|
|
182
324
|
*/
|
|
183
|
-
export declare function LCM(number:
|
|
325
|
+
export declare function LCM(number: NoFilter<number>[]): number;
|
|
184
326
|
/**
|
|
185
|
-
*
|
|
327
|
+
* Returns the natural logarithm of a number.
|
|
186
328
|
* @param number is the positive real number for which you want the natural logarithm.
|
|
187
329
|
*/
|
|
188
330
|
export declare function LN(number: number): number;
|
|
189
331
|
/**
|
|
190
|
-
*
|
|
332
|
+
* Returns the logarithm of a number to the base you specify.
|
|
191
333
|
* @param number is the positive real number for which you want the logarithm.
|
|
192
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)`.
|
|
193
340
|
*/
|
|
194
341
|
export declare function LOG(number: number, base?: number): number;
|
|
195
342
|
/**
|
|
196
|
-
*
|
|
343
|
+
* Returns the base-10 logarithm of a number.
|
|
197
344
|
* @param number is the positive real number for which you want the base-10 logarithm.
|
|
198
345
|
*/
|
|
199
346
|
export declare function LOG10(number: number): number;
|
|
200
347
|
/**
|
|
201
|
-
*
|
|
348
|
+
* Returns the matrix determinant of an array.
|
|
202
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.
|
|
203
358
|
*/
|
|
204
|
-
export declare function MDETERM(array: IRange
|
|
359
|
+
export declare function MDETERM(array: IRange): Scalar;
|
|
205
360
|
/**
|
|
206
|
-
*
|
|
361
|
+
* Returns the inverse matrix for the matrix stored in an array.
|
|
207
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!`.
|
|
208
371
|
*/
|
|
209
|
-
export declare function MINVERSE(array: IRange
|
|
372
|
+
export declare function MINVERSE(array: IRange): Scalar[][];
|
|
210
373
|
/**
|
|
211
|
-
*
|
|
374
|
+
* Returns the matrix product of two arrays, an array with the same number of rows as array1 and columns as array2.
|
|
212
375
|
* @param array1 is the first array of numbers to multiply and must have the same number of columns as Array2 has rows.
|
|
213
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.
|
|
214
385
|
*/
|
|
215
|
-
export declare function MMULT(array1: IRange
|
|
386
|
+
export declare function MMULT(array1: IRange, array2: IRange): Scalar[][];
|
|
216
387
|
/**
|
|
217
|
-
*
|
|
388
|
+
* Returns the remainder after a number is divided by a divisor.
|
|
218
389
|
* @param number is the number for which you want to find the remainder after the division is performed.
|
|
219
390
|
* @param divisor is the number by which you want to divide Number.
|
|
220
391
|
*/
|
|
221
392
|
export declare function MOD(number: number, divisor: number): number;
|
|
222
393
|
/**
|
|
223
|
-
*
|
|
394
|
+
* Returns a number rounded to the desired multiple.
|
|
224
395
|
* @param number is the value to round.
|
|
225
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).
|
|
226
400
|
*/
|
|
227
|
-
export declare function MROUND(number:
|
|
401
|
+
export declare function MROUND(number: NoLift<Omittable<AcceptError<Scalar>>>, multiple: NoLift<Omittable<AcceptError<Scalar>>>): number;
|
|
228
402
|
/**
|
|
229
|
-
*
|
|
403
|
+
* Returns the multinomial of a set of numbers.
|
|
230
404
|
* @param number are 1 to 255 values for which you want the multinomial.
|
|
231
405
|
*/
|
|
232
|
-
export declare function MULTINOMIAL(number: number[]): number;
|
|
406
|
+
export declare function MULTINOMIAL(number: NoFilter<number>[]): number;
|
|
233
407
|
/**
|
|
234
|
-
*
|
|
408
|
+
* Returns the unit matrix for the specified dimension.
|
|
235
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.
|
|
236
418
|
*/
|
|
237
419
|
export declare function MUNIT(dimension: number): IRange;
|
|
238
420
|
/**
|
|
239
|
-
*
|
|
421
|
+
* Rounds a positive number up and negative number down to the nearest odd integer.
|
|
240
422
|
* @param number is the value to round.
|
|
241
423
|
*/
|
|
242
424
|
export declare function ODD(number: number): number;
|
|
243
425
|
/**
|
|
244
|
-
*
|
|
426
|
+
* Returns the percentage of a subset of a given data set.
|
|
245
427
|
* @param dataSubset is the subset.
|
|
246
428
|
* @param dataAll is the data set.
|
|
247
429
|
*/
|
|
248
|
-
export declare function PERCENTOF(dataSubset: IRange<number
|
|
430
|
+
export declare function PERCENTOF(dataSubset: ReportType<IRange<number>>, dataAll: ReportType<IRange<number>>): number;
|
|
249
431
|
/**
|
|
250
|
-
*
|
|
432
|
+
* Returns the value of Pi, 3.14159265358979, accurate to 15 digits.
|
|
251
433
|
*/
|
|
252
434
|
export declare function PI(): number;
|
|
253
435
|
/**
|
|
254
|
-
*
|
|
436
|
+
* Returns the result of a number raised to a power.
|
|
255
437
|
* @param number is the base number, any real number.
|
|
256
438
|
* @param power is the exponent, to which the base number is raised.
|
|
257
439
|
*/
|
|
258
440
|
export declare function POWER(number: number, power: number): number;
|
|
259
441
|
/**
|
|
260
|
-
*
|
|
442
|
+
* Multiplies all the numbers given as arguments.
|
|
261
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.
|
|
262
452
|
*/
|
|
263
453
|
export declare function PRODUCT(number: IRange<number>[]): number;
|
|
264
454
|
/**
|
|
265
|
-
*
|
|
455
|
+
* Returns the integer portion of a division.
|
|
266
456
|
* @param numerator is the dividend.
|
|
267
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.
|
|
268
461
|
*/
|
|
269
|
-
export declare function QUOTIENT(numerator:
|
|
462
|
+
export declare function QUOTIENT(numerator: NoLift<Omittable<AcceptError<Scalar>>>, denominator: NoLift<Omittable<AcceptError<Scalar>>>): number;
|
|
270
463
|
/**
|
|
271
|
-
*
|
|
464
|
+
* Converts degrees to radians.
|
|
272
465
|
* @param angle is an angle in degrees that you want to convert.
|
|
273
466
|
*/
|
|
274
467
|
export declare function RADIANS(angle: number): number;
|
|
275
468
|
/**
|
|
276
|
-
*
|
|
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.
|
|
277
473
|
*/
|
|
278
|
-
export declare function RAND(): number
|
|
474
|
+
export declare function RAND(): Volatile<number>;
|
|
279
475
|
/**
|
|
280
|
-
*
|
|
476
|
+
* Returns an array of random numbers.
|
|
281
477
|
* @param rows the number of rows in the returned array.
|
|
282
478
|
* @param columns the number of columns in the returned array.
|
|
283
479
|
* @param min the minimum number you would like returned.
|
|
284
480
|
* @param max the maximum number you would like returned.
|
|
285
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.
|
|
286
491
|
*/
|
|
287
|
-
export declare function RANDARRAY(rows?: number
|
|
492
|
+
export declare function RANDARRAY(rows?: Omittable<number>, columns?: Omittable<number>, min?: Omittable<number>, max?: Omittable<number>, integer?: Omittable<boolean>): Volatile<IRange>;
|
|
288
493
|
/**
|
|
289
|
-
*
|
|
494
|
+
* Returns a random number between the numbers you specify.
|
|
290
495
|
* @param bottom is the smallest integer RANDBETWEEN will return.
|
|
291
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`.
|
|
292
505
|
*/
|
|
293
|
-
export declare function RANDBETWEEN(bottom: Scalar
|
|
506
|
+
export declare function RANDBETWEEN(bottom: NoLift<Omittable<AcceptError<Scalar>>>, top: NoLift<Omittable<AcceptError<Scalar>>>): Volatile<number>;
|
|
294
507
|
/**
|
|
295
|
-
*
|
|
508
|
+
* Converts an Arabic numeral to Roman, as text.
|
|
296
509
|
* @param number is the Arabic numeral you want to convert.
|
|
297
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.
|
|
298
518
|
*/
|
|
299
|
-
export declare function ROMAN(number: number, form?:
|
|
519
|
+
export declare function ROMAN(number: number, form?: Omittable<Scalar>): Scalar;
|
|
300
520
|
/**
|
|
301
|
-
*
|
|
521
|
+
* Rounds a number to a specified number of digits.
|
|
302
522
|
* @param number is the number you want to round.
|
|
303
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.
|
|
304
524
|
*/
|
|
305
525
|
export declare function ROUND(number: number, numDigits: number): number;
|
|
306
526
|
/**
|
|
307
|
-
*
|
|
527
|
+
* Rounds a number down, toward zero.
|
|
308
528
|
* @param number is any real number that you want rounded down.
|
|
309
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.
|
|
310
530
|
*/
|
|
311
531
|
export declare function ROUNDDOWN(number: number, numDigits: number): number;
|
|
312
532
|
/**
|
|
313
|
-
*
|
|
533
|
+
* Rounds a number up, away from zero.
|
|
314
534
|
* @param number is any real number that you want rounded up.
|
|
315
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.
|
|
316
536
|
*/
|
|
317
537
|
export declare function ROUNDUP(number: number, numDigits: number): number;
|
|
318
538
|
/**
|
|
319
|
-
*
|
|
539
|
+
* Returns a sequence of numbers.
|
|
320
540
|
* @param rows the number of rows to return.
|
|
321
541
|
* @param columns the number of columns to return.
|
|
322
542
|
* @param start the first number in the sequence.
|
|
323
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.
|
|
324
549
|
*/
|
|
325
550
|
export declare function SEQUENCE(rows: Omittable<number>, columns?: Omittable<number>, start?: Omittable<number>, step?: Omittable<number>): IRange;
|
|
326
551
|
/**
|
|
327
|
-
*
|
|
552
|
+
* Returns the sum of a power series based on the formula.
|
|
328
553
|
* @param x is the input value to the power series.
|
|
329
554
|
* @param n is the initial power to which you want to raise x.
|
|
330
555
|
* @param m is the step by which to increase n for each term in the series.
|
|
331
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.
|
|
332
570
|
*/
|
|
333
|
-
export declare function SERIESSUM(x:
|
|
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;
|
|
334
572
|
/**
|
|
335
|
-
*
|
|
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.
|
|
336
574
|
* @param number is any real number.
|
|
337
575
|
*/
|
|
338
576
|
export declare function SIGN(number: number): number;
|
|
339
577
|
/**
|
|
340
|
-
*
|
|
578
|
+
* Returns the square root of a number.
|
|
341
579
|
* @param number is the number for which you want the square root.
|
|
342
580
|
*/
|
|
343
581
|
export declare function SQRT(number: number): number;
|
|
344
582
|
/**
|
|
345
|
-
*
|
|
583
|
+
* Returns the square root of (number * Pi).
|
|
346
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.
|
|
347
593
|
*/
|
|
348
|
-
export declare function SQRTPI(number:
|
|
594
|
+
export declare function SQRTPI(number: NoLift<Omittable<AcceptError<Scalar>>>): number;
|
|
349
595
|
/**
|
|
350
|
-
*
|
|
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.
|
|
351
718
|
* @param functionNum is the number 1 to 11 that specifies the summary function for the subtotal.
|
|
352
719
|
* @param ref are 1 to 254 ranges or references for which you want the subtotal.
|
|
353
720
|
*
|
|
354
721
|
* @remarks
|
|
355
|
-
*
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
| 4 | 104 | MAX |
|
|
361
|
-
| 5 | 105 | MIN |
|
|
362
|
-
| 6 | 106 | PRODUCT |
|
|
363
|
-
| 7 | 107 | STDEV |
|
|
364
|
-
| 8 | 108 | STDEVP |
|
|
365
|
-
| 9 | 109 | SUM |
|
|
366
|
-
| 10 | 110 | VAR |
|
|
367
|
-
| 11 | 111 | VARP |
|
|
368
|
-
*
|
|
369
|
-
* Note: nested SUBTOTAL/AGGREGATE calls within ref ranges are not excluded
|
|
370
|
-
* from the calculation in this implementation. This matches the behavior of
|
|
371
|
-
* most spreadsheet engines but differs from Excel in edge cases where
|
|
372
|
-
* SUBTOTAL results appear within the referenced range.
|
|
373
|
-
*/
|
|
374
|
-
export declare function SUBTOTAL(functionNum: number, // 1 - 11
|
|
375
|
-
ref: AcceptError<IReferenceRange>[]): Scalar;
|
|
376
|
-
/**
|
|
377
|
-
* @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.
|
|
378
727
|
* @param number are 1 to 255 numbers to sum. Logical values and text are ignored in cells, included if typed as arguments.
|
|
379
728
|
*/
|
|
380
729
|
export declare function SUM(number: IRange<number>[]): number;
|
|
381
730
|
/**
|
|
382
|
-
*
|
|
731
|
+
* Adds the cells specified by a given condition or criteria.
|
|
383
732
|
* @param range is the range of cells you want evaluated.
|
|
384
733
|
* @param criteria is the condition or criteria in the form of a number, expression, or text that defines which cells will be added.
|
|
385
734
|
* @param sumRange are the actual cells to sum. If omitted, the cells in range are used.
|
|
386
735
|
*/
|
|
387
|
-
export declare function SUMIF(range:
|
|
736
|
+
export declare function SUMIF(range: IReferenceRange, criteria: AcceptError<Scalar>, sumRange?: IReferenceRange): Scalar;
|
|
388
737
|
/**
|
|
389
|
-
*
|
|
738
|
+
* Adds the cells specified by a given set of conditions or criteria.
|
|
390
739
|
* @param sumRange are the actual cells to sum.
|
|
391
740
|
* @param criteria the ranges to evaluate and the conditions to evaluate them against.
|
|
392
741
|
* @param criteria.criteriaRange is the range of cells you want evaluated for the particular condition.
|
|
393
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.
|
|
394
743
|
*/
|
|
395
|
-
export declare function SUMIFS(sumRange:
|
|
744
|
+
export declare function SUMIFS(sumRange: IReferenceRange, criteria: Repeating<[criteriaRange: IReferenceRange, criteria: AcceptError<Scalar>]>): Scalar;
|
|
396
745
|
/**
|
|
397
|
-
*
|
|
746
|
+
* Returns the sum of the products of corresponding ranges or arrays.
|
|
398
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.
|
|
399
748
|
*/
|
|
400
749
|
export declare function SUMPRODUCT(array: IRange[]): number;
|
|
401
750
|
/**
|
|
402
|
-
*
|
|
751
|
+
* Returns the sum of the squares of the arguments. The arguments can be numbers, arrays, names, or references to cells that contain numbers.
|
|
403
752
|
* @param number are 1 to 255 numbers, arrays, names, or references to arrays for which you want the sum of the squares.
|
|
404
753
|
*/
|
|
405
754
|
export declare function SUMSQ(number: IRange<number>[]): number;
|
|
406
755
|
/**
|
|
407
|
-
*
|
|
756
|
+
* Sums the differences between the squares of two corresponding ranges or arrays.
|
|
408
757
|
* @param arrayX is the first range or array of numbers and can be a number or name, array, or reference that contains numbers.
|
|
409
758
|
* @param arrayY is the second range or array of numbers and can be a number or name, array, or reference that contains numbers.
|
|
410
759
|
*/
|
|
411
|
-
export declare function SUMX2MY2(arrayX:
|
|
760
|
+
export declare function SUMX2MY2(arrayX: IRange, arrayY: IRange): number;
|
|
412
761
|
/**
|
|
413
|
-
*
|
|
762
|
+
* Returns the sum total of the sums of squares of numbers in two corresponding ranges or arrays.
|
|
414
763
|
* @param arrayX is the first range or array of numbers and can be a number or name, array, or reference that contains numbers.
|
|
415
764
|
* @param arrayY is the second range or array of numbers and can be a number or name, array, or reference that contains numbers.
|
|
416
765
|
*/
|
|
417
|
-
export declare function SUMX2PY2(arrayX:
|
|
766
|
+
export declare function SUMX2PY2(arrayX: IRange, arrayY: IRange): number;
|
|
418
767
|
/**
|
|
419
|
-
*
|
|
768
|
+
* Sums the squares of the differences in two corresponding ranges or arrays.
|
|
420
769
|
* @param arrayX is the first range or array of numbers and can be a number or name, array, or reference that contains numbers.
|
|
421
770
|
* @param arrayY is the second range or array of numbers and can be a number or name, array, or reference that contains numbers.
|
|
422
771
|
*/
|
|
423
|
-
export declare function SUMXMY2(arrayX:
|
|
772
|
+
export declare function SUMXMY2(arrayX: IRange, arrayY: IRange): number;
|
|
424
773
|
/**
|
|
425
|
-
*
|
|
774
|
+
* Truncates a number to an integer by removing the decimal, or fractional, part of the number.
|
|
426
775
|
* @param number is the number you want to truncate.
|
|
427
776
|
* @param numDigits is a number specifying the precision of the truncation.
|
|
428
777
|
*/
|
|
429
778
|
export declare function TRUNC(number: number, numDigits?: number): number;
|
|
779
|
+
export {};
|
|
430
780
|
//# sourceMappingURL=Math.d.ts.map
|