isNegative

Return whether the value has a negative sign.

Human Summary

Use it when sign matters independently from magnitude.

AI Contract

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

Signature

isNegative(): 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").isNegative(); // 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