



Bits error versus re




Bits error versus im
| Original | 37.4 |
|---|---|
| Target | 32.4 |
| Herbie | 16.8 |
if (* 2.0 (+ im re)) < -4.0125979078362445e+156Initial program 61.9
rmApplied sqrt-prod61.9
rmApplied flip-+61.9
Applied sqrt-div61.9
Applied associate-*r/61.9
Applied simplify55.5
Taylor expanded around -inf 29.8
Applied simplify29.8
if -4.0125979078362445e+156 < (* 2.0 (+ im re)) < 2.7825009110149333e-269Initial program 32.8
rmApplied sqrt-prod32.9
rmApplied flip-+32.9
Applied sqrt-div33.0
Applied associate-*r/33.0
Applied simplify6.8
rmApplied add-cube-cbrt6.8
Applied associate-*r*6.8
if 2.7825009110149333e-269 < (* 2.0 (+ im re)) < 1.9429233413685528e-125 or 3.6901729893920858e+196 < (* 2.0 (+ im re)) < 7.760725977184564e+227Initial program 48.6
Taylor expanded around 0 27.4
if 1.9429233413685528e-125 < (* 2.0 (+ im re)) < 3.3462703980395344e+166Initial program 4.2
rmApplied sqrt-prod4.6
if 3.3462703980395344e+166 < (* 2.0 (+ im re)) < 3.6901729893920858e+196 or 7.760725977184564e+227 < (* 2.0 (+ im re)) Initial program 61.2
Taylor expanded around inf 31.4
Time bar (total: 2.1m)Debug logProfile
herbie shell --seed '#(1070258749 1877548225 2229079127 1588002776 3179087814 1886870650)'
(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)))))