



Bits error versus re




Bits error versus im
| Original | 37.9 |
|---|---|
| Target | 32.7 |
| Herbie | 0.7 |
if (fma (hypot re im) 2.0 (* re 2.0)) < 1.16129766535853e-261Initial program 59.8
Applied simplify51.8
rmApplied add-exp-log51.9
Taylor expanded around -inf 44.2
Applied simplify23.1
rmApplied frac-times29.7
Applied sqrt-div22.6
Applied simplify22.6
Applied simplify1.8
if 1.16129766535853e-261 < (fma (hypot re im) 2.0 (* re 2.0)) Initial program 30.6
Applied simplify0.3
Time bar (total: 37.2s)Debug logProfile
herbie shell --seed '#(1071979731 1496239409 439705970 2863295848 982327776 189749553)' +o rules:numerics
(FPCore (re im)
:name "math.sqrt on complex, real part"
:herbie-target
(if (< re 0) (* 0.5 (* (sqrt 2) (sqrt (/ (* im im) (- (sqrt (+ (* re re) (* im im))) re))))) (* 0.5 (sqrt (* 2.0 (+ (sqrt (+ (* re re) (* im im))) re)))))
(* 0.5 (sqrt (* 2.0 (+ (sqrt (+ (* re re) (* im im))) re)))))