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

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 clear-num0.2

    \[\leadsto \frac{1}{\sin B} - \color{blue}{\frac{1}{\frac{\tan B}{x}}}\]
  5. Using strategy rm
  6. Applied div-inv0.2

    \[\leadsto \frac{1}{\sin B} - \frac{1}{\color{blue}{\tan B \cdot \frac{1}{x}}}\]
  7. Applied associate-/r*0.2

    \[\leadsto \frac{1}{\sin B} - \color{blue}{\frac{\frac{1}{\tan B}}{\frac{1}{x}}}\]
  8. Final simplification0.2

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

Reproduce

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

Details

Time bar (total: 18.3s)Debug log

sample378.0ms

Algorithm
intervals

simplify87.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

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

prune20.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 0.1b

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

rewrite411.0ms

Algorithm
rewrite-expression-head
Counts
3 → 46
Calls

3 calls. Slowest were:

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

series339.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

165.0ms
(/ x (tan B))
151.0ms
(- (/ 1 (sin B)) (/ x (tan B)))
23.0ms
(/ 1 (sin B))

simplify301.0ms

Counts
24 → 55
Calls

24 calls. Slowest were:

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

prune639.0ms

Pruning

10 alts after pruning (10 fresh and 0 done)

Merged error: 0.0b

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

rewrite23.0ms

Algorithm
rewrite-expression-head
Counts
4 → 62
Calls

4 calls. Slowest were:

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

series319.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

119.0ms
(- (/ 1 (sin B)) (* (/ x (sin B)) (cos B)))
106.0ms
(* (/ x (sin B)) (cos B))
79.0ms
(/ x (sin B))
14.0ms
(/ 1 (sin B))

simplify632.0ms

Counts
33 → 74
Calls

33 calls. Slowest were:

153.0ms
(- (* 1 (sin B)) (* (sin B) (* x (cos B))))
143.0ms
(* (* (* (/ x (sin B)) (/ x (sin B))) (/ x (sin B))) (* (* (cos B) (cos B)) (cos B)))
47.0ms
(- (/ 1 (sin B)) (/ (* x (cos B)) (sin B)))

prune782.0ms

Pruning

8 alts after pruning (7 fresh and 1 done)

Merged error: 0.0b

localize17.0ms

Local error

Found 4 expressions with local error:

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

rewrite19.0ms

Algorithm
rewrite-expression-head
Counts
4 → 66
Calls

4 calls. Slowest were:

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

series302.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

115.0ms
(/ 1 (/ (tan B) x))
113.0ms
(- (/ 1 (sin B)) (/ 1 (/ (tan B) x)))
52.0ms
(/ (tan B) x)
21.0ms
(/ 1 (sin B))

simplify573.0ms

Counts
33 → 78
Calls

33 calls. Slowest were:

71.0ms
(+ (/ B x) (+ (* 1/3 (/ (pow B 3) x)) (* 2/15 (/ (pow B 5) x))))
49.0ms
(- (/ 1 (sin B)) (/ (* x (cos B)) (sin B)))
48.0ms
(- (/ 1 (sin B)) (/ (* x (cos B)) (sin B)))

prune808.0ms

Pruning

7 alts after pruning (7 fresh and 0 done)

Merged error: 0b

localize22.0ms

Local error

Found 4 expressions with local error:

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

rewrite23.0ms

Algorithm
rewrite-expression-head
Counts
4 → 94
Calls

4 calls. Slowest were:

12.0ms
(- (/ 1 (sin B)) (/ (/ 1 (tan B)) (/ 1 x)))
7.0ms
(/ (/ 1 (tan B)) (/ 1 x))
1.0ms
(/ 1 (tan B))

series266.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

115.0ms
(- (/ 1 (sin B)) (/ (/ 1 (tan B)) (/ 1 x)))
102.0ms
(/ (/ 1 (tan B)) (/ 1 x))
26.0ms
(/ 1 (tan B))
23.0ms
(/ 1 (sin B))

simplify2.3s

Counts
80 → 106
Calls

80 calls. Slowest were:

969.0ms
(/ (* (* (/ 1 (tan B)) (/ 1 (tan B))) (/ 1 (tan B))) (* (* (/ 1 x) (/ 1 x)) (/ 1 x)))
139.0ms
(- (/ 1 B) (+ (* 1/3 B) (* 1/45 (pow B 3))))
97.0ms
(/ (exp (/ 1 (sin B))) (exp (/ (/ 1 (tan B)) (/ 1 x))))

prune1.0s

Pruning

7 alts after pruning (6 fresh and 1 done)

Merged error: 0b

regimes134.0ms

Accuracy

0% (0.2b remaining)

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

bsearch1.0ms

end0.0ms

sample8.8s

Algorithm
intervals