
(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 13 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
(*
t_s
(if (<= t_m 3e-87)
(/ 2.0 (* k (* k (* (/ t_m (* l l)) (* (sin k) (tan k))))))
(if (<= t_m 3.5e+102)
(/
(/ (/ 2.0 (* t_m (* t_m t_m))) (/ (sin k) l))
(/ (* (tan k) (+ 2.0 (/ (/ k t_m) (/ t_m k)))) l))
(/
2.0
(*
(* (tan k) (* (sin k) (* t_m (/ (* t_m (/ t_m l)) l))))
(+ 1.0 (+ 1.0 (pow (/ k t_m) 2.0)))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 3e-87) {
tmp = 2.0 / (k * (k * ((t_m / (l * l)) * (sin(k) * tan(k)))));
} else if (t_m <= 3.5e+102) {
tmp = ((2.0 / (t_m * (t_m * t_m))) / (sin(k) / l)) / ((tan(k) * (2.0 + ((k / t_m) / (t_m / k)))) / l);
} else {
tmp = 2.0 / ((tan(k) * (sin(k) * (t_m * ((t_m * (t_m / l)) / l)))) * (1.0 + (1.0 + pow((k / t_m), 2.0))));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 3d-87) then
tmp = 2.0d0 / (k * (k * ((t_m / (l * l)) * (sin(k) * tan(k)))))
else if (t_m <= 3.5d+102) then
tmp = ((2.0d0 / (t_m * (t_m * t_m))) / (sin(k) / l)) / ((tan(k) * (2.0d0 + ((k / t_m) / (t_m / k)))) / l)
else
tmp = 2.0d0 / ((tan(k) * (sin(k) * (t_m * ((t_m * (t_m / l)) / l)))) * (1.0d0 + (1.0d0 + ((k / t_m) ** 2.0d0))))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 3e-87) {
tmp = 2.0 / (k * (k * ((t_m / (l * l)) * (Math.sin(k) * Math.tan(k)))));
} else if (t_m <= 3.5e+102) {
tmp = ((2.0 / (t_m * (t_m * t_m))) / (Math.sin(k) / l)) / ((Math.tan(k) * (2.0 + ((k / t_m) / (t_m / k)))) / l);
} else {
tmp = 2.0 / ((Math.tan(k) * (Math.sin(k) * (t_m * ((t_m * (t_m / l)) / l)))) * (1.0 + (1.0 + Math.pow((k / t_m), 2.0))));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 3e-87: tmp = 2.0 / (k * (k * ((t_m / (l * l)) * (math.sin(k) * math.tan(k))))) elif t_m <= 3.5e+102: tmp = ((2.0 / (t_m * (t_m * t_m))) / (math.sin(k) / l)) / ((math.tan(k) * (2.0 + ((k / t_m) / (t_m / k)))) / l) else: tmp = 2.0 / ((math.tan(k) * (math.sin(k) * (t_m * ((t_m * (t_m / l)) / l)))) * (1.0 + (1.0 + math.pow((k / t_m), 2.0)))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 3e-87) tmp = Float64(2.0 / Float64(k * Float64(k * Float64(Float64(t_m / Float64(l * l)) * Float64(sin(k) * tan(k)))))); elseif (t_m <= 3.5e+102) tmp = Float64(Float64(Float64(2.0 / Float64(t_m * Float64(t_m * t_m))) / Float64(sin(k) / l)) / Float64(Float64(tan(k) * Float64(2.0 + Float64(Float64(k / t_m) / Float64(t_m / k)))) / l)); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(sin(k) * Float64(t_m * Float64(Float64(t_m * Float64(t_m / l)) / l)))) * Float64(1.0 + Float64(1.0 + (Float64(k / t_m) ^ 2.0))))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 3e-87) tmp = 2.0 / (k * (k * ((t_m / (l * l)) * (sin(k) * tan(k))))); elseif (t_m <= 3.5e+102) tmp = ((2.0 / (t_m * (t_m * t_m))) / (sin(k) / l)) / ((tan(k) * (2.0 + ((k / t_m) / (t_m / k)))) / l); else tmp = 2.0 / ((tan(k) * (sin(k) * (t_m * ((t_m * (t_m / l)) / l)))) * (1.0 + (1.0 + ((k / t_m) ^ 2.0)))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 3e-87], N[(2.0 / N[(k * N[(k * N[(N[(t$95$m / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.5e+102], N[(N[(N[(2.0 / N[(t$95$m * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[(N[(k / t$95$m), $MachinePrecision] / N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(t$95$m * N[(N[(t$95$m * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $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 3 \cdot 10^{-87}:\\
\;\;\;\;\frac{2}{k \cdot \left(k \cdot \left(\frac{t\_m}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right)\right)}\\
\mathbf{elif}\;t\_m \leq 3.5 \cdot 10^{+102}:\\
\;\;\;\;\frac{\frac{\frac{2}{t\_m \cdot \left(t\_m \cdot t\_m\right)}}{\frac{\sin k}{\ell}}}{\frac{\tan k \cdot \left(2 + \frac{\frac{k}{t\_m}}{\frac{t\_m}{k}}\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(\sin k \cdot \left(t\_m \cdot \frac{t\_m \cdot \frac{t\_m}{\ell}}{\ell}\right)\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right)}\\
\end{array}
\end{array}
if t < 3.00000000000000016e-87Initial program 51.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.6%
Taylor expanded in t around 0
associate-/r*N/A
/-lowering-/.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
cos-lowering-cos.f6464.9%
Simplified64.9%
associate-/l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-/l*N/A
unpow2N/A
associate-*r/N/A
tan-quotN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
tan-lowering-tan.f6469.1%
Applied egg-rr69.1%
if 3.00000000000000016e-87 < t < 3.50000000000000011e102Initial program 72.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
Simplified63.3%
associate-/r*N/A
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
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
Applied egg-rr89.1%
if 3.50000000000000011e102 < t Initial program 62.9%
sqr-powN/A
times-fracN/A
pow2N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
pow-lowering-pow.f64N/A
metadata-eval83.5%
Applied egg-rr83.5%
unpow2N/A
frac-timesN/A
pow-prod-upN/A
metadata-evalN/A
cube-unmultN/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6488.4%
Applied egg-rr88.4%
Final simplification75.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 (<= t_m 3e-87)
(/ 2.0 (* k (* k (* (/ t_m (* l l)) (* (sin k) (tan k))))))
(if (<= t_m 3e+102)
(/
(/ (/ 2.0 (* t_m (* t_m t_m))) (/ (sin k) l))
(/ (* (tan k) (+ 2.0 (/ (/ k t_m) (/ t_m k)))) l))
(/
2.0
(*
(+ 1.0 (+ 1.0 (pow (/ k t_m) 2.0)))
(* (tan k) (* (sin k) (* (/ t_m l) (/ (* 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 (t_m <= 3e-87) {
tmp = 2.0 / (k * (k * ((t_m / (l * l)) * (sin(k) * tan(k)))));
} else if (t_m <= 3e+102) {
tmp = ((2.0 / (t_m * (t_m * t_m))) / (sin(k) / l)) / ((tan(k) * (2.0 + ((k / t_m) / (t_m / k)))) / l);
} else {
tmp = 2.0 / ((1.0 + (1.0 + pow((k / t_m), 2.0))) * (tan(k) * (sin(k) * ((t_m / l) * ((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 (t_m <= 3d-87) then
tmp = 2.0d0 / (k * (k * ((t_m / (l * l)) * (sin(k) * tan(k)))))
else if (t_m <= 3d+102) then
tmp = ((2.0d0 / (t_m * (t_m * t_m))) / (sin(k) / l)) / ((tan(k) * (2.0d0 + ((k / t_m) / (t_m / k)))) / l)
else
tmp = 2.0d0 / ((1.0d0 + (1.0d0 + ((k / t_m) ** 2.0d0))) * (tan(k) * (sin(k) * ((t_m / l) * ((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 (t_m <= 3e-87) {
tmp = 2.0 / (k * (k * ((t_m / (l * l)) * (Math.sin(k) * Math.tan(k)))));
} else if (t_m <= 3e+102) {
tmp = ((2.0 / (t_m * (t_m * t_m))) / (Math.sin(k) / l)) / ((Math.tan(k) * (2.0 + ((k / t_m) / (t_m / k)))) / l);
} else {
tmp = 2.0 / ((1.0 + (1.0 + Math.pow((k / t_m), 2.0))) * (Math.tan(k) * (Math.sin(k) * ((t_m / l) * ((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 t_m <= 3e-87: tmp = 2.0 / (k * (k * ((t_m / (l * l)) * (math.sin(k) * math.tan(k))))) elif t_m <= 3e+102: tmp = ((2.0 / (t_m * (t_m * t_m))) / (math.sin(k) / l)) / ((math.tan(k) * (2.0 + ((k / t_m) / (t_m / k)))) / l) else: tmp = 2.0 / ((1.0 + (1.0 + math.pow((k / t_m), 2.0))) * (math.tan(k) * (math.sin(k) * ((t_m / l) * ((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 (t_m <= 3e-87) tmp = Float64(2.0 / Float64(k * Float64(k * Float64(Float64(t_m / Float64(l * l)) * Float64(sin(k) * tan(k)))))); elseif (t_m <= 3e+102) tmp = Float64(Float64(Float64(2.0 / Float64(t_m * Float64(t_m * t_m))) / Float64(sin(k) / l)) / Float64(Float64(tan(k) * Float64(2.0 + Float64(Float64(k / t_m) / Float64(t_m / k)))) / l)); else tmp = Float64(2.0 / Float64(Float64(1.0 + Float64(1.0 + (Float64(k / t_m) ^ 2.0))) * Float64(tan(k) * Float64(sin(k) * Float64(Float64(t_m / l) * Float64(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 (t_m <= 3e-87) tmp = 2.0 / (k * (k * ((t_m / (l * l)) * (sin(k) * tan(k))))); elseif (t_m <= 3e+102) tmp = ((2.0 / (t_m * (t_m * t_m))) / (sin(k) / l)) / ((tan(k) * (2.0 + ((k / t_m) / (t_m / k)))) / l); else tmp = 2.0 / ((1.0 + (1.0 + ((k / t_m) ^ 2.0))) * (tan(k) * (sin(k) * ((t_m / l) * ((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[t$95$m, 3e-87], N[(2.0 / N[(k * N[(k * N[(N[(t$95$m / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3e+102], N[(N[(N[(2.0 / N[(t$95$m * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[(N[(k / t$95$m), $MachinePrecision] / N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(1.0 + N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[(t$95$m / l), $MachinePrecision] * N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $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 3 \cdot 10^{-87}:\\
\;\;\;\;\frac{2}{k \cdot \left(k \cdot \left(\frac{t\_m}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right)\right)}\\
\mathbf{elif}\;t\_m \leq 3 \cdot 10^{+102}:\\
\;\;\;\;\frac{\frac{\frac{2}{t\_m \cdot \left(t\_m \cdot t\_m\right)}}{\frac{\sin k}{\ell}}}{\frac{\tan k \cdot \left(2 + \frac{\frac{k}{t\_m}}{\frac{t\_m}{k}}\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(1 + \left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right) \cdot \left(\tan k \cdot \left(\sin k \cdot \left(\frac{t\_m}{\ell} \cdot \frac{t\_m \cdot t\_m}{\ell}\right)\right)\right)}\\
\end{array}
\end{array}
if t < 3.00000000000000016e-87Initial program 51.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.6%
Taylor expanded in t around 0
associate-/r*N/A
/-lowering-/.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
cos-lowering-cos.f6464.9%
Simplified64.9%
associate-/l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-/l*N/A
unpow2N/A
associate-*r/N/A
tan-quotN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
tan-lowering-tan.f6469.1%
Applied egg-rr69.1%
if 3.00000000000000016e-87 < t < 2.9999999999999998e102Initial program 72.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
Simplified63.3%
associate-/r*N/A
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
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
Applied egg-rr89.1%
if 2.9999999999999998e102 < t Initial program 62.9%
unpow3N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6478.6%
Applied egg-rr78.6%
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 (<= k 1.3e-155)
(* (/ l k) (/ l (* t_m (* t_m (* t_m k)))))
(if (<= k 0.00066)
(* (/ l t_m) (/ (/ 1.0 (* k k)) (* t_m (/ t_m l))))
(/
(/ (/ (/ 2.0 (+ 0.5 (* -0.5 (cos (* 2.0 k))))) (/ (* t_m k) (* l l))) k)
(/ 1.0 (cos 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 <= 1.3e-155) {
tmp = (l / k) * (l / (t_m * (t_m * (t_m * k))));
} else if (k <= 0.00066) {
tmp = (l / t_m) * ((1.0 / (k * k)) / (t_m * (t_m / l)));
} else {
tmp = (((2.0 / (0.5 + (-0.5 * cos((2.0 * k))))) / ((t_m * k) / (l * l))) / k) / (1.0 / cos(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 <= 1.3d-155) then
tmp = (l / k) * (l / (t_m * (t_m * (t_m * k))))
else if (k <= 0.00066d0) then
tmp = (l / t_m) * ((1.0d0 / (k * k)) / (t_m * (t_m / l)))
else
tmp = (((2.0d0 / (0.5d0 + ((-0.5d0) * cos((2.0d0 * k))))) / ((t_m * k) / (l * l))) / k) / (1.0d0 / cos(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 <= 1.3e-155) {
tmp = (l / k) * (l / (t_m * (t_m * (t_m * k))));
} else if (k <= 0.00066) {
tmp = (l / t_m) * ((1.0 / (k * k)) / (t_m * (t_m / l)));
} else {
tmp = (((2.0 / (0.5 + (-0.5 * Math.cos((2.0 * k))))) / ((t_m * k) / (l * l))) / k) / (1.0 / Math.cos(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 <= 1.3e-155: tmp = (l / k) * (l / (t_m * (t_m * (t_m * k)))) elif k <= 0.00066: tmp = (l / t_m) * ((1.0 / (k * k)) / (t_m * (t_m / l))) else: tmp = (((2.0 / (0.5 + (-0.5 * math.cos((2.0 * k))))) / ((t_m * k) / (l * l))) / k) / (1.0 / math.cos(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 <= 1.3e-155) tmp = Float64(Float64(l / k) * Float64(l / Float64(t_m * Float64(t_m * Float64(t_m * k))))); elseif (k <= 0.00066) tmp = Float64(Float64(l / t_m) * Float64(Float64(1.0 / Float64(k * k)) / Float64(t_m * Float64(t_m / l)))); else tmp = Float64(Float64(Float64(Float64(2.0 / Float64(0.5 + Float64(-0.5 * cos(Float64(2.0 * k))))) / Float64(Float64(t_m * k) / Float64(l * l))) / k) / Float64(1.0 / cos(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 <= 1.3e-155) tmp = (l / k) * (l / (t_m * (t_m * (t_m * k)))); elseif (k <= 0.00066) tmp = (l / t_m) * ((1.0 / (k * k)) / (t_m * (t_m / l))); else tmp = (((2.0 / (0.5 + (-0.5 * cos((2.0 * k))))) / ((t_m * k) / (l * l))) / k) / (1.0 / cos(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, 1.3e-155], N[(N[(l / k), $MachinePrecision] * N[(l / N[(t$95$m * N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 0.00066], N[(N[(l / t$95$m), $MachinePrecision] * N[(N[(1.0 / N[(k * k), $MachinePrecision]), $MachinePrecision] / N[(t$95$m * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(2.0 / N[(0.5 + N[(-0.5 * N[Cos[N[(2.0 * k), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(t$95$m * k), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision] / N[(1.0 / N[Cos[k], $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.3 \cdot 10^{-155}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)}\\
\mathbf{elif}\;k \leq 0.00066:\\
\;\;\;\;\frac{\ell}{t\_m} \cdot \frac{\frac{1}{k \cdot k}}{t\_m \cdot \frac{t\_m}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{\frac{2}{0.5 + -0.5 \cdot \cos \left(2 \cdot k\right)}}{\frac{t\_m \cdot k}{\ell \cdot \ell}}}{k}}{\frac{1}{\cos k}}\\
\end{array}
\end{array}
if k < 1.30000000000000004e-155Initial program 59.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
Simplified50.4%
Taylor expanded in k around 0
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6450.1%
Simplified50.1%
associate-*l*N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6467.6%
Applied egg-rr67.6%
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6471.6%
Applied egg-rr71.6%
if 1.30000000000000004e-155 < k < 6.6e-4Initial program 65.9%
pow-to-expN/A
pow2N/A
pow-to-expN/A
div-expN/A
exp-lowering-exp.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f6423.4%
Applied egg-rr23.4%
Taylor expanded in k around 0
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
exp-diffN/A
*-commutativeN/A
exp-to-powN/A
*-commutativeN/A
exp-to-powN/A
/-lowering-/.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6468.8%
Simplified68.8%
div-invN/A
times-fracN/A
times-fracN/A
clear-numN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6490.2%
Applied egg-rr90.2%
if 6.6e-4 < k Initial program 46.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%
Taylor expanded in t around 0
associate-/r*N/A
/-lowering-/.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
cos-lowering-cos.f6467.9%
Simplified67.9%
div-invN/A
associate-/r*N/A
/-lowering-/.f64N/A
Applied egg-rr67.9%
associate-/r*N/A
associate-*r*N/A
associate-/r*N/A
/-lowering-/.f64N/A
Applied egg-rr76.6%
Final simplification75.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 (<= k 1.3e-155)
(* (/ l k) (/ l (* t_m (* t_m (* t_m k)))))
(if (<= k 0.0031)
(* (/ l t_m) (/ (/ 1.0 (* k k)) (* t_m (/ t_m l))))
(/
(/ 2.0 (* (- 0.5 (* 0.5 (cos (* 2.0 k)))) (* k (/ (* t_m k) (* l l)))))
(/ 1.0 (cos 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 <= 1.3e-155) {
tmp = (l / k) * (l / (t_m * (t_m * (t_m * k))));
} else if (k <= 0.0031) {
tmp = (l / t_m) * ((1.0 / (k * k)) / (t_m * (t_m / l)));
} else {
tmp = (2.0 / ((0.5 - (0.5 * cos((2.0 * k)))) * (k * ((t_m * k) / (l * l))))) / (1.0 / cos(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 <= 1.3d-155) then
tmp = (l / k) * (l / (t_m * (t_m * (t_m * k))))
else if (k <= 0.0031d0) then
tmp = (l / t_m) * ((1.0d0 / (k * k)) / (t_m * (t_m / l)))
else
tmp = (2.0d0 / ((0.5d0 - (0.5d0 * cos((2.0d0 * k)))) * (k * ((t_m * k) / (l * l))))) / (1.0d0 / cos(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 <= 1.3e-155) {
tmp = (l / k) * (l / (t_m * (t_m * (t_m * k))));
} else if (k <= 0.0031) {
tmp = (l / t_m) * ((1.0 / (k * k)) / (t_m * (t_m / l)));
} else {
tmp = (2.0 / ((0.5 - (0.5 * Math.cos((2.0 * k)))) * (k * ((t_m * k) / (l * l))))) / (1.0 / Math.cos(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 <= 1.3e-155: tmp = (l / k) * (l / (t_m * (t_m * (t_m * k)))) elif k <= 0.0031: tmp = (l / t_m) * ((1.0 / (k * k)) / (t_m * (t_m / l))) else: tmp = (2.0 / ((0.5 - (0.5 * math.cos((2.0 * k)))) * (k * ((t_m * k) / (l * l))))) / (1.0 / math.cos(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 <= 1.3e-155) tmp = Float64(Float64(l / k) * Float64(l / Float64(t_m * Float64(t_m * Float64(t_m * k))))); elseif (k <= 0.0031) tmp = Float64(Float64(l / t_m) * Float64(Float64(1.0 / Float64(k * k)) / Float64(t_m * Float64(t_m / l)))); else tmp = Float64(Float64(2.0 / Float64(Float64(0.5 - Float64(0.5 * cos(Float64(2.0 * k)))) * Float64(k * Float64(Float64(t_m * k) / Float64(l * l))))) / Float64(1.0 / cos(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 <= 1.3e-155) tmp = (l / k) * (l / (t_m * (t_m * (t_m * k)))); elseif (k <= 0.0031) tmp = (l / t_m) * ((1.0 / (k * k)) / (t_m * (t_m / l))); else tmp = (2.0 / ((0.5 - (0.5 * cos((2.0 * k)))) * (k * ((t_m * k) / (l * l))))) / (1.0 / cos(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, 1.3e-155], N[(N[(l / k), $MachinePrecision] * N[(l / N[(t$95$m * N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 0.0031], N[(N[(l / t$95$m), $MachinePrecision] * N[(N[(1.0 / N[(k * k), $MachinePrecision]), $MachinePrecision] / N[(t$95$m * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[(N[(0.5 - N[(0.5 * N[Cos[N[(2.0 * k), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(k * N[(N[(t$95$m * k), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 / N[Cos[k], $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.3 \cdot 10^{-155}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)}\\
\mathbf{elif}\;k \leq 0.0031:\\
\;\;\;\;\frac{\ell}{t\_m} \cdot \frac{\frac{1}{k \cdot k}}{t\_m \cdot \frac{t\_m}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{2}{\left(0.5 - 0.5 \cdot \cos \left(2 \cdot k\right)\right) \cdot \left(k \cdot \frac{t\_m \cdot k}{\ell \cdot \ell}\right)}}{\frac{1}{\cos k}}\\
\end{array}
\end{array}
if k < 1.30000000000000004e-155Initial program 59.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
Simplified50.4%
Taylor expanded in k around 0
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6450.1%
Simplified50.1%
associate-*l*N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6467.6%
Applied egg-rr67.6%
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6471.6%
Applied egg-rr71.6%
if 1.30000000000000004e-155 < k < 0.00309999999999999989Initial program 65.9%
pow-to-expN/A
pow2N/A
pow-to-expN/A
div-expN/A
exp-lowering-exp.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f6423.4%
Applied egg-rr23.4%
Taylor expanded in k around 0
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
exp-diffN/A
*-commutativeN/A
exp-to-powN/A
*-commutativeN/A
exp-to-powN/A
/-lowering-/.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6468.8%
Simplified68.8%
div-invN/A
times-fracN/A
times-fracN/A
clear-numN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6490.2%
Applied egg-rr90.2%
if 0.00309999999999999989 < k Initial program 46.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%
Taylor expanded in t around 0
associate-/r*N/A
/-lowering-/.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
cos-lowering-cos.f6467.9%
Simplified67.9%
div-invN/A
associate-/r*N/A
/-lowering-/.f64N/A
Applied egg-rr67.9%
associate-*r*N/A
*-lowering-*.f64N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6476.6%
Applied egg-rr76.6%
Final simplification75.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 7e-124)
(/ 2.0 (* k (* k (* (/ t_m (* l l)) (* (sin k) (tan k))))))
(/
2.0
(/
(*
(* t_m (sin k))
(* (* t_m t_m) (* (tan k) (/ (+ 2.0 (/ k (/ (* t_m t_m) k))) l))))
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 <= 7e-124) {
tmp = 2.0 / (k * (k * ((t_m / (l * l)) * (sin(k) * tan(k)))));
} else {
tmp = 2.0 / (((t_m * sin(k)) * ((t_m * t_m) * (tan(k) * ((2.0 + (k / ((t_m * t_m) / k))) / l)))) / 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 <= 7d-124) then
tmp = 2.0d0 / (k * (k * ((t_m / (l * l)) * (sin(k) * tan(k)))))
else
tmp = 2.0d0 / (((t_m * sin(k)) * ((t_m * t_m) * (tan(k) * ((2.0d0 + (k / ((t_m * t_m) / k))) / l)))) / 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 <= 7e-124) {
tmp = 2.0 / (k * (k * ((t_m / (l * l)) * (Math.sin(k) * Math.tan(k)))));
} else {
tmp = 2.0 / (((t_m * Math.sin(k)) * ((t_m * t_m) * (Math.tan(k) * ((2.0 + (k / ((t_m * t_m) / k))) / l)))) / 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 <= 7e-124: tmp = 2.0 / (k * (k * ((t_m / (l * l)) * (math.sin(k) * math.tan(k))))) else: tmp = 2.0 / (((t_m * math.sin(k)) * ((t_m * t_m) * (math.tan(k) * ((2.0 + (k / ((t_m * t_m) / k))) / l)))) / 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 <= 7e-124) tmp = Float64(2.0 / Float64(k * Float64(k * Float64(Float64(t_m / Float64(l * l)) * Float64(sin(k) * tan(k)))))); else tmp = Float64(2.0 / Float64(Float64(Float64(t_m * sin(k)) * Float64(Float64(t_m * t_m) * Float64(tan(k) * Float64(Float64(2.0 + Float64(k / Float64(Float64(t_m * t_m) / k))) / l)))) / 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 <= 7e-124) tmp = 2.0 / (k * (k * ((t_m / (l * l)) * (sin(k) * tan(k))))); else tmp = 2.0 / (((t_m * sin(k)) * ((t_m * t_m) * (tan(k) * ((2.0 + (k / ((t_m * t_m) / k))) / l)))) / 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, 7e-124], N[(2.0 / N[(k * N[(k * N[(N[(t$95$m / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$m * t$95$m), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[(2.0 + N[(k / N[(N[(t$95$m * t$95$m), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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 7 \cdot 10^{-124}:\\
\;\;\;\;\frac{2}{k \cdot \left(k \cdot \left(\frac{t\_m}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\left(t\_m \cdot \sin k\right) \cdot \left(\left(t\_m \cdot t\_m\right) \cdot \left(\tan k \cdot \frac{2 + \frac{k}{\frac{t\_m \cdot t\_m}{k}}}{\ell}\right)\right)}{\ell}}\\
\end{array}
\end{array}
if t < 6.9999999999999997e-124Initial program 50.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
Simplified46.6%
Taylor expanded in t around 0
associate-/r*N/A
/-lowering-/.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
cos-lowering-cos.f6464.4%
Simplified64.4%
associate-/l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-/l*N/A
unpow2N/A
associate-*r/N/A
tan-quotN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
tan-lowering-tan.f6468.7%
Applied egg-rr68.7%
if 6.9999999999999997e-124 < t Initial program 68.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
Simplified60.1%
associate-/l*N/A
associate-*r*N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
Applied egg-rr70.1%
*-commutativeN/A
associate-/r*N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr76.3%
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f64N/A
associate-/r/N/A
associate-*l/N/A
frac-timesN/A
unpow2N/A
metadata-evalN/A
associate-+r+N/A
+-commutativeN/A
Applied egg-rr82.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 (<= k 1.3e-155)
(* (/ l k) (/ l (* t_m (* t_m (* t_m k)))))
(if (<= k 0.0165)
(* (/ l t_m) (/ (/ 1.0 (* k k)) (* t_m (/ t_m l))))
(/ 2.0 (* k (* k (* (/ t_m (* l l)) (* (sin k) (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 (k <= 1.3e-155) {
tmp = (l / k) * (l / (t_m * (t_m * (t_m * k))));
} else if (k <= 0.0165) {
tmp = (l / t_m) * ((1.0 / (k * k)) / (t_m * (t_m / l)));
} else {
tmp = 2.0 / (k * (k * ((t_m / (l * l)) * (sin(k) * 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 (k <= 1.3d-155) then
tmp = (l / k) * (l / (t_m * (t_m * (t_m * k))))
else if (k <= 0.0165d0) then
tmp = (l / t_m) * ((1.0d0 / (k * k)) / (t_m * (t_m / l)))
else
tmp = 2.0d0 / (k * (k * ((t_m / (l * l)) * (sin(k) * 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 (k <= 1.3e-155) {
tmp = (l / k) * (l / (t_m * (t_m * (t_m * k))));
} else if (k <= 0.0165) {
tmp = (l / t_m) * ((1.0 / (k * k)) / (t_m * (t_m / l)));
} else {
tmp = 2.0 / (k * (k * ((t_m / (l * l)) * (Math.sin(k) * 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 k <= 1.3e-155: tmp = (l / k) * (l / (t_m * (t_m * (t_m * k)))) elif k <= 0.0165: tmp = (l / t_m) * ((1.0 / (k * k)) / (t_m * (t_m / l))) else: tmp = 2.0 / (k * (k * ((t_m / (l * l)) * (math.sin(k) * 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 (k <= 1.3e-155) tmp = Float64(Float64(l / k) * Float64(l / Float64(t_m * Float64(t_m * Float64(t_m * k))))); elseif (k <= 0.0165) tmp = Float64(Float64(l / t_m) * Float64(Float64(1.0 / Float64(k * k)) / Float64(t_m * Float64(t_m / l)))); else tmp = Float64(2.0 / Float64(k * Float64(k * Float64(Float64(t_m / Float64(l * l)) * Float64(sin(k) * 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 (k <= 1.3e-155) tmp = (l / k) * (l / (t_m * (t_m * (t_m * k)))); elseif (k <= 0.0165) tmp = (l / t_m) * ((1.0 / (k * k)) / (t_m * (t_m / l))); else tmp = 2.0 / (k * (k * ((t_m / (l * l)) * (sin(k) * 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[k, 1.3e-155], N[(N[(l / k), $MachinePrecision] * N[(l / N[(t$95$m * N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 0.0165], N[(N[(l / t$95$m), $MachinePrecision] * N[(N[(1.0 / N[(k * k), $MachinePrecision]), $MachinePrecision] / N[(t$95$m * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(k * N[(k * N[(N[(t$95$m / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * 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}\;k \leq 1.3 \cdot 10^{-155}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)}\\
\mathbf{elif}\;k \leq 0.0165:\\
\;\;\;\;\frac{\ell}{t\_m} \cdot \frac{\frac{1}{k \cdot k}}{t\_m \cdot \frac{t\_m}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{k \cdot \left(k \cdot \left(\frac{t\_m}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right)\right)}\\
\end{array}
\end{array}
if k < 1.30000000000000004e-155Initial program 59.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
Simplified50.4%
Taylor expanded in k around 0
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6450.1%
Simplified50.1%
associate-*l*N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6467.6%
Applied egg-rr67.6%
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6471.6%
Applied egg-rr71.6%
if 1.30000000000000004e-155 < k < 0.016500000000000001Initial program 65.9%
pow-to-expN/A
pow2N/A
pow-to-expN/A
div-expN/A
exp-lowering-exp.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f6423.4%
Applied egg-rr23.4%
Taylor expanded in k around 0
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
exp-diffN/A
*-commutativeN/A
exp-to-powN/A
*-commutativeN/A
exp-to-powN/A
/-lowering-/.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6468.8%
Simplified68.8%
div-invN/A
times-fracN/A
times-fracN/A
clear-numN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6490.2%
Applied egg-rr90.2%
if 0.016500000000000001 < k Initial program 46.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%
Taylor expanded in t around 0
associate-/r*N/A
/-lowering-/.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
cos-lowering-cos.f6467.9%
Simplified67.9%
associate-/l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-/l*N/A
unpow2N/A
associate-*r/N/A
tan-quotN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
tan-lowering-tan.f6473.9%
Applied egg-rr73.9%
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 (<= k 1.3e-155)
(* (/ l k) (/ l (* t_m (* t_m (* t_m k)))))
(if (<= k 1.2e-25)
(* (/ l t_m) (/ (/ 1.0 (* k k)) (* t_m (/ t_m l))))
(/
(* 2.0 (* l l))
(*
(+
(* 2.0 (* t_m t_m))
(* k (* k (+ 1.0 (* (* t_m t_m) 0.3333333333333333)))))
(* 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 <= 1.3e-155) {
tmp = (l / k) * (l / (t_m * (t_m * (t_m * k))));
} else if (k <= 1.2e-25) {
tmp = (l / t_m) * ((1.0 / (k * k)) / (t_m * (t_m / l)));
} else {
tmp = (2.0 * (l * l)) / (((2.0 * (t_m * t_m)) + (k * (k * (1.0 + ((t_m * t_m) * 0.3333333333333333))))) * (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 <= 1.3d-155) then
tmp = (l / k) * (l / (t_m * (t_m * (t_m * k))))
else if (k <= 1.2d-25) then
tmp = (l / t_m) * ((1.0d0 / (k * k)) / (t_m * (t_m / l)))
else
tmp = (2.0d0 * (l * l)) / (((2.0d0 * (t_m * t_m)) + (k * (k * (1.0d0 + ((t_m * t_m) * 0.3333333333333333d0))))) * (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 <= 1.3e-155) {
tmp = (l / k) * (l / (t_m * (t_m * (t_m * k))));
} else if (k <= 1.2e-25) {
tmp = (l / t_m) * ((1.0 / (k * k)) / (t_m * (t_m / l)));
} else {
tmp = (2.0 * (l * l)) / (((2.0 * (t_m * t_m)) + (k * (k * (1.0 + ((t_m * t_m) * 0.3333333333333333))))) * (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 <= 1.3e-155: tmp = (l / k) * (l / (t_m * (t_m * (t_m * k)))) elif k <= 1.2e-25: tmp = (l / t_m) * ((1.0 / (k * k)) / (t_m * (t_m / l))) else: tmp = (2.0 * (l * l)) / (((2.0 * (t_m * t_m)) + (k * (k * (1.0 + ((t_m * t_m) * 0.3333333333333333))))) * (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 <= 1.3e-155) tmp = Float64(Float64(l / k) * Float64(l / Float64(t_m * Float64(t_m * Float64(t_m * k))))); elseif (k <= 1.2e-25) tmp = Float64(Float64(l / t_m) * Float64(Float64(1.0 / Float64(k * k)) / Float64(t_m * Float64(t_m / l)))); else tmp = Float64(Float64(2.0 * Float64(l * l)) / Float64(Float64(Float64(2.0 * Float64(t_m * t_m)) + Float64(k * Float64(k * Float64(1.0 + Float64(Float64(t_m * t_m) * 0.3333333333333333))))) * 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 <= 1.3e-155) tmp = (l / k) * (l / (t_m * (t_m * (t_m * k)))); elseif (k <= 1.2e-25) tmp = (l / t_m) * ((1.0 / (k * k)) / (t_m * (t_m / l))); else tmp = (2.0 * (l * l)) / (((2.0 * (t_m * t_m)) + (k * (k * (1.0 + ((t_m * t_m) * 0.3333333333333333))))) * (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, 1.3e-155], N[(N[(l / k), $MachinePrecision] * N[(l / N[(t$95$m * N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.2e-25], N[(N[(l / t$95$m), $MachinePrecision] * N[(N[(1.0 / N[(k * k), $MachinePrecision]), $MachinePrecision] / N[(t$95$m * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(l * l), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(2.0 * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] + N[(k * N[(k * N[(1.0 + N[(N[(t$95$m * t$95$m), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * N[(k * k), $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 1.3 \cdot 10^{-155}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)}\\
\mathbf{elif}\;k \leq 1.2 \cdot 10^{-25}:\\
\;\;\;\;\frac{\ell}{t\_m} \cdot \frac{\frac{1}{k \cdot k}}{t\_m \cdot \frac{t\_m}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot \left(\ell \cdot \ell\right)}{\left(2 \cdot \left(t\_m \cdot t\_m\right) + k \cdot \left(k \cdot \left(1 + \left(t\_m \cdot t\_m\right) \cdot 0.3333333333333333\right)\right)\right) \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)}\\
\end{array}
\end{array}
if k < 1.30000000000000004e-155Initial program 59.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
Simplified50.4%
Taylor expanded in k around 0
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6450.1%
Simplified50.1%
associate-*l*N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6467.6%
Applied egg-rr67.6%
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6471.6%
Applied egg-rr71.6%
if 1.30000000000000004e-155 < k < 1.20000000000000005e-25Initial program 65.5%
pow-to-expN/A
pow2N/A
pow-to-expN/A
div-expN/A
exp-lowering-exp.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f6421.4%
Applied egg-rr21.4%
Taylor expanded in k around 0
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
exp-diffN/A
*-commutativeN/A
exp-to-powN/A
*-commutativeN/A
exp-to-powN/A
/-lowering-/.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6469.1%
Simplified69.1%
div-invN/A
times-fracN/A
times-fracN/A
clear-numN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6493.1%
Applied egg-rr93.1%
if 1.20000000000000005e-25 < k Initial program 47.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
Simplified49.0%
associate-*l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-/r*N/A
Applied egg-rr51.8%
Taylor expanded in k around 0
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified54.9%
Taylor expanded in l around 0
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
Simplified61.2%
Final simplification70.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 1.1e-53)
(/
(/ 2.0 t_m)
(*
(/ (* k k) l)
(/
(+
(* 2.0 (* t_m t_m))
(* k (* k (+ 1.0 (* (* t_m t_m) 0.3333333333333333)))))
l)))
(* (/ l k) (/ l (* 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 <= 1.1e-53) {
tmp = (2.0 / t_m) / (((k * k) / l) * (((2.0 * (t_m * t_m)) + (k * (k * (1.0 + ((t_m * t_m) * 0.3333333333333333))))) / l));
} else {
tmp = (l / k) * (l / (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 <= 1.1d-53) then
tmp = (2.0d0 / t_m) / (((k * k) / l) * (((2.0d0 * (t_m * t_m)) + (k * (k * (1.0d0 + ((t_m * t_m) * 0.3333333333333333d0))))) / l))
else
tmp = (l / k) * (l / (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 <= 1.1e-53) {
tmp = (2.0 / t_m) / (((k * k) / l) * (((2.0 * (t_m * t_m)) + (k * (k * (1.0 + ((t_m * t_m) * 0.3333333333333333))))) / l));
} else {
tmp = (l / k) * (l / (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 <= 1.1e-53: tmp = (2.0 / t_m) / (((k * k) / l) * (((2.0 * (t_m * t_m)) + (k * (k * (1.0 + ((t_m * t_m) * 0.3333333333333333))))) / l)) else: tmp = (l / k) * (l / (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 <= 1.1e-53) tmp = Float64(Float64(2.0 / t_m) / Float64(Float64(Float64(k * k) / l) * Float64(Float64(Float64(2.0 * Float64(t_m * t_m)) + Float64(k * Float64(k * Float64(1.0 + Float64(Float64(t_m * t_m) * 0.3333333333333333))))) / l))); else tmp = Float64(Float64(l / k) * Float64(l / 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 <= 1.1e-53) tmp = (2.0 / t_m) / (((k * k) / l) * (((2.0 * (t_m * t_m)) + (k * (k * (1.0 + ((t_m * t_m) * 0.3333333333333333))))) / l)); else tmp = (l / k) * (l / (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, 1.1e-53], N[(N[(2.0 / t$95$m), $MachinePrecision] / N[(N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision] * N[(N[(N[(2.0 * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] + N[(k * N[(k * N[(1.0 + N[(N[(t$95$m * t$95$m), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / k), $MachinePrecision] * N[(l / N[(t$95$m * N[(t$95$m * N[(t$95$m * k), $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.1 \cdot 10^{-53}:\\
\;\;\;\;\frac{\frac{2}{t\_m}}{\frac{k \cdot k}{\ell} \cdot \frac{2 \cdot \left(t\_m \cdot t\_m\right) + k \cdot \left(k \cdot \left(1 + \left(t\_m \cdot t\_m\right) \cdot 0.3333333333333333\right)\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)}\\
\end{array}
\end{array}
if t < 1.10000000000000009e-53Initial program 51.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
Simplified48.2%
associate-*l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-/r*N/A
Applied egg-rr50.2%
Taylor expanded in k around 0
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified54.2%
Taylor expanded in l around 0
unpow2N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified68.6%
if 1.10000000000000009e-53 < t Initial program 66.9%
/-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
Simplified57.9%
Taylor expanded in k around 0
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6456.5%
Simplified56.5%
associate-*l*N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6472.8%
Applied egg-rr72.8%
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6476.6%
Applied egg-rr76.6%
Final simplification71.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
(if (<= k 1.3e-155)
(* (/ l k) (/ l (* t_m (* t_m (* t_m k)))))
(if (<= k 1.38e+54)
(* (/ l t_m) (/ (/ 1.0 (* k k)) (* t_m (/ t_m l))))
(/ (/ 2.0 t_m) (/ (* 2.0 (* t_m (* t_m (* k k)))) (* l 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.3e-155) {
tmp = (l / k) * (l / (t_m * (t_m * (t_m * k))));
} else if (k <= 1.38e+54) {
tmp = (l / t_m) * ((1.0 / (k * k)) / (t_m * (t_m / l)));
} else {
tmp = (2.0 / t_m) / ((2.0 * (t_m * (t_m * (k * k)))) / (l * 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.3d-155) then
tmp = (l / k) * (l / (t_m * (t_m * (t_m * k))))
else if (k <= 1.38d+54) then
tmp = (l / t_m) * ((1.0d0 / (k * k)) / (t_m * (t_m / l)))
else
tmp = (2.0d0 / t_m) / ((2.0d0 * (t_m * (t_m * (k * k)))) / (l * 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.3e-155) {
tmp = (l / k) * (l / (t_m * (t_m * (t_m * k))));
} else if (k <= 1.38e+54) {
tmp = (l / t_m) * ((1.0 / (k * k)) / (t_m * (t_m / l)));
} else {
tmp = (2.0 / t_m) / ((2.0 * (t_m * (t_m * (k * k)))) / (l * 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.3e-155: tmp = (l / k) * (l / (t_m * (t_m * (t_m * k)))) elif k <= 1.38e+54: tmp = (l / t_m) * ((1.0 / (k * k)) / (t_m * (t_m / l))) else: tmp = (2.0 / t_m) / ((2.0 * (t_m * (t_m * (k * k)))) / (l * 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.3e-155) tmp = Float64(Float64(l / k) * Float64(l / Float64(t_m * Float64(t_m * Float64(t_m * k))))); elseif (k <= 1.38e+54) tmp = Float64(Float64(l / t_m) * Float64(Float64(1.0 / Float64(k * k)) / Float64(t_m * Float64(t_m / l)))); else tmp = Float64(Float64(2.0 / t_m) / Float64(Float64(2.0 * Float64(t_m * Float64(t_m * Float64(k * k)))) / Float64(l * 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.3e-155) tmp = (l / k) * (l / (t_m * (t_m * (t_m * k)))); elseif (k <= 1.38e+54) tmp = (l / t_m) * ((1.0 / (k * k)) / (t_m * (t_m / l))); else tmp = (2.0 / t_m) / ((2.0 * (t_m * (t_m * (k * k)))) / (l * 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.3e-155], N[(N[(l / k), $MachinePrecision] * N[(l / N[(t$95$m * N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.38e+54], N[(N[(l / t$95$m), $MachinePrecision] * N[(N[(1.0 / N[(k * k), $MachinePrecision]), $MachinePrecision] / N[(t$95$m * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / t$95$m), $MachinePrecision] / N[(N[(2.0 * N[(t$95$m * N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l * 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.3 \cdot 10^{-155}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)}\\
\mathbf{elif}\;k \leq 1.38 \cdot 10^{+54}:\\
\;\;\;\;\frac{\ell}{t\_m} \cdot \frac{\frac{1}{k \cdot k}}{t\_m \cdot \frac{t\_m}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{2}{t\_m}}{\frac{2 \cdot \left(t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)\right)}{\ell \cdot \ell}}\\
\end{array}
\end{array}
if k < 1.30000000000000004e-155Initial program 59.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
Simplified50.4%
Taylor expanded in k around 0
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6450.1%
Simplified50.1%
associate-*l*N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6467.6%
Applied egg-rr67.6%
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6471.6%
Applied egg-rr71.6%
if 1.30000000000000004e-155 < k < 1.38e54Initial program 66.5%
pow-to-expN/A
pow2N/A
pow-to-expN/A
div-expN/A
exp-lowering-exp.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f6424.9%
Applied egg-rr24.9%
Taylor expanded in k around 0
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
exp-diffN/A
*-commutativeN/A
exp-to-powN/A
*-commutativeN/A
exp-to-powN/A
/-lowering-/.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6468.3%
Simplified68.3%
div-invN/A
times-fracN/A
times-fracN/A
clear-numN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6482.5%
Applied egg-rr82.5%
if 1.38e54 < k Initial program 38.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
Simplified38.7%
associate-*l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
associate-/r*N/A
Applied egg-rr42.5%
Taylor expanded in k around 0
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified47.1%
Taylor expanded in k around 0
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6454.9%
Simplified54.9%
Final simplification70.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 (<= k 1.3e-155)
(* (/ l k) (/ l (* t_m (* t_m (* t_m k)))))
(* (/ l t_m) (/ (/ 1.0 (* k k)) (* 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.3e-155) {
tmp = (l / k) * (l / (t_m * (t_m * (t_m * k))));
} else {
tmp = (l / t_m) * ((1.0 / (k * k)) / (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.3d-155) then
tmp = (l / k) * (l / (t_m * (t_m * (t_m * k))))
else
tmp = (l / t_m) * ((1.0d0 / (k * k)) / (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.3e-155) {
tmp = (l / k) * (l / (t_m * (t_m * (t_m * k))));
} else {
tmp = (l / t_m) * ((1.0 / (k * k)) / (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.3e-155: tmp = (l / k) * (l / (t_m * (t_m * (t_m * k)))) else: tmp = (l / t_m) * ((1.0 / (k * k)) / (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.3e-155) tmp = Float64(Float64(l / k) * Float64(l / Float64(t_m * Float64(t_m * Float64(t_m * k))))); else tmp = Float64(Float64(l / t_m) * Float64(Float64(1.0 / Float64(k * k)) / Float64(t_m * 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 (k <= 1.3e-155) tmp = (l / k) * (l / (t_m * (t_m * (t_m * k)))); else tmp = (l / t_m) * ((1.0 / (k * k)) / (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.3e-155], N[(N[(l / k), $MachinePrecision] * N[(l / N[(t$95$m * N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / t$95$m), $MachinePrecision] * N[(N[(1.0 / N[(k * k), $MachinePrecision]), $MachinePrecision] / N[(t$95$m * N[(t$95$m / l), $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 1.3 \cdot 10^{-155}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{t\_m} \cdot \frac{\frac{1}{k \cdot k}}{t\_m \cdot \frac{t\_m}{\ell}}\\
\end{array}
\end{array}
if k < 1.30000000000000004e-155Initial program 59.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
Simplified50.4%
Taylor expanded in k around 0
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6450.1%
Simplified50.1%
associate-*l*N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6467.6%
Applied egg-rr67.6%
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6471.6%
Applied egg-rr71.6%
if 1.30000000000000004e-155 < k Initial program 52.5%
pow-to-expN/A
pow2N/A
pow-to-expN/A
div-expN/A
exp-lowering-exp.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f6420.1%
Applied egg-rr20.1%
Taylor expanded in k around 0
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
exp-diffN/A
*-commutativeN/A
exp-to-powN/A
*-commutativeN/A
exp-to-powN/A
/-lowering-/.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6453.6%
Simplified53.6%
div-invN/A
times-fracN/A
times-fracN/A
clear-numN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6467.0%
Applied egg-rr67.0%
Final simplification69.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 (* 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(Float64(Float64(Float64(Float64(l / k) / t_m) / t_m) / 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[(N[(N[(N[(N[(l / k), $MachinePrecision] / t$95$m), $MachinePrecision] / t$95$m), $MachinePrecision] / t$95$m), $MachinePrecision] / k), $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{\frac{\frac{\frac{\frac{\ell}{k}}{t\_m}}{t\_m}}{t\_m}}{k}\right)
\end{array}
Initial program 56.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
Simplified51.3%
Taylor expanded in k around 0
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6451.5%
Simplified51.5%
associate-*l*N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6463.7%
Applied egg-rr63.7%
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6462.3%
Applied egg-rr62.3%
associate-/r*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6469.5%
Applied egg-rr69.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) (* 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(Float64(Float64(Float64(l / k) / Float64(t_m * t_m)) / 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[(N[(N[(N[(l / k), $MachinePrecision] / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision] / k), $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{\frac{\frac{\frac{\ell}{k}}{t\_m \cdot t\_m}}{t\_m}}{k}\right)
\end{array}
Initial program 56.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
Simplified51.3%
Taylor expanded in k around 0
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6451.5%
Simplified51.5%
associate-*l*N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6463.7%
Applied egg-rr63.7%
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6462.3%
Applied egg-rr62.3%
associate-*r*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6464.1%
Applied egg-rr64.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 (* t_m (* k (* 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 / (t_m * (k * (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 / (t_m * (k * (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 / (t_m * (k * (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 / (t_m * (k * (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(Float64(l / Float64(t_m * Float64(k * Float64(t_m * 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 / (t_m * (k * (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[(N[(l / N[(t$95$m * N[(k * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $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{\frac{\ell}{t\_m \cdot \left(k \cdot \left(t\_m \cdot t\_m\right)\right)}}{k}\right)
\end{array}
Initial program 56.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
Simplified51.3%
Taylor expanded in k around 0
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6451.5%
Simplified51.5%
associate-*l*N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6463.7%
Applied egg-rr63.7%
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6462.3%
Applied egg-rr62.3%
associate-/l/N/A
/-lowering-/.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6464.0%
Applied egg-rr64.0%
Final simplification64.0%
herbie shell --seed 2024161
(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))))