Powers and Roots
In Corca, powers and roots are structured operators attached to an expression. They remain connected to the base object and can be edited without breaking the surrounding formula. Both operations behave consistently across variables, numbers, functions, and grouped expressions.
Powers
A power raises a value or expression to an exponent. You create a power by typing the caret character ^ after a number, variable, or expression: x^2.
The variable
Powers on expressions
Powers can be applied to grouped expressions:
The exponent applies to the entire expression. If the cursor is placed after a complex expression and ^ is pressed, Corca automatically groups the expression before applying the exponent. This prevents ambiguity.
Powers on fractions
When a power is applied to a fraction, the fraction is grouped automatically. Start with: ^2.
The grouping ensures correct mathematical meaning.
Powers on functions
Powers can be applied directly to functions as well:
Another example:
The placement depends on the function structure.
Roots
A root represents the inverse operation of exponentiation. The most common root is the square root. Type sqrt(x). Result:
Creating roots
You can create a root by typing sqrt or root: sqrt(16)
The root becomes a structured object with editable components.
Higher-order roots
You can specify a root index explicitly: root(x,3). Result:
Nested roots
Roots can contain other roots or expressions:
Nested roots remain visually aligned and structurally stable.
Roots with expressions
Roots can be applied to any expression.
The n-root of the sum of squares.
This pattern is common in geometry and physics.
Navigation inside roots
You can move between the index and the body of a root using arrow keys.
Action | Result |
|---|---|
Arrow right | Move into root body |
Arrow left | Exit root |
Arrow up | Move to root index |
Arrow down | Move to root body |
This behavior supports efficient editing of nested expressions.
Roots and powers together
Roots and powers can be combined in the same expression.
Powers and roots in imported content
Expressions imported from LaTeX or other formats are converted into structured operators.
The exponent remains attached to the grouped expression.
Imported expressions behave exactly like native ones.
Previous: Fractions | Next: Functions |