


Bits error versus x
Results
Initial program 0.3
Taylor expanded around -inf 0.4
Final simplification0.4
herbie shell --seed 2019016 +o rules:numerics
(FPCore (x)
:name "Trigonometry B"
(/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))
Time bar (total: 18.2s)Debug log
| 256× | (pre true 80) |
| 140× | (body real 80) |
| 53× | (body real 1280) |
| 36× | (body real 640) |
| 19× | (body real 320) |
| 8× | (body real 160) |
| 417.0ms | (/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))) |
2 alts after pruning (2 fresh and 0 done)
Merged error: 0.3b
Found 4 expressions with local error:
| 0.3b | (* (tan x) (tan x)) |
| 0.3b | (* (tan x) (tan x)) |
| 0.2b | (- 1 (* (tan x) (tan x))) |
| 0.2b | (/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))) |
| 16× | add-cube-cbrt |
| 16× | *-un-lft-identity |
| 16× | add-sqr-sqrt |
| 14× | pow1 |
| 10× | add-exp-log |
| 10× | add-cbrt-cube |
| 9× | times-frac |
| 8× | tan-quot |
| 6× | associate-*l* |
| 6× | associate-*r* |
| 4× | add-log-exp |
| 4× | log1p-expm1-u |
| 4× | expm1-log1p-u |
| 3× | associate-/l* |
| 3× | associate-/r* |
| 2× | associate-/l/ |
| 2× | flip-- |
| 2× | cbrt-unprod |
| 2× | pow-prod-up |
| 2× | *-commutative |
| 2× | associate-/r/ |
| 2× | associate-*r/ |
| 2× | prod-exp |
| 2× | associate-*l/ |
| 2× | pow-prod-down |
| 2× | flip3-- |
| 2× | pow-plus |
| 2× | frac-times |
| 2× | pow2 |
| 1× | div-inv |
| 1× | flip-+ |
| 1× | div-exp |
| 1× | div-sub |
| 1× | flip3-+ |
| 1× | frac-2neg |
| 1× | sub-neg |
| 1× | clear-num |
| 1× | cbrt-undiv |
| 6.0ms | (/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))) |
| 5.0ms | (* (tan x) (tan x)) |
| 4.0ms | (* (tan x) (tan x)) |
| 1.0ms | (- 1 (* (tan x) (tan x))) |
| 77.0ms | (/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))) |
| 56.0ms | (* (tan x) (tan x)) |
| 26.0ms | (* (tan x) (tan x)) |
| 24.0ms | (- 1 (* (tan x) (tan x))) |
| 550.0ms | (/ (* (* (- 1 (* (tan x) (tan x))) (- 1 (* (tan x) (tan x)))) (- 1 (* (tan x) (tan x)))) (* (* (+ 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))) (+ 1 (* (tan x) (tan x))))) |
| 480.0ms | (+ (* 1 1) (- (* (* (tan x) (tan x)) (* (tan x) (tan x))) (* 1 (* (tan x) (tan x))))) |
| 227.0ms | (/ (- 1 (/ (pow (sin x) 2) (pow (cos x) 2))) (+ (/ (pow (sin x) 2) (pow (cos x) 2)) 1)) |
| 182.0ms | (/ (- 1 (/ (pow (sin x) 2) (pow (cos x) 2))) (+ (/ (pow (sin x) 2) (pow (cos x) 2)) 1)) |
| 83.0ms | (- (pow 1 3) (pow (* (tan x) (tan x)) 3)) |
11 alts after pruning (11 fresh and 0 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 0.5b | (pow (* (tan x) (tan x)) 3) |
| 0.3b | (fma (tan x) (tan x) -1) |
| 0.3b | (* (tan x) (tan x)) |
| 0.3b | (* (tan x) (tan x)) |
| 20× | pow1 |
| 12× | tan-quot |
| 11× | add-exp-log |
| 11× | add-cbrt-cube |
| 8× | add-cube-cbrt |
| 8× | *-un-lft-identity |
| 8× | add-sqr-sqrt |
| 6× | associate-*l* |
| 6× | associate-*r* |
| 5× | pow-pow |
| 4× | add-log-exp |
| 4× | log1p-expm1-u |
| 4× | expm1-log1p-u |
| 3× | cbrt-unprod |
| 3× | pow-prod-up |
| 3× | associate-*r/ |
| 3× | prod-exp |
| 3× | associate-*l/ |
| 3× | pow-prod-down |
| 3× | pow-plus |
| 3× | frac-times |
| 3× | pow2 |
| 3× | cube-div |
| 2× | rem-cube-cbrt |
| 2× | *-commutative |
| 2× | pow-exp |
| 1× | fma-udef |
| 1× | cube-prod |
| 1× | unpow3 |
| 1× | unpow-prod-down |
| 1× | pow-to-exp |
| 1× | cube-mult |
| 8.0ms | (* (tan x) (tan x)) |
| 8.0ms | (* (tan x) (tan x)) |
| 7.0ms | (pow (* (tan x) (tan x)) 3) |
| 0.0ms | (fma (tan x) (tan x) -1) |
| 67.0ms | (pow (* (tan x) (tan x)) 3) |
| 33.0ms | (* (tan x) (tan x)) |
| 31.0ms | (fma (tan x) (tan x) -1) |
| 30.0ms | (* (tan x) (tan x)) |
| 48.0ms | (pow (* (sin x) (tan x)) 3) |
| 47.0ms | (pow (* (tan x) (sin x)) 3) |
| 45.0ms | (- (+ (pow x 2) (* 2/3 (pow x 4))) 1) |
| 38.0ms | (- (/ (pow (sin x) 2) (pow (cos x) 2)) 1) |
| 33.0ms | (- (/ (pow (sin x) 2) (pow (cos x) 2)) 1) |
10 alts after pruning (10 fresh and 0 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 0.3b | (pow (cos x) 2) |
| 0.3b | (pow (cos x) 2) |
| 0.3b | (pow (sin x) 2) |
| 0.3b | (pow (sin x) 2) |
| 12× | unpow-prod-down |
| 8× | add-cube-cbrt |
| 8× | add-exp-log |
| 8× | *-un-lft-identity |
| 8× | pow1 |
| 8× | add-sqr-sqrt |
| 4× | add-log-exp |
| 4× | unpow2 |
| 4× | log1p-expm1-u |
| 4× | pow-exp |
| 4× | add-cbrt-cube |
| 4× | pow-pow |
| 4× | pow-to-exp |
| 4× | expm1-log1p-u |
| 1.0ms | (pow (cos x) 2) |
| 1.0ms | (pow (sin x) 2) |
| 1.0ms | (pow (cos x) 2) |
| 1.0ms | (pow (sin x) 2) |
| 30.0ms | (pow (sin x) 2) |
| 25.0ms | (pow (sin x) 2) |
| 17.0ms | (pow (cos x) 2) |
| 11.0ms | (pow (cos x) 2) |
| 67.0ms | (- (+ (pow x 2) (* 2/45 (pow x 6))) (* 1/3 (pow x 4))) |
| 58.0ms | (- (+ (pow x 2) (* 2/45 (pow x 6))) (* 1/3 (pow x 4))) |
| 45.0ms | (- (+ (* 1/3 (pow x 4)) 1) (pow x 2)) |
| 36.0ms | (- (+ (* 1/3 (pow x 4)) 1) (pow x 2)) |
| 16.0ms | (pow (* (cbrt (sin x)) (cbrt (sin x))) 2) |
11 alts after pruning (10 fresh and 1 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 0.4b | (log (exp (/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))) |
| 0.3b | (* (tan x) (tan x)) |
| 0.3b | (* (tan x) (tan x)) |
| 0.2b | (- 1 (* (tan x) (tan x))) |
| 16× | add-cube-cbrt |
| 16× | log-pow |
| 16× | *-un-lft-identity |
| 16× | add-sqr-sqrt |
| 15× | exp-prod |
| 15× | pow1 |
| 9× | times-frac |
| 8× | add-exp-log |
| 8× | tan-quot |
| 8× | add-cbrt-cube |
| 6× | associate-*l* |
| 6× | associate-*r* |
| 4× | add-log-exp |
| 4× | log1p-expm1-u |
| 4× | expm1-log1p-u |
| 3× | log-prod |
| 2× | cbrt-unprod |
| 2× | pow-prod-up |
| 2× | *-commutative |
| 2× | associate-/r/ |
| 2× | associate-*r/ |
| 2× | prod-exp |
| 2× | associate-*l/ |
| 2× | pow-prod-down |
| 2× | pow-plus |
| 2× | frac-times |
| 2× | pow2 |
| 1× | flip-- |
| 1× | div-inv |
| 1× | flip-+ |
| 1× | rem-log-exp |
| 1× | div-sub |
| 1× | exp-diff |
| 1× | flip3-- |
| 1× | flip3-+ |
| 1× | sub-neg |
| 1× | log-div |
| 8.0ms | (* (tan x) (tan x)) |
| 8.0ms | (* (tan x) (tan x)) |
| 6.0ms | (log (exp (/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))) |
| 2.0ms | (- 1 (* (tan x) (tan x))) |
| 76.0ms | (log (exp (/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))) |
| 39.0ms | (* (tan x) (tan x)) |
| 31.0ms | (- 1 (* (tan x) (tan x))) |
| 25.0ms | (* (tan x) (tan x)) |
| 469.0ms | (+ (* 1 1) (- (* (* (tan x) (tan x)) (* (tan x) (tan x))) (* 1 (* (tan x) (tan x))))) |
| 249.0ms | (/ (- 1 (/ (pow (sin x) 2) (pow (cos x) 2))) (+ (/ (pow (sin x) 2) (pow (cos x) 2)) 1)) |
| 239.0ms | (/ (- 1 (/ (pow (sin x) 2) (pow (cos x) 2))) (+ (/ (pow (sin x) 2) (pow (cos x) 2)) 1)) |
| 72.0ms | (- (+ (* 2/3 (pow x 4)) 1) (* 2 (pow x 2))) |
| 58.0ms | (- 1 (/ (pow (sin x) 2) (pow (cos x) 2))) |
13 alts after pruning (12 fresh and 1 done)
Merged error: 0.0b
0% (0.3b remaining)
Error of 0.4b against oracle of 0.1b and baseline of 0.4b
| 8000× | (pre true 80) |
| 4290× | (body real 80) |
| 1584× | (body real 1280) |
| 1190× | (body real 640) |
| 617× | (body real 320) |
| 319× | (body real 160) |