


Bits error versus x
Results
Initial program 30.7
rmApplied flip--30.9
Applied associate-/l/30.9
Simplified15.0
rmApplied clear-num15.0
Taylor expanded around -inf 15.0
Simplified15.3
rmApplied *-un-lft-identity15.3
Applied *-un-lft-identity15.3
Applied times-frac0.4
Applied times-frac0.5
Applied associate-/r*0.2
Final simplification0.2
herbie shell --seed 2019016
(FPCore (x)
:name "cos2 (problem 3.4.1)"
(/ (- 1 (cos x)) (* x x)))
Time bar (total: 22.8s)Debug log
| 256× | (pre true 80) |
| 76× | (body real 80) |
| 47× | (body real 2560) |
| 45× | (body real 640) |
| 42× | (body real 1280) |
| 31× | (body real 320) |
| 15× | (body real 160) |
| 14.0ms | (/ (- 1 (cos x)) (* x x)) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 30.4b
Found 2 expressions with local error:
| 14.4b | (/ (- 1 (cos x)) (* x x)) |
| 1.9b | (- 1 (cos x)) |
| 4× | add-cube-cbrt |
| 4× | add-exp-log |
| 4× | add-cbrt-cube |
| 4× | *-un-lft-identity |
| 4× | add-sqr-sqrt |
| 3× | associate-/l* |
| 3× | times-frac |
| 2× | associate-/l/ |
| 2× | add-log-exp |
| 2× | flip-- |
| 2× | flip3-- |
| 2× | pow1 |
| 1× | div-inv |
| 1× | div-exp |
| 1× | div-sub |
| 1× | frac-2neg |
| 1× | sub-neg |
| 1× | associate-/r* |
| 1× | clear-num |
| 1× | cbrt-undiv |
| 5.0ms | (/ (- 1 (cos x)) (* x x)) |
| 1.0ms | (- 1 (cos x)) |
| 80.0ms | (/ (- 1 (cos x)) (* x x)) |
| 30.0ms | (- 1 (cos x)) |
| 440.0ms | (/ (* (* (- 1 (cos x)) (- 1 (cos x))) (- 1 (cos x))) (* (* (* x x) (* x x)) (* x x))) |
| 68.0ms | (- (+ (* 1/2 (pow x 2)) (* 1/720 (pow x 6))) (* 1/24 (pow x 4))) |
| 67.0ms | (- (+ (* 1/720 (pow x 4)) 1/2) (* 1/24 (pow x 2))) |
| 40.0ms | (- (log (- 1 (cos x))) (log (* x x))) |
| 18.0ms | (- (pow 1 3) (pow (cos x) 3)) |
7 alts after pruning (7 fresh and 0 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 14.3b | (/ (* (sin x) (sin x)) (* (* x x) (+ 1 (cos x)))) |
| 0.4b | (+ 1 (cos x)) |
| 0.3b | (* (sin x) (sin x)) |
| 0.1b | (* (* x x) (+ 1 (cos x))) |
| 20× | add-exp-log |
| 20× | add-cbrt-cube |
| 11× | pow1 |
| 7× | add-cube-cbrt |
| 7× | *-un-lft-identity |
| 7× | add-sqr-sqrt |
| 6× | cbrt-unprod |
| 6× | prod-exp |
| 6× | associate-*r* |
| 4× | add-log-exp |
| 4× | associate-*r/ |
| 4× | associate-*l* |
| 4× | div-exp |
| 4× | cbrt-undiv |
| 3× | flip-+ |
| 3× | flip3-+ |
| 2× | sin-mult |
| 2× | sqr-sin |
| 2× | *-commutative |
| 2× | associate-/r/ |
| 2× | pow-prod-down |
| 1× | associate-/l/ |
| 1× | associate-/l* |
| 1× | div-inv |
| 1× | pow-prod-up |
| 1× | div-sub |
| 1× | pow-plus |
| 1× | times-frac |
| 1× | distribute-lft-in |
| 1× | frac-2neg |
| 1× | associate-/r* |
| 1× | clear-num |
| 1× | +-commutative |
| 1× | distribute-rgt-in |
| 1× | pow2 |
| 8.0ms | (/ (* (sin x) (sin x)) (* (* x x) (+ 1 (cos x)))) |
| 6.0ms | (* (sin x) (sin x)) |
| 3.0ms | (* (* x x) (+ 1 (cos x))) |
| 1.0ms | (+ 1 (cos x)) |
| 46.0ms | (/ (* (sin x) (sin x)) (* (* x x) (+ 1 (cos x)))) |
| 30.0ms | (* (* x x) (+ 1 (cos x))) |
| 19.0ms | (* (sin x) (sin x)) |
| 9.0ms | (+ 1 (cos x)) |
| 1.2s | (* (* (* (* x x) (* x x)) (* x x)) (* (* (+ 1 (cos x)) (+ 1 (cos x))) (+ 1 (cos x)))) |
| 417.0ms | (/ (* (* (* (sin x) (sin x)) (sin x)) (* (* (sin x) (sin x)) (sin x))) (* (* (* (* x x) (+ 1 (cos x))) (* (* x x) (+ 1 (cos x)))) (* (* x x) (+ 1 (cos x))))) |
| 391.0ms | (/ (* (* (* (sin x) (sin x)) (* (sin x) (sin x))) (* (sin x) (sin x))) (* (* (* (* x x) (+ 1 (cos x))) (* (* x x) (+ 1 (cos x)))) (* (* x x) (+ 1 (cos x))))) |
| 362.0ms | (- (+ (log (sin x)) (log (sin x))) (+ (log (* x x)) (log (+ 1 (cos x))))) |
| 343.0ms | (- (log (* (sin x) (sin x))) (log (* (* x x) (+ 1 (cos x))))) |
8 alts after pruning (8 fresh and 0 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 14.3b | (/ (* (* x x) (+ 1 (cos x))) (* (sin x) (sin x))) |
| 0.4b | (+ 1 (cos x)) |
| 0.3b | (* (sin x) (sin x)) |
| 0.1b | (* (* x x) (+ 1 (cos x))) |
| 20× | add-exp-log |
| 20× | add-cbrt-cube |
| 11× | pow1 |
| 7× | add-cube-cbrt |
| 7× | *-un-lft-identity |
| 7× | add-sqr-sqrt |
| 6× | cbrt-unprod |
| 6× | prod-exp |
| 6× | associate-*r* |
| 4× | add-log-exp |
| 4× | associate-*r/ |
| 4× | associate-*l* |
| 4× | div-exp |
| 4× | cbrt-undiv |
| 3× | flip-+ |
| 3× | flip3-+ |
| 2× | associate-/l/ |
| 2× | sin-mult |
| 2× | *-commutative |
| 2× | pow-prod-down |
| 1× | associate-/l* |
| 1× | div-inv |
| 1× | sqr-sin |
| 1× | pow-prod-up |
| 1× | associate-/r/ |
| 1× | pow-plus |
| 1× | times-frac |
| 1× | distribute-lft-in |
| 1× | frac-2neg |
| 1× | associate-/r* |
| 1× | clear-num |
| 1× | +-commutative |
| 1× | distribute-rgt-in |
| 1× | pow2 |
| 8.0ms | (/ (* (* x x) (+ 1 (cos x))) (* (sin x) (sin x))) |
| 3.0ms | (* (* x x) (+ 1 (cos x))) |
| 3.0ms | (* (sin x) (sin x)) |
| 1.0ms | (+ 1 (cos x)) |
| 60.0ms | (/ (* (* x x) (+ 1 (cos x))) (* (sin x) (sin x))) |
| 30.0ms | (* (* x x) (+ 1 (cos x))) |
| 22.0ms | (* (sin x) (sin x)) |
| 8.0ms | (+ 1 (cos x)) |
| 856.0ms | (* (* (* (* x x) (* x x)) (* x x)) (* (* (+ 1 (cos x)) (+ 1 (cos x))) (+ 1 (cos x)))) |
| 571.0ms | (/ (* (pow x 2) (+ (cos x) 1)) (pow (sin x) 2)) |
| 470.0ms | (/ (* (pow x 2) (+ (cos x) 1)) (pow (sin x) 2)) |
| 422.0ms | (/ (* (* (* (* x x) (+ 1 (cos x))) (* (* x x) (+ 1 (cos x)))) (* (* x x) (+ 1 (cos x)))) (* (* (* (sin x) (sin x)) (* (sin x) (sin x))) (* (sin x) (sin x)))) |
| 398.0ms | (/ (* (* (* (* x x) (+ 1 (cos x))) (* (* x x) (+ 1 (cos x)))) (* (* x x) (+ 1 (cos x)))) (* (* (* (sin x) (sin x)) (sin x)) (* (* (sin x) (sin x)) (sin x)))) |
8 alts after pruning (8 fresh and 0 done)
Merged error: 0b
Found 3 expressions with local error:
| 13.8b | (/ (* x x) (sin x)) |
| 0.1b | (/ 1 (/ (/ (* x x) (sin x)) (tan (/ x 2)))) |
| 0.1b | (/ (/ (* x x) (sin x)) (tan (/ x 2))) |
| 66× | times-frac |
| 35× | add-cube-cbrt |
| 35× | *-un-lft-identity |
| 35× | add-sqr-sqrt |
| 32× | associate-/r* |
| 16× | add-exp-log |
| 11× | div-inv |
| 10× | add-cbrt-cube |
| 8× | associate-/l* |
| 7× | div-exp |
| 4× | cbrt-undiv |
| 4× | pow1 |
| 3× | add-log-exp |
| 3× | associate-/r/ |
| 3× | frac-2neg |
| 3× | clear-num |
| 3× | rec-exp |
| 2× | tan-quot |
| 1× | associate-/l/ |
| 1× | inv-pow |
| 1× | pow-flip |
| 6.0ms | (/ (/ (* x x) (sin x)) (tan (/ x 2))) |
| 3.0ms | (/ (* x x) (sin x)) |
| 3.0ms | (/ 1 (/ (/ (* x x) (sin x)) (tan (/ x 2)))) |
| 62.0ms | (/ (/ (* x x) (sin x)) (tan (/ x 2))) |
| 61.0ms | (/ 1 (/ (/ (* x x) (sin x)) (tan (/ x 2)))) |
| 23.0ms | (/ (* x x) (sin x)) |
| 734.0ms | (/ (* (* (/ (* x x) (sin x)) (/ (* x x) (sin x))) (/ (* x x) (sin x))) (* (* (tan (/ x 2)) (tan (/ x 2))) (tan (/ x 2)))) |
| 455.0ms | (/ (/ (* (* (* x x) (* x x)) (* x x)) (* (* (sin x) (sin x)) (sin x))) (* (* (tan (/ x 2)) (tan (/ x 2))) (tan (/ x 2)))) |
| 193.0ms | (/ (* (* (* x x) (* x x)) (* x x)) (* (* (sin x) (sin x)) (sin x))) |
| 172.0ms | (/ (* (cos (* 1/2 x)) (pow x 2)) (* (sin x) (sin (* 1/2 x)))) |
| 156.0ms | (- (- (log (* x x)) (log (sin x))) (log (tan (/ x 2)))) |
6 alts after pruning (5 fresh and 1 done)
Merged error: 0b
0% (0.1b remaining)
Error of 0.2b against oracle of 0.0b and baseline of 0.2b
| 8000× | (pre true 80) |
| 2314× | (body real 80) |
| 1586× | (body real 2560) |
| 1464× | (body real 640) |
| 1248× | (body real 1280) |
| 887× | (body real 320) |
| 501× | (body real 160) |