Abs
The absolute value or magnitude of x: , its distance from 0.
✓ checked against that system · ! checked, with disagreements (hover a chip)Wikipedia
Absolute valueAbsolute value of a complex numberMathWorldAbsoluteValueComplexModulusWikidataQ3317982Britannicatopic/absolute-valueDLMF1.9.E7FungrimAbs✓Fungrim entryWolfram LanguageAbs!Typed signatures
| Type | Package | Applies |
|---|---|---|
(complex | infinity | quantity) -> number | analyticreplaces compute-engine | on Around, CenteredInterval, Interval |
(complex | infinity | quantity) -> number | compute-engine | always |
Details
- For a real number, if and if .
- For a complex number , , its distance from the origin.
- Always non-negative, with exactly at .
- Satisfies the triangle inequality .
- compute-engine doesn't factor constants out of a symbolic argument -- stays as written rather than simplifying to .
Examples
2 more kept as data, checked against the oraclesApplications #
Properties #
The right triangle gives exact modulus 2
live ↗InOut
Known value · Wolfram MathematicalFunctionData, Abs
Written with nested negations, still exactly 2
live ↗InOut
Known value · Wolfram MathematicalFunctionData, Abs
Fourth quadrant with a negated imaginary part, still 2
live ↗InOut
Known value · Wolfram MathematicalFunctionData, Abs
Possible issues #
Doesn't factor constants out of a symbolic argument: stays as written rather than reducing to
live ↗InOut
About
| Examples | 51 |
|---|---|
| Checked against | Wolfram Language 48 agree2 differ1 unevaluatedSageMath 40 agree2 differSymPy 46 agree1 differmpmath 23 agree1 differOscar 20 agreeJulia 37 agree3 errorRust 17 agree1 error |
| Crosswalk | Wikipedia ×2MathWorld ×2WikidataBritannicaDLMFFungrimFungrim entry ×57Wolfram LanguageSageMathSymPympmathOscarJuliaRust |
Implementation
mapped
oscarpackages/oracle/src/mappings.tsmapped
sympypackages/oracle/src/mappings.tsmapped
mpmathpackages/oracle/src/mappings.tsmapped
sagepackages/oracle/src/mappings.tsmapped
rustpackages/oracle/src/mappings.tsmapped
juliapackages/oracle/src/mappings.ts