



Bits error versus x
Results
| Original | 9.8 |
|---|---|
| Target | 0.3 |
| Herbie | 0.1 |
if x < -115.27580035964922 or 105.7634957037421 < x Initial program 19.6
rmApplied *-un-lft-identity19.6
Applied div-inv19.6
Applied distribute-lft-out--19.6
Taylor expanded around inf 0.5
Simplified0.1
if -115.27580035964922 < x < 105.7634957037421Initial program 0.0
rmApplied *-un-lft-identity0.0
Applied div-inv0.0
Applied distribute-lft-out--0.0
Final simplification0.1
herbie shell --seed 2019004
(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: 35.7s)Debug log
1 calls. Slowest were:
| 58.0ms | (+ (- (/ 1 (+ x 1)) (/ 2 x)) (/ 1 (- x 1))) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 10.5b
Found 4 expressions with local error:
| 2.7b | (+ (- (/ 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:
| 34.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:
| 39.0ms | (+ (- (/ 1 (+ x 1)) (/ 2 x)) (/ 1 (- x 1))) |
| 12.0ms | (- (/ 1 (+ x 1)) (/ 2 x)) |
| 11.0ms | (/ 1 (- x 1)) |
| 10.0ms | (/ 1 (+ x 1)) |
48 calls. Slowest were:
| 508.0ms | (* (+ (/ 1 (+ x 1)) (/ 2 x)) (- x 1)) |
| 413.0ms | (- (+ (* 2 x) (+ (* 2 (pow x 3)) (* 2 (/ 1 x))))) |
| 332.0ms | (+ (* (- (* 1 x) (* (+ x 1) 2)) (- x 1)) (* (* (+ x 1) x) 1)) |
4 alts after pruning (4 fresh and 0 done)
Merged error: 0.1b
Found 4 expressions with local error:
| 2.7b | (+ (* 1 (- (/ 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:
| 13.0ms | (+ (* 1 (- (/ 1 (+ x 1)) (/ 2 x))) (/ 1 (- x 1))) |
| 10.0ms | (- (/ 1 (+ x 1)) (/ 2 x)) |
| 2.0ms | (/ 1 (- x 1)) |
4 calls. Slowest were:
| 48.0ms | (+ (* 1 (- (/ 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)) |
44 calls. Slowest were:
| 493.0ms | (* (+ (/ 1 (+ x 1)) (/ 2 x)) (- x 1)) |
| 437.0ms | (- (+ (* 2 x) (+ (* 2 (pow x 3)) (* 2 (/ 1 x))))) |
| 293.0ms | (+ (* (* 1 (- (* 1 x) (* (+ x 1) 2))) (- x 1)) (* (* (+ x 1) x) 1)) |
4 alts after pruning (3 fresh and 1 done)
Merged error: 0.1b
Found 4 expressions with local error:
| 14.2b | (/ (* (+ (/ 2 x) (/ 1 (+ x 1))) (+ 1 (+ (* (+ -1 x) (/ -2 x)) (/ (+ -1 x) (+ x 1))))) (* (+ (/ 1 (+ x 1)) (/ 2 x)) (- x 1))) |
| 7.1b | (+ 1 (+ (* (+ -1 x) (/ -2 x)) (/ (+ -1 x) (+ x 1)))) |
| 0.2b | (+ (/ 2 x) (/ 1 (+ x 1))) |
| 0.2b | (+ (/ 1 (+ x 1)) (/ 2 x)) |
4 calls. Slowest were:
| 44.0ms | (/ (* (+ (/ 2 x) (/ 1 (+ x 1))) (+ 1 (+ (* (+ -1 x) (/ -2 x)) (/ (+ -1 x) (+ x 1))))) (* (+ (/ 1 (+ x 1)) (/ 2 x)) (- x 1))) |
| 12.0ms | (+ 1 (+ (* (+ -1 x) (/ -2 x)) (/ (+ -1 x) (+ x 1)))) |
| 9.0ms | (+ (/ 1 (+ x 1)) (/ 2 x)) |
4 calls. Slowest were:
| 424.0ms | (+ 1 (+ (* (+ -1 x) (/ -2 x)) (/ (+ -1 x) (+ x 1)))) |
| 98.0ms | (/ (* (+ (/ 2 x) (/ 1 (+ x 1))) (+ 1 (+ (* (+ -1 x) (/ -2 x)) (/ (+ -1 x) (+ x 1))))) (* (+ (/ 1 (+ x 1)) (/ 2 x)) (- x 1))) |
| 12.0ms | (+ (/ 2 x) (/ 1 (+ x 1))) |
| 11.0ms | (+ (/ 1 (+ x 1)) (/ 2 x)) |
57 calls. Slowest were:
| 905.0ms | (/ (* (* (* (+ (/ 2 x) (/ 1 (+ x 1))) (+ 1 (+ (* (+ -1 x) (/ -2 x)) (/ (+ -1 x) (+ x 1))))) (* (+ (/ 2 x) (/ 1 (+ x 1))) (+ 1 (+ (* (+ -1 x) (/ -2 x)) (/ (+ -1 x) (+ x 1)))))) (* (+ (/ 2 x) (/ 1 (+ x 1))) (+ 1 (+ (* (+ -1 x) (/ -2 x)) (/ (+ -1 x) (+ x 1)))))) (* (* (* (+ (/ 1 (+ x 1)) (/ 2 x)) (+ (/ 1 (+ x 1)) (/ 2 x))) (+ (/ 1 (+ x 1)) (/ 2 x))) (* (* (- x 1) (- x 1)) (- x 1)))) |
| 695.0ms | (/ (* (* (* (+ (/ 2 x) (/ 1 (+ x 1))) (+ 1 (+ (* (+ -1 x) (/ -2 x)) (/ (+ -1 x) (+ x 1))))) (* (+ (/ 2 x) (/ 1 (+ x 1))) (+ 1 (+ (* (+ -1 x) (/ -2 x)) (/ (+ -1 x) (+ x 1)))))) (* (+ (/ 2 x) (/ 1 (+ x 1))) (+ 1 (+ (* (+ -1 x) (/ -2 x)) (/ (+ -1 x) (+ x 1)))))) (* (* (* (+ (/ 1 (+ x 1)) (/ 2 x)) (- x 1)) (* (+ (/ 1 (+ x 1)) (/ 2 x)) (- x 1))) (* (+ (/ 1 (+ x 1)) (/ 2 x)) (- x 1)))) |
| 666.0ms | (* (+ (pow (/ 2 x) 3) (pow (/ 1 (+ x 1)) 3)) (+ 1 (+ (* (+ -1 x) (/ -2 x)) (/ (+ -1 x) (+ x 1))))) |
5 alts after pruning (3 fresh and 2 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 7.2b | (- (/ 2 (pow x 4)) (- (/ (/ 2 x) (* x x)) (/ (/ 2 x) x))) |
| 5.8b | (- (/ (/ 2 x) (* x x)) (/ (/ 2 x) x)) |
| 1.4b | (/ (* (+ (/ 2 x) (/ 1 (+ x 1))) (- (/ 2 (pow x 4)) (- (/ (/ 2 x) (* x x)) (/ (/ 2 x) x)))) (* (+ (/ 1 (+ x 1)) (/ 2 x)) (- x 1))) |
| 0.3b | (/ 2 (pow x 4)) |
4 calls. Slowest were:
| 32.0ms | (/ (* (+ (/ 2 x) (/ 1 (+ x 1))) (- (/ 2 (pow x 4)) (- (/ (/ 2 x) (* x x)) (/ (/ 2 x) x)))) (* (+ (/ 1 (+ x 1)) (/ 2 x)) (- x 1))) |
| 28.0ms | (- (/ 2 (pow x 4)) (- (/ (/ 2 x) (* x x)) (/ (/ 2 x) x))) |
| 7.0ms | (- (/ (/ 2 x) (* x x)) (/ (/ 2 x) x)) |
4 calls. Slowest were:
| 40.0ms | (/ (* (+ (/ 2 x) (/ 1 (+ x 1))) (- (/ 2 (pow x 4)) (- (/ (/ 2 x) (* x x)) (/ (/ 2 x) x)))) (* (+ (/ 1 (+ x 1)) (/ 2 x)) (- x 1))) |
| 38.0ms | (- (/ (/ 2 x) (* x x)) (/ (/ 2 x) x)) |
| 16.0ms | (/ 2 (pow x 4)) |
| 15.0ms | (- (/ 2 (pow x 4)) (- (/ (/ 2 x) (* x x)) (/ (/ 2 x) x))) |
90 calls. Slowest were:
| 707.0ms | (/ (* (* (* (+ (/ 2 x) (/ 1 (+ x 1))) (+ (/ 2 x) (/ 1 (+ x 1)))) (+ (/ 2 x) (/ 1 (+ x 1)))) (* (* (- (/ 2 (pow x 4)) (- (/ (/ 2 x) (* x x)) (/ (/ 2 x) x))) (- (/ 2 (pow x 4)) (- (/ (/ 2 x) (* x x)) (/ (/ 2 x) x)))) (- (/ 2 (pow x 4)) (- (/ (/ 2 x) (* x x)) (/ (/ 2 x) x))))) (* (* (* (+ (/ 1 (+ x 1)) (/ 2 x)) (- x 1)) (* (+ (/ 1 (+ x 1)) (/ 2 x)) (- x 1))) (* (+ (/ 1 (+ x 1)) (/ 2 x)) (- x 1)))) |
| 673.0ms | (- (+ (log (+ (/ 2 x) (/ 1 (+ x 1)))) (log (- (/ 2 (pow x 4)) (- (/ (/ 2 x) (* x x)) (/ (/ 2 x) x))))) (+ (log (+ (/ 1 (+ x 1)) (/ 2 x))) (log (- x 1)))) |
| 663.0ms | (/ (* (* (* (+ (/ 2 x) (/ 1 (+ x 1))) (+ (/ 2 x) (/ 1 (+ x 1)))) (+ (/ 2 x) (/ 1 (+ x 1)))) (* (* (- (/ 2 (pow x 4)) (- (/ (/ 2 x) (* x x)) (/ (/ 2 x) x))) (- (/ 2 (pow x 4)) (- (/ (/ 2 x) (* x x)) (/ (/ 2 x) x)))) (- (/ 2 (pow x 4)) (- (/ (/ 2 x) (* x x)) (/ (/ 2 x) x))))) (* (* (* (+ (/ 1 (+ x 1)) (/ 2 x)) (+ (/ 1 (+ x 1)) (/ 2 x))) (+ (/ 1 (+ x 1)) (/ 2 x))) (* (* (- x 1) (- x 1)) (- x 1)))) |
6 alts after pruning (4 fresh and 2 done)
Merged error: 0b
99.5% (0.1b remaining)
Error of 0.1b against oracle of 0.0b and baseline of 9.8b