
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (- (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) - 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) - 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) - 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) - 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) - 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) - 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (- (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) - 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) - 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) - 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) - 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) - 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) - 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)}
\end{array}
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (* t_m (/ (sqrt 2.0) k)))
(t_3 (/ t_m (pow (cbrt l) 2.0)))
(t_4 (* (sin k) (tan k)))
(t_5 (cbrt t_4)))
(*
t_s
(if (<= (* l l) 2e-108)
(pow (/ (* l (sqrt 2.0)) (* (pow k 2.0) (sqrt t_m))) 2.0)
(if (<= (* l l) 5e+264)
(* 2.0 (/ (pow l 2.0) (* (pow (* k (sqrt t_m)) 2.0) t_4)))
(* (/ t_2 (pow (* t_3 t_5) 2.0)) (/ (/ t_2 t_3) t_5)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = t_m * (sqrt(2.0) / k);
double t_3 = t_m / pow(cbrt(l), 2.0);
double t_4 = sin(k) * tan(k);
double t_5 = cbrt(t_4);
double tmp;
if ((l * l) <= 2e-108) {
tmp = pow(((l * sqrt(2.0)) / (pow(k, 2.0) * sqrt(t_m))), 2.0);
} else if ((l * l) <= 5e+264) {
tmp = 2.0 * (pow(l, 2.0) / (pow((k * sqrt(t_m)), 2.0) * t_4));
} else {
tmp = (t_2 / pow((t_3 * t_5), 2.0)) * ((t_2 / t_3) / t_5);
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = t_m * (Math.sqrt(2.0) / k);
double t_3 = t_m / Math.pow(Math.cbrt(l), 2.0);
double t_4 = Math.sin(k) * Math.tan(k);
double t_5 = Math.cbrt(t_4);
double tmp;
if ((l * l) <= 2e-108) {
tmp = Math.pow(((l * Math.sqrt(2.0)) / (Math.pow(k, 2.0) * Math.sqrt(t_m))), 2.0);
} else if ((l * l) <= 5e+264) {
tmp = 2.0 * (Math.pow(l, 2.0) / (Math.pow((k * Math.sqrt(t_m)), 2.0) * t_4));
} else {
tmp = (t_2 / Math.pow((t_3 * t_5), 2.0)) * ((t_2 / t_3) / t_5);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(t_m * Float64(sqrt(2.0) / k)) t_3 = Float64(t_m / (cbrt(l) ^ 2.0)) t_4 = Float64(sin(k) * tan(k)) t_5 = cbrt(t_4) tmp = 0.0 if (Float64(l * l) <= 2e-108) tmp = Float64(Float64(l * sqrt(2.0)) / Float64((k ^ 2.0) * sqrt(t_m))) ^ 2.0; elseif (Float64(l * l) <= 5e+264) tmp = Float64(2.0 * Float64((l ^ 2.0) / Float64((Float64(k * sqrt(t_m)) ^ 2.0) * t_4))); else tmp = Float64(Float64(t_2 / (Float64(t_3 * t_5) ^ 2.0)) * Float64(Float64(t_2 / t_3) / t_5)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(t$95$m * N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[Power[t$95$4, 1/3], $MachinePrecision]}, N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 2e-108], N[Power[N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 5e+264], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(N[Power[N[(k * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$2 / N[Power[N[(t$95$3 * t$95$5), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$2 / t$95$3), $MachinePrecision] / t$95$5), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := t\_m \cdot \frac{\sqrt{2}}{k}\\
t_3 := \frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\\
t_4 := \sin k \cdot \tan k\\
t_5 := \sqrt[3]{t\_4}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 2 \cdot 10^{-108}:\\
\;\;\;\;{\left(\frac{\ell \cdot \sqrt{2}}{{k}^{2} \cdot \sqrt{t\_m}}\right)}^{2}\\
\mathbf{elif}\;\ell \cdot \ell \leq 5 \cdot 10^{+264}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2}}{{\left(k \cdot \sqrt{t\_m}\right)}^{2} \cdot t\_4}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_2}{{\left(t\_3 \cdot t\_5\right)}^{2}} \cdot \frac{\frac{t\_2}{t\_3}}{t\_5}\\
\end{array}
\end{array}
\end{array}
if (*.f64 l l) < 2.00000000000000008e-108Initial program 41.5%
Simplified56.2%
Taylor expanded in k around 0 72.3%
associate-*l/72.3%
pow272.3%
*-commutative72.3%
Applied egg-rr72.3%
add-sqr-sqrt57.1%
pow257.1%
sqrt-div33.2%
sqrt-prod33.2%
sqrt-pow137.1%
metadata-eval37.1%
pow137.1%
*-commutative37.1%
sqrt-prod38.7%
sqrt-pow142.6%
metadata-eval42.6%
Applied egg-rr42.6%
if 2.00000000000000008e-108 < (*.f64 l l) < 5.00000000000000033e264Initial program 34.7%
Simplified47.7%
add-log-exp32.1%
exp-prod35.6%
associate-*r*35.6%
*-commutative35.6%
Applied egg-rr35.6%
Taylor expanded in k around inf 85.7%
associate-*r*85.7%
Simplified85.7%
add-sqr-sqrt53.1%
pow253.1%
sqrt-prod53.1%
sqrt-pow158.6%
metadata-eval58.6%
pow158.6%
Applied egg-rr58.6%
if 5.00000000000000033e264 < (*.f64 l l) Initial program 32.9%
*-commutative32.9%
associate-/r*32.9%
Simplified34.2%
add-sqr-sqrt34.2%
add-cube-cbrt34.1%
times-frac34.1%
Applied egg-rr77.8%
associate-/r/77.8%
associate-/r*77.8%
associate-/r/79.1%
Simplified79.1%
Final simplification57.9%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (/ (sqrt 2.0) k))
(t_3 (pow (cbrt l) 2.0))
(t_4 (* (sin k) (tan k)))
(t_5 (cbrt t_4)))
(*
t_s
(if (<= (* l l) 2e-108)
(pow (/ (* l (sqrt 2.0)) (* (pow k 2.0) (sqrt t_m))) 2.0)
(if (<= (* l l) 5e+264)
(* 2.0 (/ (pow l 2.0) (* (pow (* k (sqrt t_m)) 2.0) t_4)))
(*
(/ (* t_m t_2) (pow (* (/ t_m t_3) t_5) 2.0))
(/ (* t_2 t_3) t_5)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = sqrt(2.0) / k;
double t_3 = pow(cbrt(l), 2.0);
double t_4 = sin(k) * tan(k);
double t_5 = cbrt(t_4);
double tmp;
if ((l * l) <= 2e-108) {
tmp = pow(((l * sqrt(2.0)) / (pow(k, 2.0) * sqrt(t_m))), 2.0);
} else if ((l * l) <= 5e+264) {
tmp = 2.0 * (pow(l, 2.0) / (pow((k * sqrt(t_m)), 2.0) * t_4));
} else {
tmp = ((t_m * t_2) / pow(((t_m / t_3) * t_5), 2.0)) * ((t_2 * t_3) / t_5);
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.sqrt(2.0) / k;
double t_3 = Math.pow(Math.cbrt(l), 2.0);
double t_4 = Math.sin(k) * Math.tan(k);
double t_5 = Math.cbrt(t_4);
double tmp;
if ((l * l) <= 2e-108) {
tmp = Math.pow(((l * Math.sqrt(2.0)) / (Math.pow(k, 2.0) * Math.sqrt(t_m))), 2.0);
} else if ((l * l) <= 5e+264) {
tmp = 2.0 * (Math.pow(l, 2.0) / (Math.pow((k * Math.sqrt(t_m)), 2.0) * t_4));
} else {
tmp = ((t_m * t_2) / Math.pow(((t_m / t_3) * t_5), 2.0)) * ((t_2 * t_3) / t_5);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(sqrt(2.0) / k) t_3 = cbrt(l) ^ 2.0 t_4 = Float64(sin(k) * tan(k)) t_5 = cbrt(t_4) tmp = 0.0 if (Float64(l * l) <= 2e-108) tmp = Float64(Float64(l * sqrt(2.0)) / Float64((k ^ 2.0) * sqrt(t_m))) ^ 2.0; elseif (Float64(l * l) <= 5e+264) tmp = Float64(2.0 * Float64((l ^ 2.0) / Float64((Float64(k * sqrt(t_m)) ^ 2.0) * t_4))); else tmp = Float64(Float64(Float64(t_m * t_2) / (Float64(Float64(t_m / t_3) * t_5) ^ 2.0)) * Float64(Float64(t_2 * t_3) / t_5)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision]}, Block[{t$95$3 = N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$4 = N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[Power[t$95$4, 1/3], $MachinePrecision]}, N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 2e-108], N[Power[N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 5e+264], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(N[Power[N[(k * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t$95$m * t$95$2), $MachinePrecision] / N[Power[N[(N[(t$95$m / t$95$3), $MachinePrecision] * t$95$5), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$2 * t$95$3), $MachinePrecision] / t$95$5), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{\sqrt{2}}{k}\\
t_3 := {\left(\sqrt[3]{\ell}\right)}^{2}\\
t_4 := \sin k \cdot \tan k\\
t_5 := \sqrt[3]{t\_4}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 2 \cdot 10^{-108}:\\
\;\;\;\;{\left(\frac{\ell \cdot \sqrt{2}}{{k}^{2} \cdot \sqrt{t\_m}}\right)}^{2}\\
\mathbf{elif}\;\ell \cdot \ell \leq 5 \cdot 10^{+264}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2}}{{\left(k \cdot \sqrt{t\_m}\right)}^{2} \cdot t\_4}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_m \cdot t\_2}{{\left(\frac{t\_m}{t\_3} \cdot t\_5\right)}^{2}} \cdot \frac{t\_2 \cdot t\_3}{t\_5}\\
\end{array}
\end{array}
\end{array}
if (*.f64 l l) < 2.00000000000000008e-108Initial program 41.5%
Simplified56.2%
Taylor expanded in k around 0 72.3%
associate-*l/72.3%
pow272.3%
*-commutative72.3%
Applied egg-rr72.3%
add-sqr-sqrt57.1%
pow257.1%
sqrt-div33.2%
sqrt-prod33.2%
sqrt-pow137.1%
metadata-eval37.1%
pow137.1%
*-commutative37.1%
sqrt-prod38.7%
sqrt-pow142.6%
metadata-eval42.6%
Applied egg-rr42.6%
if 2.00000000000000008e-108 < (*.f64 l l) < 5.00000000000000033e264Initial program 34.7%
Simplified47.7%
add-log-exp32.1%
exp-prod35.6%
associate-*r*35.6%
*-commutative35.6%
Applied egg-rr35.6%
Taylor expanded in k around inf 85.7%
associate-*r*85.7%
Simplified85.7%
add-sqr-sqrt53.1%
pow253.1%
sqrt-prod53.1%
sqrt-pow158.6%
metadata-eval58.6%
pow158.6%
Applied egg-rr58.6%
if 5.00000000000000033e264 < (*.f64 l l) Initial program 32.9%
*-commutative32.9%
associate-/r*32.9%
Simplified34.2%
add-sqr-sqrt34.2%
add-cube-cbrt34.1%
times-frac34.1%
Applied egg-rr77.8%
associate-/r/77.8%
associate-/r*77.8%
associate-/r/79.1%
Simplified79.1%
associate-/r/79.1%
Applied egg-rr79.1%
associate-/l*79.1%
*-inverses79.1%
Simplified79.1%
Final simplification57.9%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= (* l l) 2e-108)
(pow (/ (* l (sqrt 2.0)) (* (pow k 2.0) (sqrt t_m))) 2.0)
(if (<= (* l l) 5e+264)
(*
2.0
(/ (pow l 2.0) (* (pow (* k (sqrt t_m)) 2.0) (* (sin k) (tan k)))))
(* 2.0 (pow (/ (/ l k) (sqrt (* (tan k) (* t_m (sin k))))) 2.0))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if ((l * l) <= 2e-108) {
tmp = pow(((l * sqrt(2.0)) / (pow(k, 2.0) * sqrt(t_m))), 2.0);
} else if ((l * l) <= 5e+264) {
tmp = 2.0 * (pow(l, 2.0) / (pow((k * sqrt(t_m)), 2.0) * (sin(k) * tan(k))));
} else {
tmp = 2.0 * pow(((l / k) / sqrt((tan(k) * (t_m * sin(k))))), 2.0);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if ((l * l) <= 2d-108) then
tmp = ((l * sqrt(2.0d0)) / ((k ** 2.0d0) * sqrt(t_m))) ** 2.0d0
else if ((l * l) <= 5d+264) then
tmp = 2.0d0 * ((l ** 2.0d0) / (((k * sqrt(t_m)) ** 2.0d0) * (sin(k) * tan(k))))
else
tmp = 2.0d0 * (((l / k) / sqrt((tan(k) * (t_m * sin(k))))) ** 2.0d0)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if ((l * l) <= 2e-108) {
tmp = Math.pow(((l * Math.sqrt(2.0)) / (Math.pow(k, 2.0) * Math.sqrt(t_m))), 2.0);
} else if ((l * l) <= 5e+264) {
tmp = 2.0 * (Math.pow(l, 2.0) / (Math.pow((k * Math.sqrt(t_m)), 2.0) * (Math.sin(k) * Math.tan(k))));
} else {
tmp = 2.0 * Math.pow(((l / k) / Math.sqrt((Math.tan(k) * (t_m * Math.sin(k))))), 2.0);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if (l * l) <= 2e-108: tmp = math.pow(((l * math.sqrt(2.0)) / (math.pow(k, 2.0) * math.sqrt(t_m))), 2.0) elif (l * l) <= 5e+264: tmp = 2.0 * (math.pow(l, 2.0) / (math.pow((k * math.sqrt(t_m)), 2.0) * (math.sin(k) * math.tan(k)))) else: tmp = 2.0 * math.pow(((l / k) / math.sqrt((math.tan(k) * (t_m * math.sin(k))))), 2.0) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (Float64(l * l) <= 2e-108) tmp = Float64(Float64(l * sqrt(2.0)) / Float64((k ^ 2.0) * sqrt(t_m))) ^ 2.0; elseif (Float64(l * l) <= 5e+264) tmp = Float64(2.0 * Float64((l ^ 2.0) / Float64((Float64(k * sqrt(t_m)) ^ 2.0) * Float64(sin(k) * tan(k))))); else tmp = Float64(2.0 * (Float64(Float64(l / k) / sqrt(Float64(tan(k) * Float64(t_m * sin(k))))) ^ 2.0)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if ((l * l) <= 2e-108) tmp = ((l * sqrt(2.0)) / ((k ^ 2.0) * sqrt(t_m))) ^ 2.0; elseif ((l * l) <= 5e+264) tmp = 2.0 * ((l ^ 2.0) / (((k * sqrt(t_m)) ^ 2.0) * (sin(k) * tan(k)))); else tmp = 2.0 * (((l / k) / sqrt((tan(k) * (t_m * sin(k))))) ^ 2.0); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 2e-108], N[Power[N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 5e+264], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(N[Power[N[(k * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[Power[N[(N[(l / k), $MachinePrecision] / N[Sqrt[N[(N[Tan[k], $MachinePrecision] * N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 2 \cdot 10^{-108}:\\
\;\;\;\;{\left(\frac{\ell \cdot \sqrt{2}}{{k}^{2} \cdot \sqrt{t\_m}}\right)}^{2}\\
\mathbf{elif}\;\ell \cdot \ell \leq 5 \cdot 10^{+264}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2}}{{\left(k \cdot \sqrt{t\_m}\right)}^{2} \cdot \left(\sin k \cdot \tan k\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot {\left(\frac{\frac{\ell}{k}}{\sqrt{\tan k \cdot \left(t\_m \cdot \sin k\right)}}\right)}^{2}\\
\end{array}
\end{array}
if (*.f64 l l) < 2.00000000000000008e-108Initial program 41.5%
Simplified56.2%
Taylor expanded in k around 0 72.3%
associate-*l/72.3%
pow272.3%
*-commutative72.3%
Applied egg-rr72.3%
add-sqr-sqrt57.1%
pow257.1%
sqrt-div33.2%
sqrt-prod33.2%
sqrt-pow137.1%
metadata-eval37.1%
pow137.1%
*-commutative37.1%
sqrt-prod38.7%
sqrt-pow142.6%
metadata-eval42.6%
Applied egg-rr42.6%
if 2.00000000000000008e-108 < (*.f64 l l) < 5.00000000000000033e264Initial program 34.7%
Simplified47.7%
add-log-exp32.1%
exp-prod35.6%
associate-*r*35.6%
*-commutative35.6%
Applied egg-rr35.6%
Taylor expanded in k around inf 85.7%
associate-*r*85.7%
Simplified85.7%
add-sqr-sqrt53.1%
pow253.1%
sqrt-prod53.1%
sqrt-pow158.6%
metadata-eval58.6%
pow158.6%
Applied egg-rr58.6%
if 5.00000000000000033e264 < (*.f64 l l) Initial program 32.9%
Simplified36.5%
add-log-exp11.8%
exp-prod25.4%
associate-*r*25.4%
*-commutative25.4%
Applied egg-rr25.4%
Taylor expanded in k around inf 65.5%
associate-*r*65.5%
Simplified65.5%
*-un-lft-identity65.5%
add-sqr-sqrt31.5%
pow231.5%
sqrt-div31.5%
sqrt-pow136.9%
metadata-eval36.9%
pow136.9%
associate-*l*36.9%
sqrt-prod41.8%
sqrt-pow148.1%
metadata-eval48.1%
pow148.1%
Applied egg-rr48.1%
*-lft-identity48.1%
associate-/r*51.6%
associate-*r*51.7%
Simplified51.7%
Final simplification49.7%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= (* l l) 1e-134)
(pow (/ (* l (sqrt 2.0)) (* (pow k 2.0) (sqrt t_m))) 2.0)
(if (<= (* l l) 1e+235)
(* 2.0 (/ (pow l 2.0) (* t_m (* (pow k 2.0) (* (sin k) (tan k))))))
(* 2.0 (pow (/ (/ l k) (sqrt (* (tan k) (* t_m (sin k))))) 2.0))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if ((l * l) <= 1e-134) {
tmp = pow(((l * sqrt(2.0)) / (pow(k, 2.0) * sqrt(t_m))), 2.0);
} else if ((l * l) <= 1e+235) {
tmp = 2.0 * (pow(l, 2.0) / (t_m * (pow(k, 2.0) * (sin(k) * tan(k)))));
} else {
tmp = 2.0 * pow(((l / k) / sqrt((tan(k) * (t_m * sin(k))))), 2.0);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if ((l * l) <= 1d-134) then
tmp = ((l * sqrt(2.0d0)) / ((k ** 2.0d0) * sqrt(t_m))) ** 2.0d0
else if ((l * l) <= 1d+235) then
tmp = 2.0d0 * ((l ** 2.0d0) / (t_m * ((k ** 2.0d0) * (sin(k) * tan(k)))))
else
tmp = 2.0d0 * (((l / k) / sqrt((tan(k) * (t_m * sin(k))))) ** 2.0d0)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if ((l * l) <= 1e-134) {
tmp = Math.pow(((l * Math.sqrt(2.0)) / (Math.pow(k, 2.0) * Math.sqrt(t_m))), 2.0);
} else if ((l * l) <= 1e+235) {
tmp = 2.0 * (Math.pow(l, 2.0) / (t_m * (Math.pow(k, 2.0) * (Math.sin(k) * Math.tan(k)))));
} else {
tmp = 2.0 * Math.pow(((l / k) / Math.sqrt((Math.tan(k) * (t_m * Math.sin(k))))), 2.0);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if (l * l) <= 1e-134: tmp = math.pow(((l * math.sqrt(2.0)) / (math.pow(k, 2.0) * math.sqrt(t_m))), 2.0) elif (l * l) <= 1e+235: tmp = 2.0 * (math.pow(l, 2.0) / (t_m * (math.pow(k, 2.0) * (math.sin(k) * math.tan(k))))) else: tmp = 2.0 * math.pow(((l / k) / math.sqrt((math.tan(k) * (t_m * math.sin(k))))), 2.0) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (Float64(l * l) <= 1e-134) tmp = Float64(Float64(l * sqrt(2.0)) / Float64((k ^ 2.0) * sqrt(t_m))) ^ 2.0; elseif (Float64(l * l) <= 1e+235) tmp = Float64(2.0 * Float64((l ^ 2.0) / Float64(t_m * Float64((k ^ 2.0) * Float64(sin(k) * tan(k)))))); else tmp = Float64(2.0 * (Float64(Float64(l / k) / sqrt(Float64(tan(k) * Float64(t_m * sin(k))))) ^ 2.0)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if ((l * l) <= 1e-134) tmp = ((l * sqrt(2.0)) / ((k ^ 2.0) * sqrt(t_m))) ^ 2.0; elseif ((l * l) <= 1e+235) tmp = 2.0 * ((l ^ 2.0) / (t_m * ((k ^ 2.0) * (sin(k) * tan(k))))); else tmp = 2.0 * (((l / k) / sqrt((tan(k) * (t_m * sin(k))))) ^ 2.0); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 1e-134], N[Power[N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 1e+235], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[Power[N[(N[(l / k), $MachinePrecision] / N[Sqrt[N[(N[Tan[k], $MachinePrecision] * N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 10^{-134}:\\
\;\;\;\;{\left(\frac{\ell \cdot \sqrt{2}}{{k}^{2} \cdot \sqrt{t\_m}}\right)}^{2}\\
\mathbf{elif}\;\ell \cdot \ell \leq 10^{+235}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2}}{t\_m \cdot \left({k}^{2} \cdot \left(\sin k \cdot \tan k\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot {\left(\frac{\frac{\ell}{k}}{\sqrt{\tan k \cdot \left(t\_m \cdot \sin k\right)}}\right)}^{2}\\
\end{array}
\end{array}
if (*.f64 l l) < 1.00000000000000004e-134Initial program 38.5%
Simplified54.2%
Taylor expanded in k around 0 70.4%
associate-*l/70.4%
pow270.4%
*-commutative70.4%
Applied egg-rr70.4%
add-sqr-sqrt58.1%
pow258.1%
sqrt-div32.6%
sqrt-prod32.6%
sqrt-pow136.7%
metadata-eval36.7%
pow136.7%
*-commutative36.7%
sqrt-prod38.4%
sqrt-pow142.5%
metadata-eval42.5%
Applied egg-rr42.5%
if 1.00000000000000004e-134 < (*.f64 l l) < 1.0000000000000001e235Initial program 41.7%
Simplified54.8%
add-log-exp34.9%
exp-prod36.8%
associate-*r*36.8%
*-commutative36.8%
Applied egg-rr36.8%
Taylor expanded in k around inf 89.9%
associate-*r*89.9%
Simplified89.9%
div-inv89.0%
*-commutative89.0%
Applied egg-rr89.0%
associate-*r/89.9%
*-rgt-identity89.9%
associate-*l*90.0%
Simplified90.0%
if 1.0000000000000001e235 < (*.f64 l l) Initial program 31.4%
Simplified34.7%
add-log-exp12.1%
exp-prod25.9%
associate-*r*25.9%
*-commutative25.9%
Applied egg-rr25.9%
Taylor expanded in k around inf 64.9%
associate-*r*64.9%
Simplified64.9%
*-un-lft-identity64.9%
add-sqr-sqrt33.7%
pow233.7%
sqrt-div33.7%
sqrt-pow138.6%
metadata-eval38.6%
pow138.6%
associate-*l*38.6%
sqrt-prod43.1%
sqrt-pow150.0%
metadata-eval50.0%
pow150.0%
Applied egg-rr50.0%
*-lft-identity50.0%
associate-/r*53.2%
associate-*r*53.2%
Simplified53.2%
Final simplification59.0%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (* (sin k) (tan k))))
(*
t_s
(if (<= (* l l) 2e-108)
(pow (/ (* l (sqrt 2.0)) (* (pow k 2.0) (sqrt t_m))) 2.0)
(if (<= (* l l) 1e+235)
(* 2.0 (/ (* l l) (* t_2 (* (pow k 2.0) t_m))))
(* 2.0 (pow (/ l (* k (sqrt (* t_m t_2)))) 2.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = sin(k) * tan(k);
double tmp;
if ((l * l) <= 2e-108) {
tmp = pow(((l * sqrt(2.0)) / (pow(k, 2.0) * sqrt(t_m))), 2.0);
} else if ((l * l) <= 1e+235) {
tmp = 2.0 * ((l * l) / (t_2 * (pow(k, 2.0) * t_m)));
} else {
tmp = 2.0 * pow((l / (k * sqrt((t_m * t_2)))), 2.0);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_2
real(8) :: tmp
t_2 = sin(k) * tan(k)
if ((l * l) <= 2d-108) then
tmp = ((l * sqrt(2.0d0)) / ((k ** 2.0d0) * sqrt(t_m))) ** 2.0d0
else if ((l * l) <= 1d+235) then
tmp = 2.0d0 * ((l * l) / (t_2 * ((k ** 2.0d0) * t_m)))
else
tmp = 2.0d0 * ((l / (k * sqrt((t_m * t_2)))) ** 2.0d0)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.sin(k) * Math.tan(k);
double tmp;
if ((l * l) <= 2e-108) {
tmp = Math.pow(((l * Math.sqrt(2.0)) / (Math.pow(k, 2.0) * Math.sqrt(t_m))), 2.0);
} else if ((l * l) <= 1e+235) {
tmp = 2.0 * ((l * l) / (t_2 * (Math.pow(k, 2.0) * t_m)));
} else {
tmp = 2.0 * Math.pow((l / (k * Math.sqrt((t_m * t_2)))), 2.0);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): t_2 = math.sin(k) * math.tan(k) tmp = 0 if (l * l) <= 2e-108: tmp = math.pow(((l * math.sqrt(2.0)) / (math.pow(k, 2.0) * math.sqrt(t_m))), 2.0) elif (l * l) <= 1e+235: tmp = 2.0 * ((l * l) / (t_2 * (math.pow(k, 2.0) * t_m))) else: tmp = 2.0 * math.pow((l / (k * math.sqrt((t_m * t_2)))), 2.0) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(sin(k) * tan(k)) tmp = 0.0 if (Float64(l * l) <= 2e-108) tmp = Float64(Float64(l * sqrt(2.0)) / Float64((k ^ 2.0) * sqrt(t_m))) ^ 2.0; elseif (Float64(l * l) <= 1e+235) tmp = Float64(2.0 * Float64(Float64(l * l) / Float64(t_2 * Float64((k ^ 2.0) * t_m)))); else tmp = Float64(2.0 * (Float64(l / Float64(k * sqrt(Float64(t_m * t_2)))) ^ 2.0)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) t_2 = sin(k) * tan(k); tmp = 0.0; if ((l * l) <= 2e-108) tmp = ((l * sqrt(2.0)) / ((k ^ 2.0) * sqrt(t_m))) ^ 2.0; elseif ((l * l) <= 1e+235) tmp = 2.0 * ((l * l) / (t_2 * ((k ^ 2.0) * t_m))); else tmp = 2.0 * ((l / (k * sqrt((t_m * t_2)))) ^ 2.0); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 2e-108], N[Power[N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 1e+235], N[(2.0 * N[(N[(l * l), $MachinePrecision] / N[(t$95$2 * N[(N[Power[k, 2.0], $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[Power[N[(l / N[(k * N[Sqrt[N[(t$95$m * t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \sin k \cdot \tan k\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 2 \cdot 10^{-108}:\\
\;\;\;\;{\left(\frac{\ell \cdot \sqrt{2}}{{k}^{2} \cdot \sqrt{t\_m}}\right)}^{2}\\
\mathbf{elif}\;\ell \cdot \ell \leq 10^{+235}:\\
\;\;\;\;2 \cdot \frac{\ell \cdot \ell}{t\_2 \cdot \left({k}^{2} \cdot t\_m\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot {\left(\frac{\ell}{k \cdot \sqrt{t\_m \cdot t\_2}}\right)}^{2}\\
\end{array}
\end{array}
\end{array}
if (*.f64 l l) < 2.00000000000000008e-108Initial program 41.5%
Simplified56.2%
Taylor expanded in k around 0 72.3%
associate-*l/72.3%
pow272.3%
*-commutative72.3%
Applied egg-rr72.3%
add-sqr-sqrt57.1%
pow257.1%
sqrt-div33.2%
sqrt-prod33.2%
sqrt-pow137.1%
metadata-eval37.1%
pow137.1%
*-commutative37.1%
sqrt-prod38.7%
sqrt-pow142.6%
metadata-eval42.6%
Applied egg-rr42.6%
if 2.00000000000000008e-108 < (*.f64 l l) < 1.0000000000000001e235Initial program 36.9%
Simplified51.3%
add-log-exp34.0%
exp-prod36.1%
associate-*r*36.1%
*-commutative36.1%
Applied egg-rr36.1%
Taylor expanded in k around inf 88.8%
associate-*r*88.8%
Simplified88.8%
unpow269.5%
Applied egg-rr88.8%
if 1.0000000000000001e235 < (*.f64 l l) Initial program 31.4%
Simplified34.7%
add-log-exp12.1%
exp-prod25.9%
associate-*r*25.9%
*-commutative25.9%
Applied egg-rr25.9%
Taylor expanded in k around inf 64.9%
associate-*r*64.9%
Simplified64.9%
add-sqr-sqrt33.7%
pow233.7%
sqrt-div33.7%
sqrt-pow138.6%
metadata-eval38.6%
pow138.6%
associate-*l*38.6%
sqrt-prod43.1%
sqrt-pow150.0%
metadata-eval50.0%
pow150.0%
Applied egg-rr50.0%
Final simplification56.4%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= (* l l) 2e-108)
(pow (/ (* l (sqrt 2.0)) (* (pow k 2.0) (sqrt t_m))) 2.0)
(if (<= (* l l) 1e+235)
(* 2.0 (/ (* l l) (* (* (sin k) (tan k)) (* (pow k 2.0) t_m))))
(* 2.0 (pow (/ (/ l k) (sqrt (* (tan k) (* t_m (sin k))))) 2.0))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if ((l * l) <= 2e-108) {
tmp = pow(((l * sqrt(2.0)) / (pow(k, 2.0) * sqrt(t_m))), 2.0);
} else if ((l * l) <= 1e+235) {
tmp = 2.0 * ((l * l) / ((sin(k) * tan(k)) * (pow(k, 2.0) * t_m)));
} else {
tmp = 2.0 * pow(((l / k) / sqrt((tan(k) * (t_m * sin(k))))), 2.0);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if ((l * l) <= 2d-108) then
tmp = ((l * sqrt(2.0d0)) / ((k ** 2.0d0) * sqrt(t_m))) ** 2.0d0
else if ((l * l) <= 1d+235) then
tmp = 2.0d0 * ((l * l) / ((sin(k) * tan(k)) * ((k ** 2.0d0) * t_m)))
else
tmp = 2.0d0 * (((l / k) / sqrt((tan(k) * (t_m * sin(k))))) ** 2.0d0)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if ((l * l) <= 2e-108) {
tmp = Math.pow(((l * Math.sqrt(2.0)) / (Math.pow(k, 2.0) * Math.sqrt(t_m))), 2.0);
} else if ((l * l) <= 1e+235) {
tmp = 2.0 * ((l * l) / ((Math.sin(k) * Math.tan(k)) * (Math.pow(k, 2.0) * t_m)));
} else {
tmp = 2.0 * Math.pow(((l / k) / Math.sqrt((Math.tan(k) * (t_m * Math.sin(k))))), 2.0);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if (l * l) <= 2e-108: tmp = math.pow(((l * math.sqrt(2.0)) / (math.pow(k, 2.0) * math.sqrt(t_m))), 2.0) elif (l * l) <= 1e+235: tmp = 2.0 * ((l * l) / ((math.sin(k) * math.tan(k)) * (math.pow(k, 2.0) * t_m))) else: tmp = 2.0 * math.pow(((l / k) / math.sqrt((math.tan(k) * (t_m * math.sin(k))))), 2.0) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (Float64(l * l) <= 2e-108) tmp = Float64(Float64(l * sqrt(2.0)) / Float64((k ^ 2.0) * sqrt(t_m))) ^ 2.0; elseif (Float64(l * l) <= 1e+235) tmp = Float64(2.0 * Float64(Float64(l * l) / Float64(Float64(sin(k) * tan(k)) * Float64((k ^ 2.0) * t_m)))); else tmp = Float64(2.0 * (Float64(Float64(l / k) / sqrt(Float64(tan(k) * Float64(t_m * sin(k))))) ^ 2.0)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if ((l * l) <= 2e-108) tmp = ((l * sqrt(2.0)) / ((k ^ 2.0) * sqrt(t_m))) ^ 2.0; elseif ((l * l) <= 1e+235) tmp = 2.0 * ((l * l) / ((sin(k) * tan(k)) * ((k ^ 2.0) * t_m))); else tmp = 2.0 * (((l / k) / sqrt((tan(k) * (t_m * sin(k))))) ^ 2.0); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 2e-108], N[Power[N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 1e+235], N[(2.0 * N[(N[(l * l), $MachinePrecision] / N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[Power[N[(N[(l / k), $MachinePrecision] / N[Sqrt[N[(N[Tan[k], $MachinePrecision] * N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 2 \cdot 10^{-108}:\\
\;\;\;\;{\left(\frac{\ell \cdot \sqrt{2}}{{k}^{2} \cdot \sqrt{t\_m}}\right)}^{2}\\
\mathbf{elif}\;\ell \cdot \ell \leq 10^{+235}:\\
\;\;\;\;2 \cdot \frac{\ell \cdot \ell}{\left(\sin k \cdot \tan k\right) \cdot \left({k}^{2} \cdot t\_m\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot {\left(\frac{\frac{\ell}{k}}{\sqrt{\tan k \cdot \left(t\_m \cdot \sin k\right)}}\right)}^{2}\\
\end{array}
\end{array}
if (*.f64 l l) < 2.00000000000000008e-108Initial program 41.5%
Simplified56.2%
Taylor expanded in k around 0 72.3%
associate-*l/72.3%
pow272.3%
*-commutative72.3%
Applied egg-rr72.3%
add-sqr-sqrt57.1%
pow257.1%
sqrt-div33.2%
sqrt-prod33.2%
sqrt-pow137.1%
metadata-eval37.1%
pow137.1%
*-commutative37.1%
sqrt-prod38.7%
sqrt-pow142.6%
metadata-eval42.6%
Applied egg-rr42.6%
if 2.00000000000000008e-108 < (*.f64 l l) < 1.0000000000000001e235Initial program 36.9%
Simplified51.3%
add-log-exp34.0%
exp-prod36.1%
associate-*r*36.1%
*-commutative36.1%
Applied egg-rr36.1%
Taylor expanded in k around inf 88.8%
associate-*r*88.8%
Simplified88.8%
unpow269.5%
Applied egg-rr88.8%
if 1.0000000000000001e235 < (*.f64 l l) Initial program 31.4%
Simplified34.7%
add-log-exp12.1%
exp-prod25.9%
associate-*r*25.9%
*-commutative25.9%
Applied egg-rr25.9%
Taylor expanded in k around inf 64.9%
associate-*r*64.9%
Simplified64.9%
*-un-lft-identity64.9%
add-sqr-sqrt33.7%
pow233.7%
sqrt-div33.7%
sqrt-pow138.6%
metadata-eval38.6%
pow138.6%
associate-*l*38.6%
sqrt-prod43.1%
sqrt-pow150.0%
metadata-eval50.0%
pow150.0%
Applied egg-rr50.0%
*-lft-identity50.0%
associate-/r*53.2%
associate-*r*53.2%
Simplified53.2%
Final simplification57.4%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= l 2.36e-91)
(pow (* l (/ (sqrt 2.0) (* (pow k 2.0) (sqrt t_m)))) 2.0)
(* 2.0 (/ (* l l) (* (* (sin k) (tan k)) (* (pow k 2.0) t_m)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (l <= 2.36e-91) {
tmp = pow((l * (sqrt(2.0) / (pow(k, 2.0) * sqrt(t_m)))), 2.0);
} else {
tmp = 2.0 * ((l * l) / ((sin(k) * tan(k)) * (pow(k, 2.0) * t_m)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (l <= 2.36d-91) then
tmp = (l * (sqrt(2.0d0) / ((k ** 2.0d0) * sqrt(t_m)))) ** 2.0d0
else
tmp = 2.0d0 * ((l * l) / ((sin(k) * tan(k)) * ((k ** 2.0d0) * t_m)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (l <= 2.36e-91) {
tmp = Math.pow((l * (Math.sqrt(2.0) / (Math.pow(k, 2.0) * Math.sqrt(t_m)))), 2.0);
} else {
tmp = 2.0 * ((l * l) / ((Math.sin(k) * Math.tan(k)) * (Math.pow(k, 2.0) * t_m)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if l <= 2.36e-91: tmp = math.pow((l * (math.sqrt(2.0) / (math.pow(k, 2.0) * math.sqrt(t_m)))), 2.0) else: tmp = 2.0 * ((l * l) / ((math.sin(k) * math.tan(k)) * (math.pow(k, 2.0) * t_m))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (l <= 2.36e-91) tmp = Float64(l * Float64(sqrt(2.0) / Float64((k ^ 2.0) * sqrt(t_m)))) ^ 2.0; else tmp = Float64(2.0 * Float64(Float64(l * l) / Float64(Float64(sin(k) * tan(k)) * Float64((k ^ 2.0) * t_m)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (l <= 2.36e-91) tmp = (l * (sqrt(2.0) / ((k ^ 2.0) * sqrt(t_m)))) ^ 2.0; else tmp = 2.0 * ((l * l) / ((sin(k) * tan(k)) * ((k ^ 2.0) * t_m))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[l, 2.36e-91], N[Power[N[(l * N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(2.0 * N[(N[(l * l), $MachinePrecision] / N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \leq 2.36 \cdot 10^{-91}:\\
\;\;\;\;{\left(\ell \cdot \frac{\sqrt{2}}{{k}^{2} \cdot \sqrt{t\_m}}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\ell \cdot \ell}{\left(\sin k \cdot \tan k\right) \cdot \left({k}^{2} \cdot t\_m\right)}\\
\end{array}
\end{array}
if l < 2.36e-91Initial program 37.9%
Simplified50.4%
Taylor expanded in k around 0 64.0%
associate-*l/64.3%
pow264.3%
*-commutative64.3%
Applied egg-rr64.3%
add-sqr-sqrt47.7%
sqrt-div31.1%
sqrt-prod31.1%
sqrt-pow120.8%
metadata-eval20.8%
pow120.8%
*-commutative20.8%
sqrt-prod20.8%
sqrt-pow120.8%
metadata-eval20.8%
sqrt-div20.8%
sqrt-prod20.8%
sqrt-pow133.1%
metadata-eval33.1%
pow133.1%
*-commutative33.1%
sqrt-prod34.2%
sqrt-pow136.6%
metadata-eval36.6%
Applied egg-rr36.6%
unpow236.6%
*-commutative36.6%
associate-/l*35.9%
Simplified35.9%
if 2.36e-91 < l Initial program 35.4%
Simplified42.7%
add-log-exp22.8%
exp-prod29.7%
associate-*r*29.7%
*-commutative29.7%
Applied egg-rr29.7%
Taylor expanded in k around inf 76.8%
associate-*r*76.8%
Simplified76.8%
unpow261.3%
Applied egg-rr76.8%
Final simplification48.7%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= l 1.25e-54)
(pow (/ (* l (sqrt 2.0)) (* (pow k 2.0) (sqrt t_m))) 2.0)
(* 2.0 (/ (* l l) (* (* (sin k) (tan k)) (* (pow k 2.0) t_m)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (l <= 1.25e-54) {
tmp = pow(((l * sqrt(2.0)) / (pow(k, 2.0) * sqrt(t_m))), 2.0);
} else {
tmp = 2.0 * ((l * l) / ((sin(k) * tan(k)) * (pow(k, 2.0) * t_m)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (l <= 1.25d-54) then
tmp = ((l * sqrt(2.0d0)) / ((k ** 2.0d0) * sqrt(t_m))) ** 2.0d0
else
tmp = 2.0d0 * ((l * l) / ((sin(k) * tan(k)) * ((k ** 2.0d0) * t_m)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (l <= 1.25e-54) {
tmp = Math.pow(((l * Math.sqrt(2.0)) / (Math.pow(k, 2.0) * Math.sqrt(t_m))), 2.0);
} else {
tmp = 2.0 * ((l * l) / ((Math.sin(k) * Math.tan(k)) * (Math.pow(k, 2.0) * t_m)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if l <= 1.25e-54: tmp = math.pow(((l * math.sqrt(2.0)) / (math.pow(k, 2.0) * math.sqrt(t_m))), 2.0) else: tmp = 2.0 * ((l * l) / ((math.sin(k) * math.tan(k)) * (math.pow(k, 2.0) * t_m))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (l <= 1.25e-54) tmp = Float64(Float64(l * sqrt(2.0)) / Float64((k ^ 2.0) * sqrt(t_m))) ^ 2.0; else tmp = Float64(2.0 * Float64(Float64(l * l) / Float64(Float64(sin(k) * tan(k)) * Float64((k ^ 2.0) * t_m)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (l <= 1.25e-54) tmp = ((l * sqrt(2.0)) / ((k ^ 2.0) * sqrt(t_m))) ^ 2.0; else tmp = 2.0 * ((l * l) / ((sin(k) * tan(k)) * ((k ^ 2.0) * t_m))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[l, 1.25e-54], N[Power[N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(2.0 * N[(N[(l * l), $MachinePrecision] / N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \leq 1.25 \cdot 10^{-54}:\\
\;\;\;\;{\left(\frac{\ell \cdot \sqrt{2}}{{k}^{2} \cdot \sqrt{t\_m}}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\ell \cdot \ell}{\left(\sin k \cdot \tan k\right) \cdot \left({k}^{2} \cdot t\_m\right)}\\
\end{array}
\end{array}
if l < 1.25000000000000004e-54Initial program 39.7%
Simplified52.3%
Taylor expanded in k around 0 65.3%
associate-*l/65.7%
pow265.7%
*-commutative65.7%
Applied egg-rr65.7%
add-sqr-sqrt48.1%
pow248.1%
sqrt-div31.5%
sqrt-prod31.5%
sqrt-pow133.5%
metadata-eval33.5%
pow133.5%
*-commutative33.5%
sqrt-prod34.5%
sqrt-pow136.8%
metadata-eval36.8%
Applied egg-rr36.8%
if 1.25000000000000004e-54 < l Initial program 30.5%
Simplified37.2%
add-log-exp19.5%
exp-prod27.0%
associate-*r*27.0%
*-commutative27.0%
Applied egg-rr27.0%
Taylor expanded in k around inf 74.6%
associate-*r*74.6%
Simplified74.6%
unpow257.6%
Applied egg-rr74.6%
Final simplification47.6%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (* 2.0 (/ (* l l) (* (* (sin k) (tan k)) (* (pow k 2.0) t_m))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 * ((l * l) / ((sin(k) * tan(k)) * (pow(k, 2.0) * t_m))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 * ((l * l) / ((sin(k) * tan(k)) * ((k ** 2.0d0) * t_m))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 * ((l * l) / ((Math.sin(k) * Math.tan(k)) * (Math.pow(k, 2.0) * t_m))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 * ((l * l) / ((math.sin(k) * math.tan(k)) * (math.pow(k, 2.0) * t_m))))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 * Float64(Float64(l * l) / Float64(Float64(sin(k) * tan(k)) * Float64((k ^ 2.0) * t_m))))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 * ((l * l) / ((sin(k) * tan(k)) * ((k ^ 2.0) * t_m)))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 * N[(N[(l * l), $MachinePrecision] / N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \left(2 \cdot \frac{\ell \cdot \ell}{\left(\sin k \cdot \tan k\right) \cdot \left({k}^{2} \cdot t\_m\right)}\right)
\end{array}
Initial program 37.1%
Simplified48.0%
add-log-exp30.0%
exp-prod32.0%
associate-*r*32.0%
*-commutative32.0%
Applied egg-rr32.0%
Taylor expanded in k around inf 75.3%
associate-*r*75.3%
Simplified75.3%
unpow263.4%
Applied egg-rr75.3%
Final simplification75.3%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (* 2.0 (/ (pow l 2.0) (* (pow k 2.0) (* (pow k 2.0) t_m))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 * (pow(l, 2.0) / (pow(k, 2.0) * (pow(k, 2.0) * t_m))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 * ((l ** 2.0d0) / ((k ** 2.0d0) * ((k ** 2.0d0) * t_m))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 * (Math.pow(l, 2.0) / (Math.pow(k, 2.0) * (Math.pow(k, 2.0) * t_m))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 * (math.pow(l, 2.0) / (math.pow(k, 2.0) * (math.pow(k, 2.0) * t_m))))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 * Float64((l ^ 2.0) / Float64((k ^ 2.0) * Float64((k ^ 2.0) * t_m))))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 * ((l ^ 2.0) / ((k ^ 2.0) * ((k ^ 2.0) * t_m)))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \left(2 \cdot \frac{{\ell}^{2}}{{k}^{2} \cdot \left({k}^{2} \cdot t\_m\right)}\right)
\end{array}
Initial program 37.1%
Simplified48.0%
add-log-exp30.0%
exp-prod32.0%
associate-*r*32.0%
*-commutative32.0%
Applied egg-rr32.0%
Taylor expanded in k around inf 75.3%
associate-*r*75.3%
Simplified75.3%
Taylor expanded in k around 0 65.2%
Final simplification65.2%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (* (* l l) (/ 2.0 (pow (* (pow k 2.0) (sqrt t_m)) 2.0)))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * ((l * l) * (2.0 / pow((pow(k, 2.0) * sqrt(t_m)), 2.0)));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * ((l * l) * (2.0d0 / (((k ** 2.0d0) * sqrt(t_m)) ** 2.0d0)))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * ((l * l) * (2.0 / Math.pow((Math.pow(k, 2.0) * Math.sqrt(t_m)), 2.0)));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * ((l * l) * (2.0 / math.pow((math.pow(k, 2.0) * math.sqrt(t_m)), 2.0)))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(Float64(l * l) * Float64(2.0 / (Float64((k ^ 2.0) * sqrt(t_m)) ^ 2.0)))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * ((l * l) * (2.0 / (((k ^ 2.0) * sqrt(t_m)) ^ 2.0))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(N[(l * l), $MachinePrecision] * N[(2.0 / N[Power[N[(N[Power[k, 2.0], $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \left(\left(\ell \cdot \ell\right) \cdot \frac{2}{{\left({k}^{2} \cdot \sqrt{t\_m}\right)}^{2}}\right)
\end{array}
Initial program 37.1%
Simplified48.0%
add-sqr-sqrt24.4%
pow224.4%
*-commutative24.4%
sqrt-prod19.3%
associate-*r*19.3%
sqrt-prod19.3%
sqrt-pow121.0%
metadata-eval21.0%
pow121.0%
sqrt-pow127.2%
metadata-eval27.2%
Applied egg-rr27.2%
Taylor expanded in k around 0 34.1%
Final simplification34.1%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (* (/ 2.0 t_m) (/ (pow l 2.0) (pow k 4.0)))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * ((2.0 / t_m) * (pow(l, 2.0) / pow(k, 4.0)));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * ((2.0d0 / t_m) * ((l ** 2.0d0) / (k ** 4.0d0)))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * ((2.0 / t_m) * (Math.pow(l, 2.0) / Math.pow(k, 4.0)));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * ((2.0 / t_m) * (math.pow(l, 2.0) / math.pow(k, 4.0)))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(Float64(2.0 / t_m) * Float64((l ^ 2.0) / (k ^ 4.0)))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * ((2.0 / t_m) * ((l ^ 2.0) / (k ^ 4.0))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(N[(2.0 / t$95$m), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \left(\frac{2}{t\_m} \cdot \frac{{\ell}^{2}}{{k}^{4}}\right)
\end{array}
Initial program 37.1%
Simplified48.0%
Taylor expanded in k around 0 63.1%
associate-*l/63.4%
pow263.4%
*-commutative63.4%
Applied egg-rr63.4%
times-frac63.4%
Applied egg-rr63.4%
Final simplification63.4%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (* (* l l) (/ 2.0 (* t_m (pow k 4.0))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * ((l * l) * (2.0 / (t_m * pow(k, 4.0))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * ((l * l) * (2.0d0 / (t_m * (k ** 4.0d0))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * ((l * l) * (2.0 / (t_m * Math.pow(k, 4.0))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * ((l * l) * (2.0 / (t_m * math.pow(k, 4.0))))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(Float64(l * l) * Float64(2.0 / Float64(t_m * (k ^ 4.0))))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * ((l * l) * (2.0 / (t_m * (k ^ 4.0)))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(N[(l * l), $MachinePrecision] * N[(2.0 / N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \left(\left(\ell \cdot \ell\right) \cdot \frac{2}{t\_m \cdot {k}^{4}}\right)
\end{array}
Initial program 37.1%
Simplified48.0%
Taylor expanded in k around 0 63.1%
Final simplification63.1%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ (* (* l l) 2.0) (* t_m (pow k 4.0)))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (((l * l) * 2.0) / (t_m * pow(k, 4.0)));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (((l * l) * 2.0d0) / (t_m * (k ** 4.0d0)))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (((l * l) * 2.0) / (t_m * Math.pow(k, 4.0)));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (((l * l) * 2.0) / (t_m * math.pow(k, 4.0)))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(Float64(Float64(l * l) * 2.0) / Float64(t_m * (k ^ 4.0)))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (((l * l) * 2.0) / (t_m * (k ^ 4.0))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(N[(N[(l * l), $MachinePrecision] * 2.0), $MachinePrecision] / N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \frac{\left(\ell \cdot \ell\right) \cdot 2}{t\_m \cdot {k}^{4}}
\end{array}
Initial program 37.1%
Simplified48.0%
Taylor expanded in k around 0 63.1%
associate-*l/63.4%
pow263.4%
*-commutative63.4%
Applied egg-rr63.4%
unpow263.4%
Applied egg-rr63.4%
Final simplification63.4%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (* (* l l) (/ 2.0 0.0))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * ((l * l) * (2.0 / 0.0));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * ((l * l) * (2.0d0 / 0.0d0))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * ((l * l) * (2.0 / 0.0));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * ((l * l) * (2.0 / 0.0))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(Float64(l * l) * Float64(2.0 / 0.0))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * ((l * l) * (2.0 / 0.0)); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(N[(l * l), $MachinePrecision] * N[(2.0 / 0.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \left(\left(\ell \cdot \ell\right) \cdot \frac{2}{0}\right)
\end{array}
Initial program 37.1%
Simplified48.0%
add-log-exp30.0%
exp-prod32.0%
associate-*r*32.0%
*-commutative32.0%
Applied egg-rr32.0%
Taylor expanded in t around 0 18.4%
Final simplification18.4%
herbie shell --seed 2024076
(FPCore (t l k)
:name "Toniolo and Linder, Equation (10-)"
:precision binary64
(/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (- (+ 1.0 (pow (/ k t) 2.0)) 1.0))))