spreadsheet
typeScript/javascript spreadsheet parser, with formulas.
git clone https://git.vogt.world/spreadsheet.git
Log | Files | README.md
← All files
name: dist/Formulas/Math.d.ts
-rw-r--r--
23916
  1/**
  2 * Returns the greatest common divisor of one or more integers.
  3 * @param values - The values or ranges whose factors to consider in a calculation to find the greatest common divisor.
  4 * @returns {number} greatest common divisor.
  5 * @constructor
  6 */
  7declare let GCD: (...values: any[]) => any;
  8/**
  9 * Returns the least common multiple of one or more integers.
 10 * @param values - The values or range whose factors to consider in a calculation to find the least common multiple.
 11 * @returns {number}
 12 * @constructor
 13 */
 14declare let LCM: (...values: any[]) => number;
 15/**
 16 * Returns the the logarithm of a specified Gamma function, base e (Euler's number).
 17 * @param value - The input number. The natural logarithm of Gamma (value) will be returned. Must be positive.
 18 * @returns {number}
 19 * @constructor
 20 */
 21declare let GAMMALN: (value: any) => number;
 22/**
 23 * Returns the absolute value of a number.
 24 * @param value to get the absolute value of.
 25 * @returns {number} absolute value
 26 * @constructor
 27 */
 28declare let ABS: (value: any) => number;
 29/**
 30 * Returns the inverse cosine of a value, in radians.
 31 * @param value The value for which to calculate the inverse cosine. Must be between -1 and 1, inclusive.
 32 * @returns {number} inverse cosine of value
 33 * @constructor
 34 */
 35declare let ACOS: (value: any) => number;
 36/**
 37 * Returns the inverse hyperbolic cosine of a number.
 38 * @param value The value for which to calculate the inverse hyperbolic cosine. Must be greater than or equal to 1.
 39 * @returns {number} to find the inverse hyperbolic cosine for.
 40 * @constructor
 41 */
 42declare let ACOSH: (value: any) => number;
 43/**
 44 * Calculate the hyperbolic arc-cotangent of a value
 45 * @param value number not between -1 and 1 inclusively.
 46 * @returns {number} hyperbolic arc-cotangent
 47 * @constructor
 48 */
 49declare let ACOTH: (value: any) => number;
 50/**
 51 * Returns the inverse sine of a value, in radians.
 52 * @param value The value for which to calculate the inverse sine. Must be between -1 and 1, inclusive.
 53 * @returns {number} inverse sine of input value
 54 * @constructor
 55 */
 56declare let ASIN: (value: any) => number;
 57/**
 58 * Returns the inverse hyperbolic sine of a number.
 59 * @param value The value for which to calculate the inverse hyperbolic sine.
 60 * @returns {number} inverse hyperbolic sine of input
 61 * @constructor
 62 */
 63declare let ASINH: (value: any) => number;
 64/**
 65 * Returns the inverse tangent of a value, in radians.
 66 * @param value The value for which to calculate the inverse tangent.
 67 * @returns {number} inverse tangent of input value
 68 * @constructor
 69 */
 70declare let ATAN: (value: any) => number;
 71/**
 72 * Returns the angle between the x-axis and a line segment from the origin (0,0) to specified coordinate pair (x,y), in radians.
 73 * @param x The x coordinate of the endpoint of the line segment for which to calculate the angle from the x-axis.
 74 * @param y The y coordinate of the endpoint of the line segment for which to calculate the angle from the x-axis.
 75 * @returns {number} angle in radians
 76 * @constructor
 77 */
 78declare let ATAN2: (x: any, y: any) => number;
 79/**
 80 * Returns the inverse hyperbolic tangent of a number.
 81 * @param value The value for which to calculate the inverse hyperbolic tangent. Must be between -1 and 1, exclusive.
 82 * @returns {number} inverse hyperbolic tangent of input
 83 * @constructor
 84 */
 85declare let ATANH: (value: any) => number;
 86/**
 87 * Rounds a number up to the nearest even integer.
 88 * @param value The value to round to the next greatest even number.
 89 * @returns {number} next greatest even number
 90 * @constructor
 91 */
 92declare let EVEN: (value: any) => number;
 93/**
 94 * Returns the result of the modulo operator, the remainder after a division operation.
 95 * @param dividend The number to be divided to find the remainder.
 96 * @param divisor The number to divide by.
 97 * @returns {number}
 98 * @constructor
 99 */
