Average Error: 8.8 → 0.7
Time: 29.1s
Precision: 64
Internal Precision: 128
\[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right)\]
\[\pi \cdot \ell - \frac{\frac{\frac{1}{F}}{\frac{1}{\tan \left(\pi \cdot \ell\right)}}}{F}\]

Error

Bits error versus F

Bits error versus l

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 8.8

    \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right)\]
  2. Simplified8.3

    \[\leadsto \color{blue}{\pi \cdot \ell - \frac{\tan \left(\pi \cdot \ell\right)}{F \cdot F}}\]
  3. Using strategy rm
  4. Applied associate-/r*0.6

    \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{\tan \left(\pi \cdot \ell\right)}{F}}{F}}\]
  5. Using strategy rm
  6. Applied *-un-lft-identity0.6

    \[\leadsto \pi \cdot \ell - \frac{\frac{\color{blue}{1 \cdot \tan \left(\pi \cdot \ell\right)}}{F}}{F}\]
  7. Applied associate-/l*0.6

    \[\leadsto \pi \cdot \ell - \frac{\color{blue}{\frac{1}{\frac{F}{\tan \left(\pi \cdot \ell\right)}}}}{F}\]
  8. Using strategy rm
  9. Applied div-inv0.7

    \[\leadsto \pi \cdot \ell - \frac{\frac{1}{\color{blue}{F \cdot \frac{1}{\tan \left(\pi \cdot \ell\right)}}}}{F}\]
  10. Applied associate-/r*0.7

    \[\leadsto \pi \cdot \ell - \frac{\color{blue}{\frac{\frac{1}{F}}{\frac{1}{\tan \left(\pi \cdot \ell\right)}}}}{F}\]
  11. Final simplification0.7

    \[\leadsto \pi \cdot \ell - \frac{\frac{\frac{1}{F}}{\frac{1}{\tan \left(\pi \cdot \ell\right)}}}{F}\]

Reproduce

herbie shell --seed 2019007 
(FPCore (F l)
  :name "VandenBroeck and Keller, Equation (6)"
  (- (* PI l) (* (/ 1 (* F F)) (tan (* PI l)))))

Details

Time bar (total: 28.2s)Debug log

sample925.0ms

Algorithm
intervals

simplify228.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

227.0ms
(- (* PI l) (* (/ 1 (* F F)) (tan (* PI l))))

prune14.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 7.0b

localize26.0ms

Local error

Found 4 expressions with local error:

6.6b
(/ (tan (* PI l)) (* F F))
3.6b
(tan (* PI l))
0.3b
(* PI l)
0.3b
(* PI l)

rewrite10.0ms

Algorithm
rewrite-expression-head
Counts
4 → 44
Calls

4 calls. Slowest were:

6.0ms
(/ (tan (* PI l)) (* F F))
2.0ms
(tan (* PI l))
0.0ms
(* PI l)

series245.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

104.0ms
(/ (tan (* PI l)) (* F F))
69.0ms
(tan (* PI l))
44.0ms
(* PI l)
28.0ms
(* PI l)

simplify920.0ms

Counts
23 → 56
Calls

23 calls. Slowest were:

449.0ms
(+ (/ (* PI l) (pow F 2)) (+ (* 2/15 (/ (* (pow PI 5) (pow l 5)) (pow F 2))) (* 1/3 (/ (* (pow PI 3) (pow l 3)) (pow F 2)))))
224.0ms
(+ (* 2/15 (* (pow PI 5) (pow l 5))) (+ (* 1/3 (* (pow PI 3) (pow l 3))) (* PI l)))
141.0ms
(/ (* (* (tan (* PI l)) (tan (* PI l))) (tan (* PI l))) (* (* (* F F) (* F F)) (* F F)))

prune636.0ms

Pruning

10 alts after pruning (10 fresh and 0 done)

Merged error: 0.4b

localize18.0ms

Local error

Found 4 expressions with local error:

3.6b
(tan (* PI l))
0.3b
(* PI l)
0.3b
(* PI l)
0.2b
(/ (tan (* PI l)) F)

