Average Error: 8.4 → 0.7
Time: 28.7s
Precision: 64
Internal Precision: 128
\[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right)\]
\[\pi \cdot \ell - \frac{\tan \left(\pi \cdot \ell\right)}{F} \cdot \frac{1}{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.4

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

    \[\leadsto \color{blue}{\pi \cdot \ell - \frac{\tan \left(\pi \cdot \ell\right)}{F \cdot F}}\]
  3. Using strategy rm
  4. Applied *-un-lft-identity7.9

    \[\leadsto \pi \cdot \ell - \frac{\color{blue}{1 \cdot \tan \left(\pi \cdot \ell\right)}}{F \cdot F}\]
  5. Applied times-frac0.7

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

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

Reproduce

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

Details

Time bar (total: 27.7s)Debug log

sample974.0ms

Algorithm
intervals

simplify135.0ms

Counts
1 → 1
Calls
1 calls:
Slowest
135.0ms
(- (* PI l) (* (/ 1 (* F F)) (tan (* PI l))))

prune13.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 7.8b

localize17.0ms

Local error

Found 4 expressions with local error:

7.6b
(/ (tan (* PI l)) (* F F))
2.6b
(tan (* PI l))
0.3b
(* PI l)
0.3b
(* PI l)

rewrite11.0ms

Algorithm
rewrite-expression-head
Rules
add-cube-cbrt
add-exp-log
add-cbrt-cube
*-un-lft-identity
add-sqr-sqrt
add-log-exp
pow1
associate-/l*
times-frac
*-commutative
tan-quot
associate-/l/
div-inv
div-exp
frac-2neg
associate-/r*
clear-num
cbrt-undiv
Counts
4 → 44
Calls
4 calls:
Slowest
7.0ms
(/ (tan (* PI l)) (* F F))
2.0ms
(tan (* PI l))
0.0ms
(* PI l)
0.0ms
(* PI l)

series220.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
100.0ms
(/ (tan (* PI l)) (* F F))
45.0ms
(tan (* PI l))
37.0ms
(* PI l)
37.0ms
(* PI l)

simplify993.0ms

Counts
23 → 56
Calls
23 calls:
Slowest
395.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)))))
279.0ms
(+ (* 2/15 (* (pow PI 5) (pow l 5))) (+ (* 1/3 (* (pow PI 3) (pow l 3))) (* PI l)))
208.0ms
(/ (* (* (tan (* PI l)) (tan (* PI l))) (tan (* PI l))) (* (* (* F F) (* F F)) (* F F)))
30.0ms
(- (log (tan (* PI l))) (log (* F F)))
19.0ms
(/ (sin (* PI l)) (* (pow F 2) (cos (* PI l))))

prune558.0ms

Pruning

12 alts after pruning (12 fresh and 0 done)

Merged error: 0.2b

localize19.0ms

Local error

Found 4 expressions with local error:

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

rewrite9.0ms

Algorithm
rewrite-expression-head
Rules
add-cube-cbrt
*-un-lft-identity
add-sqr-sqrt
add-log-exp
add-exp-log
add-cbrt-cube
pow1
associate-/l*
*-commutative
tan-quot
associate-/l/
div-inv
frac-2neg
clear-num
Counts
4 → 38
Calls
4 calls:
Slowest
5.0ms
(/ (tan (* PI l)) F)
3.0ms
(tan (* PI l))
0.0ms
(* PI l)
0.0ms
(* PI l)

series235.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
89.0ms
(/ (tan (* PI l)) F)
50.0ms
(tan (* PI l))
49.0ms
(* PI l)
48.0ms
(* PI l)

simplify470.0ms

