Average Error: 8.5 → 0.8
Time: 28.5s
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) \cdot \frac{1}{F}}{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.5

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

    \[\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.7

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

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

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

Reproduce

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

Details

Time bar (total: 27.4s)Debug log

sample792.0ms

Algorithm
intervals
Results
498.0ms223×body10240exit
61.0ms289×body80valid
4.0msbody160valid

simplify199.0ms

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

prune14.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 7.3b

localize16.0ms

Local error

Found 4 expressions with local error:

7.0b
(/ (tan (* PI l)) (* F F))
4.2b
(tan (* PI l))
0.2b
(* PI l)
0.2b
(* PI l)

rewrite13.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))
3.0ms
(tan (* PI l))
0.0ms
(* PI l)
0.0ms
(* PI l)

series261.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
130.0ms
(/ (tan (* PI l)) (* F F))
63.0ms
(tan (* PI l))
41.0ms
(* PI l)
27.0ms
(* PI l)

simplify895.0ms

Counts
23 → 56
Calls
23 calls:
Slowest
398.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)))))
228.0ms
(+ (* 2/15 (* (pow PI 5) (pow l 5))) (+ (* 1/3 (* (pow PI 3) (pow l 3))) (* PI l)))
178.0ms
(/ (* (* (tan (* PI l)) (tan (* PI l))) (tan (* PI l))) (* (* (* F F) (* F F)) (* F F)))
20.0ms
(- (log (tan (* PI l))) (log (* F F)))
9.0ms
(/ (sin (* PI l)) (* (pow F 2) (cos (* PI l))))

prune549.0ms

Pruning

10 alts after pruning (9 fresh and 1 done)

Merged error: 0.3b

localize13.0ms

Local error

Found 4 expressions with local error:

4.2b
(tan (* PI l))
0.2b
(* PI l)
0.2b
(* 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)

series187.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
74.0ms
(/ (tan (* PI l)) F)
52.0ms
(tan (* PI l))
37.0ms
(* PI l)
25.0ms
(* PI l)

simplify444.0ms

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

prune478.0ms

Pruning

12 alts after pruning (11 fresh and 1 done)

Merged error: 0.3b

localize7.0ms

Local error

Found 4 expressions with local error:

4.2b
(tan (* PI l))
0.2b
(* PI l)
0.2b
(* 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)

series185.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
79.0ms
(/ (tan (* PI l)) F)
41.0ms
(* PI l)
37.0ms
(tan (* PI l))
28.0ms
(* PI l)

simplify433.0ms

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

prune502.0ms

Pruning

11 alts after pruning (10 fresh and 1 done)

Merged error: 0.3b

localize8.0ms

Local error

Found 4 expressions with local error:

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

rewrite10.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
7.0ms
(* (tan (* PI l)) (/ 1 F))
2.0ms
(tan (* PI l))
0.0ms
(* PI l)
0.0ms
(* PI l)

series215.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
92.0ms
(* (tan (* PI l)) (/ 1 F))
49.0ms
(tan (* PI l))
44.0ms
(* PI l)
31.0ms
(* PI l)

simplify856.0ms

Counts
24 → 58
Calls
24 calls:
Slowest
355.0ms
(* (* (* (tan (* PI l)) (tan (* PI l))) (tan (* PI l))) (* (* (/ 1 F) (/ 1 F)) (/ 1 F)))
209.0ms
(+ (* 2/15 (* (pow PI 5) (pow l 5))) (+ (* 1/3 (* (pow PI 3) (pow l 3))) (* PI l)))
179.0ms
(+ (* 1/3 (/ (* (pow PI 3) (pow l 3)) F)) (+ (/ (* PI l) F) (* 2/15 (/ (* (pow PI 5) (pow l 5)) F))))
25.0ms
(+ (log (tan (* PI l))) (log (/ 1 F)))
23.0ms
(* (tan (* PI l)) (/ 1 F))

prune482.0ms

Pruning

13 alts after pruning (11 fresh and 2 done)

Merged error: 0.3b

regimes389.0ms

Accuracy

0% (0.2b remaining)

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

bsearch3.0ms

end0.0ms

sample20.4s

Algorithm
intervals
Results
18.1s7639×body10240exit
1.9s8943×body80valid
128.0ms280×body160valid