Average Error: 0.2 → 0.2
Time: 15.7s
Precision: 64
Internal Precision: 128
\[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{1}{\sin B}\]
\[\frac{1}{\sin B} - \frac{x \cdot \cos B}{\sin 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. Taylor expanded around inf 0.2

    \[\leadsto \frac{1}{\sin B} - \color{blue}{\frac{x \cdot \cos B}{\sin B}}\]
  4. Final simplification0.2

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

Reproduce

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

Details

Time bar (total: 14.8s)Debug log

sample161.0ms

Algorithm
intervals

simplify111.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

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

prune20.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 0.1b

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

rewrite13.0ms

Algorithm
rewrite-expression-head
Counts
3 → 46
Calls

3 calls. Slowest were:

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

series227.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

114.0ms
(/ x (tan B))
98.0ms
(- (/ 1 (sin B)) (/ x (tan B)))
14.0ms
(/ 1 (sin B))

simplify193.0ms

Counts
24 → 55
Calls

24 calls. Slowest were:

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

prune343.0ms

Pruning

8 alts after pruning (8 fresh and 0 done)

Merged error: 0.0b

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

rewrite11.0ms

Algorithm
rewrite-expression-head
Counts
4 → 65
Calls

4 calls. Slowest were:

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

series208.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

88.0ms
(/ (* x (cos B)) (sin B))
79.0ms
(- (/ 1 (sin B)) (/ (* x (cos B)) (sin B)))
28.0ms
(* x (cos B))
13.0ms
(/ 1 (sin B))

simplify747.0ms

Counts
43 → 77
Calls

43 calls. Slowest were:

344.0ms
(/ (* (* (* x (cos B)) (* x (cos B))) (* x (cos B))) (* (* (sin B) (sin B)) (sin B)))
110.0ms
(- (* 1 (sin B)) (* (sin B) (* x (cos B))))
28.0ms
(/ (exp (/ 1 (sin B))) (exp (/ (* x (cos B)) (sin B))))

prune637.0ms

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 (tan B))
0.6b
(cbrt (tan B))
0.6b
(cbrt (tan B))
0.4b
(* (cbrt (tan B)) (cbrt (tan B)))

rewrite7.0ms

Algorithm
rewrite-expression-head
Counts
4 → 67
Calls

4 calls. Slowest were:

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

series549.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

148.0ms
(cbrt (tan B))
139.0ms
(cbrt (tan B))
137.0ms
(* (cbrt (tan B)) (cbrt (tan B)))
125.0ms
(cbrt (tan B))

simplify157.0ms

Counts
48 → 79
Calls

48 calls. Slowest were:

22.0ms
(+ (pow B 2/3) (+ (* 31/405 (pow (pow B 14) 1/3)) (* 2/9 (pow (pow B 8) 1/3))))
21.0ms
(pow (/ (pow (sin B) 2) (pow (cos B) 2)) 1/3)
20.0ms
(pow (/ (pow (sin B) 2) (pow (cos B) 2)) 1/3)

prune659.0ms

Pruning

8 alts after pruning (6 fresh and 2 done)

Merged error: 0.0b

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

rewrite12.0ms

Algorithm
rewrite-expression-head
Counts
4 → 61
Calls

4 calls. Slowest were:

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

series619.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

181.0ms
(cbrt (sin B))
170.0ms
(cbrt (sin B))
148.0ms
(cbrt (sin B))
120.0ms
(* (cbrt (sin B)) (cbrt (sin B)))

simplify248.0ms

Counts
41 → 73
Calls

41 calls. Slowest were:

72.0ms
(- (pow B 1/3) (+ (* 1/18 (pow (pow B 7) 1/3)) (* 1/3240 (pow (pow B 13) 1/3))))
47.0ms
(- (pow B 1/3) (+ (* 1/18 (pow (pow B 7) 1/3)) (* 1/3240 (pow (pow B 13) 1/3))))
42.0ms
(- (pow B 1/3) (+ (* 1/18 (pow (pow B 7) 1/3)) (* 1/3240 (pow (pow B 13) 1/3))))

prune693.0ms

Pruning

7 alts after pruning (5 fresh and 2 done)

Merged error: 0.0b

regimes125.0ms

Accuracy

0% (0.2b remaining)

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

bsearch1.0ms

end0.0ms

sample9.0s

Algorithm
intervals