Average Error: 0.2 → 0.7
Time: 28.0s
Precision: 64
Internal Precision: 128
\[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\sin B}\]
\[\frac{1}{\sin B} - \frac{\frac{x}{\sqrt[3]{\tan B} \cdot \sqrt[3]{\tan B}}}{\sqrt[3]{\tan 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 add-cube-cbrt0.7

    \[\leadsto \frac{1}{\sin B} - \frac{x}{\color{blue}{\left(\sqrt[3]{\tan B} \cdot \sqrt[3]{\tan B}\right) \cdot \sqrt[3]{\tan B}}}\]
  5. Applied associate-/r*0.7

    \[\leadsto \frac{1}{\sin B} - \color{blue}{\frac{\frac{x}{\sqrt[3]{\tan B} \cdot \sqrt[3]{\tan B}}}{\sqrt[3]{\tan B}}}\]
  6. Final simplification0.7

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

Reproduce

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

Details

Time bar (total: 27.0s)Debug log

sample390.0ms

Algorithm
intervals

simplify81.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

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

prune18.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.2b
(/ x (tan B))
0.1b
(/ 1 (sin B))
0.0b
(- (/ 1 (sin B)) (/ x (tan B)))

rewrite12.0ms

Algorithm
rewrite-expression-head
Counts
3 → 76
Calls

3 calls. Slowest were:

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

series346.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

173.0ms
(/ x (tan B))
145.0ms
(- (/ 1 (sin B)) (/ x (tan B)))
27.0ms
(/ 1 (sin B))

simplify1.8s

Counts
66 → 85
Calls

66 calls. Slowest were:

76.0ms
(+ (* 1/6 B) (+ (/ 1 B) (* 7/360 (pow B 3))))
62.0ms
(fma 1 (/ 1 (sin B)) (- (* (/ x (tan B)) 1)))
61.0ms
(fma 1 (/ 1 (sin B)) (- (* (cos B) (/ x (sin B)))))

prune767.0ms

Pruning

9 alts after pruning (9 fresh and 0 done)

Merged error: 0.0b

localize23.0ms

Local error

Found 4 expressions with local error:

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

rewrite24.0ms

Algorithm
rewrite-expression-head
Counts
4 → 105
Calls

4 calls. Slowest were:

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

series335.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

136.0ms
(- (/ 1 (sin B)) (/ (* x (cos B)) (sin B)))
128.0ms
(/ (* x (cos B)) (sin B))
51.0ms
(* x (cos B))
19.0ms
(/ 1 (sin B))

simplify8.6s

Counts
101 → 117
Calls

101 calls. Slowest were:

505.0ms
(/ (* (* (* x (cos B)) (* x (cos B))) (* x (cos B))) (* (* (sin B) (sin B)) (sin B)))
454.0ms
(fma 1 (/ 1 (sin B)) (- (* (/ 1 (sin B)) (* x (cos B)))))
439.0ms
(fma 1 (/ 1 (sin B)) (- (* (/ 1 (sin B)) (* x (cos B)))))

prune1.2s

Pruning

8 alts after pruning (8 fresh and 0 done)

Merged error: 0.0b

localize13.0ms

Local error

Found 4 expressions with local error:

0.6b
(cbrt (tan B))
0.6b
(cbrt (tan B))
0.6b
(cbrt (tan B))
0.4b
(* (cbrt (tan B)) (cbrt (tan B)))

rewrite8.0ms

Algorithm
rewrite-expression-head
Counts
4 → 75
Calls

4 calls. Slowest were:

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

series762.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

207.0ms
(cbrt (tan B))
198.0ms
(cbrt (tan B))
184.0ms
(cbrt (tan B))
172.0ms
(* (cbrt (tan B)) (cbrt (tan B)))

simplify232.0ms

Counts
48 → 87
Calls

48 calls. Slowest were:

34.0ms
(+ (pow B 1/3) (+ (* 1/9 (pow (pow B 7) 1/3)) (* 13/405 (pow (pow B 13) 1/3))))
32.0ms
(+ (pow B 1/3) (+ (* 1/9 (pow (pow B 7) 1/3)) (* 13/405 (pow (pow B 13) 1/3))))
23.0ms
(+ (pow B 1/3) (+ (* 1/9 (pow (pow B 7) 1/3)) (* 13/405 (pow (pow B 13) 1/3))))

prune1.1s

Pruning

8 alts after pruning (7 fresh and 1 done)

Merged error: 0.0b

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

rewrite14.0ms

Algorithm
rewrite-expression-head
Counts
4 → 69
Calls

4 calls. Slowest were:

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

series700.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

200.0ms
(* (cbrt (sin B)) (cbrt (sin B)))
176.0ms
(cbrt (sin B))
174.0ms
(cbrt (sin B))
149.0ms
(cbrt (sin B))

simplify350.0ms

Counts
41 → 81
Calls

41 calls. Slowest were:

98.0ms
(- (pow B 1/3) (+ (* 1/18 (pow (pow B 7) 1/3)) (* 1/3240 (pow (pow B 13) 1/3))))
85.0ms
(- (pow B 1/3) (+ (* 1/18 (pow (pow B 7) 1/3)) (* 1/3240 (pow (pow B 13) 1/3))))
59.0ms
(- (pow B 1/3) (+ (* 1/18 (pow (pow B 7) 1/3)) (* 1/3240 (pow (pow B 13) 1/3))))

prune850.0ms

Pruning

7 alts after pruning (6 fresh and 1 done)

Merged error: 0.0b

regimes97.0ms

Accuracy

0% (0.6b remaining)

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

bsearch3.0ms

end0.0ms

sample9.2s

Algorithm
intervals