Average Error: 0.2 → 0.2
Time: 18.2s
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 2019005 
(FPCore (B x)
  :name "VandenBroeck and Keller, Equation (24)"
  (+ (- (* x (/ 1 (tan B)))) (/ 1 (sin B))))

Details

Time bar (total: 17.2s)Debug log

sample751.0ms

Algorithm
intervals

simplify97.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

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

prune15.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 0.1b

localize76.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)))

rewrite54.0ms

Algorithm
rewrite-expression-head
Counts
3 → 46
Calls

3 calls. Slowest were:

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

series719.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

573.0ms
(/ x (tan B))
119.0ms
(- (/ 1 (sin B)) (/ x (tan B)))
26.0ms
(/ 1 (sin B))

simplify336.0ms

Counts
24 → 55
Calls

24 calls. Slowest were:

49.0ms
(+ (* 1/6 B) (+ (/ 1 B) (* 7/360 (pow B 3))))
49.0ms
(- (/ 1 (sin B)) (/ (* x (cos B)) (sin B)))
41.0ms
(- (/ x B) (* 1/3 (* x B)))

prune521.0ms

Pruning

8 alts after pruning (8 fresh and 0 done)

Merged error: 0.0b

localize20.0ms

Local error

Found 4 expressions with local error:

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

rewrite21.0ms

Algorithm
rewrite-expression-head
Counts
4 → 62
Calls

4 calls. Slowest were:

11.0ms
(* (/ x (sin B)) (cos B))
8.0ms
(- (/ 1 (sin B)) (* (/ x (sin B)) (cos B)))
1.0ms
(/ 1 (sin B))

series272.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

116.0ms
(* (/ x (sin B)) (cos B))
89.0ms
(- (/ 1 (sin B)) (* (/ x (sin B)) (cos B)))
53.0ms
(/ x (sin B))
14.0ms
(/ 1 (sin B))

simplify690.0ms

Counts
33 → 74
Calls

33 calls. Slowest were:

193.0ms
(- (* 1 (sin B)) (* (sin B) (* x (cos B))))
134.0ms
(* (* (* (/ x (sin B)) (/ x (sin B))) (/ x (sin B))) (* (* (cos B) (cos B)) (cos B)))
59.0ms
(/ (exp (/ 1 (sin B))) (exp (* (/ x (sin B)) (cos B))))

prune831.0ms

Pruning

10 alts after pruning (9 fresh and 1 done)

Merged error: 0.0b

localize16.0ms

Local error

Found 2 expressions with local error:

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

rewrite10.0ms

Algorithm
rewrite-expression-head
Counts
2 → 41
Calls

2 calls. Slowest were:

7.0ms
(/ (- 1 (* x (cos B))) (sin B))
2.0ms
(* x (cos B))

series154.0ms

Counts
2 → 6
Calls

2 calls. Slowest were:

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

simplify1.1s

Counts
37 → 47
Calls

37 calls. Slowest were:

351.0ms
(- (pow 1 3) (pow (* x (cos B)) 3))
197.0ms
(/ (* (* (- 1 (* x (cos B))) (- 1 (* x (cos B)))) (- 1 (* x (cos B)))) (* (* (sin B) (sin B)) (sin B)))
59.0ms
(/ (- 1 (* x (cos B))) (cbrt (sin B)))

prune534.0ms

Pruning

9 alts after pruning (8 fresh and 1 done)

Merged error: 0.0b

localize17.0ms

Local error

Found 4 expressions with local error:

0.3b
(cbrt (cos B))
0.3b
(cbrt (cos B))
0.3b
(cbrt (cos B))
0.3b
(* (cbrt (cos B)) (cbrt (cos B)))

rewrite8.0ms

Algorithm
rewrite-expression-head
Counts
4 → 61
Calls

4 calls. Slowest were:

6.0ms
(* (cbrt (cos B)) (cbrt (cos B)))
1.0ms
(cbrt (cos B))
1.0ms
(cbrt (cos B))

series694.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

235.0ms
(* (cbrt (cos B)) (cbrt (cos B)))
195.0ms
(cbrt (cos B))
144.0ms
(cbrt (cos B))
119.0ms
(cbrt (cos B))

simplify339.0ms

Counts
41 → 73
Calls

41 calls. Slowest were:

81.0ms
(- 1 (+ (* 1/405 (pow B 6)) (* 1/3 (pow B 2))))
78.0ms
(- 1 (+ (* 1/72 (pow B 4)) (* 1/6 (pow B 2))))
65.0ms
(- 1 (+ (* 1/72 (pow B 4)) (* 1/6 (pow B 2))))

prune954.0ms

Pruning

8 alts after pruning (7 fresh and 1 done)

Merged error: 0.0b

regimes150.0ms

Accuracy

0% (0.2b remaining)

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

bsearch3.0ms

end0.0ms

sample8.8s

Algorithm
intervals