Math and Trigonometry
- Source
Classes
Members
(static) ceilingMath
- Source
- See
- ceiling.math
(static) ceilingPrecise
- Source
- See
- ceiling.precise
Methods
(inner) abs(…value) → {number}
Returns the absolute (unsigned) value of one or more number(s).
Category: Math and trigonometry
Name | Type | Attributes | Description |
---|---|---|---|
value | number | <repeatable> | Number or number list. The numbers whose absolute value is to be calculated. Any number whether positive or negative, whole or fractional, integer or real. |
- Source
- See
- For further information, see www.hcltechsw.com and docs.oasis-open.org
Number or number list. The absolute values of value. and www.oasis-open.org
- Type:
- number
rosetta.abs(-3); // returns 3
rosetta.abs(-3,-4,-5); // returns [3,4,5]
(inner) acos(…value) → {number}
Returns the arccosine (inverse cosine) of a number using the cosine of an angle.
Name | Type | Attributes | Description |
---|---|---|---|
value | number | <repeatable> | Number or number list. A cosine of an angle, from -1 through 1. |
- Source
- See
- For further information, see www.hcltechsw.com and docs.oasis-open.org
Number or number list. The trigonometric arccosine of value. An angle, in radians, from 0 through pi. This represents an angle between 0 and 180 degrees. and www.oasis-open.org
- Type:
- number
rosetta.acos(.5); // returns 1.0471975511965979
rosetta.acos(.5,.6,.7); // returns [1.0471975511965979, 0.9272952180016123, 0.7953988301841436]
(inner) acosh(number) → {number}
Returns the inverse hyperbolic cosine of a number.
Name | Type | Description |
---|---|---|
number | number | Any real number equal to or greater than 1. |
- Source
- See
- For further information, see docs.oasis-open.org
Number that is the trigonometric inverse hyperbolic cosine of the number.
- Type:
- number
rosetta.acosh(1); // returns 0
(inner) acot(number) → {number}
Returns the inverse cotangent of a number.
Name | Type | Description |
---|---|---|
number | number | Number that is the cotangent of the angle you want. This must be a real number. |
- Source
- See
- For further information, see docs.oasis-open.org
Number that is the trigonometric inverse cotangent of the number.
- Type:
- number
rosetta.acot(1); // returns 0.7853981633974483
(inner) acoth(number) → {number}
Returns the inverse hyperbolic cotangent of a number.
Name | Type | Description |
---|---|---|
number | number | Any real number equal to or greater than 1. |
- Source
- See
- For further information, see docs.oasis-open.org
Number that is the trigonometric inverse hyperbolic cotangent of the number.
- Type:
- number
rosetta.acoth(1); // returns Infinity
(inner) add(num1, num2) → {number}
Returns the sum of the two given numbers.
Name | Type | Description |
---|---|---|
num1 | number | Number that is the first addend. |
num2 | number | Number that is the second addend. |
- Source
- See
- For further information, see docs.oasis-open.org
The sum of the addends.
- Type:
- number
rosetta.add(1.2, 4) // returns 5.2
(inner) aggregate(function_num, options, ref1, ref2opt) → {number}
Returns an aggregate in a list or database.
Name | Type | Attributes | Description |
---|---|---|---|
function_num | number | A number 1 to 19 that specifies which function to use. | |
options | number | A numerical value that determines which values to ignore in the evaluation range for the function. Note: The function will not ignore hidden rows, nested subtotals or nested aggregates if the array argument includes a calculation, for example: =AGGREGATE(14,3,A1:A100*(A1:A100>0),1) | |
ref1 | number | | The first numeric argument for functions that take multiple numeric arguments for which you want the aggregate value. | |
ref2 | number | <optional> | Optional. Numeric arguments 2 to 253 for which you want the aggregate value. For functions that take an array, ref1 is an array, an array formula, or a reference to a range of values for which you want the aggregate value. Ref2 is a second argument that is required for certain functions. |
- Source
- See
- For further information, see support.microsoft.com
Number that is the aggregate of the input in a list or database.
- Type:
- number
rosetta.aggregate(1, 4, [1, 2, 3]) // returns 2
(inner) arabic(text) → {number}
Converts a Roman number to Arabic, as a number.
Name | Type | Description |
---|---|---|
text | string | String enclosed in quotation marks, an empty string (""), or a reference to a value containing text. |
- Source
- See
- For further information, see docs.oasis-open.org
Number that is the Arabic form of the given Roman number
- Type:
- number
rosetta.arabic('X') // returns 10
(inner) asin(…value) → {number}
Returns the arcsine (inverse sine) of a number using the sine of an angle.
Name | Type | Attributes | Description |
---|---|---|---|
value | number | <repeatable> | Number or number list. A sine of an angle, from -1 through 1. |
- Source
- See
- For further information, see www.hcltechsw.com and docs.oasis-open.org
Number or number list. The trigonometric arcsine of value. An angle, in radians, from -pi/2 through pi/2. This represents an angle between -90 and 90 degrees. and www.oasis-open.org
- Type:
- number
rosetta.asin(.5); // returns 0.5235987755982989
rosetta.asin(.5,.6,.7); // returns [0.5235987755982989, 0.6435011087932844, 0.775397496610753]
(inner) asinh(number) → {number}
Returns the inverse hyperbolic sine of a number.
Name | Type | Description |
---|---|---|
number | number | Any real number. |
- Source
- See
- For further information, see docs.oasis-open.org
Number that is the trigonometric hyperbolic arcsine of the number.
- Type:
- number
rosetta.asinh(0.5); // returns 0.48121182505960347
(inner) atan(…value) → {number}
Returns the arc (inverse) tangent using the tangent of an angle.
Name | Type | Attributes | Description |
---|---|---|---|
value | number | <repeatable> | Number or number list. A tangent of an angle, from -1 through 1. |
- Source
- See
- For further information, see www.hcltechsw.com and docs.oasis-open.org
Number or number list. The trigonometric arctan of value. An angle, in radians, from -pi/2 through pi/2. This represents an angle between -90 and 90 degrees. and www.oasis-open.org
- Type:
- number
rosetta.atan(.5); // returns 0.4636476090008061
rosetta.atan(.5,.6,.7); // returns [0.4636476090008061, 0.5404195002705842, 0.6107259643892086]
(inner) atan2(x, y) → {number}
Returns the arc (inverse) tangent using the tangent x- and y-coordinates.
Name | Type | Description |
---|---|---|
x | number | Number or number list. The denominator of the tangent value y / x. |
y | number | Number or number list. The numerator of the tangent value y / x. |
- Source
- See
- For further information, see www.hcltechsw.com and docs.oasis-open.org
Number or number list. The trigonometric arctangent of y / x. An angle, in radians, from -pi through pi. This represents an angle between -180 and 180 degrees, depending on the sign of x and y. and www.oasis-open.org
- Type:
- number
rosetta.atan2(1,1); // returns 0.7853981633974483
rosetta.atan2([1,2,3],[1,2,3]); // returns [0.7853981633974483, 0.7853981633974483, 0.7853981633974483]
(inner) atanh(number) → {number}
Returns the inverse hyperbolic tangent of a number.
Name | Type | Description |
---|---|---|
number | number | Any real number between 1 and -1. |
- Source
- See
- For further information, see docs.oasis-open.org
Number that is the trigonometric hyperbolic arctangent of the number.
- Type:
- number
rosetta.atanh(1); // returns Infinity
(inner) base(number, radix, min_lengthopt) → {string}
Converts a number into a text representation with the given radix (base).
Name | Type | Attributes | Description |
---|---|---|---|
number | number | The number that you want to convert. Must be an integer greater than or equal to 0 and less than 2^53. | |
radix | number | The base radix that you want to convert the number into. Must be an integer greater than or equal to 2 and less than or equal to 36. | |
min_length | number | <optional> | The minimum length of the returned string. Must be an integer greater than or equal to 0. |
- Source
- See
- For further information, see docs.oasis-open.org
Number that is the text representation with the given radix (base).
- Type:
- string
rosetta.base(7, 2); // returns '111'
rosetta.base(15,2,10); // returns '0000001111'
(inner) ceiling(number, significance, modeopt) → {number}
Rounds a number to the nearest integer or to the nearest multiple of significance.
Name | Type | Attributes | Description |
---|---|---|---|
number | number | The value you want to round. | |
significance | number | The multiple to which you want to round. | |
mode | number | <optional> | Optional. For negative numbers, controls whether number is rounded toward or away from zero. |
- Source
Number that is the result of rounding the provided number
- Type:
- number
(inner) combin(number, number_chosen) → {number}
Returns the number of combinations for a given number of objects.
Name | Type | Description |
---|---|---|
number | number | The number of items. |
number_chosen | number | The number of items in each combination. |
- Source
- See
- For further information, see docs.oasis-open.org
Number of combinations for the given number of items.
- Type:
- number
rosetta.combin(3, 2) // returns 3
(inner) combina(number, number_chosen) → {number}
Returns the number of combinations with repetitions for a given number of items.
Name | Type | Description |
---|---|---|
number | number | The number of items. Must be greater than or equal to 0, and greater than or equal to Number_chosen. Non-integer values are truncated. |
number_chosen | number | The number of items in each combination. Must be greater than or equal to 0. Non-integer values are truncated. |
- Source
- See
- For further information, see docs.oasis-open.org
Number of combinations (with repititions) for the given number of items.
- Type:
- number
rosetta.combina(3, 2) // returns 6
(inner) cos(…angle) → {number}
Given an angle in radians, returns the cosine of the angle. In a right triangle, the cosine of an acute angle is the ratio of the length of its adjacent side to the length of the hypotenuse.
Name | Type | Attributes | Description |
---|---|---|---|
angle | number | <repeatable> | Number or number list. An angle measured in radians for which you want the cosine. |
- Source
- See
- For further information, see www.hcltechsw.com and docs.oasis-open.org
Number or number list. The cosine of angle, from -1 to 1. Rounded to 15 decimal places. and www.oasis-open.org
- Type:
- number
rosetta.cos(.5); // returns 0.8775825618903728
rosetta.cos(.5,.6,.7); // returns [0.8775825618903728, 0.8253356149096783, 0.7648421872844885]
(inner) cosh(number) → {number}
Returns the hyperbolic cosine of the angle.
Name | Type | Description |
---|---|---|
number | number | Any real number, angle measured in radians for which you want the hyperbolic cosine. |
- Source
- See
- For further information, see docs.oasis-open.org
Number that is the trigonometric hyperbolic cosine of angle
- Type:
- number
rosetta.cosh(0); // returns 1
(inner) cot(number) → {number}
Returns the cotangent of a number.
Name | Type | Description |
---|---|---|
number | number | Any real number, angle measured in radians for which you want the cotangent. |
- Source
- See
- For further information, see docs.oasis-open.org
Number that is the trigonometric cotangent of the number.
- Type:
- number
rosetta.cot(1); // returns 0.6420926159343306
(inner) coth(number) → {number}
Returns the hyperbolic cotangent of a number.
Name | Type | Description |
---|---|---|
number | number | Any real number, angle measured in radians for which you want the hyperbolic cotangent. |
- Source
- See
- For further information, see docs.oasis-open.org
Number that is the trigonometric hyperbolic cotangent of the number.
- Type:
- number
rosetta.coth(1); // returns 1.3130352854993312
(inner) csc(number) → {number}
Returns the cosecant of an angle.
Name | Type | Description |
---|---|---|
number | number | Any real number, angle measured in radians for which you want the cosecant. |
- Source
- See
- For further information, see docs.oasis-open.org
Number that is the trigonometric cosecant of the number.
- Type:
- number
rosetta.csc(1); // returns 1.1883951057781212
(inner) csch(number) → {number}
Returns the hyperbolic cosecant of an angle.
Name | Type | Description |
---|---|---|
number | number | Any real number, angle measured in radians for which you want the hyperbolic cosecant. |
- Source
- See
- For further information, see docs.oasis-open.org
Number that is the trigonometric hyperbolic cosecant of the number.
- Type:
- number
rosetta.csch(1); // returns 0.8509181282393216
(inner) decimal(text, radix) → {number}
Converts a text representation of a number in a given base into a decimal number.
Name | Type | Description |
---|---|---|
text | string | The number as text |
radix | number | The number as the base. Radix must be an integer. |
- Source
- See
- For further information, see docs.oasis-open.org
The converted number as a decimal.
- Type:
- number
rosetta.decimal('10', 2) // returns 2
(inner) degrees(angle) → {number}
Converts radians to degrees.
Name | Type | Description |
---|---|---|
angle | number | The angle in radians that you want to convert. |
- Source
- See
- For further information, see docs.oasis-open.org
The converted angle in degrees.
- Type:
- number
rosetta.degrees(Math.PI) // returns 180
(inner) divide(dividend, divisor) → {number}
Returns the quotient of the two given numbers.
Name | Type | Description |
---|---|---|
dividend | number | Number that is the dividend (numerator). |
divisor | number | Number that is the divisor (denominator). |
- Source
- See
- For further information, see docs.oasis-open.org
The quotient of the two numbers.
- Type:
- number
rosetta.divide(10, 4) // returns 2.5
(inner) e() → {number}
Returns the mathematical constant e (approximately 2.718282).
- Source
Number that is the mathematical constant e
- Type:
- number
rosetta.e() // returns 2.718282
(inner) eq(value1, value2) → {boolean}
Returns whether the first number is equal to the second number.
Name | Type | Description |
---|---|---|
value1 | number | | The first value to compare. |
value2 | number | | The second value to compare. |
- Source
- See
- For further information, see docs.oasis-open.org
True if num1 is equal to num2
- Type:
- boolean
rosetta.eq(10, 10) // returns true
(inner) even(number) → {number}
Rounds a number up to the nearest even integer.
Name | Type | Description |
---|---|---|
number | number | The value to round. |
- Source
- See
- For further information, see docs.oasis-open.org
The number rounded up to the nearest even integer.
- Type:
- number
rosetta.even(3) // returns 4
(inner) exp(…power) → {number}
Returns e (approximately 2.718282) raised to the power of a given number.
Name | Type | Attributes | Description |
---|---|---|---|
power | number | <repeatable> | Number or number list. The power to which you want to raise e. |
- Source
- See
- For further information, see www.hcltechsw.com and docs.oasis-open.org
Number or number list. The number e raised to the power of the parameter. (this value can contain up to 14 decimal places). and www.oasis-open.org
- Type:
- number
rosetta.exp(1); // returns 2.718281828459045
rosetta.exp(1,1); // returns [2.718281828459045, 2.718281828459045]
(inner) fact(number) → {number}
Returns the factorial of a number.
Name | Type | Description |
---|---|---|
number | number | The nonnegative number for which you want the factorial. If number is not an integer, it is truncated. |
- Source
- See
- For further information, see docs.oasis-open.org
The factorial of the given number.
- Type:
- number
rosetta.fact(6) // returns 720
(inner) factDouble(number) → {number}
Returns the double factorial of a number.
Name | Type | Description |
---|---|---|
number | number | The nonnegative number for which you want the double factorial. If number is not an integer, it is truncated. |
- Source
- See
- For further information, see docs.oasis-open.org
The double factorial of the given number.
- Type:
- number
rosetta.factDouble(10) // returns 3840
(inner) floatEq(number1, number2, confidence) → {number}
Compares two numbers for equality within a confidence range.
Name | Type | Description |
---|---|---|
number1 | number | Number or number list. Any numeric value. |
number2 | number | Number or number list. Any numeric value. |
confidence | number | Number or number list. Optional (default is 0.0001). |
- Source
- See
- For further information, see www.hcltechsw.com
Returns 1 (true) if the difference of the numbers is less than the confidence range. Returns 0 (false) if the difference of the numbers exceeds or is equal to the confidence range.
- Type:
- number
rosetta.floatEq(2.22, 2.24, 0.01); // returns false
rosetta.floatEq(2.22, 2.24, 0.03); // returns true
rosetta.floatEq([2.22, 2.24], [2.25, 2.26], 0.04); // returns true
(inner) floor(number, significance) → {number}
Rounds a number down, toward zero.
Name | Type | Description |
---|---|---|
number | number | The numeric value you want to round. |
significance | number | The multiple to which you want to round. |
- Source
The number rounded down to the nearest multiple given.
- Type:
- number
rosetta.floor(3.7, 2) // returns 2
(inner) gcd(…numbers) → {number}
Returns the greatest common divisor.
Name | Type | Attributes | Description |
---|---|---|---|
numbers | number | <repeatable> | Number or number list. One is required, subsequent numbers are optional. 1 to 255 values for which you want the greatest common divisor. If any value is not an integer, it is truncated. |
- Source
- See
- For further information, see docs.oasis-open.org
Number that is the greatest common divisor.
- Type:
- number
rosetta.gcd(24, 36) // returns 12
(inner) gt(num1, num2) → {boolean}
Returns whether the first number is greater than the second number.
Name | Type | Description |
---|---|---|
num1 | number | | The first number to compare. |
num2 | number | | The second number to compare. |
- Source
- See
- For further information, see docs.oasis-open.org
True if num1 is greater than num2
- Type:
- boolean
rosetta.gt(10, 4) // returns true
(inner) gte(num1, num2) → {boolean}
Returns whether the first number is greater than or equal to the second number.
Name | Type | Description |
---|---|---|
num1 | number | | The first number to compare. |
num2 | number | | The second number to compare. |
- Source
- See
- For further information, see docs.oasis-open.org
True if num1 is greater than or equal to num2
- Type:
- boolean
rosetta.gte(10, 10) // returns true
(inner) int(number) → {number}
Truncates the values in a number or number list at the whole number, leaving off any decimals.
Name | Type | Description |
---|---|---|
number | number | Number that is the value you want to truncate. |
- Source
- See
- For further information, see docs.oasis-open.org
Number that is the truncated value.
- Type:
- number
rosetta.int(5.5); // returns 5
(inner) integer(…value) → {number}
Truncates the values in a number or number list at the whole number, leaving off any decimals.
Name | Type | Attributes | Description |
---|---|---|---|
value | number | <repeatable> | Number or number list. The value(s) that is the value you want to truncate. |
- Source
- See
- For further information, see www.hcltechsw.com
Number or number list. The value(s) that is the truncated value.
- Type:
- number
rosetta.integer(5.5); // returns 5
rosetta.integer(5.5,6.6,7.7); // returns [5, 6, 7]
(inner) lcm(…numbers) → {number}
Returns the least common multiple.
Name | Type | Attributes | Description |
---|---|---|---|
numbers | number | <repeatable> | Number or number list. One is required, subsequent numbers are optional. 1 to 255 values for which you want the least common multiple. If value is not an integer, it is truncated. |
- Source
- See
- For further information, see docs.oasis-open.org
Number that is the least common multiple.
- Type:
- number
rosetta.lcm(5, 1, 2) // returns 10
(inner) ln(…value) → {number}
Returns the natural log of a number. Natural logs use e (approximately 2.718282) as their base.
Name | Type | Attributes | Description |
---|---|---|---|
value | number | <repeatable> | Number or number list. May be any value greater than 0, and can contain up to 15 decimal places. |
- Source
- See
- For further information, see www.hcltechsw.com and docs.oasis-open.org
Number or number list. The natural log of number. and www.oasis-open.org
- Type:
- number
rosetta.ln(5); // returns 1.6094379124341003
rosetta.ln(5,6,7); // returns [1.6094379124341003, 1.791759469228055, 1.9459101490553132]
(inner) ln2() → {number}
Returns the natural logarithm of 2.
- Source
Number, the natural log of 2.
- Type:
- number
rosetta.ln2(); // returns 0.6931471805599453
(inner) ln10() → {number}
Returns the natural logarithm of 10.
- Source
Number, the natural log of 10.
- Type:
- number
rosetta.ln10(); // returns 2.302585092994046
(inner) log(value, baseopt) → {number}
Returns the common logarithm (base 10) of any number greater than zero.
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
value | number | Number or number list. Number who's common logarithm will be returned. Must be larger than zero. | ||
base | number | <optional> | 10 | Number, optional. The base of the logarithm. If base is omitted, it is assumed to be 10. |
- Source
- See
- For further information, see www.hcltechsw.com and docs.oasis-open.org
Number or number list. The log of number. and www.oasis-open.org
- Type:
- number
rosetta.log(4); // returns 0.602059991327962
rosetta.log(5,6,7); // returns [0.6989700043360187, 0.7781512503836435, 0.8450980400142567]
(inner) log2E() → {number}
Returns the base-2 logarithm of e.
- Source
Number, the base-2 logarithm of e.
- Type:
- number
rosetta.log2E(); // returns 1.4426950408889634
(inner) log10(number) → {number}
Returns the base-10 logarithm of a number.
Name | Type | Description |
---|---|---|
number | number | The positive real number for which you want the base-10 logarithm. |
- Source
- See
- For further information, see docs.oasis-open.org
Number that is the base-10 logarithm of the given number.
- Type:
- number
rosetta.log10(10) // returns 1
(inner) log10E() → {number}
Returns the base-10 logarithm of e.
- Source
Number, the base-10 logarithm of e.
- Type:
- number
rosetta.log10E(); // returns 0.4342944819032518
(inner) lt(num1, num2) → {boolean}
Returns whether the first number is less than the second number.
Name | Type | Description |
---|---|---|
num1 | number | | The first number to compare. |
num2 | number | | The second number to compare. |
- Source
- See
- For further information, see docs.oasis-open.org
True if num1 is less than num2
- Type:
- boolean
rosetta.lt(10, 4) // returns false
(inner) lte(num1, num2) → {boolean}
Returns whether the first number is less than or equal to the second number.
Name | Type | Description |
---|---|---|
num1 | number | | The first number to compare. |
num2 | number | | The second number to compare. |
- Source
- See
- For further information, see docs.oasis-open.org
True if num1 is less than or equal to num2
- Type:
- boolean
rosetta.lte(10, 10) // returns true
(inner) max(…values) → {number}
Returns the largest number in a single list, or the larger of two numbers or number lists.
Name | Type | Attributes | Description |
---|---|---|---|
values | number | <repeatable> | Number or number list. |
- Source
- See
- For further information, see www.hcltechsw.com and docs.oasis-open.org
Number or number list. The larger of the values provided. If the parameters are number lists, NotesFormula Max returns a list that is the result of pair-wise computation on the list values and OpenFormula Max concats the lists and returns the number result. and www.oasis-open.org
- Type:
- number
rosetta.max(4,5,6); // returns 6
rosetta.max([5,8,6,7],[2,9,3]); // returns [5, 9, 6, 7] or 9
(inner) min(…values) → {number}
Returns the smallest number in a single list, or the smaller of two numbers or number lists.
Name | Type | Attributes | Description |
---|---|---|---|
values | number | <repeatable> | Number or number list. |
- Source
- See
- For further information, see www.hcltechsw.com and docs.oasis-open.org
Number or number list. NotesFormula Max returns a list that is the result of pair-wise computation on the list values and OpenFormula Max concats the lists and returns the number result. and www.oasis-open.org
- Type:
- number
rosetta.min(4,5,6); // returns 4
rosetta.min([5,8,6,7],[2,9,3]); // returns [2, 8, 3, 7] or 2
(inner) minus(num1, num2) → {number}
Returns the difference between the two given numbers.
Name | Type | Description |
---|---|---|
num1 | number | Number that is being subtracted from. |
num2 | number | Number that is being subtracted. |
- Source
- See
- For further information, see docs.oasis-open.org
The difference between the two numbers.
- Type:
- number
rosetta.minus(10, 4) // returns 6
(inner) mod(number, divisor) → {number}
Returns the remainder of a division operation.
Name | Type | Description |
---|---|---|
number | number | Number that is the dividend (numerator) to be divided. |
divisor | number | Number that is the divisor (denominator) to be divide dividend by. |
- Source
- See
- For further information, see docs.oasis-open.org
Number that is the remainder of dividend divided by divisor. If the parameters are number lists, mod returns a list that is the result of pair-wise computation on the list values.
- Type:
- number
rosetta.mod(7,4); // returns 3
(inner) modulo(dividend, divisor) → {number}
Returns the remainder of a division operation.
Name | Type | Description |
---|---|---|
dividend | number | Number or number list. The dividend (numerator) to be divided. |
divisor | number | Number or number list. The divisor (denominator) to be divide dividend by. |
- Source
- See
- For further information, see www.hcltechsw.com
Number or number list. The remainder of dividend divided by divisor. If the parameters are number lists, mod returns a list that is the result of pair-wise computation on the list values.
- Type:
- number
rosetta.modulo(7,4); // returns 3
rosetta.modulo([7,5],[4,3]); // returns [3,2]);
(inner) mRound(number, multiple) → {number}
Returns a number rounded to the desired multiple.
Name | Type | Description |
---|---|---|
number | number | Number that is the value to round. |
multiple | number | Number that is the multiple to which you want to round the number. |
- Source
- See
- For further information, see docs.oasis-open.org
Number that is rounded to the desired multiple.
- Type:
- number
rosetta.mRound(10, 3) // returns 9
(inner) multinomial(…numbers) → {number}
Returns the multinomial of a set of numbers.
Name | Type | Attributes | Description |
---|---|---|---|
numbers | number | <repeatable> | Number or number list, one is required, subsequent numbers are optional. 1 to 255 values for which you want the multinomial. |
- Source
- See
- For further information, see docs.oasis-open.org
Number that is the multinomial of the set of given numbers.
- Type:
- number
rosetta.multinomial(2, 3, 4) // 1260
(inner) multiply(factor1, factor2) → {number}
Returns the product of the two given numbers.
Name | Type | Description |
---|---|---|
factor1 | number | Number that is the first factor being multiplied. |
factor2 | number | Number that is the second factor being multiplied. |
- Source
- See
- For further information, see docs.oasis-open.org
The product of the two numbers.
- Type:
- number
rosetta.multiply(10, 4) // returns 40
(inner) ne(value1, value2) → {true}
Returns whether the first number is not equal to the second number.
Name | Type | Description |
---|---|---|
value1 | number | | The first value to compare. |
value2 | number | | The second value to compare. |
- Source
- See
- For further information, see docs.oasis-open.org
True if num1 is not equal to num2
- Type:
- true
rosetta.ne(10, 10) // returns true
(inner) odd(number) → {number}
Rounds a number up to the nearest odd integer.
Name | Type | Description |
---|---|---|
number | number | The value to round. |
- Source
- See
- For further information, see docs.oasis-open.org
The number rounded up to the nearest odd integer.
- Type:
- number
rosetta.odd(4) // returns 5
(inner) pi() → {number}
Returns the constant value pi, accurate to fifteen decimal places. The value pi is the ratio of the circumference of a circle to its diameter.
- Source
- See
- For further information, see www.hcltechsw.com and docs.oasis-open.org
Returns the constant value pi, accurate to fifteen decimal places. 3.141592653589793 and www.oasis-open.org
- Type:
- number
(inner) pow(base, exponent) → {number}
Returns the result of a number raised to a power.
Name | Type | Description |
---|---|---|
base | number | The value that you want raised to exponent. May be positive or negative. |
exponent | number | The power to which the base number is raised. |
- Source
- See
- For further information, see docs.oasis-open.org
The value of base raised to the power of exponent.
- Type:
- number
rosetta.pow(4,2); // returns 16
(inner) power(base, exponent) → {number}
Returns the result of a number raised to a power.
Name | Type | Description |
---|---|---|
base | number | Number or number list. The value that you want raised to exponent. May be positive or negative. |
exponent | number | Number or number list. The power to which the base number is raised. |
- Source
- See
- For further information, see www.hcltechsw.com and docs.oasis-open.org
Number or number list. The value of base raised to the power of exponent. and www.oasis-open.org
- Type:
- number
rosetta.power(4,2); // returns 16
rosetta.power([5,6],[2,2]); // returns [25, 36]
(inner) product(…numbers) → {number}
Multiplies the arguments.
Name | Type | Attributes | Description |
---|---|---|---|
numbers | number | <repeatable> | Number or number list that you want to multiply, up to a maximum of 255 arguments. |
- Source
- See
- For further information, see docs.oasis-open.org
Number that is the product of the arguments.
- Type:
- number
rosetta.product([5, 15, 30]) // returns 2250
(inner) quotient(numerator, denominator) → {number}
Returns the integer portion of a division.
Name | Type | Description |
---|---|---|
numerator | number | Number that is the dividend. |
denominator | number | Number that is the divisor. |
- Source
- See
- For further information, see docs.oasis-open.org
The quotient of the two arguments (integer portion).
- Type:
- number
rosetta.quotient(4.5, 3.1) // returns 1
(inner) radians(angle) → {number}
Converts degrees to radians.
Name | Type | Description |
---|---|---|
angle | number | An angle in degrees that you want to convert. |
- Source
- See
- For further information, see docs.oasis-open.org
The converted angle in radians.
- Type:
- number
rosetta.radians(180) // returns Math.PI
(inner) rand() → {number}
Generates a random number between 0 and 1, inclusive.
- Source
- See
- For further information, see docs.oasis-open.org
Random number between 0 and 1, inclusive.
- Type:
- number
(inner) randBetween(bottom, top) → {number}
Returns a random number between the numbers you specify.
Name | Type | Description |
---|---|---|
bottom | number | The smallest integer RANDBETWEEN will return. |
top | number | The largest integer RANDBETWEEN will return. |
- Source
- See
- For further information, see docs.oasis-open.org
A random number between the numbers you specify.
- Type:
- number
rosetta.randBetween(1, 10) // returns a number between 1 and 10 (inclusive)
(inner) random() → {number}
Generates a random number between 0 and 1, inclusive by calling open formula RAND
- Source
- See
- For further information, see www.hcltechsw.com
- To Do
- this needs to be implemented for NotesFormula with parameters
Random number between 0 and 1, inclusive.
- Type:
- number
(inner) roman(arabic_numeral) → {string}
Converts an arabic numeral to roman, as text.
Name | Type | Description |
---|---|---|
arabic_numeral | number | Number that is the Arabic numeral you want converted. |
- Source
- See
- For further information, see docs.oasis-open.org
String that is the Roman numeral form of the given Arabic number
- Type:
- string
rosetta.roman(10) // returns 'X'
(inner) round(number, factor) → {number}
Rounds the designated number to the nearest whole number; if an additional number is specified, it is used as the rounding factor for notes or number of digits after the decimal to round to for Open Formula.
Name | Type | Description |
---|---|---|
number | number | Number or number list. Numbers to be rounded. |
factor | number | Number. Optional. The rounding factor to use. If you don't specify a factor, the number is rounded to the nearest whole number. Notes |
- Source
- See
- For further information, see www.hcltechsw.com and docs.oasis-open.org
Number or number list. The value of number, rounded to the specified factor or to the nearest whole number. If number is a list, each number in the list is rounded to the specified factor or to the nearest whole number. and www.oasis-open.org
- Type:
- number
rosetta.round(2.15, 1); // returns 2.2 (openf)
rosetta.round([2.15,626.31], 1); // returns [2.2, 626.3] (openf)
rosetta.round(12338, 10); // returns 12340 (notesf)
(inner) roundDown(number, digits) → {number}
Rounds a number down, toward zero.
Name | Type | Description |
---|---|---|
number | number | Any real number that you want rounded down. |
digits | number | The number of digits to which you want to round number. |
- Source
- See
- For further information, see docs.oasis-open.org
The number rounded down
- Type:
- number
rosetta.roundDown(3.14159, 3) // returns 3.141
rosetta.roundDown(-3.14159, 1) // returns -3.1
(inner) roundUp(number, digits) → {number}
Rounds a number up, away from zero.
Name | Type | Description |
---|---|---|
number | number | Any real number that you want rounded up. |
digits | number | The number of digits to which you want to round number. |
- Source
- See
- For further information, see docs.oasis-open.org
The number rounded up
- Type:
- number
rosetta.roundUp(3.14159, 3) // returns 3.142
rosetta.roundUp(-3.14159, 1) // returns -3.2
(inner) sec(number) → {number}
Returns the secant of an angle.
Name | Type | Description |
---|---|---|
number | number | Any real number, angle measured in radians for which you want the secant. |
- Source
- See
- For further information, see docs.oasis-open.org
Number that is the trigonometric secant of the number.
- Type:
- number
rosetta.sec(1); // returns 1.1883951057781212
(inner) sech(number) → {number}
Returns the hyperbolic secant of an angle.
Name | Type | Description |
---|---|---|
number | number | Any real number, angle measured in radians for which you want the hyperbolic secant. |
- Source
- See
- For further information, see docs.oasis-open.org
Number that is the trigonometric hyberbolic secant of the number.
- Type:
- number
rosetta.sech(1); // returns 0.6480542736638855
(inner) seriesSum(x, power, step, coefficients) → {number}
Returns the sum of a power series based on the formula.
Name | Type | Description |
---|---|---|
x | number | The input value to the power series. |
power | number | The initial power to which you want to raise x. |
step | number | The step by which to increase n for each term in the series. |
coefficients | Array.<number> | A set of coefficients by which each successive power of x is multiplied. The number of values in coefficients determines the number of terms in the power series. For example, if there are three values in coefficients, then there will be three terms in the power series. |
- Source
- See
- For further information, see docs.oasis-open.org
Number that is the sum of the given power series
- Type:
- number
rosetta.seriesSum( rosetta.pi() / 4, 0, 2,
[ 1, -1 / rosetta.fact(2), 1 / rosetta.fact(4), -1 / rosetta.fact(6) ] )
// returns 0.7071032148228457
(inner) sign(…value) → {number}
Indicates whether a number is positive, negative, or zero.
Name | Type | Attributes | Description |
---|---|---|---|
value | number | <repeatable> | Number or number list. The number whose sign you want to determine. |
- Source
- See
- For further information, see www.hcltechsw.com and docs.oasis-open.org
Number or number list. May be any of the following values: signed number is negative, - 1, signed number is zero, 0, signed number is positive, 1 and www.oasis-open.org
- Type:
- number
rosetta.sign(5); // returns 1
rosetta.sign(5,-6,7); // returns [1, -1, 1]
(inner) sin(…angle) → {number}
Given an angle in radians, returns the sine of the angle. In a right triangle, the sine of an acute angle is the ratio of the length of its opposite side to the length of the hypotenuse.
Name | Type | Attributes | Description |
---|---|---|---|
angle | number | <repeatable> | Number or number list. An angle expressed in radians for which you want the sine. |
- Source
- See
- For further information, see www.hcltechsw.com and docs.oasis-open.org
Number or number list. The sine of angle, from -1 to 1. Rounded to 15 decimal places. and www.oasis-open.org
- Type:
- number
rosetta.sin(.5); // returns 0.479425538604203
rosetta.sin(.5,.6,.7); // returns [0.479425538604203, 0.5646424733950354, 0.644217687237691]
(inner) sinh(number) → {number}
Returns the hyperbolic sine of a number.
Name | Type | Description |
---|---|---|
number | number | Any real number, angle measured in radians for which you want the hyperbolic sine. |
- Source
- See
- For further information, see docs.oasis-open.org
Number that is the trigonometric hyberbolic sine of the number.
- Type:
- number
rosetta.sinh(1); // returns 1.1752011936438014
(inner) sqrt(…value) → {number}
Given a number, returns its positive square root.
Name | Type | Attributes | Description |
---|---|---|---|
value | number | <repeatable> | Number or number list. The number whose square root you want to find. The number must be positive, otherwise sqrt returns an error. |
- Source
- See
- For further information, see www.hcltechsw.com and docs.oasis-open.org
Number or number list. The square root of the number. and www.oasis-open.org
- Type:
- number
rosetta.sqrt(25); // returns 5
rosetta.sqrt(16,64,25); // returns [4, 8, 5]
(inner) sqrtPi(number) → {number}
Returns the square root of (number * pi).
Name | Type | Description |
---|---|---|
number | number | The number by which pi is multiplied. |
- Source
- See
- For further information, see docs.oasis-open.org
Number that is the square root of (number * pi)
- Type:
- number
rosetta.sqrtPi(3) // returns 3.0699801238394655
(inner) subTotal(function_num, ref1) → {number}
Returns a subtotal in a list or database.
Name | Type | Description |
---|---|---|
function_num | number | Number 1-11 or 101-111 that specifies the function to use for the subtotal. 1-11 includes manually-hidden rows, while 101-111 excludes them; filtered-out values are always excluded. |
ref1 | Array.<number> | Number or number list. The first named range or reference for which you want the subtotal. |
- Source
- See
- For further information, see docs.oasis-open.org
The subtotal of the of a list or database
- Type:
- number
rosetta.subTotal(4, [1, 2, 3]) // returns 3 (max)
(inner) sum(…value) → {number}
Adds a set of numbers or number lists.
Name | Type | Attributes | Description |
---|---|---|---|
value | number | <repeatable> | Number or number list. The numbers used to calculate the sum. |
- Source
- See
- For further information, see www.hcltechsw.com and docs.oasis-open.org
Number that is the sum of the value numbers. and www.oasis-open.org
- Type:
- number
rosetta.sum(1, 2, 3); // returns 6
rosetta.sum([1, 2, 3], [1, 4]); // returns 11
(inner) sumIf(range, criteria, sum_rangeopt) → {number}
Adds the values specified by a given criteria.
Name | Type | Attributes | Description |
---|---|---|---|
range | Array | The range of values that you want evaluated by criteria. Cells in each range must be numbers or names, arrays, or references that contain numbers. Blank and text values are ignored. | |
criteria | * | The criteria in the form of a number, expression, a value reference, text, or a function that defines which values will be added. | |
sum_range | Array.<number> | <optional> | Optional. The actual values to add, if you want to add values other than those specified in the range argument. If the sum_range argument is omitted, Excel adds the values that are specified in the range argument (the same values to which the criteria is applied). Sum_range should be the same size and shape as range. If it isn't, performance may suffer, and the formula will sum a range of values that starts with the first value in sum_range but has the same dimensions as range. |
- Source
- See
- For further information, see docs.oasis-open.org
The sum of the values specified by the given criteria.
- Type:
- number
rosetta.sumIf([1, 2, 3], '>1') // returns 5
(inner) sumIfs(…values) → {number}
Adds the values in a range that meet multiple criteria.
Name | Type | Attributes | Description |
---|---|---|---|
values | Array | <repeatable> | The range of values that you want evaluated. |
- Source
- See
- For further information, see docs.oasis-open.org
The sum of the values that meet the given criteria.
- Type:
- number
rosetta.sumIfs([1, 2, 3], [4, 5, 6], '>4', [7, 8, 9], '<9') // returns 2
(inner) sumProduct(…args) → {number}
Returns the sum of the products of corresponding array components.
Name | Type | Attributes | Description |
---|---|---|---|
args | Array | <repeatable> | The range of values that you want evaluated. |
- Source
- See
- For further information, see docs.oasis-open.org
The sum of the products of corresponding array components.
- Type:
- number
rosetta.sumProduct([1, 4, 10], [0.55, 0.3, 0.1]) // returns 2.75
(inner) sumSq(…args) → {number}
Returns the sum of the squares of the arguments.
Name | Type | Attributes | Description |
---|---|---|---|
args | number | <repeatable> | Number or number list. One number is required, subsequent numbers are optional. 1 to 255 arguments for which you want the sum of the squares. You can also use a single array or a reference to an array instead of arguments separated by commas. |
- Source
- See
- For further information, see docs.oasis-open.org
The sum of the squares of the arguments.
- Type:
- number
rosetta.sumSq([1, 2, 3]) // returns 14
(inner) sumx2My2(array_x, array_y) → {number}
Returns the sum of the difference of squares of corresponding values in two arrays.
Name | Type | Description |
---|---|---|
array_x | Array.<number> | The first array or range of values. |
array_y | Array.<number> | The second array or range of values. |
- Source
- See
- For further information, see docs.oasis-open.org
The sum of the difference of squares of corresponding values in two arrays.
- Type:
- number
rosetta.sumx2My2([1, 2, 3], [4, 5, 6]) // returns -63
(inner) sumx2Py2(array_x, array_y) → {number}
Returns the sum of the sum of squares of corresponding values in two arrays.
Name | Type | Description |
---|---|---|
array_x | Array.<number> | The first array or range of values. |
array_y | Array.<number> | The second array or range of values. |
- Source
- See
- For further information, see docs.oasis-open.org
The sum of the difference of squares of corresponding values in two arrays.
- Type:
- number
rosetta.sumx2Py2([1, 2, 3], [4, 5, 6]) // returns 91
(inner) sumxmy2(array_x, array_y) → {number}
Returns the sum of squares of differences of corresponding values in two arrays.
Name | Type | Description |
---|---|---|
array_x | Array.<number> | The first array or range of values. |
array_y | Array.<number> | The second array or range of values. |
- Source
- See
- For further information, see docs.oasis-open.org
The sum of squares of differences of corresponding values in two arrays.
- Type:
- number
rosetta.sumxmy2([1, 2, 3], [4, 5, 6]) // returns 27
(inner) tan(…angle) → {number}
Given an angle in radians, returns the tangent of the angle. In a right triangle the tangent of an acute angle is the ratio of the length of the opposite side to the length of the adjacent side.
Name | Type | Attributes | Description |
---|---|---|---|
angle | number | <repeatable> | Number or number list. An angle expressed in radians for which you want the tangent. |
- Source
- See
- For further information, see www.hcltechsw.com and docs.oasis-open.org
Number or number list. The tangent of angle, rounded to 15 decimal places. and www.oasis-open.org
- Type:
- number
rosetta.tan(.5); // returns 0.5463024898437905
rosetta.tan(.5,.6,.7); // returns [0.5463024898437905, 0.6841368083416923, 0.8422883804630794]
(inner) tanh(number) → {number}
Returns the hyperbolic tangent of a number.
Name | Type | Description |
---|---|---|
number | number | Any real number. |
- Source
- See
- For further information, see docs.oasis-open.org
The hyperbolic tangent of the number.
- Type:
- number
rosetta.tanh(0.5) // returns 0.46211715726000974
(inner) trunc(number, digitsopt) → {number}
Truncates a number to an integer or a specified precision.
Name | Type | Attributes | Description |
---|---|---|---|
number | number | The number you want to truncate. | |
digits | number | <optional> | Optional. A number specifying the precision of the truncation. The default value for num_digits is 0 (zero). |
- Source
- See
- For further information, see docs.oasis-open.org
The truncated for of the number with the given precision.
- Type:
- number
rosetta.trunc(0.45) // returns 0
rosetta.trunc(12.3456, 2) // returns 12.34