Average Error: 0.2 → 0.2
Time: 17.3s
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 \color{blue}{\frac{1}{\sin B} - \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 2019010 
(FPCore (B x)
  :name "VandenBroeck and Keller, Equation (24)"
  (+ (- (* x (/ 1 (tan B)))) (/ 1 (sin B))))

Details

Time bar (total: 16.6s)Debug log

sample182.0ms

Algorithm
intervals

simplify81.0ms

Counts
1 → 1
Calls
1 calls:
Slowest
81.0ms
(+ (- (* x (/ 1 (tan B)))) (/ 1 (sin B)))

prune11.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 0.1b

localize16.0ms

Local error

Found 3 expressions with local error:

0.2b
(/ x (tan B))
0.2b
(/ 1 (sin B))
0.0b
(- (/ 1 (sin B)) (/ x (tan B)))

rewrite7.0ms

Algorithm
rewrite-expression-head
Rules
*-un-lft-identity
add-sqr-sqrt
associate-/r*
add-log-exp
add-cube-cbrt
add-exp-log
pow1
div-inv
add-cbrt-cube
distribute-lft-out--
frac-2neg
clear-num
difference-of-squares
inv-pow
flip--
pow-flip
frac-sub
associate-/r/
tan-quot
diff-log
flip3--
sub-neg
rec-exp
Counts
3 → 46
Calls
3 calls:
Slowest
5.0ms
(- (/ 1 (sin B)) (/ x (tan B)))
1.0ms
(/ 1 (sin B))
1.0ms
(/ x (tan B))

series223.0ms

Counts
3 → 9
Calls
3 calls:
Slowest
122.0ms
(/ x (tan B))
86.0ms
(- (/ 1 (sin B)) (/ x (tan B)))
15.0ms
(/ 1 (sin B))

simplify256.0ms

Counts
24 → 55
Calls
24 calls:
Slowest
46.0ms
(- (/ 1 (sin B)) (/ (* x (cos B)) (sin B)))
43.0ms
(- (/ 1 (sin B)) (/ (* x (cos B)) (sin B)))
36.0ms
(- (+ (* 1/6 B) (/ 1 B)) (/ x B))
31.0ms
(+ (* 1/6 B) (+ (/ 1 B) (* 7/360 (pow B 3))))
25.0ms
(- (/ x B) (* 1/3 (* x B)))

prune477.0ms

Pruning

8 alts after pruning (8 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.2b
(/ 1 (sin B))
0.1b
(* x (cos B))
0.0b
(- (/ 1 (sin B)) (/ (* x (cos B)) (sin B)))

rewrite14.0ms

Algorithm
rewrite-expression-head
Rules
12×*-un-lft-identity
10×add-sqr-sqrt
add-cube-cbrt
add-exp-log
add-log-exp
div-inv
add-cbrt-cube
associate-/r*
pow1
associate-*r*
times-frac
distribute-lft-out--
distribute-rgt-out--
frac-2neg
clear-num
difference-of-squares
sub-div
inv-pow
associate-/l*
flip--
pow-flip
frac-sub
*-commutative
div-exp
diff-log
flip3--
sub-neg
rec-exp
cbrt-undiv
Counts
4 → 65
Calls
4 calls:
Slowest
7.0ms
(- (/ 1 (sin B)) (/ (* x (cos B)) (sin B)))
4.0ms
(/ (* x (cos B)) (sin B))
1.0ms
(* x (cos B))
1.0ms
(/ 1 (sin B))

series215.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
90.0ms
(/ (* x (cos B)) (sin B))
81.0ms
(- (/ 1 (sin B)) (/ (* x (cos B)) (sin B)))
29.0ms
(* x (cos B))
14.0ms
(/ 1 (sin B))

simplify892.0ms

Counts
43 → 77
Calls
43 calls:
Slowest
339.0ms
(/ (* (* (* x (cos B)) (* x (cos B))) (* x (cos B))) (* (* (sin B) (sin B)) (sin B)))
130.0ms
(- (* 1 (sin B)) (* (sin B) (* x (cos B))))
51.0ms
(/ (exp (/ 1 (sin B))) (exp (/ (* x (cos B)) (sin B))))
42.0ms
(- (/ 1 (sin B)) (/ (* x (cos B)) (sin B)))
40.0ms
(- (/ x B) (* 1/3 (* x B)))

prune646.0ms

Pruning

7 alts after pruning (6 fresh and 1 done)

Merged error: 0.0b

localize10.0ms

Local error

Found 4 expressions with local error:

0.3b
(/ 1 (/ (tan B) x))
0.2b
(/ (tan B) x)
0.2b
(/ 1 (sin B))
0.0b
(- (/ 1 (sin B)) (/ 1 (/ (tan B) x)))

rewrite16.0ms

Algorithm
rewrite-expression-head
Rules
11×*-un-lft-identity
add-sqr-sqrt
div-inv
add-cube-cbrt
associate-/r*
add-log-exp
add-exp-log
pow1
distribute-lft-out--
add-cbrt-cube
associate-/l*
frac-2neg
clear-num
inv-pow
pow-flip
rec-exp
associate-/l/
difference-of-squares
flip--
frac-sub
associate-/r/
tan-quot
diff-log
flip3--
sub-neg
Counts
4 → 66
Calls
4 calls:
Slowest
8.0ms
(- (/ 1 (sin B)) (/ 1 (/ (tan B) x)))
4.0ms
(/ (tan B) x)
2.0ms
(/ 1 (/ (tan B) x))
1.0ms
(/ 1 (sin B))

series284.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
141.0ms
(- (/ 1 (sin B)) (/ 1 (/ (tan B) x)))
82.0ms
(/ 1 (/ (tan B) x))
46.0ms
(/ (tan B) x)
14.0ms
(/ 1 (sin B))

simplify595.0ms

Counts
33 → 78
Calls
33 calls:
Slowest
89.0ms
(+ (/ B x) (+ (* 1/3 (/ (pow B 3) x)) (* 2/15 (/ (pow B 5) x))))
52.0ms
(/ (exp (/ 1 (sin B))) (exp (/ 1 (/ (tan B) x))))
49.0ms
(- (/ 1 (sin B)) (/ (* x (cos B)) (sin B)))
45.0ms
(- (+ (* 1/6 B) (/ 1 B)) (/ x B))
44.0ms
(- (/ 1 (sin B)) (/ 1 (/ (tan B) x)))

prune648.0ms

Pruning

7 alts after pruning (5 fresh and 2 done)

Merged error: 0.0b

localize8.0ms

Local error

Found 4 expressions with local error:

8.2b
(/ (- (/ (tan B) x) (sin B)) (* (sin B) (/ (tan B) x)))
0.3b
(* (sin B) (/ (tan B) x))
0.2b
(/ (tan B) x)
0.2b
(/ (tan B) x)

rewrite35.0ms

Algorithm
rewrite-expression-head
Rules
14×*-un-lft-identity
14×add-sqr-sqrt
11×associate-/l*
11×add-exp-log
11×add-cbrt-cube
10×add-cube-cbrt
pow1
times-frac
associate-/l/
add-log-exp
div-inv
associate-*r*
associate-*l*
frac-2neg
clear-num
difference-of-squares
distribute-lft-out--
cbrt-unprod
associate-*r/
tan-quot
prod-exp
div-exp
cbrt-undiv
flip--
*-commutative
associate-/r/
pow-prod-down
div-sub
flip3--
associate-/r*
Counts
4 → 76
Calls
4 calls:
Slowest
23.0ms
(/ (- (/ (tan B) x) (sin B)) (* (sin B) (/ (tan B) x)))
6.0ms
(* (sin B) (/ (tan B) x))
2.0ms
(/ (tan B) x)
2.0ms
(/ (tan B) x)

series385.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
196.0ms
(/ (- (/ (tan B) x) (sin B)) (* (sin B) (/ (tan B) x)))
72.0ms
(* (sin B) (/ (tan B) x))
69.0ms
(/ (tan B) x)
48.0ms
(/ (tan B) x)

simplify2.4s

Counts
48 → 88
Calls
48 calls:
Slowest
676.0ms
(/ (/ (tan B) x) (* (sin B) (/ (tan B) x)))
221.0ms
(- (log (- (/ (tan B) x) (sin B))) (+ (log (sin B)) (log (/ (tan B) x))))
180.0ms
(* (* (* (sin B) (sin B)) (sin B)) (* (* (/ (tan B) x) (/ (tan B) x)) (/ (tan B) x)))
151.0ms
(- (pow (/ (tan B) x) 3) (pow (sin B) 3))
119.0ms
(- (log (- (/ (tan B) x) (sin B))) (log (* (sin B) (/ (tan B) x))))

prune834.0ms

Pruning

7 alts after pruning (5 fresh and 2 done)

Merged error: 0.0b

regimes152.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.2s

Algorithm
intervals