
(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 14 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}
(FPCore (t l k)
:precision binary64
(let* ((t_1 (cbrt (* (sin k) (/ (tan k) l))))
(t_2 (/ (sqrt 2.0) k))
(t_3 (/ (/ t_2 (pow (cbrt l) -2.0)) (cbrt (* (sin k) (tan k))))))
(if (<= (* l l) 5e-296)
(* (* t_2 (/ t (pow (/ (* t t_1) (cbrt l)) 2.0))) t_3)
(if (<= (* l l) 2e-44)
(/ (* 2.0 (* (pow l 2.0) (cos k))) (* (* t (* k k)) (pow (sin k) 2.0)))
(if (<= (* l l) 2e+201)
(*
t_3
(*
(/ (sqrt 2.0) (* k t))
(cbrt (/ (* (pow l 4.0) (pow (cos k) 2.0)) (pow (sin k) 4.0)))))
(* t_3 (* t_2 (/ t (pow (* t_1 (/ t (cbrt l))) 2.0)))))))))
double code(double t, double l, double k) {
double t_1 = cbrt((sin(k) * (tan(k) / l)));
double t_2 = sqrt(2.0) / k;
double t_3 = (t_2 / pow(cbrt(l), -2.0)) / cbrt((sin(k) * tan(k)));
double tmp;
if ((l * l) <= 5e-296) {
tmp = (t_2 * (t / pow(((t * t_1) / cbrt(l)), 2.0))) * t_3;
} else if ((l * l) <= 2e-44) {
tmp = (2.0 * (pow(l, 2.0) * cos(k))) / ((t * (k * k)) * pow(sin(k), 2.0));
} else if ((l * l) <= 2e+201) {
tmp = t_3 * ((sqrt(2.0) / (k * t)) * cbrt(((pow(l, 4.0) * pow(cos(k), 2.0)) / pow(sin(k), 4.0))));
} else {
tmp = t_3 * (t_2 * (t / pow((t_1 * (t / cbrt(l))), 2.0)));
}
return tmp;
}
public static double code(double t, double l, double k) {
double t_1 = Math.cbrt((Math.sin(k) * (Math.tan(k) / l)));
double t_2 = Math.sqrt(2.0) / k;
double t_3 = (t_2 / Math.pow(Math.cbrt(l), -2.0)) / Math.cbrt((Math.sin(k) * Math.tan(k)));
double tmp;
if ((l * l) <= 5e-296) {
tmp = (t_2 * (t / Math.pow(((t * t_1) / Math.cbrt(l)), 2.0))) * t_3;
} else if ((l * l) <= 2e-44) {
tmp = (2.0 * (Math.pow(l, 2.0) * Math.cos(k))) / ((t * (k * k)) * Math.pow(Math.sin(k), 2.0));
} else if ((l * l) <= 2e+201) {
tmp = t_3 * ((Math.sqrt(2.0) / (k * t)) * Math.cbrt(((Math.pow(l, 4.0) * Math.pow(Math.cos(k), 2.0)) / Math.pow(Math.sin(k), 4.0))));
} else {
tmp = t_3 * (t_2 * (t / Math.pow((t_1 * (t / Math.cbrt(l))), 2.0)));
}
return tmp;
}
function code(t, l, k) t_1 = cbrt(Float64(sin(k) * Float64(tan(k) / l))) t_2 = Float64(sqrt(2.0) / k) t_3 = Float64(Float64(t_2 / (cbrt(l) ^ -2.0)) / cbrt(Float64(sin(k) * tan(k)))) tmp = 0.0 if (Float64(l * l) <= 5e-296) tmp = Float64(Float64(t_2 * Float64(t / (Float64(Float64(t * t_1) / cbrt(l)) ^ 2.0))) * t_3); elseif (Float64(l * l) <= 2e-44) tmp = Float64(Float64(2.0 * Float64((l ^ 2.0) * cos(k))) / Float64(Float64(t * Float64(k * k)) * (sin(k) ^ 2.0))); elseif (Float64(l * l) <= 2e+201) tmp = Float64(t_3 * Float64(Float64(sqrt(2.0) / Float64(k * t)) * cbrt(Float64(Float64((l ^ 4.0) * (cos(k) ^ 2.0)) / (sin(k) ^ 4.0))))); else tmp = Float64(t_3 * Float64(t_2 * Float64(t / (Float64(t_1 * Float64(t / cbrt(l))) ^ 2.0)))); end return tmp end
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[(N[Sin[k], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$2 = N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$2 / N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] / N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(l * l), $MachinePrecision], 5e-296], N[(N[(t$95$2 * N[(t / N[Power[N[(N[(t * t$95$1), $MachinePrecision] / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 2e-44], N[(N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(t * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 2e+201], N[(t$95$3 * N[(N[(N[Sqrt[2.0], $MachinePrecision] / N[(k * t), $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[Power[l, 4.0], $MachinePrecision] * N[Power[N[Cos[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 4.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$3 * N[(t$95$2 * N[(t / N[Power[N[(t$95$1 * N[(t / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt[3]{\sin k \cdot \frac{\tan k}{\ell}}\\
t_2 := \frac{\sqrt{2}}{k}\\
t_3 := \frac{\frac{t\_2}{{\left(\sqrt[3]{\ell}\right)}^{-2}}}{\sqrt[3]{\sin k \cdot \tan k}}\\
\mathbf{if}\;\ell \cdot \ell \leq 5 \cdot 10^{-296}:\\
\;\;\;\;\left(t\_2 \cdot \frac{t}{{\left(\frac{t \cdot t\_1}{\sqrt[3]{\ell}}\right)}^{2}}\right) \cdot t\_3\\
\mathbf{elif}\;\ell \cdot \ell \leq 2 \cdot 10^{-44}:\\
\;\;\;\;\frac{2 \cdot \left({\ell}^{2} \cdot \cos k\right)}{\left(t \cdot \left(k \cdot k\right)\right) \cdot {\sin k}^{2}}\\
\mathbf{elif}\;\ell \cdot \ell \leq 2 \cdot 10^{+201}:\\
\;\;\;\;t\_3 \cdot \left(\frac{\sqrt{2}}{k \cdot t} \cdot \sqrt[3]{\frac{{\ell}^{4} \cdot {\cos k}^{2}}{{\sin k}^{4}}}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_3 \cdot \left(t\_2 \cdot \frac{t}{{\left(t\_1 \cdot \frac{t}{\sqrt[3]{\ell}}\right)}^{2}}\right)\\
\end{array}
\end{array}
if (*.f64 l l) < 5.0000000000000003e-296Initial program 33.4%
*-commutative33.4%
associate-/r*33.4%
Simplified42.1%
add-sqr-sqrt42.1%
add-cube-cbrt42.1%
times-frac42.1%
Applied egg-rr85.6%
associate-/r/85.6%
associate-/r*85.6%
associate-/r/85.6%
Simplified85.6%
associate-/l*85.6%
div-inv85.6%
pow-flip85.6%
metadata-eval85.6%
Applied egg-rr85.6%
*-commutative85.6%
associate-/r*85.6%
*-inverses85.6%
associate-*l/85.6%
*-lft-identity85.6%
Simplified85.6%
associate-/l*90.0%
div-inv90.0%
pow-flip90.0%
metadata-eval90.0%
Applied egg-rr90.0%
metadata-eval90.0%
pow-flip90.0%
div-inv90.0%
associate-*l/91.6%
add-cbrt-cube68.4%
unpow368.4%
cbrt-prod67.0%
unpow267.0%
cbrt-prod53.8%
cbrt-div53.8%
associate-/l/67.0%
cbrt-div67.0%
Applied egg-rr91.5%
associate-/l*91.4%
Simplified91.4%
if 5.0000000000000003e-296 < (*.f64 l l) < 1.99999999999999991e-44Initial program 45.7%
Simplified57.2%
Taylor expanded in t around 0 97.1%
associate-*r/97.1%
associate-*r*97.1%
Simplified97.1%
unpow297.1%
Applied egg-rr97.1%
if 1.99999999999999991e-44 < (*.f64 l l) < 2.00000000000000008e201Initial program 35.9%
*-commutative35.9%
associate-/r*36.0%
Simplified47.0%
add-sqr-sqrt47.0%
add-cube-cbrt46.9%
times-frac46.9%
Applied egg-rr66.6%
associate-/r/66.6%
associate-/r*66.5%
associate-/r/66.6%
Simplified66.6%
associate-/l*66.6%
div-inv66.6%
pow-flip66.6%
metadata-eval66.6%
Applied egg-rr66.6%
*-commutative66.6%
associate-/r*66.6%
*-inverses66.6%
associate-*l/66.6%
*-lft-identity66.6%
Simplified66.6%
Taylor expanded in k around inf 91.0%
if 2.00000000000000008e201 < (*.f64 l l) Initial program 31.0%
*-commutative31.0%
associate-/r*31.0%
Simplified32.1%
add-sqr-sqrt32.1%
add-cube-cbrt32.1%
times-frac32.1%
Applied egg-rr74.0%
associate-/r/74.0%
associate-/r*74.0%
associate-/r/76.3%
Simplified76.3%
associate-/l*76.3%
div-inv76.3%
pow-flip76.3%
metadata-eval76.3%
Applied egg-rr76.3%
*-commutative76.3%
associate-/r*76.3%
*-inverses76.3%
associate-*l/76.3%
*-lft-identity76.3%
Simplified76.3%
associate-/l*84.1%
div-inv84.1%
pow-flip84.1%
metadata-eval84.1%
Applied egg-rr84.1%
metadata-eval84.1%
pow-flip84.1%
div-inv84.1%
associate-*l/84.1%
add-cbrt-cube60.1%
unpow360.1%
cbrt-prod60.1%
unpow260.1%
cbrt-prod54.3%
cbrt-div54.2%
associate-/l/58.0%
cbrt-div60.1%
Applied egg-rr84.1%
*-commutative84.1%
associate-/l*84.2%
associate-/l*84.2%
Simplified84.2%
Final simplification90.1%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (cbrt (* (sin k) (/ (tan k) l))))
(t_2 (/ (sqrt 2.0) k))
(t_3 (/ (/ t_2 (pow (cbrt l) -2.0)) (cbrt (* (sin k) (tan k))))))
(if (<= (* l l) 5e-296)
(* (* t_2 (/ t (pow (/ (* t t_1) (cbrt l)) 2.0))) t_3)
(if (<= (* l l) 2e+264)
(/ (* 2.0 (* (pow l 2.0) (cos k))) (* (* t (* k k)) (pow (sin k) 2.0)))
(* t_3 (* t_2 (/ t (pow (* t_1 (/ t (cbrt l))) 2.0))))))))
double code(double t, double l, double k) {
double t_1 = cbrt((sin(k) * (tan(k) / l)));
double t_2 = sqrt(2.0) / k;
double t_3 = (t_2 / pow(cbrt(l), -2.0)) / cbrt((sin(k) * tan(k)));
double tmp;
if ((l * l) <= 5e-296) {
tmp = (t_2 * (t / pow(((t * t_1) / cbrt(l)), 2.0))) * t_3;
} else if ((l * l) <= 2e+264) {
tmp = (2.0 * (pow(l, 2.0) * cos(k))) / ((t * (k * k)) * pow(sin(k), 2.0));
} else {
tmp = t_3 * (t_2 * (t / pow((t_1 * (t / cbrt(l))), 2.0)));
}
return tmp;
}
public static double code(double t, double l, double k) {
double t_1 = Math.cbrt((Math.sin(k) * (Math.tan(k) / l)));
double t_2 = Math.sqrt(2.0) / k;
double t_3 = (t_2 / Math.pow(Math.cbrt(l), -2.0)) / Math.cbrt((Math.sin(k) * Math.tan(k)));
double tmp;
if ((l * l) <= 5e-296) {
tmp = (t_2 * (t / Math.pow(((t * t_1) / Math.cbrt(l)), 2.0))) * t_3;
} else if ((l * l) <= 2e+264) {
tmp = (2.0 * (Math.pow(l, 2.0) * Math.cos(k))) / ((t * (k * k)) * Math.pow(Math.sin(k), 2.0));
} else {
tmp = t_3 * (t_2 * (t / Math.pow((t_1 * (t / Math.cbrt(l))), 2.0)));
}
return tmp;
}
function code(t, l, k) t_1 = cbrt(Float64(sin(k) * Float64(tan(k) / l))) t_2 = Float64(sqrt(2.0) / k) t_3 = Float64(Float64(t_2 / (cbrt(l) ^ -2.0)) / cbrt(Float64(sin(k) * tan(k)))) tmp = 0.0 if (Float64(l * l) <= 5e-296) tmp = Float64(Float64(t_2 * Float64(t / (Float64(Float64(t * t_1) / cbrt(l)) ^ 2.0))) * t_3); elseif (Float64(l * l) <= 2e+264) tmp = Float64(Float64(2.0 * Float64((l ^ 2.0) * cos(k))) / Float64(Float64(t * Float64(k * k)) * (sin(k) ^ 2.0))); else tmp = Float64(t_3 * Float64(t_2 * Float64(t / (Float64(t_1 * Float64(t / cbrt(l))) ^ 2.0)))); end return tmp end
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[(N[Sin[k], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$2 = N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$2 / N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] / N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(l * l), $MachinePrecision], 5e-296], N[(N[(t$95$2 * N[(t / N[Power[N[(N[(t * t$95$1), $MachinePrecision] / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 2e+264], N[(N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(t * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$3 * N[(t$95$2 * N[(t / N[Power[N[(t$95$1 * N[(t / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt[3]{\sin k \cdot \frac{\tan k}{\ell}}\\
t_2 := \frac{\sqrt{2}}{k}\\
t_3 := \frac{\frac{t\_2}{{\left(\sqrt[3]{\ell}\right)}^{-2}}}{\sqrt[3]{\sin k \cdot \tan k}}\\
\mathbf{if}\;\ell \cdot \ell \leq 5 \cdot 10^{-296}:\\
\;\;\;\;\left(t\_2 \cdot \frac{t}{{\left(\frac{t \cdot t\_1}{\sqrt[3]{\ell}}\right)}^{2}}\right) \cdot t\_3\\
\mathbf{elif}\;\ell \cdot \ell \leq 2 \cdot 10^{+264}:\\
\;\;\;\;\frac{2 \cdot \left({\ell}^{2} \cdot \cos k\right)}{\left(t \cdot \left(k \cdot k\right)\right) \cdot {\sin k}^{2}}\\
\mathbf{else}:\\
\;\;\;\;t\_3 \cdot \left(t\_2 \cdot \frac{t}{{\left(t\_1 \cdot \frac{t}{\sqrt[3]{\ell}}\right)}^{2}}\right)\\
\end{array}
\end{array}
if (*.f64 l l) < 5.0000000000000003e-296Initial program 33.4%
*-commutative33.4%
associate-/r*33.4%
Simplified42.1%
add-sqr-sqrt42.1%
add-cube-cbrt42.1%
times-frac42.1%
Applied egg-rr85.6%
associate-/r/85.6%
associate-/r*85.6%
associate-/r/85.6%
Simplified85.6%
associate-/l*85.6%
div-inv85.6%
pow-flip85.6%
metadata-eval85.6%
Applied egg-rr85.6%
*-commutative85.6%
associate-/r*85.6%
*-inverses85.6%
associate-*l/85.6%
*-lft-identity85.6%
Simplified85.6%
associate-/l*90.0%
div-inv90.0%
pow-flip90.0%
metadata-eval90.0%
Applied egg-rr90.0%
metadata-eval90.0%
pow-flip90.0%
div-inv90.0%
associate-*l/91.6%
add-cbrt-cube68.4%
unpow368.4%
cbrt-prod67.0%
unpow267.0%
cbrt-prod53.8%
cbrt-div53.8%
associate-/l/67.0%
cbrt-div67.0%
Applied egg-rr91.5%
associate-/l*91.4%
Simplified91.4%
if 5.0000000000000003e-296 < (*.f64 l l) < 2.00000000000000009e264Initial program 40.1%
Simplified50.7%
Taylor expanded in t around 0 87.7%
associate-*r/87.7%
associate-*r*87.8%
Simplified87.8%
unpow287.8%
Applied egg-rr87.8%
if 2.00000000000000009e264 < (*.f64 l l) Initial program 31.5%
*-commutative31.5%
associate-/r*31.5%
Simplified31.5%
add-sqr-sqrt31.5%
add-cube-cbrt31.5%
times-frac31.5%
Applied egg-rr75.2%
associate-/r/75.2%
associate-/r*75.2%
associate-/r/77.7%
Simplified77.7%
associate-/l*77.8%
div-inv77.8%
pow-flip77.8%
metadata-eval77.8%
Applied egg-rr77.8%
*-commutative77.8%
associate-/r*77.8%
*-inverses77.8%
associate-*l/77.8%
*-lft-identity77.8%
Simplified77.8%
associate-/l*86.3%
div-inv86.2%
pow-flip86.3%
metadata-eval86.3%
Applied egg-rr86.3%
metadata-eval86.3%
pow-flip86.2%
div-inv86.3%
associate-*l/86.2%
add-cbrt-cube62.2%
unpow362.2%
cbrt-prod62.2%
unpow262.2%
cbrt-prod55.8%
cbrt-div55.8%
associate-/l/59.9%
cbrt-div62.2%
Applied egg-rr86.3%
*-commutative86.3%
associate-/l*86.4%
associate-/l*86.3%
Simplified86.3%
Final simplification88.3%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (/ (sqrt 2.0) k)))
(if (<= (* l l) 5e-296)
(exp (+ (* 2.0 (log l)) (log (/ 2.0 (* t (pow k 4.0))))))
(if (<= (* l l) 2e+264)
(/ (* 2.0 (* (pow l 2.0) (cos k))) (* (* t (* k k)) (pow (sin k) 2.0)))
(*
(/ (/ t_1 (pow (cbrt l) -2.0)) (cbrt (* (sin k) (tan k))))
(*
t_1
(/
t
(pow (* (cbrt (* (sin k) (/ (tan k) l))) (/ t (cbrt l))) 2.0))))))))
double code(double t, double l, double k) {
double t_1 = sqrt(2.0) / k;
double tmp;
if ((l * l) <= 5e-296) {
tmp = exp(((2.0 * log(l)) + log((2.0 / (t * pow(k, 4.0))))));
} else if ((l * l) <= 2e+264) {
tmp = (2.0 * (pow(l, 2.0) * cos(k))) / ((t * (k * k)) * pow(sin(k), 2.0));
} else {
tmp = ((t_1 / pow(cbrt(l), -2.0)) / cbrt((sin(k) * tan(k)))) * (t_1 * (t / pow((cbrt((sin(k) * (tan(k) / l))) * (t / cbrt(l))), 2.0)));
}
return tmp;
}
public static double code(double t, double l, double k) {
double t_1 = Math.sqrt(2.0) / k;
double tmp;
if ((l * l) <= 5e-296) {
tmp = Math.exp(((2.0 * Math.log(l)) + Math.log((2.0 / (t * Math.pow(k, 4.0))))));
} else if ((l * l) <= 2e+264) {
tmp = (2.0 * (Math.pow(l, 2.0) * Math.cos(k))) / ((t * (k * k)) * Math.pow(Math.sin(k), 2.0));
} else {
tmp = ((t_1 / Math.pow(Math.cbrt(l), -2.0)) / Math.cbrt((Math.sin(k) * Math.tan(k)))) * (t_1 * (t / Math.pow((Math.cbrt((Math.sin(k) * (Math.tan(k) / l))) * (t / Math.cbrt(l))), 2.0)));
}
return tmp;
}
function code(t, l, k) t_1 = Float64(sqrt(2.0) / k) tmp = 0.0 if (Float64(l * l) <= 5e-296) tmp = exp(Float64(Float64(2.0 * log(l)) + log(Float64(2.0 / Float64(t * (k ^ 4.0)))))); elseif (Float64(l * l) <= 2e+264) tmp = Float64(Float64(2.0 * Float64((l ^ 2.0) * cos(k))) / Float64(Float64(t * Float64(k * k)) * (sin(k) ^ 2.0))); else tmp = Float64(Float64(Float64(t_1 / (cbrt(l) ^ -2.0)) / cbrt(Float64(sin(k) * tan(k)))) * Float64(t_1 * Float64(t / (Float64(cbrt(Float64(sin(k) * Float64(tan(k) / l))) * Float64(t / cbrt(l))) ^ 2.0)))); end return tmp end
code[t_, l_, k_] := Block[{t$95$1 = N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision]}, If[LessEqual[N[(l * l), $MachinePrecision], 5e-296], N[Exp[N[(N[(2.0 * N[Log[l], $MachinePrecision]), $MachinePrecision] + N[Log[N[(2.0 / N[(t * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 2e+264], N[(N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(t * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t$95$1 / N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] / N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] * N[(t$95$1 * N[(t / N[Power[N[(N[Power[N[(N[Sin[k], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * N[(t / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\sqrt{2}}{k}\\
\mathbf{if}\;\ell \cdot \ell \leq 5 \cdot 10^{-296}:\\
\;\;\;\;e^{2 \cdot \log \ell + \log \left(\frac{2}{t \cdot {k}^{4}}\right)}\\
\mathbf{elif}\;\ell \cdot \ell \leq 2 \cdot 10^{+264}:\\
\;\;\;\;\frac{2 \cdot \left({\ell}^{2} \cdot \cos k\right)}{\left(t \cdot \left(k \cdot k\right)\right) \cdot {\sin k}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t\_1}{{\left(\sqrt[3]{\ell}\right)}^{-2}}}{\sqrt[3]{\sin k \cdot \tan k}} \cdot \left(t\_1 \cdot \frac{t}{{\left(\sqrt[3]{\sin k \cdot \frac{\tan k}{\ell}} \cdot \frac{t}{\sqrt[3]{\ell}}\right)}^{2}}\right)\\
\end{array}
\end{array}
if (*.f64 l l) < 5.0000000000000003e-296Initial program 33.4%
Simplified43.5%
Taylor expanded in k around 0 74.1%
add-log-exp74.1%
*-commutative74.1%
exp-prod70.2%
pow270.2%
associate-/r*70.2%
Applied egg-rr70.2%
pow270.2%
pow-exp74.1%
rem-log-exp74.1%
pow274.1%
pow-to-exp37.8%
add-exp-log37.8%
prod-exp44.8%
rem-log-exp37.8%
pow-to-exp69.7%
log-pow44.8%
associate-/l/44.8%
Applied egg-rr44.8%
if 5.0000000000000003e-296 < (*.f64 l l) < 2.00000000000000009e264Initial program 40.1%
Simplified50.7%
Taylor expanded in t around 0 87.7%
associate-*r/87.7%
associate-*r*87.8%
Simplified87.8%
unpow287.8%
Applied egg-rr87.8%
if 2.00000000000000009e264 < (*.f64 l l) Initial program 31.5%
*-commutative31.5%
associate-/r*31.5%
Simplified31.5%
add-sqr-sqrt31.5%
add-cube-cbrt31.5%
times-frac31.5%
Applied egg-rr75.2%
associate-/r/75.2%
associate-/r*75.2%
associate-/r/77.7%
Simplified77.7%
associate-/l*77.8%
div-inv77.8%
pow-flip77.8%
metadata-eval77.8%
Applied egg-rr77.8%
*-commutative77.8%
associate-/r*77.8%
*-inverses77.8%
associate-*l/77.8%
*-lft-identity77.8%
Simplified77.8%
associate-/l*86.3%
div-inv86.2%
pow-flip86.3%
metadata-eval86.3%
Applied egg-rr86.3%
metadata-eval86.3%
pow-flip86.2%
div-inv86.3%
associate-*l/86.2%
add-cbrt-cube62.2%
unpow362.2%
cbrt-prod62.2%
unpow262.2%
cbrt-prod55.8%
cbrt-div55.8%
associate-/l/59.9%
cbrt-div62.2%
Applied egg-rr86.3%
*-commutative86.3%
associate-/l*86.4%
associate-/l*86.3%
Simplified86.3%
Final simplification75.7%
(FPCore (t l k)
:precision binary64
(if (<= k 3700000.0)
(exp (+ (* 2.0 (log l)) (log (/ 2.0 (* t (pow k 4.0))))))
(if (<= k 3.7e+62)
(/
(/ 2.0 (/ (* k k) (* t t)))
(* (* (sin k) (tan k)) (* (/ (pow t 2.0) l) (/ t l))))
(/ (* 2.0 (pow l 2.0)) (* (pow (sin k) 2.0) (* t (pow k 2.0)))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 3700000.0) {
tmp = exp(((2.0 * log(l)) + log((2.0 / (t * pow(k, 4.0))))));
} else if (k <= 3.7e+62) {
tmp = (2.0 / ((k * k) / (t * t))) / ((sin(k) * tan(k)) * ((pow(t, 2.0) / l) * (t / l)));
} else {
tmp = (2.0 * pow(l, 2.0)) / (pow(sin(k), 2.0) * (t * pow(k, 2.0)));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 3700000.0d0) then
tmp = exp(((2.0d0 * log(l)) + log((2.0d0 / (t * (k ** 4.0d0))))))
else if (k <= 3.7d+62) then
tmp = (2.0d0 / ((k * k) / (t * t))) / ((sin(k) * tan(k)) * (((t ** 2.0d0) / l) * (t / l)))
else
tmp = (2.0d0 * (l ** 2.0d0)) / ((sin(k) ** 2.0d0) * (t * (k ** 2.0d0)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 3700000.0) {
tmp = Math.exp(((2.0 * Math.log(l)) + Math.log((2.0 / (t * Math.pow(k, 4.0))))));
} else if (k <= 3.7e+62) {
tmp = (2.0 / ((k * k) / (t * t))) / ((Math.sin(k) * Math.tan(k)) * ((Math.pow(t, 2.0) / l) * (t / l)));
} else {
tmp = (2.0 * Math.pow(l, 2.0)) / (Math.pow(Math.sin(k), 2.0) * (t * Math.pow(k, 2.0)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 3700000.0: tmp = math.exp(((2.0 * math.log(l)) + math.log((2.0 / (t * math.pow(k, 4.0)))))) elif k <= 3.7e+62: tmp = (2.0 / ((k * k) / (t * t))) / ((math.sin(k) * math.tan(k)) * ((math.pow(t, 2.0) / l) * (t / l))) else: tmp = (2.0 * math.pow(l, 2.0)) / (math.pow(math.sin(k), 2.0) * (t * math.pow(k, 2.0))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 3700000.0) tmp = exp(Float64(Float64(2.0 * log(l)) + log(Float64(2.0 / Float64(t * (k ^ 4.0)))))); elseif (k <= 3.7e+62) tmp = Float64(Float64(2.0 / Float64(Float64(k * k) / Float64(t * t))) / Float64(Float64(sin(k) * tan(k)) * Float64(Float64((t ^ 2.0) / l) * Float64(t / l)))); else tmp = Float64(Float64(2.0 * (l ^ 2.0)) / Float64((sin(k) ^ 2.0) * Float64(t * (k ^ 2.0)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 3700000.0) tmp = exp(((2.0 * log(l)) + log((2.0 / (t * (k ^ 4.0)))))); elseif (k <= 3.7e+62) tmp = (2.0 / ((k * k) / (t * t))) / ((sin(k) * tan(k)) * (((t ^ 2.0) / l) * (t / l))); else tmp = (2.0 * (l ^ 2.0)) / ((sin(k) ^ 2.0) * (t * (k ^ 2.0))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 3700000.0], N[Exp[N[(N[(2.0 * N[Log[l], $MachinePrecision]), $MachinePrecision] + N[Log[N[(2.0 / N[(t * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[k, 3.7e+62], N[(N[(2.0 / N[(N[(k * k), $MachinePrecision] / N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 3700000:\\
\;\;\;\;e^{2 \cdot \log \ell + \log \left(\frac{2}{t \cdot {k}^{4}}\right)}\\
\mathbf{elif}\;k \leq 3.7 \cdot 10^{+62}:\\
\;\;\;\;\frac{\frac{2}{\frac{k \cdot k}{t \cdot t}}}{\left(\sin k \cdot \tan k\right) \cdot \left(\frac{{t}^{2}}{\ell} \cdot \frac{t}{\ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot {\ell}^{2}}{{\sin k}^{2} \cdot \left(t \cdot {k}^{2}\right)}\\
\end{array}
\end{array}
if k < 3.7e6Initial program 38.5%
Simplified44.8%
Taylor expanded in k around 0 71.1%
add-log-exp68.1%
*-commutative68.1%
exp-prod56.3%
pow256.3%
associate-/r*56.3%
Applied egg-rr56.3%
pow256.3%
pow-exp68.1%
rem-log-exp71.1%
pow271.1%
pow-to-exp36.8%
add-exp-log28.5%
prod-exp31.1%
rem-log-exp28.6%
pow-to-exp50.8%
log-pow31.1%
associate-/l/31.1%
Applied egg-rr31.1%
if 3.7e6 < k < 3.70000000000000014e62Initial program 20.2%
*-commutative20.2%
associate-/r*20.0%
Simplified40.1%
+-rgt-identity40.1%
unpow240.1%
frac-2neg40.1%
frac-times40.1%
Applied egg-rr40.1%
unpow340.1%
times-frac59.7%
pow259.7%
Applied egg-rr59.7%
if 3.70000000000000014e62 < k Initial program 27.6%
Simplified35.4%
Taylor expanded in t around 0 59.5%
associate-*r/59.5%
associate-*r*59.5%
Simplified59.5%
Taylor expanded in k around 0 48.7%
Final simplification35.8%
(FPCore (t l k) :precision binary64 (if (<= (* l l) 5e-296) (exp (+ (* 2.0 (log l)) (log (/ 2.0 (* t (pow k 4.0)))))) (/ (* 2.0 (* (pow l 2.0) (cos k))) (* (* t (* k k)) (pow (sin k) 2.0)))))
double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 5e-296) {
tmp = exp(((2.0 * log(l)) + log((2.0 / (t * pow(k, 4.0))))));
} else {
tmp = (2.0 * (pow(l, 2.0) * cos(k))) / ((t * (k * k)) * pow(sin(k), 2.0));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if ((l * l) <= 5d-296) then
tmp = exp(((2.0d0 * log(l)) + log((2.0d0 / (t * (k ** 4.0d0))))))
else
tmp = (2.0d0 * ((l ** 2.0d0) * cos(k))) / ((t * (k * k)) * (sin(k) ** 2.0d0))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 5e-296) {
tmp = Math.exp(((2.0 * Math.log(l)) + Math.log((2.0 / (t * Math.pow(k, 4.0))))));
} else {
tmp = (2.0 * (Math.pow(l, 2.0) * Math.cos(k))) / ((t * (k * k)) * Math.pow(Math.sin(k), 2.0));
}
return tmp;
}
def code(t, l, k): tmp = 0 if (l * l) <= 5e-296: tmp = math.exp(((2.0 * math.log(l)) + math.log((2.0 / (t * math.pow(k, 4.0)))))) else: tmp = (2.0 * (math.pow(l, 2.0) * math.cos(k))) / ((t * (k * k)) * math.pow(math.sin(k), 2.0)) return tmp
function code(t, l, k) tmp = 0.0 if (Float64(l * l) <= 5e-296) tmp = exp(Float64(Float64(2.0 * log(l)) + log(Float64(2.0 / Float64(t * (k ^ 4.0)))))); else tmp = Float64(Float64(2.0 * Float64((l ^ 2.0) * cos(k))) / Float64(Float64(t * Float64(k * k)) * (sin(k) ^ 2.0))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((l * l) <= 5e-296) tmp = exp(((2.0 * log(l)) + log((2.0 / (t * (k ^ 4.0)))))); else tmp = (2.0 * ((l ^ 2.0) * cos(k))) / ((t * (k * k)) * (sin(k) ^ 2.0)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[N[(l * l), $MachinePrecision], 5e-296], N[Exp[N[(N[(2.0 * N[Log[l], $MachinePrecision]), $MachinePrecision] + N[Log[N[(2.0 / N[(t * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(t * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 5 \cdot 10^{-296}:\\
\;\;\;\;e^{2 \cdot \log \ell + \log \left(\frac{2}{t \cdot {k}^{4}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot \left({\ell}^{2} \cdot \cos k\right)}{\left(t \cdot \left(k \cdot k\right)\right) \cdot {\sin k}^{2}}\\
\end{array}
\end{array}
if (*.f64 l l) < 5.0000000000000003e-296Initial program 33.4%
Simplified43.5%
Taylor expanded in k around 0 74.1%
add-log-exp74.1%
*-commutative74.1%
exp-prod70.2%
pow270.2%
associate-/r*70.2%
Applied egg-rr70.2%
pow270.2%
pow-exp74.1%
rem-log-exp74.1%
pow274.1%
pow-to-exp37.8%
add-exp-log37.8%
prod-exp44.8%
rem-log-exp37.8%
pow-to-exp69.7%
log-pow44.8%
associate-/l/44.8%
Applied egg-rr44.8%
if 5.0000000000000003e-296 < (*.f64 l l) Initial program 36.4%
Simplified42.4%
Taylor expanded in t around 0 76.2%
associate-*r/76.2%
associate-*r*76.2%
Simplified76.2%
unpow276.2%
Applied egg-rr76.2%
Final simplification67.7%
(FPCore (t l k) :precision binary64 (if (<= (* l l) 5e-296) (exp (+ (* 2.0 (log l)) (log (/ 2.0 (* t (pow k 4.0)))))) (* (* l l) (* 2.0 (/ (/ (cos k) (pow k 2.0)) (* t (pow (sin k) 2.0)))))))
double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 5e-296) {
tmp = exp(((2.0 * log(l)) + log((2.0 / (t * pow(k, 4.0))))));
} else {
tmp = (l * l) * (2.0 * ((cos(k) / pow(k, 2.0)) / (t * pow(sin(k), 2.0))));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if ((l * l) <= 5d-296) then
tmp = exp(((2.0d0 * log(l)) + log((2.0d0 / (t * (k ** 4.0d0))))))
else
tmp = (l * l) * (2.0d0 * ((cos(k) / (k ** 2.0d0)) / (t * (sin(k) ** 2.0d0))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 5e-296) {
tmp = Math.exp(((2.0 * Math.log(l)) + Math.log((2.0 / (t * Math.pow(k, 4.0))))));
} else {
tmp = (l * l) * (2.0 * ((Math.cos(k) / Math.pow(k, 2.0)) / (t * Math.pow(Math.sin(k), 2.0))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if (l * l) <= 5e-296: tmp = math.exp(((2.0 * math.log(l)) + math.log((2.0 / (t * math.pow(k, 4.0)))))) else: tmp = (l * l) * (2.0 * ((math.cos(k) / math.pow(k, 2.0)) / (t * math.pow(math.sin(k), 2.0)))) return tmp
function code(t, l, k) tmp = 0.0 if (Float64(l * l) <= 5e-296) tmp = exp(Float64(Float64(2.0 * log(l)) + log(Float64(2.0 / Float64(t * (k ^ 4.0)))))); else tmp = Float64(Float64(l * l) * Float64(2.0 * Float64(Float64(cos(k) / (k ^ 2.0)) / Float64(t * (sin(k) ^ 2.0))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((l * l) <= 5e-296) tmp = exp(((2.0 * log(l)) + log((2.0 / (t * (k ^ 4.0)))))); else tmp = (l * l) * (2.0 * ((cos(k) / (k ^ 2.0)) / (t * (sin(k) ^ 2.0)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[N[(l * l), $MachinePrecision], 5e-296], N[Exp[N[(N[(2.0 * N[Log[l], $MachinePrecision]), $MachinePrecision] + N[Log[N[(2.0 / N[(t * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l * l), $MachinePrecision] * N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 5 \cdot 10^{-296}:\\
\;\;\;\;e^{2 \cdot \log \ell + \log \left(\frac{2}{t \cdot {k}^{4}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \frac{\frac{\cos k}{{k}^{2}}}{t \cdot {\sin k}^{2}}\right)\\
\end{array}
\end{array}
if (*.f64 l l) < 5.0000000000000003e-296Initial program 33.4%
Simplified43.5%
Taylor expanded in k around 0 74.1%
add-log-exp74.1%
*-commutative74.1%
exp-prod70.2%
pow270.2%
associate-/r*70.2%
Applied egg-rr70.2%
pow270.2%
pow-exp74.1%
rem-log-exp74.1%
pow274.1%
pow-to-exp37.8%
add-exp-log37.8%
prod-exp44.8%
rem-log-exp37.8%
pow-to-exp69.7%
log-pow44.8%
associate-/l/44.8%
Applied egg-rr44.8%
if 5.0000000000000003e-296 < (*.f64 l l) Initial program 36.4%
Simplified42.4%
Taylor expanded in t around 0 75.9%
associate-/r*76.0%
Simplified76.0%
Final simplification67.6%
(FPCore (t l k) :precision binary64 (exp (+ (* 2.0 (log l)) (log (/ 2.0 (* t (pow k 4.0)))))))
double code(double t, double l, double k) {
return exp(((2.0 * log(l)) + log((2.0 / (t * pow(k, 4.0))))));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = exp(((2.0d0 * log(l)) + log((2.0d0 / (t * (k ** 4.0d0))))))
end function
public static double code(double t, double l, double k) {
return Math.exp(((2.0 * Math.log(l)) + Math.log((2.0 / (t * Math.pow(k, 4.0))))));
}
def code(t, l, k): return math.exp(((2.0 * math.log(l)) + math.log((2.0 / (t * math.pow(k, 4.0))))))
function code(t, l, k) return exp(Float64(Float64(2.0 * log(l)) + log(Float64(2.0 / Float64(t * (k ^ 4.0)))))) end
function tmp = code(t, l, k) tmp = exp(((2.0 * log(l)) + log((2.0 / (t * (k ^ 4.0)))))); end
code[t_, l_, k_] := N[Exp[N[(N[(2.0 * N[Log[l], $MachinePrecision]), $MachinePrecision] + N[Log[N[(2.0 / N[(t * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
e^{2 \cdot \log \ell + \log \left(\frac{2}{t \cdot {k}^{4}}\right)}
\end{array}
Initial program 35.6%
Simplified42.7%
Taylor expanded in k around 0 64.6%
add-log-exp62.3%
*-commutative62.3%
exp-prod53.9%
pow253.9%
associate-/r*53.9%
Applied egg-rr53.9%
pow253.9%
pow-exp62.3%
rem-log-exp64.6%
pow264.6%
pow-to-exp32.9%
add-exp-log26.6%
prod-exp28.7%
rem-log-exp26.6%
pow-to-exp48.7%
log-pow28.7%
associate-/l/28.7%
Applied egg-rr28.7%
(FPCore (t l k)
:precision binary64
(if (<= t 7.2e-129)
(* 2.0 (/ (/ (pow l 2.0) t) (pow k 4.0)))
(if (<= t 3.6e+79)
(/
(/ 2.0 (/ k (* t (/ t k))))
(/ (/ (* (* (sin k) (tan k)) (pow t 3.0)) l) l))
(*
(* l l)
(/
2.0
(*
(pow k 4.0)
(+
t
(*
(pow k 2.0)
(+
(* (* t (pow k 2.0)) 0.08611111111111111)
(* t 0.16666666666666666))))))))))
double code(double t, double l, double k) {
double tmp;
if (t <= 7.2e-129) {
tmp = 2.0 * ((pow(l, 2.0) / t) / pow(k, 4.0));
} else if (t <= 3.6e+79) {
tmp = (2.0 / (k / (t * (t / k)))) / ((((sin(k) * tan(k)) * pow(t, 3.0)) / l) / l);
} else {
tmp = (l * l) * (2.0 / (pow(k, 4.0) * (t + (pow(k, 2.0) * (((t * pow(k, 2.0)) * 0.08611111111111111) + (t * 0.16666666666666666))))));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t <= 7.2d-129) then
tmp = 2.0d0 * (((l ** 2.0d0) / t) / (k ** 4.0d0))
else if (t <= 3.6d+79) then
tmp = (2.0d0 / (k / (t * (t / k)))) / ((((sin(k) * tan(k)) * (t ** 3.0d0)) / l) / l)
else
tmp = (l * l) * (2.0d0 / ((k ** 4.0d0) * (t + ((k ** 2.0d0) * (((t * (k ** 2.0d0)) * 0.08611111111111111d0) + (t * 0.16666666666666666d0))))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (t <= 7.2e-129) {
tmp = 2.0 * ((Math.pow(l, 2.0) / t) / Math.pow(k, 4.0));
} else if (t <= 3.6e+79) {
tmp = (2.0 / (k / (t * (t / k)))) / ((((Math.sin(k) * Math.tan(k)) * Math.pow(t, 3.0)) / l) / l);
} else {
tmp = (l * l) * (2.0 / (Math.pow(k, 4.0) * (t + (Math.pow(k, 2.0) * (((t * Math.pow(k, 2.0)) * 0.08611111111111111) + (t * 0.16666666666666666))))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if t <= 7.2e-129: tmp = 2.0 * ((math.pow(l, 2.0) / t) / math.pow(k, 4.0)) elif t <= 3.6e+79: tmp = (2.0 / (k / (t * (t / k)))) / ((((math.sin(k) * math.tan(k)) * math.pow(t, 3.0)) / l) / l) else: tmp = (l * l) * (2.0 / (math.pow(k, 4.0) * (t + (math.pow(k, 2.0) * (((t * math.pow(k, 2.0)) * 0.08611111111111111) + (t * 0.16666666666666666)))))) return tmp
function code(t, l, k) tmp = 0.0 if (t <= 7.2e-129) tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / t) / (k ^ 4.0))); elseif (t <= 3.6e+79) tmp = Float64(Float64(2.0 / Float64(k / Float64(t * Float64(t / k)))) / Float64(Float64(Float64(Float64(sin(k) * tan(k)) * (t ^ 3.0)) / l) / l)); else tmp = Float64(Float64(l * l) * Float64(2.0 / Float64((k ^ 4.0) * Float64(t + Float64((k ^ 2.0) * Float64(Float64(Float64(t * (k ^ 2.0)) * 0.08611111111111111) + Float64(t * 0.16666666666666666))))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (t <= 7.2e-129) tmp = 2.0 * (((l ^ 2.0) / t) / (k ^ 4.0)); elseif (t <= 3.6e+79) tmp = (2.0 / (k / (t * (t / k)))) / ((((sin(k) * tan(k)) * (t ^ 3.0)) / l) / l); else tmp = (l * l) * (2.0 / ((k ^ 4.0) * (t + ((k ^ 2.0) * (((t * (k ^ 2.0)) * 0.08611111111111111) + (t * 0.16666666666666666)))))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[t, 7.2e-129], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / t), $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.6e+79], N[(N[(2.0 / N[(k / N[(t * N[(t / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(N[(l * l), $MachinePrecision] * N[(2.0 / N[(N[Power[k, 4.0], $MachinePrecision] * N[(t + N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[(N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * 0.08611111111111111), $MachinePrecision] + N[(t * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 7.2 \cdot 10^{-129}:\\
\;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{t}}{{k}^{4}}\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{+79}:\\
\;\;\;\;\frac{\frac{2}{\frac{k}{t \cdot \frac{t}{k}}}}{\frac{\frac{\left(\sin k \cdot \tan k\right) \cdot {t}^{3}}{\ell}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{2}{{k}^{4} \cdot \left(t + {k}^{2} \cdot \left(\left(t \cdot {k}^{2}\right) \cdot 0.08611111111111111 + t \cdot 0.16666666666666666\right)\right)}\\
\end{array}
\end{array}
if t < 7.2e-129Initial program 33.4%
Simplified37.1%
Taylor expanded in k around 0 61.1%
*-commutative61.1%
associate-/r*60.7%
Simplified60.7%
if 7.2e-129 < t < 3.5999999999999999e79Initial program 64.1%
*-commutative64.1%
associate-/r*64.1%
Simplified70.4%
associate-*l/74.7%
associate-/r*83.5%
Applied egg-rr83.5%
+-rgt-identity83.5%
unpow283.5%
clear-num83.5%
frac-times83.6%
*-un-lft-identity83.6%
Applied egg-rr83.6%
if 3.5999999999999999e79 < t Initial program 15.5%
Simplified35.4%
Taylor expanded in k around 0 77.8%
Final simplification67.8%
(FPCore (t l k)
:precision binary64
(if (<= t 4.15e-128)
(* 2.0 (/ (/ (pow l 2.0) t) (pow k 4.0)))
(if (<= t 3.6e+79)
(/
(/ 2.0 (/ k (* t (/ t k))))
(/ (/ (* (* (sin k) (tan k)) (pow t 3.0)) l) l))
(*
(* l l)
(/
2.0
(* (pow k 4.0) (+ t (* (* t (pow k 2.0)) 0.16666666666666666))))))))
double code(double t, double l, double k) {
double tmp;
if (t <= 4.15e-128) {
tmp = 2.0 * ((pow(l, 2.0) / t) / pow(k, 4.0));
} else if (t <= 3.6e+79) {
tmp = (2.0 / (k / (t * (t / k)))) / ((((sin(k) * tan(k)) * pow(t, 3.0)) / l) / l);
} else {
tmp = (l * l) * (2.0 / (pow(k, 4.0) * (t + ((t * pow(k, 2.0)) * 0.16666666666666666))));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t <= 4.15d-128) then
tmp = 2.0d0 * (((l ** 2.0d0) / t) / (k ** 4.0d0))
else if (t <= 3.6d+79) then
tmp = (2.0d0 / (k / (t * (t / k)))) / ((((sin(k) * tan(k)) * (t ** 3.0d0)) / l) / l)
else
tmp = (l * l) * (2.0d0 / ((k ** 4.0d0) * (t + ((t * (k ** 2.0d0)) * 0.16666666666666666d0))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (t <= 4.15e-128) {
tmp = 2.0 * ((Math.pow(l, 2.0) / t) / Math.pow(k, 4.0));
} else if (t <= 3.6e+79) {
tmp = (2.0 / (k / (t * (t / k)))) / ((((Math.sin(k) * Math.tan(k)) * Math.pow(t, 3.0)) / l) / l);
} else {
tmp = (l * l) * (2.0 / (Math.pow(k, 4.0) * (t + ((t * Math.pow(k, 2.0)) * 0.16666666666666666))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if t <= 4.15e-128: tmp = 2.0 * ((math.pow(l, 2.0) / t) / math.pow(k, 4.0)) elif t <= 3.6e+79: tmp = (2.0 / (k / (t * (t / k)))) / ((((math.sin(k) * math.tan(k)) * math.pow(t, 3.0)) / l) / l) else: tmp = (l * l) * (2.0 / (math.pow(k, 4.0) * (t + ((t * math.pow(k, 2.0)) * 0.16666666666666666)))) return tmp
function code(t, l, k) tmp = 0.0 if (t <= 4.15e-128) tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / t) / (k ^ 4.0))); elseif (t <= 3.6e+79) tmp = Float64(Float64(2.0 / Float64(k / Float64(t * Float64(t / k)))) / Float64(Float64(Float64(Float64(sin(k) * tan(k)) * (t ^ 3.0)) / l) / l)); else tmp = Float64(Float64(l * l) * Float64(2.0 / Float64((k ^ 4.0) * Float64(t + Float64(Float64(t * (k ^ 2.0)) * 0.16666666666666666))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (t <= 4.15e-128) tmp = 2.0 * (((l ^ 2.0) / t) / (k ^ 4.0)); elseif (t <= 3.6e+79) tmp = (2.0 / (k / (t * (t / k)))) / ((((sin(k) * tan(k)) * (t ^ 3.0)) / l) / l); else tmp = (l * l) * (2.0 / ((k ^ 4.0) * (t + ((t * (k ^ 2.0)) * 0.16666666666666666)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[t, 4.15e-128], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / t), $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.6e+79], N[(N[(2.0 / N[(k / N[(t * N[(t / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(N[(l * l), $MachinePrecision] * N[(2.0 / N[(N[Power[k, 4.0], $MachinePrecision] * N[(t + N[(N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 4.15 \cdot 10^{-128}:\\
\;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{t}}{{k}^{4}}\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{+79}:\\
\;\;\;\;\frac{\frac{2}{\frac{k}{t \cdot \frac{t}{k}}}}{\frac{\frac{\left(\sin k \cdot \tan k\right) \cdot {t}^{3}}{\ell}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{2}{{k}^{4} \cdot \left(t + \left(t \cdot {k}^{2}\right) \cdot 0.16666666666666666\right)}\\
\end{array}
\end{array}
if t < 4.15000000000000008e-128Initial program 33.4%
Simplified37.1%
Taylor expanded in k around 0 61.1%
*-commutative61.1%
associate-/r*60.7%
Simplified60.7%
if 4.15000000000000008e-128 < t < 3.5999999999999999e79Initial program 64.1%
*-commutative64.1%
associate-/r*64.1%
Simplified70.4%
associate-*l/74.7%
associate-/r*83.5%
Applied egg-rr83.5%
+-rgt-identity83.5%
unpow283.5%
clear-num83.5%
frac-times83.6%
*-un-lft-identity83.6%
Applied egg-rr83.6%
if 3.5999999999999999e79 < t Initial program 15.5%
Simplified35.4%
Taylor expanded in k around 0 77.8%
Final simplification67.8%
(FPCore (t l k)
:precision binary64
(if (<= k 4.8e+76)
(*
(* l l)
(/
(+ (* -0.3333333333333333 (/ (pow k 2.0) t)) (* 2.0 (/ 1.0 t)))
(pow k 4.0)))
0.0))
double code(double t, double l, double k) {
double tmp;
if (k <= 4.8e+76) {
tmp = (l * l) * (((-0.3333333333333333 * (pow(k, 2.0) / t)) + (2.0 * (1.0 / t))) / pow(k, 4.0));
} else {
tmp = 0.0;
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 4.8d+76) then
tmp = (l * l) * ((((-0.3333333333333333d0) * ((k ** 2.0d0) / t)) + (2.0d0 * (1.0d0 / t))) / (k ** 4.0d0))
else
tmp = 0.0d0
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 4.8e+76) {
tmp = (l * l) * (((-0.3333333333333333 * (Math.pow(k, 2.0) / t)) + (2.0 * (1.0 / t))) / Math.pow(k, 4.0));
} else {
tmp = 0.0;
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 4.8e+76: tmp = (l * l) * (((-0.3333333333333333 * (math.pow(k, 2.0) / t)) + (2.0 * (1.0 / t))) / math.pow(k, 4.0)) else: tmp = 0.0 return tmp
function code(t, l, k) tmp = 0.0 if (k <= 4.8e+76) tmp = Float64(Float64(l * l) * Float64(Float64(Float64(-0.3333333333333333 * Float64((k ^ 2.0) / t)) + Float64(2.0 * Float64(1.0 / t))) / (k ^ 4.0))); else tmp = 0.0; end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 4.8e+76) tmp = (l * l) * (((-0.3333333333333333 * ((k ^ 2.0) / t)) + (2.0 * (1.0 / t))) / (k ^ 4.0)); else tmp = 0.0; end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 4.8e+76], N[(N[(l * l), $MachinePrecision] * N[(N[(N[(-0.3333333333333333 * N[(N[Power[k, 2.0], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(1.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 4.8 \cdot 10^{+76}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{-0.3333333333333333 \cdot \frac{{k}^{2}}{t} + 2 \cdot \frac{1}{t}}{{k}^{4}}\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if k < 4.8e76Initial program 37.7%
Simplified44.6%
Taylor expanded in k around 0 54.0%
if 4.8e76 < k Initial program 26.6%
Simplified34.7%
Taylor expanded in k around 0 47.7%
add-log-exp47.7%
*-commutative47.7%
exp-prod50.8%
pow250.8%
associate-/r*50.8%
Applied egg-rr50.8%
Taylor expanded in l around 0 50.8%
Final simplification53.4%
(FPCore (t l k) :precision binary64 (* (* l l) (/ 2.0 (* (pow k 4.0) (+ t (* (* t (pow k 2.0)) 0.16666666666666666))))))
double code(double t, double l, double k) {
return (l * l) * (2.0 / (pow(k, 4.0) * (t + ((t * pow(k, 2.0)) * 0.16666666666666666))));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = (l * l) * (2.0d0 / ((k ** 4.0d0) * (t + ((t * (k ** 2.0d0)) * 0.16666666666666666d0))))
end function
public static double code(double t, double l, double k) {
return (l * l) * (2.0 / (Math.pow(k, 4.0) * (t + ((t * Math.pow(k, 2.0)) * 0.16666666666666666))));
}
def code(t, l, k): return (l * l) * (2.0 / (math.pow(k, 4.0) * (t + ((t * math.pow(k, 2.0)) * 0.16666666666666666))))
function code(t, l, k) return Float64(Float64(l * l) * Float64(2.0 / Float64((k ^ 4.0) * Float64(t + Float64(Float64(t * (k ^ 2.0)) * 0.16666666666666666))))) end
function tmp = code(t, l, k) tmp = (l * l) * (2.0 / ((k ^ 4.0) * (t + ((t * (k ^ 2.0)) * 0.16666666666666666)))); end
code[t_, l_, k_] := N[(N[(l * l), $MachinePrecision] * N[(2.0 / N[(N[Power[k, 4.0], $MachinePrecision] * N[(t + N[(N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\ell \cdot \ell\right) \cdot \frac{2}{{k}^{4} \cdot \left(t + \left(t \cdot {k}^{2}\right) \cdot 0.16666666666666666\right)}
\end{array}
Initial program 35.6%
Simplified42.7%
Taylor expanded in k around 0 64.7%
Final simplification64.7%
(FPCore (t l k) :precision binary64 (* (* l l) (/ 2.0 (* t (pow k 4.0)))))
double code(double t, double l, double k) {
return (l * l) * (2.0 / (t * pow(k, 4.0)));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = (l * l) * (2.0d0 / (t * (k ** 4.0d0)))
end function
public static double code(double t, double l, double k) {
return (l * l) * (2.0 / (t * Math.pow(k, 4.0)));
}
def code(t, l, k): return (l * l) * (2.0 / (t * math.pow(k, 4.0)))
function code(t, l, k) return Float64(Float64(l * l) * Float64(2.0 / Float64(t * (k ^ 4.0)))) end
function tmp = code(t, l, k) tmp = (l * l) * (2.0 / (t * (k ^ 4.0))); end
code[t_, l_, k_] := N[(N[(l * l), $MachinePrecision] * N[(2.0 / N[(t * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\ell \cdot \ell\right) \cdot \frac{2}{t \cdot {k}^{4}}
\end{array}
Initial program 35.6%
Simplified42.7%
Taylor expanded in k around 0 64.6%
Final simplification64.6%
(FPCore (t l k) :precision binary64 (if (<= l 1.25e+193) 0.0 (* (* l l) (/ -0.11666666666666667 t))))
double code(double t, double l, double k) {
double tmp;
if (l <= 1.25e+193) {
tmp = 0.0;
} else {
tmp = (l * l) * (-0.11666666666666667 / t);
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (l <= 1.25d+193) then
tmp = 0.0d0
else
tmp = (l * l) * ((-0.11666666666666667d0) / t)
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (l <= 1.25e+193) {
tmp = 0.0;
} else {
tmp = (l * l) * (-0.11666666666666667 / t);
}
return tmp;
}
def code(t, l, k): tmp = 0 if l <= 1.25e+193: tmp = 0.0 else: tmp = (l * l) * (-0.11666666666666667 / t) return tmp
function code(t, l, k) tmp = 0.0 if (l <= 1.25e+193) tmp = 0.0; else tmp = Float64(Float64(l * l) * Float64(-0.11666666666666667 / t)); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (l <= 1.25e+193) tmp = 0.0; else tmp = (l * l) * (-0.11666666666666667 / t); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[l, 1.25e+193], 0.0, N[(N[(l * l), $MachinePrecision] * N[(-0.11666666666666667 / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.25 \cdot 10^{+193}:\\
\;\;\;\;0\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{-0.11666666666666667}{t}\\
\end{array}
\end{array}
if l < 1.24999999999999993e193Initial program 37.0%
Simplified44.8%
Taylor expanded in k around 0 67.5%
add-log-exp65.0%
*-commutative65.0%
exp-prod55.6%
pow255.6%
associate-/r*55.6%
Applied egg-rr55.6%
Taylor expanded in l around 0 35.2%
if 1.24999999999999993e193 < l Initial program 21.7%
Simplified21.7%
Taylor expanded in k around 0 39.2%
Taylor expanded in k around inf 17.9%
Final simplification33.7%
(FPCore (t l k) :precision binary64 (* (* l l) (/ -0.11666666666666667 t)))
double code(double t, double l, double k) {
return (l * l) * (-0.11666666666666667 / t);
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = (l * l) * ((-0.11666666666666667d0) / t)
end function
public static double code(double t, double l, double k) {
return (l * l) * (-0.11666666666666667 / t);
}
def code(t, l, k): return (l * l) * (-0.11666666666666667 / t)
function code(t, l, k) return Float64(Float64(l * l) * Float64(-0.11666666666666667 / t)) end
function tmp = code(t, l, k) tmp = (l * l) * (-0.11666666666666667 / t); end
code[t_, l_, k_] := N[(N[(l * l), $MachinePrecision] * N[(-0.11666666666666667 / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\ell \cdot \ell\right) \cdot \frac{-0.11666666666666667}{t}
\end{array}
Initial program 35.6%
Simplified42.7%
Taylor expanded in k around 0 42.8%
Taylor expanded in k around inf 26.7%
Final simplification26.7%
herbie shell --seed 2024146
(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))))