/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE  AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE:  you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import * as tslib_1 from "tslib";
import { BuiltInFunctionBase } from "./BuiltInFunctionBase";
import { ExcelCalcValue } from "./ExcelCalcValue";
import { markType } from "igniteui-angular-core";
import { CalcFunctionUtilities } from "./CalcFunctionUtilities";
import { ExcelCalcErrorValue } from "./ExcelCalcErrorValue";
/**
 * @hidden
 */
var UltraCalcFunctionPDuration = /** @class */ (function (_super) {
    tslib_1.__extends(UltraCalcFunctionPDuration, _super);
    function UltraCalcFunctionPDuration() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    UltraCalcFunctionPDuration.prototype.evaluate = function (a, b) {
        return CalcFunctionUtilities.i(a, true, function (c, d, e) {
            if (c <= 0 || d <= 0 || e <= 0) {
                return new ExcelCalcValue(new ExcelCalcErrorValue(4));
            }
            var f = (Math.log(e) - Math.log(d)) / Math.log(1 + c);
            return new ExcelCalcValue(f);
        });
    };
    UltraCalcFunctionPDuration.prototype.get_maxArgs = function () {
        return 3;
    };
    Object.defineProperty(UltraCalcFunctionPDuration.prototype, "maxArgs", {
        get: function () {
            return this.get_maxArgs();
        },
        enumerable: true,
        configurable: true
    });
    UltraCalcFunctionPDuration.prototype.get_minArgs = function () {
        return 3;
    };
    Object.defineProperty(UltraCalcFunctionPDuration.prototype, "minArgs", {
        get: function () {
            return this.get_minArgs();
        },
        enumerable: true,
        configurable: true
    });
    UltraCalcFunctionPDuration.prototype.get_name = function () {
        return "pduration";
    };
    Object.defineProperty(UltraCalcFunctionPDuration.prototype, "name", {
        get: function () {
            return this.get_name();
        },
        enumerable: true,
        configurable: true
    });
    UltraCalcFunctionPDuration.$t = markType(UltraCalcFunctionPDuration, 'UltraCalcFunctionPDuration', BuiltInFunctionBase.$);
    return UltraCalcFunctionPDuration;
}(BuiltInFunctionBase));
export { UltraCalcFunctionPDuration };
//# sourceMappingURL=UltraCalcFunctionPDuration.js.map