


Bits error versus x
Results
if x < -0.0321479252886361 or 0.033869857145841065 < x Initial program 1.1
rmApplied associate-/r*0.5
if -0.0321479252886361 < x < 0.033869857145841065Initial program 61.3
Taylor expanded around 0 0.0
Final simplification0.2
herbie shell --seed 2019021
(FPCore (x)
:name "cos2 (problem 3.4.1)"
(/ (- 1 (cos x)) (* x x)))
Time bar (total: 16.7s)Debug log
| 62.0ms | 48× | body | 2560 | valid |
| 25.0ms | 57× | body | 640 | valid |
| 21.0ms | 34× | body | 1280 | valid |
| 10.0ms | 30× | body | 320 | valid |
| 8.0ms | 70× | body | 80 | valid |
| 6.0ms | 17× | body | 160 | valid |
| 16.0ms | (/ (- 1 (cos x)) (* x x)) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 30.8b
Found 2 expressions with local error:
| 13.6b | (/ (- 1 (cos x)) (* x x)) |
| 2.2b | (- 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 |
| 4.0ms | (/ (- 1 (cos x)) (* x x)) |
| 1.0ms | (- 1 (cos x)) |
| 65.0ms | (/ (- 1 (cos x)) (* x x)) |
| 28.0ms | (- 1 (cos x)) |
| 353.0ms | (/ (* (* (- 1 (cos x)) (- 1 (cos x))) (- 1 (cos x))) (* (* (* x x) (* x x)) (* x x))) |
| 67.0ms | (- (+ (* 1/720 (pow x 4)) 1/2) (* 1/24 (pow x 2))) |
| 66.0ms | (- (+ (* 1/2 (pow x 2)) (* 1/720 (pow x 6))) (* 1/24 (pow x 4))) |
| 25.0ms | (/ (- 1 (cos x)) (pow x 2)) |
| 24.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:
| 13.3b | (/ (* (sin x) (sin x)) (* (* x x) (+ 1 (cos x)))) |
| 0.4b | (+ 1 (cos x)) |
| 0.3b | (* (* x x) (+ 1 (cos x))) |
| 0.3b | (* (sin x) (sin 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 |
| 10.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)) |
| 45.0ms | (/ (* (sin x) (sin x)) (* (* x x) (+ 1 (cos x)))) |
| 19.0ms | (* (* x x) (+ 1 (cos x))) |
| 16.0ms | (* (sin x) (sin x)) |
| 12.0ms | (+ 1 (cos x)) |
| 768.0ms | (* (* (* (* x x) (* x x)) (* x x)) (* (* (+ 1 (cos x)) (+ 1 (cos x))) (+ 1 (cos x)))) |
| 426.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))))) |
| 313.0ms | (/ (* (* (* (sin x) (sin x)) (sin x)) (* (* (sin x) (sin x)) (sin x))) (* (* (* (* x x) (* x x)) (* x x)) (* (* (+ 1 (cos x)) (+ 1 (cos x))) (+ 1 (cos x))))) |
| 269.0ms | (- (log (* (sin x) (sin x))) (log (* (* x x) (+ 1 (cos x))))) |
| 265.0ms | (- (+ (log (sin x)) (log (sin x))) (log (* (* x x) (+ 1 (cos x))))) |
6 alts after pruning (6 fresh and 0 done)
Merged error: 0b
Found 4 expressions with local error:
| 13.3b | (/ (* (sin x) (sin x)) (* x (* x (+ 1 (cos x))))) |
| 0.4b | (+ 1 (cos x)) |
| 0.3b | (* (sin x) (sin x)) |
| 0.1b | (* x (+ 1 (cos x))) |
| 11× | add-exp-log |
| 11× | add-cbrt-cube |
| 9× | pow1 |
| 7× | add-cube-cbrt |
| 7× | *-un-lft-identity |
| 7× | add-sqr-sqrt |
| 6× | associate-*r/ |
| 6× | associate-*r* |
| 4× | add-log-exp |
| 3× | flip-+ |
| 3× | associate-*l* |
| 3× | flip3-+ |
| 2× | sin-mult |
| 2× | sqr-sin |
| 2× | cbrt-unprod |
| 2× | *-commutative |
| 2× | associate-/r/ |
| 2× | prod-exp |
| 2× | div-exp |
| 2× | cbrt-undiv |
| 1× | associate-/l/ |
| 1× | associate-/l* |
| 1× | div-inv |
| 1× | pow-prod-up |
| 1× | pow-prod-down |
| 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 |
| 6.0ms | (/ (* (sin x) (sin x)) (* x (* x (+ 1 (cos x))))) |
| 3.0ms | (* (sin x) (sin x)) |
| 1.0ms | (* x (+ 1 (cos x))) |
| 1.0ms | (+ 1 (cos x)) |
| 38.0ms | (/ (* (sin x) (sin x)) (* x (* x (+ 1 (cos x))))) |
| 20.0ms | (* x (+ 1 (cos x))) |
| 14.0ms | (* (sin x) (sin x)) |
| 8.0ms | (+ 1 (cos x)) |
| 267.0ms | (- (log (* (sin x) (sin x))) (log (* x (* x (+ 1 (cos x)))))) |
| 266.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)))))) |
| 255.0ms | (- (+ (log (sin x)) (log (sin x))) (log (* x (* x (+ 1 (cos x)))))) |
| 209.0ms | (/ (pow (sin x) 2) (* (pow x 2) (+ (cos x) 1))) |
| 195.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)))))) |
6 alts after pruning (5 fresh and 1 done)
Merged error: 0b
Found 2 expressions with local error:
| 12.5b | (/ (* x x) (sin x)) |
| 0.5b | (/ (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 |
| 5.0ms | (/ (tan (/ x 2)) (/ (* x x) (sin x))) |
| 3.0ms | (/ (* x x) (sin x)) |
| 59.0ms | (/ (tan (/ x 2)) (/ (* x x) (sin x))) |
| 28.0ms | (/ (* x x) (sin x)) |
| 807.0ms | (/ (* (* (tan (/ x 2)) (tan (/ x 2))) (tan (/ x 2))) (* (* (/ (* x x) (sin x)) (/ (* x x) (sin x))) (/ (* x x) (sin x)))) |
| 176.0ms | (/ (* (* (* x x) (* x x)) (* x x)) (* (* (sin x) (sin x)) (sin x))) |
| 164.0ms | (/ (* (sin x) (sin (* 1/2 x))) (* (cos (* 1/2 x)) (pow x 2))) |
| 134.0ms | (/ (* (sin x) (sin (* 1/2 x))) (* (cos (* 1/2 x)) (pow x 2))) |
| 81.0ms | (- (log (tan (/ x 2))) (- (log (* x x)) (log (sin x)))) |
6 alts after pruning (4 fresh and 2 done)
Merged error: 0b
98.6% (0.2b remaining)
Error of 0.2b against oracle of 0.0b and baseline of 15.8b
| 2.3s | 1631× | body | 2560 | valid |
| 1.1s | 1427× | body | 640 | valid |
| 958.0ms | 1274× | body | 1280 | valid |
| 297.0ms | 939× | body | 320 | valid |
| 257.0ms | 2227× | body | 80 | valid |
| 110.0ms | 502× | body | 160 | valid |