Average Error: 36.6 → 15.3
Time: 1.4m
Precision: 64
Internal Precision: 128
\[\tan \left(x + \varepsilon\right) - \tan x\]
\[\begin{array}{l} \mathbf{if}\;\varepsilon \le -2.6387393587202694 \cdot 10^{-37}:\\ \;\;\;\;\left(\frac{\tan \varepsilon + \tan x}{1 - {\left(\log \left(e^{\tan x \cdot \tan \varepsilon}\right)\right)}^{3}} \cdot \left(\left(\tan x \cdot \tan \varepsilon\right) \cdot \left(\tan x \cdot \tan \varepsilon\right)\right) - \tan x\right) + \frac{\tan \varepsilon + \tan x}{1 - {\left(\log \left(e^{\tan x \cdot \tan \varepsilon}\right)\right)}^{3}} \cdot \left(1 + \tan x \cdot \tan \varepsilon\right)\\ \mathbf{elif}\;\varepsilon \le 5.782469297289403 \cdot 10^{-19}:\\ \;\;\;\;\left(x \cdot \varepsilon\right) \cdot \left(x + \varepsilon\right) + \varepsilon\\ \mathbf{else}:\\ \;\;\;\;\left(\left(1 + \tan x \cdot \tan \varepsilon\right) + \left(\tan x \cdot \tan \varepsilon\right) \cdot \left(\tan x \cdot \tan \varepsilon\right)\right) \cdot \frac{\tan \varepsilon + \tan x}{1 - {\left(\tan x\right)}^{3} \cdot \left(\tan \varepsilon \cdot \left(\tan \varepsilon \cdot \tan \varepsilon\right)\right)} - \tan x\\ \end{array}\]

Error

Bits error versus x

Bits error versus eps

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original36.6
Target14.9
Herbie15.3
\[\frac{\sin \varepsilon}{\cos x \cdot \cos \left(x + \varepsilon\right)}\]

