Operator

# ^

<div class="rst-class">

forsearch

</div>

^

<div class="rst-class">

forsearch

</div>

Operator

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

## Description

Used to perform exponentiation.

## Usage

``` xojo
result = expression1 ^ expression2
```

| Part        | Type                             | Description                                                        |
|-------------|----------------------------------|--------------------------------------------------------------------|
| result      | `Double</api/data_types/double>` | The result of raising *expression1* to the power of *expression2*. |
| expression1 | Number                           | Any numeric expression.                                            |
| expression2 | Number                           | Any numeric expression.                                            |

## Notes

The ^ operator's precedence is higher than negation but lower than `IsA</api/language/operators/comparison/isa>` or the dot operator. See the `Operator Precedence</api/language/operators/operator_precedence>` table for more information.

Use the `Operator Power</api/language/operators/operator_overloads/operator_power>` function to define the ^ operator for classes.

## Sample code

These examples illustrate the usage of the ^ operator.

``` xojo
Var i As Double
i = 2 ^ 2 ' i = 4
i = (2 + 3) ^ (4 - 2) ' i = 25
i = 3.75 ^ 3.5 ' i = 102.12
```

## Compatibility

|                       |     |
|-----------------------|-----|
| **Project Types**     | All |
| **Operating Systems** | All |

<div class="seealso">

`*</api/language/operators/mathematical/x>` operator, `Operator Power</api/language/operators/operator_overloads/operator_power>` function; `Operator precedence</api/language/operators/operator_precedence>`

</div>
