


Bits error versus x
Results
Initial program 30.7
rmApplied flip--30.8
Applied associate-/l/30.8
Simplified15.3
Taylor expanded around inf 15.3
Simplified15.5
rmApplied *-un-lft-identity15.5
Applied times-frac0.4
Applied *-un-lft-identity0.4
Applied times-frac0.2
Simplified0.2
Final simplification0.2
herbie shell --seed 1042149663
(FPCore (x)
:name "cos2 (problem 3.4.1)"
(/ (- 1 (cos x)) (* x x)))
Time bar (total: 30.2s)Debug log
| 256× | (pre true 80) |
| 74× | (body real 80) |
| 49× | (body real 640) |
| 49× | (body real 2560) |
| 45× | (body real 1280) |
| 27× | (body real 320) |
| 12× | (body real 160) |
| 33.0ms | (/ (- 1 (cos x)) (* x x)) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 30.7b
Found 2 expressions with local error:
| 15.5b | (/ (- 1 (cos x)) (* x x)) |
| 2.0b | (- 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 |
| 8.0ms | (/ (- 1 (cos x)) (* x x)) |
| 2.0ms | (- 1 (cos x)) |
| 59.0ms | (/ (- 1 (cos x)) (* x x)) |
| 35.0ms | (- 1 (cos x)) |
| 543.0ms | (/ (* (* (- 1 (cos x)) (- 1 (cos x))) (- 1 (cos x))) (* (* (* x x) (* x x)) (* x x))) |
| 88.0ms | (- (+ (* 1/2 (pow x 2)) (* 1/720 (pow x 6))) (* 1/24 (pow x 4))) |
| 84.0ms | (- (+ (* 1/720 (pow x 4)) 1/2) (* 1/24 (pow x 2))) |
| 47.0ms | (- (log (- 1 (cos x))) (log (* x x))) |
| 34.0ms | (/ (- 1 (cos x)) (pow x 2)) |
8 alts after pruning (8 fresh and 0 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 15.6b | (/ (* (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 |
| 18.0ms | (/ (* (sin x) (sin x)) (* (* x x) (+ 1 (cos x)))) |
| 8.0ms | (* (* x x) (+ 1 (cos x))) |
| 8.0ms | (* (sin x) (sin x)) |
| 2.0ms | (+ 1 (cos x)) |
| 79.0ms | (/ (* (sin x) (sin x)) (* (* x x) (+ 1 (cos x)))) |
| 42.0ms | (* (* x x) (+ 1 (cos x))) |
| 30.0ms | (* (sin x) (sin x)) |
| 21.0ms | (+ 1 (cos x)) |
| 1.4s | (* (* (* (* x x) (* x x)) (* x x)) (* (* (+ 1 (cos x)) (+ 1 (cos x))) (+ 1 (cos x)))) |
| 624.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))))) |
| 542.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))))) |
| 509.0ms | (- (+ (log (sin x)) (log (sin x))) (log (* (* x x) (+ 1 (cos x))))) |
| 493.0ms | (- (+ (log (sin x)) (log (sin x))) (+ (log (* x x)) (log (+ 1 (cos x))))) |
7 alts after pruning (6 fresh and 1 done)
Merged error: 0b
Found 2 expressions with local error:
| 15.1b | (/ (* x x) (sin x)) |
| 0.2b | (/ (tan (/ x 2)) (/ (* x x) (sin x))) |
| 36× | times-frac |
| 20× | add-cube-cbrt |
| 20× | *-un-lft-identity |
| 20× | add-sqr-sqrt |
| 10× | associate-/r* |
| 9× | add-exp-log |
| 9× | add-cbrt-cube |
| 6× | div-inv |
| 4× | associate-/l* |
| 4× | div-exp |
| 4× | cbrt-undiv |
| 2× | add-log-exp |
| 2× | frac-2neg |
| 2× | clear-num |
| 2× | pow1 |
| 1× | associate-/l/ |
| 1× | associate-/r/ |
| 1× | tan-quot |
| 12.0ms | (/ (tan (/ x 2)) (/ (* x x) (sin x))) |
| 7.0ms | (/ (* x x) (sin x)) |
| 119.0ms | (/ (tan (/ x 2)) (/ (* x x) (sin x))) |
| 52.0ms | (/ (* x x) (sin x)) |
| 1.5s | (/ (* (* (tan (/ x 2)) (tan (/ x 2))) (tan (/ x 2))) (* (* (/ (* x x) (sin x)) (/ (* x x) (sin x))) (/ (* x x) (sin x)))) |
| 350.0ms | (/ (* (* (* x x) (* x x)) (* x x)) (* (* (sin x) (sin x)) (sin x))) |
| 264.0ms | (/ (* (sin x) (sin (* 1/2 x))) (* (cos (* 1/2 x)) (pow x 2))) |
| 246.0ms | (/ (* (sin x) (sin (* 1/2 x))) (* (cos (* 1/2 x)) (pow x 2))) |
| 156.0ms | (- (log (tan (/ x 2))) (- (log (* x x)) (log (sin x)))) |
7 alts after pruning (5 fresh and 2 done)
Merged error: 0b
Found 3 expressions with local error:
| 0.2b | (/ (tan (/ x 2)) (/ x (sin x))) |
| 0.2b | (* (/ 1 x) (/ (tan (/ x 2)) (/ x (sin x)))) |
| 0.1b | (/ x (sin x)) |
| 24× | times-frac |
| 22× | add-cube-cbrt |
| 22× | *-un-lft-identity |
| 22× | add-sqr-sqrt |
| 17× | associate-*r* |
| 11× | div-inv |
| 10× | add-exp-log |
| 10× | add-cbrt-cube |
| 7× | associate-/r* |
| 5× | pow1 |
| 4× | associate-*l* |
| 3× | add-log-exp |
| 3× | associate-/l* |
| 2× | cbrt-unprod |
| 2× | associate-/r/ |
| 2× | prod-exp |
| 2× | div-exp |
| 2× | frac-2neg |
| 2× | clear-num |
| 2× | cbrt-undiv |
| 1× | associate-/l/ |
| 1× | *-commutative |
| 1× | associate-*r/ |
| 1× | tan-quot |
| 1× | associate-*l/ |
| 1× | pow-prod-down |
| 1× | frac-times |
| 12.0ms | (* (/ 1 x) (/ (tan (/ x 2)) (/ x (sin x)))) |
| 10.0ms | (/ (tan (/ x 2)) (/ x (sin x))) |
| 1.0ms | (/ x (sin x)) |
| 127.0ms | (/ (tan (/ x 2)) (/ x (sin x))) |
| 118.0ms | (* (/ 1 x) (/ (tan (/ x 2)) (/ x (sin x)))) |
| 44.0ms | (/ x (sin x)) |
| 612.0ms | (* (/ 1 x) (/ (tan (/ x 2)) (/ x (sin x)))) |
| 518.0ms | (+ (log (/ 1 x)) (log (/ (tan (/ x 2)) (/ x (sin x))))) |
| 343.0ms | (+ (log (/ 1 x)) (- (log (tan (/ x 2))) (log (/ x (sin x))))) |
| 310.0ms | (/ (* (* (tan (/ x 2)) (tan (/ x 2))) (tan (/ x 2))) (* (* (/ x (sin x)) (/ x (sin x))) (/ x (sin x)))) |
| 251.0ms | (/ (* (sin x) (sin (* 1/2 x))) (* (cos (* 1/2 x)) (pow x 2))) |
7 alts after pruning (4 fresh and 3 done)
Merged error: 0b
0% (0.2b remaining)
Error of 0.2b against oracle of 0.0b and baseline of 0.2b
| 8000× | (pre true 80) |
| 2258× | (body real 80) |
| 1611× | (body real 2560) |
| 1476× | (body real 640) |
| 1236× | (body real 1280) |
| 940× | (body real 320) |
| 479× | (body real 160) |