\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\log 10}\begin{array}{l}
\mathbf{if}\;re \le -1.272776742038984 \cdot 10^{+36}:\\
\;\;\;\;\left(\frac{\sqrt[3]{\frac{1}{2}}}{\sqrt{\sqrt[3]{\log 10}}} \cdot \frac{-2 \cdot \log \left(\frac{-1}{re}\right)}{\sqrt{\log 10}}\right) \cdot \frac{\sqrt[3]{\frac{1}{2}} \cdot \sqrt[3]{\frac{1}{2}}}{\sqrt{\sqrt[3]{\log 10} \cdot \sqrt[3]{\log 10}}}\\
\mathbf{elif}\;re \le -2.5387418282241494 \cdot 10^{-275}:\\
\;\;\;\;\frac{\sqrt{\frac{1}{2}} \cdot \log \left(re \cdot re + im \cdot im\right)}{\log 10} \cdot \sqrt{\frac{1}{2}}\\
\mathbf{elif}\;re \le 3.259709475737078 \cdot 10^{-301}:\\
\;\;\;\;\left(\frac{\sqrt[3]{\frac{1}{2}}}{\sqrt{\sqrt{\log 10}}} \cdot \frac{\log im \cdot 2}{\sqrt{\log 10}}\right) \cdot \frac{\sqrt[3]{\frac{1}{2}} \cdot \sqrt[3]{\frac{1}{2}}}{\sqrt{\sqrt{\log 10}}}\\
\mathbf{elif}\;re \le 8.145199547234516 \cdot 10^{-246}:\\
\;\;\;\;\left(\frac{\log \left(re \cdot re + im \cdot im\right)}{\sqrt{\log 10}} \cdot \frac{\sqrt[3]{\frac{1}{2}}}{\sqrt{\sqrt{\log 10}}}\right) \cdot \frac{\sqrt[3]{\frac{1}{2}} \cdot \sqrt[3]{\frac{1}{2}}}{\sqrt{\sqrt{\log 10}}}\\
\mathbf{elif}\;re \le 4.071831069248947 \cdot 10^{-214}:\\
\;\;\;\;\left(\frac{\sqrt[3]{\frac{1}{2}}}{\sqrt{\sqrt{\log 10}}} \cdot \frac{\log im \cdot 2}{\sqrt{\log 10}}\right) \cdot \frac{\sqrt[3]{\frac{1}{2}} \cdot \sqrt[3]{\frac{1}{2}}}{\sqrt{\sqrt{\log 10}}}\\
\mathbf{elif}\;re \le 6.734502278787053 \cdot 10^{+66}:\\
\;\;\;\;\frac{\sqrt[3]{\frac{1}{2}} \cdot \sqrt[3]{\frac{1}{2}}}{\sqrt{\sqrt[3]{\log 10} \cdot \sqrt[3]{\log 10}}} \cdot \left(\frac{\log \left(re \cdot re + im \cdot im\right)}{\sqrt{\log 10}} \cdot \frac{\sqrt[3]{\frac{1}{2}}}{\sqrt{\sqrt[3]{\log 10}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(2 \cdot \log re\right) \cdot \sqrt{\frac{1}{\log 10}}\right) \cdot \frac{\frac{1}{2}}{\sqrt{\log 10}}\\
\end{array}double f(double re, double im) {
double r1035407 = re;
double r1035408 = r1035407 * r1035407;
double r1035409 = im;
double r1035410 = r1035409 * r1035409;
double r1035411 = r1035408 + r1035410;
double r1035412 = sqrt(r1035411);
double r1035413 = log(r1035412);
double r1035414 = 10.0;
double r1035415 = log(r1035414);
double r1035416 = r1035413 / r1035415;
return r1035416;
}
double f(double re, double im) {
double r1035417 = re;
double r1035418 = -1.272776742038984e+36;
bool r1035419 = r1035417 <= r1035418;
double r1035420 = 0.5;
double r1035421 = cbrt(r1035420);
double r1035422 = 10.0;
double r1035423 = log(r1035422);
double r1035424 = cbrt(r1035423);
double r1035425 = sqrt(r1035424);
double r1035426 = r1035421 / r1035425;
double r1035427 = -2.0;
double r1035428 = -1.0;
double r1035429 = r1035428 / r1035417;
double r1035430 = log(r1035429);
double r1035431 = r1035427 * r1035430;
double r1035432 = sqrt(r1035423);
double r1035433 = r1035431 / r1035432;
double r1035434 = r1035426 * r1035433;
double r1035435 = r1035421 * r1035421;
double r1035436 = r1035424 * r1035424;
double r1035437 = sqrt(r1035436);
double r1035438 = r1035435 / r1035437;
double r1035439 = r1035434 * r1035438;
double r1035440 = -2.5387418282241494e-275;
bool r1035441 = r1035417 <= r1035440;
double r1035442 = sqrt(r1035420);
double r1035443 = r1035417 * r1035417;
double r1035444 = im;
double r1035445 = r1035444 * r1035444;
double r1035446 = r1035443 + r1035445;
double r1035447 = log(r1035446);
double r1035448 = r1035442 * r1035447;
double r1035449 = r1035448 / r1035423;
double r1035450 = r1035449 * r1035442;
double r1035451 = 3.259709475737078e-301;
bool r1035452 = r1035417 <= r1035451;
double r1035453 = sqrt(r1035432);
double r1035454 = r1035421 / r1035453;
double r1035455 = log(r1035444);
double r1035456 = 2.0;
double r1035457 = r1035455 * r1035456;
double r1035458 = r1035457 / r1035432;
double r1035459 = r1035454 * r1035458;
double r1035460 = r1035435 / r1035453;
double r1035461 = r1035459 * r1035460;
double r1035462 = 8.145199547234516e-246;
bool r1035463 = r1035417 <= r1035462;
double r1035464 = r1035447 / r1035432;
double r1035465 = r1035464 * r1035454;
double r1035466 = r1035465 * r1035460;
double r1035467 = 4.071831069248947e-214;
bool r1035468 = r1035417 <= r1035467;
double r1035469 = 6.734502278787053e+66;
bool r1035470 = r1035417 <= r1035469;
double r1035471 = r1035464 * r1035426;
double r1035472 = r1035438 * r1035471;
double r1035473 = log(r1035417);
double r1035474 = r1035456 * r1035473;
double r1035475 = 1.0;
double r1035476 = r1035475 / r1035423;
double r1035477 = sqrt(r1035476);
double r1035478 = r1035474 * r1035477;
double r1035479 = r1035420 / r1035432;
double r1035480 = r1035478 * r1035479;
double r1035481 = r1035470 ? r1035472 : r1035480;
double r1035482 = r1035468 ? r1035461 : r1035481;
double r1035483 = r1035463 ? r1035466 : r1035482;
double r1035484 = r1035452 ? r1035461 : r1035483;
double r1035485 = r1035441 ? r1035450 : r1035484;
double r1035486 = r1035419 ? r1035439 : r1035485;
return r1035486;
}



Bits error versus re



Bits error versus im
Results
if re < -1.272776742038984e+36Initial program 41.5
rmApplied add-sqr-sqrt41.5
Applied pow1/241.5
Applied log-pow41.5
Applied times-frac41.5
rmApplied add-cube-cbrt41.7
Applied sqrt-prod41.7
Applied add-cube-cbrt41.5
Applied times-frac41.5
Applied associate-*l*41.5
Taylor expanded around -inf 12.2
Simplified12.2
if -1.272776742038984e+36 < re < -2.5387418282241494e-275Initial program 21.5
rmApplied add-sqr-sqrt21.5
Applied pow1/221.5
Applied log-pow21.5
Applied times-frac21.5
rmApplied *-un-lft-identity21.5
Applied add-sqr-sqrt21.5
Applied times-frac21.5
Applied associate-*l*21.4
Simplified21.4
if -2.5387418282241494e-275 < re < 3.259709475737078e-301 or 8.145199547234516e-246 < re < 4.071831069248947e-214Initial program 33.6
rmApplied add-sqr-sqrt33.6
Applied pow1/233.6
Applied log-pow33.6
Applied times-frac33.6
rmApplied add-sqr-sqrt33.9
Applied add-cube-cbrt33.6
Applied times-frac33.6
Applied associate-*l*33.5
Taylor expanded around 0 32.5
if 3.259709475737078e-301 < re < 8.145199547234516e-246Initial program 30.4
rmApplied add-sqr-sqrt30.4
Applied pow1/230.4
Applied log-pow30.4
Applied times-frac30.4
rmApplied add-sqr-sqrt30.8
Applied add-cube-cbrt30.4
Applied times-frac30.4
Applied associate-*l*30.3
if 4.071831069248947e-214 < re < 6.734502278787053e+66Initial program 18.9
rmApplied add-sqr-sqrt18.9
Applied pow1/218.9
Applied log-pow18.9
Applied times-frac18.9
rmApplied add-cube-cbrt19.5
Applied sqrt-prod19.5
Applied add-cube-cbrt18.9
Applied times-frac18.9
Applied associate-*l*18.8
if 6.734502278787053e+66 < re Initial program 43.7
rmApplied add-sqr-sqrt43.7
Applied pow1/243.7
Applied log-pow43.7
Applied times-frac43.7
Taylor expanded around inf 9.3
Simplified9.3
Final simplification17.4
herbie shell --seed 2019151
(FPCore (re im)
:name "math.log10 on complex, real part"
(/ (log (sqrt (+ (* re re) (* im im)))) (log 10)))