



Bits error versus x
Results
| Original | 9.5 |
|---|---|
| Target | 0.3 |
| Herbie | 0.2 |
Initial program 9.5
rmApplied frac-sub26.0
Applied frac-add25.2
Simplified25.7
Simplified25.7
Taylor expanded around 0 0.3
Taylor expanded around inf 0.2
Final simplification0.2
herbie shell --seed 2018362 +o rules:numerics
(FPCore (x)
:name "3frac (problem 3.3.3)"
:herbie-target
(/ 2 (* x (- (* x x) 1)))
(+ (- (/ 1 (+ x 1)) (/ 2 x)) (/ 1 (- x 1))))
Time bar (total: 21.8s)Debug log
1 alts after pruning (1 fresh and 0 done)
Merged error: 6.1b
Found 4 expressions with local error:
| 1.4b | (+ (- (/ 1 (+ x 1)) (/ 2 x)) (/ 1 (- x 1))) |
| 0.0b | (- (/ 1 (+ x 1)) (/ 2 x)) |
| 0.0b | (/ 1 (- x 1)) |
| 0.0b | (/ 1 (+ x 1)) |
4 calls. Slowest were:
| 23.0ms | (+ (- (/ 1 (+ x 1)) (/ 2 x)) (/ 1 (- x 1))) |
| 9.0ms | (- (/ 1 (+ x 1)) (/ 2 x)) |
| 2.0ms | (/ 1 (- x 1)) |
4 calls. Slowest were:
| 66.0ms | (+ (- (/ 1 (+ x 1)) (/ 2 x)) (/ 1 (- x 1))) |
| 18.0ms | (- (/ 1 (+ x 1)) (/ 2 x)) |
| 11.0ms | (/ 1 (+ x 1)) |
| 11.0ms | (/ 1 (- x 1)) |
127 calls. Slowest were:
| 946.0ms | (+ (* (- (* 1 x) (* (+ x 1) 2)) (- x 1)) (* (* (+ x 1) x) 1)) |
| 803.0ms | (- (+ (* 2 x) (+ (* 2 (pow x 3)) (* 2 (/ 1 x))))) |
| 475.0ms | (fma (/ 1 (+ (pow x 3) (pow 1 3))) (+ (* x x) (- (* 1 1) (* x 1))) (- (* (sqrt (/ 2 x)) (sqrt (/ 2 x))))) |
3 alts after pruning (3 fresh and 0 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 25.0b | (fma (+ x (fma -2 x -2)) (+ x -1) (fma x x x)) |
| 0.0b | (* (fma x x x) (+ -1 x)) |
| 0.0b | (/ (fma (+ x (fma -2 x -2)) (+ x -1) (fma x x x)) (* (fma x x x) (+ -1 x))) |
| 0.0b | (+ x (fma -2 x -2)) |
4 calls. Slowest were:
| 10.0ms | (/ (fma (+ x (fma -2 x -2)) (+ x -1) (fma x x x)) (* (fma x x x) (+ -1 x))) |
| 7.0ms | (* (fma x x x) (+ -1 x)) |
| 1.0ms | (+ x (fma -2 x -2)) |
4 calls. Slowest were:
| 147.0ms | (/ (fma (+ x (fma -2 x -2)) (+ x -1) (fma x x x)) (* (fma x x x) (+ -1 x))) |
| 98.0ms | (fma (+ x (fma -2 x -2)) (+ x -1) (fma x x x)) |
| 44.0ms | (* (fma x x x) (+ -1 x)) |
| 38.0ms | (+ x (fma -2 x -2)) |
39 calls. Slowest were:
| 643.0ms | (- (+ (* 2 x) (+ (* 2 (pow x 3)) (* 2 (/ 1 x))))) |
| 393.0ms | (- (log (fma (+ x (fma -2 x -2)) (+ x -1) (fma x x x))) (log (* (fma x x x) (+ -1 x)))) |
| 289.0ms | (+ (* 2 (/ 1 (pow x 7))) (+ (* 2 (/ 1 (pow x 3))) (* 2 (/ 1 (pow x 5))))) |
3 alts after pruning (3 fresh and 0 done)
Merged error: 0.0b
Found 2 expressions with local error:
| 0.0b | (/ 2 (* (fma x x x) (+ -1 x))) |
| 0.0b | (* (fma x x x) (+ -1 x)) |
2 calls. Slowest were:
| 4.0ms | (* (fma x x x) (+ -1 x)) |
| 1.0ms | (/ 2 (* (fma x x x) (+ -1 x))) |
2 calls. Slowest were:
| 44.0ms | (* (fma x x x) (+ -1 x)) |
| 29.0ms | (/ 2 (* (fma x x x) (+ -1 x))) |
21 calls. Slowest were:
| 439.0ms | (- (+ (* 2 x) (+ (* 2 (pow x 3)) (* 2 (/ 1 x))))) |
| 262.0ms | (+ (* 2 (/ 1 (pow x 7))) (+ (* 2 (/ 1 (pow x 3))) (* 2 (/ 1 (pow x 5))))) |
| 230.0ms | (+ (* 2 (/ 1 (pow x 7))) (+ (* 2 (/ 1 (pow x 3))) (* 2 (/ 1 (pow x 5))))) |
4 alts after pruning (4 fresh and 0 done)
Merged error: 0b
Found 2 expressions with local error:
| 0.0b | (/ 2 (- (pow x 3) x)) |
| 0.0b | (- (pow x 3) x) |
2 calls. Slowest were:
| 3.0ms | (- (pow x 3) x) |
| 2.0ms | (/ 2 (- (pow x 3) x)) |
2 calls. Slowest were:
| 29.0ms | (- (pow x 3) x) |
| 18.0ms | (/ 2 (- (pow x 3) x)) |
14 calls. Slowest were:
| 576.0ms | (+ (* (pow x 3) (pow x 3)) (+ (* x x) (* (pow x 3) x))) |
| 555.0ms | (- (+ (* 2 x) (+ (* 2 (pow x 3)) (* 2 (/ 1 x))))) |
| 365.0ms | (+ (* 2 (/ 1 (pow x 7))) (+ (* 2 (/ 1 (pow x 3))) (* 2 (/ 1 (pow x 5))))) |
4 alts after pruning (3 fresh and 1 done)
Merged error: 0b
0% (0.2b remaining)
Error of 0.2b against oracle of 0.0b and baseline of 0.2b