Average Error: 8.4 → 0.6
Time: 34.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{1}{\left(\cos \left(\pi \cdot \ell\right) \cdot F\right) \cdot \frac{F}{\sin \left(\pi \cdot \ell\right)}}\]

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. Simplified8.4

    \[\leadsto \color{blue}{(\left(\tan \left(\pi \cdot \ell\right)\right) \cdot \left(\frac{-1}{F \cdot F}\right) + \left(\pi \cdot \ell\right))_*}\]
  3. Taylor expanded around -inf 8.0

    \[\leadsto \color{blue}{\pi \cdot \ell - \frac{\sin \left(\pi \cdot \ell\right)}{{F}^{2} \cdot \cos \left(\pi \cdot \ell\right)}}\]
  4. Using strategy rm
  5. Applied expm1-log1p-u8.0

    \[\leadsto \pi \cdot \ell - \frac{\sin \left(\pi \cdot \ell\right)}{{F}^{2} \cdot \color{blue}{(e^{\log_* (1 + \cos \left(\pi \cdot \ell\right))} - 1)^*}}\]
  6. Using strategy rm
  7. Applied clear-num8.0

    \[\leadsto \pi \cdot \ell - \color{blue}{\frac{1}{\frac{{F}^{2} \cdot (e^{\log_* (1 + \cos \left(\pi \cdot \ell\right))} - 1)^*}{\sin \left(\pi \cdot \ell\right)}}}\]
  8. Using strategy rm
  9. Applied *-un-lft-identity8.0

    \[\leadsto \pi \cdot \ell - \frac{1}{\color{blue}{1 \cdot \frac{{F}^{2} \cdot (e^{\log_* (1 + \cos \left(\pi \cdot \ell\right))} - 1)^*}{\sin \left(\pi \cdot \ell\right)}}}\]
  10. Applied associate-/r*8.0

    \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{1}{1}}{\frac{{F}^{2} \cdot (e^{\log_* (1 + \cos \left(\pi \cdot \ell\right))} - 1)^*}{\sin \left(\pi \cdot \ell\right)}}}\]
  11. Simplified0.6

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

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

Reproduce

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

Details

Time bar (total: 33.5s)Debug log

sample672.0ms

Algorithm
intervals

simplify227.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

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

prune19.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 6.0b

localize33.0ms

Local error

Found 4 expressions with local error:

5.7b
(fma (tan (* PI l)) (/ -1 (* F F)) (* PI l))
4.6b
(tan (* PI l))
0.7b
(/ -1 (* F F))
0.3b
(* PI l)

rewrite17.0ms

Algorithm
rewrite-expression-head
Counts
4 → 43
Calls

4 calls. Slowest were:

3.0ms
(tan (* PI l))
2.0ms
(fma (tan (* PI l)) (/ -1 (* F F)) (* PI l))
1.0ms
(/ -1 (* F F))

series210.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

114.0ms
(fma (tan (* PI l)) (/ -1 (* F F)) (* PI l))
46.0ms
(tan (* PI l))
33.0ms
(* PI l)
16.0ms
(/ -1 (* F F))

simplify895.0ms

Counts
12 → 55
Calls

12 calls. Slowest were:

506.0ms
(- (* PI l) (+ (/ (* PI l) (pow F 2)) (* 1/3 (/ (* (pow PI 3) (pow l 3)) (pow F 2)))))
245.0ms
(+ (* 2/15 (* (pow PI 5) (pow l 5))) (+ (* 1/3 (* (pow PI 3) (pow l 3))) (* PI l)))
61.0ms
(- (* PI l) (/ (sin (* PI l)) (* (pow F 2) (cos (* PI l)))))

prune614.0ms

Pruning

10 alts after pruning (10 fresh and 0 done)

Merged error: 5.6b

localize18.0ms

Local error

Found 4 expressions with local error:

5.7b
(/ (sin (* PI l)) (* (pow F 2) (cos (* PI l))))
4.5b
(sin (* PI l))
4.4b
(cos (* PI l))
0.3b
(* PI l)

rewrite15.0ms

Algorithm
rewrite-expression-head
Counts
4 → 52
Calls

4 calls. Slowest were:

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

series182.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

94.0ms
(/ (sin (* PI l)) (* (pow F 2) (cos (* PI l))))
48.0ms
(* PI l)
22.0ms
(sin (* PI l))
18.0ms
(cos (* PI l))