Derivation

  1. Split input into 3 regimes
  2. if eps < -2.6387393587202694e-37

    1. Initial program 29.7

      \[\tan \left(x + \varepsilon\right) - \tan x\]
    2. Using strategy rm
    3. Applied tan-sum2.5

      \[\leadsto \color{blue}{\frac{\tan x + \tan \varepsilon}{1 - \tan x \cdot \tan \varepsilon}} - \tan x\]
    4. Using strategy rm
    5. Applied flip3--2.5

      \[\leadsto \frac{\tan x + \tan \varepsilon}{\color{blue}{\frac{{1}^{3} - {\left(\tan x \cdot \tan \varepsilon\right)}^{3}}{1 \cdot 1 + \left(\left(\tan x \cdot \tan \varepsilon\right) \cdot \left(\tan x \cdot \tan \varepsilon\right) + 1 \cdot \left(\tan x \cdot \tan \varepsilon\right)\right)}}} - \tan x\]
    6. Applied associate-/r/2.5

      \[\leadsto \color{blue}{\frac{\tan x + \tan \varepsilon}{{1}^{3} - {\left(\tan x \cdot \tan \varepsilon\right)}^{3}} \cdot \left(1 \cdot 1 + \left(\left(\tan x \cdot \tan \varepsilon\right) \cdot \left(\tan x \cdot \tan \varepsilon\right) + 1 \cdot \left(\tan x \cdot \tan \varepsilon\right)\right)\right)} - \tan x\]
    7. Simplified2.5

      \[\leadsto \frac{\tan x + \tan \varepsilon}{{1}^{3} - {\left(\tan x \cdot \tan \varepsilon\right)}^{3}} \cdot \color{blue}{\left(\left(1 + \tan \varepsilon \cdot \tan x\right) + \left(\tan \varepsilon \cdot \tan x\right) \cdot \left(\tan \varepsilon \cdot \tan x\right)\right)} - \tan x\]
    8. Using strategy rm
    9. Applied add-log-exp2.7

      \[\leadsto \frac{\tan x + \tan \varepsilon}{{1}^{3} - {\color{blue}{\left(\log \left(e^{\tan x \cdot \tan \varepsilon}\right)\right)}}^{3}} \cdot \left(\left(1 + \tan \varepsilon \cdot \tan x\right) + \left(\tan \varepsilon \cdot \tan x\right) \cdot \left(\tan \varepsilon \cdot \tan x\right)\right) - \tan x\]
    10. Using strategy rm
    11. Applied distribute-lft-in2.7

      \[\leadsto \color{blue}{\left(\frac{\tan x + \tan \varepsilon}{{1}^{3} - {\left(\log \left(e^{\tan x \cdot \tan \varepsilon}\right)\right)}^{3}} \cdot \left(1 + \tan \varepsilon \cdot \tan x\right) + \frac{\tan x + \tan \varepsilon}{{1}^{3} - {\left(\log \left(e^{\tan x \cdot \tan \varepsilon}\right)\right)}^{3}} \cdot \left(\left(\tan \varepsilon \cdot \tan x\right) \cdot \left(\tan \varepsilon \cdot \tan x\right)\right)\right)} - \tan x\]
    12. Applied associate--l+2.7

      \[\leadsto \color{blue}{\frac{\tan x + \tan \varepsilon}{{1}^{3} - {\left(\log \left(e^{\tan x \cdot \tan \varepsilon}\right)\right)}^{3}} \cdot \left(1 + \tan \varepsilon \cdot \tan x\right) + \left(\frac{\tan x + \tan \varepsilon}{{1}^{3} - {\left(\log \left(e^{\tan x \cdot \tan \varepsilon}\right)\right)}^{3}} \cdot \left(\left(\tan \varepsilon \cdot \tan x\right) \cdot \left(\tan \varepsilon \cdot \tan x\right)\right) - \tan x\right)}\]

    if -2.6387393587202694e-37 < eps < 5.782469297289403e-19

    1. Initial program 45.4

      \[\tan \left(x + \varepsilon\right) - \tan x\]
    2. Using strategy rm
    3. Applied tan-sum45.4

      \[\leadsto \color{blue}{\frac{\tan x + \tan \varepsilon}{1 - \tan x \cdot \tan \varepsilon}} - \tan x\]
    4. Using strategy rm
    5. Applied flip3--45.4

      \[\leadsto \frac{\tan x + \tan \varepsilon}{\color{blue}{\frac{{1}^{3} - {\left(\tan x \cdot \tan \varepsilon\right)}^{3}}{1 \cdot 1 + \left(\left(\tan x \cdot \tan \varepsilon\right) \cdot \left(\tan x \cdot \tan \varepsilon\right) + 1 \cdot \left(\tan x \cdot \tan \varepsilon\right)\right)}}} - \tan x\]
    6. Applied associate-/r/45.4

      \[\leadsto \color{blue}{\frac{\tan x + \tan \varepsilon}{{1}^{3} - {\left(\tan x \cdot \tan \varepsilon\right)}^{3}} \cdot \left(1 \cdot 1 + \left(\left(\tan x \cdot \tan \varepsilon\right) \cdot \left(\tan x \cdot \tan \varepsilon\right) + 1 \cdot \left(\tan x \cdot \tan \varepsilon\right)\right)\right)} - \tan x\]
    7. Simplified45.4

      \[\leadsto \frac{\tan x + \tan \varepsilon}{{1}^{3} - {\left(\tan x \cdot \tan \varepsilon\right)}^{3}} \cdot \color{blue}{\left(\left(1 + \tan \varepsilon \cdot \tan x\right) + \left(\tan \varepsilon \cdot \tan x\right) \cdot \left(\tan \varepsilon \cdot \tan x\right)\right)} - \tan x\]
    8. Taylor expanded around 0 31.3

      \[\leadsto \color{blue}{x \cdot {\varepsilon}^{2} + \left(\varepsilon + {x}^{2} \cdot \varepsilon\right)}\]
    9. Simplified31.2

      \[\leadsto \color{blue}{\varepsilon + \left(x \cdot \varepsilon\right) \cdot \left(\varepsilon + x\right)}\]

    if 5.782469297289403e-19 < eps

    1. Initial program 29.0

      \[\tan \left(x + \varepsilon\right) - \tan x\]
    2. Using strategy rm
    3. Applied tan-sum1.0

      \[\leadsto \color{blue}{\frac{\tan x + \tan \varepsilon}{1 - \tan x \cdot \tan \varepsilon}} - \tan x\]
    4. Using strategy rm
    5. Applied flip3--1.1

      \[\leadsto \frac{\tan x + \tan \varepsilon}{\color{blue}{\frac{{1}^{3} - {\left(\tan x \cdot \tan \varepsilon\right)}^{3}}{1 \cdot 1 + \left(\left(\tan x \cdot \tan \varepsilon\right) \cdot \left(\tan x \cdot \tan \varepsilon\right) + 1 \cdot \left(\tan x \cdot \tan \varepsilon\right)\right)}}} - \tan x\]
    6. Applied associate-/r/1.1

      \[\leadsto \color{blue}{\frac{\tan x + \tan \varepsilon}{{1}^{3} - {\left(\tan x \cdot \tan \varepsilon\right)}^{3}} \cdot \left(1 \cdot 1 + \left(\left(\tan x \cdot \tan \varepsilon\right) \cdot \left(\tan x \cdot \tan \varepsilon\right) + 1 \cdot \left(\tan x \cdot \tan \varepsilon\right)\right)\right)} - \tan x\]
    7. Simplified1.1

      \[\leadsto \frac{\tan x + \tan \varepsilon}{{1}^{3} - {\left(\tan x \cdot \tan \varepsilon\right)}^{3}} \cdot \color{blue}{\left(\left(1 + \tan \varepsilon \cdot \tan x\right) + \left(\tan \varepsilon \cdot \tan x\right) \cdot \left(\tan \varepsilon \cdot \tan x\right)\right)} - \tan x\]
    8. Using strategy rm
    9. Applied add-cbrt-cube1.2

      \[\leadsto \frac{\tan x + \tan \varepsilon}{{1}^{3} - {\left(\tan x \cdot \color{blue}{\sqrt[3]{\left(\tan \varepsilon \cdot \tan \varepsilon\right) \cdot \tan \varepsilon}}\right)}^{3}} \cdot \left(\left(1 + \tan \varepsilon \cdot \tan x\right) + \left(\tan \varepsilon \cdot \tan x\right) \cdot \left(\tan \varepsilon \cdot \tan x\right)\right) - \tan x\]
    10. Applied add-cbrt-cube1.2

      \[\leadsto \frac{\tan x + \tan \varepsilon}{{1}^{3} - {\left(\color{blue}{\sqrt[3]{\left(\tan x \cdot \tan x\right) \cdot \tan x}} \cdot \sqrt[3]{\left(\tan \varepsilon \cdot \tan \varepsilon\right) \cdot \tan \varepsilon}\right)}^{3}} \cdot \left(\left(1 + \tan \varepsilon \cdot \tan x\right) + \left(\tan \varepsilon \cdot \tan x\right) \cdot \left(\tan \varepsilon \cdot \tan x\right)\right) - \tan x\]
    11. Applied cbrt-unprod1.2

      \[\leadsto \frac{\tan x + \tan \varepsilon}{{1}^{3} - {\color{blue}{\left(\sqrt[3]{\left(\left(\tan x \cdot \tan x\right) \cdot \tan x\right) \cdot \left(\left(\tan \varepsilon \cdot \tan \varepsilon\right) \cdot \tan \varepsilon\right)}\right)}}^{3}} \cdot \left(\left(1 + \tan \varepsilon \cdot \tan x\right) + \left(\tan \varepsilon \cdot \tan x\right) \cdot \left(\tan \varepsilon \cdot \tan x\right)\right) - \tan x\]
    12. Applied rem-cube-cbrt1.1

      \[\leadsto \frac{\tan x + \tan \varepsilon}{{1}^{3} - \color{blue}{\left(\left(\tan x \cdot \tan x\right) \cdot \tan x\right) \cdot \left(\left(\tan \varepsilon \cdot \tan \varepsilon\right) \cdot \tan \varepsilon\right)}} \cdot \left(\left(1 + \tan \varepsilon \cdot \tan x\right) + \left(\tan \varepsilon \cdot \tan x\right) \cdot \left(\tan \varepsilon \cdot \tan x\right)\right) - \tan x\]
    13. Simplified1.1

      \[\leadsto \frac{\tan x + \tan \varepsilon}{{1}^{3} - \color{blue}{{\left(\tan x\right)}^{3}} \cdot \left(\left(\tan \varepsilon \cdot \tan \varepsilon\right) \cdot \tan \varepsilon\right)} \cdot \left(\left(1 + \tan \varepsilon \cdot \tan x\right) + \left(\tan \varepsilon \cdot \tan x\right) \cdot \left(\tan \varepsilon \cdot \tan x\right)\right) - \tan x\]
  3. Recombined 3 regimes into one program.
  4. Final simplification15.3

    \[\leadsto \begin{array}{l} \mathbf{if}\;\varepsilon \le -2.6387393587202694 \cdot 10^{-37}:\\ \;\;\;\;\left(\frac{\tan \varepsilon + \tan x}{1 - {\left(\log \left(e^{\tan x \cdot \tan \varepsilon}\right)\right)}^{3}} \cdot \left(\left(\tan x \cdot \tan \varepsilon\right) \cdot \left(\tan x \cdot \tan \varepsilon\right)\right) - \tan x\right) + \frac{\tan \varepsilon + \tan x}{1 - {\left(\log \left(e^{\tan x \cdot \tan \varepsilon}\right)\right)}^{3}} \cdot \left(1 + \tan x \cdot \tan \varepsilon\right)\\ \mathbf{elif}\;\varepsilon \le 5.782469297289403 \cdot 10^{-19}:\\ \;\;\;\;\left(x \cdot \varepsilon\right) \cdot \left(x + \varepsilon\right) + \varepsilon\\ \mathbf{else}:\\ \;\;\;\;\left(\left(1 + \tan x \cdot \tan \varepsilon\right) + \left(\tan x \cdot \tan \varepsilon\right) \cdot \left(\tan x \cdot \tan \varepsilon\right)\right) \cdot \frac{\tan \varepsilon + \tan x}{1 - {\left(\tan x\right)}^{3} \cdot \left(\tan \varepsilon \cdot \left(\tan \varepsilon \cdot \tan \varepsilon\right)\right)} - \tan x\\ \end{array}\]

