Root
The nth root of x: .
Root(x, n)the nth root .SageMath
real_nth_root(x, n)SymPyreal_root(x, n)Juliaenumeratio_root(x, n)Typed signatures
| Type | Package | Applies |
|---|---|---|
(complex | infinity, complex | infinity) -> number | compute-engine | always |
Details
- The nth root: . See Sqrt for the special case .
- Odd roots of a negative number stay real: . Even roots of a negative number canonicalize toward Sqrt instead, and evaluate exactly only when the radicand is itself a perfect power.
- A negative index gives the reciprocal root: .
- Both arguments are required -- unlike Sqrt, there's no default index.
- Evaluates exactly only when x is a perfect nth power; otherwise it stays in symbolic form, like .
Plot
Examples
Scope #
Possible issues #
About
| Examples | 13 |
|---|---|
| Checked against | Wolfram Language 8 agree5 differSageMath 12 agree1 errorSymPy 13 agreempmath 13 agreeJulia 13 agree |
| Crosswalk | WikipediaMathWorldWikidataBritannicaSageMathSymPyJulia |
Implementation
mapped
mpmathpackages/oracle/src/mappings.tsAn odd root of a negative real is the real one, as ours; mpmath's root is the principal root.
mapped
sagepackages/oracle/src/mappings.tsmapped
juliapackages/oracle/src/mappings.tsmapped
sympypackages/oracle/src/mappings.ts