engineering.js

"use strict";
/***************************************************
* Licensed Materials - Property of HCL.
* (c)Copyright HCL America, Inc. 2023-2024
****************************************************/
Object.defineProperty(exports, "__esModule", { value: true });
exports.imSub = exports.imSqrt = exports.imSinh = exports.imSin = exports.imSech = exports.imSec = exports.imReal = exports.imProduct = exports.imPower = exports.imLog2 = exports.imLog10 = exports.imLn = exports.imExp = exports.imDiv = exports.imCsch = exports.imCsc = exports.imCot = exports.imCosh = exports.imCos = exports.imConjugate = exports.imArgument = exports.imaginary = exports.imAbs = exports.hex2Oct = exports.hex2Dec = exports.hex2Bin = exports.geStep = exports.erfcPrecise = exports.erfc = exports.erfPrecise = exports.erf = exports.delta = exports.dec2Oct = exports.dec2Hex = exports.dec2Bin = exports.convert = exports.complex = exports.bitXOr = exports.bitRShift = exports.bitOr = exports.bitLShift = exports.bitAnd = exports.bin2Oct = exports.bin2Hex = exports.bin2Dec = exports.besselY = exports.besselK = exports.besselJ = exports.besselI = exports._openFormula = void 0;
exports.oct2Hex = exports.oct2Dec = exports.oct2Bin = exports.imTan = exports.imSum = void 0;
const tslib_1 = require("tslib");
/**
 * @file Engineering
 * @module engineering
 * @category Engineering
 */
const openf = tslib_1.__importStar(require("../openformula/engineering"));
exports._openFormula = openf;
//-----------------------------
// Open Formula engineering
/**
 * Returns the modified Bessel function In(x).
 * @param {number} x The value at which to evaluate the function
 * @param {number} order The order of the Bessel function. If order is not an integer, it is truncated
 * @returns {number} The calculated modified Bessel function for the given value of x and the specified order
 * @example rosettajs.besselI(2.6, 1) // returns 2.7553843378955585
 */
function besselI(x, order) {
    return openf.BESSELI(x, order);
}
exports.besselI = besselI;
/**
 * Returns the Bessel function Jn(x).
 * @param {number} x The value at which to evaluate the function
 * @param {number} order The order of the Bessel function. If order is not an integer, it is truncated
 * @returns {number} The calculated Bessel function for the given value of x and the specified order
 * @example rosettajs.besselJ(2.6, 1) // returns 0.47081826649775615
 */
function besselJ(x, order) {
    return openf.BESSELJ(x, order);
}
exports.besselJ = besselJ;
/**
 * Returns the modified Bessel function Kn(x).
 * @param {number} x The value at which to evaluate the function.
 * @param {number} order The order of the Bessel function. If order is not an integer, it is truncated
 * @returns {number} The calculated Bessel function for the given value of x and the specified order
 * @example rosettajs.besselK(2.6, 1) // returns 0.0652840440474331
 */
function besselK(x, order) {
    return openf.BESSELK(x, order);
}
exports.besselK = besselK;
/**
 * Returns the Bessel function Yn(x).
 * @param {number} x The value at which to evaluate the function
 * @param {number} order The order of the function. If order is not an integer, it is truncated
 * @returns {number} The calculated Bessel function for the given value of x and the specified order
 * @example rosettajs.besselY(2.6, 1) // returns 0.18836354378844533
 */
function besselY(x, order) {
    return openf.BESSELY(x, order);
}
exports.besselY = besselY;
/**
 * Converts a binary number to decimal.
 * @param {number} number The binary number you want to convert. Number cannot contain more than
 *     10 characters (10 bits). The most significant bit of number is the sign bit. The
 *     remaining 9 bits are magnitude bits. Negative numbers are represented using
 *     two's-complement notation.
 * @returns {number} A decimal for the given binary number
 * @example rosettajs.bin2Dec(1100001) // returns 97
 */
