e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\begin{array}{l}
\mathbf{if}\;x.re \le -9.8004654518070951 \cdot 10^{-60}:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\right) \cdot \left(\left(\sqrt[3]{\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \sqrt[3]{\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right) \cdot \sqrt[3]{\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)} \cdot \sin \left(\log \left(-1 \cdot x.re\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
\mathbf{elif}\;x.re \le 7.7798614950654425 \cdot 10^{-309}:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\left(\sqrt[3]{\sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \cdot \sqrt[3]{\sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}\right) \cdot \sqrt[3]{\sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}\right)\\
\mathbf{elif}\;x.re \le 4.2240617406325604 \cdot 10^{-196}:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\right) \cdot \left(\left(\sqrt[3]{\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \sqrt[3]{\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right) \cdot \sqrt[3]{\left(\sqrt[3]{\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \sqrt[3]{\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right) \cdot \sqrt[3]{\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}}\right)} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re - y.im \cdot \log \left(\frac{1}{x.re}\right)\right)\\
\mathbf{elif}\;x.re \le 4.28134190147170778 \cdot 10^{-125}:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\left(\sqrt[3]{\sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \cdot \sqrt[3]{\sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}\right) \cdot \sqrt[3]{\sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\right) \cdot \left(\left(\sqrt[3]{\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \sqrt[3]{\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right) \cdot \sqrt[3]{\left(\sqrt[3]{\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \sqrt[3]{\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right) \cdot \sqrt[3]{\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}}\right)} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re - y.im \cdot \log \left(\frac{1}{x.re}\right)\right)\\
\end{array}double f(double x_re, double x_im, double y_re, double y_im) {
double r18189 = x_re;
double r18190 = r18189 * r18189;
double r18191 = x_im;
double r18192 = r18191 * r18191;
double r18193 = r18190 + r18192;
double r18194 = sqrt(r18193);
double r18195 = log(r18194);
double r18196 = y_re;
double r18197 = r18195 * r18196;
double r18198 = atan2(r18191, r18189);
double r18199 = y_im;
double r18200 = r18198 * r18199;
double r18201 = r18197 - r18200;
double r18202 = exp(r18201);
double r18203 = r18195 * r18199;
double r18204 = r18198 * r18196;
double r18205 = r18203 + r18204;
double r18206 = sin(r18205);
double r18207 = r18202 * r18206;
return r18207;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r18208 = x_re;
double r18209 = -9.800465451807095e-60;
bool r18210 = r18208 <= r18209;
double r18211 = r18208 * r18208;
double r18212 = x_im;
double r18213 = r18212 * r18212;
double r18214 = r18211 + r18213;
double r18215 = sqrt(r18214);
double r18216 = log(r18215);
double r18217 = y_re;
double r18218 = r18216 * r18217;
double r18219 = atan2(r18212, r18208);
double r18220 = y_im;
double r18221 = r18219 * r18220;
double r18222 = cbrt(r18221);
double r18223 = r18222 * r18222;
double r18224 = cbrt(r18222);
double r18225 = r18224 * r18224;
double r18226 = r18225 * r18224;
double r18227 = r18223 * r18226;
double r18228 = r18218 - r18227;
double r18229 = exp(r18228);
double r18230 = -1.0;
double r18231 = r18230 * r18208;
double r18232 = log(r18231);
double r18233 = r18232 * r18220;
double r18234 = r18219 * r18217;
double r18235 = r18233 + r18234;
double r18236 = sin(r18235);
double r18237 = r18229 * r18236;
double r18238 = 7.779861495065443e-309;
bool r18239 = r18208 <= r18238;
double r18240 = r18218 - r18221;
double r18241 = exp(r18240);
double r18242 = r18216 * r18220;
double r18243 = r18242 + r18234;
double r18244 = sin(r18243);
double r18245 = cbrt(r18244);
double r18246 = r18245 * r18245;
double r18247 = r18246 * r18245;
double r18248 = r18241 * r18247;
double r18249 = 4.2240617406325604e-196;
bool r18250 = r18208 <= r18249;
double r18251 = cbrt(r18226);
double r18252 = r18225 * r18251;
double r18253 = r18223 * r18252;
double r18254 = r18218 - r18253;
double r18255 = exp(r18254);
double r18256 = 1.0;
double r18257 = r18256 / r18208;
double r18258 = log(r18257);
double r18259 = r18220 * r18258;
double r18260 = r18234 - r18259;
double r18261 = sin(r18260);
double r18262 = r18255 * r18261;
double r18263 = 4.281341901471708e-125;
bool r18264 = r18208 <= r18263;
double r18265 = r18264 ? r18248 : r18262;
double r18266 = r18250 ? r18262 : r18265;
double r18267 = r18239 ? r18248 : r18266;
double r18268 = r18210 ? r18237 : r18267;
return r18268;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
Results
if x.re < -9.800465451807095e-60Initial program 37.3
rmApplied add-cube-cbrt37.3
rmApplied add-cube-cbrt37.3
Taylor expanded around -inf 21.8
if -9.800465451807095e-60 < x.re < 7.779861495065443e-309 or 4.2240617406325604e-196 < x.re < 4.281341901471708e-125Initial program 23.4
rmApplied add-cube-cbrt23.8
if 7.779861495065443e-309 < x.re < 4.2240617406325604e-196 or 4.281341901471708e-125 < x.re Initial program 35.7
rmApplied add-cube-cbrt35.7
rmApplied add-cube-cbrt35.7
rmApplied add-cube-cbrt35.7
Taylor expanded around inf 24.8
Final simplification23.7
herbie shell --seed 2020034
(FPCore (x.re x.im y.re y.im)
:name "powComplex, imaginary part"
:precision binary64
(* (exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) (* (atan2 x.im x.re) y.im))) (sin (+ (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.im) (* (atan2 x.im x.re) y.re)))))