Reproduce

herbie shell --seed 2019022 
(FPCore (x eps)
  :name "2tan (problem 3.3.2)"

  :herbie-target
  (/ (sin eps) (* (cos x) (cos (+ x eps))))

  (- (tan (+ x eps)) (tan x)))

Details

Time bar (total: 1.3m)Debug log

sample372.0ms

Algorithm
intervals
Results
163.0ms97×body1280valid
105.0ms66×body640valid
64.0ms21×body2560valid
12.0ms19×body320valid
9.0ms37×body80valid
8.0ms16×body160valid

simplify7.0ms

Counts
1 → 1
Calls
1 calls:
Slowest
7.0ms
(- (tan (+ x eps)) (tan x))

prune10.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 38.3b

localize27.0ms

Local error

Found 2 expressions with local error:

3.9b
(tan (+ x eps))
1.3b
(- (tan (+ x eps)) (tan x))

rewrite14.0ms

Algorithm
rewrite-expression-head
Rules
add-log-exp
tan-quot
*-un-lft-identity
add-sqr-sqrt
add-cube-cbrt
frac-sub
add-exp-log
add-cbrt-cube
tan-sum
pow1
difference-of-squares
distribute-lft-out--
flip--
diff-log
flip3--
sub-neg
Counts
2 → 25
Calls
2 calls:
Slowest
10.0ms
(- (tan (+ x eps)) (tan x))
3.0ms
(tan (+ x eps))

