


Bits error versus x
if x < -0.02690561339729299Initial program 0.0
rmApplied div-sub0.0
if -0.02690561339729299 < x < 0.02908726170359111Initial program 62.7
Taylor expanded around 0 0.0
Simplified0.0
if 0.02908726170359111 < x Initial program 0.1
rmApplied div-sub0.1
rmApplied div-inv0.2
Applied fma-neg0.2
rmApplied add-log-exp0.1
Final simplification0.0
herbie shell --seed 2019016 +o rules:numerics
(FPCore (x)
:name "sintan (problem 3.4.5)"
(/ (- x (sin x)) (- x (tan x))))
Time bar (total: 1.0m)Debug log
| 256× | (pre true 80) |
| 95× | (body real 1280) |
| 54× | (body real 640) |
| 47× | (body real 2560) |
| 32× | (body real 320) |
| 14× | (body real 80) |
| 14× | (body real 160) |
| 26.0ms | (/ (- x (sin x)) (- x (tan x))) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 30.8b
Found 3 expressions with local error:
| 1.6b | (- x (sin x)) |
| 1.6b | (- x (tan x)) |
| 0.0b | (/ (- x (sin x)) (- x (tan x))) |
| 11× | add-cube-cbrt |
| 11× | *-un-lft-identity |
| 11× | add-sqr-sqrt |
| 9× | times-frac |
| 5× | add-exp-log |
| 5× | add-cbrt-cube |
| 4× | flip-- |
| 4× | flip3-- |
| 3× | add-log-exp |
| 3× | associate-/l* |
| 3× | log1p-expm1-u |
| 3× | associate-/r* |
| 3× | pow1 |
| 3× | expm1-log1p-u |
| 2× | associate-/l/ |
| 2× | associate-/r/ |
| 2× | sub-neg |
| 1× | div-inv |
| 1× | div-exp |
| 1× | div-sub |
| 1× | frac-2neg |
| 1× | clear-num |
| 1× | cbrt-undiv |
| 7.0ms | (/ (- x (sin x)) (- x (tan x))) |
| 3.0ms | (- x (sin x)) |
| 1.0ms | (- x (tan x)) |
| 120.0ms | (/ (- x (sin x)) (- x (tan x))) |
| 92.0ms | (- x (tan x)) |
| 64.0ms | (- x (sin x)) |
| 286.0ms | (- (+ 1 (+ (/ (pow (sin x) 2) (* (pow (cos x) 2) (pow x 2))) (/ (sin x) (* (cos x) x)))) (+ (/ (sin x) x) (/ (pow (sin x) 2) (* (cos x) (pow x 2))))) |
| 265.0ms | (- (+ 1 (+ (/ (pow (sin x) 2) (* (pow (cos x) 2) (pow x 2))) (/ (sin x) (* (cos x) x)))) (+ (/ (sin x) x) (/ (pow (sin x) 2) (* (cos x) (pow x 2))))) |
| 213.0ms | (/ (* (* (- x (sin x)) (- x (sin x))) (- x (sin x))) (* (* (- x (tan x)) (- x (tan x))) (- x (tan x)))) |
| 207.0ms | (- (+ (* 1/3 (pow x 3)) (+ (* 2/15 (pow x 5)) (* 17/315 (pow x 7))))) |
| 87.0ms | (- (+ (* 1/6 (pow x 3)) (* 1/5040 (pow x 7))) (* 1/120 (pow x 5))) |
3 alts after pruning (3 fresh and 0 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 1.6b | (- x (tan x)) |
| 1.6b | (- x (tan x)) |
| 1.3b | (- (/ x (- x (tan x))) (/ (sin x) (- x (tan x)))) |
| 0.1b | (/ (sin x) (- x (tan x))) |
| 90× | prod-diff |
| 75× | add-sqr-sqrt |
| 72× | *-un-lft-identity |
| 70× | add-cube-cbrt |
| 64× | times-frac |
| 50× | associate-/r/ |
| 28× | flip-- |
| 28× | flip3-- |
| 25× | div-inv |
| 6× | add-log-exp |
| 6× | add-exp-log |
| 6× | fma-neg |
| 6× | add-cbrt-cube |
| 4× | log1p-expm1-u |
| 4× | pow1 |
| 4× | expm1-log1p-u |
| 3× | associate-/l* |
| 3× | distribute-rgt-out-- |
| 3× | sub-neg |
| 3× | associate-/r* |
| 2× | difference-of-squares |
| 1× | sub-div |
| 1× | distribute-lft-out-- |
| 1× | frac-sub |
| 1× | div-exp |
| 1× | diff-log |
| 1× | frac-2neg |
| 1× | clear-num |
| 1× | cbrt-undiv |
| 17.0ms | (- (/ x (- x (tan x))) (/ (sin x) (- x (tan x)))) |
| 7.0ms | (/ (sin x) (- x (tan x))) |
| 1.0ms | (- x (tan x)) |
| 1.0ms | (- x (tan x)) |
| 247.0ms | (- (/ x (- x (tan x))) (/ (sin x) (- x (tan x)))) |
| 77.0ms | (/ (sin x) (- x (tan x))) |
| 70.0ms | (- x (tan x)) |
| 69.0ms | (- x (tan x)) |
| 714.0ms | (fma (/ x (- (* x x) (* (tan x) (tan x)))) (+ x (tan x)) (- (* (/ (sin x) (- x (tan x))) (/ 1 1)))) |
| 681.0ms | (fma (/ x (- (pow x 3) (pow (tan x) 3))) (+ (* x x) (+ (* (tan x) (tan x)) (* x (tan x)))) (- (* (cbrt (/ (sin x) (- x (tan x)))) (* (cbrt (/ (sin x) (- x (tan x)))) (cbrt (/ (sin x) (- x (tan x)))))))) |
| 567.0ms | (fma (/ x (- (* x x) (* (tan x) (tan x)))) (+ x (tan x)) (- (* (/ (sin x) (- x (tan x))) 1))) |
| 493.0ms | (fma x (/ 1 (- x (tan x))) (- (* (/ (cbrt (sin x)) (- x (tan x))) (/ (* (cbrt (sin x)) (cbrt (sin x))) 1)))) |
| 485.0ms | (fma (sqrt (/ x (- x (tan x)))) (sqrt (/ x (- x (tan x)))) (- (* (/ (sin x) (cbrt (- x (tan x)))) (/ 1 (* (cbrt (- x (tan x))) (cbrt (- x (tan x)))))))) |
4 alts after pruning (3 fresh and 1 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 1.6b | (fma x (/ 1 (- x (tan x))) (- (/ (sin x) (- x (tan x))))) |
| 1.6b | (- x (tan x)) |
| 1.6b | (- x (tan x)) |
| 0.1b | (/ (sin x) (- x (tan x))) |
| 12× | add-cube-cbrt |
| 12× | *-un-lft-identity |
| 12× | add-sqr-sqrt |
| 9× | times-frac |
| 6× | add-exp-log |
| 6× | add-cbrt-cube |
| 4× | add-log-exp |
| 4× | log1p-expm1-u |
| 4× | pow1 |
| 4× | expm1-log1p-u |
| 3× | associate-/l* |
| 3× | flip-- |
| 3× | flip3-- |
| 3× | associate-/r* |
| 2× | associate-/r/ |
| 2× | sub-neg |
| 1× | div-inv |
| 1× | fma-udef |
| 1× | div-exp |
| 1× | frac-2neg |
| 1× | clear-num |
| 1× | cbrt-undiv |
| 8.0ms | (/ (sin x) (- x (tan x))) |
| 1.0ms | (- x (tan x)) |
| 1.0ms | (- x (tan x)) |
| 0.0ms | (fma x (/ 1 (- x (tan x))) (- (/ (sin x) (- x (tan x))))) |
| 355.0ms | (fma x (/ 1 (- x (tan x))) (- (/ (sin x) (- x (tan x))))) |
| 66.0ms | (/ (sin x) (- x (tan x))) |
| 51.0ms | (- x (tan x)) |
| 47.0ms | (- x (tan x)) |
| 394.0ms | (/ (* (* (sin x) (sin x)) (sin x)) (* (* (- x (tan x)) (- x (tan x))) (- x (tan x)))) |
| 257.0ms | (- (+ (* 1/3 (pow x 3)) (+ (* 2/15 (pow x 5)) (* 17/315 (pow x 7))))) |
| 245.0ms | (- (+ 1 (+ (/ (pow (sin x) 2) (* (pow (cos x) 2) (pow x 2))) (/ (sin x) (* (cos x) x)))) (+ (/ (sin x) x) (/ (pow (sin x) 2) (* (cos x) (pow x 2))))) |
| 240.0ms | (- (+ 1 (+ (/ (pow (sin x) 2) (* (pow (cos x) 2) (pow x 2))) (/ (sin x) (* (cos x) x)))) (+ (/ (sin x) x) (/ (pow (sin x) 2) (* (cos x) (pow x 2))))) |
| 213.0ms | (+ (/ (pow (sin x) 2) (* (cos x) (pow x 2))) (+ (/ (pow (sin x) 3) (* (pow (cos x) 2) (pow x 3))) (/ (sin x) x))) |
4 alts after pruning (3 fresh and 1 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 1.6b | (fma x (/ 1 (- x (tan x))) (- (/ (sin x) (- x (tan x))))) |
| 1.6b | (- x (tan x)) |
| 1.6b | (- x (tan x)) |
| 0.1b | (/ (sin x) (- x (tan x))) |
| 12× | add-cube-cbrt |
| 12× | *-un-lft-identity |
| 12× | add-sqr-sqrt |
| 9× | times-frac |
| 6× | add-exp-log |
| 6× | add-cbrt-cube |
| 4× | add-log-exp |
| 4× | log1p-expm1-u |
| 4× | pow1 |
| 4× | expm1-log1p-u |
| 3× | associate-/l* |
| 3× | flip-- |
| 3× | flip3-- |
| 3× | associate-/r* |
| 2× | associate-/r/ |
| 2× | sub-neg |
| 1× | div-inv |
| 1× | fma-udef |
| 1× | div-exp |
| 1× | frac-2neg |
| 1× | clear-num |
| 1× | cbrt-undiv |
| 3.0ms | (/ (sin x) (- x (tan x))) |
| 0.0ms | (- x (tan x)) |
| 0.0ms | (- x (tan x)) |
| 0.0ms | (fma x (/ 1 (- x (tan x))) (- (/ (sin x) (- x (tan x))))) |
| 281.0ms | (fma x (/ 1 (- x (tan x))) (- (/ (sin x) (- x (tan x))))) |
| 67.0ms | (/ (sin x) (- x (tan x))) |
| 49.0ms | (- x (tan x)) |
| 47.0ms | (- x (tan x)) |
| 376.0ms | (/ (* (* (sin x) (sin x)) (sin x)) (* (* (- x (tan x)) (- x (tan x))) (- x (tan x)))) |
| 278.0ms | (- (+ 1 (+ (/ (pow (sin x) 2) (* (pow (cos x) 2) (pow x 2))) (/ (sin x) (* (cos x) x)))) (+ (/ (sin x) x) (/ (pow (sin x) 2) (* (cos x) (pow x 2))))) |
| 265.0ms | (- (+ (* 1/3 (pow x 3)) (+ (* 2/15 (pow x 5)) (* 17/315 (pow x 7))))) |
| 231.0ms | (- (+ 1 (+ (/ (pow (sin x) 2) (* (pow (cos x) 2) (pow x 2))) (/ (sin x) (* (cos x) x)))) (+ (/ (sin x) x) (/ (pow (sin x) 2) (* (cos x) (pow x 2))))) |
| 229.0ms | (- (+ (* 1/3 (pow x 3)) (+ (* 2/15 (pow x 5)) (* 17/315 (pow x 7))))) |
4 alts after pruning (2 fresh and 2 done)
Merged error: 0.0b
100% (0.0b remaining)
Error of 0.0b against oracle of 0.0b and baseline of 31.0b
| 8000× | (pre true 80) |
| 2820× | (body real 1280) |
| 1826× | (body real 640) |
| 1594× | (body real 2560) |
| 897× | (body real 320) |
| 485× | (body real 160) |
| 378× | (body real 80) |