```
function exp(a, b, c, d)
local r = math.sqrt(a^2+b^2)
local theta = math.acos(a/r)
local e = math.exp(1)
local sin, cos = math.sin, math.cos
local dlnr = d*math.log(r)
local rcedTheta = r^c*e^(-d*theta)
return {rcedTheta*(cos(c*theta)*cos(dlnr)-sin(c*theta)*sin(dlnr)), rcedTheta*(cos(c*theta)*sin(dlnr)+sin(c*theta)*cos(dlnr))}
end
```

Format: (a+bi)^(c+di)

What is this algorithm used for?

1 Like

exponenting complex/imaginary numbers

This is cool but why do we need complex number exponentiations in roblox lol

1 Like

Fractals

Would you be able to demonstrate the use of this algorithm with EditableImages, or some sort of image visualizer? It would be cool!

1 Like

This is just a primitive mathematical function, he would need much more work in order to visualize fractals in roblox

1 Like

I already made the mandelbrot set