
(FPCore (F l) :precision binary64 (- (* PI l) (* (/ 1.0 (* F F)) (tan (* PI l)))))
double code(double F, double l) {
return (((double) M_PI) * l) - ((1.0 / (F * F)) * tan((((double) M_PI) * l)));
}
public static double code(double F, double 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.tan((math.pi * l)))
function code(F, l) return Float64(Float64(pi * l) - Float64(Float64(1.0 / Float64(F * F)) * tan(Float64(pi * l)))) end
function tmp = code(F, l) tmp = (pi * l) - ((1.0 / (F * F)) * tan((pi * l))); 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]
\begin{array}{l}
\\
\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (F l) :precision binary64 (- (* PI l) (* (/ 1.0 (* F F)) (tan (* PI l)))))
double code(double F, double l) {
return (((double) M_PI) * l) - ((1.0 / (F * F)) * tan((((double) M_PI) * l)));
}
public static double code(double F, double 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.tan((math.pi * l)))
function code(F, l) return Float64(Float64(pi * l) - Float64(Float64(1.0 / Float64(F * F)) * tan(Float64(pi * l)))) end
function tmp = code(F, l) tmp = (pi * l) - ((1.0 / (F * F)) * tan((pi * l))); 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]
\begin{array}{l}
\\
\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right)
\end{array}
NOTE: F should be positive before calling this function
(FPCore (F l)
:precision binary64
(let* ((t_0 (* (pow PI 2.0) -0.5))
(t_1 (/ (pow F 2.0) (pow PI 3.0)))
(t_2 (* 0.008333333333333333 (pow PI 5.0)))
(t_3 (* (pow PI 3.0) 0.3333333333333333))
(t_4 (fma t_0 t_3 (* (pow PI 5.0) 0.041666666666666664)))
(t_5 (- t_4 t_2))
(t_6 (/ (pow F 2.0) (pow PI 2.0)))
(t_7 (+ (* t_1 (* (pow PI 6.0) 0.1111111111111111)) (* t_6 t_5))))
(if (<= F 1.62e-161)
(- (* PI l) (/ (/ (tan (* l (pow (sqrt PI) 2.0))) F) F))
(if (<= F 5e-52)
(+
(* PI l)
(/
-1.0
(+
(-
(-
(/ (pow F 2.0) (* PI l))
(*
(pow F 2.0)
(/ (* (pow PI 3.0) (* l 0.3333333333333333)) (pow PI 2.0))))
(*
(pow l 5.0)
(+
(+
(*
t_6
(-
(* -0.0001984126984126984 (pow PI 7.0))
(fma
t_0
(- t_2 t_4)
(fma
0.041666666666666664
(* (pow PI 3.0) (* 0.3333333333333333 (pow PI 4.0)))
(* (pow PI 7.0) -0.001388888888888889)))))
(* t_1 (* (pow PI 3.0) (* 0.3333333333333333 t_5))))
(* t_3 (/ t_7 PI)))))
(* (pow l 3.0) t_7))))
(- (* PI l) (/ (/ (tan (* l (cbrt (pow PI 3.0)))) F) F))))))F = abs(F);
double code(double F, double l) {
double t_0 = pow(((double) M_PI), 2.0) * -0.5;
double t_1 = pow(F, 2.0) / pow(((double) M_PI), 3.0);
double t_2 = 0.008333333333333333 * pow(((double) M_PI), 5.0);
double t_3 = pow(((double) M_PI), 3.0) * 0.3333333333333333;
double t_4 = fma(t_0, t_3, (pow(((double) M_PI), 5.0) * 0.041666666666666664));
double t_5 = t_4 - t_2;
double t_6 = pow(F, 2.0) / pow(((double) M_PI), 2.0);
double t_7 = (t_1 * (pow(((double) M_PI), 6.0) * 0.1111111111111111)) + (t_6 * t_5);
double tmp;
if (F <= 1.62e-161) {
tmp = (((double) M_PI) * l) - ((tan((l * pow(sqrt(((double) M_PI)), 2.0))) / F) / F);
} else if (F <= 5e-52) {
tmp = (((double) M_PI) * l) + (-1.0 / ((((pow(F, 2.0) / (((double) M_PI) * l)) - (pow(F, 2.0) * ((pow(((double) M_PI), 3.0) * (l * 0.3333333333333333)) / pow(((double) M_PI), 2.0)))) - (pow(l, 5.0) * (((t_6 * ((-0.0001984126984126984 * pow(((double) M_PI), 7.0)) - fma(t_0, (t_2 - t_4), fma(0.041666666666666664, (pow(((double) M_PI), 3.0) * (0.3333333333333333 * pow(((double) M_PI), 4.0))), (pow(((double) M_PI), 7.0) * -0.001388888888888889))))) + (t_1 * (pow(((double) M_PI), 3.0) * (0.3333333333333333 * t_5)))) + (t_3 * (t_7 / ((double) M_PI)))))) + (pow(l, 3.0) * t_7)));
} else {
tmp = (((double) M_PI) * l) - ((tan((l * cbrt(pow(((double) M_PI), 3.0)))) / F) / F);
}
return tmp;
}
F = abs(F) function code(F, l) t_0 = Float64((pi ^ 2.0) * -0.5) t_1 = Float64((F ^ 2.0) / (pi ^ 3.0)) t_2 = Float64(0.008333333333333333 * (pi ^ 5.0)) t_3 = Float64((pi ^ 3.0) * 0.3333333333333333) t_4 = fma(t_0, t_3, Float64((pi ^ 5.0) * 0.041666666666666664)) t_5 = Float64(t_4 - t_2) t_6 = Float64((F ^ 2.0) / (pi ^ 2.0)) t_7 = Float64(Float64(t_1 * Float64((pi ^ 6.0) * 0.1111111111111111)) + Float64(t_6 * t_5)) tmp = 0.0 if (F <= 1.62e-161) tmp = Float64(Float64(pi * l) - Float64(Float64(tan(Float64(l * (sqrt(pi) ^ 2.0))) / F) / F)); elseif (F <= 5e-52) tmp = Float64(Float64(pi * l) + Float64(-1.0 / Float64(Float64(Float64(Float64((F ^ 2.0) / Float64(pi * l)) - Float64((F ^ 2.0) * Float64(Float64((pi ^ 3.0) * Float64(l * 0.3333333333333333)) / (pi ^ 2.0)))) - Float64((l ^ 5.0) * Float64(Float64(Float64(t_6 * Float64(Float64(-0.0001984126984126984 * (pi ^ 7.0)) - fma(t_0, Float64(t_2 - t_4), fma(0.041666666666666664, Float64((pi ^ 3.0) * Float64(0.3333333333333333 * (pi ^ 4.0))), Float64((pi ^ 7.0) * -0.001388888888888889))))) + Float64(t_1 * Float64((pi ^ 3.0) * Float64(0.3333333333333333 * t_5)))) + Float64(t_3 * Float64(t_7 / pi))))) + Float64((l ^ 3.0) * t_7)))); else tmp = Float64(Float64(pi * l) - Float64(Float64(tan(Float64(l * cbrt((pi ^ 3.0)))) / F) / F)); end return tmp end
NOTE: F should be positive before calling this function
code[F_, l_] := Block[{t$95$0 = N[(N[Power[Pi, 2.0], $MachinePrecision] * -0.5), $MachinePrecision]}, Block[{t$95$1 = N[(N[Power[F, 2.0], $MachinePrecision] / N[Power[Pi, 3.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(0.008333333333333333 * N[Power[Pi, 5.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[Power[Pi, 3.0], $MachinePrecision] * 0.3333333333333333), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$0 * t$95$3 + N[(N[Power[Pi, 5.0], $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 - t$95$2), $MachinePrecision]}, Block[{t$95$6 = N[(N[Power[F, 2.0], $MachinePrecision] / N[Power[Pi, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(N[(t$95$1 * N[(N[Power[Pi, 6.0], $MachinePrecision] * 0.1111111111111111), $MachinePrecision]), $MachinePrecision] + N[(t$95$6 * t$95$5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, 1.62e-161], N[(N[(Pi * l), $MachinePrecision] - N[(N[(N[Tan[N[(l * N[Power[N[Sqrt[Pi], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / F), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5e-52], N[(N[(Pi * l), $MachinePrecision] + N[(-1.0 / N[(N[(N[(N[(N[Power[F, 2.0], $MachinePrecision] / N[(Pi * l), $MachinePrecision]), $MachinePrecision] - N[(N[Power[F, 2.0], $MachinePrecision] * N[(N[(N[Power[Pi, 3.0], $MachinePrecision] * N[(l * 0.3333333333333333), $MachinePrecision]), $MachinePrecision] / N[Power[Pi, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[Power[l, 5.0], $MachinePrecision] * N[(N[(N[(t$95$6 * N[(N[(-0.0001984126984126984 * N[Power[Pi, 7.0], $MachinePrecision]), $MachinePrecision] - N[(t$95$0 * N[(t$95$2 - t$95$4), $MachinePrecision] + N[(0.041666666666666664 * N[(N[Power[Pi, 3.0], $MachinePrecision] * N[(0.3333333333333333 * N[Power[Pi, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Power[Pi, 7.0], $MachinePrecision] * -0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(N[Power[Pi, 3.0], $MachinePrecision] * N[(0.3333333333333333 * t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$3 * N[(t$95$7 / Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Power[l, 3.0], $MachinePrecision] * t$95$7), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(Pi * l), $MachinePrecision] - N[(N[(N[Tan[N[(l * N[Power[N[Power[Pi, 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / F), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
F = |F|\\
\\
\begin{array}{l}
t_0 := {\pi}^{2} \cdot -0.5\\
t_1 := \frac{{F}^{2}}{{\pi}^{3}}\\
t_2 := 0.008333333333333333 \cdot {\pi}^{5}\\
t_3 := {\pi}^{3} \cdot 0.3333333333333333\\
t_4 := \mathsf{fma}\left(t_0, t_3, {\pi}^{5} \cdot 0.041666666666666664\right)\\
t_5 := t_4 - t_2\\
t_6 := \frac{{F}^{2}}{{\pi}^{2}}\\
t_7 := t_1 \cdot \left({\pi}^{6} \cdot 0.1111111111111111\right) + t_6 \cdot t_5\\
\mathbf{if}\;F \leq 1.62 \cdot 10^{-161}:\\
\;\;\;\;\pi \cdot \ell - \frac{\frac{\tan \left(\ell \cdot {\left(\sqrt{\pi}\right)}^{2}\right)}{F}}{F}\\
\mathbf{elif}\;F \leq 5 \cdot 10^{-52}:\\
\;\;\;\;\pi \cdot \ell + \frac{-1}{\left(\left(\frac{{F}^{2}}{\pi \cdot \ell} - {F}^{2} \cdot \frac{{\pi}^{3} \cdot \left(\ell \cdot 0.3333333333333333\right)}{{\pi}^{2}}\right) - {\ell}^{5} \cdot \left(\left(t_6 \cdot \left(-0.0001984126984126984 \cdot {\pi}^{7} - \mathsf{fma}\left(t_0, t_2 - t_4, \mathsf{fma}\left(0.041666666666666664, {\pi}^{3} \cdot \left(0.3333333333333333 \cdot {\pi}^{4}\right), {\pi}^{7} \cdot -0.001388888888888889\right)\right)\right) + t_1 \cdot \left({\pi}^{3} \cdot \left(0.3333333333333333 \cdot t_5\right)\right)\right) + t_3 \cdot \frac{t_7}{\pi}\right)\right) + {\ell}^{3} \cdot t_7}\\
\mathbf{else}:\\
\;\;\;\;\pi \cdot \ell - \frac{\frac{\tan \left(\ell \cdot \sqrt[3]{{\pi}^{3}}\right)}{F}}{F}\\
\end{array}
\end{array}
if F < 1.62e-161Initial program 65.5%
associate-*l/65.6%
*-un-lft-identity65.6%
associate-/r*74.8%
Applied egg-rr74.8%
add-sqr-sqrt74.9%
pow274.9%
Applied egg-rr74.9%
if 1.62e-161 < F < 5e-52Initial program 71.9%
associate-/r/71.8%
associate-/l*71.9%
clear-num71.9%
add-sqr-sqrt71.8%
sqrt-prod71.9%
sqr-neg71.9%
sqrt-unprod0.0%
add-sqr-sqrt29.7%
associate-/r*29.7%
clear-num29.7%
add-sqr-sqrt0.0%
sqrt-unprod71.8%
sqr-neg71.8%
sqrt-prod71.6%
add-sqr-sqrt71.8%
pow271.8%
Applied egg-rr71.8%
Taylor expanded in l around 0 91.3%
Simplified91.3%
if 5e-52 < F Initial program 99.6%
associate-*l/99.6%
*-un-lft-identity99.6%
associate-/r*99.6%
Applied egg-rr99.6%
add-cbrt-cube99.6%
pow399.6%
Applied egg-rr99.6%
Final simplification82.7%
NOTE: F should be positive before calling this function
(FPCore (F l)
:precision binary64
(if (<= F 1.1e-161)
(- (* PI l) (/ (/ (tan (* l (pow (sqrt PI) 2.0))) F) F))
(if (<= F 3e-52)
(-
(* PI l)
(/
1.0
(+
(-
(/ (pow F 2.0) (* PI l))
(*
(pow F 2.0)
(/ (* (pow PI 3.0) (* l 0.3333333333333333)) (pow PI 2.0))))
(*
(pow l 3.0)
(+
(* (/ (pow F 2.0) (pow PI 3.0)) (* (pow PI 6.0) 0.1111111111111111))
(*
(/ (pow F 2.0) (pow PI 2.0))
(-
(fma
(* (pow PI 2.0) -0.5)
(* (pow PI 3.0) 0.3333333333333333)
(* (pow PI 5.0) 0.041666666666666664))
(* 0.008333333333333333 (pow PI 5.0)))))))))
(- (* PI l) (/ (/ (tan (* l (cbrt (pow PI 3.0)))) F) F)))))F = abs(F);
double code(double F, double l) {
double tmp;
if (F <= 1.1e-161) {
tmp = (((double) M_PI) * l) - ((tan((l * pow(sqrt(((double) M_PI)), 2.0))) / F) / F);
} else if (F <= 3e-52) {
tmp = (((double) M_PI) * l) - (1.0 / (((pow(F, 2.0) / (((double) M_PI) * l)) - (pow(F, 2.0) * ((pow(((double) M_PI), 3.0) * (l * 0.3333333333333333)) / pow(((double) M_PI), 2.0)))) + (pow(l, 3.0) * (((pow(F, 2.0) / pow(((double) M_PI), 3.0)) * (pow(((double) M_PI), 6.0) * 0.1111111111111111)) + ((pow(F, 2.0) / pow(((double) M_PI), 2.0)) * (fma((pow(((double) M_PI), 2.0) * -0.5), (pow(((double) M_PI), 3.0) * 0.3333333333333333), (pow(((double) M_PI), 5.0) * 0.041666666666666664)) - (0.008333333333333333 * pow(((double) M_PI), 5.0))))))));
} else {
tmp = (((double) M_PI) * l) - ((tan((l * cbrt(pow(((double) M_PI), 3.0)))) / F) / F);
}
return tmp;
}
F = abs(F) function code(F, l) tmp = 0.0 if (F <= 1.1e-161) tmp = Float64(Float64(pi * l) - Float64(Float64(tan(Float64(l * (sqrt(pi) ^ 2.0))) / F) / F)); elseif (F <= 3e-52) tmp = Float64(Float64(pi * l) - Float64(1.0 / Float64(Float64(Float64((F ^ 2.0) / Float64(pi * l)) - Float64((F ^ 2.0) * Float64(Float64((pi ^ 3.0) * Float64(l * 0.3333333333333333)) / (pi ^ 2.0)))) + Float64((l ^ 3.0) * Float64(Float64(Float64((F ^ 2.0) / (pi ^ 3.0)) * Float64((pi ^ 6.0) * 0.1111111111111111)) + Float64(Float64((F ^ 2.0) / (pi ^ 2.0)) * Float64(fma(Float64((pi ^ 2.0) * -0.5), Float64((pi ^ 3.0) * 0.3333333333333333), Float64((pi ^ 5.0) * 0.041666666666666664)) - Float64(0.008333333333333333 * (pi ^ 5.0))))))))); else tmp = Float64(Float64(pi * l) - Float64(Float64(tan(Float64(l * cbrt((pi ^ 3.0)))) / F) / F)); end return tmp end
NOTE: F should be positive before calling this function code[F_, l_] := If[LessEqual[F, 1.1e-161], N[(N[(Pi * l), $MachinePrecision] - N[(N[(N[Tan[N[(l * N[Power[N[Sqrt[Pi], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / F), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3e-52], N[(N[(Pi * l), $MachinePrecision] - N[(1.0 / N[(N[(N[(N[Power[F, 2.0], $MachinePrecision] / N[(Pi * l), $MachinePrecision]), $MachinePrecision] - N[(N[Power[F, 2.0], $MachinePrecision] * N[(N[(N[Power[Pi, 3.0], $MachinePrecision] * N[(l * 0.3333333333333333), $MachinePrecision]), $MachinePrecision] / N[Power[Pi, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Power[l, 3.0], $MachinePrecision] * N[(N[(N[(N[Power[F, 2.0], $MachinePrecision] / N[Power[Pi, 3.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[Pi, 6.0], $MachinePrecision] * 0.1111111111111111), $MachinePrecision]), $MachinePrecision] + N[(N[(N[Power[F, 2.0], $MachinePrecision] / N[Power[Pi, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[Power[Pi, 2.0], $MachinePrecision] * -0.5), $MachinePrecision] * N[(N[Power[Pi, 3.0], $MachinePrecision] * 0.3333333333333333), $MachinePrecision] + N[(N[Power[Pi, 5.0], $MachinePrecision] * 0.041666666666666664), $MachinePrecision]), $MachinePrecision] - N[(0.008333333333333333 * N[Power[Pi, 5.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(Pi * l), $MachinePrecision] - N[(N[(N[Tan[N[(l * N[Power[N[Power[Pi, 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / F), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
F = |F|\\
\\
\begin{array}{l}
\mathbf{if}\;F \leq 1.1 \cdot 10^{-161}:\\
\;\;\;\;\pi \cdot \ell - \frac{\frac{\tan \left(\ell \cdot {\left(\sqrt{\pi}\right)}^{2}\right)}{F}}{F}\\
\mathbf{elif}\;F \leq 3 \cdot 10^{-52}:\\
\;\;\;\;\pi \cdot \ell - \frac{1}{\left(\frac{{F}^{2}}{\pi \cdot \ell} - {F}^{2} \cdot \frac{{\pi}^{3} \cdot \left(\ell \cdot 0.3333333333333333\right)}{{\pi}^{2}}\right) + {\ell}^{3} \cdot \left(\frac{{F}^{2}}{{\pi}^{3}} \cdot \left({\pi}^{6} \cdot 0.1111111111111111\right) + \frac{{F}^{2}}{{\pi}^{2}} \cdot \left(\mathsf{fma}\left({\pi}^{2} \cdot -0.5, {\pi}^{3} \cdot 0.3333333333333333, {\pi}^{5} \cdot 0.041666666666666664\right) - 0.008333333333333333 \cdot {\pi}^{5}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\pi \cdot \ell - \frac{\frac{\tan \left(\ell \cdot \sqrt[3]{{\pi}^{3}}\right)}{F}}{F}\\
\end{array}
\end{array}
if F < 1.10000000000000001e-161Initial program 65.5%
associate-*l/65.6%
*-un-lft-identity65.6%
associate-/r*74.8%
Applied egg-rr74.8%
add-sqr-sqrt74.9%
pow274.9%
Applied egg-rr74.9%
if 1.10000000000000001e-161 < F < 3e-52Initial program 71.9%
associate-/r/71.8%
associate-/l*71.9%
clear-num71.9%
add-sqr-sqrt71.8%
sqrt-prod71.9%
sqr-neg71.9%
sqrt-unprod0.0%
add-sqr-sqrt29.7%
associate-/r*29.7%
clear-num29.7%
add-sqr-sqrt0.0%
sqrt-unprod71.8%
sqr-neg71.8%
sqrt-prod71.6%
add-sqr-sqrt71.8%
pow271.8%
Applied egg-rr71.8%
Taylor expanded in l around 0 86.8%
Simplified86.8%
if 3e-52 < F Initial program 99.6%
associate-*l/99.6%
*-un-lft-identity99.6%
associate-/r*99.6%
Applied egg-rr99.6%
add-cbrt-cube99.6%
pow399.6%
Applied egg-rr99.6%
Final simplification82.3%
NOTE: F should be positive before calling this function
(FPCore (F l)
:precision binary64
(if (<= F 4.5e-171)
(- (* PI l) (/ (/ (tan (* l (pow (sqrt PI) 2.0))) F) F))
(if (<= F 1.85)
(-
(* PI l)
(/
1.0
(fma
-1.0
(/
(* (* (pow PI 3.0) 0.3333333333333333) (* l (pow F 2.0)))
(pow PI 2.0))
(/ (/ (pow F 2.0) l) PI))))
(+ (* PI l) (* (tan (pow (cbrt (* PI l)) 3.0)) (/ -1.0 (* F F)))))))F = abs(F);
double code(double F, double l) {
double tmp;
if (F <= 4.5e-171) {
tmp = (((double) M_PI) * l) - ((tan((l * pow(sqrt(((double) M_PI)), 2.0))) / F) / F);
} else if (F <= 1.85) {
tmp = (((double) M_PI) * l) - (1.0 / fma(-1.0, (((pow(((double) M_PI), 3.0) * 0.3333333333333333) * (l * pow(F, 2.0))) / pow(((double) M_PI), 2.0)), ((pow(F, 2.0) / l) / ((double) M_PI))));
} else {
tmp = (((double) M_PI) * l) + (tan(pow(cbrt((((double) M_PI) * l)), 3.0)) * (-1.0 / (F * F)));
}
return tmp;
}
F = abs(F) function code(F, l) tmp = 0.0 if (F <= 4.5e-171) tmp = Float64(Float64(pi * l) - Float64(Float64(tan(Float64(l * (sqrt(pi) ^ 2.0))) / F) / F)); elseif (F <= 1.85) tmp = Float64(Float64(pi * l) - Float64(1.0 / fma(-1.0, Float64(Float64(Float64((pi ^ 3.0) * 0.3333333333333333) * Float64(l * (F ^ 2.0))) / (pi ^ 2.0)), Float64(Float64((F ^ 2.0) / l) / pi)))); else tmp = Float64(Float64(pi * l) + Float64(tan((cbrt(Float64(pi * l)) ^ 3.0)) * Float64(-1.0 / Float64(F * F)))); end return tmp end
NOTE: F should be positive before calling this function code[F_, l_] := If[LessEqual[F, 4.5e-171], N[(N[(Pi * l), $MachinePrecision] - N[(N[(N[Tan[N[(l * N[Power[N[Sqrt[Pi], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / F), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.85], N[(N[(Pi * l), $MachinePrecision] - N[(1.0 / N[(-1.0 * N[(N[(N[(N[Power[Pi, 3.0], $MachinePrecision] * 0.3333333333333333), $MachinePrecision] * N[(l * N[Power[F, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[Pi, 2.0], $MachinePrecision]), $MachinePrecision] + N[(N[(N[Power[F, 2.0], $MachinePrecision] / l), $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(Pi * l), $MachinePrecision] + N[(N[Tan[N[Power[N[Power[N[(Pi * l), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision] * N[(-1.0 / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
F = |F|\\
\\
\begin{array}{l}
\mathbf{if}\;F \leq 4.5 \cdot 10^{-171}:\\
\;\;\;\;\pi \cdot \ell - \frac{\frac{\tan \left(\ell \cdot {\left(\sqrt{\pi}\right)}^{2}\right)}{F}}{F}\\
\mathbf{elif}\;F \leq 1.85:\\
\;\;\;\;\pi \cdot \ell - \frac{1}{\mathsf{fma}\left(-1, \frac{\left({\pi}^{3} \cdot 0.3333333333333333\right) \cdot \left(\ell \cdot {F}^{2}\right)}{{\pi}^{2}}, \frac{\frac{{F}^{2}}{\ell}}{\pi}\right)}\\
\mathbf{else}:\\
\;\;\;\;\pi \cdot \ell + \tan \left({\left(\sqrt[3]{\pi \cdot \ell}\right)}^{3}\right) \cdot \frac{-1}{F \cdot F}\\
\end{array}
\end{array}
if F < 4.5000000000000004e-171Initial program 65.5%
associate-*l/65.6%
*-un-lft-identity65.6%
associate-/r*74.8%
Applied egg-rr74.8%
add-sqr-sqrt74.9%
pow274.9%
Applied egg-rr74.9%
if 4.5000000000000004e-171 < F < 1.8500000000000001Initial program 77.9%
associate-/r/77.9%
associate-/l*78.0%
clear-num78.0%
add-sqr-sqrt77.8%
sqrt-prod78.0%
sqr-neg78.0%
sqrt-unprod0.0%
add-sqr-sqrt34.4%
associate-/r*34.4%
clear-num34.4%
add-sqr-sqrt0.0%
sqrt-unprod77.9%
sqr-neg77.9%
sqrt-prod77.7%
add-sqr-sqrt77.9%
pow277.9%
Applied egg-rr77.9%
Taylor expanded in l around 0 82.6%
fma-def82.6%
associate-*r*82.6%
distribute-rgt-out--82.6%
metadata-eval82.6%
associate-/r*82.6%
Simplified82.6%
if 1.8500000000000001 < F Initial program 99.6%
add-cube-cbrt99.6%
pow399.6%
Applied egg-rr99.6%
Final simplification81.6%
NOTE: F should be positive before calling this function
(FPCore (F l)
:precision binary64
(if (<= F 4.5e-171)
(- (* PI l) (/ (/ (tan (* l (pow (sqrt PI) 2.0))) F) F))
(if (<= F 2e-51)
(+
(* PI l)
(/
-1.0
(-
(/ (pow F 2.0) (* PI l))
(*
(pow F 2.0)
(/ (* (pow PI 3.0) (* l 0.3333333333333333)) (pow PI 2.0))))))
(- (* PI l) (/ (/ (tan (* l (cbrt (pow PI 3.0)))) F) F)))))F = abs(F);
double code(double F, double l) {
double tmp;
if (F <= 4.5e-171) {
tmp = (((double) M_PI) * l) - ((tan((l * pow(sqrt(((double) M_PI)), 2.0))) / F) / F);
} else if (F <= 2e-51) {
tmp = (((double) M_PI) * l) + (-1.0 / ((pow(F, 2.0) / (((double) M_PI) * l)) - (pow(F, 2.0) * ((pow(((double) M_PI), 3.0) * (l * 0.3333333333333333)) / pow(((double) M_PI), 2.0)))));
} else {
tmp = (((double) M_PI) * l) - ((tan((l * cbrt(pow(((double) M_PI), 3.0)))) / F) / F);
}
return tmp;
}
F = Math.abs(F);
public static double code(double F, double l) {
double tmp;
if (F <= 4.5e-171) {
tmp = (Math.PI * l) - ((Math.tan((l * Math.pow(Math.sqrt(Math.PI), 2.0))) / F) / F);
} else if (F <= 2e-51) {
tmp = (Math.PI * l) + (-1.0 / ((Math.pow(F, 2.0) / (Math.PI * l)) - (Math.pow(F, 2.0) * ((Math.pow(Math.PI, 3.0) * (l * 0.3333333333333333)) / Math.pow(Math.PI, 2.0)))));
} else {
tmp = (Math.PI * l) - ((Math.tan((l * Math.cbrt(Math.pow(Math.PI, 3.0)))) / F) / F);
}
return tmp;
}
F = abs(F) function code(F, l) tmp = 0.0 if (F <= 4.5e-171) tmp = Float64(Float64(pi * l) - Float64(Float64(tan(Float64(l * (sqrt(pi) ^ 2.0))) / F) / F)); elseif (F <= 2e-51) tmp = Float64(Float64(pi * l) + Float64(-1.0 / Float64(Float64((F ^ 2.0) / Float64(pi * l)) - Float64((F ^ 2.0) * Float64(Float64((pi ^ 3.0) * Float64(l * 0.3333333333333333)) / (pi ^ 2.0)))))); else tmp = Float64(Float64(pi * l) - Float64(Float64(tan(Float64(l * cbrt((pi ^ 3.0)))) / F) / F)); end return tmp end
NOTE: F should be positive before calling this function code[F_, l_] := If[LessEqual[F, 4.5e-171], N[(N[(Pi * l), $MachinePrecision] - N[(N[(N[Tan[N[(l * N[Power[N[Sqrt[Pi], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / F), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2e-51], N[(N[(Pi * l), $MachinePrecision] + N[(-1.0 / N[(N[(N[Power[F, 2.0], $MachinePrecision] / N[(Pi * l), $MachinePrecision]), $MachinePrecision] - N[(N[Power[F, 2.0], $MachinePrecision] * N[(N[(N[Power[Pi, 3.0], $MachinePrecision] * N[(l * 0.3333333333333333), $MachinePrecision]), $MachinePrecision] / N[Power[Pi, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(Pi * l), $MachinePrecision] - N[(N[(N[Tan[N[(l * N[Power[N[Power[Pi, 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / F), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
F = |F|\\
\\
\begin{array}{l}
\mathbf{if}\;F \leq 4.5 \cdot 10^{-171}:\\
\;\;\;\;\pi \cdot \ell - \frac{\frac{\tan \left(\ell \cdot {\left(\sqrt{\pi}\right)}^{2}\right)}{F}}{F}\\
\mathbf{elif}\;F \leq 2 \cdot 10^{-51}:\\
\;\;\;\;\pi \cdot \ell + \frac{-1}{\frac{{F}^{2}}{\pi \cdot \ell} - {F}^{2} \cdot \frac{{\pi}^{3} \cdot \left(\ell \cdot 0.3333333333333333\right)}{{\pi}^{2}}}\\
\mathbf{else}:\\
\;\;\;\;\pi \cdot \ell - \frac{\frac{\tan \left(\ell \cdot \sqrt[3]{{\pi}^{3}}\right)}{F}}{F}\\
\end{array}
\end{array}
if F < 4.5000000000000004e-171Initial program 65.5%
associate-*l/65.6%
*-un-lft-identity65.6%
associate-/r*74.8%
Applied egg-rr74.8%
add-sqr-sqrt74.9%
pow274.9%
Applied egg-rr74.9%
if 4.5000000000000004e-171 < F < 2e-51Initial program 71.9%
associate-/r/71.8%
associate-/l*71.9%
clear-num71.9%
add-sqr-sqrt71.8%
sqrt-prod71.9%
sqr-neg71.9%
sqrt-unprod0.0%
add-sqr-sqrt29.7%
associate-/r*29.7%
clear-num29.7%
add-sqr-sqrt0.0%
sqrt-unprod71.8%
sqr-neg71.8%
sqrt-prod71.6%
add-sqr-sqrt71.8%
pow271.8%
Applied egg-rr71.8%
Taylor expanded in l around 0 77.9%
+-commutative77.9%
mul-1-neg77.9%
unsub-neg77.9%
*-lft-identity77.9%
times-frac77.9%
unpow277.9%
associate-*r/77.9%
/-rgt-identity77.9%
unpow277.9%
Simplified77.9%
if 2e-51 < F Initial program 99.6%
associate-*l/99.6%
*-un-lft-identity99.6%
associate-/r*99.6%
Applied egg-rr99.6%
add-cbrt-cube99.6%
pow399.6%
Applied egg-rr99.6%
Final simplification81.6%
NOTE: F should be positive before calling this function (FPCore (F l) :precision binary64 (fma PI l (/ (/ (tan (* PI l)) (- F)) F)))
F = abs(F);
double code(double F, double l) {
return fma(((double) M_PI), l, ((tan((((double) M_PI) * l)) / -F) / F));
}
F = abs(F) function code(F, l) return fma(pi, l, Float64(Float64(tan(Float64(pi * l)) / Float64(-F)) / F)) end
NOTE: F should be positive before calling this function code[F_, l_] := N[(Pi * l + N[(N[(N[Tan[N[(Pi * l), $MachinePrecision]], $MachinePrecision] / (-F)), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
F = |F|\\
\\
\mathsf{fma}\left(\pi, \ell, \frac{\frac{\tan \left(\pi \cdot \ell\right)}{-F}}{F}\right)
\end{array}
Initial program 75.0%
*-commutative75.0%
sqr-neg75.0%
*-commutative75.0%
fma-neg75.0%
associate-*l/75.0%
times-frac81.0%
distribute-lft-neg-in81.0%
neg-mul-181.0%
associate-/r*81.0%
metadata-eval81.0%
distribute-neg-frac81.0%
metadata-eval81.0%
times-frac75.0%
Simplified81.1%
Final simplification81.1%
NOTE: F should be positive before calling this function (FPCore (F l) :precision binary64 (if (<= F 4.5e-171) (- (* PI l) (/ (/ PI F) (/ F l))) (- (* PI l) (/ (tan (* PI l)) (* F F)))))
F = abs(F);
double code(double F, double l) {
double tmp;
if (F <= 4.5e-171) {
tmp = (((double) M_PI) * l) - ((((double) M_PI) / F) / (F / l));
} else {
tmp = (((double) M_PI) * l) - (tan((((double) M_PI) * l)) / (F * F));
}
return tmp;
}
F = Math.abs(F);
public static double code(double F, double l) {
double tmp;
if (F <= 4.5e-171) {
tmp = (Math.PI * l) - ((Math.PI / F) / (F / l));
} else {
tmp = (Math.PI * l) - (Math.tan((Math.PI * l)) / (F * F));
}
return tmp;
}
F = abs(F) def code(F, l): tmp = 0 if F <= 4.5e-171: tmp = (math.pi * l) - ((math.pi / F) / (F / l)) else: tmp = (math.pi * l) - (math.tan((math.pi * l)) / (F * F)) return tmp
F = abs(F) function code(F, l) tmp = 0.0 if (F <= 4.5e-171) tmp = Float64(Float64(pi * l) - Float64(Float64(pi / F) / Float64(F / l))); else tmp = Float64(Float64(pi * l) - Float64(tan(Float64(pi * l)) / Float64(F * F))); end return tmp end
F = abs(F) function tmp_2 = code(F, l) tmp = 0.0; if (F <= 4.5e-171) tmp = (pi * l) - ((pi / F) / (F / l)); else tmp = (pi * l) - (tan((pi * l)) / (F * F)); end tmp_2 = tmp; end
NOTE: F should be positive before calling this function code[F_, l_] := If[LessEqual[F, 4.5e-171], N[(N[(Pi * l), $MachinePrecision] - N[(N[(Pi / F), $MachinePrecision] / N[(F / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(Pi * l), $MachinePrecision] - N[(N[Tan[N[(Pi * l), $MachinePrecision]], $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
F = |F|\\
\\
\begin{array}{l}
\mathbf{if}\;F \leq 4.5 \cdot 10^{-171}:\\
\;\;\;\;\pi \cdot \ell - \frac{\frac{\pi}{F}}{\frac{F}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\pi \cdot \ell - \frac{\tan \left(\pi \cdot \ell\right)}{F \cdot F}\\
\end{array}
\end{array}
if F < 4.5000000000000004e-171Initial program 65.5%
sqr-neg65.5%
associate-*l/65.6%
*-lft-identity65.6%
sqr-neg65.6%
Simplified65.6%
Taylor expanded in l around 0 58.3%
*-commutative58.3%
times-frac67.6%
Applied egg-rr67.6%
clear-num67.6%
un-div-inv67.6%
Applied egg-rr67.6%
if 4.5000000000000004e-171 < F Initial program 93.0%
sqr-neg93.0%
associate-*l/93.0%
*-lft-identity93.0%
sqr-neg93.0%
Simplified93.0%
Final simplification76.3%
NOTE: F should be positive before calling this function (FPCore (F l) :precision binary64 (- (* PI l) (/ (/ (tan (* PI l)) F) F)))
F = abs(F);
double code(double F, double l) {
return (((double) M_PI) * l) - ((tan((((double) M_PI) * l)) / F) / F);
}
F = Math.abs(F);
public static double code(double F, double l) {
return (Math.PI * l) - ((Math.tan((Math.PI * l)) / F) / F);
}
F = abs(F) def code(F, l): return (math.pi * l) - ((math.tan((math.pi * l)) / F) / F)
F = abs(F) function code(F, l) return Float64(Float64(pi * l) - Float64(Float64(tan(Float64(pi * l)) / F) / F)) end
F = abs(F) function tmp = code(F, l) tmp = (pi * l) - ((tan((pi * l)) / F) / F); end
NOTE: F should be positive before calling this function code[F_, l_] := N[(N[(Pi * l), $MachinePrecision] - N[(N[(N[Tan[N[(Pi * l), $MachinePrecision]], $MachinePrecision] / F), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
F = |F|\\
\\
\pi \cdot \ell - \frac{\frac{\tan \left(\pi \cdot \ell\right)}{F}}{F}
\end{array}
Initial program 75.0%
associate-*l/75.0%
*-un-lft-identity75.0%
associate-/r*81.1%
Applied egg-rr81.1%
Final simplification81.1%
NOTE: F should be positive before calling this function (FPCore (F l) :precision binary64 (- (* PI l) (* (/ PI F) (/ l F))))
F = abs(F);
double code(double F, double l) {
return (((double) M_PI) * l) - ((((double) M_PI) / F) * (l / F));
}
F = Math.abs(F);
public static double code(double F, double l) {
return (Math.PI * l) - ((Math.PI / F) * (l / F));
}
F = abs(F) def code(F, l): return (math.pi * l) - ((math.pi / F) * (l / F))
F = abs(F) function code(F, l) return Float64(Float64(pi * l) - Float64(Float64(pi / F) * Float64(l / F))) end
F = abs(F) function tmp = code(F, l) tmp = (pi * l) - ((pi / F) * (l / F)); end
NOTE: F should be positive before calling this function code[F_, l_] := N[(N[(Pi * l), $MachinePrecision] - N[(N[(Pi / F), $MachinePrecision] * N[(l / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
F = |F|\\
\\
\pi \cdot \ell - \frac{\pi}{F} \cdot \frac{\ell}{F}
\end{array}
Initial program 75.0%
sqr-neg75.0%
associate-*l/75.0%
*-lft-identity75.0%
sqr-neg75.0%
Simplified75.0%
Taylor expanded in l around 0 66.3%
*-commutative66.3%
times-frac72.4%
Applied egg-rr72.4%
Final simplification72.4%
NOTE: F should be positive before calling this function (FPCore (F l) :precision binary64 (- (* PI l) (/ (/ l (/ F PI)) F)))
F = abs(F);
double code(double F, double l) {
return (((double) M_PI) * l) - ((l / (F / ((double) M_PI))) / F);
}
F = Math.abs(F);
public static double code(double F, double l) {
return (Math.PI * l) - ((l / (F / Math.PI)) / F);
}
F = abs(F) def code(F, l): return (math.pi * l) - ((l / (F / math.pi)) / F)
F = abs(F) function code(F, l) return Float64(Float64(pi * l) - Float64(Float64(l / Float64(F / pi)) / F)) end
F = abs(F) function tmp = code(F, l) tmp = (pi * l) - ((l / (F / pi)) / F); end
NOTE: F should be positive before calling this function code[F_, l_] := N[(N[(Pi * l), $MachinePrecision] - N[(N[(l / N[(F / Pi), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
F = |F|\\
\\
\pi \cdot \ell - \frac{\frac{\ell}{\frac{F}{\pi}}}{F}
\end{array}
Initial program 75.0%
associate-*l/75.0%
*-un-lft-identity75.0%
associate-/r*81.1%
Applied egg-rr81.1%
Taylor expanded in l around 0 72.4%
associate-/l*72.4%
Simplified72.4%
Final simplification72.4%
NOTE: F should be positive before calling this function (FPCore (F l) :precision binary64 (- (* PI l) (/ (/ PI (/ F l)) F)))
F = abs(F);
double code(double F, double l) {
return (((double) M_PI) * l) - ((((double) M_PI) / (F / l)) / F);
}
F = Math.abs(F);
public static double code(double F, double l) {
return (Math.PI * l) - ((Math.PI / (F / l)) / F);
}
F = abs(F) def code(F, l): return (math.pi * l) - ((math.pi / (F / l)) / F)
F = abs(F) function code(F, l) return Float64(Float64(pi * l) - Float64(Float64(pi / Float64(F / l)) / F)) end
F = abs(F) function tmp = code(F, l) tmp = (pi * l) - ((pi / (F / l)) / F); end
NOTE: F should be positive before calling this function code[F_, l_] := N[(N[(Pi * l), $MachinePrecision] - N[(N[(Pi / N[(F / l), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
F = |F|\\
\\
\pi \cdot \ell - \frac{\frac{\pi}{\frac{F}{\ell}}}{F}
\end{array}
Initial program 75.0%
associate-*l/75.0%
*-un-lft-identity75.0%
associate-/r*81.1%
Applied egg-rr81.1%
Taylor expanded in l around 0 72.4%
*-commutative72.4%
associate-/l*72.4%
Simplified72.4%
Final simplification72.4%
NOTE: F should be positive before calling this function (FPCore (F l) :precision binary64 (* PI (* (- l) (pow F -2.0))))
F = abs(F);
double code(double F, double l) {
return ((double) M_PI) * (-l * pow(F, -2.0));
}
F = Math.abs(F);
public static double code(double F, double l) {
return Math.PI * (-l * Math.pow(F, -2.0));
}
F = abs(F) def code(F, l): return math.pi * (-l * math.pow(F, -2.0))
F = abs(F) function code(F, l) return Float64(pi * Float64(Float64(-l) * (F ^ -2.0))) end
F = abs(F) function tmp = code(F, l) tmp = pi * (-l * (F ^ -2.0)); end
NOTE: F should be positive before calling this function code[F_, l_] := N[(Pi * N[((-l) * N[Power[F, -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
F = |F|\\
\\
\pi \cdot \left(\left(-\ell\right) \cdot {F}^{-2}\right)
\end{array}
Initial program 75.0%
*-commutative75.0%
sqr-neg75.0%
*-commutative75.0%
fma-neg75.0%
associate-*l/75.0%
times-frac81.0%
distribute-lft-neg-in81.0%
neg-mul-181.0%
associate-/r*81.0%
metadata-eval81.0%
distribute-neg-frac81.0%
metadata-eval81.0%
times-frac75.0%
Simplified81.1%
Taylor expanded in F around 0 20.8%
associate-*r/20.8%
*-commutative20.8%
neg-mul-120.8%
*-commutative20.8%
Simplified20.8%
Taylor expanded in l around 0 19.5%
mul-1-neg19.5%
*-commutative19.5%
associate-*l/19.1%
distribute-rgt-neg-in19.1%
Simplified19.1%
distribute-rgt-neg-out19.1%
div-inv19.1%
associate-*l*19.5%
pow-flip19.5%
metadata-eval19.5%
Applied egg-rr19.5%
Final simplification19.5%
NOTE: F should be positive before calling this function (FPCore (F l) :precision binary64 (/ (* PI (- l)) (pow F 2.0)))
F = abs(F);
double code(double F, double l) {
return (((double) M_PI) * -l) / pow(F, 2.0);
}
F = Math.abs(F);
public static double code(double F, double l) {
return (Math.PI * -l) / Math.pow(F, 2.0);
}
F = abs(F) def code(F, l): return (math.pi * -l) / math.pow(F, 2.0)
F = abs(F) function code(F, l) return Float64(Float64(pi * Float64(-l)) / (F ^ 2.0)) end
F = abs(F) function tmp = code(F, l) tmp = (pi * -l) / (F ^ 2.0); end
NOTE: F should be positive before calling this function code[F_, l_] := N[(N[(Pi * (-l)), $MachinePrecision] / N[Power[F, 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
F = |F|\\
\\
\frac{\pi \cdot \left(-\ell\right)}{{F}^{2}}
\end{array}
Initial program 75.0%
*-commutative75.0%
sqr-neg75.0%
*-commutative75.0%
fma-neg75.0%
associate-*l/75.0%
times-frac81.0%
distribute-lft-neg-in81.0%
neg-mul-181.0%
associate-/r*81.0%
metadata-eval81.0%
distribute-neg-frac81.0%
metadata-eval81.0%
times-frac75.0%
Simplified81.1%
Taylor expanded in F around 0 20.8%
associate-*r/20.8%
*-commutative20.8%
neg-mul-120.8%
*-commutative20.8%
Simplified20.8%
Taylor expanded in l around 0 19.5%
mul-1-neg19.5%
*-commutative19.5%
associate-*l/19.1%
distribute-rgt-neg-in19.1%
Simplified19.1%
Taylor expanded in F around 0 19.5%
associate-*r/19.5%
*-commutative19.5%
neg-mul-119.5%
distribute-rgt-neg-in19.5%
Simplified19.5%
Final simplification19.5%
NOTE: F should be positive before calling this function (FPCore (F l) :precision binary64 (* l (* (/ PI F) (/ -1.0 F))))
F = abs(F);
double code(double F, double l) {
return l * ((((double) M_PI) / F) * (-1.0 / F));
}
F = Math.abs(F);
public static double code(double F, double l) {
return l * ((Math.PI / F) * (-1.0 / F));
}
F = abs(F) def code(F, l): return l * ((math.pi / F) * (-1.0 / F))
F = abs(F) function code(F, l) return Float64(l * Float64(Float64(pi / F) * Float64(-1.0 / F))) end
F = abs(F) function tmp = code(F, l) tmp = l * ((pi / F) * (-1.0 / F)); end
NOTE: F should be positive before calling this function code[F_, l_] := N[(l * N[(N[(Pi / F), $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
F = |F|\\
\\
\ell \cdot \left(\frac{\pi}{F} \cdot \frac{-1}{F}\right)
\end{array}
Initial program 75.0%
*-commutative75.0%
sqr-neg75.0%
*-commutative75.0%
fma-neg75.0%
associate-*l/75.0%
times-frac81.0%
distribute-lft-neg-in81.0%
neg-mul-181.0%
associate-/r*81.0%
metadata-eval81.0%
distribute-neg-frac81.0%
metadata-eval81.0%
times-frac75.0%
Simplified81.1%
Taylor expanded in F around 0 20.8%
associate-*r/20.8%
*-commutative20.8%
neg-mul-120.8%
*-commutative20.8%
Simplified20.8%
Taylor expanded in l around 0 19.5%
mul-1-neg19.5%
*-commutative19.5%
associate-*l/19.1%
distribute-rgt-neg-in19.1%
Simplified19.1%
*-un-lft-identity19.1%
pow219.1%
times-frac19.1%
Applied egg-rr19.1%
Final simplification19.1%
NOTE: F should be positive before calling this function (FPCore (F l) :precision binary64 (/ (/ (* PI l) F) F))
F = abs(F);
double code(double F, double l) {
return ((((double) M_PI) * l) / F) / F;
}
F = Math.abs(F);
public static double code(double F, double l) {
return ((Math.PI * l) / F) / F;
}
F = abs(F) def code(F, l): return ((math.pi * l) / F) / F
F = abs(F) function code(F, l) return Float64(Float64(Float64(pi * l) / F) / F) end
F = abs(F) function tmp = code(F, l) tmp = ((pi * l) / F) / F; end
NOTE: F should be positive before calling this function code[F_, l_] := N[(N[(N[(Pi * l), $MachinePrecision] / F), $MachinePrecision] / F), $MachinePrecision]
\begin{array}{l}
F = |F|\\
\\
\frac{\frac{\pi \cdot \ell}{F}}{F}
\end{array}
Initial program 75.0%
*-commutative75.0%
sqr-neg75.0%
*-commutative75.0%
fma-neg75.0%
associate-*l/75.0%
times-frac81.0%
distribute-lft-neg-in81.0%
neg-mul-181.0%
associate-/r*81.0%
metadata-eval81.0%
distribute-neg-frac81.0%
metadata-eval81.0%
times-frac75.0%
Simplified81.1%
Taylor expanded in F around 0 20.8%
associate-*r/20.8%
*-commutative20.8%
neg-mul-120.8%
*-commutative20.8%
Simplified20.8%
Taylor expanded in l around 0 19.5%
mul-1-neg19.5%
*-commutative19.5%
associate-*l/19.1%
distribute-rgt-neg-in19.1%
Simplified19.1%
associate-*l/19.5%
pow219.5%
associate-/r*25.5%
add-sqr-sqrt14.7%
sqrt-unprod9.8%
sqr-neg9.8%
sqrt-unprod2.3%
add-sqr-sqrt4.3%
Applied egg-rr4.3%
Final simplification4.3%
herbie shell --seed 2023318
(FPCore (F l)
:name "VandenBroeck and Keller, Equation (6)"
:precision binary64
(- (* PI l) (* (/ 1.0 (* F F)) (tan (* PI l)))))