Average Error: 16.6 → 0.6
Time: 7.6s
Precision: binary64
\[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
\[\ell \cdot \pi - \frac{\frac{\sin \left(\ell \cdot \pi\right)}{\mathsf{fma}\left(-0.5, \ell \cdot \log \left({\left(e^{{\pi}^{2}}\right)}^{\ell}\right), 1\right) \cdot F}}{F} \]
(FPCore (F l)
 :precision binary64
 (- (* PI l) (* (/ 1.0 (* F F)) (tan (* PI l)))))
(FPCore (F l)
 :precision binary64
 (-
  (* l PI)
  (/
   (/
    (sin (* l PI))
    (* (fma -0.5 (* l (log (pow (exp (pow PI 2.0)) l))) 1.0) F))
   F)))
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 (l * ((double) M_PI)) - ((sin((l * ((double) M_PI))) / (fma(-0.5, (l * log(pow(exp(pow(((double) M_PI), 2.0)), l))), 1.0) * F)) / F);
}
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(l * pi) - Float64(Float64(sin(Float64(l * pi)) / Float64(fma(-0.5, Float64(l * log((exp((pi ^ 2.0)) ^ l))), 1.0) * F)) / F))
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[(l * Pi), $MachinePrecision] - N[(N[(N[Sin[N[(l * Pi), $MachinePrecision]], $MachinePrecision] / N[(N[(-0.5 * N[(l * N[Log[N[Power[N[Exp[N[Power[Pi, 2.0], $MachinePrecision]], $MachinePrecision], l], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * F), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]
\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right)
\ell \cdot \pi - \frac{\frac{\sin \left(\ell \cdot \pi\right)}{\mathsf{fma}\left(-0.5, \ell \cdot \log \left({\left(e^{{\pi}^{2}}\right)}^{\ell}\right), 1\right) \cdot F}}{F}

Error

Derivation

  1. Initial program 16.6

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

    \[\leadsto \color{blue}{\pi \cdot \ell - \frac{\tan \left(\pi \cdot \ell\right)}{F \cdot F}} \]
  3. Taylor expanded in l around inf 16.3

    \[\leadsto \color{blue}{\ell \cdot \pi + -1 \cdot \frac{\sin \left(\ell \cdot \pi\right)}{\cos \left(\ell \cdot \pi\right) \cdot {F}^{2}}} \]
  4. Simplified12.6

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

    \[\leadsto \ell \cdot \pi - \frac{\frac{\sin \left(\ell \cdot \pi\right)}{\color{blue}{\left(-0.5 \cdot \left({\ell}^{2} \cdot {\pi}^{2}\right) + 1\right)} \cdot F}}{F} \]
  6. Simplified5.2

    \[\leadsto \ell \cdot \pi - \frac{\frac{\sin \left(\ell \cdot \pi\right)}{\color{blue}{\mathsf{fma}\left(-0.5, \ell \cdot \left(\ell \cdot {\pi}^{2}\right), 1\right)} \cdot F}}{F} \]
  7. Applied egg-rr0.6

    \[\leadsto \ell \cdot \pi - \frac{\frac{\sin \left(\ell \cdot \pi\right)}{\mathsf{fma}\left(-0.5, \ell \cdot \color{blue}{\log \left({\left(e^{{\pi}^{2}}\right)}^{\ell}\right)}, 1\right) \cdot F}}{F} \]
  8. Final simplification0.6

    \[\leadsto \ell \cdot \pi - \frac{\frac{\sin \left(\ell \cdot \pi\right)}{\mathsf{fma}\left(-0.5, \ell \cdot \log \left({\left(e^{{\pi}^{2}}\right)}^{\ell}\right), 1\right) \cdot F}}{F} \]

Reproduce

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