function bin2Dec(number) {
    return openf.BIN2DEC(number);
}
exports.bin2Dec = bin2Dec;
/**
 * Converts a binary number to hexadecimal.
 * @param {number} number The binary number you want to convert. Number cannot contain more than
 *     10 characters (10 bits). The most significant bit of number is the sign bit. The
 *     remaining 9 bits are magnitude bits. Negative numbers are represented using
 *     two's-complement notation.
 * @param {number} [places] The number of characters to use. If places is omitted, bin2Hex uses the
 *     minimum number of characters necessary. Places is useful for padding the return
 *     value with leading 0s (zeros).
 * @returns {string} A hexadecimal for the given binary number
 * @example rosettajs.bin2Hex(11111011) // returns fb
 * @example rosettajs.bin2Hex(11111011, 4) // returns 00fb
 */
function bin2Hex(number, places) {
    return openf.BIN2HEX(number, places);
}
exports.bin2Hex = bin2Hex;
/**
 * Converts a binary number to octal.
 * @param {number} number The binary number you want to convert. Number cannot contain more than
 *     10 characters (10 bits). The most significant bit of number is the sign bit. The
 *     remaining 9 bits are magnitude bits. Negative numbers are represented using
 *     two's-complement notation.
 * @param {number} [places] The number of characters to use. If places is omitted, bin2Oct uses the
 *     minimum number of characters necessary. Places is useful for padding the return
 *     value with leading 0s (zeros).
 * @returns {string} A octal for the given binary number
 * @example rosettajs.bin2Oct(1001) // returns 11
 * @example rosettajs.bin2Oct(1001, 4) // returns 0011
 */
function bin2Oct(number, places) {
    return openf.BIN2OCT(number, places);
}
exports.bin2Oct = bin2Oct;
/**
 * Returns a bitwise 'AND' of two numbers.
 * @param {number} number1 A decimal greater than or equal to 0
 * @param {number} number2 A decimal greater than or equal to 0
 * @returns {number} A decimal that is a bitwise 'AND' of the 2 given numbers
 * @example rosettajs.bitAnd(7,29) // returns 5
 */
function bitAnd(number1, number2) {
    return openf.BITAND(number1, number2);
}
exports.bitAnd = bitAnd;
/**
 * Returns a value number shifted left by shift_amount bits.
 * @param {number} number A integer greater than or equal to 0
 * @param {number} shift A integer indicating amount of bits to shift
 * @returns {number} A decimal representing the specified number shifted left by specified amount of bits
 * @example rosettajs.bitLShift(5,3) // returns 40
 */
function bitLShift(number, shift) {
    return openf.BITLSHIFT(number, shift);
}
exports.bitLShift = bitLShift;
/**
 * Returns a bitwise 'OR' of two numbers.
 * @param {number} number1 A decimal greater than or equal to 0
 * @param {number} number2 A decimal greater than or equal to 0
 * @returns {number} A decimal that is a bitwise 'OR' of the 2 given numbers
 * @example rosettajs.bitOr(7,29) // returns 31
 */
function bitOr(number1, number2) {
    return openf.BITOR(number1, number2);
}
exports.bitOr = bitOr;
/**
 * Returns a value number shifted right by shift_amount bits.
 * @param {number} number A integer greater than or equal to 0
 * @param {number} shift A integer indicating amount of bits to shift
 * @returns {number} A decimal representing the specified number shifted right by specified amount of bits
 * @example rosettajs.bitRShift(29,2) // returns 7
 */
function bitRShift(number, shift) {
    return openf.BITRSHIFT(number, shift);
}
exports.bitRShift = bitRShift;
/**
 * Returns a bitwise 'XOR' of two numbers.
 * @param {number} number1 A decimal greater than or equal to 0
 * @param {number} number2 A decimal greater than or equal to 0
 * @returns {number} A decimal that is a bitwise 'XOR' of the 2 given numbers
 * @example rosettajs.bitXOr(7,29) // returns 26
 */
function bitXOr(number1, number2) {
    return openf.BITXOR(number1, number2);
}
exports.bitXOr = bitXOr;
/**
 * Converts real and imaginary coefficients into a complex number.
 * @param {number} real The real coefficient of the complex number
 * @param {number} imaginary The imaginary coefficient of the complex number
 * @param {String} [suffix] The suffix, either lowercase "i" or "j", for the imaginary component of the
 *     complex number. If omitted, suffix is assumed to be "i".
 * @returns {string|number} A complex number from the given real and imaginary coefficient numbers
 * @example rosettajs.complex(4,5) // returns 4+5i
 * @example rosettajs.complex(4,5,"j") // returns 4+5j
 */
