Magnitude
Revision as of 02:43, 29 May 2020 by Bubbler (talk | contribs) (Created page with "{{Built-in|Magnitude|<nowiki>|</nowiki>}} or '''Absolute Value''' is a monadic scalar function which gives the absolute value of a real or...")
Magnitude (|
) or Absolute Value is a monadic scalar function which gives the absolute value of a real or complex number. Magnitude shares the glyph |
with the dyadic arithmetic function Residue.
Examples
|0 1 2 ¯1 ¯2 0 1 2 1 2 |0J2 ¯3J¯4 2 5
Properties
The magnitude of any number is a non-negative real number.
For real numbers, the magnitude equals the original number without sign.
⍝ TODO
For complex numbers, the magnitude is defined as the Euclidean distance from the number 0 on the complex plane.
⍝ TODO
Works in: Dyalog APL
Any real or complex number is equal to the product of its signum and magnitude.
⍝ TODO
Works in: Dyalog APL