user
(Many programming languages,   especially those with extended─precision integer arithmetic,   usually
support one of  `**`, `^`, `↑`  or some such for exponentiation.)

Some languages treat/honor infix operators when performing exponentiation   (raising
numbers to some power by the language's exponentiation operator,   if the computer
programming language has one).

Other programming languages may make use of the   **POW**   or some other BIF
  (**B**uilt─**I**n **F**function),   or some other library service.

If your language's exponentiation operator is not one of the usual ones, please comment on how to recognize it.

This task will deal with the case where there is some form of an   *infix operator*   operating
in   (or operating on)   the base.

Example

A negative five raised to the 3rd power could be specified as:

```
   -5  ** 3          or as
  -(5) ** 3          or as
  (-5) ** 3          or as something else

```

(Not all computer programming languages have an exponential operator and/or support these syntax expression(s).

Task
:   * compute and display exponentiation with a possible infix operator, whether specified and/or implied/inferred.
    * Raise the following numbers   (integer or real):

    :   :   * -5     and
            * +5

    * to the following powers:

    :   :   * 2nd     and
            * 3rd

    * using the following expressions   (if applicable in your language):

    :   :   * -x\*\*p
            * -(x)\*\*p
            * (-x)\*\*p
            * -(x\*\*p)

    * Show here (on this page) the four (or more) types of symbolic expressions for each number and power.

Try to present the results in the same format/manner as the other programming entries to make any differences apparent.

The variables may be of any type(s) that is/are applicable in your language.

Related tasks

* Exponentiation order
* Exponentiation operator
* Arbitrary-precision integers (included)
* Parsing/RPN to infix conversion
* Operator precedence

References

* Wikipedia: Order of operations in Programming languages
assistant
In Raku by default, infix exponentiation binds tighter than unary negation. It is trivial however to define your own infix operators with whatever precedence level meets the needs of your program.

A slight departure from the task specs. Use `1 + {expression}` rather than just `{expression}` to better demonstrate the relative precedence levels. Where `{expression}` is one of:

* `-x{exponential operator}p`
* `-(x){exponential operator}p`
* `((-x){exponential operator}p)`
* `-(x{exponential operator}p)`

Also add a different grouping: `(1 + -x){exponential operator}p`

```
sub infix:<↑> is looser(&prefix:<->) { $^a ** $^b }
sub infix:<∧> is looser(&infix:<->)  { $^a ** $^b }

for
   ('Default precedence: infix exponentiation is tighter (higher) precedence than unary negation.',
     '1 + -$x**$p',   {1 + -$^a**$^b},   '1 + (-$x)**$p', {1 + (-$^a)**$^b},  '1 + (-($x)**$p)', {1 + (-($^a)**$^b)},
     '(1 + -$x)**$p', {(1 + -$^a)**$^b}, '1 + -($x**$p)', {1 + -($^a**$^b)}),

   ("\nEasily modified: custom loose infix exponentiation is looser (lower) precedence than unary negation.",
     '1 + -$x↑$p ',   {1 + -$^a↑$^b},    '1 + (-$x)↑$p ', {1 + (-$^a)↑$^b},   '1 + (-($x)↑$p) ', {1 + (-($^a)↑$^b)},
     '(1 + -$x)↑$p ', {(1 + -$^a)↑$^b},  '1 + -($x↑$p) ', {1 + -($^a↑$^b)}),

   ("\nEven more so: custom looser infix exponentiation is looser (lower) precedence than infix subtraction.",
     '1 + -$x∧$p ',   {1 + -$^a∧$^b},    '1 + (-$x)∧$p ', {1 + (-$^a)∧$^b},   '1 + (-($x)∧$p) ', {1 + (-($^a)∧$^b)},
     '(1 + -$x)∧$p ', {(1 + -$^a)∧$^b},  '1 + -($x∧$p) ', {1 + -($^a∧$^b)})
-> $case {
    my ($title, @operations) = $case<>;
    say $title;
    for -5, 5 X 2, 3 -> ($x, $p) {
        printf "x = %2d  p = %d", $x, $p;
        for @operations -> $label, &code { print " │ $label = " ~ $x.&code($p).fmt('%4d') }
        say ''
    }
}

```

Output:

```
Default precedence: infix exponentiation is tighter (higher) precedence than unary negation.
x = -5  p = 2 │ 1 + -$x**$p =  -24 │ 1 + (-$x)**$p =   26 │ 1 + (-($x)**$p) =  -24 │ (1 + -$x)**$p =   36 │ 1 + -($x**$p) =  -24
x = -5  p = 3 │ 1 + -$x**$p =  126 │ 1 + (-$x)**$p =  126 │ 1 + (-($x)**$p) =  126 │ (1 + -$x)**$p =  216 │ 1 + -($x**$p) =  126
x =  5  p = 2 │ 1 + -$x**$p =  -24 │ 1 + (-$x)**$p =   26 │ 1 + (-($x)**$p) =  -24 │ (1 + -$x)**$p =   16 │ 1 + -($x**$p) =  -24
x =  5  p = 3 │ 1 + -$x**$p = -124 │ 1 + (-$x)**$p = -124 │ 1 + (-($x)**$p) = -124 │ (1 + -$x)**$p =  -64 │ 1 + -($x**$p) = -124

Easily modified: custom loose infix exponentiation is looser (lower) precedence than unary negation.
x = -5  p = 2 │ 1 + -$x↑$p  =   26 │ 1 + (-$x)↑$p  =   26 │ 1 + (-($x)↑$p)  =   26 │ (1 + -$x)↑$p  =   36 │ 1 + -($x↑$p)  =  -24
x = -5  p = 3 │ 1 + -$x↑$p  =  126 │ 1 + (-$x)↑$p  =  126 │ 1 + (-($x)↑$p)  =  126 │ (1 + -$x)↑$p  =  216 │ 1 + -($x↑$p)  =  126
x =  5  p = 2 │ 1 + -$x↑$p  =   26 │ 1 + (-$x)↑$p  =   26 │ 1 + (-($x)↑$p)  =   26 │ (1 + -$x)↑$p  =   16 │ 1 + -($x↑$p)  =  -24
x =  5  p = 3 │ 1 + -$x↑$p  = -124 │ 1 + (-$x)↑$p  = -124 │ 1 + (-($x)↑$p)  = -124 │ (1 + -$x)↑$p  =  -64 │ 1 + -($x↑$p)  = -124

Even more so: custom looser infix exponentiation is looser (lower) precedence than infix subtraction.
x = -5  p = 2 │ 1 + -$x∧$p  =   36 │ 1 + (-$x)∧$p  =   36 │ 1 + (-($x)∧$p)  =   26 │ (1 + -$x)∧$p  =   36 │ 1 + -($x∧$p)  =  -24
x = -5  p = 3 │ 1 + -$x∧$p  =  216 │ 1 + (-$x)∧$p  =  216 │ 1 + (-($x)∧$p)  =  126 │ (1 + -$x)∧$p  =  216 │ 1 + -($x∧$p)  =  126
x =  5  p = 2 │ 1 + -$x∧$p  =   16 │ 1 + (-$x)∧$p  =   16 │ 1 + (-($x)∧$p)  =   26 │ (1 + -$x)∧$p  =   16 │ 1 + -($x∧$p)  =  -24
x =  5  p = 3 │ 1 + -$x∧$p  =  -64 │ 1 + (-$x)∧$p  =  -64 │ 1 + (-($x)∧$p)  = -124 │ (1 + -$x)∧$p  =  -64 │ 1 + -($x∧$p)  = -124
```