100declare let MOD: (dividend: any, divisor: any) => number;
101/**
102 * Rounds a number up to the nearest odd integer.
103 * @param value The value to round to the next greatest odd number.
104 * @returns {number} value to round up to next greatest odd number.
105 * @constructor
106 */
107declare let ODD: (value: any) => number;
108/**
109 * Returns a number raised to a power.
110 * @param base - The number to raise to the exponent power.
111 * @param exponent - The exponent to raise base to.
112 * @returns {number} resulting number
113 * @constructor
114 */
115declare let POWER: (base: any, exponent: any) => number;
116/**
117 * Returns the sum of a series of numbers and/or cells.
118 * @param values The first number or range to add together.
119 * @returns {number} The sum of the series
120 * @constructor
121 */
122declare let SUM: (...values: any[]) => number;
123/**
124 * Returns the positive square root of a positive number.
125 * @param value - The number for which to calculate the positive square root.
126 * @returns {number} square root
127 * @constructor
128 */
129declare let SQRT: (value: any) => number;
130/**
131 * Returns the positive square root of the product of Pi and the given positive number.
132 * @param value - The number which will be multiplied by Pi and have the product's square root returned
133 * @returns {number} the positive square root of the product of Pi and the given positive number.
134 * @constructor
135 */
136declare let SQRTPI: (value: any) => number;
137/**
138 * Returns the cosine of an angle provided in radians.
139 * @param value - The angle to find the cosine of, in radians.
140 * @returns {number} cosine of angle
141 * @constructor
142 */
143declare let COS: (value: any) => number;
144/**
145 * Returns the hyperbolic cosine of any real number.
146 * @param value - Any real value to calculate the hyperbolic cosine of.
147 * @returns {number} the hyperbolic cosine of the input
148 * @constructor
149 */
150declare let COSH: (value: any) => number;
151/**
152 * Returns the cotangent of any real number. Defined as cot(x) = 1 / tan(x).
153 * @param value - number to calculate the cotangent for
154 * @returns {number} cotangent
155 * @constructor
156 */
157declare let COT: (value: any) => number;
158/**
159 * Return the hyperbolic cotangent of a value, defined as coth(x) = 1 / tanh(x).
160 * @param value - value to calculate the hyperbolic cotangent value of
161 * @returns {number} hyperbolic cotangent
162 * @constructor
163 */
164declare let COTH: (value: any) => number;
165/**
166 * Rounds a number down to the nearest integer that is less than or equal to it.
167 * @param value -  The value to round down to the nearest integer.
168 * @returns {number} Rounded number
169 * @constructor
170 */
171declare let INT: (value: any) => number;
172/**
173 * Checks whether the provided value is even.
174 * @param value - The value to be verified as even.
175 * @returns {boolean} whether this value is even or not
176 * @constructor
177 */
178declare let ISEVEN: (value: any) => boolean;
179/**
180 * Checks whether the provided value is odd.
181 * @param value - The value to be verified as odd.
182 * @returns {boolean} whether this value is odd or not
183 * @constructor
184 */
185declare let ISODD: (value: any) => boolean;
186/**
187 * Returns the sine of an angle provided in radians.
188 * @param value - The angle to find the sine of, in radians.
189 * @returns {number} Sine of angle.
190 * @constructor
191 */
192declare let SIN: (value: any) => number;
193/**
194 * Returns the hyperbolic sine of any real number.
195 * @param value - real number to find the hyperbolic sine of
196 * @returns {number} hyperbolic sine
197 * @constructor
198 */
199declare let SINH: (value: any) => number;
200/**
201 * The value Pi.
202 * @returns {number} Pi.
203 * @constructor
204 */
205declare let PI: () => number;
206/**
207 * Returns the the logarithm of a number, base 10.
208 * @param value - The value for which to calculate the logarithm, base 10.
209 * @returns {number} logarithm of the number, in base 10.
210 * @constructor
211 */
212declare let LOG10: (value: any) => number;
213/**
214 * Returns the the logarithm of a number given a base.
215 * @param value - The value for which to calculate the logarithm given base.
216 * @param base - The base to use for calculation of the logarithm. Defaults to 10.
217 * @returns {number}
218 * @constructor
219 */
220declare let LOG: (value: any, base: any) => number;
221/**
222 * Returns the logarithm of a number, base e (Euler's number).
223 * @param value - The value for which to calculate the logarithm, base e.
224 * @returns {number} logarithm calculated
225 * @constructor
226 */
227declare let LN: (value: any) => number;
228/**
229 * Returns the tangent of an angle provided in radians.
230 * @param value - The angle to find the tangent of, in radians.
231 * @returns {number} tangent in radians
232 * @constructor
233 */
234declare let TAN: (value: any) => number;
235/**
236 * Returns the hyperbolic tangent of any real number.
237 * @param value - Any real value to calculate the hyperbolic tangent of.
238 * @returns {number} hyperbolic tangent
239 * @constructor
240 */
241declare let TANH: (value: any) => number;
242/**
243 * Rounds a number up to the nearest integer multiple of specified significance.
244 * @param value The value to round up to the nearest integer multiple of factor.
245 * @param factor - [ OPTIONAL ] The number to whose multiples value will be rounded.
246 * @returns {number}
247 * @constructor
248 */
249declare let CEILING: (value: any, factor?: any) => number;
250/**
251 * Rounds a number down to the nearest integer multiple of specified significance.
252 * @param value - The value to round down to the nearest integer multiple of factor.
253 * @param factor - The number to whose multiples value will be rounded.
254 * @returns {number}
255 * @constructor
256 */
257declare let FLOOR: (value: any, factor?: any) => number;
258/**
259 * Returns one value if a logical expression is TRUE and another if it is FALSE.
260 * @param logicalExpression - An expression or reference to a cell containing an expression that represents some logical value, i.e. TRUE or FALSE.
261 * @param valueIfTrue - The value the function returns if logical_expression is TRUE
262 * @param valueIfFalse - The value the function returns if logical_expression is FALSE.
263 * @returns one value if a logical expression is TRUE and another if it is FALSE.
264 * @constructor
265 */
266declare let IF: (logicalExpression: any, valueIfTrue: any, valueIfFalse: any) => any;
267/**
268 * Returns a conditional count across a range.
269 * @param range - The range that is tested against criterion., value[1];
270 * @param criteria - The pattern or test to apply to range. If the range to check against contains text,
271 * this must be a string. It can be a comparison based string (e.g. "=1", "<1", ">=1") or it can be a wild-card string,
272 * in which * matches any number of characters, and ? matches the next character. Both ? and * can be escaped by placing
273 * a ~ in front of them. If it is neither, it will compared with values in the range using equality comparison.
274 * @returns {number}
275 * @constructor
276 */
277declare let COUNTIF: (range: any, criteria: any) => number;
278/**
279 * Returns the count of a range depending on multiple criteria.
280 * @param values[0] criteria_range1 - The range to check against criterion1.
281 * @param values[1] criterion1 - The pattern or test to apply to criteria_range1.
282 * @param values[2...N] Repeated sets of ranges and criterion to check.
283 * @returns {number} count
284 * @constructor
285 */
286declare let COUNTIFS: (...values: any[]) => number;
287/**
288 * Rounds a number to a certain number of decimal places according to standard rules.
289 * @param value - The value to round to places number of places.
290 * @param places - The number of decimal places to which to round.
291 * @returns {number}
292 * @constructor
293 */
294declare let ROUND: (value: any, places: any) => number;
295/**
296 * Rounds a number to a certain number of decimal places, always rounding down to the next valid increment.
297 * @param value - The value to round to places number of places, always rounding down.
298 * @param places - (optional) The number of decimal places to which to round.
299 * @returns {number}
300 * @constructor
301 */
302declare let ROUNDDOWN: (value: any, places?: any) => number;
303/**
304 * Rounds a number to a certain number of decimal places, always rounding up to the next valid increment.
305 * @param value - The value to round to places number of places, always rounding up.
306 * @param places - (optional) The number of decimal places to which to round.
307 * @returns {number}
308 * @constructor
309 */
310declare let ROUNDUP: (value: any, places?: any) => number;
311/**
312 * Returns a conditional sum across a range.
313 * @param range -  The range which is tested against criterion.
314 * @param criteria - The pattern or test to apply to range. If the range to check against contains text, this must be a
315 * string. It can be a comparison based string (e.g. "=1", "<1", ">=1") or it can be a wild-card string, in which *
316 * matches any number of characters, and ? matches the next character. Both ? and * can be escaped by placing a ~ in
317 * front of them.
318 * @param sumRange - (optional) The range to be summed, if different from range.
319 * @returns {number}
320 * @constructor
321 */
322declare let SUMIF: (range: any, criteria: any, sumRange?: any) => number;
323/**
324 * Returns the sum of the squares of a series of numbers and/or cells.
325 * @param values  The values or range(s) whose squares to add together.
326 * @returns {number} the sum of the squares if the input.
327 * @constructor
328 */
329declare let SUMSQ: (...values: any[]) => number;
330/**
331 * Returns the product of two numbers. Equivalent to the `*` operator.
332 * @param factor1 - The first multiplicand.
333 * @param factor2 - The second multiplicand.
334 * @constructor
335 */
336declare let MULTIPLY: (factor1: any, factor2: any) => number;
337/**
338 * Returns the result of the first number minus the second number. Equivalent to the `-` operator.
339 * @param one - The first number.
340 * @param two - the second number.
341 * @returns {number}
342 * @constructor
343 */
344declare let MINUS: (one: any, two: any) => number;
345/**
346 * Returns true if two specified values are equal and true otherwise. Equivalent to the "=" operator.
347 * @param one - First value to check.
348 * @param two - Second value to check.
349 * @returns {boolean} true if values are equal, false if they are not equal.
350 * @constructor
351 */
352declare let EQ: (one: any, two: any) => boolean;
353/**
354 * Returns true if the first argument is strictly greater than the second, and false otherwise. Equivalent to the `>`
355 * operator.
356 * @param one - The value to test as being greater than `two`.
357 * @param two - The second value.
358 * @returns {boolean}
359 * @constructor
360 */
361declare let GT: (one: any, two: any) => boolean;
362/**
363 * Returns true if the first argument is greater than or equal to the second, and false otherwise. Equivalent to the
364 * `>=` operator.
365 * @param one - The value to test as being greater than or equal to `two`.
366 * @param two -The second value.
367 * @returns {boolean}
368 * @constructor
369 */
370declare let GTE: (one: any, two: any) => boolean;
371/**
372 * Returns true if the first argument is strictly less than the second, and false otherwise. Equivalent to the `<`
373 * operator.
374 * @param one - The value to test as being less than `two`.
375 * @param two - The second value.
376 * @returns {boolean}
377 * @constructor
378 */
379declare let LT: (one: any, two: any) => boolean;
380/**
381 * Returns true if the first argument is less than or equal to the second, and true otherwise. Equivalent to the
382 * `<=` operator.
383 * @param one - The value to test as being less than or equal to `two`.
384 * @param two - The second value.
385 * @constructor
386 */
387declare let LTE: (one: any, two: any) => boolean;
388/**
389 * Returns "TRUE" if two specified values are not equal and "FALSE" otherwise. Equivalent to the "<>" operator.
390 * @param one - The value to test as being not equal to `two`.
391 * @param two - The second valud.
392 * @returns {boolean}
393 * @constructor
394 */
395declare let NE: (one: any, two: any) => boolean;
396/**
397 * Returns one number divided by another. Equivalent to the `/` operator.
398 * @param dividend - The number to be divided.
399 * @param divisor - The number to divide by, cannot be 0.
400 * @returns {number} result of dividend / divisor.
401 * @constructor
402 */
403declare let DIVIDE: (dividend: any, divisor: any) => number;
404/**
405 * Returns a random number between 0 inclusive and 1 exclusive.
406 * @returns {number}
407 * @constructor
408 */
409declare let RAND: () => number;
410/**
411 * Returns a uniformly random integer between two values, inclusive on high and low. Values with decimal parts may be
412 * used for low and/or high; this will cause the least and greatest possible values to be the next integer greater than
413 * low and/or the next integer less than high, respectively.
414 * @param low - lowest value
415 * @param high - highest value
416 * @returns {number} between low and high.
417 * @constructor
418 */
419declare let RANDBETWEEN: (low: any, high: any) => number;
420/**
421 * Given an input number, returns `-1` if it is negative, `1` if positive, and `0` if it is zero.
422 * @param value - The value to check the sign for
423 * @returns {number} `-1` if it is negative, `1` if positive, and `0` if it is zero.
424 * @constructor
425 */
426declare let SIGN: (value: any) => 0 | 1 | -1;
427/**
428 * Truncates a number to a certain number of significant digits by omitting less significant digits.
429 * @param value - The value to be truncated.
430 * @param places - [ OPTIONAL - 0 by default ] - The number of significant digits to the right of the decimal point to
431 * retain. If places is greater than the number of significant digits in value, value is returned without modification.
432 * places may be negative, in which case the specified number of digits to the left of the decimal place are changed to
433 * zero. All digits to the right of the decimal place are discarded. If all digits of value are changed to zero, TRUNC
434 * simply returns 0.
435 * @returns {number} after truncation
436 * @constructor
437 */
438declare let TRUNC: (value: any, places?: any) => number;
439/**
440 * Converts an angle value in degrees to radians.
441 * @param angle - The angle to convert from degrees to radians.
442 * @returns {number} radians
443 * @constructor
444 */
445declare let RADIANS: (angle: any) => number;
446/**
447 * Converts an angle value in radians to degrees.
448 * @param angle - The angle to convert from radians to degrees.
449 * @returns {number} degrees
450 * @constructor
451 */
452declare let DEGREES: (angle: any) => number;
453/**
454 * Returns the complementary Gauss error function of a value.
455 * @param value - The number for which to calculate the complementary Gauss error function.
456 * @returns {number} complementary Gauss error function of a value
457 * @constructor
458 */
459declare let ERFC: (value: any) => number;
460/**
461 * Returns the error function integrated between lower_limit and upper_limit.
462 * @param lowerLimit - The lower bound for integrating ERF.
463 * @param upperLimit - [Optional]. The upper bound for integrating ERF. If omitted, ERF integrates between
464 * zero and lower_limit.
465 * @returns {number} error function integrated between lower_limit and upper_limit
466 * @constructor
467 */
468declare let ERF: (lowerLimit: any, upperLimit?: any) => number;
469/**
470 * Calculates the sum of the sums of the squares of values in two arrays.
471 * @param arrayX - The array or range of values whose squares will be added to the squares of corresponding
472 * entries in arrayY and added together.
473 * @param arrayY - The array or range of values whose squares will be added to the squares of corresponding
474 * entries in arrayX and added together.
475 * @returns {number} sum of the sums of the squares
476 * @constructor
477 */
478declare let SUMX2PY2: (arrayX: any, arrayY: any) => number;
479/**
480 * Calculates the sum of the differences of the squares of values in two arrays.
481 * @param arrayX - The array or range of values whose squares will be reduced by the squares of corresponding
482 * entries in array_y and added together.
483 * @param arrayY - The array or range of values whose squares will be subtracted from the squares of
484 * corresponding entries in array_x and added together.
485 * @returns {number} sum of the differences of the squares
486 * @constructor
487 */
488declare let SUMX2MY2: (arrayX: any, arrayY: any) => number;
489/**
490 * Counts the number of unique values in a list of specified values and ranges.
491 * @param values The values or ranges to consider for uniqueness. Supports an arbitrary number of arguments for this
492 * function.
493 * @returns {number} of unique values passed in.
494 * @constructor
495 */
496declare let COUNTUNIQUE: (...values: any[]) => number;
497/**
498 * Calculates the sum of the products of corresponding entries in two equal-sized arrays or ranges.
499 * @param values Arrays or ranges whose entries will be multiplied with corresponding entries in the second such array
500 * or range.
501 * @returns {number} sum of the products
502 * @constructor
503 */
504declare let SUMPRODUCT: (...values: any[]) => number;
505/**
506 * Returns the number of ways to choose some number of objects from a pool of a given size of objects.
507 * @param m - The size of the pool of objects to choose from.
508 * @param k - The number of objects to choose.
509 * @returns {number} number of ways
510 * @constructor
511 */
512declare let COMBIN: (m: any, k: any) => number;
513/**
514 * Multiply a series of numbers together.
515 * @param values - values or range of values to multiply by each other.
516 * @constructor
517 */
518declare let PRODUCT: (...values: any[]) => number;
519/**
520 * Divide one number by another
521 * @param dividend - number to be divided by the divisor.
522 * @param divisor - number to divide the dividend.
523 * @returns {number}
524 * @constructor
525 */
526declare let QUOTIENT: (dividend: any, divisor: any) => number;
527/**
528 * Returns a value, but does nothing to it. If given a range, will return first value.
529 * @param value to return
530 * @returns any value
531 * @constructor
532 */
533declare let UPLUS: (value: any) => any;
534/**
535 * Returns the same number, but with the sign reversed.
536 * @param value to reverse the sign on
537 * @returns {number}
538 * @constructor
539 */
540declare let UMINUS: (value: any) => number;
541/**
542 * Rounds a number to the nearest integer multiple of another.
543 * @param value - value to round.
544 * @param factor - multiple.
545 * @returns {number}
546 * @constructor
547 */
548declare let MROUND: (value: any, factor: any) => number;
549/**
550 * Calculates the double-factorial of a number.
551 * @param value - value or reference to calculate.
552 * @returns {number}
553 * @constructor
554 */
555declare let FACTDOUBLE: (value: any) => any;
556/**
557 * Returns a value as a percentage where 100 is 1.0, and 0 is 0.
558 * @param value - To convert.
559 * @returns {number}
560 * @constructor
561 */
562declare let UNARY_PERCENT: (value: any) => number;
563/**
564 * Returns the factorial of the sum of the arguments divided by the product of the factorials of the arguments.
565 * @param values - Range of numbers.
566 * @returns {number}
567 * @constructor
568 */
569declare let MULTINOMIAL: (...values: any[]) => number;
570/**
571 * Returns a sum of powers of the number x in accordance with the following formula.
572 * @param x - The number as an independent variable.
573 * @param n - The starting power.
574 * @param m - The number to increment by
575 * @param coefficients - A series of coefficients. For each coefficient the series sum is extended by one section. You
576 * can only enter coefficients using cell references.
577 * @returns {number}
578 * @constructor
579 */
580declare let SERIESSUM: (x: any, n: any, m: any, coefficients: any) => number;
581/**
582 * Calculates subtotals. If a range already contains subtotals, these are not used for further calculations.
583 * @param functionCode - A value that stands for another function: 1=AVERAGE, 2=COUNT, 3=COUNTA, 4=MAX, 5=MIN,
584 * 6=PRODUCT, 7=STDEV, 8=STDEVP, 9=SUM, 10=VAR, 11=VARP.
585 * @param values - The ranges whose cells are included.
586 * @returns {Array}
587 * @constructor
588 */
589declare let SUBTOTAL: (functionCode: any, ...values: any[][]) => any;
590export { ABS, ACOS, ACOSH, ACOTH, ASIN, ASINH, ATAN, ATAN2, ATANH, COT, COTH, COSH, COS, COUNTUNIQUE, EVEN, ERF, ERFC, INT, ISEVEN, ISODD, MOD, ODD, SIN, SINH, SUM, SQRT, SQRTPI, PI, POWER, LOG, LOG10, LN, MULTIPLY, MINUS, TAN, TANH, ROUND, ROUNDDOWN, ROUNDUP, SUMPRODUCT, SUMIF, SUMSQ, SUMX2MY2, SUMX2PY2, FLOOR, IF, COUNTIF, COUNTIFS, CEILING, TRUNC, RADIANS, DEGREES, COMBIN, RAND, RANDBETWEEN, SIGN, DIVIDE, EQ, GT, GTE, LT, LTE, NE, GCD, LCM, GAMMALN, PRODUCT, QUOTIENT, UPLUS, UMINUS, MROUND, FACTDOUBLE, UNARY_PERCENT, MULTINOMIAL, SERIESSUM, SUBTOTAL };