Average Error: 31.4 → 0
Time: 2.5s
Precision: 64
Internal Precision: 576
\[\log \left(\sqrt{re \cdot re + im \cdot im}\right)\]
\[\log \left(\sqrt{re^2 + im^2}^*\right)\]

Error

Bits error versus re

Bits error versus im

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 31.4

    \[\log \left(\sqrt{re \cdot re + im \cdot im}\right)\]
  2. Initial simplification0

    \[\leadsto \log \left(\sqrt{re^2 + im^2}^*\right)\]
  3. Final simplification0

    \[\leadsto \log \left(\sqrt{re^2 + im^2}^*\right)\]

Runtime

Time bar (total: 2.5s)Debug logProfile

herbie shell --seed 2018217 +o rules:numerics
(FPCore (re im)
  :name "math.log/1 on complex, real part"
  (log (sqrt (+ (* re re) (* im im)))))