


Bits error versus re



Bits error versus im
Results
Initial program 37.4
Simplified12.9
Final simplification12.9
herbie shell --seed 2019005 +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: 8.1s)Debug log
1 calls. Slowest were:
| 30.0ms | (* 0.5 (sqrt (* 2.0 (- (sqrt (+ (* re re) (* im im))) re)))) |
2 alts after pruning (2 fresh and 0 done)
Merged error: 14.9b
Found 3 expressions with local error:
| 0.8b | (- (hypot re im) re) |
| 0.2b | (sqrt (* (- (hypot re im) re) 2.0)) |
| 0.0b | (hypot re im) |
3 calls. Slowest were:
| 5.0ms | (- (hypot re im) re) |
| 3.0ms | (sqrt (* (- (hypot re im) re) 2.0)) |
| 0.0ms | (hypot re im) |
3 calls. Slowest were:
| 98.0ms | (sqrt (* (- (hypot re im) re) 2.0)) |
| 42.0ms | (hypot re im) |
| 37.0ms | (- (hypot re im) re) |
14 calls. Slowest were:
| 149.0ms | (sqrt (* (- (* (hypot re im) (hypot re im)) (* re re)) 2.0)) |
| 109.0ms | (sqrt (* (- (pow (hypot re im) 3) (pow re 3)) 2.0)) |
| 6.0ms | (sqrt (- (hypot re im) re)) |
10 alts after pruning (9 fresh and 1 done)
Merged error: 14.5b
Found 3 expressions with local error:
| 0.8b | (- (hypot re im) re) |
| 0.3b | (* (sqrt (- (hypot re im) re)) (sqrt 2.0)) |
| 0.0b | (hypot re im) |
3 calls. Slowest were:
| 7.0ms | (* (sqrt (- (hypot re im) re)) (sqrt 2.0)) |
| 3.0ms | (- (hypot re im) re) |
| 0.0ms | (hypot re im) |
3 calls. Slowest were:
| 119.0ms | (* (sqrt (- (hypot re im) re)) (sqrt 2.0)) |
| 40.0ms | (- (hypot re im) re) |
| 39.0ms | (hypot re im) |
26 calls. Slowest were:
| 278.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))) |
| 125.0ms | (* (sqrt (- (* (hypot re im) (hypot re im)) (* re re))) (sqrt 2.0)) |
| 29.0ms | (* (sqrt (- (pow (hypot re im) 3) (pow re 3))) (sqrt 2.0)) |
10 alts after pruning (8 fresh and 2 done)
Merged error: 14.5b
Found 4 expressions with local error:
| 16.5b | (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re)) |
| 0.2b | (sqrt (* (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re)) 2.0)) |
| 0.0b | (hypot re im) |
| 0.0b | (hypot re im) |
4 calls. Slowest were:
| 1.0ms | (sqrt (* (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re)) 2.0)) |
| 0.0ms | (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re)) |
| 0.0ms | (hypot re im) |
4 calls. Slowest were:
| 140.0ms | (sqrt (* (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re)) 2.0)) |
| 101.0ms | (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re)) |
| 23.0ms | (hypot re im) |
| 23.0ms | (hypot re im) |
13 calls. Slowest were:
| 5.0ms | (sqrt (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re))) |
| 1.0ms | (- im re) |
| 1.0ms | (* -1 re) |
14 alts after pruning (12 fresh and 2 done)
Merged error: 14.5b
Found 4 expressions with local error:
| 16.5b | (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re)) |
| 16.5b | (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re)) |
| 0.4b | (* (sqrt (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re))) (sqrt (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re)))) |
| 0.2b | (sqrt (* (* (sqrt (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re))) (sqrt (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re)))) 2.0)) |
4 calls. Slowest were:
| 7.0ms | (sqrt (* (* (sqrt (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re))) (sqrt (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re)))) 2.0)) |
| 7.0ms | (* (sqrt (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re))) (sqrt (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re)))) |
| 0.0ms | (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re)) |
4 calls. Slowest were:
| 132.0ms | (sqrt (* (* (sqrt (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re))) (sqrt (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re)))) 2.0)) |
| 87.0ms | (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re)) |
| 86.0ms | (* (sqrt (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re))) (sqrt (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re)))) |
| 81.0ms | (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re)) |
36 calls. Slowest were:
| 75.0ms | (* (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re)) (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re))) |
| 72.0ms | (* (* (* (sqrt (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re))) (sqrt (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re)))) (sqrt (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re)))) (* (* (sqrt (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re))) (sqrt (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re)))) (sqrt (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re))))) |
| 52.0ms | (* (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re)) (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re))) |
15 alts after pruning (13 fresh and 2 done)
Merged error: 14.5b
0% (0.2b remaining)
Error of 12.9b against oracle of 12.7b and baseline of 12.9b