Average Error: 0.2 → 0.2
Time: 19.5s
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: 18.7s)Debug log

sample297.0ms

Algorithm
intervals

simplify67.0ms

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

prune15.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 0.1b

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

rewrite10.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
6.0ms
(- (/ 1 (sin B)) (/ x (tan B)))
2.0ms
(/ x (tan B))
1.0ms
(/ 1 (sin B))

series319.0ms

Counts
3 → 9
Calls
3 calls:
Slowest
150.0ms
(- (/ 1 (sin B)) (/ x (tan B)))
147.0ms
(/ x (tan B))
22.0ms
(/ 1 (sin B))

simplify290.0ms

Counts
24 → 55
Calls
24 calls:
Slowest
49.0ms
(- (/ 1 (sin B)) (/ (* x (cos B)) (sin B)))
43.0ms
(- (/ 1 (sin B)) (/ (* x (cos B)) (sin B)))
40.0ms
(- (+ (* 1/6 B) (/ 1 B)) (/ x B))
31.0ms
(+ (* 1/6 B) (+ (/ 1 B) (* 7/360 (pow B 3))))
29.0ms
(/ (exp (/ 1 (sin B))) (exp (/ x (tan B))))

prune594.0ms

Pruning

8 alts after pruning (8 fresh and 0 done)

Merged error: 0.0b

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

rewrite18.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
8.0ms
(/ (* x (cos B)) (sin B))
6.0ms
(- (/ 1 (sin B)) (/ (* x (cos B)) (sin B)))
2.0ms
(* x (cos B))
2.0ms
(/ 1 (sin B))

series303.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
127.0ms
(- (/ 1 (sin B)) (/ (* x (cos B)) (sin B)))
122.0ms
(/ (* x (cos B)) (sin B))
34.0ms
(* x (cos B))
21.0ms
(/ 1 (sin B))

simplify1.1s

Counts
43 → 77
Calls
43 calls:
Slowest
495.0ms
(/ (* (* (* x (cos B)) (* x (cos B))) (* x (cos B))) (* (* (sin B) (sin B)) (sin B)))
158.0ms
(- (* 1 (sin B)) (* (sin B) (* x (cos B))))
48.0ms
(- (/ 1 (sin B)) (/ (* x (cos B)) (sin B)))
37.0ms
(- (/ x B) (* 1/3 (* x B)))
36.0ms
(- (log (* x (cos B))) (log (sin B)))

prune779.0ms

Pruning

7 alts after pruning (6 fresh and 1 done)

Merged error: 0.0b

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

rewrite19.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
9.0ms
(- (/ 1 (sin B)) (/ 1 (/ (tan B) x)))
5.0ms
(/ (tan B) x)
2.0ms
(/ 1 (/ (tan B) x))
2.0ms
(/ 1 (sin B))

series289.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
119.0ms
(- (/ 1 (sin B)) (/ 1 (/ (tan B) x)))
98.0ms
(/ 1 (/ (tan B) x))
49.0ms
(/ (tan B) x)
23.0ms
(/ 1 (sin B))

simplify674.0ms

Counts
33 → 78
Calls
33 calls:
Slowest
65.0ms
(+ (/ B x) (+ (* 1/3 (/ (pow B 3) x)) (* 2/15 (/ (pow B 5) x))))
58.0ms
(/ (exp (/ 1 (sin B))) (exp (/ 1 (/ (tan B) x))))
51.0ms
(+ (* 1/6 B) (+ (/ 1 B) (* 7/360 (pow B 3))))
50.0ms
(- (/ 1 (sin B)) (/ 1 (/ (tan B) x)))
50.0ms
(- (/ 1 (sin B)) (/ (* x (cos B)) (sin B)))

prune674.0ms

Pruning

7 alts after pruning (5 fresh and 2 done)

Merged error: 0.0b

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

rewrite48.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
28.0ms
(/ (- (/ (tan B) x) (sin B)) (* (sin B) (/ (tan B) x)))
9.0ms
(* (sin B) (/ (tan B) x))
5.0ms
(/ (tan B) x)
5.0ms
(/ (tan B) x)

series464.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
223.0ms
(/ (- (/ (tan B) x) (sin B)) (* (sin B) (/ (tan B) x)))
105.0ms
(* (sin B) (/ (tan B) x))
69.0ms
(/ (tan B) x)
66.0ms
(/ (tan B) x)

simplify2.4s

Counts
48 → 88
Calls
48 calls:
Slowest
727.0ms
(/ (/ (tan B) x) (* (sin B) (/ (tan B) x)))
195.0ms
(- (log (- (/ (tan B) x) (sin B))) (+ (log (sin B)) (log (/ (tan B) x))))
149.0ms
(/ (* (* (- (/ (tan B) x) (sin B)) (- (/ (tan B) x) (sin B))) (- (/ (tan B) x) (sin B))) (* (* (* (sin B) (sin B)) (sin B)) (* (* (/ (tan B) x) (/ (tan B) x)) (/ (tan B) x))))
148.0ms
(* (* (* (sin B) (sin B)) (sin B)) (* (* (/ (tan B) x) (/ (tan B) x)) (/ (tan B) x)))
117.0ms
(- (log (- (/ (tan B) x) (sin B))) (log (* (sin B) (/ (tan B) x))))

prune957.0ms

Pruning

7 alts after pruning (5 fresh and 2 done)

Merged error: 0.0b

regimes106.0ms

Accuracy

0% (0.2b remaining)

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

bsearch2.0ms

end0.0ms

sample9.2s

Algorithm
intervals