function complex(real, imaginary, suffix = "i") {
    return openf.COMPLEX(real, imaginary, suffix);
}
exports.complex = complex;
/**
 * Converts a number from one measurement system to another.
 * @param {number} number The value in from_units to convert
 * @param {number} from_unit The units for number
 * @param {number} to_unit The units for the result
 * @returns {number} A number representing conversion from one measurement system to another
 * @example rosettajs.convert(1, "lbm", "kg") // returns 0.45359237
 */
function convert(number, from_unit, to_unit) {
    return openf.CONVERT(number, from_unit, to_unit);
}
exports.convert = convert;
/**
 * Converts a decimal number to binary.
 * @param {number} number The decimal integer you want to convert. If number is negative, valid place
 *     values are ignored and dec2Bin returns a 10-character (10-bit) binary number in
 *     which the most significant bit is the sign bit. The remaining 9 bits are
 *     magnitude bits. Negative numbers are represented using two's-complement notation.
 * @param {number} [places] The number of characters to use. If places is omitted, dec2Bin uses the minimum
 *     number of characters necessary. Places is useful for padding the return value with leading 0s (zeros).
 * @returns {number} A binary for the given decimal number
 * @example rosettajs.dec2Bin(10,5) // returns 01010
 * @example rosettajs.dec2Bin(-90) // returns 1110100110
 */
function dec2Bin(number, places) {
    return openf.DEC2BIN(number, places);
}
exports.dec2Bin = dec2Bin;
/**
 * Converts a decimal number to hexadecimal.
 * @param {number} number The decimal integer you want to convert. If number is negative, places is
 *     ignored and dec2Hex returns a 10-character (40-bit) hexadecimal number in which
 *     the most significant bit is the sign bit. The remaining 39 bits are magnitude
 *     bits. Negative numbers are represented using two's-complement notation.
 * @param {number} [places] The number of characters to use. If places is omitted, dec2Hex uses the minimum
 *     number of characters necessary. Places is useful for padding the return value
 *     with leading 0s (zeros).
 * @returns {string} A hexadecimal for the given decimal number
 * @example rosettajs.dec2Hex(90, 4) // returns 005a
 * @example rosettajs.dec2Hex(-75) // returns ffffffffb5
 */
function dec2Hex(number, places) {
    return openf.DEC2HEX(number, places);
}
exports.dec2Hex = dec2Hex;
/**
 * Converts a decimal number to octal.
 * @param {number} number The decimal integer you want to convert. If number is negative, places is
 *     ignored and dec2Oct returns a 10-character (30-bit) octal number in which the
 *     most significant bit is the sign bit. The remaining 29 bits are magnitude bits.
 *     Negative numbers are represented using two's-complement notation.
 * @param {number} [places] The number of characters to use. If places is omitted, dec2Oct uses the minimum
 *     number of characters necessary. Places is useful for padding the return value
 *     with leading 0s (zeros).
 * @returns {number} A octal for the given decimal number
 * @example rosettajs.dec2Oct(78, 3) // returns 116
 * @example rosettajs.dec2Oct(-75) // returns 7777777665
 */
function dec2Oct(number, places) {
    return openf.DEC2OCT(number, places);
}
exports.dec2Oct = dec2Oct;
/**
 * Tests whether two values are equal.
 * @param {number} number1 The first number
 * @param {number} [number2] The second number. If omitted, number2 is assumed to be zero.
 * @returns {number} 1 if number1 = number2; returns 0 otherwise
 * @example rosettajs.delta(6, 4) // returns 0
 * @example rosettajs.delta(8, 8) // returns 1
 */
function delta(number1, number2 = 0) {
    return openf.DELTA(number1, number2);
}
exports.delta = delta;
/**
 * Returns the error function integrated between lower_limit and upper_limit.
 * @param {number} lower_bound The lower bound for integrating ERF
 * @param {number} [upper_bound] The upper bound for integrating ERF. If omitted, ERF integrates between zero and lower_limit.
 * @returns {number} The error function integrated between lower_limit and upper_limit
 * @example rosettajs.erf(0.875) // returns 0.7840750610598597
 */
