


Bits error versus re



Bits error versus im
Results
Initial program 37.7
Simplified13.2
Final simplification13.2
herbie shell --seed 2019010 +o rules:numerics
(FPCore (re im)
:name "math.sqrt on complex, imaginary part, im greater than 0 branch"
(* 0.5 (sqrt (* 2.0 (- (sqrt (+ (* re re) (* im im))) re)))))
Time bar (total: 11.6s)Debug log
| 61.0ms | (* 0.5 (sqrt (* 2.0 (- (sqrt (+ (* re re) (* im im))) re)))) |
2 alts after pruning (2 fresh and 0 done)
Merged error: 10.4b
Found 3 expressions with local error:
| 0.5b | (- (hypot re im) re) |
| 0.0b | (sqrt (* (- (hypot re im) re) 2.0)) |
| 0.0b | (hypot re im) |
| 4× | add-cube-cbrt |
| 4× | *-un-lft-identity |
| 4× | add-sqr-sqrt |
| 3× | add-log-exp |
| 3× | log1p-expm1-u |
| 3× | add-exp-log |
| 3× | fma-neg |
| 3× | add-cbrt-cube |
| 3× | pow1 |
| 3× | expm1-log1p-u |
| 2× | flip-- |
| 2× | associate-*l/ |
| 2× | sqrt-div |
| 2× | flip3-- |
| 1× | sqrt-prod |
| 1× | pow1/2 |
| 1× | sub-neg |
| 1× | hypot-udef |
| 10.0ms | (- (hypot re im) re) |
| 6.0ms | (sqrt (* (- (hypot re im) re) 2.0)) |
| 0.0ms | (hypot re im) |
| 135.0ms | (sqrt (* (- (hypot re im) re) 2.0)) |
| 68.0ms | (- (hypot re im) re) |
| 28.0ms | (hypot re im) |
| 138.0ms | (sqrt (* (- (* (hypot re im) (hypot re im)) (* re re)) 2.0)) |
| 84.0ms | (sqrt (* (- (pow (hypot re im) 3) (pow re 3)) 2.0)) |
| 7.0ms | (sqrt (- (hypot re im) re)) |
| 4.0ms | (* (cbrt (hypot re im)) (cbrt (hypot re im))) |
| 2.0ms | (sqrt (hypot re im)) |
9 alts after pruning (8 fresh and 1 done)
Merged error: 10.3b
Found 4 expressions with local error:
| 0.5b | (- (hypot re im) re) |
| 0.4b | (* (sqrt (- (hypot re im) re)) (sqrt 2.0)) |
| 0.0b | (sqrt (- (hypot re im) re)) |
| 0.0b | (hypot re im) |
| 10× | add-sqr-sqrt |
| 9× | add-cube-cbrt |
| 9× | *-un-lft-identity |
| 6× | sqrt-prod |
| 6× | add-exp-log |
| 6× | associate-*l* |
| 6× | add-cbrt-cube |
| 6× | pow1 |
| 4× | add-log-exp |
| 4× | log1p-expm1-u |
| 4× | sqrt-div |
| 4× | expm1-log1p-u |
| 3× | flip-- |
| 3× | associate-*r* |
| 3× | fma-neg |
| 3× | pow1/2 |
| 3× | flip3-- |
| 2× | associate-*l/ |
| 2× | pow-prod-down |
| 1× | cbrt-unprod |
| 1× | *-commutative |
| 1× | prod-exp |
| 1× | sqrt-unprod |
| 1× | sub-neg |
| 1× | hypot-udef |
| 1× | rem-sqrt-square |
| 8.0ms | (* (sqrt (- (hypot re im) re)) (sqrt 2.0)) |
| 4.0ms | (sqrt (- (hypot re im) re)) |
| 3.0ms | (- (hypot re im) re) |
| 0.0ms | (hypot re im) |
| 144.0ms | (* (sqrt (- (hypot re im) re)) (sqrt 2.0)) |
| 96.0ms | (sqrt (- (hypot re im) re)) |
| 41.0ms | (hypot re im) |
| 35.0ms | (- (hypot re im) re) |
| 341.0ms | (* (* (* (sqrt (- (hypot re im) re)) (sqrt (- (hypot re im) re))) (sqrt (- (hypot re im) re))) (* (* (sqrt 2.0) (sqrt 2.0)) (sqrt 2.0))) |
| 116.0ms | (* (sqrt (- (* (hypot re im) (hypot re im)) (* re re))) (sqrt 2.0)) |
| 115.0ms | (sqrt (- (* (hypot re im) (hypot re im)) (* re re))) |
| 30.0ms | (* (sqrt (- (pow (hypot re im) 3) (pow re 3))) (sqrt 2.0)) |
| 26.0ms | (* (- (hypot re im) re) 2.0) |
9 alts after pruning (8 fresh and 1 done)
Merged error: 10.3b
Found 4 expressions with local error:
| 0.5b | (- (hypot re im) re) |
| 0.5b | (- (hypot re im) re) |
| 0.4b | (cbrt (- (hypot re im) re)) |
| 0.4b | (cbrt (- (hypot re im) re)) |
| 8× | add-cube-cbrt |
| 8× | *-un-lft-identity |
| 8× | add-sqr-sqrt |
| 6× | fma-neg |
| 6× | cbrt-prod |
| 4× | add-log-exp |
| 4× | flip-- |
| 4× | log1p-expm1-u |
| 4× | add-exp-log |
| 4× | add-cbrt-cube |
| 4× | flip3-- |
| 4× | cbrt-div |
| 4× | pow1 |
| 4× | expm1-log1p-u |
| 2× | pow1/3 |
| 2× | sub-neg |
| 3.0ms | (- (hypot re im) re) |
| 3.0ms | (- (hypot re im) re) |
| 2.0ms | (cbrt (- (hypot re im) re)) |
| 2.0ms | (cbrt (- (hypot re im) re)) |
| 188.0ms | (cbrt (- (hypot re im) re)) |
| 137.0ms | (cbrt (- (hypot re im) re)) |
| 36.0ms | (- (hypot re im) re) |
| 35.0ms | (- (hypot re im) re) |
| 357.0ms | (exp (* 1/3 (- (+ (log 1/2) (log (/ 1 re))) (* 2 (log (/ 1 im)))))) |
| 338.0ms | (exp (* 1/3 (- (+ (log 1/2) (log (/ 1 re))) (* 2 (log (/ 1 im)))))) |
| 220.0ms | (- (+ (* 1/18 (* (pow re 2) (pow (/ 1 (pow im 5)) 1/3))) (pow im 1/3)) (* 1/3 (* re (pow (/ 1 (pow im 2)) 1/3)))) |
| 196.0ms | (- (+ (* 1/18 (* (pow re 2) (pow (/ 1 (pow im 5)) 1/3))) (pow im 1/3)) (* 1/3 (* re (pow (/ 1 (pow im 2)) 1/3)))) |
| 193.0ms | (exp (* 1/3 (- (log 2) (log (/ -1 re))))) |
10 alts after pruning (9 fresh and 1 done)
Merged error: 10.2b
Found 4 expressions with local error:
| 8.0b | (- (* (sqrt (hypot re im)) (sqrt (hypot re im))) re) |
| 0.5b | (* (sqrt (hypot re im)) (sqrt (hypot re im))) |
| 0.0b | (sqrt (* (- (* (sqrt (hypot re im)) (sqrt (hypot re im))) re) 2.0)) |
| 0.0b | (hypot re im) |
| 9× | pow1 |
| 8× | add-cube-cbrt |
| 8× | *-un-lft-identity |
| 8× | add-sqr-sqrt |
| 7× | sqrt-prod |
| 6× | add-exp-log |
| 6× | associate-*l* |
| 6× | associate-*r* |
| 6× | add-cbrt-cube |
| 5× | pow1/2 |
| 4× | add-log-exp |
| 4× | log1p-expm1-u |
| 4× | expm1-log1p-u |
| 2× | flip-- |
| 2× | pow-prod-up |
| 2× | associate-*l/ |
| 2× | pow-prod-down |
| 2× | sqrt-div |
| 2× | flip3-- |
| 1× | cbrt-unprod |
| 1× | *-commutative |
| 1× | prod-exp |
| 1× | sqrt-unprod |
| 1× | fma-neg |
| 1× | pow-plus |
| 1× | rem-square-sqrt |
| 1× | sub-neg |
| 1× | hypot-udef |
| 1× | pow2 |
| 15.0ms | (sqrt (* (- (* (sqrt (hypot re im)) (sqrt (hypot re im))) re) 2.0)) |
| 14.0ms | (- (* (sqrt (hypot re im)) (sqrt (hypot re im))) re) |
| 10.0ms | (* (sqrt (hypot re im)) (sqrt (hypot re im))) |
| 0.0ms | (hypot re im) |
| 110.0ms | (sqrt (* (- (* (sqrt (hypot re im)) (sqrt (hypot re im))) re) 2.0)) |
| 42.0ms | (* (sqrt (hypot re im)) (sqrt (hypot re im))) |
| 32.0ms | (hypot re im) |
| 29.0ms | (- (* (sqrt (hypot re im)) (sqrt (hypot re im))) re) |
| 269.0ms | (sqrt (* (- (* (* (sqrt (hypot re im)) (sqrt (hypot re im))) (* (sqrt (hypot re im)) (sqrt (hypot re im)))) (* re re)) 2.0)) |
| 142.0ms | (sqrt (* (- (pow (* (sqrt (hypot re im)) (sqrt (hypot re im))) 3) (pow re 3)) 2.0)) |
| 18.0ms | (* (* (* (sqrt (hypot re im)) (sqrt (hypot re im))) (sqrt (hypot re im))) (* (* (sqrt (hypot re im)) (sqrt (hypot re im))) (sqrt (hypot re im)))) |
| 4.0ms | (sqrt (- (* (sqrt (hypot re im)) (sqrt (hypot re im))) re)) |
| 4.0ms | (sqrt (* (cbrt (hypot re im)) (cbrt (hypot re im)))) |
12 alts after pruning (11 fresh and 1 done)
Merged error: 10.2b
0% (0.3b remaining)
Error of 13.2b against oracle of 12.9b and baseline of 13.2b