series197.0ms

Counts
2 → 6
Calls
2 calls:
Slowest
98.0ms
(tan (+ x eps))
98.0ms
(- (tan (+ x eps)) (tan x))

simplify581.0ms

Counts
15 → 31
Calls
15 calls:
Slowest
177.0ms
(- (* (+ (tan x) (tan eps)) (cos x)) (* (- 1 (* (tan x) (tan eps))) (sin x)))
133.0ms
(+ (* x (pow eps 2)) (+ eps (* (pow x 2) eps)))
132.0ms
(* (- 1 (* (tan x) (tan eps))) (cos x))
53.0ms
(+ x (+ (* 1/3 (pow x 3)) eps))
13.0ms
(- (* (sin (+ x eps)) (cos x)) (* (cos (+ x eps)) (sin x)))

prune326.0ms

Pruning

8 alts after pruning (8 fresh and 0 done)

Merged error: 17.4b

localize29.0ms

Local error

Found 4 expressions with local error:

2.9b
(- (/ (+ (tan x) (tan eps)) (- 1 (* (tan x) (tan eps)))) (tan x))
0.2b
(* (tan x) (tan eps))
0.1b
(+ (tan x) (tan eps))
0.1b
(/ (+ (tan x) (tan eps)) (- 1 (* (tan x) (tan eps))))

