


Bits error versus re



Bits error versus im
Results
Initial program 37.8
Simplified13.2
Final simplification13.2
herbie shell --seed 2019008 +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.7s)Debug log
1 calls. Slowest were:
| 36.0ms | (* 0.5 (sqrt (* 2.0 (- (sqrt (+ (* re re) (* im im))) re)))) |
2 alts after pruning (2 fresh and 0 done)
Merged error: 14.2b
Found 3 expressions with local error:
| 0.8b | (- (hypot re im) re) |
| 0.0b | (hypot re im) |
| 0.0b | (sqrt (* (- (hypot re im) re) 2.0)) |
3 calls. Slowest were:
| 10.0ms | (- (hypot re im) re) |
| 6.0ms | (sqrt (* (- (hypot re im) re) 2.0)) |
| 0.0ms | (hypot re im) |
3 calls. Slowest were:
| 122.0ms | (sqrt (* (- (hypot re im) re) 2.0)) |
| 52.0ms | (- (hypot re im) re) |
| 46.0ms | (hypot re im) |
14 calls. Slowest were:
| 203.0ms | (sqrt (* (- (* (hypot re im) (hypot re im)) (* re re)) 2.0)) |
| 87.0ms | (sqrt (* (- (pow (hypot re im) 3) (pow re 3)) 2.0)) |
| 4.0ms | (sqrt (- (hypot re im) re)) |
9 alts after pruning (8 fresh and 1 done)
Merged error: 14.0b
Found 4 expressions with local error:
| 16.5b | (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re)) |
| 0.0b | (hypot re im) |
| 0.0b | (hypot re im) |
| 0.0b | (sqrt (* (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re)) 2.0)) |
4 calls. Slowest were:
| 3.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:
| 128.0ms | (sqrt (* (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re)) 2.0)) |
| 95.0ms | (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re)) |
| 41.0ms | (hypot re im) |
| 34.0ms | (hypot re im) |
13 calls. Slowest were:
| 9.0ms | (sqrt (fma (sqrt (hypot re im)) (sqrt (hypot re im)) (- re))) |
| 3.0ms | (- im re) |
| 3.0ms | (* -1 re) |
13 alts after pruning (12 fresh and 1 done)
Merged error: 14.0b
Found 4 expressions with local error:
| 16.4b | (fma (sqrt (hypot re im)) (sqrt (* (* (cbrt (hypot re im)) (cbrt (hypot re im))) (cbrt (hypot re im)))) (- re)) |
| 0.6b | (cbrt (hypot re im)) |
| 0.6b | (cbrt (hypot re im)) |
| 0.6b | (cbrt (hypot re im)) |
4 calls. Slowest were:
| 1.0ms | (cbrt (hypot re im)) |
| 1.0ms | (cbrt (hypot re im)) |
| 1.0ms | (cbrt (hypot re im)) |
4 calls. Slowest were:
| 129.0ms | (cbrt (hypot re im)) |
| 119.0ms | (cbrt (hypot re im)) |
| 100.0ms | (cbrt (hypot re im)) |
| 85.0ms | (fma (sqrt (hypot re im)) (sqrt (* (* (cbrt (hypot re im)) (cbrt (hypot re im))) (cbrt (hypot re im)))) (- re)) |
21 calls. Slowest were:
| 48.0ms | (+ (* 1/6 (* (pow re 2) (pow (/ 1 (pow im 5)) 1/3))) (pow im 1/3)) |
| 29.0ms | (+ (* 1/6 (* (pow re 2) (pow (/ 1 (pow im 5)) 1/3))) (pow im 1/3)) |
| 29.0ms | (+ (* 1/6 (* (pow re 2) (pow (/ 1 (pow im 5)) 1/3))) (pow im 1/3)) |
17 alts after pruning (16 fresh and 1 done)
Merged error: 13.9b
Found 4 expressions with local error:
| 16.4b | (fma (sqrt (hypot re im)) (sqrt (* (* (cbrt (hypot re im)) (cbrt (hypot re im))) (* (sqrt (cbrt (hypot re im))) (sqrt (cbrt (hypot re im)))))) (- re)) |
| 0.6b | (cbrt (hypot re im)) |
| 0.6b | (cbrt (hypot re im)) |
| 0.6b | (cbrt (hypot re im)) |
4 calls. Slowest were:
| 1.0ms | (cbrt (hypot re im)) |
| 1.0ms | (cbrt (hypot re im)) |
| 1.0ms | (cbrt (hypot re im)) |
4 calls. Slowest were:
| 125.0ms | (cbrt (hypot re im)) |
| 125.0ms | (cbrt (hypot re im)) |
| 116.0ms | (cbrt (hypot re im)) |
| 89.0ms | (fma (sqrt (hypot re im)) (sqrt (* (* (cbrt (hypot re im)) (cbrt (hypot re im))) (* (sqrt (cbrt (hypot re im))) (sqrt (cbrt (hypot re im)))))) (- re)) |
21 calls. Slowest were:
| 42.0ms | (+ (* 1/6 (* (pow re 2) (pow (/ 1 (pow im 5)) 1/3))) (pow im 1/3)) |
| 33.0ms | (+ (* 1/6 (* (pow re 2) (pow (/ 1 (pow im 5)) 1/3))) (pow im 1/3)) |
| 30.0ms | (+ (* 1/6 (* (pow re 2) (pow (/ 1 (pow im 5)) 1/3))) (pow im 1/3)) |
17 alts after pruning (16 fresh and 1 done)
Merged error: 13.9b
0% (0.2b remaining)
Error of 13.2b against oracle of 13.0b and baseline of 13.2b