Average Error: 31.2 → 0.4
Time: 30.8s
Precision: 64
Internal Precision: 576
\[\frac{\tan^{-1}_* \frac{im}{re} \cdot \log base - \log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot 0}{\log base \cdot \log base + 0 \cdot 0}\]
\[(e^{\log_* (1 + \frac{\tan^{-1}_* \frac{im}{re}}{\log base})} - 1)^*\]

Error

Bits error versus re

Bits error versus im

Bits error versus base

Derivation

  1. Initial program 31.2

    \[\frac{\tan^{-1}_* \frac{im}{re} \cdot \log base - \log \left(\sqrt{re \cdot re + im \cdot im}\right) \cdot 0}{\log base \cdot \log base + 0 \cdot 0}\]
  2. Applied simplify0.3

    \[\leadsto \color{blue}{\frac{\tan^{-1}_* \frac{im}{re}}{\log base}}\]
  3. Using strategy rm
  4. Applied expm1-log1p-u0.4

    \[\leadsto \color{blue}{(e^{\log_* (1 + \frac{\tan^{-1}_* \frac{im}{re}}{\log base})} - 1)^*}\]

Runtime

Time bar (total: 30.8s)Debug logProfile

herbie shell --seed '#(1072840222 1305617769 1692503039 1353360431 4178980589 1488672652)' +o rules:numerics
(FPCore (re im base)
  :name "math.log/2 on complex, imaginary part"
  (/ (- (* (atan2 im re) (log base)) (* (log (sqrt (+ (* re re) (* im im)))) 0)) (+ (* (log base) (log base)) (* 0 0))))