
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) + 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) + 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) + 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) + 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) + 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) + 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) + 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) + 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) + 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) + 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}
\end{array}
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (* l (cos k))))
(*
t_s
(if (<= t_m 9.2e+86)
(/
2.0
(*
(/ (sin k) l)
(*
t_m
(+
(/ (* 2.0 (* t_m (* t_m (sin k)))) t_2)
(* (* k k) (/ (sin k) t_2))))))
(/
(/
(/ 2.0 t_m)
(* (sin k) (* (+ 2.0 (/ k (* t_m (/ t_m k)))) (* (tan k) (/ t_m l)))))
(/ t_m l))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = l * cos(k);
double tmp;
if (t_m <= 9.2e+86) {
tmp = 2.0 / ((sin(k) / l) * (t_m * (((2.0 * (t_m * (t_m * sin(k)))) / t_2) + ((k * k) * (sin(k) / t_2)))));
} else {
tmp = ((2.0 / t_m) / (sin(k) * ((2.0 + (k / (t_m * (t_m / k)))) * (tan(k) * (t_m / l))))) / (t_m / l);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_2
real(8) :: tmp
t_2 = l * cos(k)
if (t_m <= 9.2d+86) then
tmp = 2.0d0 / ((sin(k) / l) * (t_m * (((2.0d0 * (t_m * (t_m * sin(k)))) / t_2) + ((k * k) * (sin(k) / t_2)))))
else
tmp = ((2.0d0 / t_m) / (sin(k) * ((2.0d0 + (k / (t_m * (t_m / k)))) * (tan(k) * (t_m / l))))) / (t_m / l)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = l * Math.cos(k);
double tmp;
if (t_m <= 9.2e+86) {
tmp = 2.0 / ((Math.sin(k) / l) * (t_m * (((2.0 * (t_m * (t_m * Math.sin(k)))) / t_2) + ((k * k) * (Math.sin(k) / t_2)))));
} else {
tmp = ((2.0 / t_m) / (Math.sin(k) * ((2.0 + (k / (t_m * (t_m / k)))) * (Math.tan(k) * (t_m / l))))) / (t_m / l);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): t_2 = l * math.cos(k) tmp = 0 if t_m <= 9.2e+86: tmp = 2.0 / ((math.sin(k) / l) * (t_m * (((2.0 * (t_m * (t_m * math.sin(k)))) / t_2) + ((k * k) * (math.sin(k) / t_2))))) else: tmp = ((2.0 / t_m) / (math.sin(k) * ((2.0 + (k / (t_m * (t_m / k)))) * (math.tan(k) * (t_m / l))))) / (t_m / l) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(l * cos(k)) tmp = 0.0 if (t_m <= 9.2e+86) tmp = Float64(2.0 / Float64(Float64(sin(k) / l) * Float64(t_m * Float64(Float64(Float64(2.0 * Float64(t_m * Float64(t_m * sin(k)))) / t_2) + Float64(Float64(k * k) * Float64(sin(k) / t_2)))))); else tmp = Float64(Float64(Float64(2.0 / t_m) / Float64(sin(k) * Float64(Float64(2.0 + Float64(k / Float64(t_m * Float64(t_m / k)))) * Float64(tan(k) * Float64(t_m / l))))) / Float64(t_m / l)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) t_2 = l * cos(k); tmp = 0.0; if (t_m <= 9.2e+86) tmp = 2.0 / ((sin(k) / l) * (t_m * (((2.0 * (t_m * (t_m * sin(k)))) / t_2) + ((k * k) * (sin(k) / t_2))))); else tmp = ((2.0 / t_m) / (sin(k) * ((2.0 + (k / (t_m * (t_m / k)))) * (tan(k) * (t_m / l))))) / (t_m / l); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 9.2e+86], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m * N[(N[(N[(2.0 * N[(t$95$m * N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision] + N[(N[(k * k), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(2.0 / t$95$m), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[(N[(2.0 + N[(k / N[(t$95$m * N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \ell \cdot \cos k\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 9.2 \cdot 10^{+86}:\\
\;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \left(t\_m \cdot \left(\frac{2 \cdot \left(t\_m \cdot \left(t\_m \cdot \sin k\right)\right)}{t\_2} + \left(k \cdot k\right) \cdot \frac{\sin k}{t\_2}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{2}{t\_m}}{\sin k \cdot \left(\left(2 + \frac{k}{t\_m \cdot \frac{t\_m}{k}}\right) \cdot \left(\tan k \cdot \frac{t\_m}{\ell}\right)\right)}}{\frac{t\_m}{\ell}}\\
\end{array}
\end{array}
\end{array}
if t < 9.19999999999999958e86Initial program 55.1%
/-lowering-/.f64N/A
associate-*l*N/A
associate-*l/N/A
associate-/l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Simplified51.1%
*-commutativeN/A
times-fracN/A
associate-*l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
Applied egg-rr66.4%
Taylor expanded in t around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified84.4%
if 9.19999999999999958e86 < t Initial program 60.8%
/-lowering-/.f64N/A
associate-*l*N/A
associate-*l/N/A
associate-/l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Simplified54.7%
associate-*l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr61.9%
associate-*l*N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
Applied egg-rr78.6%
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
Applied egg-rr89.3%
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
Applied egg-rr92.8%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 4.8e-85)
(/ 2.0 (* (/ (sin k) l) (* (* k k) (/ (* t_m (sin k)) (* l (cos k))))))
(/
(/ (/ 2.0 (* t_m (/ t_m l))) (* (sin k) (+ 2.0 (/ k (* t_m (/ t_m k))))))
(* (tan k) (/ t_m l))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 4.8e-85) {
tmp = 2.0 / ((sin(k) / l) * ((k * k) * ((t_m * sin(k)) / (l * cos(k)))));
} else {
tmp = ((2.0 / (t_m * (t_m / l))) / (sin(k) * (2.0 + (k / (t_m * (t_m / k)))))) / (tan(k) * (t_m / l));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 4.8d-85) then
tmp = 2.0d0 / ((sin(k) / l) * ((k * k) * ((t_m * sin(k)) / (l * cos(k)))))
else
tmp = ((2.0d0 / (t_m * (t_m / l))) / (sin(k) * (2.0d0 + (k / (t_m * (t_m / k)))))) / (tan(k) * (t_m / l))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 4.8e-85) {
tmp = 2.0 / ((Math.sin(k) / l) * ((k * k) * ((t_m * Math.sin(k)) / (l * Math.cos(k)))));
} else {
tmp = ((2.0 / (t_m * (t_m / l))) / (Math.sin(k) * (2.0 + (k / (t_m * (t_m / k)))))) / (Math.tan(k) * (t_m / l));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 4.8e-85: tmp = 2.0 / ((math.sin(k) / l) * ((k * k) * ((t_m * math.sin(k)) / (l * math.cos(k))))) else: tmp = ((2.0 / (t_m * (t_m / l))) / (math.sin(k) * (2.0 + (k / (t_m * (t_m / k)))))) / (math.tan(k) * (t_m / l)) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 4.8e-85) tmp = Float64(2.0 / Float64(Float64(sin(k) / l) * Float64(Float64(k * k) * Float64(Float64(t_m * sin(k)) / Float64(l * cos(k)))))); else tmp = Float64(Float64(Float64(2.0 / Float64(t_m * Float64(t_m / l))) / Float64(sin(k) * Float64(2.0 + Float64(k / Float64(t_m * Float64(t_m / k)))))) / Float64(tan(k) * Float64(t_m / l))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 4.8e-85) tmp = 2.0 / ((sin(k) / l) * ((k * k) * ((t_m * sin(k)) / (l * cos(k))))); else tmp = ((2.0 / (t_m * (t_m / l))) / (sin(k) * (2.0 + (k / (t_m * (t_m / k)))))) / (tan(k) * (t_m / l)); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 4.8e-85], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] * N[(N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(2.0 / N[(t$95$m * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[(2.0 + N[(k / N[(t$95$m * N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Tan[k], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.8 \cdot 10^{-85}:\\
\;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \left(\left(k \cdot k\right) \cdot \frac{t\_m \cdot \sin k}{\ell \cdot \cos k}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{2}{t\_m \cdot \frac{t\_m}{\ell}}}{\sin k \cdot \left(2 + \frac{k}{t\_m \cdot \frac{t\_m}{k}}\right)}}{\tan k \cdot \frac{t\_m}{\ell}}\\
\end{array}
\end{array}
if t < 4.8000000000000001e-85Initial program 52.1%
/-lowering-/.f64N/A
associate-*l*N/A
associate-*l/N/A
associate-/l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Simplified47.5%
*-commutativeN/A
times-fracN/A
associate-*l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
Applied egg-rr63.7%
Taylor expanded in k around inf
associate-/l*N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f6468.7%
Simplified68.7%
if 4.8000000000000001e-85 < t Initial program 66.1%
/-lowering-/.f64N/A
associate-*l*N/A
associate-*l/N/A
associate-/l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Simplified61.9%
associate-*l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr65.8%
associate-*l*N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
Applied egg-rr79.8%
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
Applied egg-rr87.3%
associate-/r*N/A
associate-/l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
Applied egg-rr91.3%
Final simplification75.6%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.85e-115)
(/
(/ (/ 2.0 t_m) (/ (* k k) l))
(/
(+
(* (* k k) (+ 1.0 (* (* t_m t_m) 0.3333333333333333)))
(* 2.0 (* t_m t_m)))
l))
(if (<= t_m 1.9e+92)
(/
2.0
(*
(/ (sin k) l)
(*
(* (+ 2.0 (/ (/ k t_m) (/ t_m k))) (/ (tan k) l))
(* t_m (* t_m t_m)))))
(/
(/
(/ 2.0 t_m)
(* (sin k) (* (+ 2.0 (/ k (* t_m (/ t_m k)))) (* (tan k) (/ t_m l)))))
(/ t_m l))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.85e-115) {
tmp = ((2.0 / t_m) / ((k * k) / l)) / ((((k * k) * (1.0 + ((t_m * t_m) * 0.3333333333333333))) + (2.0 * (t_m * t_m))) / l);
} else if (t_m <= 1.9e+92) {
tmp = 2.0 / ((sin(k) / l) * (((2.0 + ((k / t_m) / (t_m / k))) * (tan(k) / l)) * (t_m * (t_m * t_m))));
} else {
tmp = ((2.0 / t_m) / (sin(k) * ((2.0 + (k / (t_m * (t_m / k)))) * (tan(k) * (t_m / l))))) / (t_m / l);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 1.85d-115) then
tmp = ((2.0d0 / t_m) / ((k * k) / l)) / ((((k * k) * (1.0d0 + ((t_m * t_m) * 0.3333333333333333d0))) + (2.0d0 * (t_m * t_m))) / l)
else if (t_m <= 1.9d+92) then
tmp = 2.0d0 / ((sin(k) / l) * (((2.0d0 + ((k / t_m) / (t_m / k))) * (tan(k) / l)) * (t_m * (t_m * t_m))))
else
tmp = ((2.0d0 / t_m) / (sin(k) * ((2.0d0 + (k / (t_m * (t_m / k)))) * (tan(k) * (t_m / l))))) / (t_m / l)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.85e-115) {
tmp = ((2.0 / t_m) / ((k * k) / l)) / ((((k * k) * (1.0 + ((t_m * t_m) * 0.3333333333333333))) + (2.0 * (t_m * t_m))) / l);
} else if (t_m <= 1.9e+92) {
tmp = 2.0 / ((Math.sin(k) / l) * (((2.0 + ((k / t_m) / (t_m / k))) * (Math.tan(k) / l)) * (t_m * (t_m * t_m))));
} else {
tmp = ((2.0 / t_m) / (Math.sin(k) * ((2.0 + (k / (t_m * (t_m / k)))) * (Math.tan(k) * (t_m / l))))) / (t_m / l);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 1.85e-115: tmp = ((2.0 / t_m) / ((k * k) / l)) / ((((k * k) * (1.0 + ((t_m * t_m) * 0.3333333333333333))) + (2.0 * (t_m * t_m))) / l) elif t_m <= 1.9e+92: tmp = 2.0 / ((math.sin(k) / l) * (((2.0 + ((k / t_m) / (t_m / k))) * (math.tan(k) / l)) * (t_m * (t_m * t_m)))) else: tmp = ((2.0 / t_m) / (math.sin(k) * ((2.0 + (k / (t_m * (t_m / k)))) * (math.tan(k) * (t_m / l))))) / (t_m / l) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.85e-115) tmp = Float64(Float64(Float64(2.0 / t_m) / Float64(Float64(k * k) / l)) / Float64(Float64(Float64(Float64(k * k) * Float64(1.0 + Float64(Float64(t_m * t_m) * 0.3333333333333333))) + Float64(2.0 * Float64(t_m * t_m))) / l)); elseif (t_m <= 1.9e+92) tmp = Float64(2.0 / Float64(Float64(sin(k) / l) * Float64(Float64(Float64(2.0 + Float64(Float64(k / t_m) / Float64(t_m / k))) * Float64(tan(k) / l)) * Float64(t_m * Float64(t_m * t_m))))); else tmp = Float64(Float64(Float64(2.0 / t_m) / Float64(sin(k) * Float64(Float64(2.0 + Float64(k / Float64(t_m * Float64(t_m / k)))) * Float64(tan(k) * Float64(t_m / l))))) / Float64(t_m / l)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 1.85e-115) tmp = ((2.0 / t_m) / ((k * k) / l)) / ((((k * k) * (1.0 + ((t_m * t_m) * 0.3333333333333333))) + (2.0 * (t_m * t_m))) / l); elseif (t_m <= 1.9e+92) tmp = 2.0 / ((sin(k) / l) * (((2.0 + ((k / t_m) / (t_m / k))) * (tan(k) / l)) * (t_m * (t_m * t_m)))); else tmp = ((2.0 / t_m) / (sin(k) * ((2.0 + (k / (t_m * (t_m / k)))) * (tan(k) * (t_m / l))))) / (t_m / l); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.85e-115], N[(N[(N[(2.0 / t$95$m), $MachinePrecision] / N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(k * k), $MachinePrecision] * N[(1.0 + N[(N[(t$95$m * t$95$m), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.9e+92], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * N[(N[(N[(2.0 + N[(N[(k / t$95$m), $MachinePrecision] / N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(2.0 / t$95$m), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[(N[(2.0 + N[(k / N[(t$95$m * N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.85 \cdot 10^{-115}:\\
\;\;\;\;\frac{\frac{\frac{2}{t\_m}}{\frac{k \cdot k}{\ell}}}{\frac{\left(k \cdot k\right) \cdot \left(1 + \left(t\_m \cdot t\_m\right) \cdot 0.3333333333333333\right) + 2 \cdot \left(t\_m \cdot t\_m\right)}{\ell}}\\
\mathbf{elif}\;t\_m \leq 1.9 \cdot 10^{+92}:\\
\;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \left(\left(\left(2 + \frac{\frac{k}{t\_m}}{\frac{t\_m}{k}}\right) \cdot \frac{\tan k}{\ell}\right) \cdot \left(t\_m \cdot \left(t\_m \cdot t\_m\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{2}{t\_m}}{\sin k \cdot \left(\left(2 + \frac{k}{t\_m \cdot \frac{t\_m}{k}}\right) \cdot \left(\tan k \cdot \frac{t\_m}{\ell}\right)\right)}}{\frac{t\_m}{\ell}}\\
\end{array}
\end{array}
if t < 1.85e-115Initial program 51.8%
/-lowering-/.f64N/A
associate-*l*N/A
associate-*l/N/A
associate-/l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Simplified46.5%
associate-*l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr50.6%
Taylor expanded in k around 0
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-lft-inN/A
rgt-mult-inverseN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6458.0%
Simplified58.0%
times-fracN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr67.3%
if 1.85e-115 < t < 1.9e92Initial program 71.5%
/-lowering-/.f64N/A
associate-*l*N/A
associate-*l/N/A
associate-/l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Simplified76.9%
*-commutativeN/A
times-fracN/A
associate-*l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
Applied egg-rr85.3%
if 1.9e92 < t Initial program 61.3%
/-lowering-/.f64N/A
associate-*l*N/A
associate-*l/N/A
associate-/l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Simplified53.1%
associate-*l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr59.0%
associate-*l*N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
Applied egg-rr77.0%
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
Applied egg-rr88.5%
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
Applied egg-rr92.3%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.85e-115)
(/
(/ (/ 2.0 t_m) (/ (* k k) l))
(/
(+
(* (* k k) (+ 1.0 (* (* t_m t_m) 0.3333333333333333)))
(* 2.0 (* t_m t_m)))
l))
(if (<= t_m 3.6e+92)
(/
2.0
(*
(/ (sin k) l)
(*
(* (+ 2.0 (/ (/ k t_m) (/ t_m k))) (/ (tan k) l))
(* t_m (* t_m t_m)))))
(*
l
(/
(/ 2.0 t_m)
(*
(* (sin k) (/ t_m l))
(* (+ 2.0 (/ k (* t_m (/ t_m k)))) (* t_m (tan k))))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.85e-115) {
tmp = ((2.0 / t_m) / ((k * k) / l)) / ((((k * k) * (1.0 + ((t_m * t_m) * 0.3333333333333333))) + (2.0 * (t_m * t_m))) / l);
} else if (t_m <= 3.6e+92) {
tmp = 2.0 / ((sin(k) / l) * (((2.0 + ((k / t_m) / (t_m / k))) * (tan(k) / l)) * (t_m * (t_m * t_m))));
} else {
tmp = l * ((2.0 / t_m) / ((sin(k) * (t_m / l)) * ((2.0 + (k / (t_m * (t_m / k)))) * (t_m * tan(k)))));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 1.85d-115) then
tmp = ((2.0d0 / t_m) / ((k * k) / l)) / ((((k * k) * (1.0d0 + ((t_m * t_m) * 0.3333333333333333d0))) + (2.0d0 * (t_m * t_m))) / l)
else if (t_m <= 3.6d+92) then
tmp = 2.0d0 / ((sin(k) / l) * (((2.0d0 + ((k / t_m) / (t_m / k))) * (tan(k) / l)) * (t_m * (t_m * t_m))))
else
tmp = l * ((2.0d0 / t_m) / ((sin(k) * (t_m / l)) * ((2.0d0 + (k / (t_m * (t_m / k)))) * (t_m * tan(k)))))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.85e-115) {
tmp = ((2.0 / t_m) / ((k * k) / l)) / ((((k * k) * (1.0 + ((t_m * t_m) * 0.3333333333333333))) + (2.0 * (t_m * t_m))) / l);
} else if (t_m <= 3.6e+92) {
tmp = 2.0 / ((Math.sin(k) / l) * (((2.0 + ((k / t_m) / (t_m / k))) * (Math.tan(k) / l)) * (t_m * (t_m * t_m))));
} else {
tmp = l * ((2.0 / t_m) / ((Math.sin(k) * (t_m / l)) * ((2.0 + (k / (t_m * (t_m / k)))) * (t_m * Math.tan(k)))));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 1.85e-115: tmp = ((2.0 / t_m) / ((k * k) / l)) / ((((k * k) * (1.0 + ((t_m * t_m) * 0.3333333333333333))) + (2.0 * (t_m * t_m))) / l) elif t_m <= 3.6e+92: tmp = 2.0 / ((math.sin(k) / l) * (((2.0 + ((k / t_m) / (t_m / k))) * (math.tan(k) / l)) * (t_m * (t_m * t_m)))) else: tmp = l * ((2.0 / t_m) / ((math.sin(k) * (t_m / l)) * ((2.0 + (k / (t_m * (t_m / k)))) * (t_m * math.tan(k))))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.85e-115) tmp = Float64(Float64(Float64(2.0 / t_m) / Float64(Float64(k * k) / l)) / Float64(Float64(Float64(Float64(k * k) * Float64(1.0 + Float64(Float64(t_m * t_m) * 0.3333333333333333))) + Float64(2.0 * Float64(t_m * t_m))) / l)); elseif (t_m <= 3.6e+92) tmp = Float64(2.0 / Float64(Float64(sin(k) / l) * Float64(Float64(Float64(2.0 + Float64(Float64(k / t_m) / Float64(t_m / k))) * Float64(tan(k) / l)) * Float64(t_m * Float64(t_m * t_m))))); else tmp = Float64(l * Float64(Float64(2.0 / t_m) / Float64(Float64(sin(k) * Float64(t_m / l)) * Float64(Float64(2.0 + Float64(k / Float64(t_m * Float64(t_m / k)))) * Float64(t_m * tan(k)))))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 1.85e-115) tmp = ((2.0 / t_m) / ((k * k) / l)) / ((((k * k) * (1.0 + ((t_m * t_m) * 0.3333333333333333))) + (2.0 * (t_m * t_m))) / l); elseif (t_m <= 3.6e+92) tmp = 2.0 / ((sin(k) / l) * (((2.0 + ((k / t_m) / (t_m / k))) * (tan(k) / l)) * (t_m * (t_m * t_m)))); else tmp = l * ((2.0 / t_m) / ((sin(k) * (t_m / l)) * ((2.0 + (k / (t_m * (t_m / k)))) * (t_m * tan(k))))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.85e-115], N[(N[(N[(2.0 / t$95$m), $MachinePrecision] / N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(k * k), $MachinePrecision] * N[(1.0 + N[(N[(t$95$m * t$95$m), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.6e+92], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * N[(N[(N[(2.0 + N[(N[(k / t$95$m), $MachinePrecision] / N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(2.0 / t$95$m), $MachinePrecision] / N[(N[(N[Sin[k], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 + N[(k / N[(t$95$m * N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.85 \cdot 10^{-115}:\\
\;\;\;\;\frac{\frac{\frac{2}{t\_m}}{\frac{k \cdot k}{\ell}}}{\frac{\left(k \cdot k\right) \cdot \left(1 + \left(t\_m \cdot t\_m\right) \cdot 0.3333333333333333\right) + 2 \cdot \left(t\_m \cdot t\_m\right)}{\ell}}\\
\mathbf{elif}\;t\_m \leq 3.6 \cdot 10^{+92}:\\
\;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \left(\left(\left(2 + \frac{\frac{k}{t\_m}}{\frac{t\_m}{k}}\right) \cdot \frac{\tan k}{\ell}\right) \cdot \left(t\_m \cdot \left(t\_m \cdot t\_m\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\frac{2}{t\_m}}{\left(\sin k \cdot \frac{t\_m}{\ell}\right) \cdot \left(\left(2 + \frac{k}{t\_m \cdot \frac{t\_m}{k}}\right) \cdot \left(t\_m \cdot \tan k\right)\right)}\\
\end{array}
\end{array}
if t < 1.85e-115Initial program 51.8%
/-lowering-/.f64N/A
associate-*l*N/A
associate-*l/N/A
associate-/l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Simplified46.5%
associate-*l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr50.6%
Taylor expanded in k around 0
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-lft-inN/A
rgt-mult-inverseN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6458.0%
Simplified58.0%
times-fracN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr67.3%
if 1.85e-115 < t < 3.6e92Initial program 72.3%
/-lowering-/.f64N/A
associate-*l*N/A
associate-*l/N/A
associate-/l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Simplified74.8%
*-commutativeN/A
times-fracN/A
associate-*l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
Applied egg-rr85.7%
if 3.6e92 < t Initial program 60.6%
/-lowering-/.f64N/A
associate-*l*N/A
associate-*l/N/A
associate-/l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Simplified54.1%
associate-*l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr58.2%
associate-*l*N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
Applied egg-rr76.5%
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
Applied egg-rr88.3%
associate-*r/N/A
associate-/r/N/A
*-lowering-*.f64N/A
Applied egg-rr90.5%
Final simplification74.3%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 4.9e-116)
(/
(/ (/ 2.0 t_m) (/ (* k k) l))
(/
(+
(* (* k k) (+ 1.0 (* (* t_m t_m) 0.3333333333333333)))
(* 2.0 (* t_m t_m)))
l))
(/
(/ (/ 2.0 (* t_m (/ t_m l))) (* (sin k) (+ 2.0 (/ k (* t_m (/ t_m k))))))
(* (tan k) (/ t_m l))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 4.9e-116) {
tmp = ((2.0 / t_m) / ((k * k) / l)) / ((((k * k) * (1.0 + ((t_m * t_m) * 0.3333333333333333))) + (2.0 * (t_m * t_m))) / l);
} else {
tmp = ((2.0 / (t_m * (t_m / l))) / (sin(k) * (2.0 + (k / (t_m * (t_m / k)))))) / (tan(k) * (t_m / l));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 4.9d-116) then
tmp = ((2.0d0 / t_m) / ((k * k) / l)) / ((((k * k) * (1.0d0 + ((t_m * t_m) * 0.3333333333333333d0))) + (2.0d0 * (t_m * t_m))) / l)
else
tmp = ((2.0d0 / (t_m * (t_m / l))) / (sin(k) * (2.0d0 + (k / (t_m * (t_m / k)))))) / (tan(k) * (t_m / l))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 4.9e-116) {
tmp = ((2.0 / t_m) / ((k * k) / l)) / ((((k * k) * (1.0 + ((t_m * t_m) * 0.3333333333333333))) + (2.0 * (t_m * t_m))) / l);
} else {
tmp = ((2.0 / (t_m * (t_m / l))) / (Math.sin(k) * (2.0 + (k / (t_m * (t_m / k)))))) / (Math.tan(k) * (t_m / l));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 4.9e-116: tmp = ((2.0 / t_m) / ((k * k) / l)) / ((((k * k) * (1.0 + ((t_m * t_m) * 0.3333333333333333))) + (2.0 * (t_m * t_m))) / l) else: tmp = ((2.0 / (t_m * (t_m / l))) / (math.sin(k) * (2.0 + (k / (t_m * (t_m / k)))))) / (math.tan(k) * (t_m / l)) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 4.9e-116) tmp = Float64(Float64(Float64(2.0 / t_m) / Float64(Float64(k * k) / l)) / Float64(Float64(Float64(Float64(k * k) * Float64(1.0 + Float64(Float64(t_m * t_m) * 0.3333333333333333))) + Float64(2.0 * Float64(t_m * t_m))) / l)); else tmp = Float64(Float64(Float64(2.0 / Float64(t_m * Float64(t_m / l))) / Float64(sin(k) * Float64(2.0 + Float64(k / Float64(t_m * Float64(t_m / k)))))) / Float64(tan(k) * Float64(t_m / l))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 4.9e-116) tmp = ((2.0 / t_m) / ((k * k) / l)) / ((((k * k) * (1.0 + ((t_m * t_m) * 0.3333333333333333))) + (2.0 * (t_m * t_m))) / l); else tmp = ((2.0 / (t_m * (t_m / l))) / (sin(k) * (2.0 + (k / (t_m * (t_m / k)))))) / (tan(k) * (t_m / l)); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 4.9e-116], N[(N[(N[(2.0 / t$95$m), $MachinePrecision] / N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(k * k), $MachinePrecision] * N[(1.0 + N[(N[(t$95$m * t$95$m), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(N[(N[(2.0 / N[(t$95$m * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[(2.0 + N[(k / N[(t$95$m * N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Tan[k], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.9 \cdot 10^{-116}:\\
\;\;\;\;\frac{\frac{\frac{2}{t\_m}}{\frac{k \cdot k}{\ell}}}{\frac{\left(k \cdot k\right) \cdot \left(1 + \left(t\_m \cdot t\_m\right) \cdot 0.3333333333333333\right) + 2 \cdot \left(t\_m \cdot t\_m\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{2}{t\_m \cdot \frac{t\_m}{\ell}}}{\sin k \cdot \left(2 + \frac{k}{t\_m \cdot \frac{t\_m}{k}}\right)}}{\tan k \cdot \frac{t\_m}{\ell}}\\
\end{array}
\end{array}
if t < 4.89999999999999977e-116Initial program 51.8%
/-lowering-/.f64N/A
associate-*l*N/A
associate-*l/N/A
associate-/l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Simplified46.5%
associate-*l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr50.6%
Taylor expanded in k around 0
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-lft-inN/A
rgt-mult-inverseN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6458.0%
Simplified58.0%
times-fracN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr67.3%
if 4.89999999999999977e-116 < t Initial program 65.4%
/-lowering-/.f64N/A
associate-*l*N/A
associate-*l/N/A
associate-/l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Simplified62.6%
associate-*l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr66.2%
associate-*l*N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
Applied egg-rr79.1%
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
Applied egg-rr86.0%
associate-/r*N/A
associate-/l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
Applied egg-rr89.6%
Final simplification74.7%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 5.8e-57)
(/
(/ (/ 2.0 t_m) (/ (* k k) l))
(/
(+
(* (* k k) (+ 1.0 (* (* t_m t_m) 0.3333333333333333)))
(* 2.0 (* t_m t_m)))
l))
(*
l
(/
(/ 2.0 t_m)
(*
(* (sin k) (/ t_m l))
(* (+ 2.0 (/ k (* t_m (/ t_m k)))) (* t_m (tan k)))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 5.8e-57) {
tmp = ((2.0 / t_m) / ((k * k) / l)) / ((((k * k) * (1.0 + ((t_m * t_m) * 0.3333333333333333))) + (2.0 * (t_m * t_m))) / l);
} else {
tmp = l * ((2.0 / t_m) / ((sin(k) * (t_m / l)) * ((2.0 + (k / (t_m * (t_m / k)))) * (t_m * tan(k)))));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 5.8d-57) then
tmp = ((2.0d0 / t_m) / ((k * k) / l)) / ((((k * k) * (1.0d0 + ((t_m * t_m) * 0.3333333333333333d0))) + (2.0d0 * (t_m * t_m))) / l)
else
tmp = l * ((2.0d0 / t_m) / ((sin(k) * (t_m / l)) * ((2.0d0 + (k / (t_m * (t_m / k)))) * (t_m * tan(k)))))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 5.8e-57) {
tmp = ((2.0 / t_m) / ((k * k) / l)) / ((((k * k) * (1.0 + ((t_m * t_m) * 0.3333333333333333))) + (2.0 * (t_m * t_m))) / l);
} else {
tmp = l * ((2.0 / t_m) / ((Math.sin(k) * (t_m / l)) * ((2.0 + (k / (t_m * (t_m / k)))) * (t_m * Math.tan(k)))));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 5.8e-57: tmp = ((2.0 / t_m) / ((k * k) / l)) / ((((k * k) * (1.0 + ((t_m * t_m) * 0.3333333333333333))) + (2.0 * (t_m * t_m))) / l) else: tmp = l * ((2.0 / t_m) / ((math.sin(k) * (t_m / l)) * ((2.0 + (k / (t_m * (t_m / k)))) * (t_m * math.tan(k))))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 5.8e-57) tmp = Float64(Float64(Float64(2.0 / t_m) / Float64(Float64(k * k) / l)) / Float64(Float64(Float64(Float64(k * k) * Float64(1.0 + Float64(Float64(t_m * t_m) * 0.3333333333333333))) + Float64(2.0 * Float64(t_m * t_m))) / l)); else tmp = Float64(l * Float64(Float64(2.0 / t_m) / Float64(Float64(sin(k) * Float64(t_m / l)) * Float64(Float64(2.0 + Float64(k / Float64(t_m * Float64(t_m / k)))) * Float64(t_m * tan(k)))))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 5.8e-57) tmp = ((2.0 / t_m) / ((k * k) / l)) / ((((k * k) * (1.0 + ((t_m * t_m) * 0.3333333333333333))) + (2.0 * (t_m * t_m))) / l); else tmp = l * ((2.0 / t_m) / ((sin(k) * (t_m / l)) * ((2.0 + (k / (t_m * (t_m / k)))) * (t_m * tan(k))))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 5.8e-57], N[(N[(N[(2.0 / t$95$m), $MachinePrecision] / N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(k * k), $MachinePrecision] * N[(1.0 + N[(N[(t$95$m * t$95$m), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(2.0 / t$95$m), $MachinePrecision] / N[(N[(N[Sin[k], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 + N[(k / N[(t$95$m * N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 5.8 \cdot 10^{-57}:\\
\;\;\;\;\frac{\frac{\frac{2}{t\_m}}{\frac{k \cdot k}{\ell}}}{\frac{\left(k \cdot k\right) \cdot \left(1 + \left(t\_m \cdot t\_m\right) \cdot 0.3333333333333333\right) + 2 \cdot \left(t\_m \cdot t\_m\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\frac{2}{t\_m}}{\left(\sin k \cdot \frac{t\_m}{\ell}\right) \cdot \left(\left(2 + \frac{k}{t\_m \cdot \frac{t\_m}{k}}\right) \cdot \left(t\_m \cdot \tan k\right)\right)}\\
\end{array}
\end{array}
if t < 5.8000000000000005e-57Initial program 52.0%
/-lowering-/.f64N/A
associate-*l*N/A
associate-*l/N/A
associate-/l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Simplified47.5%
associate-*l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr51.4%
Taylor expanded in k around 0
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-lft-inN/A
rgt-mult-inverseN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6458.5%
Simplified58.5%
times-fracN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr67.3%
if 5.8000000000000005e-57 < t Initial program 66.5%
/-lowering-/.f64N/A
associate-*l*N/A
associate-*l/N/A
associate-/l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Simplified62.1%
associate-*l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr66.1%
associate-*l*N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
Applied egg-rr80.5%
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
Applied egg-rr88.3%
associate-*r/N/A
associate-/r/N/A
*-lowering-*.f64N/A
Applied egg-rr89.9%
Final simplification74.0%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1e-77)
(/
(/ (/ 2.0 t_m) (/ (* k k) l))
(/
(+
(* (* k k) (+ 1.0 (* (* t_m t_m) 0.3333333333333333)))
(* 2.0 (* t_m t_m)))
l))
(if (<= t_m 6.4e+152)
(* (/ (/ l (* t_m k)) (* t_m t_m)) (/ l k))
(/
(/ 2.0 t_m)
(*
(/ t_m l)
(/ (* (* k (+ 2.0 (/ (* k (/ k t_m)) t_m))) (* t_m (tan k))) l)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1e-77) {
tmp = ((2.0 / t_m) / ((k * k) / l)) / ((((k * k) * (1.0 + ((t_m * t_m) * 0.3333333333333333))) + (2.0 * (t_m * t_m))) / l);
} else if (t_m <= 6.4e+152) {
tmp = ((l / (t_m * k)) / (t_m * t_m)) * (l / k);
} else {
tmp = (2.0 / t_m) / ((t_m / l) * (((k * (2.0 + ((k * (k / t_m)) / t_m))) * (t_m * tan(k))) / l));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 1d-77) then
tmp = ((2.0d0 / t_m) / ((k * k) / l)) / ((((k * k) * (1.0d0 + ((t_m * t_m) * 0.3333333333333333d0))) + (2.0d0 * (t_m * t_m))) / l)
else if (t_m <= 6.4d+152) then
tmp = ((l / (t_m * k)) / (t_m * t_m)) * (l / k)
else
tmp = (2.0d0 / t_m) / ((t_m / l) * (((k * (2.0d0 + ((k * (k / t_m)) / t_m))) * (t_m * tan(k))) / l))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1e-77) {
tmp = ((2.0 / t_m) / ((k * k) / l)) / ((((k * k) * (1.0 + ((t_m * t_m) * 0.3333333333333333))) + (2.0 * (t_m * t_m))) / l);
} else if (t_m <= 6.4e+152) {
tmp = ((l / (t_m * k)) / (t_m * t_m)) * (l / k);
} else {
tmp = (2.0 / t_m) / ((t_m / l) * (((k * (2.0 + ((k * (k / t_m)) / t_m))) * (t_m * Math.tan(k))) / l));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 1e-77: tmp = ((2.0 / t_m) / ((k * k) / l)) / ((((k * k) * (1.0 + ((t_m * t_m) * 0.3333333333333333))) + (2.0 * (t_m * t_m))) / l) elif t_m <= 6.4e+152: tmp = ((l / (t_m * k)) / (t_m * t_m)) * (l / k) else: tmp = (2.0 / t_m) / ((t_m / l) * (((k * (2.0 + ((k * (k / t_m)) / t_m))) * (t_m * math.tan(k))) / l)) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1e-77) tmp = Float64(Float64(Float64(2.0 / t_m) / Float64(Float64(k * k) / l)) / Float64(Float64(Float64(Float64(k * k) * Float64(1.0 + Float64(Float64(t_m * t_m) * 0.3333333333333333))) + Float64(2.0 * Float64(t_m * t_m))) / l)); elseif (t_m <= 6.4e+152) tmp = Float64(Float64(Float64(l / Float64(t_m * k)) / Float64(t_m * t_m)) * Float64(l / k)); else tmp = Float64(Float64(2.0 / t_m) / Float64(Float64(t_m / l) * Float64(Float64(Float64(k * Float64(2.0 + Float64(Float64(k * Float64(k / t_m)) / t_m))) * Float64(t_m * tan(k))) / l))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 1e-77) tmp = ((2.0 / t_m) / ((k * k) / l)) / ((((k * k) * (1.0 + ((t_m * t_m) * 0.3333333333333333))) + (2.0 * (t_m * t_m))) / l); elseif (t_m <= 6.4e+152) tmp = ((l / (t_m * k)) / (t_m * t_m)) * (l / k); else tmp = (2.0 / t_m) / ((t_m / l) * (((k * (2.0 + ((k * (k / t_m)) / t_m))) * (t_m * tan(k))) / l)); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1e-77], N[(N[(N[(2.0 / t$95$m), $MachinePrecision] / N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(k * k), $MachinePrecision] * N[(1.0 + N[(N[(t$95$m * t$95$m), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 6.4e+152], N[(N[(N[(l / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / t$95$m), $MachinePrecision] / N[(N[(t$95$m / l), $MachinePrecision] * N[(N[(N[(k * N[(2.0 + N[(N[(k * N[(k / t$95$m), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 10^{-77}:\\
\;\;\;\;\frac{\frac{\frac{2}{t\_m}}{\frac{k \cdot k}{\ell}}}{\frac{\left(k \cdot k\right) \cdot \left(1 + \left(t\_m \cdot t\_m\right) \cdot 0.3333333333333333\right) + 2 \cdot \left(t\_m \cdot t\_m\right)}{\ell}}\\
\mathbf{elif}\;t\_m \leq 6.4 \cdot 10^{+152}:\\
\;\;\;\;\frac{\frac{\ell}{t\_m \cdot k}}{t\_m \cdot t\_m} \cdot \frac{\ell}{k}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{2}{t\_m}}{\frac{t\_m}{\ell} \cdot \frac{\left(k \cdot \left(2 + \frac{k \cdot \frac{k}{t\_m}}{t\_m}\right)\right) \cdot \left(t\_m \cdot \tan k\right)}{\ell}}\\
\end{array}
\end{array}
if t < 9.9999999999999993e-78Initial program 52.1%
/-lowering-/.f64N/A
associate-*l*N/A
associate-*l/N/A
associate-/l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Simplified47.5%
associate-*l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr51.4%
Taylor expanded in k around 0
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-lft-inN/A
rgt-mult-inverseN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6458.5%
Simplified58.5%
times-fracN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr67.4%
if 9.9999999999999993e-78 < t < 6.40000000000000011e152Initial program 72.6%
/-lowering-/.f64N/A
associate-*l*N/A
associate-*l/N/A
associate-/l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Simplified72.3%
Taylor expanded in k around 0
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6473.4%
Simplified73.4%
*-commutativeN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6476.7%
Applied egg-rr76.7%
associate-*r*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6484.3%
Applied egg-rr84.3%
if 6.40000000000000011e152 < t Initial program 59.5%
/-lowering-/.f64N/A
associate-*l*N/A
associate-*l/N/A
associate-/l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Simplified51.4%
associate-*l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr51.5%
associate-*l*N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
Applied egg-rr74.9%
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
Applied egg-rr87.5%
Taylor expanded in k around 0
Simplified83.1%
Final simplification72.4%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (/ 1.0 (* t_m t_m))))
(*
t_s
(if (<= t_m 7e-74)
(/
(/ (/ 2.0 t_m) (/ (* k k) l))
(/
(+
(* (* k k) (+ 1.0 (* (* t_m t_m) 0.3333333333333333)))
(* 2.0 (* t_m t_m)))
l))
(if (<= t_m 1.7e+152)
(* (/ (/ l (* t_m k)) (* t_m t_m)) (/ l k))
(/
(/ 2.0 t_m)
(*
(/ t_m l)
(/
(*
k
(*
k
(+
(* t_m 2.0)
(*
k
(*
k
(+
(* t_m (+ 0.3333333333333333 t_2))
(*
(* k k)
(+
(*
t_m
(+
(+ 0.17222222222222222 (* t_2 -0.16666666666666666))
(/ 0.3333333333333333 (* t_m t_m))))
(*
(+
(+ 0.0630952380952381 (* t_2 -0.05555555555555555))
(+
(+
(/ 0.13333333333333333 (* t_m t_m))
0.005555555555555556)
(* t_2 0.008333333333333333)))
(* t_m (* k k)))))))))))
l))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = 1.0 / (t_m * t_m);
double tmp;
if (t_m <= 7e-74) {
tmp = ((2.0 / t_m) / ((k * k) / l)) / ((((k * k) * (1.0 + ((t_m * t_m) * 0.3333333333333333))) + (2.0 * (t_m * t_m))) / l);
} else if (t_m <= 1.7e+152) {
tmp = ((l / (t_m * k)) / (t_m * t_m)) * (l / k);
} else {
tmp = (2.0 / t_m) / ((t_m / l) * ((k * (k * ((t_m * 2.0) + (k * (k * ((t_m * (0.3333333333333333 + t_2)) + ((k * k) * ((t_m * ((0.17222222222222222 + (t_2 * -0.16666666666666666)) + (0.3333333333333333 / (t_m * t_m)))) + (((0.0630952380952381 + (t_2 * -0.05555555555555555)) + (((0.13333333333333333 / (t_m * t_m)) + 0.005555555555555556) + (t_2 * 0.008333333333333333))) * (t_m * (k * k))))))))))) / l));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_2
real(8) :: tmp
t_2 = 1.0d0 / (t_m * t_m)
if (t_m <= 7d-74) then
tmp = ((2.0d0 / t_m) / ((k * k) / l)) / ((((k * k) * (1.0d0 + ((t_m * t_m) * 0.3333333333333333d0))) + (2.0d0 * (t_m * t_m))) / l)
else if (t_m <= 1.7d+152) then
tmp = ((l / (t_m * k)) / (t_m * t_m)) * (l / k)
else
tmp = (2.0d0 / t_m) / ((t_m / l) * ((k * (k * ((t_m * 2.0d0) + (k * (k * ((t_m * (0.3333333333333333d0 + t_2)) + ((k * k) * ((t_m * ((0.17222222222222222d0 + (t_2 * (-0.16666666666666666d0))) + (0.3333333333333333d0 / (t_m * t_m)))) + (((0.0630952380952381d0 + (t_2 * (-0.05555555555555555d0))) + (((0.13333333333333333d0 / (t_m * t_m)) + 0.005555555555555556d0) + (t_2 * 0.008333333333333333d0))) * (t_m * (k * k))))))))))) / l))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = 1.0 / (t_m * t_m);
double tmp;
if (t_m <= 7e-74) {
tmp = ((2.0 / t_m) / ((k * k) / l)) / ((((k * k) * (1.0 + ((t_m * t_m) * 0.3333333333333333))) + (2.0 * (t_m * t_m))) / l);
} else if (t_m <= 1.7e+152) {
tmp = ((l / (t_m * k)) / (t_m * t_m)) * (l / k);
} else {
tmp = (2.0 / t_m) / ((t_m / l) * ((k * (k * ((t_m * 2.0) + (k * (k * ((t_m * (0.3333333333333333 + t_2)) + ((k * k) * ((t_m * ((0.17222222222222222 + (t_2 * -0.16666666666666666)) + (0.3333333333333333 / (t_m * t_m)))) + (((0.0630952380952381 + (t_2 * -0.05555555555555555)) + (((0.13333333333333333 / (t_m * t_m)) + 0.005555555555555556) + (t_2 * 0.008333333333333333))) * (t_m * (k * k))))))))))) / l));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): t_2 = 1.0 / (t_m * t_m) tmp = 0 if t_m <= 7e-74: tmp = ((2.0 / t_m) / ((k * k) / l)) / ((((k * k) * (1.0 + ((t_m * t_m) * 0.3333333333333333))) + (2.0 * (t_m * t_m))) / l) elif t_m <= 1.7e+152: tmp = ((l / (t_m * k)) / (t_m * t_m)) * (l / k) else: tmp = (2.0 / t_m) / ((t_m / l) * ((k * (k * ((t_m * 2.0) + (k * (k * ((t_m * (0.3333333333333333 + t_2)) + ((k * k) * ((t_m * ((0.17222222222222222 + (t_2 * -0.16666666666666666)) + (0.3333333333333333 / (t_m * t_m)))) + (((0.0630952380952381 + (t_2 * -0.05555555555555555)) + (((0.13333333333333333 / (t_m * t_m)) + 0.005555555555555556) + (t_2 * 0.008333333333333333))) * (t_m * (k * k))))))))))) / l)) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(1.0 / Float64(t_m * t_m)) tmp = 0.0 if (t_m <= 7e-74) tmp = Float64(Float64(Float64(2.0 / t_m) / Float64(Float64(k * k) / l)) / Float64(Float64(Float64(Float64(k * k) * Float64(1.0 + Float64(Float64(t_m * t_m) * 0.3333333333333333))) + Float64(2.0 * Float64(t_m * t_m))) / l)); elseif (t_m <= 1.7e+152) tmp = Float64(Float64(Float64(l / Float64(t_m * k)) / Float64(t_m * t_m)) * Float64(l / k)); else tmp = Float64(Float64(2.0 / t_m) / Float64(Float64(t_m / l) * Float64(Float64(k * Float64(k * Float64(Float64(t_m * 2.0) + Float64(k * Float64(k * Float64(Float64(t_m * Float64(0.3333333333333333 + t_2)) + Float64(Float64(k * k) * Float64(Float64(t_m * Float64(Float64(0.17222222222222222 + Float64(t_2 * -0.16666666666666666)) + Float64(0.3333333333333333 / Float64(t_m * t_m)))) + Float64(Float64(Float64(0.0630952380952381 + Float64(t_2 * -0.05555555555555555)) + Float64(Float64(Float64(0.13333333333333333 / Float64(t_m * t_m)) + 0.005555555555555556) + Float64(t_2 * 0.008333333333333333))) * Float64(t_m * Float64(k * k))))))))))) / l))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) t_2 = 1.0 / (t_m * t_m); tmp = 0.0; if (t_m <= 7e-74) tmp = ((2.0 / t_m) / ((k * k) / l)) / ((((k * k) * (1.0 + ((t_m * t_m) * 0.3333333333333333))) + (2.0 * (t_m * t_m))) / l); elseif (t_m <= 1.7e+152) tmp = ((l / (t_m * k)) / (t_m * t_m)) * (l / k); else tmp = (2.0 / t_m) / ((t_m / l) * ((k * (k * ((t_m * 2.0) + (k * (k * ((t_m * (0.3333333333333333 + t_2)) + ((k * k) * ((t_m * ((0.17222222222222222 + (t_2 * -0.16666666666666666)) + (0.3333333333333333 / (t_m * t_m)))) + (((0.0630952380952381 + (t_2 * -0.05555555555555555)) + (((0.13333333333333333 / (t_m * t_m)) + 0.005555555555555556) + (t_2 * 0.008333333333333333))) * (t_m * (k * k))))))))))) / l)); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(1.0 / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 7e-74], N[(N[(N[(2.0 / t$95$m), $MachinePrecision] / N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(k * k), $MachinePrecision] * N[(1.0 + N[(N[(t$95$m * t$95$m), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.7e+152], N[(N[(N[(l / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / t$95$m), $MachinePrecision] / N[(N[(t$95$m / l), $MachinePrecision] * N[(N[(k * N[(k * N[(N[(t$95$m * 2.0), $MachinePrecision] + N[(k * N[(k * N[(N[(t$95$m * N[(0.3333333333333333 + t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(k * k), $MachinePrecision] * N[(N[(t$95$m * N[(N[(0.17222222222222222 + N[(t$95$2 * -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + N[(0.3333333333333333 / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(0.0630952380952381 + N[(t$95$2 * -0.05555555555555555), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(0.13333333333333333 / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] + 0.005555555555555556), $MachinePrecision] + N[(t$95$2 * 0.008333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{1}{t\_m \cdot t\_m}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 7 \cdot 10^{-74}:\\
\;\;\;\;\frac{\frac{\frac{2}{t\_m}}{\frac{k \cdot k}{\ell}}}{\frac{\left(k \cdot k\right) \cdot \left(1 + \left(t\_m \cdot t\_m\right) \cdot 0.3333333333333333\right) + 2 \cdot \left(t\_m \cdot t\_m\right)}{\ell}}\\
\mathbf{elif}\;t\_m \leq 1.7 \cdot 10^{+152}:\\
\;\;\;\;\frac{\frac{\ell}{t\_m \cdot k}}{t\_m \cdot t\_m} \cdot \frac{\ell}{k}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{2}{t\_m}}{\frac{t\_m}{\ell} \cdot \frac{k \cdot \left(k \cdot \left(t\_m \cdot 2 + k \cdot \left(k \cdot \left(t\_m \cdot \left(0.3333333333333333 + t\_2\right) + \left(k \cdot k\right) \cdot \left(t\_m \cdot \left(\left(0.17222222222222222 + t\_2 \cdot -0.16666666666666666\right) + \frac{0.3333333333333333}{t\_m \cdot t\_m}\right) + \left(\left(0.0630952380952381 + t\_2 \cdot -0.05555555555555555\right) + \left(\left(\frac{0.13333333333333333}{t\_m \cdot t\_m} + 0.005555555555555556\right) + t\_2 \cdot 0.008333333333333333\right)\right) \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)\right)\right)\right)\right)\right)}{\ell}}\\
\end{array}
\end{array}
\end{array}
if t < 7.00000000000000029e-74Initial program 52.1%
/-lowering-/.f64N/A
associate-*l*N/A
associate-*l/N/A
associate-/l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Simplified47.5%
associate-*l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr51.4%
Taylor expanded in k around 0
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-lft-inN/A
rgt-mult-inverseN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6458.5%
Simplified58.5%
times-fracN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr67.4%
if 7.00000000000000029e-74 < t < 1.7000000000000001e152Initial program 72.6%
/-lowering-/.f64N/A
associate-*l*N/A
associate-*l/N/A
associate-/l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Simplified72.3%
Taylor expanded in k around 0
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6473.4%
Simplified73.4%
*-commutativeN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6476.7%
Applied egg-rr76.7%
associate-*r*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6484.3%
Applied egg-rr84.3%
if 1.7000000000000001e152 < t Initial program 59.5%
/-lowering-/.f64N/A
associate-*l*N/A
associate-*l/N/A
associate-/l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Simplified51.4%
associate-*l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr51.5%
associate-*l*N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
Applied egg-rr74.9%
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
Applied egg-rr87.5%
Taylor expanded in k around 0
Simplified83.0%
Final simplification72.4%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 4.8e-78)
(/
(/ (/ 2.0 t_m) (/ (* k k) l))
(/
(+
(* (* k k) (+ 1.0 (* (* t_m t_m) 0.3333333333333333)))
(* 2.0 (* t_m t_m)))
l))
(* (/ (/ l (* t_m k)) (* t_m t_m)) (/ l k)))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 4.8e-78) {
tmp = ((2.0 / t_m) / ((k * k) / l)) / ((((k * k) * (1.0 + ((t_m * t_m) * 0.3333333333333333))) + (2.0 * (t_m * t_m))) / l);
} else {
tmp = ((l / (t_m * k)) / (t_m * t_m)) * (l / k);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 4.8d-78) then
tmp = ((2.0d0 / t_m) / ((k * k) / l)) / ((((k * k) * (1.0d0 + ((t_m * t_m) * 0.3333333333333333d0))) + (2.0d0 * (t_m * t_m))) / l)
else
tmp = ((l / (t_m * k)) / (t_m * t_m)) * (l / k)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 4.8e-78) {
tmp = ((2.0 / t_m) / ((k * k) / l)) / ((((k * k) * (1.0 + ((t_m * t_m) * 0.3333333333333333))) + (2.0 * (t_m * t_m))) / l);
} else {
tmp = ((l / (t_m * k)) / (t_m * t_m)) * (l / k);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 4.8e-78: tmp = ((2.0 / t_m) / ((k * k) / l)) / ((((k * k) * (1.0 + ((t_m * t_m) * 0.3333333333333333))) + (2.0 * (t_m * t_m))) / l) else: tmp = ((l / (t_m * k)) / (t_m * t_m)) * (l / k) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 4.8e-78) tmp = Float64(Float64(Float64(2.0 / t_m) / Float64(Float64(k * k) / l)) / Float64(Float64(Float64(Float64(k * k) * Float64(1.0 + Float64(Float64(t_m * t_m) * 0.3333333333333333))) + Float64(2.0 * Float64(t_m * t_m))) / l)); else tmp = Float64(Float64(Float64(l / Float64(t_m * k)) / Float64(t_m * t_m)) * Float64(l / k)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 4.8e-78) tmp = ((2.0 / t_m) / ((k * k) / l)) / ((((k * k) * (1.0 + ((t_m * t_m) * 0.3333333333333333))) + (2.0 * (t_m * t_m))) / l); else tmp = ((l / (t_m * k)) / (t_m * t_m)) * (l / k); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 4.8e-78], N[(N[(N[(2.0 / t$95$m), $MachinePrecision] / N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(k * k), $MachinePrecision] * N[(1.0 + N[(N[(t$95$m * t$95$m), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.8 \cdot 10^{-78}:\\
\;\;\;\;\frac{\frac{\frac{2}{t\_m}}{\frac{k \cdot k}{\ell}}}{\frac{\left(k \cdot k\right) \cdot \left(1 + \left(t\_m \cdot t\_m\right) \cdot 0.3333333333333333\right) + 2 \cdot \left(t\_m \cdot t\_m\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\ell}{t\_m \cdot k}}{t\_m \cdot t\_m} \cdot \frac{\ell}{k}\\
\end{array}
\end{array}
if t < 4.79999999999999999e-78Initial program 52.1%
/-lowering-/.f64N/A
associate-*l*N/A
associate-*l/N/A
associate-/l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Simplified47.5%
associate-*l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr51.4%
Taylor expanded in k around 0
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-lft-inN/A
rgt-mult-inverseN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6458.5%
Simplified58.5%
times-fracN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr67.4%
if 4.79999999999999999e-78 < t Initial program 66.1%
/-lowering-/.f64N/A
associate-*l*N/A
associate-*l/N/A
associate-/l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Simplified61.9%
Taylor expanded in k around 0
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6466.5%
Simplified66.5%
*-commutativeN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6470.9%
Applied egg-rr70.9%
associate-*r*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6474.7%
Applied egg-rr74.7%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 1.2e-132)
(* (/ (/ l (* t_m k)) (* t_m t_m)) (/ l k))
(*
l
(/
(/ 2.0 t_m)
(/
(*
(* k k)
(+
(* (* k k) (+ 1.0 (* (* t_m t_m) 0.3333333333333333)))
(* 2.0 (* t_m t_m))))
l))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.2e-132) {
tmp = ((l / (t_m * k)) / (t_m * t_m)) * (l / k);
} else {
tmp = l * ((2.0 / t_m) / (((k * k) * (((k * k) * (1.0 + ((t_m * t_m) * 0.3333333333333333))) + (2.0 * (t_m * t_m)))) / l));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 1.2d-132) then
tmp = ((l / (t_m * k)) / (t_m * t_m)) * (l / k)
else
tmp = l * ((2.0d0 / t_m) / (((k * k) * (((k * k) * (1.0d0 + ((t_m * t_m) * 0.3333333333333333d0))) + (2.0d0 * (t_m * t_m)))) / l))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.2e-132) {
tmp = ((l / (t_m * k)) / (t_m * t_m)) * (l / k);
} else {
tmp = l * ((2.0 / t_m) / (((k * k) * (((k * k) * (1.0 + ((t_m * t_m) * 0.3333333333333333))) + (2.0 * (t_m * t_m)))) / l));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 1.2e-132: tmp = ((l / (t_m * k)) / (t_m * t_m)) * (l / k) else: tmp = l * ((2.0 / t_m) / (((k * k) * (((k * k) * (1.0 + ((t_m * t_m) * 0.3333333333333333))) + (2.0 * (t_m * t_m)))) / l)) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1.2e-132) tmp = Float64(Float64(Float64(l / Float64(t_m * k)) / Float64(t_m * t_m)) * Float64(l / k)); else tmp = Float64(l * Float64(Float64(2.0 / t_m) / Float64(Float64(Float64(k * k) * Float64(Float64(Float64(k * k) * Float64(1.0 + Float64(Float64(t_m * t_m) * 0.3333333333333333))) + Float64(2.0 * Float64(t_m * t_m)))) / l))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 1.2e-132) tmp = ((l / (t_m * k)) / (t_m * t_m)) * (l / k); else tmp = l * ((2.0 / t_m) / (((k * k) * (((k * k) * (1.0 + ((t_m * t_m) * 0.3333333333333333))) + (2.0 * (t_m * t_m)))) / l)); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1.2e-132], N[(N[(N[(l / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(2.0 / t$95$m), $MachinePrecision] / N[(N[(N[(k * k), $MachinePrecision] * N[(N[(N[(k * k), $MachinePrecision] * N[(1.0 + N[(N[(t$95$m * t$95$m), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 1.2 \cdot 10^{-132}:\\
\;\;\;\;\frac{\frac{\ell}{t\_m \cdot k}}{t\_m \cdot t\_m} \cdot \frac{\ell}{k}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\frac{2}{t\_m}}{\frac{\left(k \cdot k\right) \cdot \left(\left(k \cdot k\right) \cdot \left(1 + \left(t\_m \cdot t\_m\right) \cdot 0.3333333333333333\right) + 2 \cdot \left(t\_m \cdot t\_m\right)\right)}{\ell}}\\
\end{array}
\end{array}
if k < 1.20000000000000008e-132Initial program 57.4%
/-lowering-/.f64N/A
associate-*l*N/A
associate-*l/N/A
associate-/l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Simplified50.7%
Taylor expanded in k around 0
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6457.9%
Simplified57.9%
*-commutativeN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6468.1%
Applied egg-rr68.1%
associate-*r*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6472.6%
Applied egg-rr72.6%
if 1.20000000000000008e-132 < k Initial program 54.4%
/-lowering-/.f64N/A
associate-*l*N/A
associate-*l/N/A
associate-/l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Simplified54.1%
associate-*l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr60.0%
Taylor expanded in k around 0
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-lft-inN/A
rgt-mult-inverseN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6466.7%
Simplified66.7%
associate-/r*N/A
associate-/r/N/A
*-lowering-*.f64N/A
Applied egg-rr72.6%
Final simplification72.6%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 5e-133)
(* (/ (/ l (* t_m k)) (* t_m t_m)) (/ l k))
(/ (/ 2.0 t_m) (* (/ t_m l) (/ (* 2.0 (* t_m (* k k))) l))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 5e-133) {
tmp = ((l / (t_m * k)) / (t_m * t_m)) * (l / k);
} else {
tmp = (2.0 / t_m) / ((t_m / l) * ((2.0 * (t_m * (k * k))) / l));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 5d-133) then
tmp = ((l / (t_m * k)) / (t_m * t_m)) * (l / k)
else
tmp = (2.0d0 / t_m) / ((t_m / l) * ((2.0d0 * (t_m * (k * k))) / l))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 5e-133) {
tmp = ((l / (t_m * k)) / (t_m * t_m)) * (l / k);
} else {
tmp = (2.0 / t_m) / ((t_m / l) * ((2.0 * (t_m * (k * k))) / l));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 5e-133: tmp = ((l / (t_m * k)) / (t_m * t_m)) * (l / k) else: tmp = (2.0 / t_m) / ((t_m / l) * ((2.0 * (t_m * (k * k))) / l)) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 5e-133) tmp = Float64(Float64(Float64(l / Float64(t_m * k)) / Float64(t_m * t_m)) * Float64(l / k)); else tmp = Float64(Float64(2.0 / t_m) / Float64(Float64(t_m / l) * Float64(Float64(2.0 * Float64(t_m * Float64(k * k))) / l))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 5e-133) tmp = ((l / (t_m * k)) / (t_m * t_m)) * (l / k); else tmp = (2.0 / t_m) / ((t_m / l) * ((2.0 * (t_m * (k * k))) / l)); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 5e-133], N[(N[(N[(l / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / t$95$m), $MachinePrecision] / N[(N[(t$95$m / l), $MachinePrecision] * N[(N[(2.0 * N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 5 \cdot 10^{-133}:\\
\;\;\;\;\frac{\frac{\ell}{t\_m \cdot k}}{t\_m \cdot t\_m} \cdot \frac{\ell}{k}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{2}{t\_m}}{\frac{t\_m}{\ell} \cdot \frac{2 \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)}{\ell}}\\
\end{array}
\end{array}
if k < 4.9999999999999999e-133Initial program 57.4%
/-lowering-/.f64N/A
associate-*l*N/A
associate-*l/N/A
associate-/l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Simplified50.7%
Taylor expanded in k around 0
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6457.9%
Simplified57.9%
*-commutativeN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6468.1%
Applied egg-rr68.1%
associate-*r*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6472.6%
Applied egg-rr72.6%
if 4.9999999999999999e-133 < k Initial program 54.4%
/-lowering-/.f64N/A
associate-*l*N/A
associate-*l/N/A
associate-/l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Simplified54.1%
associate-*l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr60.0%
associate-*l*N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
Applied egg-rr72.2%
Taylor expanded in k around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6472.2%
Simplified72.2%
Final simplification72.5%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 2e-133)
(* (/ (/ l (* t_m k)) (* t_m t_m)) (/ l k))
(* l (/ l (* t_m (* t_m (* t_m (* k k)))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 2e-133) {
tmp = ((l / (t_m * k)) / (t_m * t_m)) * (l / k);
} else {
tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 2d-133) then
tmp = ((l / (t_m * k)) / (t_m * t_m)) * (l / k)
else
tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 2e-133) {
tmp = ((l / (t_m * k)) / (t_m * t_m)) * (l / k);
} else {
tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 2e-133: tmp = ((l / (t_m * k)) / (t_m * t_m)) * (l / k) else: tmp = l * (l / (t_m * (t_m * (t_m * (k * k))))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 2e-133) tmp = Float64(Float64(Float64(l / Float64(t_m * k)) / Float64(t_m * t_m)) * Float64(l / k)); else tmp = Float64(l * Float64(l / Float64(t_m * Float64(t_m * Float64(t_m * Float64(k * k)))))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 2e-133) tmp = ((l / (t_m * k)) / (t_m * t_m)) * (l / k); else tmp = l * (l / (t_m * (t_m * (t_m * (k * k))))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 2e-133], N[(N[(N[(l / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision], N[(l * N[(l / N[(t$95$m * N[(t$95$m * N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 2 \cdot 10^{-133}:\\
\;\;\;\;\frac{\frac{\ell}{t\_m \cdot k}}{t\_m \cdot t\_m} \cdot \frac{\ell}{k}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)\right)}\\
\end{array}
\end{array}
if k < 2.0000000000000001e-133Initial program 57.4%
/-lowering-/.f64N/A
associate-*l*N/A
associate-*l/N/A
associate-/l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Simplified50.7%
Taylor expanded in k around 0
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6457.9%
Simplified57.9%
*-commutativeN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6468.1%
Applied egg-rr68.1%
associate-*r*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6472.6%
Applied egg-rr72.6%
if 2.0000000000000001e-133 < k Initial program 54.4%
/-lowering-/.f64N/A
associate-*l*N/A
associate-*l/N/A
associate-/l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Simplified54.1%
Taylor expanded in k around 0
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6457.6%
Simplified57.6%
*-commutativeN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6458.5%
Applied egg-rr58.5%
frac-timesN/A
*-commutativeN/A
associate-*r*N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6459.4%
Applied egg-rr59.4%
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6464.9%
Applied egg-rr64.9%
Final simplification69.9%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1e-89)
(* l (/ l (* t_m (* t_m (* t_m (* k k))))))
(* l (/ l (* k (* t_m (* t_m (* t_m k)))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1e-89) {
tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))));
} else {
tmp = l * (l / (k * (t_m * (t_m * (t_m * k)))));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 1d-89) then
tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))))
else
tmp = l * (l / (k * (t_m * (t_m * (t_m * k)))))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1e-89) {
tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))));
} else {
tmp = l * (l / (k * (t_m * (t_m * (t_m * k)))));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 1e-89: tmp = l * (l / (t_m * (t_m * (t_m * (k * k))))) else: tmp = l * (l / (k * (t_m * (t_m * (t_m * k))))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1e-89) tmp = Float64(l * Float64(l / Float64(t_m * Float64(t_m * Float64(t_m * Float64(k * k)))))); else tmp = Float64(l * Float64(l / Float64(k * Float64(t_m * Float64(t_m * Float64(t_m * k)))))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 1e-89) tmp = l * (l / (t_m * (t_m * (t_m * (k * k))))); else tmp = l * (l / (k * (t_m * (t_m * (t_m * k))))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1e-89], N[(l * N[(l / N[(t$95$m * N[(t$95$m * N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(l / N[(k * N[(t$95$m * N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 10^{-89}:\\
\;\;\;\;\ell \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\ell}{k \cdot \left(t\_m \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)\right)}\\
\end{array}
\end{array}
if t < 1.00000000000000004e-89Initial program 52.3%
/-lowering-/.f64N/A
associate-*l*N/A
associate-*l/N/A
associate-/l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Simplified47.7%
Taylor expanded in k around 0
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6454.3%
Simplified54.3%
*-commutativeN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6462.4%
Applied egg-rr62.4%
frac-timesN/A
*-commutativeN/A
associate-*r*N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6461.0%
Applied egg-rr61.0%
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6462.3%
Applied egg-rr62.3%
if 1.00000000000000004e-89 < t Initial program 65.3%
/-lowering-/.f64N/A
associate-*l*N/A
associate-*l/N/A
associate-/l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Simplified61.2%
Taylor expanded in k around 0
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6465.7%
Simplified65.7%
*-commutativeN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6470.0%
Applied egg-rr70.0%
frac-timesN/A
*-commutativeN/A
associate-*r*N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6470.0%
Applied egg-rr70.0%
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6474.8%
Applied egg-rr74.8%
Final simplification66.1%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (* l (/ l (* k (* t_m (* t_m (* t_m k))))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (l * (l / (k * (t_m * (t_m * (t_m * k))))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (l * (l / (k * (t_m * (t_m * (t_m * k))))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (l * (l / (k * (t_m * (t_m * (t_m * k))))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (l * (l / (k * (t_m * (t_m * (t_m * k))))))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(l * Float64(l / Float64(k * Float64(t_m * Float64(t_m * Float64(t_m * k))))))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (l * (l / (k * (t_m * (t_m * (t_m * k)))))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(l * N[(l / N[(k * N[(t$95$m * N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \left(\ell \cdot \frac{\ell}{k \cdot \left(t\_m \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)\right)}\right)
\end{array}
Initial program 56.3%
/-lowering-/.f64N/A
associate-*l*N/A
associate-*l/N/A
associate-/l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Simplified51.9%
Taylor expanded in k around 0
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6457.8%
Simplified57.8%
*-commutativeN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6464.8%
Applied egg-rr64.8%
frac-timesN/A
*-commutativeN/A
associate-*r*N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6463.8%
Applied egg-rr63.8%
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6466.5%
Applied egg-rr66.5%
Final simplification66.5%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (* l (/ l (* k (* k (* t_m (* t_m t_m))))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (l * (l / (k * (k * (t_m * (t_m * t_m))))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (l * (l / (k * (k * (t_m * (t_m * t_m))))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (l * (l / (k * (k * (t_m * (t_m * t_m))))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (l * (l / (k * (k * (t_m * (t_m * t_m))))))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(l * Float64(l / Float64(k * Float64(k * Float64(t_m * Float64(t_m * t_m))))))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (l * (l / (k * (k * (t_m * (t_m * t_m)))))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(l * N[(l / N[(k * N[(k * N[(t$95$m * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \left(\ell \cdot \frac{\ell}{k \cdot \left(k \cdot \left(t\_m \cdot \left(t\_m \cdot t\_m\right)\right)\right)}\right)
\end{array}
Initial program 56.3%
/-lowering-/.f64N/A
associate-*l*N/A
associate-*l/N/A
associate-/l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
Simplified51.9%
Taylor expanded in k around 0
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6457.8%
Simplified57.8%
*-commutativeN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6464.8%
Applied egg-rr64.8%
frac-timesN/A
*-commutativeN/A
associate-*r*N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6463.8%
Applied egg-rr63.8%
herbie shell --seed 2024152
(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))))