ChaosPro Home
Introduction
What's New
Palettes
Using Formulas
Layering in ChaosPro
Rendering
Fractal Parameter Windows
Windows
Menu
3D Transformations
Animations
Formula Compiler
Writing Formulas
Language Reference
Introduction
Basic Syntax
Datatypes
Constants
Variables
Expressions
Operators
Precedence
Arithmetic Operators
+
-
*
/
%
^
- (neg)
|a|
Assignment Operator
Comparison Operator
Logical Operators
Functions
Control Structures
Compiler Directives
Functions
Interface to ChaosPro
Special Features, Notes...
Compatibility
Fractal Type Reference
Tutorials
Appendix
CHAOSPRO 4.0
Release 4.0
.

Operators - ^

Operator : ^ - power
Unary / binary: Binary
Prefix / infix: Infix
Input data type Output data type
real^real complex
real^complex complex
complex^real complex
complex^complex complex
quaternion^quaternion quaternion

Notes:


For x^y this operator calculates x to the yth power.

Please notice that the return type is always complex, if one of the operands is int,real or complex! If you have two real values (like in the previous example: -2^0.5), the result can be complex. So if you want to calculate x^2.5 (x is data type real), then I would recommend writing it as follows:

x^(2+0.5) = x^2*x^0.5 = sqr(x)*sqrt(x)

Examples:


x^3

x^-4.3

-2^0.5 (=sqrt(-2) = i*sqrt(2)