Skip to main content

- — Negate / Subtract

Function. Hanzi: 减 (減). Ranks: 0 monadic, 0 0 dyadic

-Y negates. Pervasive.

-3                ⍝ ¯3

X-Y subtracts. Pervasive.

10-1 2 3          ⍝ 9 8 7

Characters shift by code point. Character differences are exact integers.

'd'-3             ⍝ 'a'
'd'-'a'           ⍝ 3ₓ

¯ marks negative literals.

Inverse

-⁻ is -. With the right argument fixed, (-↢X)⁻Y is Y+X.

10-⁻3     ⍝ 7
(-↢3)⁻7   ⍝ 10