Counts
15 → 50
Calls
15 calls:
Slowest
247.0ms
(+ (* 2/15 (* (pow PI 5) (pow l 5))) (+ (* 1/3 (* (pow PI 3) (pow l 3))) (* PI l)))
182.0ms
(+ (* 1/3 (/ (* (pow PI 3) (pow l 3)) F)) (+ (/ (* PI l) F) (* 2/15 (/ (* (pow PI 5) (pow l 5)) F))))
4.0ms
(* PI l)
4.0ms
(/ (sin (* PI l)) (cos (* PI l)))
4.0ms
(/ (sin (* PI l)) (cos (* PI l)))

prune495.0ms

Pruning

11 alts after pruning (11 fresh and 0 done)

Merged error: 0.2b

localize11.0ms

Local error

Found 4 expressions with local error:

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

rewrite6.0ms

Algorithm
rewrite-expression-head
Rules
add-cube-cbrt
*-un-lft-identity
add-sqr-sqrt
add-log-exp
add-exp-log
add-cbrt-cube
pow1
associate-/l*
*-commutative
tan-quot
associate-/l/
div-inv
frac-2neg
clear-num
Counts
4 → 38
Calls
4 calls:
Slowest
4.0ms
(/ (tan (* PI l)) F)
2.0ms
(tan (* PI l))
0.0ms
(* PI l)
0.0ms
(* PI l)

series248.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
94.0ms
(/ (tan (* PI l)) F)
65.0ms
(tan (* PI l))
44.0ms
(* PI l)
44.0ms
(* PI l)

simplify442.0ms

Counts
15 → 50
Calls
15 calls:
Slowest
231.0ms
(+ (* 2/15 (* (pow PI 5) (pow l 5))) (+ (* 1/3 (* (pow PI 3) (pow l 3))) (* PI l)))
167.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)) (cos (* PI l)))
4.0ms
(* (cbrt (tan (* PI l))) (cbrt (tan (* PI l))))
4.0ms
(/ (sin (* PI l)) (cos (* PI l)))

prune515.0ms

Pruning

11 alts after pruning (10 fresh and 1 done)

Merged error: 0.2b

localize9.0ms

Local error

Found 4 expressions with local error:

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

rewrite9.0ms

Algorithm
rewrite-expression-head
Rules
add-cube-cbrt
add-exp-log
add-cbrt-cube
*-un-lft-identity
pow1
add-sqr-sqrt
add-log-exp
associate-*r*
*-commutative
tan-quot
associate-*l*
div-inv
cbrt-unprod
un-div-inv
associate-*r/
prod-exp
associate-*l/
pow-prod-down
frac-times
Counts
4 → 46
Calls
4 calls:
Slowest
6.0ms
(* (tan (* PI l)) (/ 1 F))
2.0ms
(tan (* PI l))
0.0ms
(* PI l)
0.0ms
(* PI l)

series219.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
106.0ms
(* (tan (* PI l)) (/ 1 F))
52.0ms
(tan (* PI l))
32.0ms
(* PI l)
29.0ms
(* PI l)

simplify922.0ms

Counts
24 → 58
Calls
24 calls:
Slowest
376.0ms
(* (* (* (tan (* PI l)) (tan (* PI l))) (tan (* PI l))) (* (* (/ 1 F) (/ 1 F)) (/ 1 F)))
296.0ms
(+ (* 2/15 (* (pow PI 5) (pow l 5))) (+ (* 1/3 (* (pow PI 3) (pow l 3))) (* PI l)))
144.0ms
(+ (* 1/3 (/ (* (pow PI 3) (pow l 3)) F)) (+ (/ (* PI l) F) (* 2/15 (/ (* (pow PI 5) (pow l 5)) F))))
24.0ms
(* (tan (* PI l)) (/ 1 F))
23.0ms
(+ (log (tan (* PI l))) (log (/ 1 F)))

prune598.0ms

Pruning

12 alts after pruning (10 fresh and 2 done)

Merged error: 0.2b

regimes308.0ms

Accuracy

0% (0.2b remaining)

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

bsearch2.0ms

end0.0ms

sample20.3s

Algorithm
intervals