Average Error: 0.2 → 0.7
Time: 26.6s
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: 25.7s)Debug log

sample283.0ms

Algorithm
intervals

simplify82.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

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

prune26.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 0.1b

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

rewrite15.0ms

Algorithm
rewrite-expression-head
Counts
3 → 76
Calls

3 calls. Slowest were:

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

series296.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

142.0ms
(/ x (tan B))
131.0ms
(- (/ 1 (sin B)) (/ x (tan B)))
23.0ms
(/ 1 (sin B))

simplify1.7s

Counts
66 → 85
Calls

66 calls. Slowest were:

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

prune848.0ms

Pruning

9 alts after pruning (9 fresh and 0 done)

Merged error: 0.0b

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

rewrite14.0ms

Algorithm
rewrite-expression-head
Counts
4 → 105
Calls

4 calls. Slowest were:

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

series274.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

120.0ms
(/ (* x (cos B)) (sin B))
102.0ms
(- (/ 1 (sin B)) (/ (* x (cos B)) (sin B)))
33.0ms
(* x (cos B))
18.0ms
(/ 1 (sin B))

simplify8.1s

Counts
101 → 117
Calls

101 calls. Slowest were:

508.0ms
(fma 1 (/ 1 (sin B)) (- (* (/ 1 (sin B)) (* x (cos B)))))
437.0ms
(fma 1 (/ 1 (sin B)) (- (* (/ 1 (sin B)) (* x (cos B)))))
435.0ms
(/ (* (* (* x (cos B)) (* x (cos B))) (* x (cos B))) (* (* (sin B) (sin B)) (sin B)))

prune1.2s

Pruning

8 alts after pruning (8 fresh and 0 done)

Merged error: 0.0b

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

series723.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

184.0ms
(* (cbrt (tan B)) (cbrt (tan B)))
183.0ms
(cbrt (tan B))
180.0ms
(cbrt (tan B))
176.0ms
(cbrt (tan B))

simplify241.0ms

Counts
48 → 87
Calls

48 calls. Slowest were:

33.0ms
(+ (pow B 1/3) (+ (* 1/9 (pow (pow B 7) 1/3)) (* 13/405 (pow (pow B 13) 1/3))))
33.0ms
(+ (pow B 1/3) (+ (* 1/9 (pow (pow B 7) 1/3)) (* 13/405 (pow (pow B 13) 1/3))))
28.0ms
(pow (/ (pow (sin B) 2) (pow (cos B) 2)) 1/3)

prune1.2s

Pruning

8 alts after pruning (7 fresh and 1 done)

Merged error: 0.0b

localize13.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:

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

series657.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

192.0ms
(* (cbrt (sin B)) (cbrt (sin B)))
167.0ms
(cbrt (sin B))
153.0ms
(cbrt (sin B))
145.0ms
(cbrt (sin B))

simplify372.0ms

Counts
41 → 81
Calls

41 calls. Slowest were:

95.0ms
(- (pow B 1/3) (+ (* 1/18 (pow (pow B 7) 1/3)) (* 1/3240 (pow (pow B 13) 1/3))))
86.0ms
(- (pow B 1/3) (+ (* 1/18 (pow (pow B 7) 1/3)) (* 1/3240 (pow (pow B 13) 1/3))))
62.0ms
(- (+ (pow B 2/3) (* 1/405 (pow (pow B 14) 1/3))) (* 1/9 (pow (pow B 8) 1/3)))

prune947.0ms

Pruning

7 alts after pruning (6 fresh and 1 done)

Merged error: 0.0b

regimes101.0ms

Accuracy

0% (0.6b remaining)

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

bsearch1.0ms

end0.0ms

sample8.5s

Algorithm
intervals