"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Functional_1 = require("../../../../Class/Functional");
const _ids_1 = require("../../../_ids");
class SQRT extends Functional_1.Functional {
    constructor(system) {
        super({
            i: ['a'],
            o: ['√a'],
        }, {}, system, _ids_1.ID_SQRT);
    }
    f({ a }, done) {
        if (a < 0) {
            done(undefined, 'cannot square root negative number');
        }
        else {
            done({ '√a': Math.sqrt(a) });
        }
    }
}
exports.default = SQRT;
//# sourceMappingURL=index.js.map