Average Error: 31.4 → 31.4
Time: 34.3s
Precision: 64
Internal Precision: 128
\[\frac{x - \sin x}{x - \tan x}\]
\[\frac{x - \sin x}{x - \tan x}\]

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 31.4

    \[\frac{x - \sin x}{x - \tan x}\]
  2. Final simplification31.4

    \[\leadsto \frac{x - \sin x}{x - \tan x}\]

Reproduce

herbie shell --seed 2019002 +o rules:numerics
(FPCore (x)
  :name "sintan (problem 3.4.5)"
  (/ (- x (sin x)) (- x (tan x))))

Details

Time bar (total: 33.7s)Debug log

sample649.0ms

Algorithm
intervals

simplify25.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

24.0ms
(/ (- x (sin x)) (- x (tan x)))

prune12.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 34.8b

localize67.0ms

Local error

Found 2 expressions with local error:

1.5b
(- x (tan x))
1.2b
(- x (sin x))

rewrite6.0ms

Algorithm
rewrite-expression-head
Counts
2 → 26
Calls

2 calls. Slowest were:

3.0ms
(- x (tan x))
1.0ms
(- x (sin x))

series103.0ms

Counts
2 → 6
Calls

2 calls. Slowest were:

65.0ms
(- x (tan x))
38.0ms
(- x (sin x))

simplify290.0ms

Counts
6 → 32
Calls

6 calls. Slowest were:

179.0ms
(- (+ (* 1/3 (pow x 3)) (+ (* 2/15 (pow x 5)) (* 17/315 (pow x 7)))))
98.0ms
(- (+ (* 1/6 (pow x 3)) (* 1/5040 (pow x 7))) (* 1/120 (pow x 5)))
4.0ms
(- x (/ (sin x) (cos x)))

prune307.0ms

Pruning

3 alts after pruning (2 fresh and 1 done)

Merged error: 34.5b

localize17.0ms

Local error

Found 4 expressions with local error:

13.5b
(/ (- (* x x) (* (sin x) (sin x))) (+ x (sin x)))
1.5b
(- x (tan x))
1.2b
(- (* x x) (* (sin x) (sin x)))
0.2b
(* (sin x) (sin x))

rewrite23.0ms

Algorithm
rewrite-expression-head
Counts
4 → 93
Calls

4 calls. Slowest were:

8.0ms
(/ (- (* x x) (* (sin x) (sin x))) (+ x (sin x)))
8.0ms
(* (sin x) (sin x))
5.0ms
(- (* x x) (* (sin x) (sin x)))

series231.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

92.0ms
(/ (- (* x x) (* (sin x) (sin x))) (+ x (sin x)))
57.0ms
(- (* x x) (* (sin x) (sin x)))
56.0ms
(- x (tan x))
25.0ms
(* (sin x) (sin x))

simplify3.9s

Counts
68 → 105
Calls

68 calls. Slowest were:

527.0ms
(/ (- (* x x) (* (sin x) (sin x))) (+ x (sin x)))
280.0ms
(- (+ (* 1/3 (pow x 3)) (+ (* 2/15 (pow x 5)) (* 17/315 (pow x 7)))))
171.0ms
(/ (* (cbrt (- (* x x) (* (sin x) (sin x)))) (cbrt (- (* x x) (* (sin x) (sin x))))) (* (cbrt (+ x (sin x))) (cbrt (+ x (sin x)))))

prune1.2s

Pruning

8 alts after pruning (7 fresh and 1 done)

Merged error: 34.4b

localize21.0ms

Local error

Found 4 expressions with local error:

29.1b
(/ (- (* x x) (exp (log (* (sin x) (sin x))))) (+ x (sin x)))
17.7b
(log (* (sin x) (sin x)))
13.6b
(- (* x x) (exp (log (* (sin x) (sin x)))))
1.7b
(exp (log (* (sin x) (sin x))))

rewrite58.0ms

Algorithm
rewrite-expression-head
Counts
4 → 101
Calls

4 calls. Slowest were:

36.0ms
(/ (- (* x x) (exp (log (* (sin x) (sin x))))) (+ x (sin x)))
9.0ms
(exp (log (* (sin x) (sin x))))
8.0ms
(- (* x x) (exp (log (* (sin x) (sin x)))))

series235.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

82.0ms
(log (* (sin x) (sin x)))
81.0ms
(/ (- (* x x) (exp (log (* (sin x) (sin x))))) (+ x (sin x)))
49.0ms
(- (* x x) (exp (log (* (sin x) (sin x)))))
22.0ms
(exp (log (* (sin x) (sin x))))

simplify2.9s

Counts
86 → 113
Calls

86 calls. Slowest were:

231.0ms
(- (* (* x x) (* x x)) (* (exp (log (* (sin x) (sin x)))) (exp (log (* (sin x) (sin x))))))
133.0ms
(- (* 2 (log x)) (+ (* 1/3 (pow x 2)) (* 1/90 (pow x 4))))
128.0ms
(/ (- (* x x) (exp (log (* (sin x) (sin x))))) (+ x (sin x)))

prune1.5s

Pruning

7 alts after pruning (6 fresh and 1 done)

Merged error: 34.3b

localize27.0ms

Local error

Found 4 expressions with local error:

30.2b
(/ (- (* x x) (log (exp (* (sin x) (sin x))))) (+ x (sin x)))
2.1b
(log (exp (* (sin x) (sin x))))
1.5b
(- x (tan x))
0.9b
(- (* x x) (log (exp (* (sin x) (sin x)))))

rewrite21.0ms

Algorithm
rewrite-expression-head
Counts
4 → 94
Calls

4 calls. Slowest were:

12.0ms
(/ (- (* x x) (log (exp (* (sin x) (sin x))))) (+ x (sin x)))
5.0ms
(- (* x x) (log (exp (* (sin x) (sin x)))))
2.0ms
(log (exp (* (sin x) (sin x))))

series253.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

92.0ms
(/ (- (* x x) (log (exp (* (sin x) (sin x))))) (+ x (sin x)))
79.0ms
(- x (tan x))
57.0ms
(- (* x x) (log (exp (* (sin x) (sin x)))))
25.0ms
(log (exp (* (sin x) (sin x))))

simplify3.8s

Counts
75 → 106
Calls

75 calls. Slowest were:

334.0ms
(- (pow (* x x) 3) (pow (log (exp (* (sin x) (sin x)))) 3))
302.0ms
(- (+ (* 1/3 (pow x 3)) (+ (* 2/15 (pow x 5)) (* 17/315 (pow x 7)))))
274.0ms
(- (* (* x x) (* x x)) (* (log (exp (* (sin x) (sin x)))) (log (exp (* (sin x) (sin x))))))

prune1.2s

Pruning

4 alts after pruning (3 fresh and 1 done)

Merged error: 34.0b

regimes64.0ms

Accuracy

0% (0.8b remaining)

Error of 31.4b against oracle of 30.6b and baseline of 31.4b

bsearch1.0ms

end0.0ms

sample16.8s

Algorithm
intervals