



Bits error versus a




Bits error versus b




Bits error versus c




Bits error versus d
| Original | 25.7 |
|---|---|
| Target | 0.5 |
| Herbie | 13.3 |
if (* (/ 1 (hypot c d)) (* (* (cbrt (/ (fma b d (* c a)) (hypot c d))) (cbrt (/ (fma b d (* c a)) (hypot c d)))) (cbrt (/ (fma b d (* c a)) (hypot c d))))) < -1.7792752541260413e+308 or 1.771881421094445e+308 < (* (/ 1 (hypot c d)) (* (* (cbrt (/ (fma b d (* c a)) (hypot c d))) (cbrt (/ (fma b d (* c a)) (hypot c d)))) (cbrt (/ (fma b d (* c a)) (hypot c d))))) Initial program 62.5
rmApplied add-sqr-sqrt62.5
Applied *-un-lft-identity62.5
Applied times-frac62.5
Applied simplify62.5
Applied simplify62.0
Taylor expanded around inf 49.4
Applied simplify49.4
if -1.7792752541260413e+308 < (* (/ 1 (hypot c d)) (* (* (cbrt (/ (fma b d (* c a)) (hypot c d))) (cbrt (/ (fma b d (* c a)) (hypot c d)))) (cbrt (/ (fma b d (* c a)) (hypot c d))))) < 1.771881421094445e+308Initial program 13.5
rmApplied add-sqr-sqrt13.5
Applied *-un-lft-identity13.5
Applied times-frac13.5
Applied simplify13.5
Applied simplify1.5
rmApplied associate-*r/1.5
Applied simplify1.4
Time bar (total: 59.7s)Debug logProfile
herbie shell --seed 2018195 +o rules:numerics
(FPCore (a b c d)
:name "Complex division, real part"
:herbie-target
(if (< (fabs d) (fabs c)) (/ (+ a (* b (/ d c))) (+ c (* d (/ d c)))) (/ (+ b (* a (/ c d))) (+ d (* c (/ c d)))))
(/ (+ (* a c) (* b d)) (+ (* c c) (* d d))))