
(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 11 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 (if (<= (* l l) 5e+105) (* (/ (/ l (tan k)) k) (/ (/ 2.0 (/ (sin k) l)) (* k t))) (* (/ 2.0 (pow (* (sin k) (/ k l)) 2.0)) (/ (cos k) t))))
double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 5e+105) {
tmp = ((l / tan(k)) / k) * ((2.0 / (sin(k) / l)) / (k * t));
} else {
tmp = (2.0 / pow((sin(k) * (k / l)), 2.0)) * (cos(k) / 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 * l) <= 5d+105) then
tmp = ((l / tan(k)) / k) * ((2.0d0 / (sin(k) / l)) / (k * t))
else
tmp = (2.0d0 / ((sin(k) * (k / l)) ** 2.0d0)) * (cos(k) / t)
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 5e+105) {
tmp = ((l / Math.tan(k)) / k) * ((2.0 / (Math.sin(k) / l)) / (k * t));
} else {
tmp = (2.0 / Math.pow((Math.sin(k) * (k / l)), 2.0)) * (Math.cos(k) / t);
}
return tmp;
}
def code(t, l, k): tmp = 0 if (l * l) <= 5e+105: tmp = ((l / math.tan(k)) / k) * ((2.0 / (math.sin(k) / l)) / (k * t)) else: tmp = (2.0 / math.pow((math.sin(k) * (k / l)), 2.0)) * (math.cos(k) / t) return tmp
function code(t, l, k) tmp = 0.0 if (Float64(l * l) <= 5e+105) tmp = Float64(Float64(Float64(l / tan(k)) / k) * Float64(Float64(2.0 / Float64(sin(k) / l)) / Float64(k * t))); else tmp = Float64(Float64(2.0 / (Float64(sin(k) * Float64(k / l)) ^ 2.0)) * Float64(cos(k) / t)); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((l * l) <= 5e+105) tmp = ((l / tan(k)) / k) * ((2.0 / (sin(k) / l)) / (k * t)); else tmp = (2.0 / ((sin(k) * (k / l)) ^ 2.0)) * (cos(k) / t); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[N[(l * l), $MachinePrecision], 5e+105], N[(N[(N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision] * N[(N[(2.0 / N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[Power[N[(N[Sin[k], $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 5 \cdot 10^{+105}:\\
\;\;\;\;\frac{\frac{\ell}{\tan k}}{k} \cdot \frac{\frac{2}{\frac{\sin k}{\ell}}}{k \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\sin k \cdot \frac{k}{\ell}\right)}^{2}} \cdot \frac{\cos k}{t}\\
\end{array}
\end{array}
if (*.f64 l l) < 5.00000000000000046e105Initial program 33.1%
associate-*l*33.0%
associate-*l*33.3%
associate-/r*33.1%
associate-/r/34.3%
*-commutative34.3%
times-frac35.0%
+-commutative35.0%
associate--l+46.6%
metadata-eval46.6%
+-rgt-identity46.6%
times-frac54.0%
Simplified54.0%
Taylor expanded in t around 0 89.4%
unpow289.4%
Simplified89.4%
associate-*l/89.4%
associate-*l*95.1%
Applied egg-rr95.1%
associate-*l/95.1%
associate-*r*89.4%
unpow289.4%
associate-/r*89.3%
unpow289.3%
associate-*r*92.2%
*-commutative92.2%
unpow292.2%
associate-/r*92.2%
unpow292.2%
associate-*r*97.9%
associate-*l/97.9%
associate-*r/97.9%
Simplified97.9%
associate-*r/95.1%
Applied egg-rr95.1%
times-frac99.2%
associate-/l*99.2%
Applied egg-rr99.2%
if 5.00000000000000046e105 < (*.f64 l l) Initial program 24.7%
+-rgt-identity13.7%
associate-*l*13.7%
mul0-rgt17.0%
distribute-lft-in21.3%
+-rgt-identity24.7%
sub-neg24.7%
+-commutative24.7%
associate-+l+25.7%
metadata-eval25.7%
metadata-eval25.7%
+-rgt-identity25.7%
Simplified25.7%
expm1-log1p-u23.1%
expm1-udef11.0%
Applied egg-rr17.5%
expm1-def18.4%
expm1-log1p18.6%
*-commutative18.6%
*-commutative18.6%
Simplified18.6%
Taylor expanded in k around inf 39.9%
associate-/l*39.9%
associate-/r/40.0%
Simplified40.0%
div-inv40.0%
*-commutative40.0%
Applied egg-rr40.0%
associate-*r/40.0%
metadata-eval40.0%
unpow240.0%
swap-sqr39.1%
unpow239.1%
rem-square-sqrt98.0%
Simplified98.0%
expm1-log1p-u52.0%
expm1-udef31.7%
Applied egg-rr31.7%
expm1-def52.0%
expm1-log1p98.0%
associate-*r/98.0%
associate-/l*98.0%
associate-/r/98.6%
Simplified98.6%
Final simplification99.0%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (/ l (tan k))))
(if (<= (* l l) 0.0)
(* (/ l k) (/ (/ (* l 2.0) (sin k)) (* k (* k t))))
(if (<= (* l l) 1e+259)
(* (/ 2.0 k) (/ (/ (* l t_1) (sin k)) (* k t)))
(* t_1 (* 2.0 (/ (/ l (* k k)) (* (sin k) t))))))))
double code(double t, double l, double k) {
double t_1 = l / tan(k);
double tmp;
if ((l * l) <= 0.0) {
tmp = (l / k) * (((l * 2.0) / sin(k)) / (k * (k * t)));
} else if ((l * l) <= 1e+259) {
tmp = (2.0 / k) * (((l * t_1) / sin(k)) / (k * t));
} else {
tmp = t_1 * (2.0 * ((l / (k * k)) / (sin(k) * 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) :: t_1
real(8) :: tmp
t_1 = l / tan(k)
if ((l * l) <= 0.0d0) then
tmp = (l / k) * (((l * 2.0d0) / sin(k)) / (k * (k * t)))
else if ((l * l) <= 1d+259) then
tmp = (2.0d0 / k) * (((l * t_1) / sin(k)) / (k * t))
else
tmp = t_1 * (2.0d0 * ((l / (k * k)) / (sin(k) * t)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = l / Math.tan(k);
double tmp;
if ((l * l) <= 0.0) {
tmp = (l / k) * (((l * 2.0) / Math.sin(k)) / (k * (k * t)));
} else if ((l * l) <= 1e+259) {
tmp = (2.0 / k) * (((l * t_1) / Math.sin(k)) / (k * t));
} else {
tmp = t_1 * (2.0 * ((l / (k * k)) / (Math.sin(k) * t)));
}
return tmp;
}
def code(t, l, k): t_1 = l / math.tan(k) tmp = 0 if (l * l) <= 0.0: tmp = (l / k) * (((l * 2.0) / math.sin(k)) / (k * (k * t))) elif (l * l) <= 1e+259: tmp = (2.0 / k) * (((l * t_1) / math.sin(k)) / (k * t)) else: tmp = t_1 * (2.0 * ((l / (k * k)) / (math.sin(k) * t))) return tmp
function code(t, l, k) t_1 = Float64(l / tan(k)) tmp = 0.0 if (Float64(l * l) <= 0.0) tmp = Float64(Float64(l / k) * Float64(Float64(Float64(l * 2.0) / sin(k)) / Float64(k * Float64(k * t)))); elseif (Float64(l * l) <= 1e+259) tmp = Float64(Float64(2.0 / k) * Float64(Float64(Float64(l * t_1) / sin(k)) / Float64(k * t))); else tmp = Float64(t_1 * Float64(2.0 * Float64(Float64(l / Float64(k * k)) / Float64(sin(k) * t)))); end return tmp end
function tmp_2 = code(t, l, k) t_1 = l / tan(k); tmp = 0.0; if ((l * l) <= 0.0) tmp = (l / k) * (((l * 2.0) / sin(k)) / (k * (k * t))); elseif ((l * l) <= 1e+259) tmp = (2.0 / k) * (((l * t_1) / sin(k)) / (k * t)); else tmp = t_1 * (2.0 * ((l / (k * k)) / (sin(k) * t))); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(l * l), $MachinePrecision], 0.0], N[(N[(l / k), $MachinePrecision] * N[(N[(N[(l * 2.0), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 1e+259], N[(N[(2.0 / k), $MachinePrecision] * N[(N[(N[(l * t$95$1), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(2.0 * N[(N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell}{\tan k}\\
\mathbf{if}\;\ell \cdot \ell \leq 0:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell \cdot 2}{\sin k}}{k \cdot \left(k \cdot t\right)}\\
\mathbf{elif}\;\ell \cdot \ell \leq 10^{+259}:\\
\;\;\;\;\frac{2}{k} \cdot \frac{\frac{\ell \cdot t_1}{\sin k}}{k \cdot t}\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \left(2 \cdot \frac{\frac{\ell}{k \cdot k}}{\sin k \cdot t}\right)\\
\end{array}
\end{array}
if (*.f64 l l) < 0.0Initial program 18.6%
associate-*l*18.6%
associate-*l*18.6%
associate-/r*18.6%
associate-/r/18.6%
*-commutative18.6%
times-frac18.6%
+-commutative18.6%
associate--l+32.3%
metadata-eval32.3%
+-rgt-identity32.3%
times-frac53.0%
Simplified53.0%
Taylor expanded in t around 0 82.4%
unpow282.4%
Simplified82.4%
associate-*l/82.4%
associate-*l*88.9%
Applied egg-rr88.9%
associate-*l/88.9%
associate-*r*82.4%
unpow282.4%
associate-/r*82.4%
unpow282.4%
associate-*r*90.4%
*-commutative90.4%
unpow290.4%
associate-/r*90.3%
unpow290.3%
associate-*r*96.7%
associate-*l/96.8%
associate-*r/96.8%
Simplified96.8%
Taylor expanded in k around 0 96.8%
if 0.0 < (*.f64 l l) < 9.999999999999999e258Initial program 42.4%
associate-*l*42.4%
associate-*l*42.8%
associate-/r*42.4%
associate-/r/44.1%
*-commutative44.1%
times-frac45.1%
+-commutative45.1%
associate--l+54.8%
metadata-eval54.8%
+-rgt-identity54.8%
times-frac54.8%
Simplified54.8%
Taylor expanded in t around 0 89.0%
unpow289.0%
Simplified89.0%
associate-*l/89.1%
associate-*l*96.0%
Applied egg-rr96.0%
times-frac97.4%
associate-*l/97.3%
Simplified97.3%
if 9.999999999999999e258 < (*.f64 l l) Initial program 18.9%
associate-*l*18.9%
associate-*l*18.9%
associate-/r*18.9%
associate-/r/18.9%
*-commutative18.9%
times-frac18.9%
+-commutative18.9%
associate--l+18.9%
metadata-eval18.9%
+-rgt-identity18.9%
times-frac18.9%
Simplified18.9%
Taylor expanded in t around 0 58.0%
unpow258.0%
Simplified58.0%
associate-*l/58.0%
associate-*l*60.9%
Applied egg-rr60.9%
associate-*l/60.9%
associate-*r*58.0%
unpow258.0%
associate-/r*58.0%
unpow258.0%
associate-*r*67.8%
*-commutative67.8%
unpow267.8%
associate-/r*67.8%
unpow267.8%
associate-*r*75.6%
associate-*l/75.5%
associate-*r/75.5%
Simplified75.5%
Taylor expanded in l around 0 67.8%
associate-/r*75.4%
unpow275.4%
Simplified75.4%
Final simplification90.8%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (/ l (tan k))) (t_2 (* k (* k t))))
(if (<= k 8.2e-137)
(/ (* 2.0 (* l (/ (/ l k) k))) t_2)
(if (<= k 1.08e+150)
(* t_1 (* 2.0 (/ (/ l (* k k)) (* (sin k) t))))
(* t_1 (/ (* l 2.0) (* (sin k) t_2)))))))
double code(double t, double l, double k) {
double t_1 = l / tan(k);
double t_2 = k * (k * t);
double tmp;
if (k <= 8.2e-137) {
tmp = (2.0 * (l * ((l / k) / k))) / t_2;
} else if (k <= 1.08e+150) {
tmp = t_1 * (2.0 * ((l / (k * k)) / (sin(k) * t)));
} else {
tmp = t_1 * ((l * 2.0) / (sin(k) * t_2));
}
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = l / tan(k)
t_2 = k * (k * t)
if (k <= 8.2d-137) then
tmp = (2.0d0 * (l * ((l / k) / k))) / t_2
else if (k <= 1.08d+150) then
tmp = t_1 * (2.0d0 * ((l / (k * k)) / (sin(k) * t)))
else
tmp = t_1 * ((l * 2.0d0) / (sin(k) * t_2))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = l / Math.tan(k);
double t_2 = k * (k * t);
double tmp;
if (k <= 8.2e-137) {
tmp = (2.0 * (l * ((l / k) / k))) / t_2;
} else if (k <= 1.08e+150) {
tmp = t_1 * (2.0 * ((l / (k * k)) / (Math.sin(k) * t)));
} else {
tmp = t_1 * ((l * 2.0) / (Math.sin(k) * t_2));
}
return tmp;
}
def code(t, l, k): t_1 = l / math.tan(k) t_2 = k * (k * t) tmp = 0 if k <= 8.2e-137: tmp = (2.0 * (l * ((l / k) / k))) / t_2 elif k <= 1.08e+150: tmp = t_1 * (2.0 * ((l / (k * k)) / (math.sin(k) * t))) else: tmp = t_1 * ((l * 2.0) / (math.sin(k) * t_2)) return tmp
function code(t, l, k) t_1 = Float64(l / tan(k)) t_2 = Float64(k * Float64(k * t)) tmp = 0.0 if (k <= 8.2e-137) tmp = Float64(Float64(2.0 * Float64(l * Float64(Float64(l / k) / k))) / t_2); elseif (k <= 1.08e+150) tmp = Float64(t_1 * Float64(2.0 * Float64(Float64(l / Float64(k * k)) / Float64(sin(k) * t)))); else tmp = Float64(t_1 * Float64(Float64(l * 2.0) / Float64(sin(k) * t_2))); end return tmp end
function tmp_2 = code(t, l, k) t_1 = l / tan(k); t_2 = k * (k * t); tmp = 0.0; if (k <= 8.2e-137) tmp = (2.0 * (l * ((l / k) / k))) / t_2; elseif (k <= 1.08e+150) tmp = t_1 * (2.0 * ((l / (k * k)) / (sin(k) * t))); else tmp = t_1 * ((l * 2.0) / (sin(k) * t_2)); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, 8.2e-137], N[(N[(2.0 * N[(l * N[(N[(l / k), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[k, 1.08e+150], N[(t$95$1 * N[(2.0 * N[(N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(N[(l * 2.0), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell}{\tan k}\\
t_2 := k \cdot \left(k \cdot t\right)\\
\mathbf{if}\;k \leq 8.2 \cdot 10^{-137}:\\
\;\;\;\;\frac{2 \cdot \left(\ell \cdot \frac{\frac{\ell}{k}}{k}\right)}{t_2}\\
\mathbf{elif}\;k \leq 1.08 \cdot 10^{+150}:\\
\;\;\;\;t_1 \cdot \left(2 \cdot \frac{\frac{\ell}{k \cdot k}}{\sin k \cdot t}\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \frac{\ell \cdot 2}{\sin k \cdot t_2}\\
\end{array}
\end{array}
if k < 8.1999999999999997e-137Initial program 31.7%
associate-*l*31.7%
associate-*l*32.0%
associate-/r*31.7%
associate-/r/32.3%
*-commutative32.3%
times-frac33.0%
+-commutative33.0%
associate--l+38.9%
metadata-eval38.9%
+-rgt-identity38.9%
times-frac45.6%
Simplified45.6%
Taylor expanded in t around 0 80.3%
unpow280.3%
Simplified80.3%
Taylor expanded in k around 0 67.2%
unpow267.2%
unpow267.2%
Simplified67.2%
Taylor expanded in l around 0 67.2%
*-rgt-identity67.2%
associate-*r/67.2%
unpow267.2%
unpow267.2%
associate-*l*74.4%
unpow274.4%
associate-*r/74.4%
*-rgt-identity74.4%
unpow274.4%
Simplified74.4%
associate-*r*74.4%
associate-*l/74.4%
associate-/r*77.3%
Applied egg-rr77.3%
if 8.1999999999999997e-137 < k < 1.08e150Initial program 23.3%
associate-*l*23.3%
associate-*l*23.3%
associate-/r*23.3%
associate-/r/25.0%
*-commutative25.0%
times-frac25.2%
+-commutative25.2%
associate--l+36.9%
metadata-eval36.9%
+-rgt-identity36.9%
times-frac38.8%
Simplified38.8%
Taylor expanded in t around 0 79.6%
unpow279.6%
Simplified79.6%
associate-*l/79.6%
associate-*l*79.6%
Applied egg-rr79.6%
associate-*l/79.6%
associate-*r*79.6%
unpow279.6%
associate-/r*79.7%
unpow279.7%
associate-*r*92.1%
*-commutative92.1%
unpow292.1%
associate-/r*91.9%
unpow291.9%
associate-*r*91.9%
associate-*l/92.0%
associate-*r/92.0%
Simplified92.0%
Taylor expanded in l around 0 92.0%
associate-/r*95.7%
unpow295.7%
Simplified95.7%
if 1.08e150 < k Initial program 34.8%
associate-*l*34.8%
associate-*l*34.8%
associate-/r*34.8%
associate-/r/34.8%
*-commutative34.8%
times-frac34.9%
+-commutative34.9%
associate--l+44.9%
metadata-eval44.9%
+-rgt-identity44.9%
times-frac44.9%
Simplified44.9%
Taylor expanded in t around 0 65.4%
unpow265.4%
Simplified65.4%
associate-*l/65.4%
associate-*l*75.0%
Applied egg-rr75.0%
associate-*l/75.0%
associate-*r*65.4%
unpow265.4%
associate-/r*65.4%
unpow265.4%
associate-*r*69.3%
*-commutative69.3%
unpow269.3%
associate-/r*69.3%
unpow269.3%
associate-*r*85.1%
associate-*l/85.1%
associate-*r/85.1%
Simplified85.1%
frac-times75.0%
Applied egg-rr75.0%
times-frac85.1%
associate-/l/85.1%
Simplified85.1%
Final simplification82.6%
(FPCore (t l k) :precision binary64 (if (<= l 1.9e-196) (* (/ l k) (/ (/ (* l 2.0) (sin k)) (* k (* k t)))) (* (/ 2.0 k) (/ (/ (* l (/ l (tan k))) (sin k)) (* k t)))))
double code(double t, double l, double k) {
double tmp;
if (l <= 1.9e-196) {
tmp = (l / k) * (((l * 2.0) / sin(k)) / (k * (k * t)));
} else {
tmp = (2.0 / k) * (((l * (l / tan(k))) / sin(k)) / (k * 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.9d-196) then
tmp = (l / k) * (((l * 2.0d0) / sin(k)) / (k * (k * t)))
else
tmp = (2.0d0 / k) * (((l * (l / tan(k))) / sin(k)) / (k * t))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (l <= 1.9e-196) {
tmp = (l / k) * (((l * 2.0) / Math.sin(k)) / (k * (k * t)));
} else {
tmp = (2.0 / k) * (((l * (l / Math.tan(k))) / Math.sin(k)) / (k * t));
}
return tmp;
}
def code(t, l, k): tmp = 0 if l <= 1.9e-196: tmp = (l / k) * (((l * 2.0) / math.sin(k)) / (k * (k * t))) else: tmp = (2.0 / k) * (((l * (l / math.tan(k))) / math.sin(k)) / (k * t)) return tmp
function code(t, l, k) tmp = 0.0 if (l <= 1.9e-196) tmp = Float64(Float64(l / k) * Float64(Float64(Float64(l * 2.0) / sin(k)) / Float64(k * Float64(k * t)))); else tmp = Float64(Float64(2.0 / k) * Float64(Float64(Float64(l * Float64(l / tan(k))) / sin(k)) / Float64(k * t))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (l <= 1.9e-196) tmp = (l / k) * (((l * 2.0) / sin(k)) / (k * (k * t))); else tmp = (2.0 / k) * (((l * (l / tan(k))) / sin(k)) / (k * t)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[l, 1.9e-196], N[(N[(l / k), $MachinePrecision] * N[(N[(N[(l * 2.0), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / k), $MachinePrecision] * N[(N[(N[(l * N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.9 \cdot 10^{-196}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell \cdot 2}{\sin k}}{k \cdot \left(k \cdot t\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{k} \cdot \frac{\frac{\ell \cdot \frac{\ell}{\tan k}}{\sin k}}{k \cdot t}\\
\end{array}
\end{array}
if l < 1.9000000000000001e-196Initial program 30.8%
associate-*l*30.8%
associate-*l*31.1%
associate-/r*30.9%
associate-/r/31.6%
*-commutative31.6%
times-frac32.3%
+-commutative32.3%
associate--l+41.2%
metadata-eval41.2%
+-rgt-identity41.2%
times-frac48.2%
Simplified48.2%
Taylor expanded in t around 0 80.2%
unpow280.2%
Simplified80.2%
associate-*l/80.2%
associate-*l*86.1%
Applied egg-rr86.1%
associate-*l/86.1%
associate-*r*80.2%
unpow280.2%
associate-/r*80.2%
unpow280.2%
associate-*r*85.5%
*-commutative85.5%
unpow285.5%
associate-/r*85.4%
unpow285.4%
associate-*r*91.9%
associate-*l/91.9%
associate-*r/91.9%
Simplified91.9%
Taylor expanded in k around 0 79.7%
if 1.9000000000000001e-196 < l Initial program 29.0%
associate-*l*29.0%
associate-*l*29.0%
associate-/r*29.0%
associate-/r/29.9%
*-commutative29.9%
times-frac30.0%
+-commutative30.0%
associate--l+36.3%
metadata-eval36.3%
+-rgt-identity36.3%
times-frac38.1%
Simplified38.1%
Taylor expanded in t around 0 76.0%
unpow276.0%
Simplified76.0%
associate-*l/76.0%
associate-*l*81.4%
Applied egg-rr81.4%
times-frac81.2%
associate-*l/81.2%
Simplified81.2%
Final simplification80.4%
(FPCore (t l k) :precision binary64 (if (<= k 8.5e-99) (/ (* 2.0 (* l (/ (/ l k) k))) (* k (* k t))) (* (/ l (* k (tan k))) (* (/ (/ 2.0 (sin k)) k) (/ l t)))))
double code(double t, double l, double k) {
double tmp;
if (k <= 8.5e-99) {
tmp = (2.0 * (l * ((l / k) / k))) / (k * (k * t));
} else {
tmp = (l / (k * tan(k))) * (((2.0 / sin(k)) / k) * (l / 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 (k <= 8.5d-99) then
tmp = (2.0d0 * (l * ((l / k) / k))) / (k * (k * t))
else
tmp = (l / (k * tan(k))) * (((2.0d0 / sin(k)) / k) * (l / t))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 8.5e-99) {
tmp = (2.0 * (l * ((l / k) / k))) / (k * (k * t));
} else {
tmp = (l / (k * Math.tan(k))) * (((2.0 / Math.sin(k)) / k) * (l / t));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 8.5e-99: tmp = (2.0 * (l * ((l / k) / k))) / (k * (k * t)) else: tmp = (l / (k * math.tan(k))) * (((2.0 / math.sin(k)) / k) * (l / t)) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 8.5e-99) tmp = Float64(Float64(2.0 * Float64(l * Float64(Float64(l / k) / k))) / Float64(k * Float64(k * t))); else tmp = Float64(Float64(l / Float64(k * tan(k))) * Float64(Float64(Float64(2.0 / sin(k)) / k) * Float64(l / t))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 8.5e-99) tmp = (2.0 * (l * ((l / k) / k))) / (k * (k * t)); else tmp = (l / (k * tan(k))) * (((2.0 / sin(k)) / k) * (l / t)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 8.5e-99], N[(N[(2.0 * N[(l * N[(N[(l / k), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / N[(k * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(2.0 / N[Sin[k], $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 8.5 \cdot 10^{-99}:\\
\;\;\;\;\frac{2 \cdot \left(\ell \cdot \frac{\frac{\ell}{k}}{k}\right)}{k \cdot \left(k \cdot t\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{k \cdot \tan k} \cdot \left(\frac{\frac{2}{\sin k}}{k} \cdot \frac{\ell}{t}\right)\\
\end{array}
\end{array}
if k < 8.5000000000000004e-99Initial program 32.6%
associate-*l*32.5%
associate-*l*32.8%
associate-/r*32.6%
associate-/r/33.7%
*-commutative33.7%
times-frac34.4%
+-commutative34.4%
associate--l+39.9%
metadata-eval39.9%
+-rgt-identity39.9%
times-frac46.8%
Simplified46.8%
Taylor expanded in t around 0 81.1%
unpow281.1%
Simplified81.1%
Taylor expanded in k around 0 67.5%
unpow267.5%
unpow267.5%
Simplified67.5%
Taylor expanded in l around 0 67.5%
*-rgt-identity67.5%
associate-*r/67.5%
unpow267.5%
unpow267.5%
associate-*l*75.5%
unpow275.5%
associate-*r/75.5%
*-rgt-identity75.5%
unpow275.5%
Simplified75.5%
associate-*r*75.5%
associate-*l/75.5%
associate-/r*78.2%
Applied egg-rr78.2%
if 8.5000000000000004e-99 < k Initial program 24.6%
associate-*l*24.6%
associate-*l*24.6%
associate-/r*24.6%
associate-/r/24.6%
*-commutative24.6%
times-frac24.7%
+-commutative24.7%
associate--l+37.4%
metadata-eval37.4%
+-rgt-identity37.4%
times-frac37.4%
Simplified37.4%
Taylor expanded in t around 0 72.6%
unpow272.6%
Simplified72.6%
associate-*l/72.6%
associate-*l*76.2%
Applied egg-rr76.2%
associate-*l/76.2%
associate-*r*72.6%
unpow272.6%
associate-/r*72.6%
unpow272.6%
associate-*r*83.5%
*-commutative83.5%
unpow283.5%
associate-/r*83.5%
unpow283.5%
associate-*r*89.4%
associate-*l/89.4%
associate-*r/89.4%
Simplified89.4%
associate-*r/76.2%
Applied egg-rr76.2%
expm1-log1p-u65.7%
expm1-udef56.0%
times-frac59.5%
associate-/l*59.5%
Applied egg-rr59.5%
expm1-def74.7%
expm1-log1p92.6%
associate-/l/92.6%
associate-/r/92.6%
times-frac94.9%
Simplified94.9%
Final simplification83.4%
(FPCore (t l k) :precision binary64 (if (<= l 1e+203) (* (/ (/ l (tan k)) k) (/ (/ 2.0 (/ (sin k) l)) (* k t))) (* (/ l (* k (tan k))) (* (/ (/ 2.0 (sin k)) k) (/ l t)))))
double code(double t, double l, double k) {
double tmp;
if (l <= 1e+203) {
tmp = ((l / tan(k)) / k) * ((2.0 / (sin(k) / l)) / (k * t));
} else {
tmp = (l / (k * tan(k))) * (((2.0 / sin(k)) / k) * (l / 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 <= 1d+203) then
tmp = ((l / tan(k)) / k) * ((2.0d0 / (sin(k) / l)) / (k * t))
else
tmp = (l / (k * tan(k))) * (((2.0d0 / sin(k)) / k) * (l / t))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (l <= 1e+203) {
tmp = ((l / Math.tan(k)) / k) * ((2.0 / (Math.sin(k) / l)) / (k * t));
} else {
tmp = (l / (k * Math.tan(k))) * (((2.0 / Math.sin(k)) / k) * (l / t));
}
return tmp;
}
def code(t, l, k): tmp = 0 if l <= 1e+203: tmp = ((l / math.tan(k)) / k) * ((2.0 / (math.sin(k) / l)) / (k * t)) else: tmp = (l / (k * math.tan(k))) * (((2.0 / math.sin(k)) / k) * (l / t)) return tmp
function code(t, l, k) tmp = 0.0 if (l <= 1e+203) tmp = Float64(Float64(Float64(l / tan(k)) / k) * Float64(Float64(2.0 / Float64(sin(k) / l)) / Float64(k * t))); else tmp = Float64(Float64(l / Float64(k * tan(k))) * Float64(Float64(Float64(2.0 / sin(k)) / k) * Float64(l / t))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (l <= 1e+203) tmp = ((l / tan(k)) / k) * ((2.0 / (sin(k) / l)) / (k * t)); else tmp = (l / (k * tan(k))) * (((2.0 / sin(k)) / k) * (l / t)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[l, 1e+203], N[(N[(N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision] * N[(N[(2.0 / N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / N[(k * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(2.0 / N[Sin[k], $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 10^{+203}:\\
\;\;\;\;\frac{\frac{\ell}{\tan k}}{k} \cdot \frac{\frac{2}{\frac{\sin k}{\ell}}}{k \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{k \cdot \tan k} \cdot \left(\frac{\frac{2}{\sin k}}{k} \cdot \frac{\ell}{t}\right)\\
\end{array}
\end{array}
if l < 9.9999999999999999e202Initial program 32.4%
associate-*l*32.4%
associate-*l*32.6%
associate-/r*32.4%
associate-/r/33.3%
*-commutative33.3%
times-frac33.9%
+-commutative33.9%
associate--l+42.7%
metadata-eval42.7%
+-rgt-identity42.7%
times-frac48.1%
Simplified48.1%
Taylor expanded in t around 0 81.1%
unpow281.1%
Simplified81.1%
associate-*l/81.2%
associate-*l*87.1%
Applied egg-rr87.1%
associate-*l/87.1%
associate-*r*81.1%
unpow281.1%
associate-/r*81.1%
unpow281.1%
associate-*r*85.1%
*-commutative85.1%
unpow285.1%
associate-/r*85.0%
unpow285.0%
associate-*r*92.2%
associate-*l/92.2%
associate-*r/92.2%
Simplified92.2%
associate-*r/87.1%
Applied egg-rr87.1%
times-frac96.0%
associate-/l*95.9%
Applied egg-rr95.9%
if 9.9999999999999999e202 < l Initial program 12.9%
associate-*l*12.9%
associate-*l*12.9%
associate-/r*12.9%
associate-/r/12.9%
*-commutative12.9%
times-frac12.9%
+-commutative12.9%
associate--l+12.9%
metadata-eval12.9%
+-rgt-identity12.9%
times-frac12.9%
Simplified12.9%
Taylor expanded in t around 0 58.7%
unpow258.7%
Simplified58.7%
associate-*l/58.7%
associate-*l*62.1%
Applied egg-rr62.1%
associate-*l/62.1%
associate-*r*58.7%
unpow258.7%
associate-/r*58.7%
unpow258.7%
associate-*r*68.9%
*-commutative68.9%
unpow268.9%
associate-/r*68.9%
unpow268.9%
associate-*r*75.2%
associate-*l/75.2%
associate-*r/75.2%
Simplified75.2%
associate-*r/62.1%
Applied egg-rr62.1%
expm1-log1p-u19.7%
expm1-udef19.7%
times-frac26.4%
associate-/l*26.4%
Applied egg-rr26.4%
expm1-def26.4%
expm1-log1p78.3%
associate-/l/78.4%
associate-/r/78.4%
times-frac93.7%
Simplified93.7%
Final simplification95.7%
(FPCore (t l k) :precision binary64 (* (/ l (tan k)) (/ (/ (* l 2.0) (sin k)) (* k (* k t)))))
double code(double t, double l, double k) {
return (l / tan(k)) * (((l * 2.0) / sin(k)) / (k * (k * 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 / tan(k)) * (((l * 2.0d0) / sin(k)) / (k * (k * t)))
end function
public static double code(double t, double l, double k) {
return (l / Math.tan(k)) * (((l * 2.0) / Math.sin(k)) / (k * (k * t)));
}
def code(t, l, k): return (l / math.tan(k)) * (((l * 2.0) / math.sin(k)) / (k * (k * t)))
function code(t, l, k) return Float64(Float64(l / tan(k)) * Float64(Float64(Float64(l * 2.0) / sin(k)) / Float64(k * Float64(k * t)))) end
function tmp = code(t, l, k) tmp = (l / tan(k)) * (((l * 2.0) / sin(k)) / (k * (k * t))); end
code[t_, l_, k_] := N[(N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(l * 2.0), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\ell}{\tan k} \cdot \frac{\frac{\ell \cdot 2}{\sin k}}{k \cdot \left(k \cdot t\right)}
\end{array}
Initial program 30.1%
associate-*l*30.1%
associate-*l*30.2%
associate-/r*30.1%
associate-/r/30.8%
*-commutative30.8%
times-frac31.3%
+-commutative31.3%
associate--l+39.1%
metadata-eval39.1%
+-rgt-identity39.1%
times-frac43.9%
Simplified43.9%
Taylor expanded in t around 0 78.4%
unpow278.4%
Simplified78.4%
associate-*l/78.4%
associate-*l*84.1%
Applied egg-rr84.1%
associate-*l/84.1%
associate-*r*78.4%
unpow278.4%
associate-/r*78.4%
unpow278.4%
associate-*r*83.1%
*-commutative83.1%
unpow283.1%
associate-/r*83.1%
unpow283.1%
associate-*r*90.2%
associate-*l/90.2%
associate-*r/90.2%
Simplified90.2%
Final simplification90.2%
(FPCore (t l k) :precision binary64 (if (<= l 2.75e-210) (* 2.0 (/ l (/ (* t (pow k 4.0)) l))) (* (/ 2.0 k) (/ (/ (* l (/ l k)) (sin k)) (* k t)))))
double code(double t, double l, double k) {
double tmp;
if (l <= 2.75e-210) {
tmp = 2.0 * (l / ((t * pow(k, 4.0)) / l));
} else {
tmp = (2.0 / k) * (((l * (l / k)) / sin(k)) / (k * 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 <= 2.75d-210) then
tmp = 2.0d0 * (l / ((t * (k ** 4.0d0)) / l))
else
tmp = (2.0d0 / k) * (((l * (l / k)) / sin(k)) / (k * t))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (l <= 2.75e-210) {
tmp = 2.0 * (l / ((t * Math.pow(k, 4.0)) / l));
} else {
tmp = (2.0 / k) * (((l * (l / k)) / Math.sin(k)) / (k * t));
}
return tmp;
}
def code(t, l, k): tmp = 0 if l <= 2.75e-210: tmp = 2.0 * (l / ((t * math.pow(k, 4.0)) / l)) else: tmp = (2.0 / k) * (((l * (l / k)) / math.sin(k)) / (k * t)) return tmp
function code(t, l, k) tmp = 0.0 if (l <= 2.75e-210) tmp = Float64(2.0 * Float64(l / Float64(Float64(t * (k ^ 4.0)) / l))); else tmp = Float64(Float64(2.0 / k) * Float64(Float64(Float64(l * Float64(l / k)) / sin(k)) / Float64(k * t))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (l <= 2.75e-210) tmp = 2.0 * (l / ((t * (k ^ 4.0)) / l)); else tmp = (2.0 / k) * (((l * (l / k)) / sin(k)) / (k * t)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[l, 2.75e-210], N[(2.0 * N[(l / N[(N[(t * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / k), $MachinePrecision] * N[(N[(N[(l * N[(l / k), $MachinePrecision]), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2.75 \cdot 10^{-210}:\\
\;\;\;\;2 \cdot \frac{\ell}{\frac{t \cdot {k}^{4}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{k} \cdot \frac{\frac{\ell \cdot \frac{\ell}{k}}{\sin k}}{k \cdot t}\\
\end{array}
\end{array}
if l < 2.75000000000000012e-210Initial program 31.7%
associate-*l*31.7%
associate-*l*32.0%
associate-/r*31.7%
associate-/r/32.4%
*-commutative32.4%
times-frac33.2%
+-commutative33.2%
associate--l+42.4%
metadata-eval42.4%
+-rgt-identity42.4%
times-frac48.8%
Simplified48.8%
Taylor expanded in k around 0 61.0%
unpow261.0%
*-commutative61.0%
Simplified61.0%
Taylor expanded in l around 0 61.0%
unpow261.0%
*-commutative61.0%
associate-/l*71.1%
Simplified71.1%
if 2.75000000000000012e-210 < l Initial program 28.0%
associate-*l*28.0%
associate-*l*28.0%
associate-/r*28.0%
associate-/r/28.8%
*-commutative28.8%
times-frac28.9%
+-commutative28.9%
associate--l+35.0%
metadata-eval35.0%
+-rgt-identity35.0%
times-frac37.6%
Simplified37.6%
Taylor expanded in t around 0 76.0%
unpow276.0%
Simplified76.0%
associate-*l/76.0%
associate-*l*82.1%
Applied egg-rr82.1%
times-frac81.9%
associate-*l/81.9%
Simplified81.9%
Taylor expanded in k around 0 71.7%
Final simplification71.3%
(FPCore (t l k) :precision binary64 (* (/ l k) (/ (/ (* l 2.0) (sin k)) (* k (* k t)))))
double code(double t, double l, double k) {
return (l / k) * (((l * 2.0) / sin(k)) / (k * (k * 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 / k) * (((l * 2.0d0) / sin(k)) / (k * (k * t)))
end function
public static double code(double t, double l, double k) {
return (l / k) * (((l * 2.0) / Math.sin(k)) / (k * (k * t)));
}
def code(t, l, k): return (l / k) * (((l * 2.0) / math.sin(k)) / (k * (k * t)))
function code(t, l, k) return Float64(Float64(l / k) * Float64(Float64(Float64(l * 2.0) / sin(k)) / Float64(k * Float64(k * t)))) end
function tmp = code(t, l, k) tmp = (l / k) * (((l * 2.0) / sin(k)) / (k * (k * t))); end
code[t_, l_, k_] := N[(N[(l / k), $MachinePrecision] * N[(N[(N[(l * 2.0), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\ell}{k} \cdot \frac{\frac{\ell \cdot 2}{\sin k}}{k \cdot \left(k \cdot t\right)}
\end{array}
Initial program 30.1%
associate-*l*30.1%
associate-*l*30.2%
associate-/r*30.1%
associate-/r/30.8%
*-commutative30.8%
times-frac31.3%
+-commutative31.3%
associate--l+39.1%
metadata-eval39.1%
+-rgt-identity39.1%
times-frac43.9%
Simplified43.9%
Taylor expanded in t around 0 78.4%
unpow278.4%
Simplified78.4%
associate-*l/78.4%
associate-*l*84.1%
Applied egg-rr84.1%
associate-*l/84.1%
associate-*r*78.4%
unpow278.4%
associate-/r*78.4%
unpow278.4%
associate-*r*83.1%
*-commutative83.1%
unpow283.1%
associate-/r*83.1%
unpow283.1%
associate-*r*90.2%
associate-*l/90.2%
associate-*r/90.2%
Simplified90.2%
Taylor expanded in k around 0 75.9%
Final simplification75.9%
(FPCore (t l k) :precision binary64 (* (/ 2.0 (* k (* k t))) (* l (/ l (* k k)))))
double code(double t, double l, double k) {
return (2.0 / (k * (k * t))) * (l * (l / (k * k)));
}
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 / (k * (k * t))) * (l * (l / (k * k)))
end function
public static double code(double t, double l, double k) {
return (2.0 / (k * (k * t))) * (l * (l / (k * k)));
}
def code(t, l, k): return (2.0 / (k * (k * t))) * (l * (l / (k * k)))
function code(t, l, k) return Float64(Float64(2.0 / Float64(k * Float64(k * t))) * Float64(l * Float64(l / Float64(k * k)))) end
function tmp = code(t, l, k) tmp = (2.0 / (k * (k * t))) * (l * (l / (k * k))); end
code[t_, l_, k_] := N[(N[(2.0 / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{k \cdot \left(k \cdot t\right)} \cdot \left(\ell \cdot \frac{\ell}{k \cdot k}\right)
\end{array}
Initial program 30.1%
associate-*l*30.1%
associate-*l*30.2%
associate-/r*30.1%
associate-/r/30.8%
*-commutative30.8%
times-frac31.3%
+-commutative31.3%
associate--l+39.1%
metadata-eval39.1%
+-rgt-identity39.1%
times-frac43.9%
Simplified43.9%
Taylor expanded in t around 0 78.4%
unpow278.4%
Simplified78.4%
Taylor expanded in k around 0 66.3%
unpow266.3%
unpow266.3%
Simplified66.3%
Taylor expanded in l around 0 66.3%
*-rgt-identity66.3%
associate-*r/66.3%
unpow266.3%
unpow266.3%
associate-*l*71.5%
unpow271.5%
associate-*r/71.5%
*-rgt-identity71.5%
unpow271.5%
Simplified71.5%
Taylor expanded in k around 0 71.5%
unpow271.5%
associate-*r*71.6%
Simplified71.6%
Final simplification71.6%
(FPCore (t l k) :precision binary64 (/ (* 2.0 (* l (/ (/ l k) k))) (* k (* k t))))
double code(double t, double l, double k) {
return (2.0 * (l * ((l / k) / k))) / (k * (k * t));
}
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 * (l * ((l / k) / k))) / (k * (k * t))
end function
public static double code(double t, double l, double k) {
return (2.0 * (l * ((l / k) / k))) / (k * (k * t));
}
def code(t, l, k): return (2.0 * (l * ((l / k) / k))) / (k * (k * t))
function code(t, l, k) return Float64(Float64(2.0 * Float64(l * Float64(Float64(l / k) / k))) / Float64(k * Float64(k * t))) end
function tmp = code(t, l, k) tmp = (2.0 * (l * ((l / k) / k))) / (k * (k * t)); end
code[t_, l_, k_] := N[(N[(2.0 * N[(l * N[(N[(l / k), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2 \cdot \left(\ell \cdot \frac{\frac{\ell}{k}}{k}\right)}{k \cdot \left(k \cdot t\right)}
\end{array}
Initial program 30.1%
associate-*l*30.1%
associate-*l*30.2%
associate-/r*30.1%
associate-/r/30.8%
*-commutative30.8%
times-frac31.3%
+-commutative31.3%
associate--l+39.1%
metadata-eval39.1%
+-rgt-identity39.1%
times-frac43.9%
Simplified43.9%
Taylor expanded in t around 0 78.4%
unpow278.4%
Simplified78.4%
Taylor expanded in k around 0 66.3%
unpow266.3%
unpow266.3%
Simplified66.3%
Taylor expanded in l around 0 66.3%
*-rgt-identity66.3%
associate-*r/66.3%
unpow266.3%
unpow266.3%
associate-*l*71.5%
unpow271.5%
associate-*r/71.5%
*-rgt-identity71.5%
unpow271.5%
Simplified71.5%
associate-*r*71.6%
associate-*l/71.5%
associate-/r*73.4%
Applied egg-rr73.4%
Final simplification73.4%
herbie shell --seed 2023240
(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))))