Average Error: 0.2 → 0.2
Time: 17.6s
Precision: 64
Internal Precision: 128
\[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\sin B}\]
\[\frac{1}{\sin B} - \frac{x}{\sin B} \cdot \cos B\]

Error

Bits error versus B

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.2

    \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\sin B}\]
  2. Simplified0.2

    \[\leadsto \color{blue}{\frac{1}{\sin B} - \frac{x}{\tan B}}\]
  3. Using strategy rm
  4. Applied tan-quot0.2

    \[\leadsto \frac{1}{\sin B} - \frac{x}{\color{blue}{\frac{\sin B}{\cos B}}}\]
  5. Applied associate-/r/0.2

    \[\leadsto \frac{1}{\sin B} - \color{blue}{\frac{x}{\sin B} \cdot \cos B}\]
  6. Final simplification0.2

    \[\leadsto \frac{1}{\sin B} - \frac{x}{\sin B} \cdot \cos B\]

Reproduce

herbie shell --seed 2019002 
(FPCore (B x)
  :name "VandenBroeck and Keller, Equation (24)"
  (+ (- (* x (/ 1 (tan B)))) (/ 1 (sin B))))

Details

Time bar (total: 16.5s)Debug log

sample694.0ms

Algorithm
intervals

simplify107.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

106.0ms
(+ (- (* x (/ 1 (tan B)))) (/ 1 (sin B)))

prune30.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 0.1b

localize21.0ms

Local error

Found 3 expressions with local error:

0.1b
(/ x (tan B))
0.1b
(/ 1 (sin B))
0.0b
(- (/ 1 (sin B)) (/ x (tan B)))

rewrite9.0ms

Algorithm
rewrite-expression-head
Counts
3 → 46
Calls

3 calls. Slowest were:

5.0ms
(- (/ 1 (sin B)) (/ x (tan B)))
2.0ms
(/ x (tan B))
1.0ms
(/ 1 (sin B))

series283.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

152.0ms
(/ x (tan B))
105.0ms
(- (/ 1 (sin B)) (/ x (tan B)))
25.0ms
(/ 1 (sin B))

simplify336.0ms

Counts
24 → 55
Calls

24 calls. Slowest were:

53.0ms
(+ (* 1/6 B) (+ (/ 1 B) (* 7/360 (pow B 3))))
50.0ms
(- (/ 1 (sin B)) (/ (* x (cos B)) (sin B)))
44.0ms
(- (+ (* 1/6 B) (/ 1 B)) (/ x B))

prune533.0ms

Pruning

8 alts after pruning (8 fresh and 0 done)

Merged error: 0.0b

localize11.0ms

Local error

Found 4 expressions with local error:

0.2b
(* (/ x (sin B)) (cos B))
0.2b
(/ x (sin B))
0.1b
(/ 1 (sin B))
0.0b
(- (/ 1 (sin B)) (* (/ x (sin B)) (cos B)))

rewrite12.0ms

Algorithm
rewrite-expression-head
Counts
4 → 62
Calls

4 calls. Slowest were:

6.0ms
(- (/ 1 (sin B)) (* (/ x (sin B)) (cos B)))
4.0ms
(* (/ x (sin B)) (cos B))
1.0ms
(/ 1 (sin B))

series373.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

150.0ms
(* (/ x (sin B)) (cos B))
136.0ms
(- (/ 1 (sin B)) (* (/ x (sin B)) (cos B)))
62.0ms
(/ x (sin B))
25.0ms
(/ 1 (sin B))

simplify669.0ms

Counts
33 → 74
Calls

33 calls. Slowest were:

184.0ms
(* (* (* (/ x (sin B)) (/ x (sin B))) (/ x (sin B))) (* (* (cos B) (cos B)) (cos B)))
142.0ms
(- (* 1 (sin B)) (* (sin B) (* x (cos B))))
52.0ms
(- (/ 1 (sin B)) (/ (* x (cos B)) (sin B)))

prune698.0ms

Pruning

9 alts after pruning (8 fresh and 1 done)

Merged error: 0.0b

localize16.0ms

Local error

Found 4 expressions with local error:

0.2b
(/ 1 (/ (tan B) x))
0.1b
(/ 1 (sin B))
0.1b
(/ (tan B) x)
0.0b
(- (/ 1 (sin B)) (/ 1 (/ (tan B) x)))

rewrite9.0ms

Algorithm
rewrite-expression-head
Counts
4 → 66
Calls

4 calls. Slowest were:

4.0ms
(- (/ 1 (sin B)) (/ 1 (/ (tan B) x)))
2.0ms
(/ (tan B) x)
1.0ms
(/ 1 (/ (tan B) x))

series269.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

108.0ms
(- (/ 1 (sin B)) (/ 1 (/ (tan B) x)))
90.0ms
(/ 1 (/ (tan B) x))
50.0ms
(/ (tan B) x)
22.0ms
(/ 1 (sin B))

simplify619.0ms

Counts
33 → 78
Calls

33 calls. Slowest were:

73.0ms
(+ (/ B x) (+ (* 1/3 (/ (pow B 3) x)) (* 2/15 (/ (pow B 5) x))))
51.0ms
(- (/ 1 (sin B)) (/ 1 (/ (tan B) x)))
50.0ms
(- (/ 1 (sin B)) (/ (* x (cos B)) (sin B)))

prune816.0ms

Pruning

6 alts after pruning (5 fresh and 1 done)

Merged error: 0.0b

localize28.0ms

Local error

Found 4 expressions with local error:

0.6b
(cbrt (sin B))
0.6b
(cbrt (sin B))
0.6b
(cbrt (sin B))
0.5b
(* (cbrt (sin B)) (cbrt (sin B)))

rewrite9.0ms

Algorithm
rewrite-expression-head
Counts
4 → 61
Calls

4 calls. Slowest were:

5.0ms
(* (cbrt (sin B)) (cbrt (sin B)))
1.0ms
(cbrt (sin B))
1.0ms
(cbrt (sin B))

series630.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

182.0ms
(* (cbrt (sin B)) (cbrt (sin B)))
160.0ms
(cbrt (sin B))
146.0ms
(cbrt (sin B))
141.0ms
(cbrt (sin B))

simplify283.0ms

Counts
41 → 73
Calls

41 calls. Slowest were:

61.0ms
(- (+ (pow B 2/3) (* 1/405 (pow (pow B 14) 1/3))) (* 1/9 (pow (pow B 8) 1/3)))
59.0ms
(- (pow B 1/3) (+ (* 1/18 (pow (pow B 7) 1/3)) (* 1/3240 (pow (pow B 13) 1/3))))
57.0ms
(- (pow B 1/3) (+ (* 1/18 (pow (pow B 7) 1/3)) (* 1/3240 (pow (pow B 13) 1/3))))

prune855.0ms

Pruning

8 alts after pruning (6 fresh and 2 done)

Merged error: 0.0b

regimes125.0ms

Accuracy

0% (0.2b remaining)

Error of 0.2b against oracle of 0.0b and baseline of 0.2b

bsearch1.0ms

end0.0ms

sample9.1s

Algorithm
intervals