Compute a complex power The Rundown

Given any input x and y, perform a complex operation, and print a corresponding result.

How your program should work


Given an input x and y in the form z = x+yi, find zi-z
If the absolute real value of zi-z is larger than the absolute imaginary part, print the real part; vice versa for the other way around. If both values are equal, print one of the values.


Example

x: 2
y: 0


Therefore:

z = 2
z^(i-z) ~= 0.192309 + 0.159740i


Since the real part has a larger absolute value than the imaginary part, the program returns

0.192309


More examples

z = 1+i &gt;&gt; 0.5
z = i &gt;&gt; 1
z = 0.5 &gt;&gt; 1.08787
z = -2+8i &gt;&gt; 2.22964E7
z = -10i &gt;&gt; 3.13112E7
Jelly, 8 11 bytes

Thanks Johnathan Allan for updating the answer with the rules change.

ı_*@µĊ,ḞAÞṪ


Try it online!

ı_*@        z^(i-z)
    µ       new monadic link
     Ċ,Ḟ    pair real and imaginary parts
        AÞṪ sort by absolute value and take last value