simplify1.3s

Counts
26 → 64
Calls

26 calls. Slowest were:

249.0ms
(- (+ (* 1/120 (* (pow PI 5) (pow l 5))) (* PI l)) (* 1/6 (* (pow PI 3) (pow l 3))))
219.0ms
(- (+ (* 1/24 (* (pow PI 4) (pow l 4))) 1) (* 1/2 (* (pow PI 2) (pow l 2))))
145.0ms
(- (log (sin (* PI l))) (+ (log (pow F 2)) (log (cos (* PI l)))))

prune717.0ms

Pruning

11 alts after pruning (11 fresh and 0 done)

Merged error: 5.2b

localize24.0ms

Local error

Found 4 expressions with local error:

5.7b
(/ (sin (* PI l)) (* (pow F 2) (expm1 (log1p (cos (* PI l))))))
4.5b
(sin (* PI l))
4.4b
(cos (* PI l))
0.3b
(* PI l)

rewrite23.0ms

Algorithm
rewrite-expression-head
Counts
4 → 52
Calls

4 calls. Slowest were:

15.0ms
(/ (sin (* PI l)) (* (pow F 2) (expm1 (log1p (cos (* PI l))))))
3.0ms
(cos (* PI l))
3.0ms
(sin (* PI l))

series244.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

173.0ms
(/ (sin (* PI l)) (* (pow F 2) (expm1 (log1p (cos (* PI l))))))
27.0ms
(sin (* PI l))
26.0ms
(* PI l)
18.0ms
(cos (* PI l))

simplify1.1s

Counts
26 → 64
Calls

26 calls. Slowest were:

236.0ms
(- (+ (* 1/24 (* (pow PI 4) (pow l 4))) 1) (* 1/2 (* (pow PI 2) (pow l 2))))
183.0ms
(- (+ (* 1/120 (* (pow PI 5) (pow l 5))) (* PI l)) (* 1/6 (* (pow PI 3) (pow l 3))))
132.0ms
(- (log (sin (* PI l))) (log (* (pow F 2) (expm1 (log1p (cos (* PI l)))))))

prune915.0ms

Pruning

11 alts after pruning (10 fresh and 1 done)

Merged error: 5.2b

localize19.0ms

Local error

Found 4 expressions with local error:

5.5b
(/ (* (pow F 2) (expm1 (log1p (cos (* PI l))))) (sin (* PI l)))
4.5b
(sin (* PI l))
4.4b
(cos (* PI l))
0.4b
(/ 1 (/ (* (pow F 2) (expm1 (log1p (cos (* PI l))))) (sin (* PI l))))

rewrite27.0ms

Algorithm
rewrite-expression-head
Counts
4 → 68
Calls

4 calls. Slowest were:

14.0ms
(/ (* (pow F 2) (expm1 (log1p (cos (* PI l))))) (sin (* PI l)))
5.0ms
(/ 1 (/ (* (pow F 2) (expm1 (log1p (cos (* PI l))))) (sin (* PI l))))
3.0ms
(cos (* PI l))

series337.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

153.0ms
(/ (* (pow F 2) (expm1 (log1p (cos (* PI l))))) (sin (* PI l)))
152.0ms
(/ 1 (/ (* (pow F 2) (expm1 (log1p (cos (* PI l))))) (sin (* PI l))))
16.0ms
(cos (* PI l))
15.0ms
(sin (* PI l))

simplify2.8s

Counts
36 → 80
Calls

36 calls. Slowest were:

1.1s
(/ (* (* (* (pow F 2) (expm1 (log1p (cos (* PI l))))) (* (pow F 2) (expm1 (log1p (cos (* PI l)))))) (* (pow F 2) (expm1 (log1p (cos (* PI l)))))) (* (* (sin (* PI l)) (sin (* PI l))) (sin (* PI l))))
331.0ms
(+ (/ (* PI l) (pow F 2)) (* 1/3 (/ (* (pow PI 3) (pow l 3)) (pow F 2))))
312.0ms
(- (/ (pow F 2) (* PI l)) (* 1/3 (* (pow F 2) (* PI l))))

prune1.3s

Pruning

10 alts after pruning (9 fresh and 1 done)

Merged error: 0.2b

regimes708.0ms

Accuracy

0% (0.1b remaining)

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

bsearch2.0ms

end0.0ms

sample21.1s

Algorithm
intervals