Average Error: 8.7 → 0.6
Time: 45.8s
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{1}{\frac{F}{\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.7

    \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right)\]
  2. Using strategy rm
  3. Applied associate-/r*8.7

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

    \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{1}{F} \cdot \tan \left(\pi \cdot \ell\right)}{F}}\]
  6. Simplified0.6

    \[\leadsto \pi \cdot \ell - \frac{\color{blue}{\frac{\tan \left(\pi \cdot \ell\right)}{F}}}{F}\]
  7. Using strategy rm
  8. Applied clear-num0.6

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

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

Reproduce

herbie shell --seed 2018365 +o rules:numerics
(FPCore (F l)
  :name "VandenBroeck and Keller, Equation (6)"
  (- (* PI l) (* (/ 1 (* F F)) (tan (* PI l)))))

Details

Time bar (total: 10.1s)Debug log

start1.7s

Algorithm
intervals

setup252.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 6.8b

localize19.0ms

Local error

Found 4 expressions with local error:

6.5b
(* (/ 1 (* F F)) (tan (* PI l)))
3.2b
(tan (* PI l))
0.9b
(/ 1 (* F F))
0.3b
(* PI l)

rewrite14.0ms

Algorithm
rewrite-expression-head
Counts
4 → 61
Calls

4 calls. Slowest were:

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

series224.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

123.0ms
(* (/ 1 (* F F)) (tan (* PI l)))
61.0ms
(tan (* PI l))
28.0ms
(* PI l)
12.0ms
(/ 1 (* F F))

simplify1.3s

Counts
27 → 73
Calls

27 calls. Slowest were:

350.0ms
(+ (/ (* PI l) (pow F 2)) (* 1/3 (/ (* (pow PI 3) (pow l 3)) (pow F 2))))
342.0ms
(+ (* 2/15 (* (pow PI 5) (pow l 5))) (+ (* 1/3 (* (pow PI 3) (pow l 3))) (* PI l)))
278.0ms
(* (* (* (/ 1 (* F F)) (/ 1 (* F F))) (/ 1 (* F F))) (* (* (tan (* PI l)) (tan (* PI l))) (tan (* PI l))))

prune745.0ms

Pruning

9 alts after pruning (9 fresh and 0 done)

Merged error: 5.7b

localize32.0ms

Local error

Found 4 expressions with local error:

6.2b
(/ (sin (* l PI)) (* (* F F) (cos (* PI l))))
3.1b
(sin (* l PI))
2.9b
(cos (* PI l))
0.3b
(* l PI)

rewrite12.0ms

Algorithm
rewrite-expression-head
Counts
4 → 51
Calls

4 calls. Slowest were:

8.0ms
(/ (sin (* l PI)) (* (* F F) (cos (* PI l))))
2.0ms
(sin (* l PI))
2.0ms
(cos (* PI l))

series154.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

94.0ms
(/ (sin (* l PI)) (* (* F F) (cos (* PI l))))
31.0ms
(* l PI)
17.0ms
(sin (* l PI))
11.0ms
(cos (* PI l))

simplify1.0s

Counts
25 → 63
Calls

25 calls. Slowest were:

209.0ms
(- (+ (* 1/24 (* (pow PI 4) (pow l 4))) 1) (* 1/2 (* (pow PI 2) (pow l 2))))
182.0ms
(- (+ (* 1/120 (* (pow PI 5) (pow l 5))) (* PI l)) (* 1/6 (* (pow PI 3) (pow l 3))))
144.0ms
(- (log (sin (* l PI))) (+ (log (* F F)) (log (cos (* PI l)))))

prune834.0ms

Pruning

9 alts after pruning (8 fresh and 1 done)

Merged error: 5.7b

localize10.0ms

Local error

Found 4 expressions with local error:

6.5b
(* (/ (/ 1 F) F) (tan (* PI l)))
3.2b
(tan (* PI l))
0.3b
(* PI l)
0.3b
(* PI l)

rewrite14.0ms

Algorithm
rewrite-expression-head
Counts
4 → 53
Calls

4 calls. Slowest were:

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

series224.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

108.0ms
(* (/ (/ 1 F) F) (tan (* PI l)))
46.0ms
(* PI l)
43.0ms
(tan (* PI l))
27.0ms
(* PI l)

simplify1.1s

Counts
25 → 65
Calls

25 calls. Slowest were:

364.0ms
(+ (/ (* PI l) (pow F 2)) (* 1/3 (/ (* (pow PI 3) (pow l 3)) (pow F 2))))
279.0ms
(+ (* 2/15 (* (pow PI 5) (pow l 5))) (+ (* 1/3 (* (pow PI 3) (pow l 3))) (* PI l)))
238.0ms
(* (* (* (/ (/ 1 F) F) (/ (/ 1 F) F)) (/ (/ 1 F) F)) (* (* (tan (* PI l)) (tan (* PI l))) (tan (* PI l))))

prune757.0ms

Pruning

11 alts after pruning (10 fresh and 1 done)

Merged error: 0.4b

localize10.0ms

Local error

Found 4 expressions with local error:

3.2b
(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 → 46
Calls

4 calls. Slowest were:

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

series227.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

94.0ms
(/ (tan (* PI l)) F)
48.0ms
(* PI l)
48.0ms
(tan (* PI l))
38.0ms
(* PI l)

simplify531.0ms

Counts
15 → 58
Calls

15 calls. Slowest were:

283.0ms
(+ (* 2/15 (* (pow PI 5) (pow l 5))) (+ (* 1/3 (* (pow PI 3) (pow l 3))) (* PI l)))
210.0ms
(+ (* 1/3 (/ (* (pow PI 3) (pow l 3)) F)) (+ (/ (* PI l) F) (* 2/15 (/ (* (pow PI 5) (pow l 5)) F))))
4.0ms
(/ (sin (* PI l)) (cos (* PI l)))

prune577.0ms

Pruning

11 alts after pruning (10 fresh and 1 done)

Merged error: 0.3b

regimes420.0ms

Accuracy

0% (0.2b remaining)

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

bsearch1.0ms