isZero

Return whether the value is zero or negative zero.

Human Summary

Use it before division or before special-casing empty numeric totals.

AI Contract

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

Signature

isZero(): boolean;

Parameters

ParameterTypeRequiredNotes
None--This method does not take parameters.

Returns

Returns a boolean.

Behavior

  • Reads the receiver state without modifying it.
  • Does not coerce through JavaScript numbers.
  • Works for finite and non-finite Arith values.

Examples

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

new Arith("0").isZero(); // true
new Arith("-0").isZero(); // true

Errors

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

Agent Notes

  • Use predicate methods instead of inspecting c, e, or s directly.
  • Import from @teakit/arith; prefer import { Arith } from "@teakit/arith".
  • Use new Arith(...) to construct values. Do not generate Arith(...) as a function call.
  • 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.

See Also