Average Error: 17.1 → 0.8
Time: 8.5s
Precision: binary64
\[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
\[\pi \cdot \ell + \frac{\frac{-1}{F}}{\frac{F}{\pi \cdot \ell} - \left(0.3333333333333333 \cdot \left(\pi \cdot \left(\ell \cdot F\right)\right) + \left(0.0021164021164021165 \cdot \left({\pi}^{5} \cdot \log \left({\left(e^{{\ell}^{5}}\right)}^{F}\right)\right) + 0.022222222222222223 \cdot \left({\pi}^{3} \cdot \left(F \cdot {\ell}^{3}\right)\right)\right)\right)} \]
(FPCore (F l)
 :precision binary64
 (- (* PI l) (* (/ 1.0 (* F F)) (tan (* PI l)))))
(FPCore (F l)
 :precision binary64
 (+
  (* PI l)
  (/
   (/ -1.0 F)
   (-
    (/ F (* PI l))
    (+
     (* 0.3333333333333333 (* PI (* l F)))
     (+
      (*
       0.0021164021164021165
       (* (pow PI 5.0) (log (pow (exp (pow l 5.0)) F))))
      (* 0.022222222222222223 (* (pow PI 3.0) (* F (pow l 3.0))))))))))
double code(double F, double l) {
	return (((double) M_PI) * l) - ((1.0 / (F * F)) * tan((((double) M_PI) * l)));
}
double code(double F, double l) {
	return (((double) M_PI) * l) + ((-1.0 / F) / ((F / (((double) M_PI) * l)) - ((0.3333333333333333 * (((double) M_PI) * (l * F))) + ((0.0021164021164021165 * (pow(((double) M_PI), 5.0) * log(pow(exp(pow(l, 5.0)), F)))) + (0.022222222222222223 * (pow(((double) M_PI), 3.0) * (F * pow(l, 3.0))))))));
}
public static double code(double F, double l) {
	return (Math.PI * l) - ((1.0 / (F * F)) * Math.tan((Math.PI * l)));
}
public static double code(double F, double l) {
	return (Math.PI * l) + ((-1.0 / F) / ((F / (Math.PI * l)) - ((0.3333333333333333 * (Math.PI * (l * F))) + ((0.0021164021164021165 * (Math.pow(Math.PI, 5.0) * Math.log(Math.pow(Math.exp(Math.pow(l, 5.0)), F)))) + (0.022222222222222223 * (Math.pow(Math.PI, 3.0) * (F * Math.pow(l, 3.0))))))));
}
def code(F, l):
	return (math.pi * l) - ((1.0 / (F * F)) * math.tan((math.pi * l)))
def code(F, l):
	return (math.pi * l) + ((-1.0 / F) / ((F / (math.pi * l)) - ((0.3333333333333333 * (math.pi * (l * F))) + ((0.0021164021164021165 * (math.pow(math.pi, 5.0) * math.log(math.pow(math.exp(math.pow(l, 5.0)), F)))) + (0.022222222222222223 * (math.pow(math.pi, 3.0) * (F * math.pow(l, 3.0))))))))
function code(F, l)
	return Float64(Float64(pi * l) - Float64(Float64(1.0 / Float64(F * F)) * tan(Float64(pi * l))))
end
function code(F, l)
	return Float64(Float64(pi * l) + Float64(Float64(-1.0 / F) / Float64(Float64(F / Float64(pi * l)) - Float64(Float64(0.3333333333333333 * Float64(pi * Float64(l * F))) + Float64(Float64(0.0021164021164021165 * Float64((pi ^ 5.0) * log((exp((l ^ 5.0)) ^ F)))) + Float64(0.022222222222222223 * Float64((pi ^ 3.0) * Float64(F * (l ^ 3.0)))))))))
end
function tmp = code(F, l)
	tmp = (pi * l) - ((1.0 / (F * F)) * tan((pi * l)));
end
function tmp = code(F, l)
	tmp = (pi * l) + ((-1.0 / F) / ((F / (pi * l)) - ((0.3333333333333333 * (pi * (l * F))) + ((0.0021164021164021165 * ((pi ^ 5.0) * log((exp((l ^ 5.0)) ^ F)))) + (0.022222222222222223 * ((pi ^ 3.0) * (F * (l ^ 3.0))))))));
end
code[F_, l_] := N[(N[(Pi * l), $MachinePrecision] - N[(N[(1.0 / N[(F * F), $MachinePrecision]), $MachinePrecision] * N[Tan[N[(Pi * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[F_, l_] := N[(N[(Pi * l), $MachinePrecision] + N[(N[(-1.0 / F), $MachinePrecision] / N[(N[(F / N[(Pi * l), $MachinePrecision]), $MachinePrecision] - N[(N[(0.3333333333333333 * N[(Pi * N[(l * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(0.0021164021164021165 * N[(N[Power[Pi, 5.0], $MachinePrecision] * N[Log[N[Power[N[Exp[N[Power[l, 5.0], $MachinePrecision]], $MachinePrecision], F], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.022222222222222223 * N[(N[Power[Pi, 3.0], $MachinePrecision] * N[(F * N[Power[l, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right)
\pi \cdot \ell + \frac{\frac{-1}{F}}{\frac{F}{\pi \cdot \ell} - \left(0.3333333333333333 \cdot \left(\pi \cdot \left(\ell \cdot F\right)\right) + \left(0.0021164021164021165 \cdot \left({\pi}^{5} \cdot \log \left({\left(e^{{\ell}^{5}}\right)}^{F}\right)\right) + 0.022222222222222223 \cdot \left({\pi}^{3} \cdot \left(F \cdot {\ell}^{3}\right)\right)\right)\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 17.1

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

    \[\leadsto \color{blue}{\pi \cdot \ell - \frac{\tan \left(\pi \cdot \ell\right)}{F \cdot F}} \]
  3. Applied egg-rr12.6

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

    \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{1}{F}}{\frac{F}{\tan \left(\pi \cdot \ell\right)}}} \]
  5. Taylor expanded in l around 0 2.3

    \[\leadsto \pi \cdot \ell - \frac{\frac{1}{F}}{\color{blue}{\frac{F}{\pi \cdot \ell} - \left(0.3333333333333333 \cdot \left(\pi \cdot \left(F \cdot \ell\right)\right) + \left(0.0021164021164021165 \cdot \left({\pi}^{5} \cdot \left({\ell}^{5} \cdot F\right)\right) + 0.022222222222222223 \cdot \left({\pi}^{3} \cdot \left({\ell}^{3} \cdot F\right)\right)\right)\right)}} \]
  6. Applied egg-rr0.8

    \[\leadsto \pi \cdot \ell - \frac{\frac{1}{F}}{\frac{F}{\pi \cdot \ell} - \left(0.3333333333333333 \cdot \left(\pi \cdot \left(F \cdot \ell\right)\right) + \left(0.0021164021164021165 \cdot \left({\pi}^{5} \cdot \color{blue}{\log \left({\left(e^{{\ell}^{5}}\right)}^{F}\right)}\right) + 0.022222222222222223 \cdot \left({\pi}^{3} \cdot \left({\ell}^{3} \cdot F\right)\right)\right)\right)} \]
  7. Final simplification0.8

    \[\leadsto \pi \cdot \ell + \frac{\frac{-1}{F}}{\frac{F}{\pi \cdot \ell} - \left(0.3333333333333333 \cdot \left(\pi \cdot \left(\ell \cdot F\right)\right) + \left(0.0021164021164021165 \cdot \left({\pi}^{5} \cdot \log \left({\left(e^{{\ell}^{5}}\right)}^{F}\right)\right) + 0.022222222222222223 \cdot \left({\pi}^{3} \cdot \left(F \cdot {\ell}^{3}\right)\right)\right)\right)} \]

Reproduce

herbie shell --seed 2022151 
(FPCore (F l)
  :name "VandenBroeck and Keller, Equation (6)"
  :precision binary64
  (- (* PI l) (* (/ 1.0 (* F F)) (tan (* PI l)))))