


Bits error versus r



Bits error versus a



Bits error versus b
Initial program 15.4
rmApplied cos-sum0.3
rmApplied flip--0.4
Applied associate-/r/0.4
Applied associate-*r*0.4
Simplified0.4
rmApplied fma-udef0.4
Applied distribute-rgt-in0.4
Simplified0.5
Final simplification0.5
herbie shell --seed 2019016 +o rules:numerics
(FPCore (r a b)
:name "r*sin(b)/cos(a+b), B"
(* r (/ (sin b) (cos (+ a b)))))
Time bar (total: 38.4s)Debug log
| 256× | (pre true 80) |
| 98× | (body real 1280) |
| 71× | (body real 80) |
| 51× | (body real 640) |
| 20× | (body real 320) |
| 16× | (body real 160) |
| 21.0ms | (* r (/ (sin b) (cos (+ a b)))) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 15.7b
Found 3 expressions with local error:
| 4.5b | (cos (+ a b)) |
| 0.2b | (/ (sin b) (cos (+ a b))) |
| 0.2b | (* r (/ (sin b) (cos (+ a b)))) |
| 18× | add-cube-cbrt |
| 18× | times-frac |
| 18× | *-un-lft-identity |
| 18× | add-sqr-sqrt |
| 13× | associate-*r* |
| 5× | add-exp-log |
| 5× | add-cbrt-cube |
| 3× | add-log-exp |
| 3× | associate-/l* |
| 3× | log1p-expm1-u |
| 3× | associate-/r* |
| 3× | pow1 |
| 3× | expm1-log1p-u |
| 2× | div-inv |
| 1× | *-commutative |
| 1× | associate-*r/ |
| 1× | div-exp |
| 1× | frac-2neg |
| 1× | clear-num |
| 1× | cos-sum |
| 1× | cbrt-undiv |
| 8.0ms | (/ (sin b) (cos (+ a b))) |
| 5.0ms | (* r (/ (sin b) (cos (+ a b)))) |
| 5.0ms | (cos (+ a b)) |
| 136.0ms | (* r (/ (sin b) (cos (+ a b)))) |
| 48.0ms | (/ (sin b) (cos (+ a b))) |
| 34.0ms | (cos (+ a b)) |
| 258.0ms | (+ (* a (* r (pow b 2))) (+ (* 1/3 (* r (pow b 3))) (* r b))) |
| 150.0ms | (+ b (+ (* 1/3 (pow b 3)) (* a (pow b 2)))) |
| 141.0ms | (- 1 (+ (* 1/2 (pow a 2)) (* a b))) |
| 134.0ms | (/ (* (* (sin b) (sin b)) (sin b)) (* (* (cos (+ a b)) (cos (+ a b))) (cos (+ a b)))) |
| 34.0ms | (/ (* (cbrt (sin b)) (cbrt (sin b))) (* (cbrt (cos (+ a b))) (cbrt (cos (+ a b))))) |
10 alts after pruning (10 fresh and 0 done)
Merged error: 0.2b
Found 4 expressions with local error:
| 0.2b | (/ (sin b) (- (* (cos a) (cos b)) (* (sin a) (sin b)))) |
| 0.2b | (* (sin a) (sin b)) |
| 0.2b | (* r (/ (sin b) (- (* (cos a) (cos b)) (* (sin a) (sin b))))) |
| 0.1b | (- (* (cos a) (cos b)) (* (sin a) (sin b))) |
| 21× | add-cube-cbrt |
| 21× | *-un-lft-identity |
| 21× | add-sqr-sqrt |
| 20× | associate-*r* |
| 18× | times-frac |
| 8× | associate-/r/ |
| 8× | add-exp-log |
| 8× | add-cbrt-cube |
| 7× | sin-mult |
| 6× | add-log-exp |
| 6× | cos-mult |
| 6× | pow1 |
| 4× | log1p-expm1-u |
| 4× | expm1-log1p-u |
| 3× | sub-div |
| 3× | associate-/l* |
| 3× | flip-- |
| 3× | frac-sub |
| 3× | associate-*l* |
| 3× | flip3-- |
| 3× | associate-/r* |
| 2× | div-inv |
| 2× | *-commutative |
| 1× | cbrt-unprod |
| 1× | associate-*r/ |
| 1× | prod-exp |
| 1× | pow-prod-down |
| 1× | prod-diff |
| 1× | div-exp |
| 1× | diff-log |
| 1× | fma-neg |
| 1× | frac-2neg |
| 1× | sub-neg |
| 1× | clear-num |
| 1× | cbrt-undiv |
| 23.0ms | (* r (/ (sin b) (- (* (cos a) (cos b)) (* (sin a) (sin b))))) |
| 19.0ms | (/ (sin b) (- (* (cos a) (cos b)) (* (sin a) (sin b)))) |
| 14.0ms | (- (* (cos a) (cos b)) (* (sin a) (sin b))) |
| 7.0ms | (* (sin a) (sin b)) |
| 256.0ms | (* r (/ (sin b) (- (* (cos a) (cos b)) (* (sin a) (sin b))))) |
| 167.0ms | (/ (sin b) (- (* (cos a) (cos b)) (* (sin a) (sin b)))) |
| 86.0ms | (- (* (cos a) (cos b)) (* (sin a) (sin b))) |
| 51.0ms | (* (sin a) (sin b)) |
| 371.0ms | (- (+ (cos (+ a b)) (cos (- a b))) (- (cos (- a b)) (cos (+ a b)))) |
| 336.0ms | (- (* (+ (cos (+ a b)) (cos (- a b))) 2) (* 2 (- (cos (- a b)) (cos (+ a b))))) |
| 265.0ms | (+ (* a (* r (pow b 2))) (+ (* 1/3 (* r (pow b 3))) (* r b))) |
| 231.0ms | (+ (* (* (cos a) (cos b)) (* (cos a) (cos b))) (+ (* (* (sin a) (sin b)) (* (sin a) (sin b))) (* (* (cos a) (cos b)) (* (sin a) (sin b))))) |
| 215.0ms | (+ (* (* (cos a) (cos b)) (* (cos a) (cos b))) (+ (* (* (sin a) (sin b)) (* (sin a) (sin b))) (* (* (cos a) (cos b)) (* (sin a) (sin b))))) |
12 alts after pruning (12 fresh and 0 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 0.2b | (/ (* (sin b) r) (- (* (cos a) (cos b)) (* (sin a) (sin b)))) |
| 0.2b | (* (sin a) (sin b)) |
| 0.1b | (- (* (cos a) (cos b)) (* (sin a) (sin b))) |
| 0.1b | (* (cos a) (cos b)) |
| 10× | add-cube-cbrt |
| 10× | add-exp-log |
| 10× | add-cbrt-cube |
| 10× | *-un-lft-identity |
| 10× | add-sqr-sqrt |
| 8× | pow1 |
| 6× | add-log-exp |
| 6× | associate-*l* |
| 6× | associate-*r* |
| 5× | sin-mult |
| 5× | cos-mult |
| 4× | log1p-expm1-u |
| 4× | associate-/r/ |
| 4× | expm1-log1p-u |
| 3× | times-frac |
| 3× | associate-/r* |
| 2× | sub-div |
| 2× | flip-- |
| 2× | cbrt-unprod |
| 2× | frac-sub |
| 2× | *-commutative |
| 2× | prod-exp |
| 2× | pow-prod-down |
| 2× | flip3-- |
| 1× | associate-/l* |
| 1× | div-inv |
| 1× | prod-diff |
| 1× | div-exp |
| 1× | diff-log |
| 1× | fma-neg |
| 1× | frac-2neg |
| 1× | sub-neg |
| 1× | clear-num |
| 1× | cbrt-undiv |
| 11.0ms | (/ (* (sin b) r) (- (* (cos a) (cos b)) (* (sin a) (sin b)))) |
| 7.0ms | (- (* (cos a) (cos b)) (* (sin a) (sin b))) |
| 4.0ms | (* (sin a) (sin b)) |
| 4.0ms | (* (cos a) (cos b)) |
| 264.0ms | (/ (* (sin b) r) (- (* (cos a) (cos b)) (* (sin a) (sin b)))) |
| 114.0ms | (- (* (cos a) (cos b)) (* (sin a) (sin b))) |
| 71.0ms | (* (sin a) (sin b)) |
| 39.0ms | (* (cos a) (cos b)) |
| 288.0ms | (- (+ (cos (+ a b)) (cos (- a b))) (- (cos (- a b)) (cos (+ a b)))) |
| 266.0ms | (- (* (+ (cos (+ a b)) (cos (- a b))) 2) (* 2 (- (cos (- a b)) (cos (+ a b))))) |
| 254.0ms | (+ (* (* (cos a) (cos b)) (* (cos a) (cos b))) (+ (* (* (sin a) (sin b)) (* (sin a) (sin b))) (* (* (cos a) (cos b)) (* (sin a) (sin b))))) |
| 201.0ms | (+ (* a (* r (pow b 2))) (+ (* 1/3 (* r (pow b 3))) (* r b))) |
| 194.0ms | (- 1 (+ (* 1/2 (pow a 2)) (* 1/2 (pow b 2)))) |
9 alts after pruning (9 fresh and 0 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 0.3b | (* (* (cos a) (cos b)) (* (cos a) (cos b))) |
| 0.3b | (/ (sin b) (- (* (* (cos a) (cos b)) (* (cos a) (cos b))) (* (* (sin a) (sin b)) (* (sin a) (sin b))))) |
| 0.2b | (* (* r (/ (sin b) (- (* (* (cos a) (cos b)) (* (cos a) (cos b))) (* (* (sin a) (sin b)) (* (sin a) (sin b)))))) (fma (sin b) (sin a) (* (cos b) (cos a)))) |
| 0.2b | (* (* (sin a) (sin b)) (* (sin a) (sin b))) |
| 60× | pow1 |
| 32× | add-exp-log |
| 32× | add-cbrt-cube |
| 27× | pow-prod-down |
| 22× | sin-mult |
| 22× | cos-mult |
| 17× | cbrt-unprod |
| 17× | prod-exp |
| 16× | associate-/r/ |
| 14× | add-cube-cbrt |
| 14× | *-un-lft-identity |
| 14× | add-sqr-sqrt |
| 13× | associate-*r/ |
| 13× | associate-*l/ |
| 12× | times-frac |
| 10× | frac-times |
| 9× | frac-sub |
| 8× | pow-prod-up |
| 5× | sub-div |
| 5× | associate-*r* |
| 4× | difference-of-squares |
| 4× | add-log-exp |
| 4× | log1p-expm1-u |
| 4× | pow-plus |
| 4× | associate-/r* |
| 4× | expm1-log1p-u |
| 3× | associate-/l* |
| 3× | *-commutative |
| 3× | associate-*l* |
| 2× | fma-udef |
| 2× | pow2 |
| 1× | flip-- |
| 1× | div-inv |
| 1× | div-exp |
| 1× | flip3-- |
| 1× | distribute-lft-in |
| 1× | frac-2neg |
| 1× | clear-num |
| 1× | cbrt-undiv |
| 1× | distribute-rgt-in |
| 141.0ms | (* (* r (/ (sin b) (- (* (* (cos a) (cos b)) (* (cos a) (cos b))) (* (* (sin a) (sin b)) (* (sin a) (sin b)))))) (fma (sin b) (sin a) (* (cos b) (cos a)))) |
| 56.0ms | (/ (sin b) (- (* (* (cos a) (cos b)) (* (cos a) (cos b))) (* (* (sin a) (sin b)) (* (sin a) (sin b))))) |
| 31.0ms | (* (* (sin a) (sin b)) (* (sin a) (sin b))) |
| 15.0ms | (* (* (cos a) (cos b)) (* (cos a) (cos b))) |
| 496.0ms | (* (* r (/ (sin b) (- (* (* (cos a) (cos b)) (* (cos a) (cos b))) (* (* (sin a) (sin b)) (* (sin a) (sin b)))))) (fma (sin b) (sin a) (* (cos b) (cos a)))) |
| 193.0ms | (/ (sin b) (- (* (* (cos a) (cos b)) (* (cos a) (cos b))) (* (* (sin a) (sin b)) (* (sin a) (sin b))))) |
| 63.0ms | (* (* (sin a) (sin b)) (* (sin a) (sin b))) |
| 57.0ms | (* (* (cos a) (cos b)) (* (cos a) (cos b))) |
| 671.0ms | (/ (sqrt (sin b)) (cbrt (- (* (* (cos a) (cos b)) (* (cos a) (cos b))) (* (* (sin a) (sin b)) (* (sin a) (sin b)))))) |
| 654.0ms | (/ (cbrt (sin b)) (cbrt (- (* (* (cos a) (cos b)) (* (cos a) (cos b))) (* (* (sin a) (sin b)) (* (sin a) (sin b)))))) |
| 646.0ms | (/ (cbrt (sin b)) (sqrt (- (* (* (cos a) (cos b)) (* (cos a) (cos b))) (* (* (sin a) (sin b)) (* (sin a) (sin b)))))) |
| 632.0ms | (* (* (* (* (cos a) (cos b)) (* (cos a) (cos b))) (* (cos a) (cos b))) (* (* (* (cos a) (cos a)) (cos a)) (* (* (cos b) (cos b)) (cos b)))) |
| 611.0ms | (/ (sqrt (sin b)) (sqrt (- (* (* (cos a) (cos b)) (* (cos a) (cos b))) (* (* (sin a) (sin b)) (* (sin a) (sin b)))))) |
9 alts after pruning (9 fresh and 0 done)
Merged error: 0.0b
0% (0.4b remaining)
Error of 0.5b against oracle of 0.1b and baseline of 0.5b
| 8000× | (pre true 80) |
| 2933× | (body real 1280) |
| 2098× | (body real 80) |
| 1786× | (body real 640) |
| 813× | (body real 320) |
| 370× | (body real 160) |