MCPcopy Create free account
hub / github.com/PageLeay/celestial-runtime / mulSignal

Method mulSignal

lib.commonjs/utils/fixednumber.js:291–298  ·  view source on GitHub ↗

* Returns a new [[FixedNumber]] with the result of %%this%% multiplied * by %%other%%. A [[NumericFaultError]] is thrown if overflow * occurs or if underflow (precision loss) occurs.

(other)

Source from the content-addressed store, hash-verified

289 * occurs or if underflow (precision loss) occurs.
290 */
291 mulSignal(other) {
292 this.#checkFormat(other);
293 const value = this.#val * other.#val;
294 (0, errors_js_1.assert)((value % this.#tens) === BN_0, "precision lost during signalling mul", "NUMERIC_FAULT", {
295 operation: "mulSignal", fault: "underflow", value: this
296 });
297 return this.#checkValue(value / this.#tens, "mulSignal");
298 }
299 #div(o, safeOp) {
300 (0, errors_js_1.assert)(o.#val !== BN_0, "division by zero", "NUMERIC_FAULT", {
301 operation: "div", fault: "divide-by-zero", value: this

Callers

nothing calls this directly

Calls 2

#checkFormatMethod · 0.95
#checkValueMethod · 0.95

Tested by

no test coverage detected