


Bits error versus F



Bits error versus B



Bits error versus x
if x < -1535735619.0759058Initial program 9.6
Simplified9.5
rmApplied div-inv9.5
rmApplied add-sqr-sqrt9.5
Applied unpow-prod-down9.5
Taylor expanded around inf 0.6
Simplified0.6
if -1535735619.0759058 < x Initial program 14.7
Simplified14.7
rmApplied div-inv14.7
rmApplied tan-quot14.7
Applied associate-/r/14.7
Final simplification13.4
herbie shell --seed 2019010 +o rules:numerics
(FPCore (F B x)
:name "VandenBroeck and Keller, Equation (23)"
(+ (- (* x (/ 1 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2) (* 2 x)) (- (/ 1 2))))))
Time bar (total: 32.7s)Debug log
| 406.0ms | (+ (- (* x (/ 1 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2) (* 2 x)) (- (/ 1 2))))) |
2 alts after pruning (2 fresh and 0 done)
Merged error: 13.6b
Found 4 expressions with local error:
| 17.0b | (pow (fma 2 x (fma F F 2)) -1/2) |
| 6.4b | (fma (pow (fma 2 x (fma F F 2)) -1/2) (/ F (sin B)) (/ (- x) (tan B))) |
| 0.2b | (/ (- x) (tan B)) |
| 0.1b | (/ F (sin B)) |
| 15× | add-cube-cbrt |
| 15× | *-un-lft-identity |
| 15× | add-sqr-sqrt |
| 12× | times-frac |
| 7× | add-exp-log |
| 6× | add-cbrt-cube |
| 6× | associate-/r* |
| 5× | pow1 |
| 4× | add-log-exp |
| 4× | associate-/l* |
| 4× | log1p-expm1-u |
| 4× | neg-mul-1 |
| 4× | expm1-log1p-u |
| 3× | unpow-prod-down |
| 2× | div-inv |
| 2× | frac-2neg |
| 2× | clear-num |
| 1× | fma-udef |
| 1× | associate-/r/ |
| 1× | distribute-frac-neg |
| 1× | tan-quot |
| 1× | pow-exp |
| 1× | div-exp |
| 1× | div-sub |
| 1× | pow-pow |
| 1× | cbrt-undiv |
| 1× | pow-to-exp |
| 1× | neg-sub0 |
| 7.0ms | (/ (- x) (tan B)) |
| 6.0ms | (pow (fma 2 x (fma F F 2)) -1/2) |
| 1.0ms | (/ F (sin B)) |
| 0.0ms | (fma (pow (fma 2 x (fma F F 2)) -1/2) (/ F (sin B)) (/ (- x) (tan B))) |
| 245.0ms | (fma (pow (fma 2 x (fma F F 2)) -1/2) (/ F (sin B)) (/ (- x) (tan B))) |
| 239.0ms | (pow (fma 2 x (fma F F 2)) -1/2) |
| 127.0ms | (/ (- x) (tan B)) |
| 50.0ms | (/ F (sin B)) |
| 233.0ms | (- (/ (* F (sqrt 1/2)) B) (+ (/ x B) (/ (* x (* F (sqrt 1/8))) B))) |
| 225.0ms | (- (/ (* F (exp (* -1/2 (- (log 2) (log (/ 1 x)))))) (sin B)) (+ (/ (* x (cos B)) (sin B)) (* 1/2 (/ (* F (exp (* -1/2 (- (log 2) (log (/ 1 x)))))) (* x (sin B)))))) |
| 221.0ms | (- (/ (* (exp (* -1/2 (- (log -2) (log (/ -1 x))))) F) (sin B)) (+ (/ (* x (cos B)) (sin B)) (* 1/2 (/ (* (exp (* -1/2 (- (log -2) (log (/ -1 x))))) F) (* x (sin B)))))) |
| 206.0ms | (- (+ (* 3/8 (/ (exp (* -1/2 (- (log 2) (log (/ 1 x))))) (pow x 2))) (exp (* -1/2 (- (log 2) (log (/ 1 x)))))) (* 1/2 (/ (exp (* -1/2 (- (log 2) (log (/ 1 x))))) x))) |
| 199.0ms | (- (+ (exp (* -1/2 (- (log -2) (log (/ -1 x))))) (* 3/8 (/ (exp (* -1/2 (- (log -2) (log (/ -1 x))))) (pow x 2)))) (* 1/2 (/ (exp (* -1/2 (- (log -2) (log (/ -1 x))))) x))) |
16 alts after pruning (16 fresh and 0 done)
Merged error: 13.0b
Found 4 expressions with local error:
| 17.0b | (pow (fma 2 x (fma F F 2)) -1/2) |
| 6.4b | (fma (pow (fma 2 x (fma F F 2)) -1/2) (* F (/ 1 (sin B))) (/ (- x) (tan B))) |
| 0.2b | (* F (/ 1 (sin B))) |
| 0.2b | (/ (- x) (tan B)) |
| 15× | add-cube-cbrt |
| 15× | *-un-lft-identity |
| 15× | add-sqr-sqrt |
| 12× | times-frac |
| 7× | add-exp-log |
| 6× | add-cbrt-cube |
| 5× | pow1 |
| 4× | add-log-exp |
| 4× | associate-/l* |
| 4× | log1p-expm1-u |
| 4× | associate-*r* |
| 4× | neg-mul-1 |
| 4× | expm1-log1p-u |
| 3× | unpow-prod-down |
| 3× | associate-/r* |
| 2× | div-inv |
| 1× | fma-udef |
| 1× | *-commutative |
| 1× | un-div-inv |
| 1× | associate-/r/ |
| 1× | distribute-frac-neg |
| 1× | associate-*r/ |
| 1× | tan-quot |
| 1× | pow-exp |
| 1× | div-exp |
| 1× | div-sub |
| 1× | frac-2neg |
| 1× | pow-pow |
| 1× | clear-num |
| 1× | cbrt-undiv |
| 1× | pow-to-exp |
| 1× | neg-sub0 |
| 6.0ms | (/ (- x) (tan B)) |
| 2.0ms | (pow (fma 2 x (fma F F 2)) -1/2) |
| 2.0ms | (* F (/ 1 (sin B))) |
| 0.0ms | (fma (pow (fma 2 x (fma F F 2)) -1/2) (* F (/ 1 (sin B))) (/ (- x) (tan B))) |
| 227.0ms | (pow (fma 2 x (fma F F 2)) -1/2) |
| 202.0ms | (fma (pow (fma 2 x (fma F F 2)) -1/2) (* F (/ 1 (sin B))) (/ (- x) (tan B))) |
| 117.0ms | (/ (- x) (tan B)) |
| 68.0ms | (* F (/ 1 (sin B))) |
| 288.0ms | (- (/ (* (exp (* -1/2 (- (log -2) (log (/ -1 x))))) F) (sin B)) (+ (/ (* x (cos B)) (sin B)) (* 1/2 (/ (* (exp (* -1/2 (- (log -2) (log (/ -1 x))))) F) (* x (sin B)))))) |
| 263.0ms | (- (/ (* F (exp (* -1/2 (- (log 2) (log (/ 1 x)))))) (sin B)) (+ (/ (* x (cos B)) (sin B)) (* 1/2 (/ (* F (exp (* -1/2 (- (log 2) (log (/ 1 x)))))) (* x (sin B)))))) |
| 246.0ms | (- (/ (* F (sqrt 1/2)) B) (+ (/ x B) (/ (* x (* F (sqrt 1/8))) B))) |
| 234.0ms | (- (+ (* 3/8 (/ (exp (* -1/2 (- (log 2) (log (/ 1 x))))) (pow x 2))) (exp (* -1/2 (- (log 2) (log (/ 1 x)))))) (* 1/2 (/ (exp (* -1/2 (- (log 2) (log (/ 1 x))))) x))) |
| 200.0ms | (- (+ (exp (* -1/2 (- (log -2) (log (/ -1 x))))) (* 3/8 (/ (exp (* -1/2 (- (log -2) (log (/ -1 x))))) (pow x 2)))) (* 1/2 (/ (exp (* -1/2 (- (log -2) (log (/ -1 x))))) x))) |
16 alts after pruning (16 fresh and 0 done)
Merged error: 13.0b
Found 4 expressions with local error:
| 17.0b | (pow (fma 2 x (fma F F 2)) -1/2) |
| 6.4b | (fma (pow (fma 2 x (fma F F 2)) -1/2) (* F (/ 1 (sin B))) (* (/ (- x) (sin B)) (cos B))) |
| 0.2b | (* F (/ 1 (sin B))) |
| 0.2b | (* (/ (- x) (sin B)) (cos B)) |
| 16× | associate-*l* |
| 15× | add-cube-cbrt |
| 15× | *-un-lft-identity |
| 15× | add-sqr-sqrt |
| 12× | times-frac |
| 10× | add-exp-log |
| 9× | add-cbrt-cube |
| 7× | associate-*r* |
| 7× | pow1 |
| 4× | add-log-exp |
| 4× | log1p-expm1-u |
| 4× | expm1-log1p-u |
| 3× | unpow-prod-down |
| 3× | neg-mul-1 |
| 2× | div-inv |
| 2× | cbrt-unprod |
| 2× | *-commutative |
| 2× | prod-exp |
| 1× | fma-udef |
| 1× | un-div-inv |
| 1× | distribute-frac-neg |
| 1× | associate-*r/ |
| 1× | pow-exp |
| 1× | associate-*l/ |
| 1× | pow-prod-down |
| 1× | div-exp |
| 1× | pow-pow |
| 1× | cbrt-undiv |
| 1× | pow-to-exp |
| 1× | distribute-lft-neg-out |
| 12.0ms | (* (/ (- x) (sin B)) (cos B)) |
| 2.0ms | (pow (fma 2 x (fma F F 2)) -1/2) |
| 2.0ms | (* F (/ 1 (sin B))) |
| 0.0ms | (fma (pow (fma 2 x (fma F F 2)) -1/2) (* F (/ 1 (sin B))) (* (/ (- x) (sin B)) (cos B))) |
| 202.0ms | (fma (pow (fma 2 x (fma F F 2)) -1/2) (* F (/ 1 (sin B))) (* (/ (- x) (sin B)) (cos B))) |
| 195.0ms | (pow (fma 2 x (fma F F 2)) -1/2) |
| 126.0ms | (* (/ (- x) (sin B)) (cos B)) |
| 54.0ms | (* F (/ 1 (sin B))) |
| 354.0ms | (* (* (* (/ (- x) (sin B)) (/ (- x) (sin B))) (/ (- x) (sin B))) (* (* (cos B) (cos B)) (cos B))) |
| 279.0ms | (- (/ (* (exp (* -1/2 (- (log -2) (log (/ -1 x))))) F) (sin B)) (+ (/ (* x (cos B)) (sin B)) (* 1/2 (/ (* (exp (* -1/2 (- (log -2) (log (/ -1 x))))) F) (* x (sin B)))))) |
| 267.0ms | (- (+ (exp (* -1/2 (- (log -2) (log (/ -1 x))))) (* 3/8 (/ (exp (* -1/2 (- (log -2) (log (/ -1 x))))) (pow x 2)))) (* 1/2 (/ (exp (* -1/2 (- (log -2) (log (/ -1 x))))) x))) |
| 226.0ms | (- (/ (* F (sqrt 1/2)) B) (+ (/ x B) (/ (* x (* F (sqrt 1/8))) B))) |
| 196.0ms | (- (/ (* F (exp (* -1/2 (- (log 2) (log (/ 1 x)))))) (sin B)) (+ (/ (* x (cos B)) (sin B)) (* 1/2 (/ (* F (exp (* -1/2 (- (log 2) (log (/ 1 x)))))) (* x (sin B)))))) |
16 alts after pruning (15 fresh and 1 done)
Merged error: 13.0b
Found 4 expressions with local error:
| 17.0b | (sqrt (fma 2 x (fma F F 2))) |
| 17.0b | (sqrt (fma 2 x (fma F F 2))) |
| 6.4b | (fma (* (pow (sqrt (fma 2 x (fma F F 2))) -1/2) (pow (sqrt (fma 2 x (fma F F 2))) -1/2)) (* F (/ 1 (sin B))) (/ (- x) (tan B))) |
| 0.6b | (* (pow (sqrt (fma 2 x (fma F F 2))) -1/2) (pow (sqrt (fma 2 x (fma F F 2))) -1/2)) |
| 16× | add-exp-log |
| 14× | add-sqr-sqrt |
| 12× | sqrt-prod |
| 12× | add-cube-cbrt |
| 12× | *-un-lft-identity |
| 12× | unpow-prod-down |
| 9× | prod-exp |
| 9× | associate-*l* |
| 9× | associate-*r* |
| 6× | pow-exp |
| 6× | add-cbrt-cube |
| 6× | pow-to-exp |
| 4× | add-log-exp |
| 4× | log1p-expm1-u |
| 4× | pow1 |
| 4× | expm1-log1p-u |
| 2× | pow1/2 |
| 2× | rem-sqrt-square |
| 1× | fma-udef |
| 1× | cbrt-unprod |
| 1× | pow-prod-up |
| 1× | *-commutative |
| 1× | pow-prod-down |
| 1× | pow2 |
| 15.0ms | (* (pow (sqrt (fma 2 x (fma F F 2))) -1/2) (pow (sqrt (fma 2 x (fma F F 2))) -1/2)) |
| 2.0ms | (sqrt (fma 2 x (fma F F 2))) |
| 2.0ms | (sqrt (fma 2 x (fma F F 2))) |
| 0.0ms | (fma (* (pow (sqrt (fma 2 x (fma F F 2))) -1/2) (pow (sqrt (fma 2 x (fma F F 2))) -1/2)) (* F (/ 1 (sin B))) (/ (- x) (tan B))) |
| 212.0ms | (fma (* (pow (sqrt (fma 2 x (fma F F 2))) -1/2) (pow (sqrt (fma 2 x (fma F F 2))) -1/2)) (* F (/ 1 (sin B))) (/ (- x) (tan B))) |
| 59.0ms | (sqrt (fma 2 x (fma F F 2))) |
| 55.0ms | (* (pow (sqrt (fma 2 x (fma F F 2))) -1/2) (pow (sqrt (fma 2 x (fma F F 2))) -1/2)) |
| 52.0ms | (sqrt (fma 2 x (fma F F 2))) |
| 247.0ms | (- (/ (* F (sqrt 1/2)) B) (+ (/ x B) (/ (* x (* F (sqrt 1/8))) B))) |
| 159.0ms | (- (+ (sqrt 2) (* x (sqrt 1/2))) (* 1/2 (* (pow x 2) (sqrt 1/8)))) |
| 157.0ms | (- (+ (sqrt 2) (* x (sqrt 1/2))) (* 1/2 (* (pow x 2) (sqrt 1/8)))) |
| 145.0ms | (- (+ (* 3/2 (* (sqrt 1/32) (pow x 2))) (sqrt 1/2)) (* x (sqrt 1/8))) |
| 86.0ms | (* -1 (/ (* x (cos B)) (sin B))) |
16 alts after pruning (15 fresh and 1 done)
Merged error: 10.5b
37.5% (1.3b remaining)
Error of 13.4b against oracle of 12.1b and baseline of 14.2b