Average Error: 32.3 → 17.9
Time: 47.8s
Precision: 64
\[\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\log base \cdot \log base + 0.0 \cdot 0.0}\]
\[\begin{array}{l} \mathbf{if}\;re \le -1.9762771458899918 \cdot 10^{145}:\\ \;\;\;\;\frac{\log \left(-re\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\left(\left(2 \cdot \log \left(\sqrt[3]{base}\right)\right) \cdot \log base + \log \left(\sqrt[3]{base}\right) \cdot \log base\right) + 0.0 \cdot 0.0}\\ \mathbf{elif}\;re \le -9.7555531765393797 \cdot 10^{-240}:\\ \;\;\;\;\frac{1}{\sqrt{{\left(\log base\right)}^{2} + 0.0 \cdot 0.0}} \cdot \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\sqrt{{\left(\log base\right)}^{2} + 0.0 \cdot 0.0}}\\ \mathbf{elif}\;re \le -5.52667415299497418 \cdot 10^{-299}:\\ \;\;\;\;\frac{\frac{0.0 \cdot \tan^{-1}_* \frac{im}{re} + \log base \cdot \log im}{\sqrt{{\left(\log base\right)}^{2} + 0.0 \cdot 0.0}}}{\sqrt{{\left({\left(\log base\right)}^{2}\right)}^{3} + {0.0}^{6}}} \cdot \sqrt{{\left(\log base\right)}^{2} \cdot {\left(\log base\right)}^{2} + \left(\left(0.0 \cdot 0.0\right) \cdot \left(0.0 \cdot 0.0\right) - {\left(\log base\right)}^{2} \cdot \left(0.0 \cdot 0.0\right)\right)}\\ \mathbf{elif}\;re \le 5.037031638582551 \cdot 10^{101}:\\ \;\;\;\;\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\left(\left(2 \cdot \log \left(\sqrt[3]{base}\right)\right) \cdot \log base + \log \left(\sqrt[3]{base}\right) \cdot \log base\right) + 0.0 \cdot 0.0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\log re}{-\log base}\\ \end{array}\]
\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\log base \cdot \log base + 0.0 \cdot 0.0}
\begin{array}{l}
\mathbf{if}\;re \le -1.9762771458899918 \cdot 10^{145}:\\
\;\;\;\;\frac{\log \left(-re\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\left(\left(2 \cdot \log \left(\sqrt[3]{base}\right)\right) \cdot \log base + \log \left(\sqrt[3]{base}\right) \cdot \log base\right) + 0.0 \cdot 0.0}\\

\mathbf{elif}\;re \le -9.7555531765393797 \cdot 10^{-240}:\\
\;\;\;\;\frac{1}{\sqrt{{\left(\log base\right)}^{2} + 0.0 \cdot 0.0}} \cdot \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\sqrt{{\left(\log base\right)}^{2} + 0.0 \cdot 0.0}}\\

\mathbf{elif}\;re \le -5.52667415299497418 \cdot 10^{-299}:\\
\;\;\;\;\frac{\frac{0.0 \cdot \tan^{-1}_* \frac{im}{re} + \log base \cdot \log im}{\sqrt{{\left(\log base\right)}^{2} + 0.0 \cdot 0.0}}}{\sqrt{{\left({\left(\log base\right)}^{2}\right)}^{3} + {0.0}^{6}}} \cdot \sqrt{{\left(\log base\right)}^{2} \cdot {\left(\log base\right)}^{2} + \left(\left(0.0 \cdot 0.0\right) \cdot \left(0.0 \cdot 0.0\right) - {\left(\log base\right)}^{2} \cdot \left(0.0 \cdot 0.0\right)\right)}\\

\mathbf{elif}\;re \le 5.037031638582551 \cdot 10^{101}:\\
\;\;\;\;\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\left(\left(2 \cdot \log \left(\sqrt[3]{base}\right)\right) \cdot \log base + \log \left(\sqrt[3]{base}\right) \cdot \log base\right) + 0.0 \cdot 0.0}\\

\mathbf{else}:\\
\;\;\;\;\frac{-\log re}{-\log base}\\

