Average Error: 29.6 → 0.0
Time: 5.3s
Precision: 64
Internal Precision: 384
\[\sqrt{re \cdot re + im \cdot im}\]
\[\sqrt{re^2 + im^2}^*\]

Error

Bits error versus re

Bits error versus im

Derivation

  1. Initial program 29.6

    \[\sqrt{re \cdot re + im \cdot im}\]
  2. Applied simplify0.0

    \[\leadsto \color{blue}{\sqrt{re^2 + im^2}^*}\]

Runtime

Time bar (total: 5.3s)Debug logProfile

herbie shell --seed '#(1070960995 739739648 2531964651 3069671617 351857262 3877178482)' +o rules:numerics
(FPCore (re im)
  :name "math.abs on complex"
  (sqrt (+ (* re re) (* im im))))