Average Error: 31.0 → 0.4
Time: 3.3m
Precision: 64
Internal Precision: 384
\[\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}\]
\[\left(\tan^{-1}_* \frac{im}{re} - 0\right) \cdot \frac{1}{\log base}\]

Error

Bits error versus re

Bits error versus im

Bits error versus base

Derivation

  1. Initial program 31.0

    \[\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} - 0}{\log base}}\]
  3. Using strategy rm
  4. Applied div-inv0.4

    \[\leadsto \color{blue}{\left(\tan^{-1}_* \frac{im}{re} - 0\right) \cdot \frac{1}{\log base}}\]
  5. Removed slow pow expressions.

Runtime

Time bar (total: 3.3m)Debug logProfile

herbie shell --seed '#(1063185673 2139736501 2393378123 1907444849 1070993796 1007244912)' 
(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))))