function erf(lower_bound, upper_bound = 0) {
    return openf.ERF(lower_bound, upper_bound);
}
exports.erf = erf;
/**
 * Returns the error function.
 * @throws {Error} method not implemented
 * @TODO this needs to be implemented
 */
erf.precise = () => {
    return openf.ERF.PRECISE();
};
/** @see erf.precise */
exports.erfPrecise = erf.precise;
/**
 * Returns the complementary error function.
 * @param {number} x The lower bound for integrating ERFC
 * @returns {number} Complementary ERF of provided number
 * @example rosettajs.erfc(2) // returns 0.004677734981047288
 */
function erfc(x) {
    return openf.ERFC(x);
}
exports.erfc = erfc;
/**
 * Returns the complementary ERF function integrated between x and infinity.
 * @throws {Error} method not implemented
 * @TODO this needs to be implemented
 */
erfc.precise = () => {
    return openf.ERFC.PRECISE();
};
/** @see erfc.precise */
exports.erfcPrecise = erfc.precise;
/**
 * Tests whether a number is greater than a threshold value.
 * @param {number} number The value to test against step
 * @param {number} [step] The threshold value. If you omit a value for step, geStep uses zero.
 * @returns {number} 1 if number ≥ step; returns 0 (zero) otherwise.
 * @example rosettajs.geStep(6) // returns 1
 * @example rosettajs.geStep(6,8) // returns 0
 */
function geStep(number, step = 0) {
    return openf.GESTEP(number, step);
}
exports.geStep = geStep;
/**
 * Converts a hexadecimal number to binary.
 * @param {string} number The hexadecimal number you want to convert. Number cannot contain more than 10
 *     characters. The most significant bit of number is the sign bit (40th bit from
 *     the right). The remaining 9 bits are magnitude bits. Negative numbers are
 *     represented using two's-complement notation.
 * @param {number} [places] The number of characters to use. If places is omitted, hex2Bin uses the minimum
 *     number of characters necessary. Places is useful for padding the return value with leading 0s (zeros).
 * @returns {string} A binary for the given hexadecimal
 * @example rosettajs.hex2Bin("B") // returns 1011
 * @example rosettajs.hex2Bin("B",10) // returns 0000001011
 */
function hex2Bin(number, places) {
    return openf.HEX2BIN(number, places);
}
exports.hex2Bin = hex2Bin;
/**
 * Converts a hexadecimal number to decimal.
 * @param {string} number The hexadecimal number you want to convert. Number cannot contain more
 *     than 10 characters (40 bits). The most significant bit of number is the sign
 *     bit. The remaining 39 bits are magnitude bits. Negative numbers are represented using
 *     two's-complement notation.
 * @returns {number} A decimal for the given hexadecimal number
 * @example rosettajs.hex2Dec("A6") // returns 166
 */
function hex2Dec(number) {
    return openf.HEX2DEC(number);
}
exports.hex2Dec = hex2Dec;
/**
 * Converts a hexadecimal number to octal
 * @param {string} number The hexadecimal number you want to convert. Number cannot contain more
 *     than 10 characters. The most significant bit of number is the sign bit. The
 *     remaining 39 bits are magnitude bits. Negative numbers are represented using
 *     two's-complement notation.
 * @param {number} [places] The number of characters to use. If places is omitted, hex2Oct uses the
 *     minimum number of characters necessary. Places is useful for padding the return
 *     value with leading 0s (zeros).
 * @returns {string} A octal for the given hexadecimal number
 * @example rosettajs.hex2Oct("B") // returns 13
 * @example rosettajs.hex2Oct("B",10) // 0000000013
 */
function hex2Oct(number, places) {
    return openf.HEX2OCT(number, places);
}
exports.hex2Oct = hex2Oct;
/**
 * Returns the absolute value (modulus) of a complex number.
 * @param {string|number} inumber A complex number for which you want the absolute value
 * @returns {number} Absolute value for the given complex number
 * @example rosettajs.imAbs("9+12i") // returns 15
 */
function imAbs(inumber) {
    return openf.IMABS(inumber);
}
exports.imAbs = imAbs;
/**
 * Returns the imaginary coefficient of a complex number.
 * @param {string|number} inumber A complex number for which you want the imaginary coefficient
 * @returns {string|number} The imaginary coefficient of the given complex number
 * @example rosettajs.imaginary("4+5i") // returns 5
 * @example rosettajs.imaginary(7) // returns 0
 */
