@syncfusion/ej2-calculate 35.1.37
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/.eslintrc.json +263 -0
- package/README.md +132 -0
- package/base.d.ts +4 -0
- package/base.js +4 -0
- package/common.d.ts +4 -0
- package/common.js +4 -0
- package/dist/ej2-calculate.umd.min.js +11 -0
- package/dist/ej2-calculate.umd.min.js.map +1 -0
- package/dist/es6/ej2-calculate.es2015.js +24801 -0
- package/dist/es6/ej2-calculate.es2015.js.map +1 -0
- package/dist/es6/ej2-calculate.es5.js +27229 -0
- package/dist/es6/ej2-calculate.es5.js.map +1 -0
- package/dist/global/ej2-calculate.min.js +11 -0
- package/dist/global/ej2-calculate.min.js.map +1 -0
- package/dist/global/index.d.ts +14 -0
- package/formulas.d.ts +4 -0
- package/formulas.js +4 -0
- package/index.d.ts +4 -0
- package/index.js +4 -0
- package/license +10 -0
- package/package.json +30 -0
- package/src/base/calculate-model.d.ts +4 -0
- package/src/base/calculate-model.js +0 -0
- package/src/base/calculate.d.ts +1105 -0
- package/src/base/calculate.js +4720 -0
- package/src/base/index.d.ts +8 -0
- package/src/base/index.js +7 -0
- package/src/base/parser.d.ts +208 -0
- package/src/base/parser.js +1512 -0
- package/src/common/address.d.ts +59 -0
- package/src/common/address.js +96 -0
- package/src/common/cell-ref.d.ts +32 -0
- package/src/common/cell-ref.js +112 -0
- package/src/common/common.d.ts +44 -0
- package/src/common/common.js +134 -0
- package/src/common/enum.d.ts +94 -0
- package/src/common/enum.js +97 -0
- package/src/common/index.d.ts +9 -0
- package/src/common/index.js +8 -0
- package/src/common/interface.d.ts +122 -0
- package/src/common/interface.js +0 -0
- package/src/common/l10n.d.ts +24 -0
- package/src/common/l10n.js +54 -0
- package/src/common/number-date.d.ts +26 -0
- package/src/common/number-date.js +38 -0
- package/src/common/sheet-info.d.ts +10 -0
- package/src/common/sheet-info.js +17 -0
- package/src/common/sort.d.ts +17 -0
- package/src/common/sort.js +44 -0
- package/src/formulas/array.d.ts +47 -0
- package/src/formulas/array.js +718 -0
- package/src/formulas/basic.d.ts +47 -0
- package/src/formulas/basic.js +181 -0
- package/src/formulas/complex-numbers.d.ts +207 -0
- package/src/formulas/complex-numbers.js +549 -0
- package/src/formulas/database.d.ts +152 -0
- package/src/formulas/database.js +579 -0
- package/src/formulas/date-time-extra.d.ts +97 -0
- package/src/formulas/date-time-extra.js +415 -0
- package/src/formulas/date-time-intl.d.ts +57 -0
- package/src/formulas/date-time-intl.js +309 -0
- package/src/formulas/date-time.d.ts +164 -0
- package/src/formulas/date-time.js +1021 -0
- package/src/formulas/engineering-base.d.ts +150 -0
- package/src/formulas/engineering-base.js +404 -0
- package/src/formulas/engineering-bessel.d.ts +65 -0
- package/src/formulas/engineering-bessel.js +167 -0
- package/src/formulas/engineering-convert.d.ts +35 -0
- package/src/formulas/engineering-convert.js +120 -0
- package/src/formulas/engineering-misc.d.ts +64 -0
- package/src/formulas/engineering-misc.js +168 -0
- package/src/formulas/financial-amortization-ecma.d.ts +87 -0
- package/src/formulas/financial-amortization-ecma.js +288 -0
- package/src/formulas/financial-annuity.d.ts +104 -0
- package/src/formulas/financial-annuity.js +419 -0
- package/src/formulas/financial-bond-helpers.d.ts +106 -0
- package/src/formulas/financial-bond-helpers.js +190 -0
- package/src/formulas/financial-cashflow.d.ts +47 -0
- package/src/formulas/financial-cashflow.js +203 -0
- package/src/formulas/financial-coupons.d.ts +227 -0
- package/src/formulas/financial-coupons.js +810 -0
- package/src/formulas/financial-depreciation.d.ts +64 -0
- package/src/formulas/financial-depreciation.js +247 -0
- package/src/formulas/financial-rates.d.ts +54 -0
- package/src/formulas/financial-rates.js +140 -0
- package/src/formulas/financial-securities.d.ts +126 -0
- package/src/formulas/financial-securities.js +488 -0
- package/src/formulas/formula-math-helpers.d.ts +212 -0
- package/src/formulas/formula-math-helpers.js +599 -0
- package/src/formulas/formula-module-base.d.ts +54 -0
- package/src/formulas/formula-module-base.js +125 -0
- package/src/formulas/formula-owner.d.ts +17 -0
- package/src/formulas/formula-owner.js +0 -0
- package/src/formulas/index.d.ts +68 -0
- package/src/formulas/index.js +67 -0
- package/src/formulas/information-advanced.d.ts +44 -0
- package/src/formulas/information-advanced.js +157 -0
- package/src/formulas/information-ecma.d.ts +33 -0
- package/src/formulas/information-ecma.js +88 -0
- package/src/formulas/information-extra.d.ts +146 -0
- package/src/formulas/information-extra.js +351 -0
- package/src/formulas/information.d.ts +34 -0
- package/src/formulas/information.js +78 -0
- package/src/formulas/logical-extra.d.ts +75 -0
- package/src/formulas/logical-extra.js +217 -0
- package/src/formulas/logical.d.ts +83 -0
- package/src/formulas/logical.js +296 -0
- package/src/formulas/lookup-array.d.ts +98 -0
- package/src/formulas/lookup-array.js +364 -0
- package/src/formulas/lookup-ref-extra.d.ts +64 -0
- package/src/formulas/lookup-ref-extra.js +180 -0
- package/src/formulas/lookup-ref.d.ts +84 -0
- package/src/formulas/lookup-ref.js +263 -0
- package/src/formulas/lookup.d.ts +114 -0
- package/src/formulas/lookup.js +881 -0
- package/src/formulas/math-aggregate.d.ts +74 -0
- package/src/formulas/math-aggregate.js +376 -0
- package/src/formulas/math-ceiling-ecma.d.ts +42 -0
- package/src/formulas/math-ceiling-ecma.js +123 -0
- package/src/formulas/math-combinatorics.d.ts +75 -0
- package/src/formulas/math-combinatorics.js +290 -0
- package/src/formulas/math-misc.d.ts +164 -0
- package/src/formulas/math-misc.js +889 -0
- package/src/formulas/math-number.d.ts +76 -0
- package/src/formulas/math-number.js +261 -0
- package/src/formulas/math-rounding.d.ts +115 -0
- package/src/formulas/math-rounding.js +728 -0
- package/src/formulas/math-trig-hyperbolic.d.ts +55 -0
- package/src/formulas/math-trig-hyperbolic.js +113 -0
- package/src/formulas/math-trig.d.ts +165 -0
- package/src/formulas/math-trig.js +334 -0
- package/src/formulas/matrix-base.d.ts +13 -0
- package/src/formulas/matrix-base.js +169 -0
- package/src/formulas/matrix.d.ts +64 -0
- package/src/formulas/matrix.js +161 -0
- package/src/formulas/regression-ecma.d.ts +66 -0
- package/src/formulas/regression-ecma.js +234 -0
- package/src/formulas/statistical-advanced.d.ts +125 -0
- package/src/formulas/statistical-advanced.js +756 -0
- package/src/formulas/statistical-correlation.d.ts +75 -0
- package/src/formulas/statistical-correlation.js +198 -0
- package/src/formulas/statistical-dispersion.d.ts +108 -0
- package/src/formulas/statistical-dispersion.js +337 -0
- package/src/formulas/statistical-distribution-extended.d.ts +176 -0
- package/src/formulas/statistical-distribution-extended.js +668 -0
- package/src/formulas/statistical-distribution.d.ts +104 -0
- package/src/formulas/statistical-distribution.js +368 -0
- package/src/formulas/statistical-ecma.d.ts +95 -0
- package/src/formulas/statistical-ecma.js +392 -0
- package/src/formulas/statistical-extended.d.ts +136 -0
- package/src/formulas/statistical-extended.js +340 -0
- package/src/formulas/statistical-ifs.d.ts +46 -0
- package/src/formulas/statistical-ifs.js +180 -0
- package/src/formulas/statistical-moments.d.ts +84 -0
- package/src/formulas/statistical-moments.js +269 -0
- package/src/formulas/statistical-percentile.d.ts +56 -0
- package/src/formulas/statistical-percentile.js +195 -0
- package/src/formulas/statistical-sample-base.d.ts +14 -0
- package/src/formulas/statistical-sample-base.js +124 -0
- package/src/formulas/statistical.d.ts +135 -0
- package/src/formulas/statistical.js +542 -0
- package/src/formulas/text-advanced.d.ts +64 -0
- package/src/formulas/text-advanced.js +222 -0
- package/src/formulas/text-ecma.d.ts +54 -0
- package/src/formulas/text-ecma.js +106 -0
- package/src/formulas/text-extra.d.ts +216 -0
- package/src/formulas/text-extra.js +657 -0
- package/src/formulas/text.d.ts +125 -0
- package/src/formulas/text.js +628 -0
- package/src/global.js +1 -0
- package/src/index.d.ts +14 -0
- package/src/index.js +14 -0
- package/tslint.json +111 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Calculate } from '../base/index';
|
|
2
|
+
import { IBasicFormula } from '../common/index';
|
|
3
|
+
import { FormulaOwner } from './formula-owner';
|
|
4
|
+
/**
|
|
5
|
+
* Central registry that composes all built-in formula category modules and binds them to the Calculate engine.
|
|
6
|
+
*
|
|
7
|
+
* Instantiated by the {@link Calculate} constructor. Each category module contributes
|
|
8
|
+
* `formulas` metadata and `Compute*` handlers that are registered into
|
|
9
|
+
* {@link Calculate.getLibraryFormulas}.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* // Constructed automatically:
|
|
14
|
+
* const engine = new Calculate();
|
|
15
|
+
* engine.getFunction('SUM'); // bound ComputeSUM handler
|
|
16
|
+
* ```
|
|
17
|
+
* @hidden
|
|
18
|
+
*/
|
|
19
|
+
export declare class BasicFormulas implements FormulaOwner {
|
|
20
|
+
parent: Calculate;
|
|
21
|
+
/** Catalog of built-in formula metadata and bound Compute handlers. */
|
|
22
|
+
formulas: IBasicFormula[];
|
|
23
|
+
/** @hidden */
|
|
24
|
+
isConcat: boolean;
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
/**
|
|
27
|
+
* @param {Object} parent - Calculate engine instance that owns formula registration.
|
|
28
|
+
*/
|
|
29
|
+
constructor(parent?: Calculate);
|
|
30
|
+
/**
|
|
31
|
+
* init helper.
|
|
32
|
+
*
|
|
33
|
+
* @returns {void} - init result.
|
|
34
|
+
*/
|
|
35
|
+
private init;
|
|
36
|
+
/**
|
|
37
|
+
* Registers one formula handler on the parent Calculate engine.
|
|
38
|
+
*
|
|
39
|
+
* @param {string} formulaName - Uppercase formula name key.
|
|
40
|
+
* @param {Function} functionName - Bound Compute handler.
|
|
41
|
+
* @param {string} formulaCategory - Formula category label.
|
|
42
|
+
* @param {string} description - Human-readable formula description.
|
|
43
|
+
* @returns {void}
|
|
44
|
+
* @internal
|
|
45
|
+
*/
|
|
46
|
+
private addFormulaCollection;
|
|
47
|
+
}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { getValue } from '@syncfusion/ej2-base';
|
|
2
|
+
import { MathAggregateFormulas } from './math-aggregate';
|
|
3
|
+
import { MathRoundingFormulas } from './math-rounding';
|
|
4
|
+
import { MathMiscFormulas } from './math-misc';
|
|
5
|
+
import { MathTrigFormulas } from './math-trig';
|
|
6
|
+
import { MathTrigHyperbolicFormulas } from './math-trig-hyperbolic';
|
|
7
|
+
import { MathCombinatoricsFormulas } from './math-combinatorics';
|
|
8
|
+
import { MathNumberFormulas } from './math-number';
|
|
9
|
+
import { MatrixFormulas } from './matrix';
|
|
10
|
+
import { EngineeringBaseFormulas } from './engineering-base';
|
|
11
|
+
import { EngineeringMiscFormulas } from './engineering-misc';
|
|
12
|
+
import { EngineeringConvertFormulas } from './engineering-convert';
|
|
13
|
+
import { EngineeringBesselFormulas } from './engineering-bessel';
|
|
14
|
+
import { FinancialAnnuityFormulas } from './financial-annuity';
|
|
15
|
+
import { FinancialDepreciationFormulas } from './financial-depreciation';
|
|
16
|
+
import { FinancialRatesFormulas } from './financial-rates';
|
|
17
|
+
import { FinancialCashflowFormulas } from './financial-cashflow';
|
|
18
|
+
import { FinancialSecuritiesFormulas } from './financial-securities';
|
|
19
|
+
import { StatisticalFormulas } from './statistical';
|
|
20
|
+
import { StatisticalAdvancedFormulas } from './statistical-advanced';
|
|
21
|
+
import { StatisticalDispersionFormulas } from './statistical-dispersion';
|
|
22
|
+
import { StatisticalMomentsFormulas } from './statistical-moments';
|
|
23
|
+
import { StatisticalCorrelationFormulas } from './statistical-correlation';
|
|
24
|
+
import { StatisticalPercentileFormulas } from './statistical-percentile';
|
|
25
|
+
import { StatisticalDistributionFormulas } from './statistical-distribution';
|
|
26
|
+
import { StatisticalIfsFormulas } from './statistical-ifs';
|
|
27
|
+
import { StatisticalExtendedFormulas } from './statistical-extended';
|
|
28
|
+
import { StatisticalDistributionExtendedFormulas } from './statistical-distribution-extended';
|
|
29
|
+
import { ComplexNumbersFormulas } from './complex-numbers';
|
|
30
|
+
import { DateTimeFormulas } from './date-time';
|
|
31
|
+
import { DateTimeExtraFormulas } from './date-time-extra';
|
|
32
|
+
import { LogicalFormulas } from './logical';
|
|
33
|
+
import { LogicalExtraFormulas } from './logical-extra';
|
|
34
|
+
import { LookupFormulas } from './lookup';
|
|
35
|
+
import { LookupRefFormulas } from './lookup-ref';
|
|
36
|
+
import { LookupRefExtraFormulas } from './lookup-ref-extra';
|
|
37
|
+
import { LookupArrayFormulas } from './lookup-array';
|
|
38
|
+
import { ArrayFormulas } from './array';
|
|
39
|
+
import { TextFormulas } from './text';
|
|
40
|
+
import { TextExtraFormulas } from './text-extra';
|
|
41
|
+
import { TextAdvancedFormulas } from './text-advanced';
|
|
42
|
+
import { InformationFormulas } from './information';
|
|
43
|
+
import { InformationExtraFormulas } from './information-extra';
|
|
44
|
+
import { InformationAdvancedFormulas } from './information-advanced';
|
|
45
|
+
import { DateTimeIntlFormulas } from './date-time-intl';
|
|
46
|
+
import { MathCeilingEcmaFormulas } from './math-ceiling-ecma';
|
|
47
|
+
import { InformationEcmaFormulas } from './information-ecma';
|
|
48
|
+
import { TextEcmaFormulas } from './text-ecma';
|
|
49
|
+
import { FinancialCouponsFormulas } from './financial-coupons';
|
|
50
|
+
import { FinancialAmortizationEcmaFormulas } from './financial-amortization-ecma';
|
|
51
|
+
import { StatisticalEcmaFormulas } from './statistical-ecma';
|
|
52
|
+
import { DatabaseFormulas } from './database';
|
|
53
|
+
import { RegressionEcmaFormulas } from './regression-ecma';
|
|
54
|
+
/**
|
|
55
|
+
* Central registry that composes all built-in formula category modules and binds them to the Calculate engine.
|
|
56
|
+
*
|
|
57
|
+
* Instantiated by the {@link Calculate} constructor. Each category module contributes
|
|
58
|
+
* `formulas` metadata and `Compute*` handlers that are registered into
|
|
59
|
+
* {@link Calculate.getLibraryFormulas}.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```ts
|
|
63
|
+
* // Constructed automatically:
|
|
64
|
+
* const engine = new Calculate();
|
|
65
|
+
* engine.getFunction('SUM'); // bound ComputeSUM handler
|
|
66
|
+
* ```
|
|
67
|
+
* @hidden
|
|
68
|
+
*/
|
|
69
|
+
var BasicFormulas = /** @class */ (function () {
|
|
70
|
+
/**
|
|
71
|
+
* @param {Object} parent - Calculate engine instance that owns formula registration.
|
|
72
|
+
*/
|
|
73
|
+
function BasicFormulas(parent) {
|
|
74
|
+
/** Catalog of built-in formula metadata and bound Compute handlers. */
|
|
75
|
+
this.formulas = [];
|
|
76
|
+
/** @hidden */
|
|
77
|
+
this.isConcat = false;
|
|
78
|
+
this.parent = parent;
|
|
79
|
+
var modules = [
|
|
80
|
+
new MathAggregateFormulas(this),
|
|
81
|
+
new MathRoundingFormulas(this),
|
|
82
|
+
new MathMiscFormulas(this),
|
|
83
|
+
new MathTrigFormulas(this),
|
|
84
|
+
new MathTrigHyperbolicFormulas(this),
|
|
85
|
+
new MathCombinatoricsFormulas(this),
|
|
86
|
+
new MathNumberFormulas(this),
|
|
87
|
+
new MatrixFormulas(this),
|
|
88
|
+
new EngineeringBaseFormulas(this),
|
|
89
|
+
new EngineeringMiscFormulas(this),
|
|
90
|
+
new EngineeringConvertFormulas(this),
|
|
91
|
+
new EngineeringBesselFormulas(this),
|
|
92
|
+
new FinancialAnnuityFormulas(this),
|
|
93
|
+
new FinancialDepreciationFormulas(this),
|
|
94
|
+
new FinancialRatesFormulas(this),
|
|
95
|
+
new FinancialCashflowFormulas(this),
|
|
96
|
+
new FinancialSecuritiesFormulas(this),
|
|
97
|
+
new StatisticalFormulas(this),
|
|
98
|
+
new StatisticalAdvancedFormulas(this),
|
|
99
|
+
new StatisticalDispersionFormulas(this),
|
|
100
|
+
new StatisticalMomentsFormulas(this),
|
|
101
|
+
new StatisticalCorrelationFormulas(this),
|
|
102
|
+
new StatisticalPercentileFormulas(this),
|
|
103
|
+
new StatisticalDistributionFormulas(this),
|
|
104
|
+
new StatisticalIfsFormulas(this),
|
|
105
|
+
new StatisticalExtendedFormulas(this),
|
|
106
|
+
new StatisticalDistributionExtendedFormulas(this),
|
|
107
|
+
new ComplexNumbersFormulas(this),
|
|
108
|
+
new DateTimeFormulas(this),
|
|
109
|
+
new DateTimeExtraFormulas(this),
|
|
110
|
+
new LogicalFormulas(this),
|
|
111
|
+
new LogicalExtraFormulas(this),
|
|
112
|
+
new LookupFormulas(this),
|
|
113
|
+
new LookupRefFormulas(this),
|
|
114
|
+
new LookupRefExtraFormulas(this),
|
|
115
|
+
new LookupArrayFormulas(this),
|
|
116
|
+
new ArrayFormulas(this),
|
|
117
|
+
new TextFormulas(this),
|
|
118
|
+
new TextExtraFormulas(this),
|
|
119
|
+
new TextAdvancedFormulas(this),
|
|
120
|
+
new InformationFormulas(this),
|
|
121
|
+
new InformationExtraFormulas(this),
|
|
122
|
+
new InformationAdvancedFormulas(this),
|
|
123
|
+
new DateTimeIntlFormulas(this),
|
|
124
|
+
new MathCeilingEcmaFormulas(this),
|
|
125
|
+
new InformationEcmaFormulas(this),
|
|
126
|
+
new TextEcmaFormulas(this),
|
|
127
|
+
new FinancialCouponsFormulas(this),
|
|
128
|
+
new FinancialAmortizationEcmaFormulas(this),
|
|
129
|
+
new StatisticalEcmaFormulas(this),
|
|
130
|
+
new DatabaseFormulas(this),
|
|
131
|
+
new RegressionEcmaFormulas(this)
|
|
132
|
+
];
|
|
133
|
+
for (var m = 0; m < modules.length; m++) {
|
|
134
|
+
var mod = modules[m];
|
|
135
|
+
for (var i = 0; i < mod.formulas.length; i++) {
|
|
136
|
+
var formula = mod.formulas[i];
|
|
137
|
+
this.formulas.push(formula);
|
|
138
|
+
var methodName = 'Compute' + formula.formulaName;
|
|
139
|
+
var handler = formula.formulaName.indexOf('.') > -1
|
|
140
|
+
// eslint-disable-next-line security/detect-object-injection
|
|
141
|
+
? mod[methodName]
|
|
142
|
+
: getValue(methodName, mod);
|
|
143
|
+
if (handler) {
|
|
144
|
+
// eslint-disable-next-line security/detect-object-injection
|
|
145
|
+
this[methodName] = handler.bind(mod);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
this.init();
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* init helper.
|
|
153
|
+
*
|
|
154
|
+
* @returns {void} - init result.
|
|
155
|
+
*/
|
|
156
|
+
BasicFormulas.prototype.init = function () {
|
|
157
|
+
for (var i = 0; i < this.formulas.length; i++) {
|
|
158
|
+
var formula = this.formulas[i];
|
|
159
|
+
var fn = this['Compute' + formula.formulaName];
|
|
160
|
+
this.addFormulaCollection(formula.formulaName.toUpperCase(), fn, formula.category, formula.description);
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
/**
|
|
164
|
+
* Registers one formula handler on the parent Calculate engine.
|
|
165
|
+
*
|
|
166
|
+
* @param {string} formulaName - Uppercase formula name key.
|
|
167
|
+
* @param {Function} functionName - Bound Compute handler.
|
|
168
|
+
* @param {string} formulaCategory - Formula category label.
|
|
169
|
+
* @param {string} description - Human-readable formula description.
|
|
170
|
+
* @returns {void}
|
|
171
|
+
* @internal
|
|
172
|
+
*/
|
|
173
|
+
BasicFormulas.prototype.addFormulaCollection = function (formulaName, functionName, formulaCategory, description) {
|
|
174
|
+
this.parent.libraryFormulas = {
|
|
175
|
+
fName: formulaName, handler: functionName, category: formulaCategory,
|
|
176
|
+
description: description
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
return BasicFormulas;
|
|
180
|
+
}());
|
|
181
|
+
export { BasicFormulas };
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import { IBasicFormula } from '../common/index';
|
|
2
|
+
import { FormulaOwner } from './formula-owner';
|
|
3
|
+
import { FormulaModuleBase } from './formula-module-base';
|
|
4
|
+
/**
|
|
5
|
+
* Complex-number arithmetic, polar/rectangular conversion, and complex transcendental functions.
|
|
6
|
+
*
|
|
7
|
+
* Registers 18 functions including COMPLEX, IMABS, IMAGINARY, IMREAL, IMCONJUGATE, and others.
|
|
8
|
+
*
|
|
9
|
+
* @hidden
|
|
10
|
+
*/
|
|
11
|
+
export declare class ComplexNumbersFormulas extends FormulaModuleBase {
|
|
12
|
+
/** Formula definitions registered with {@link BasicFormulas}. */
|
|
13
|
+
formulas: IBasicFormula[];
|
|
14
|
+
/**
|
|
15
|
+
* @hidden
|
|
16
|
+
* @param {FormulaOwner} owner - Formula registration owner ({@link BasicFormulas}).
|
|
17
|
+
*/
|
|
18
|
+
constructor(owner: FormulaOwner);
|
|
19
|
+
private resolveComplex;
|
|
20
|
+
/**
|
|
21
|
+
* Converts real and imaginary coefficients into a complex number.
|
|
22
|
+
*
|
|
23
|
+
* Excel: `COMPLEX(...)`.
|
|
24
|
+
*
|
|
25
|
+
* @hidden
|
|
26
|
+
* @param {string[]} args - Formula argument tokens from the Calculate engine.
|
|
27
|
+
* @returns {string | number} - Computed Excel-compatible numeric or text result, or an error token such as `#VALUE!`, `#NUM!`, `#N/A`.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* engine.computeFormula('=COMPLEX(1)');
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
ComputeCOMPLEX(...args: string[]): string | number;
|
|
35
|
+
/**
|
|
36
|
+
* Returns the absolute value (modulus) of a complex number.
|
|
37
|
+
*
|
|
38
|
+
* Excel: `IMABS(...)`.
|
|
39
|
+
*
|
|
40
|
+
* @hidden
|
|
41
|
+
* @param {string[]} args - Formula argument tokens from the Calculate engine.
|
|
42
|
+
* @returns {string | number} - Computed Excel-compatible numeric or text result, or an error token such as `#VALUE!`, `#NUM!`, `#N/A`.
|
|
43
|
+
*/
|
|
44
|
+
ComputeIMABS(...args: string[]): string | number;
|
|
45
|
+
/**
|
|
46
|
+
* Returns the imaginary coefficient of a complex number.
|
|
47
|
+
*
|
|
48
|
+
* Excel: `IMAGINARY(...)`.
|
|
49
|
+
*
|
|
50
|
+
* @hidden
|
|
51
|
+
* @param {string[]} args - Formula argument tokens from the Calculate engine.
|
|
52
|
+
* @returns {string | number} - Computed Excel-compatible numeric or text result, or an error token such as `#VALUE!`, `#NUM!`, `#N/A`.
|
|
53
|
+
*/
|
|
54
|
+
ComputeIMAGINARY(...args: string[]): string | number;
|
|
55
|
+
/**
|
|
56
|
+
* Returns the real coefficient of a complex number.
|
|
57
|
+
*
|
|
58
|
+
* Excel: `IMREAL(...)`.
|
|
59
|
+
*
|
|
60
|
+
* @hidden
|
|
61
|
+
* @param {string[]} args - Formula argument tokens from the Calculate engine.
|
|
62
|
+
* @returns {string | number} - Computed Excel-compatible numeric or text result, or an error token such as `#VALUE!`, `#NUM!`, `#N/A`.
|
|
63
|
+
*/
|
|
64
|
+
ComputeIMREAL(...args: string[]): string | number;
|
|
65
|
+
/**
|
|
66
|
+
* Returns the complex conjugate of a complex number.
|
|
67
|
+
*
|
|
68
|
+
* Excel: `IMCONJUGATE(...)`.
|
|
69
|
+
*
|
|
70
|
+
* @hidden
|
|
71
|
+
* @param {string[]} args - Formula argument tokens from the Calculate engine.
|
|
72
|
+
* @returns {string | number} - Computed Excel-compatible numeric or text result, or an error token such as `#VALUE!`, `#NUM!`, `#N/A`.
|
|
73
|
+
*/
|
|
74
|
+
ComputeIMCONJUGATE(...args: string[]): string | number;
|
|
75
|
+
/**
|
|
76
|
+
* Returns the sum of complex numbers.
|
|
77
|
+
*
|
|
78
|
+
* Excel: `IMSUM(...)`.
|
|
79
|
+
*
|
|
80
|
+
*
|
|
81
|
+
* @hidden
|
|
82
|
+
* @param {string[]} args - Formula argument tokens from the Calculate engine.
|
|
83
|
+
* @returns {string | number} - Computed Excel-compatible numeric or text result, or an error token such as `#VALUE!`, `#NUM!`, `#N/A`.
|
|
84
|
+
*/
|
|
85
|
+
ComputeIMSUM(...args: string[]): string | number;
|
|
86
|
+
/**
|
|
87
|
+
* Returns the difference between two complex numbers.
|
|
88
|
+
*
|
|
89
|
+
* Excel: `IMSUB(...)`.
|
|
90
|
+
*
|
|
91
|
+
* @hidden
|
|
92
|
+
* @param {string[]} args - Formula argument tokens from the Calculate engine.
|
|
93
|
+
* @returns {string | number} - Computed Excel-compatible numeric or text result, or an error token such as `#VALUE!`, `#NUM!`, `#N/A`.
|
|
94
|
+
*/
|
|
95
|
+
ComputeIMSUB(...args: string[]): string | number;
|
|
96
|
+
/**
|
|
97
|
+
* Returns the product of complex numbers.
|
|
98
|
+
*
|
|
99
|
+
* Excel: `IMPRODUCT(...)`.
|
|
100
|
+
*
|
|
101
|
+
* @hidden
|
|
102
|
+
* @param {string[]} args - Formula argument tokens from the Calculate engine.
|
|
103
|
+
* @returns {string | number} - Computed Excel-compatible numeric or text result, or an error token such as `#VALUE!`, `#NUM!`, `#N/A`.
|
|
104
|
+
*/
|
|
105
|
+
ComputeIMPRODUCT(...args: string[]): string | number;
|
|
106
|
+
/**
|
|
107
|
+
* Returns the quotient of two complex numbers.
|
|
108
|
+
*
|
|
109
|
+
* Excel: `IMDIV(...)`.
|
|
110
|
+
*
|
|
111
|
+
* @hidden
|
|
112
|
+
* @param {string[]} args - Formula argument tokens from the Calculate engine.
|
|
113
|
+
* @returns {string | number} - Computed Excel-compatible numeric or text result, or an error token such as `#VALUE!`, `#NUM!`, `#N/A`.
|
|
114
|
+
*/
|
|
115
|
+
ComputeIMDIV(...args: string[]): string | number;
|
|
116
|
+
private complexReduce;
|
|
117
|
+
/**
|
|
118
|
+
* Returns the exponential of a complex number.
|
|
119
|
+
*
|
|
120
|
+
* Excel: `IMEXP(...)`.
|
|
121
|
+
*
|
|
122
|
+
* @hidden
|
|
123
|
+
* @param {string[]} args - Formula argument tokens from the Calculate engine.
|
|
124
|
+
* @returns {string | number} - Computed Excel-compatible numeric or text result, or an error token such as `#VALUE!`, `#NUM!`, `#N/A`.
|
|
125
|
+
*/
|
|
126
|
+
ComputeIMEXP(...args: string[]): string | number;
|
|
127
|
+
/**
|
|
128
|
+
* Returns the natural logarithm of a complex number.
|
|
129
|
+
*
|
|
130
|
+
* Excel: `IMLN(...)`.
|
|
131
|
+
*
|
|
132
|
+
* @hidden
|
|
133
|
+
* @param {string[]} args - Formula argument tokens from the Calculate engine.
|
|
134
|
+
* @returns {string | number} - Computed Excel-compatible numeric or text result, or an error token such as `#VALUE!`, `#NUM!`, `#N/A`.
|
|
135
|
+
*/
|
|
136
|
+
ComputeIMLN(...args: string[]): string | number;
|
|
137
|
+
/**
|
|
138
|
+
* Returns the base-10 logarithm of a complex number.
|
|
139
|
+
*
|
|
140
|
+
* Excel: `IMLOG10(...)`.
|
|
141
|
+
*
|
|
142
|
+
* @hidden
|
|
143
|
+
* @param {string[]} args - Formula argument tokens from the Calculate engine.
|
|
144
|
+
* @returns {string | number} - Computed Excel-compatible numeric or text result, or an error token such as `#VALUE!`, `#NUM!`, `#N/A`.
|
|
145
|
+
*/
|
|
146
|
+
ComputeIMLOG10(...args: string[]): string | number;
|
|
147
|
+
/**
|
|
148
|
+
* Returns the base-2 logarithm of a complex number.
|
|
149
|
+
*
|
|
150
|
+
* Excel: `IMLOG2(...)`.
|
|
151
|
+
*
|
|
152
|
+
* @hidden
|
|
153
|
+
* @param {string[]} args - Formula argument tokens from the Calculate engine.
|
|
154
|
+
* @returns {string | number} - Computed Excel-compatible numeric or text result, or an error token such as `#VALUE!`, `#NUM!`, `#N/A`.
|
|
155
|
+
*/
|
|
156
|
+
ComputeIMLOG2(...args: string[]): string | number;
|
|
157
|
+
/**
|
|
158
|
+
* Returns the square root of a complex number.
|
|
159
|
+
*
|
|
160
|
+
* Excel: `IMSQRT(...)`.
|
|
161
|
+
*
|
|
162
|
+
* @hidden
|
|
163
|
+
* @param {string[]} args - Formula argument tokens from the Calculate engine.
|
|
164
|
+
* @returns {string | number} - Computed Excel-compatible numeric or text result, or an error token such as `#VALUE!`, `#NUM!`, `#N/A`.
|
|
165
|
+
*/
|
|
166
|
+
ComputeIMSQRT(...args: string[]): string | number;
|
|
167
|
+
/**
|
|
168
|
+
* Returns a complex number raised to an integer power.
|
|
169
|
+
*
|
|
170
|
+
* Excel: `IMPOWER(...)`.
|
|
171
|
+
*
|
|
172
|
+
* @hidden
|
|
173
|
+
* @param {string[]} args - Formula argument tokens from the Calculate engine.
|
|
174
|
+
* @returns {string | number} - Computed Excel-compatible numeric or text result, or an error token such as `#VALUE!`, `#NUM!`, `#N/A`.
|
|
175
|
+
*/
|
|
176
|
+
ComputeIMPOWER(...args: string[]): string | number;
|
|
177
|
+
/**
|
|
178
|
+
* Returns the argument theta of a complex number in radians.
|
|
179
|
+
*
|
|
180
|
+
* Excel: `IMARGUMENT(...)`.
|
|
181
|
+
*
|
|
182
|
+
* @hidden
|
|
183
|
+
* @param {string[]} args - Formula argument tokens from the Calculate engine.
|
|
184
|
+
* @returns {string | number} - Computed Excel-compatible numeric or text result, or an error token such as `#VALUE!`, `#NUM!`, `#N/A`.
|
|
185
|
+
*/
|
|
186
|
+
ComputeIMARGUMENT(...args: string[]): string | number;
|
|
187
|
+
/**
|
|
188
|
+
* Returns the sine of a complex number.
|
|
189
|
+
*
|
|
190
|
+
* Excel: `IMSIN(...)`.
|
|
191
|
+
*
|
|
192
|
+
* @hidden
|
|
193
|
+
* @param {string[]} args - Formula argument tokens from the Calculate engine.
|
|
194
|
+
* @returns {string | number} - Computed Excel-compatible numeric or text result, or an error token such as `#VALUE!`, `#NUM!`, `#N/A`.
|
|
195
|
+
*/
|
|
196
|
+
ComputeIMSIN(...args: string[]): string | number;
|
|
197
|
+
/**
|
|
198
|
+
* Returns the cosine of a complex number.
|
|
199
|
+
*
|
|
200
|
+
* Excel: `IMCOS(...)`.
|
|
201
|
+
*
|
|
202
|
+
* @hidden
|
|
203
|
+
* @param {string[]} args - Formula argument tokens from the Calculate engine.
|
|
204
|
+
* @returns {string | number} - Computed Excel-compatible numeric or text result, or an error token such as `#VALUE!`, `#NUM!`, `#N/A`.
|
|
205
|
+
*/
|
|
206
|
+
ComputeIMCOS(...args: string[]): string | number;
|
|
207
|
+
}
|