Average Error: 31.7 → 18.9
Time: 1.6s
Precision: binary64
\[\]
\[\]

Error

Bits error versus re

Bits error versus im

Derivation

  1. Split input into 3 regimes
  2. if re < -307633288.587172687 or -4.948094964353528e-208 < re < -6.2188272398638127e-276

    1. Initial program 39.5

      \[\]
    2. Taylor expanded around -inf 20.3

      \[\leadsto \]
    3. Simplified20.3

      \[\leadsto \]

    if -307633288.587172687 < re < -4.948094964353528e-208 or -6.2188272398638127e-276 < re < 2.30774385820715081e116

    1. Initial program 21.0

      \[\]

    if 2.30774385820715081e116 < re

    1. Initial program 53.5

      \[\]
    2. Taylor expanded around inf 9.0

      \[\leadsto \]
  3. Recombined 3 regimes into one program.
  4. Final simplification18.9

    \[\leadsto \]

Reproduce

herbie shell --seed 2020192 
(FPCore (re im)
  :name "math.log/1 on complex, real part"
  :precision binary64
  (log (sqrt (+ (* re re) (* im im)))))