function imaginary(inumber) {
    return openf.IMAGINARY(inumber);
}
exports.imaginary = imaginary;
/**
 * Returns the argument theta, an angle expressed in radians.
 * @param {string|number} inumber A complex number for which you want the argument Theta
 * @returns {string|number} The argument Theta, an angle expressed in radians, for the given complex number
 * @example rosettajs.imArgument("4+5i") // returns 0.8960553845713439
 */
function imArgument(inumber) {
    return openf.IMARGUMENT(inumber);
}
exports.imArgument = imArgument;
/**
 * Returns the complex conjugate of a complex number.
 * @param {string|number} inumber A complex number for which you want the conjugate
 * @returns {string|number} The complex conjugate of the given complex number
 * @example rosettajs.imConjugate("7+4i") // returns 7-4i
 */
function imConjugate(inumber) {
    return openf.IMCONJUGATE(inumber);
}
exports.imConjugate = imConjugate;
/**
 * Returns the cosine of a complex number.
 * @param {string|number} inumber A complex number for which you want the cosine
 * @returns {string|number} Returns the cosine of the given complex number in x + yi or x + yj text format
 * @example rosettajs.imCos("7+i") // returns 1.1633319692207098-0.772091435022302i
 */
function imCos(inumber) {
    return openf.IMCOS(inumber);
}
exports.imCos = imCos;
/**
 * Returns the hyperbolic cosine of a complex number.
 * @param {string|number} inumber A complex number for which you want the hyperbolic cosine
 * @returns {string|number} The hyperbolic cosine of the given complex number in x+yi or x+yj text format
 * @example rosettajs.imCosh("7+i") // returns 296.2569584411429+461.3921082367867i
 */
function imCosh(inumber) {
    return openf.IMCOSH(inumber);
}
exports.imCosh = imCosh;
/**
 * Returns the cotangent of a complex number.
 * @param {string|number} inumber A complex number for which you want the cotangent
 * @returns {string|number} The cotangent of the given complex number in x+yi or x+yj text format
 * @example rosettajs.imCot("7+i") // returns 0.27323643702063916-1.0003866917747672i
 */
function imCot(inumber) {
    return openf.IMCOT(inumber);
}
exports.imCot = imCot;
/**
 * Returns the cosecant of a complex number.
 * @param {string|number} inumber A complex number for which you want the cosecant
 * @returns {string|number} The cosecant of a complex number in x+yi or x+yj text format
 * @example rosettajs.imCsc("7+i") // returns 0.5592579837285742-0.48875850368917295i
 */
function imCsc(inumber) {
    return openf.IMCSC(inumber);
}
exports.imCsc = imCsc;
/**
 * Returns the hyperbolic cosecant of a complex number.
 * @param {string|number} inumber A complex number for which you want the hyperbolic cosecant
 * @returns {string|number} The hyperbolic cosecant of the given complex number in x+yi or x+yj text format
 * @example rosettajs.imCsch("7+i") // returns 0.0009853823560021253-0.0015346446451764265i
 */
function imCsch(inumber) {
    return openf.IMCSCH(inumber);
}
exports.imCsch = imCsch;
/**
 * Returns the quotient of two complex numbers.
 * @param {string|number} inumber1 The complex numerator or dividend
 * @param {string|number} inumber2 The complex denominator or divisor
 * @returns {string|number} The quotient of the two given complex numbers in x + yi or x + yj text format
 * @example rosettajs.imDiv("-238+240i","10+24i") // returns 5+12i
 */
function imDiv(inumber1, inumber2) {
    return openf.IMDIV(inumber1, inumber2);
}
exports.imDiv = imDiv;
/**
 * Returns the exponential of a complex number.
 * @param {string|number} inumber A complex number for which you want the exponential
 * @returns {string|number} The exponential of a complex number in x + yi or x + yj text format
 * @example rosettajs.imExp("2+i") // returns 3.992324048441272+6.217676312367968i
 */
function imExp(inumber) {
    return openf.IMEXP(inumber);
}
exports.imExp = imExp;
/**
 * Returns the natural logarithm of a complex number.
 * @param {string|number} inumber A complex number for which you want the natural logarithm
 * @returns {string|number} The natural logarithm of a complex number in x + yi or x + yj text format
 * @example rosettajs.imLn("2+i") // returns 0.8047189562170503+0.4636476090008061i
 */