rewrite6.0ms

Algorithm
rewrite-expression-head
Counts
4 → 38
Calls

4 calls. Slowest were:

4.0ms
(/ (tan (* PI l)) F)
2.0ms
(tan (* PI l))
0.0ms
(* PI l)

series207.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

93.0ms
(/ (tan (* PI l)) F)
44.0ms
(tan (* PI l))
38.0ms
(* PI l)
31.0ms
(* PI l)

simplify498.0ms

Counts
15 → 50
Calls

15 calls. Slowest were:

301.0ms
(+ (* 2/15 (* (pow PI 5) (pow l 5))) (+ (* 1/3 (* (pow PI 3) (pow l 3))) (* PI l)))
152.0ms
(+ (* 1/3 (/ (* (pow PI 3) (pow l 3)) F)) (+ (/ (* PI l) F) (* 2/15 (/ (* (pow PI 5) (pow l 5)) F))))
5.0ms
(/ (sin (* PI l)) (* F (cos (* PI l))))

prune478.0ms

Pruning

12 alts after pruning (12 fresh and 0 done)

Merged error: 0.4b

localize11.0ms

Local error

Found 4 expressions with local error:

3.6b
(tan (* PI l))
0.3b
(* PI l)
0.3b
(* PI l)
0.2b
(* (tan (* PI l)) (/ 1 F))

rewrite11.0ms

Algorithm
rewrite-expression-head
Counts
4 → 46
Calls

4 calls. Slowest were:

9.0ms
(* (tan (* PI l)) (/ 1 F))
2.0ms
(tan (* PI l))
0.0ms
(* PI l)

series269.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

112.0ms
(* (tan (* PI l)) (/ 1 F))
62.0ms
(tan (* PI l))
47.0ms
(* PI l)
47.0ms
(* PI l)

simplify893.0ms

Counts
24 → 58
Calls

24 calls. Slowest were:

435.0ms
(* (* (* (tan (* PI l)) (tan (* PI l))) (tan (* PI l))) (* (* (/ 1 F) (/ 1 F)) (/ 1 F)))
199.0ms
(+ (* 2/15 (* (pow PI 5) (pow l 5))) (+ (* 1/3 (* (pow PI 3) (pow l 3))) (* PI l)))
151.0ms
(+ (* 1/3 (/ (* (pow PI 3) (pow l 3)) F)) (+ (/ (* PI l) F) (* 2/15 (/ (* (pow PI 5) (pow l 5)) F))))

prune586.0ms

Pruning

13 alts after pruning (12 fresh and 1 done)

Merged error: 0.4b

localize11.0ms

Local error

Found 4 expressions with local error:

3.6b
(tan (* PI l))
0.7b
(/ 1 (/ F (tan (* PI l))))
0.3b
(* PI l)
0.3b
(* PI l)

rewrite4.0ms

Algorithm
rewrite-expression-head
Counts
4 → 43
Calls

4 calls. Slowest were:

2.0ms
(tan (* PI l))
1.0ms
(/ 1 (/ F (tan (* PI l))))
0.0ms
(* PI l)

series281.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

145.0ms
(/ 1 (/ F (tan (* PI l))))
52.0ms
(tan (* PI l))
48.0ms
(* PI l)
36.0ms
(* PI l)

simplify465.0ms

Counts
19 → 55
Calls

19 calls. Slowest were:

270.0ms
(+ (* 2/15 (* (pow PI 5) (pow l 5))) (+ (* 1/3 (* (pow PI 3) (pow l 3))) (* PI l)))
131.0ms
(+ (* 1/3 (/ (* (pow PI 3) (pow l 3)) F)) (/ (* PI l) F))
5.0ms
(/ (sin (* PI l)) (* F (cos (* PI l))))

prune505.0ms

Pruning

11 alts after pruning (11 fresh and 0 done)

Merged error: 0.4b

regimes376.0ms

Accuracy

0% (0.2b remaining)

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

bsearch3.0ms

end0.0ms

sample20.5s

Algorithm
intervals