rewrite46.0ms

Algorithm
rewrite-expression-head
Rules
27×*-un-lft-identity
20×add-sqr-sqrt
15×add-cube-cbrt
13×times-frac
tan-quot
add-log-exp
add-exp-log
add-cbrt-cube
pow1
distribute-lft-out
associate-/l*
associate-/l/
associate-*l*
associate-*r*
associate-/r*
difference-of-squares
flip--
flip-+
associate-/r/
frac-add
flip3--
flip3-+
distribute-lft-out--
div-inv
cbrt-unprod
frac-sub
*-commutative
associate-*r/
prod-exp
associate-*l/
pow-prod-down
div-exp
diff-log
frac-2neg
sub-neg
sum-log
clear-num
+-commutative
cbrt-undiv
frac-times
Counts
4 → 85
Calls
4 calls:
Slowest
27.0ms
(- (/ (+ (tan x) (tan eps)) (- 1 (* (tan x) (tan eps)))) (tan x))
11.0ms
(/ (+ (tan x) (tan eps)) (- 1 (* (tan x) (tan eps))))
4.0ms
(* (tan x) (tan eps))
3.0ms
(+ (tan x) (tan eps))

series848.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
390.0ms
(- (/ (+ (tan x) (tan eps)) (- 1 (* (tan x) (tan eps)))) (tan x))
235.0ms
(/ (+ (tan x) (tan eps)) (- 1 (* (tan x) (tan eps))))
128.0ms
(+ (tan x) (tan eps))
95.0ms
(* (tan x) (tan eps))

simplify2.6s

Counts
72 → 97
Calls
72 calls:
Slowest
306.0ms
(/ (* (* (+ (tan x) (tan eps)) (+ (tan x) (tan eps))) (+ (tan x) (tan eps))) (* (* (- 1 (* (tan x) (tan eps))) (- 1 (* (tan x) (tan eps)))) (- 1 (* (tan x) (tan eps)))))
253.0ms
(+ (* 1/3 (* (pow x 3) eps)) (+ (* 1/3 (* x (pow eps 3))) (* x eps)))
226.0ms
(- (+ (/ (sin eps) (* (cos eps) (- 1 (/ (* (sin x) (sin eps)) (* (cos x) (cos eps)))))) (/ (sin x) (* (cos x) (- 1 (/ (* (sin x) (sin eps)) (* (cos x) (cos eps))))))) (/ (sin x) (cos x)))
222.0ms
(- (+ (/ (sin eps) (* (cos eps) (- 1 (/ (* (sin x) (sin eps)) (* (cos x) (cos eps)))))) (/ (sin x) (* (cos x) (- 1 (/ (* (sin x) (sin eps)) (* (cos x) (cos eps))))))) (/ (sin x) (cos x)))
180.0ms
(- (* (+ (tan x) (tan eps)) (cos x)) (* (- 1 (* (tan x) (tan eps))) (sin x)))

prune1.1s

Pruning

14 alts after pruning (14 fresh and 0 done)

Merged error: 17.2b

localize35.0ms

Local error

Found 4 expressions with local error:

2.9b
(- (* (/ (+ (tan x) (tan eps)) (- (pow 1 3) (pow (* (tan x) (tan eps)) 3))) (+ (+ 1 (* (tan eps) (tan x))) (* (* (tan eps) (tan x)) (* (tan eps) (tan x))))) (tan x))
0.3b
(pow (* (tan x) (tan eps)) 3)
0.3b
(* (* (tan eps) (tan x)) (* (tan eps) (tan x)))
0.2b
(* (tan x) (tan eps))

rewrite114.0ms