\end{array}
double f(double re, double im, double base) {
        double r47991 = re;
        double r47992 = r47991 * r47991;
        double r47993 = im;
        double r47994 = r47993 * r47993;
        double r47995 = r47992 + r47994;
        double r47996 = sqrt(r47995);
        double r47997 = log(r47996);
        double r47998 = base;
        double r47999 = log(r47998);
        double r48000 = r47997 * r47999;
        double r48001 = atan2(r47993, r47991);
        double r48002 = 0.0;
        double r48003 = r48001 * r48002;
        double r48004 = r48000 + r48003;
        double r48005 = r47999 * r47999;
        double r48006 = r48002 * r48002;
        double r48007 = r48005 + r48006;
        double r48008 = r48004 / r48007;
        return r48008;
}

double f(double re, double im, double base) {
        double r48009 = re;
        double r48010 = -1.9762771458899918e+145;
        bool r48011 = r48009 <= r48010;
        double r48012 = -r48009;
        double r48013 = log(r48012);
        double r48014 = base;
        double r48015 = log(r48014);
        double r48016 = r48013 * r48015;
        double r48017 = im;
        double r48018 = atan2(r48017, r48009);
        double r48019 = 0.0;
        double r48020 = r48018 * r48019;
        double r48021 = r48016 + r48020;
        double r48022 = 2.0;
        double r48023 = cbrt(r48014);
        double r48024 = log(r48023);
        double r48025 = r48022 * r48024;
        double r48026 = r48025 * r48015;
        double r48027 = r48024 * r48015;
        double r48028 = r48026 + r48027;
        double r48029 = r48019 * r48019;
        double r48030 = r48028 + r48029;
        double r48031 = r48021 / r48030;
        double r48032 = -9.75555317653938e-240;
        bool r48033 = r48009 <= r48032;
        double r48034 = 1.0;
        double r48035 = pow(r48015, r48022);
        double r48036 = r48035 + r48029;
        double r48037 = sqrt(r48036);
        double r48038 = r48034 / r48037;
        double r48039 = r48009 * r48009;
        double r48040 = r48017 * r48017;
        double r48041 = r48039 + r48040;
        double r48042 = sqrt(r48041);
        double r48043 = log(r48042);
        double r48044 = r48043 * r48015;
        double r48045 = r48044 + r48020;
        double r48046 = r48045 / r48037;
        double r48047 = r48038 * r48046;
        double r48048 = -5.526674152994974e-299;
        bool r48049 = r48009 <= r48048;
        double r48050 = r48019 * r48018;
        double r48051 = log(r48017);
        double r48052 = r48015 * r48051;
        double r48053 = r48050 + r48052;
        double r48054 = r48053 / r48037;
        double r48055 = 3.0;
        double r48056 = pow(r48035, r48055);
        double r48057 = 6.0;
        double r48058 = pow(r48019, r48057);
        double r48059 = r48056 + r48058;
        double r48060 = sqrt(r48059);
        double r48061 = r48054 / r48060;
        double r48062 = r48035 * r48035;
        double r48063 = r48029 * r48029;
        double r48064 = r48035 * r48029;
        double r48065 = r48063 - r48064;
        double r48066 = r48062 + r48065;
        double r48067 = sqrt(r48066);
        double r48068 = r48061 * r48067;
        double r48069 = 5.037031638582551e+101;
        bool r48070 = r48009 <= r48069;
        double r48071 = r48045 / r48030;
        double r48072 = log(r48009);
        double r48073 = -r48072;
        double r48074 = -r48015;
        double r48075 = r48073 / r48074;
        double r48076 = r48070 ? r48071 : r48075;
        double r48077 = r48049 ? r48068 : r48076;
        double r48078 = r48033 ? r48047 : r48077;
        double r48079 = r48011 ? r48031 : r48078;
        return r48079;
}

Error

Bits error versus re

Bits error versus im

