


Bits error versus re



Bits error versus im
Results
Initial program 37.7
Simplified13.7
Final simplification13.7
herbie shell --seed 2019004 +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.4s)Debug log
1 calls. Slowest were:
| 32.0ms | (* 0.5 (sqrt (* 2.0 (- (sqrt (+ (* re re) (* im im))) re)))) |
2 alts after pruning (2 fresh and 0 done)
Merged error: 11.7b
Found 2 expressions with local error:
| 0.4b | (- (hypot re im) re) |
| 0.0b | (sqrt (* (- (hypot re im) re) 2.0)) |
2 calls. Slowest were:
| 5.0ms | (- (hypot re im) re) |
| 3.0ms | (sqrt (* (- (hypot re im) re) 2.0)) |
2 calls. Slowest were:
| 132.0ms | (sqrt (* (- (hypot re im) re) 2.0)) |
| 64.0ms | (- (hypot re im) re) |
11 calls. Slowest were:
| 237.0ms | (sqrt (* (- (* (hypot re im) (hypot re im)) (* re re)) 2.0)) |
| 74.0ms | (sqrt (* (- (pow (hypot re im) 3) (pow re 3)) 2.0)) |
| 6.0ms | (sqrt (- (hypot re im) re)) |
6 alts after pruning (5 fresh and 1 done)
Merged error: 11.6b
Found 4 expressions with local error:
| 0.4b | (* (sqrt (sqrt (* (- (hypot re im) re) 2.0))) (sqrt (sqrt (* (- (hypot re im) re) 2.0)))) |
| 0.4b | (- (hypot re im) re) |
| 0.4b | (- (hypot re im) re) |
| 0.1b | (sqrt (sqrt (* (- (hypot re im) re) 2.0))) |
4 calls. Slowest were:
| 24.0ms | (* (sqrt (sqrt (* (- (hypot re im) re) 2.0))) (sqrt (sqrt (* (- (hypot re im) re) 2.0)))) |
| 5.0ms | (- (hypot re im) re) |
| 3.0ms | (- (hypot re im) re) |
4 calls. Slowest were:
| 188.0ms | (sqrt (sqrt (* (- (hypot re im) re) 2.0))) |
| 129.0ms | (* (sqrt (sqrt (* (- (hypot re im) re) 2.0))) (sqrt (sqrt (* (- (hypot re im) re) 2.0)))) |
| 43.0ms | (- (hypot re im) re) |
| 29.0ms | (- (hypot re im) re) |
59 calls. Slowest were:
| 374.0ms | (* (sqrt (sqrt (* (- (* (hypot re im) (hypot re im)) (* re re)) 2.0))) (sqrt (sqrt (* (- (hypot re im) re) 2.0)))) |
| 330.0ms | (* (sqrt (sqrt 2.0)) (exp (* 1/4 (- (+ (log 1/2) (log (/ 1 re))) (* 2 (log (/ 1 im))))))) |
| 266.0ms | (* (sqrt (sqrt (* (- (pow (hypot re im) 3) (pow re 3)) 2.0))) (sqrt (sqrt (* (- (* (hypot re im) (hypot re im)) (* re re)) 2.0)))) |
7 alts after pruning (5 fresh and 2 done)
Merged error: 11.6b
Found 2 expressions with local error:
| 13.2b | (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re)) |
| 0.0b | (sqrt (* (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re)) 2.0)) |
2 calls. Slowest were:
| 2.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)) |
2 calls. Slowest were:
| 137.0ms | (sqrt (* (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re)) 2.0)) |
| 76.0ms | (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re)) |
7 calls. Slowest were:
| 6.0ms | (sqrt (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re))) |
| 1.0ms | (- im re) |
| 0.0ms | (- (+ re (- (+ (* +nan.0 (/ (pow im 2) (pow re 2))) (- +nan.0))))) |
10 alts after pruning (7 fresh and 3 done)
Merged error: 11.6b
Found 3 expressions with local error:
| 6.9b | (+ (* (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)) |
3 calls. Slowest were:
| 10.0ms | (* (sqrt (hypot re im)) (sqrt (hypot re im))) |
| 8.0ms | (sqrt (* (+ (* (sqrt (hypot re im)) (sqrt (hypot re im))) (- re)) 2.0)) |
| 6.0ms | (+ (* (sqrt (hypot re im)) (sqrt (hypot re im))) (- re)) |
3 calls. Slowest were:
| 139.0ms | (sqrt (* (+ (* (sqrt (hypot re im)) (sqrt (hypot re im))) (- re)) 2.0)) |
| 34.0ms | (+ (* (sqrt (hypot re im)) (sqrt (hypot re im))) (- re)) |
| 25.0ms | (* (sqrt (hypot re im)) (sqrt (hypot re im))) |
35 calls. Slowest were:
| 249.0ms | (sqrt (* (- (* (* (sqrt (hypot re im)) (sqrt (hypot re im))) (* (sqrt (hypot re im)) (sqrt (hypot re im)))) (* (- re) (- re))) 2.0)) |
| 177.0ms | (sqrt (* (+ (pow (* (sqrt (hypot re im)) (sqrt (hypot re im))) 3) (pow (- re) 3)) 2.0)) |
| 40.0ms | (* (exp (* (sqrt (hypot re im)) (sqrt (hypot re im)))) (exp (- re))) |
13 alts after pruning (10 fresh and 3 done)
Merged error: 11.5b
0% (0.2b remaining)
Error of 13.7b against oracle of 13.5b and baseline of 13.7b