function imLn(inumber) {
    return openf.IMLN(inumber);
}
exports.imLn = imLn;
/**
 * Returns the base-10 logarithm of a complex number.
 * @param {string|number} inumber A complex number for which you want the common logarithm
 * @returns {string|number} The common logarithm (base 10) of a complex number in x + yi or x + yj text format.
 * @example rosettajs.imLog10("7+i") // returns 0.8494850021680093+0.06162510781291279i
 */
function imLog10(inumber) {
    return openf.IMLOG10(inumber);
}
exports.imLog10 = imLog10;
/**
 * Returns the base-2 logarithm of a complex number.
 * @param {string|number} inumber A complex number for which you want the base-2 logarithm
 * @returns {string|number} The base-2 logarithm of a complex number in x + yi or x + yj text format
 * @example rosettajs.imLog2("7+i") // returns 2.821928094887362+0.20471417699417774i
 */
function imLog2(inumber) {
    return openf.IMLOG2(inumber);
}
exports.imLog2 = imLog2;
/**
 * Returns a complex number raised to an integer power.
 * @param {string|number} inumber A complex number you want to raise to a power
 * @param {number} power The power to which you want to raise the complex number
 * @returns {string|number} A complex number in x + yi or x + yj text format raised to a power
 * @example rosettajs.imPower("2+2i", 55) // returns 4.835703278458551e+24-4.835703278458541e+24i
 */
function imPower(inumber, power) {
    return openf.IMPOWER(inumber, power);
}
exports.imPower = imPower;
/**
 * Returns the product of from 2 to 255 complex numbers.
 * @param {string[]|number[]} inumbers Inumber1 is required, subsequent inumbers are not. 1 to 255 complex numbers to multiply
 * @returns {string|number} The product of 1 to 255 complex numbers in x + yi or x + yj text format
 * @example rosettajs.imProduct("7+2i",55) // returns 385+110i
 * @example rosettajs.imProduct("7+2i","9-3i") // returns 69-3i
 */
function imProduct(...inumbers) {
    return openf.IMPRODUCT(...inumbers);
}
exports.imProduct = imProduct;
/**
 * Returns the real coefficient of a complex number.
 * @param {string|number} inumber A complex number for which you want the real coefficient
 * @returns {string|number} The real coefficient of a complex number in x + yi or x + yj text format
 * @example rosettajs.imReal("7-3i") // returns 7
 */
function imReal(inumber) {
    return openf.IMREAL(inumber);
}
exports.imReal = imReal;
/**
 * Returns the secant of a complex number.
 * @param {number} inumber A complex number for which you want the secant
 * @returns {String} The secant of a complex number in x+yi or x+yj text format.
 * @example rosettajs.imSec("7-3i") // returns 0.07520380314551633-0.06521210988033882i
 */
function imSec(inumber) {
    return openf.IMSEC(inumber);
}
exports.imSec = imSec;
/**
 * Returns the hyperbolic secant of a complex number.
 * @param {number} inumber A complex number for which you want the hyperbolic secant.
 * @returns {String} The hyperbolic secant of a complex number in x+yi or x+yj text format.
 * @example rosettajs.imSech("7-3i") // returns -0.0018055112256293788+0.00025736895567555834i
 */
function imSech(inumber) {
    return openf.IMSECH(inumber);
}
exports.imSech = imSech;
/**
 * Returns the sine of a complex number.
 * @param {string|number} inumber A complex number for which you want the sine
 * @returns {string|number} The sine of a complex number in x + yi or x + yj text format
 * @example rosettajs.imSin("7-3i") // returns 6.61431901165645-7.552498491503594i
 */
function imSin(inumber) {
    return openf.IMSIN(inumber);
}
exports.imSin = imSin;
/**
 * Returns the hyperbolic sine of a complex number.
 * @param {string|number} inumber A complex number for which you want the hyperbolic sine
 * @returns {string|number} The hyperbolic sine of a complex number in x+yi or x+yj text format
 * @example rosettajs.imSinh("7-4i") // returns -358.4033361942234+414.96770042530943i
 */