Algorithm
rewrite-expression-head
Rules
233×tan-quot
119×frac-times
89×associate-*r/
65×frac-sub
60×frac-add
58×associate-*l/
36×pow1
32×flip-+
32×flip3-+
21×add-exp-log
21×add-cbrt-cube
15×pow-prod-down
10×cbrt-unprod
10×prod-exp
add-log-exp
add-cube-cbrt
*-un-lft-identity
add-sqr-sqrt
pow-prod-up
associate-*l*
associate-*r*
cube-div
rem-cube-cbrt
*-commutative
associate--l+
pow-exp
pow-plus
pow-pow
flip--
cube-prod
unpow3
diff-log
flip3--
distribute-lft-in
unpow-prod-down
sub-neg
pow-to-exp
cube-mult
distribute-rgt-in
pow2
Counts
4 → 164
Calls
4 calls:
Slowest
87.0ms
(- (* (/ (+ (tan x) (tan eps)) (- (pow 1 3) (pow (* (tan x) (tan eps)) 3))) (+ (+ 1 (* (tan eps) (tan x))) (* (* (tan eps) (tan x)) (* (tan eps) (tan x))))) (tan x))
16.0ms
(* (* (tan eps) (tan x)) (* (tan eps) (tan x)))
4.0ms
(* (tan x) (tan eps))
3.0ms
(pow (* (tan x) (tan eps)) 3)

series2.0s

Counts
4 → 12
Calls
4 calls:
Slowest
1.7s
(- (* (/ (+ (tan x) (tan eps)) (- (pow 1 3) (pow (* (tan x) (tan eps)) 3))) (+ (+ 1 (* (tan eps) (tan x))) (* (* (tan eps) (tan x)) (* (tan eps) (tan x))))) (tan x))
132.0ms
(pow (* (tan x) (tan eps)) 3)
111.0ms
(* (* (tan eps) (tan x)) (* (tan eps) (tan x)))
92.0ms
(* (tan x) (tan eps))

simplify32.4s

Counts
216 → 176
Calls
216 calls:
Slowest
756.0ms
(- (* (* (+ (tan x) (tan eps)) (+ (* (+ (pow 1 3) (pow (* (tan eps) (tan x)) 3)) (* (cos x) (cos x))) (* (+ (* 1 1) (- (* (* (tan eps) (tan x)) (* (tan eps) (tan x))) (* 1 (* (tan eps) (tan x))))) (* (* (tan eps) (sin x)) (* (tan eps) (sin x)))))) (cos x)) (* (* (- (pow 1 3) (pow (* (tan x) (tan eps)) 3)) (* (+ (* 1 1) (- (* (* (tan eps) (tan x)) (* (tan eps) (tan x))) (* 1 (* (tan eps) (tan x))))) (* (cos x) (cos x)))) (sin x)))
607.0ms
(- (* (* (/ (+ (tan x) (tan eps)) (- (pow 1 3) (pow (* (tan x) (tan eps)) 3))) (+ (* (+ (pow 1 3) (pow (* (tan eps) (tan x)) 3)) (* (* (cos eps) (cos x)) (cos x))) (* (+ (* 1 1) (- (* (* (tan eps) (tan x)) (* (tan eps) (tan x))) (* 1 (* (tan eps) (tan x))))) (* (* (sin eps) (sin x)) (* (tan eps) (sin x)))))) (cos x)) (* (* (+ (* 1 1) (- (* (* (tan eps) (tan x)) (* (tan eps) (tan x))) (* 1 (* (tan eps) (tan x))))) (* (* (cos eps) (cos x)) (cos x))) (sin x)))
607.0ms
(* (* (* (* (tan eps) (tan x)) (* (tan eps) (tan x))) (* (tan eps) (tan x))) (* (* (* (tan eps) (tan x)) (* (tan eps) (tan x))) (* (tan eps) (tan x))))
554.0ms
(* (* (- (pow 1 3) (pow (* (tan x) (tan eps)) 3)) (* (- 1 (* (tan eps) (tan x))) (* (cos x) (* (cos eps) (cos x))))) (cos x))
477.0ms
(* (* (- (pow 1 3) (pow (* (tan x) (tan eps)) 3)) (* (- 1 (* (tan eps) (tan x))) (* (cos x) (cos eps)))) (cos x))

prune2.2s

Pruning

17 alts after pruning (17 fresh and 0 done)

Merged error: 17.2b

