



Bits error versus re




Bits error versus im
Results
| Original | 37.2 |
|---|---|
| Target | 32.1 |
| Herbie | 23.3 |
if (* 2.0 (* im (/ im (- im re)))) < -2.3434815907189624e-85Initial program 32.2
rmApplied add-cube-cbrt32.9
if -2.3434815907189624e-85 < (* 2.0 (* im (/ im (- im re)))) < 0.0Initial program 37.4
Taylor expanded around inf 26.5
if 0.0 < (* 2.0 (* im (/ im (- im re)))) < 6.462285404558625e-190Initial program 61.4
rmApplied flip-+61.5
Applied simplify41.0
rmApplied *-un-lft-identity41.0
Applied times-frac32.9
Applied simplify32.9
Taylor expanded around -inf 13.7
if 6.462285404558625e-190 < (* 2.0 (* im (/ im (- im re)))) Initial program 37.2
rmApplied flip-+37.2
Applied simplify30.0
rmApplied *-un-lft-identity30.0
Applied times-frac30.3
Applied simplify30.3
Taylor expanded around 0 13.7
Time bar (total: 55.5s)Debug logProfile
herbie shell --seed '#(1072936661 1621281212 3440817831 3219514234 460296804 1258167384)'
(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)))))