


Bits error versus B



Bits error versus x
Results
Initial program 0.2
Simplified0.2
Taylor expanded around -inf 0.2
Taylor expanded around inf 0.2
Final simplification0.2
herbie shell --seed 2019010 +o rules:numerics
(FPCore (B x)
:name "VandenBroeck and Keller, Equation (24)"
(+ (- (* x (/ 1 (tan B)))) (/ 1 (sin B))))
Time bar (total: 36.7s)Debug log
| 74.0ms | (+ (- (* x (/ 1 (tan B)))) (/ 1 (sin B))) |
2 alts after pruning (2 fresh and 0 done)
Merged error: 0.1b
Found 3 expressions with local error:
| 0.2b | (/ x (tan B)) |
| 0.2b | (/ 1 (sin B)) |
| 0.0b | (- (/ 1 (sin B)) (/ x (tan B))) |
| 20× | prod-diff |
| 18× | *-un-lft-identity |
| 17× | add-sqr-sqrt |
| 15× | add-cube-cbrt |
| 13× | div-inv |
| 6× | associate-/r* |
| 5× | add-log-exp |
| 5× | associate-/r/ |
| 5× | tan-quot |
| 4× | add-exp-log |
| 4× | fma-neg |
| 4× | pow1 |
| 3× | log1p-expm1-u |
| 3× | add-cbrt-cube |
| 3× | expm1-log1p-u |
| 2× | distribute-lft-out-- |
| 2× | frac-2neg |
| 2× | clear-num |
| 1× | difference-of-squares |
| 1× | inv-pow |
| 1× | flip-- |
| 1× | pow-flip |
| 1× | frac-sub |
| 1× | diff-log |
| 1× | flip3-- |
| 1× | sub-neg |
| 1× | rec-exp |
| 7.0ms | (- (/ 1 (sin B)) (/ x (tan B))) |
| 1.0ms | (/ 1 (sin B)) |
| 1.0ms | (/ x (tan B)) |
| 128.0ms | (/ x (tan B)) |
| 115.0ms | (- (/ 1 (sin B)) (/ x (tan B))) |
| 22.0ms | (/ 1 (sin B)) |
| 50.0ms | (fma 1 (/ 1 (sin B)) (- (* (/ 1 (tan B)) x))) |
| 50.0ms | (fma 1 (/ 1 (sin B)) (- (* (/ 1 (tan B)) x))) |
| 49.0ms | (fma (* (cbrt (/ 1 (sin B))) (cbrt (/ 1 (sin B)))) (cbrt (/ 1 (sin B))) (- (* (/ 1 (tan B)) x))) |
| 44.0ms | (fma (sqrt (/ 1 (sin B))) (sqrt (/ 1 (sin B))) (- (* (/ 1 (tan B)) x))) |
| 41.0ms | (+ (* 1/6 B) (+ (/ 1 B) (* 7/360 (pow B 3)))) |
10 alts after pruning (10 fresh and 0 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 0.2b | (/ (* x (cos B)) (sin B)) |
| 0.2b | (/ 1 (sin B)) |
| 0.1b | (* x (cos B)) |
| 0.0b | (- (/ 1 (sin B)) (/ (* x (cos B)) (sin B))) |
| 28× | prod-diff |
| 28× | *-un-lft-identity |
| 26× | add-sqr-sqrt |
| 24× | add-cube-cbrt |
| 18× | div-inv |
| 15× | times-frac |
| 7× | add-exp-log |
| 6× | add-log-exp |
| 6× | add-cbrt-cube |
| 6× | associate-/r* |
| 5× | pow1 |
| 4× | log1p-expm1-u |
| 4× | fma-neg |
| 4× | expm1-log1p-u |
| 3× | associate-*r* |
| 2× | distribute-lft-out-- |
| 2× | distribute-rgt-out-- |
| 2× | frac-2neg |
| 2× | clear-num |
| 1× | difference-of-squares |
| 1× | sub-div |
| 1× | inv-pow |
| 1× | associate-/l* |
| 1× | flip-- |
| 1× | pow-flip |
| 1× | frac-sub |
| 1× | *-commutative |
| 1× | div-exp |
| 1× | diff-log |
| 1× | flip3-- |
| 1× | sub-neg |
| 1× | rec-exp |
| 1× | cbrt-undiv |
| 7.0ms | (- (/ 1 (sin B)) (/ (* x (cos B)) (sin B))) |
| 4.0ms | (/ (* x (cos B)) (sin B)) |
| 1.0ms | (* x (cos B)) |
| 1.0ms | (/ 1 (sin B)) |
| 98.0ms | (/ (* x (cos B)) (sin B)) |
| 96.0ms | (- (/ 1 (sin B)) (/ (* x (cos B)) (sin B))) |
| 39.0ms | (* x (cos B)) |
| 14.0ms | (/ 1 (sin B)) |
| 544.0ms | (/ (* (* (* x (cos B)) (* x (cos B))) (* x (cos B))) (* (* (sin B) (sin B)) (sin B))) |
| 470.0ms | (fma (sqrt (/ 1 (sin B))) (sqrt (/ 1 (sin B))) (- (* (/ 1 (sin B)) (* x (cos B))))) |
| 420.0ms | (fma 1 (/ 1 (sin B)) (- (* (/ 1 (sin B)) (* x (cos B))))) |
| 372.0ms | (fma 1 (/ 1 (sin B)) (- (* (/ 1 (sin B)) (* x (cos B))))) |
| 346.0ms | (fma (* (cbrt (/ 1 (sin B))) (cbrt (/ 1 (sin B)))) (cbrt (/ 1 (sin B))) (- (* (/ (cos B) (sqrt (sin B))) (/ x (sqrt (sin B)))))) |
9 alts after pruning (9 fresh and 0 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 0.2b | (/ (* x (cos B)) (sin B)) |
| 0.2b | (/ 1 (sin B)) |
| 0.1b | (* x (cos B)) |
| 0.0b | (- (/ 1 (sin B)) (/ (* x (cos B)) (sin B))) |
| 28× | prod-diff |
| 28× | *-un-lft-identity |
| 26× | add-sqr-sqrt |
| 24× | add-cube-cbrt |
| 18× | div-inv |
| 15× | times-frac |
| 7× | add-exp-log |
| 6× | add-log-exp |
| 6× | add-cbrt-cube |
| 6× | associate-/r* |
| 5× | pow1 |
| 4× | log1p-expm1-u |
| 4× | fma-neg |
| 4× | expm1-log1p-u |
| 3× | associate-*r* |
| 2× | distribute-lft-out-- |
| 2× | distribute-rgt-out-- |
| 2× | frac-2neg |
| 2× | clear-num |
| 1× | difference-of-squares |
| 1× | sub-div |
| 1× | inv-pow |
| 1× | associate-/l* |
| 1× | flip-- |
| 1× | pow-flip |
| 1× | frac-sub |
| 1× | *-commutative |
| 1× | div-exp |
| 1× | diff-log |
| 1× | flip3-- |
| 1× | sub-neg |
| 1× | rec-exp |
| 1× | cbrt-undiv |
| 9.0ms | (- (/ 1 (sin B)) (/ (* x (cos B)) (sin B))) |
| 4.0ms | (/ (* x (cos B)) (sin B)) |
| 1.0ms | (* x (cos B)) |
| 1.0ms | (/ 1 (sin B)) |
| 122.0ms | (/ (* x (cos B)) (sin B)) |
| 112.0ms | (- (/ 1 (sin B)) (/ (* x (cos B)) (sin B))) |
| 35.0ms | (* x (cos B)) |
| 26.0ms | (/ 1 (sin B)) |
| 532.0ms | (/ (* (* (* x (cos B)) (* x (cos B))) (* x (cos B))) (* (* (sin B) (sin B)) (sin B))) |
| 466.0ms | (fma 1 (/ 1 (sin B)) (- (* (/ 1 (sin B)) (* x (cos B))))) |
| 410.0ms | (fma 1 (/ 1 (sin B)) (- (* (/ 1 (sin B)) (* x (cos B))))) |
| 383.0ms | (fma (* (cbrt (/ 1 (sin B))) (cbrt (/ 1 (sin B)))) (cbrt (/ 1 (sin B))) (- (* (/ 1 (sin B)) (* x (cos B))))) |
| 331.0ms | (fma (- (/ 1 (sin B))) (* x (cos B)) (* (/ 1 (sin B)) (* x (cos B)))) |
9 alts after pruning (8 fresh and 1 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 0.3b | (/ 1 (/ (tan B) x)) |
| 0.2b | (/ (tan B) x) |
| 0.2b | (/ 1 (sin B)) |
| 0.0b | (- (/ 1 (sin B)) (/ 1 (/ (tan B) x))) |
| 21× | *-un-lft-identity |
| 20× | prod-diff |
| 19× | add-sqr-sqrt |
| 18× | div-inv |
| 17× | add-cube-cbrt |
| 7× | associate-/r* |
| 6× | add-log-exp |
| 6× | add-exp-log |
| 6× | pow1 |
| 5× | associate-/r/ |
| 4× | distribute-lft-out-- |
| 4× | log1p-expm1-u |
| 4× | fma-neg |
| 4× | add-cbrt-cube |
| 4× | expm1-log1p-u |
| 3× | associate-/l* |
| 3× | frac-2neg |
| 3× | clear-num |
| 2× | inv-pow |
| 2× | pow-flip |
| 2× | rec-exp |
| 1× | associate-/l/ |
| 1× | difference-of-squares |
| 1× | flip-- |
| 1× | frac-sub |
| 1× | tan-quot |
| 1× | diff-log |
| 1× | flip3-- |
| 1× | sub-neg |
| 12.0ms | (- (/ 1 (sin B)) (/ 1 (/ (tan B) x))) |
| 3.0ms | (/ (tan B) x) |
| 1.0ms | (/ 1 (/ (tan B) x)) |
| 1.0ms | (/ 1 (sin B)) |
| 121.0ms | (- (/ 1 (sin B)) (/ 1 (/ (tan B) x))) |
| 106.0ms | (/ 1 (/ (tan B) x)) |
| 45.0ms | (/ (tan B) x) |
| 25.0ms | (/ 1 (sin B)) |
| 132.0ms | (+ (/ B x) (+ (* 1/3 (/ (pow B 3) x)) (* 2/15 (/ (pow B 5) x)))) |
| 100.0ms | (fma (- (/ 1 (/ (tan B) x))) 1 (* (/ 1 (/ (tan B) x)) 1)) |
| 99.0ms | (fma (- (/ 1 (/ (tan B) x))) 1 (* (/ 1 (/ (tan B) x)) 1)) |
| 96.0ms | (fma 1 (/ 1 (sin B)) (- (* (/ 1 (/ (tan B) x)) 1))) |
| 88.0ms | (fma (sqrt (/ 1 (sin B))) (sqrt (/ 1 (sin B))) (- (* x (/ 1 (tan B))))) |
8 alts after pruning (7 fresh and 1 done)
Merged error: 0.0b
0% (0.2b remaining)
Error of 0.2b against oracle of 0.0b and baseline of 0.2b