Average Error: 0.2 → 0.2
Time: 15.9s
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: 14.7s)Debug log

sample178.0ms

Algorithm
intervals

simplify46.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

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

prune10.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 0.1b

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

rewrite6.0ms

Algorithm
rewrite-expression-head
Counts
3 → 46
Calls

3 calls. Slowest were:

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

series198.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

99.0ms
(/ x (tan B))
85.0ms
(- (/ 1 (sin B)) (/ x (tan B)))
13.0ms
(/ 1 (sin B))

simplify177.0ms

Counts
24 → 55
Calls

24 calls. Slowest were:

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

prune344.0ms

Pruning

10 alts after pruning (10 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)))

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

series240.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

96.0ms
(* (/ x (sin B)) (cos B))
80.0ms
(- (/ 1 (sin B)) (* (/ x (sin B)) (cos B)))
51.0ms
(/ x (sin B))
13.0ms
(/ 1 (sin B))

simplify424.0ms

Counts
33 → 74
Calls

33 calls. Slowest were:

118.0ms
(- (* 1 (sin B)) (* (sin B) (* x (cos B))))
93.0ms
(* (* (* (/ x (sin B)) (/ x (sin B))) (/ x (sin B))) (* (* (cos B) (cos B)) (cos B)))
29.0ms
(/ (exp (/ 1 (sin B))) (exp (* (/ x (sin B)) (cos B))))

prune467.0ms

Pruning

8 alts after pruning (7 fresh and 1 done)

Merged error: 0.0b

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

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

series208.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

85.0ms
(- (/ 1 (sin B)) (/ 1 (/ (tan B) x)))
70.0ms
(/ 1 (/ (tan B) x))
39.0ms
(/ (tan B) x)
14.0ms
(/ 1 (sin B))

simplify379.0ms

Counts
33 → 78
Calls

33 calls. Slowest were:

57.0ms
(+ (/ B x) (+ (* 1/3 (/ (pow B 3) x)) (* 2/15 (/ (pow B 5) x))))
29.0ms
(/ (exp (/ 1 (sin B))) (exp (/ 1 (/ (tan B) x))))
25.0ms
(+ (* 1/6 B) (+ (/ 1 B) (* 7/360 (pow B 3))))

prune485.0ms

Pruning

7 alts after pruning (7 fresh and 0 done)

Merged error: 0b

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

rewrite12.0ms

Algorithm
rewrite-expression-head
Counts
4 → 94
Calls

4 calls. Slowest were:

6.0ms
(- (/ 1 (sin B)) (/ (/ 1 (tan B)) (/ 1 x)))
3.0ms
(/ (/ 1 (tan B)) (/ 1 x))
1.0ms
(/ 1 (tan B))

series196.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

87.0ms
(- (/ 1 (sin B)) (/ (/ 1 (tan B)) (/ 1 x)))
71.0ms
(/ (/ 1 (tan B)) (/ 1 x))
25.0ms
(/ 1 (tan B))
13.0ms
(/ 1 (sin B))

simplify1.6s

Counts
80 → 106
Calls

80 calls. Slowest were:

634.0ms
(/ (* (* (/ 1 (tan B)) (/ 1 (tan B))) (/ 1 (tan B))) (* (* (/ 1 x) (/ 1 x)) (/ 1 x)))
124.0ms
(- (/ 1 B) (+ (* 1/3 B) (* 1/45 (pow B 3))))
85.0ms
(- (/ 1 (sin B)) (/ (/ 1 (tan B)) (/ 1 x)))

prune769.0ms

Pruning

7 alts after pruning (6 fresh and 1 done)

Merged error: 0b

regimes127.0ms

Accuracy

0% (0.2b remaining)

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

bsearch2.0ms

end0.0ms

sample8.7s

Algorithm
intervals