Average Error: 0.2 → 0.2
Time: 20.4s
Precision: 64
Internal Precision: 128
\[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\sin B}\]
\[\frac{1}{\sin B} - \frac{1}{\frac{\tan B}{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. Final simplification0.2

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

Reproduce

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

Details

Time bar (total: 19.5s)Debug log

sample343.0ms

Algorithm
intervals

simplify468.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

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

prune18.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 0.1b

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

rewrite30.0ms

Algorithm
rewrite-expression-head
Counts
3 → 76
Calls

3 calls. Slowest were:

13.0ms
(- (/ 1 (sin B)) (/ x (tan B)))
11.0ms
(/ x (tan B))
2.0ms
(/ 1 (sin B))

series288.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

138.0ms
(/ x (tan B))
124.0ms
(- (/ 1 (sin B)) (/ x (tan B)))
26.0ms
(/ 1 (sin B))

simplify1.9s

Counts
66 → 85
Calls

66 calls. Slowest were:

97.0ms
(fma (* (cbrt (/ 1 (sin B))) (cbrt (/ 1 (sin B)))) (cbrt (/ 1 (sin B))) (- (* (/ 1 (tan B)) x)))
94.0ms
(fma 1 (/ 1 (sin B)) (- (* (/ 1 (tan B)) x)))
81.0ms
(+ (* 1/6 B) (+ (/ 1 B) (* 7/360 (pow B 3))))

prune864.0ms

Pruning

9 alts after pruning (9 fresh and 0 done)

Merged error: 0.0b

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

rewrite13.0ms

Algorithm
rewrite-expression-head
Counts
4 → 78
Calls

4 calls. Slowest were:

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

series318.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

129.0ms
(* (/ x (sin B)) (cos B))
115.0ms
(- (/ 1 (sin B)) (* (/ x (sin B)) (cos B)))
55.0ms
(/ x (sin B))
18.0ms
(/ 1 (sin B))

simplify1.2s

Counts
43 → 90
Calls

43 calls. Slowest were:

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

prune1000.0ms

Pruning

9 alts after pruning (9 fresh and 0 done)

Merged error: 0.0b

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

rewrite15.0ms

Algorithm
rewrite-expression-head
Counts
4 → 78
Calls

4 calls. Slowest were:

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

series254.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

99.0ms
(- (/ 1 (sin B)) (* (/ x (sin B)) (cos B)))
89.0ms
(* (/ x (sin B)) (cos B))
52.0ms
(/ x (sin B))
14.0ms
(/ 1 (sin B))

simplify1.1s

Counts
43 → 90
Calls

43 calls. Slowest were:

284.0ms
(- (* 1 (sin B)) (* (sin B) (* x (cos B))))
133.0ms
(* (* (* (/ x (sin B)) (/ x (sin B))) (/ x (sin B))) (* (* (cos B) (cos B)) (cos B)))
61.0ms
(fma (sqrt (/ 1 (sin B))) (sqrt (/ 1 (sin B))) (- (* (cos B) (/ x (sin B)))))

prune868.0ms

Pruning

8 alts after pruning (8 fresh and 0 done)

Merged error: 0.0b

localize7.0ms

Local error

Found 2 expressions with local error:

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

rewrite5.0ms

Algorithm
rewrite-expression-head
Counts
2 → 45
Calls

2 calls. Slowest were:

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

series124.0ms

Counts
2 → 6
Calls

2 calls. Slowest were:

74.0ms
(/ (- 1 (* x (cos B))) (sin B))
50.0ms
(* x (cos B))

simplify1.3s

Counts
37 → 51
Calls

37 calls. Slowest were:

455.0ms
(- (pow 1 3) (pow (* x (cos B)) 3))
245.0ms
(/ (* (* (- 1 (* x (cos B))) (- 1 (* x (cos B)))) (- 1 (* x (cos B)))) (* (* (sin B) (sin B)) (sin B)))
68.0ms
(- (* 1 1) (* (* x (cos B)) (* x (cos B))))

prune540.0ms

Pruning

7 alts after pruning (7 fresh and 0 done)

Merged error: 0.0b

regimes138.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.6s

Algorithm
intervals