localize18.0ms

Local error

Found 4 expressions with local error:

2.9b
(- (* (/ (+ (tan x) (tan eps)) (- (pow 1 3) (pow (log (exp (* (tan x) (tan eps)))) 3))) (+ (+ 1 (* (tan eps) (tan x))) (* (* (tan eps) (tan x)) (* (tan eps) (tan x))))) (tan x))
2.4b
(log (exp (* (tan x) (tan eps))))
0.3b
(* (* (tan eps) (tan x)) (* (tan eps) (tan x)))
0.2b
(* (tan x) (tan eps))

rewrite74.0ms

Algorithm
rewrite-expression-head
Rules
229×tan-quot
118×frac-times
88×associate-*r/
65×frac-sub
60×frac-add
57×associate-*l/
34×pow1
32×flip-+
32×flip3-+
18×add-exp-log
18×add-cbrt-cube
14×pow-prod-down
cbrt-unprod
prod-exp
add-log-exp
add-cube-cbrt
*-un-lft-identity
add-sqr-sqrt
pow-prod-up
associate-*l*
associate-*r*
log-pow
log-prod
*-commutative
associate--l+
pow-plus
flip--
rem-log-exp
diff-log
exp-to-pow
flip3--
distribute-lft-in
sub-neg
exp-prod
distribute-rgt-in
pow2
Counts
4 → 157
Calls
4 calls:
Slowest
47.0ms
(- (* (/ (+ (tan x) (tan eps)) (- (pow 1 3) (pow (log (exp (* (tan x) (tan eps)))) 3))) (+ (+ 1 (* (tan eps) (tan x))) (* (* (tan eps) (tan x)) (* (tan eps) (tan x))))) (tan x))
15.0ms
(* (* (tan eps) (tan x)) (* (tan eps) (tan x)))
4.0ms
(* (tan x) (tan eps))
2.0ms
(log (exp (* (tan x) (tan eps))))

series1.4s

Counts
4 → 12
Calls
4 calls:
Slowest
1.1s
(- (* (/ (+ (tan x) (tan eps)) (- (pow 1 3) (pow (log (exp (* (tan x) (tan eps)))) 3))) (+ (+ 1 (* (tan eps) (tan x))) (* (* (tan eps) (tan x)) (* (tan eps) (tan x))))) (tan x))
86.0ms
(* (* (tan eps) (tan x)) (* (tan eps) (tan x)))
75.0ms
(log (exp (* (tan x) (tan eps))))
73.0ms
(* (tan x) (tan eps))

simplify23.7s

Counts
211 → 169
Calls
211 calls:
Slowest
531.0ms
(* (* (- (pow 1 3) (pow (log (exp (* (tan x) (tan eps)))) 3)) (* (- 1 (* (tan eps) (tan x))) (* (cos eps) (cos x)))) (cos x))
450.0ms
(* (* (- 1 (* (tan eps) (tan x))) (* (cos x) (cos eps))) (cos x))
379.0ms
(* (* (* (* (tan eps) (tan eps)) (tan eps)) (* (* (tan x) (tan x)) (tan x))) (* (* (* (tan eps) (tan x)) (* (tan eps) (tan x))) (* (tan eps) (tan x))))
357.0ms
(* (* (* (* (tan eps) (tan x)) (* (tan eps) (tan x))) (* (tan eps) (tan x))) (* (* (* (tan eps) (tan eps)) (tan eps)) (* (* (tan x) (tan x)) (tan x))))
345.0ms
(* (* (* (* (tan eps) (tan x)) (* (tan eps) (tan x))) (* (tan eps) (tan x))) (* (* (* (tan eps) (tan x)) (* (tan eps) (tan x))) (* (tan eps) (tan x))))

prune2.1s

Pruning

18 alts after pruning (18 fresh and 0 done)

Merged error: 17.2b

regimes278.0ms

Accuracy

89.9% (0.7b remaining)

Error of 15.3b against oracle of 14.5b and baseline of 21.7b

bsearch194.0ms

end0.0ms

sample9.5s

Algorithm
intervals
Results
4.5s3261×body1280valid
2.1s1824×body640valid
1.8s651×body2560valid
448.0ms790×body320valid
198.0ms1115×body80valid
184.0ms359×body160valid