Bits error versus base

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 5 regimes
  2. if re < -1.9762771458899918e+145

    1. Initial program 60.7

      \[\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\log base \cdot \log base + 0.0 \cdot 0.0}\]
    2. Using strategy rm
    3. Applied add-cube-cbrt60.7

      \[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\log base \cdot \log \color{blue}{\left(\left(\sqrt[3]{base} \cdot \sqrt[3]{base}\right) \cdot \sqrt[3]{base}\right)} + 0.0 \cdot 0.0}\]
    4. Applied log-prod60.8

      \[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\log base \cdot \color{blue}{\left(\log \left(\sqrt[3]{base} \cdot \sqrt[3]{base}\right) + \log \left(\sqrt[3]{base}\right)\right)} + 0.0 \cdot 0.0}\]
    5. Applied distribute-lft-in60.7

      \[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\color{blue}{\left(\log base \cdot \log \left(\sqrt[3]{base} \cdot \sqrt[3]{base}\right) + \log base \cdot \log \left(\sqrt[3]{base}\right)\right)} + 0.0 \cdot 0.0}\]
    6. Simplified60.7

      \[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\left(\color{blue}{\left(2 \cdot \log \left(\sqrt[3]{base}\right)\right) \cdot \log base} + \log base \cdot \log \left(\sqrt[3]{base}\right)\right) + 0.0 \cdot 0.0}\]
    7. Simplified60.7

      \[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\left(\left(2 \cdot \log \left(\sqrt[3]{base}\right)\right) \cdot \log base + \color{blue}{\log \left(\sqrt[3]{base}\right) \cdot \log base}\right) + 0.0 \cdot 0.0}\]
    8. Taylor expanded around -inf 7.1

      \[\leadsto \frac{\log \color{blue}{\left(-1 \cdot re\right)} \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\left(\left(2 \cdot \log \left(\sqrt[3]{base}\right)\right) \cdot \log base + \log \left(\sqrt[3]{base}\right) \cdot \log base\right) + 0.0 \cdot 0.0}\]
    9. Simplified7.1

      \[\leadsto \frac{\log \color{blue}{\left(-re\right)} \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\left(\left(2 \cdot \log \left(\sqrt[3]{base}\right)\right) \cdot \log base + \log \left(\sqrt[3]{base}\right) \cdot \log base\right) + 0.0 \cdot 0.0}\]

    if -1.9762771458899918e+145 < re < -9.75555317653938e-240

    1. Initial program 19.7

      \[\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\log base \cdot \log base + 0.0 \cdot 0.0}\]
    2. Using strategy rm
    3. Applied add-sqr-sqrt19.7

      \[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\color{blue}{\sqrt{\log base \cdot \log base + 0.0 \cdot 0.0} \cdot \sqrt{\log base \cdot \log base + 0.0 \cdot 0.0}}}\]
    4. Applied *-un-lft-identity19.7

      \[\leadsto \frac{\color{blue}{1 \cdot \left(\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0\right)}}{\sqrt{\log base \cdot \log base + 0.0 \cdot 0.0} \cdot \sqrt{\log base \cdot \log base + 0.0 \cdot 0.0}}\]
    5. Applied times-frac19.6

      \[\leadsto \color{blue}{\frac{1}{\sqrt{\log base \cdot \log base + 0.0 \cdot 0.0}} \cdot \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\sqrt{\log base \cdot \log base + 0.0 \cdot 0.0}}}\]
    6. Simplified19.6

      \[\leadsto \color{blue}{\frac{1}{\sqrt{{\left(\log base\right)}^{2} + 0.0 \cdot 0.0}}} \cdot \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\sqrt{\log base \cdot \log base + 0.0 \cdot 0.0}}\]
    7. Simplified19.6

      \[\leadsto \frac{1}{\sqrt{{\left(\log base\right)}^{2} + 0.0 \cdot 0.0}} \cdot \color{blue}{\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\sqrt{{\left(\log base\right)}^{2} + 0.0 \cdot 0.0}}}\]

    if -9.75555317653938e-240 < re < -5.526674152994974e-299

    1. Initial program 34.9

      \[\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\log base \cdot \log base + 0.0 \cdot 0.0}\]
    2. Using strategy rm
    3. Applied add-sqr-sqrt34.9

      \[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\color{blue}{\sqrt{\log base \cdot \log base + 0.0 \cdot 0.0} \cdot \sqrt{\log base \cdot \log base + 0.0 \cdot 0.0}}}\]
    4. Applied *-un-lft-identity34.9

      \[\leadsto \frac{\color{blue}{1 \cdot \left(\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0\right)}}{\sqrt{\log base \cdot \log base + 0.0 \cdot 0.0} \cdot \sqrt{\log base \cdot \log base + 0.0 \cdot 0.0}}\]
    5. Applied times-frac34.9

      \[\leadsto \color{blue}{\frac{1}{\sqrt{\log base \cdot \log base + 0.0 \cdot 0.0}} \cdot \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\sqrt{\log base \cdot \log base + 0.0 \cdot 0.0}}}\]
    6. Simplified34.9

      \[\leadsto \color{blue}{\frac{1}{\sqrt{{\left(\log base\right)}^{2} + 0.0 \cdot 0.0}}} \cdot \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\sqrt{\log base \cdot \log base + 0.0 \cdot 0.0}}\]
    7. Simplified34.9

      \[\leadsto \frac{1}{\sqrt{{\left(\log base\right)}^{2} + 0.0 \cdot 0.0}} \cdot \color{blue}{\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\sqrt{{\left(\log base\right)}^{2} + 0.0 \cdot 0.0}}}\]
    8. Using strategy rm
    9. Applied flip3-+34.9

      \[\leadsto \frac{1}{\sqrt{{\left(\log base\right)}^{2} + 0.0 \cdot 0.0}} \cdot \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\sqrt{\color{blue}{\frac{{\left({\left(\log base\right)}^{2}\right)}^{3} + {\left(0.0 \cdot 0.0\right)}^{3}}{{\left(\log base\right)}^{2} \cdot {\left(\log base\right)}^{2} + \left(\left(0.0 \cdot 0.0\right) \cdot \left(0.0 \cdot 0.0\right) - {\left(\log base\right)}^{2} \cdot \left(0.0 \cdot 0.0\right)\right)}}}}\]
    10. Applied sqrt-div34.9

      \[\leadsto \frac{1}{\sqrt{{\left(\log base\right)}^{2} + 0.0 \cdot 0.0}} \cdot \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\color{blue}{\frac{\sqrt{{\left({\left(\log base\right)}^{2}\right)}^{3} + {\left(0.0 \cdot 0.0\right)}^{3}}}{\sqrt{{\left(\log base\right)}^{2} \cdot {\left(\log base\right)}^{2} + \left(\left(0.0 \cdot 0.0\right) \cdot \left(0.0 \cdot 0.0\right) - {\left(\log base\right)}^{2} \cdot \left(0.0 \cdot 0.0\right)\right)}}}}\]
    11. Applied associate-/r/35.0

      \[\leadsto \frac{1}{\sqrt{{\left(\log base\right)}^{2} + 0.0 \cdot 0.0}} \cdot \color{blue}{\left(\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\sqrt{{\left({\left(\log base\right)}^{2}\right)}^{3} + {\left(0.0 \cdot 0.0\right)}^{3}}} \cdot \sqrt{{\left(\log base\right)}^{2} \cdot {\left(\log base\right)}^{2} + \left(\left(0.0 \cdot 0.0\right) \cdot \left(0.0 \cdot 0.0\right) - {\left(\log base\right)}^{2} \cdot \left(0.0 \cdot 0.0\right)\right)}\right)}\]
    12. Applied associate-*r*34.9

      \[\leadsto \color{blue}{\left(\frac{1}{\sqrt{{\left(\log base\right)}^{2} + 0.0 \cdot 0.0}} \cdot \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\sqrt{{\left({\left(\log base\right)}^{2}\right)}^{3} + {\left(0.0 \cdot 0.0\right)}^{3}}}\right) \cdot \sqrt{{\left(\log base\right)}^{2} \cdot {\left(\log base\right)}^{2} + \left(\left(0.0 \cdot 0.0\right) \cdot \left(0.0 \cdot 0.0\right) - {\left(\log base\right)}^{2} \cdot \left(0.0 \cdot 0.0\right)\right)}}\]
    13. Simplified34.9

      \[\leadsto \color{blue}{\frac{\frac{0.0 \cdot \tan^{-1}_* \frac{im}{re} + \log base \cdot \log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\sqrt{{\left(\log base\right)}^{2} + 0.0 \cdot 0.0}}}{\sqrt{{\left({\left(\log base\right)}^{2}\right)}^{3} + {0.0}^{6}}}} \cdot \sqrt{{\left(\log base\right)}^{2} \cdot {\left(\log base\right)}^{2} + \left(\left(0.0 \cdot 0.0\right) \cdot \left(0.0 \cdot 0.0\right) - {\left(\log base\right)}^{2} \cdot \left(0.0 \cdot 0.0\right)\right)}\]
    14. Taylor expanded around 0 32.1

      \[\leadsto \frac{\frac{0.0 \cdot \tan^{-1}_* \frac{im}{re} + \log base \cdot \log \color{blue}{im}}{\sqrt{{\left(\log base\right)}^{2} + 0.0 \cdot 0.0}}}{\sqrt{{\left({\left(\log base\right)}^{2}\right)}^{3} + {0.0}^{6}}} \cdot \sqrt{{\left(\log base\right)}^{2} \cdot {\left(\log base\right)}^{2} + \left(\left(0.0 \cdot 0.0\right) \cdot \left(0.0 \cdot 0.0\right) - {\left(\log base\right)}^{2} \cdot \left(0.0 \cdot 0.0\right)\right)}\]

    if -5.526674152994974e-299 < re < 5.037031638582551e+101

    1. Initial program 22.6

      \[\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\log base \cdot \log base + 0.0 \cdot 0.0}\]
    2. Using strategy rm
    3. Applied add-cube-cbrt22.7

      \[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\log base \cdot \log \color{blue}{\left(\left(\sqrt[3]{base} \cdot \sqrt[3]{base}\right) \cdot \sqrt[3]{base}\right)} + 0.0 \cdot 0.0}\]
    4. Applied log-prod22.7

      \[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\log base \cdot \color{blue}{\left(\log \left(\sqrt[3]{base} \cdot \sqrt[3]{base}\right) + \log \left(\sqrt[3]{base}\right)\right)} + 0.0 \cdot 0.0}\]
    5. Applied distribute-lft-in22.7

      \[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\color{blue}{\left(\log base \cdot \log \left(\sqrt[3]{base} \cdot \sqrt[3]{base}\right) + \log base \cdot \log \left(\sqrt[3]{base}\right)\right)} + 0.0 \cdot 0.0}\]
    6. Simplified22.7

      \[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\left(\color{blue}{\left(2 \cdot \log \left(\sqrt[3]{base}\right)\right) \cdot \log base} + \log base \cdot \log \left(\sqrt[3]{base}\right)\right) + 0.0 \cdot 0.0}\]
    7. Simplified22.7

      \[\leadsto \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\left(\left(2 \cdot \log \left(\sqrt[3]{base}\right)\right) \cdot \log base + \color{blue}{\log \left(\sqrt[3]{base}\right) \cdot \log base}\right) + 0.0 \cdot 0.0}\]

    if 5.037031638582551e+101 < re

    1. Initial program 53.0

      \[\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\log base \cdot \log base + 0.0 \cdot 0.0}\]
    2. Taylor expanded around inf 9.4

      \[\leadsto \color{blue}{\frac{\log \left(\frac{1}{re}\right)}{\log \left(\frac{1}{base}\right)}}\]
    3. Simplified9.4

      \[\leadsto \color{blue}{\frac{-\log re}{-\log base}}\]
  3. Recombined 5 regimes into one program.
  4. Final simplification17.9

    \[\leadsto \begin{array}{l} \mathbf{if}\;re \le -1.9762771458899918 \cdot 10^{145}:\\ \;\;\;\;\frac{\log \left(-re\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\left(\left(2 \cdot \log \left(\sqrt[3]{base}\right)\right) \cdot \log base + \log \left(\sqrt[3]{base}\right) \cdot \log base\right) + 0.0 \cdot 0.0}\\ \mathbf{elif}\;re \le -9.7555531765393797 \cdot 10^{-240}:\\ \;\;\;\;\frac{1}{\sqrt{{\left(\log base\right)}^{2} + 0.0 \cdot 0.0}} \cdot \frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\sqrt{{\left(\log base\right)}^{2} + 0.0 \cdot 0.0}}\\ \mathbf{elif}\;re \le -5.52667415299497418 \cdot 10^{-299}:\\ \;\;\;\;\frac{\frac{0.0 \cdot \tan^{-1}_* \frac{im}{re} + \log base \cdot \log im}{\sqrt{{\left(\log base\right)}^{2} + 0.0 \cdot 0.0}}}{\sqrt{{\left({\left(\log base\right)}^{2}\right)}^{3} + {0.0}^{6}}} \cdot \sqrt{{\left(\log base\right)}^{2} \cdot {\left(\log base\right)}^{2} + \left(\left(0.0 \cdot 0.0\right) \cdot \left(0.0 \cdot 0.0\right) - {\left(\log base\right)}^{2} \cdot \left(0.0 \cdot 0.0\right)\right)}\\ \mathbf{elif}\;re \le 5.037031638582551 \cdot 10^{101}:\\ \;\;\;\;\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot \log base + \tan^{-1}_* \frac{im}{re} \cdot 0.0}{\left(\left(2 \cdot \log \left(\sqrt[3]{base}\right)\right) \cdot \log base + \log \left(\sqrt[3]{base}\right) \cdot \log base\right) + 0.0 \cdot 0.0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\log re}{-\log base}\\ \end{array}\]

Reproduce

herbie shell --seed 2019199 
(FPCore (re im base)
  :name "math.log/2 on complex, real part"
  (/ (+ (* (log (sqrt (+ (* re re) (* im im)))) (log base)) (* (atan2 im re) 0.0)) (+ (* (log base) (log base)) (* 0.0 0.0))))