isZero

Returns whether the receiver is zero or negative zero.

import { Arith } from "@teakit/arith";

Arith.from("0").isZero(); // true
Arith.from("-0").isZero(); // true
Arith.from("0.000").isZero(); // true
Arith.from("0.0001").isZero(); // false
Arith.from("Infinity").isZero(); // false
Arith.from("NaN").isZero(); // false

API Reference

Signature

isZero(): boolean;

Parameters

ParameterTypeRequiredNotes
None--This method does not take parameters.

Returns

Returns a boolean.

Throws

  • Does not take user arguments; no argument validation is performed.

Agent Contract

FieldValue
Kindinstance method
Canonical nameisZero
AliasesNone
Mutates receiverNo
Returnsboolean
Accepts (string, base) overloadNo
Configuration dependenciesNone
Related methodsisFinite, isInteger, isNaN

Agent Notes

  • Use predicate methods instead of inspecting c, e, or s directly.
  • Import with import { Arith } from "@teakit/arith"; default imports are unsupported.
  • Use Arith.from(...) to create values. Do not generate new Arith(...) or Arith(...).
  • Use string inputs for exact decimal values, especially money-like values.
  • Treat Arith instances as immutable; methods that transform a value return a new instance.
  • Do not mutate internal fields such as c, e, s, or _isArith.