function imSinh(inumber) {
    return openf.IMSINH(inumber);
}
exports.imSinh = imSinh;
/**
 * Returns the square root of a complex number.
 * @param {string|number} inumber A complex number for which you want the square root
 * @returns {string|number} The square root of a complex number in x + yi or x + yj text format.
 * @example rosettajs.imSqrt("7-4i") // returns 2.744290231398508-0.7287858904707711i
 */
function imSqrt(inumber) {
    return openf.IMSQRT(inumber);
}
exports.imSqrt = imSqrt;
/**
 * Returns the difference between two complex numbers.
 * @param {string|number} inumber1 The complex number from which to subtract inumber2
 * @param {string|number} inumber2 The complex number to subtract from inumber1
 * @returns {stirng|number} The difference of two complex numbers in x + yi or x + yj text format
 * @example rosettajs.imSub("15+2i","3+3i") // returns 12-1i
 */
function imSub(inumber1, inumber2) {
    return openf.IMSUB(inumber1, inumber2);
}
exports.imSub = imSub;
/**
 * Returns the sum of complex numbers.
 * @param {string[]|number[]} inumbers Inumber1 is required, subsequent inumbers are not. 1 to 255 complex numbers to add
 * @returns {string|number} The sum of two or more complex numbers in x + yi or x + yj text format
 * @example rosettajs.imSum("7+2i",55) // returns 755+2i
 * @example rosettajs.imSum("7+2i","9-3i") // returns 16-1i
 */
function imSum(...inumbers) {
    return openf.IMSUM(...inumbers);
}
exports.imSum = imSum;
/**
 * Returns the tangent of a complex number.
 * @param {string|number} inumber A complex number for which you want the tangent
 * @returns {string|number} The tangent of a complex number in x+yi or x+yj text format
 * @example rosettajs.imTan("7+2i") // returns 0.03609431359326245+0.9943504089532537i
 */
function imTan(inumber) {
    return openf.IMTAN(inumber);
}
exports.imTan = imTan;
/**
 * Converts an octal number to binary.
 * @param {string} number The octal number you want to convert. Number may not contain more than 10
 *     characters. The most significant bit of number is the sign bit. The remaining 29
 *     bits are magnitude bits. Negative numbers are represented using two's-complement
 *     notation.
 * @param {number} [places] The number of characters to use. If places is omitted, oct2Bin uses the
 *     minimum number of characters necessary. Places is useful for padding the return
 *     value with leading 0s (zeros).
 * @returns {number} A binary for the given octal number
 * @example rosettajs.oct2Bin(7) // returns 111
 * @example rosettajs.oct2Bin(7, 5) // returns 00111
 */
function oct2Bin(number, places) {
    return openf.OCT2BIN(number, places);
}
exports.oct2Bin = oct2Bin;
/**
 * Converts an octal number to decimal.
 * @param {string} number The octal number you want to convert. Number may not contain more than
 *     10 octal characters (30 bits). The most significant bit of number is the sign
 *     bit. The remaining 29 bits are magnitude bits. Negative numbers are represented
 *     using two's-complement notation.
 * @returns {number} A decimal for the given octal number
 * @example rosettajs.oct2Dec(64) // returns 52
 */
function oct2Dec(number) {
    return openf.OCT2DEC(number);
}
exports.oct2Dec = oct2Dec;
/**
 * Converts an octal number to hexadecimal.
 * @param {string} number The octal number you want to convert. Number may not contain more than
 *     10 octal characters (30 bits). The most significant bit of number is the sign
 *     bit. The remaining 29 bits are magnitude bits. Negative numbers are represented
 *     using two's-complement notation
 * @param {number} [places] The number of characters to use. If places is omitted, OCT2HEX uses the
 *     minimum number of characters necessary. Places is useful for padding the return
 *     value with leading 0s (zeros).
 * @returns {number} A hexadecimal for the given octal number
 * @example rosettajs.oct2Hex(177747533) // returns 1ffcf5b
 * @example rosettajs.oct2Hex(74,5) // returns 0003c
 */
function oct2Hex(number, places) {
    return openf.OCT2HEX(number, places);
}
exports.oct2Hex = oct2Hex;
//-----------------------------
// Notes @functions engineering
//-----------------------------
// Notes @Commands engineering
//# sourceMappingURL=engineering.js.map