Average Error: 31.9 → 18.1
Time: 6.8s
Precision: binary64
\[\]
\[\]

Error

Bits error versus re

Bits error versus im

Derivation

  1. Split input into 5 regimes
  2. if re < -7.2724683391263535e32

    1. Initial program 42.5

      \[\]
    2. Using strategy rm
    3. Applied add-sqr-sqrt42.5

      \[\leadsto \]
    4. Applied pow142.5

      \[\leadsto \]
    5. Applied log-pow42.5

      \[\leadsto \]
    6. Applied times-frac42.5

      \[\leadsto \]
    7. Using strategy rm
    8. Applied add-log-exp42.5

      \[\leadsto \]
    9. Simplified42.4

      \[\leadsto \]
    10. Taylor expanded around -inf 12.0

      \[\leadsto \]
    11. Simplified12.0

      \[\leadsto \]

    if -7.2724683391263535e32 < re < -1.6831834820475888e-179

    1. Initial program 17.9

      \[\]
    2. Using strategy rm
    3. Applied pow1/217.9

      \[\leadsto \]
    4. Applied log-pow17.9

      \[\leadsto \]
    5. Applied associate-/l*17.9

      \[\leadsto \]
    6. Using strategy rm
    7. Applied pow117.9

      \[\leadsto \]
    8. Applied log-pow17.9

      \[\leadsto \]
    9. Applied add-cube-cbrt18.5

      \[\leadsto \]
    10. Applied times-frac18.5

      \[\leadsto \]
    11. Applied add-cube-cbrt17.9

      \[\leadsto \]
    12. Applied times-frac17.8

      \[\leadsto \]
    13. Simplified17.8

      \[\leadsto \]
    14. Simplified17.7

      \[\leadsto \]

    if -1.6831834820475888e-179 < re < -1.8532320640870052e-259

    1. Initial program 33.2

      \[\]
    2. Using strategy rm
    3. Applied add-sqr-sqrt33.2

      \[\leadsto \]
    4. Applied pow133.2

      \[\leadsto \]
    5. Applied log-pow33.2

      \[\leadsto \]
    6. Applied times-frac33.2

      \[\leadsto \]
    7. Using strategy rm
    8. Applied add-log-exp33.2

      \[\leadsto \]
    9. Simplified33.1

      \[\leadsto \]
    10. Taylor expanded around 0 37.1

      \[\leadsto \]

    if -1.8532320640870052e-259 < re < 7.87144532982115844e108

    1. Initial program 22.6

      \[\]
    2. Using strategy rm
    3. Applied add-sqr-sqrt22.6

      \[\leadsto \]
    4. Applied pow122.6

      \[\leadsto \]
    5. Applied log-pow22.6

      \[\leadsto \]
    6. Applied times-frac22.6

      \[\leadsto \]
    7. Using strategy rm
    8. Applied add-log-exp22.6

      \[\leadsto \]
    9. Simplified22.4

      \[\leadsto \]

    if 7.87144532982115844e108 < re

    1. Initial program 53.3

      \[\]
    2. Using strategy rm
    3. Applied add-sqr-sqrt53.3

      \[\leadsto \]
    4. Applied pow153.3

      \[\leadsto \]
    5. Applied log-pow53.3

      \[\leadsto \]
    6. Applied times-frac53.3

      \[\leadsto \]
    7. Using strategy rm
    8. Applied add-log-exp53.3

      \[\leadsto \]
    9. Simplified53.3

      \[\leadsto \]
    10. Taylor expanded around inf 9.4

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

    \[\leadsto \]

Reproduce

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