
(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 16 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 2.25e-23)
(/ (* (* 2.0 (* l l)) (cos k)) (* (pow (sin k) 2.0) (* t_m (* k k))))
(/
2.0
(*
(* (* (sin k) (/ t_m l)) (* (/ t_m l) (* t_m (tan k))))
(+ 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 <= 2.25e-23) {
tmp = ((2.0 * (l * l)) * cos(k)) / (pow(sin(k), 2.0) * (t_m * (k * k)));
} else {
tmp = 2.0 / (((sin(k) * (t_m / l)) * ((t_m / l) * (t_m * tan(k)))) * (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 <= 2.25d-23) then
tmp = ((2.0d0 * (l * l)) * cos(k)) / ((sin(k) ** 2.0d0) * (t_m * (k * k)))
else
tmp = 2.0d0 / (((sin(k) * (t_m / l)) * ((t_m / l) * (t_m * tan(k)))) * (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 <= 2.25e-23) {
tmp = ((2.0 * (l * l)) * Math.cos(k)) / (Math.pow(Math.sin(k), 2.0) * (t_m * (k * k)));
} else {
tmp = 2.0 / (((Math.sin(k) * (t_m / l)) * ((t_m / l) * (t_m * Math.tan(k)))) * (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 <= 2.25e-23: tmp = ((2.0 * (l * l)) * math.cos(k)) / (math.pow(math.sin(k), 2.0) * (t_m * (k * k))) else: tmp = 2.0 / (((math.sin(k) * (t_m / l)) * ((t_m / l) * (t_m * math.tan(k)))) * (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 <= 2.25e-23) tmp = Float64(Float64(Float64(2.0 * Float64(l * l)) * cos(k)) / Float64((sin(k) ^ 2.0) * Float64(t_m * Float64(k * k)))); else tmp = Float64(2.0 / Float64(Float64(Float64(sin(k) * Float64(t_m / l)) * Float64(Float64(t_m / l) * Float64(t_m * tan(k)))) * 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 <= 2.25e-23) tmp = ((2.0 * (l * l)) * cos(k)) / ((sin(k) ^ 2.0) * (t_m * (k * k))); else tmp = 2.0 / (((sin(k) * (t_m / l)) * ((t_m / l) * (t_m * tan(k)))) * (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, 2.25e-23], N[(N[(N[(2.0 * N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Sin[k], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$m / l), $MachinePrecision] * N[(t$95$m * N[Tan[k], $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 2.25 \cdot 10^{-23}:\\
\;\;\;\;\frac{\left(2 \cdot \left(\ell \cdot \ell\right)\right) \cdot \cos k}{{\sin k}^{2} \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(\sin k \cdot \frac{t\_m}{\ell}\right) \cdot \left(\frac{t\_m}{\ell} \cdot \left(t\_m \cdot \tan k\right)\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right)}\\
\end{array}
\end{array}
if t < 2.24999999999999987e-23Initial program 53.0%
Taylor expanded in t around 0
associate-*r/N/A
lower-/.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-cos.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6466.7
Applied rewrites66.7%
if 2.24999999999999987e-23 < t Initial program 75.3%
lift-/.f64N/A
lift-pow.f64N/A
pow-to-expN/A
lift-*.f64N/A
pow2N/A
pow-to-expN/A
div-expN/A
lower-exp.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f6444.3
Applied rewrites44.3%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
lift-*.f64N/A
*-commutativeN/A
lift-log.f64N/A
pow-to-expN/A
lift-*.f64N/A
lift-log.f64N/A
pow-to-expN/A
pow2N/A
lift-*.f64N/A
Applied rewrites88.9%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6495.6
Applied rewrites95.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 2.25e-23)
(/ (* (* 2.0 (* l l)) (cos k)) (* (pow (sin k) 2.0) (* t_m (* k k))))
(if (<= t_m 5.6e+102)
(*
(/ l (* (tan k) (fma k (/ k (* t_m t_m)) 2.0)))
(* 2.0 (/ l (* (sin k) (* t_m (* t_m t_m))))))
(/
2.0
(*
(* (/ t_m l) (* (/ t_m l) (* (sin k) (* t_m (tan k)))))
(fma k (* (/ k t_m) (/ 1.0 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 <= 2.25e-23) {
tmp = ((2.0 * (l * l)) * cos(k)) / (pow(sin(k), 2.0) * (t_m * (k * k)));
} else if (t_m <= 5.6e+102) {
tmp = (l / (tan(k) * fma(k, (k / (t_m * t_m)), 2.0))) * (2.0 * (l / (sin(k) * (t_m * (t_m * t_m)))));
} else {
tmp = 2.0 / (((t_m / l) * ((t_m / l) * (sin(k) * (t_m * tan(k))))) * fma(k, ((k / t_m) * (1.0 / 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 <= 2.25e-23) tmp = Float64(Float64(Float64(2.0 * Float64(l * l)) * cos(k)) / Float64((sin(k) ^ 2.0) * Float64(t_m * Float64(k * k)))); elseif (t_m <= 5.6e+102) tmp = Float64(Float64(l / Float64(tan(k) * fma(k, Float64(k / Float64(t_m * t_m)), 2.0))) * Float64(2.0 * Float64(l / Float64(sin(k) * Float64(t_m * Float64(t_m * t_m)))))); else tmp = Float64(2.0 / Float64(Float64(Float64(t_m / l) * Float64(Float64(t_m / l) * Float64(sin(k) * Float64(t_m * tan(k))))) * fma(k, Float64(Float64(k / t_m) * Float64(1.0 / t_m)), 2.0))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2.25e-23], N[(N[(N[(2.0 * N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.6e+102], N[(N[(l / N[(N[Tan[k], $MachinePrecision] * N[(k * N[(k / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(l / N[(N[Sin[k], $MachinePrecision] * N[(t$95$m * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(t$95$m / l), $MachinePrecision] * N[(N[(t$95$m / l), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(t$95$m * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(k * N[(N[(k / t$95$m), $MachinePrecision] * N[(1.0 / t$95$m), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.25 \cdot 10^{-23}:\\
\;\;\;\;\frac{\left(2 \cdot \left(\ell \cdot \ell\right)\right) \cdot \cos k}{{\sin k}^{2} \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)}\\
\mathbf{elif}\;t\_m \leq 5.6 \cdot 10^{+102}:\\
\;\;\;\;\frac{\ell}{\tan k \cdot \mathsf{fma}\left(k, \frac{k}{t\_m \cdot t\_m}, 2\right)} \cdot \left(2 \cdot \frac{\ell}{\sin k \cdot \left(t\_m \cdot \left(t\_m \cdot t\_m\right)\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\frac{t\_m}{\ell} \cdot \left(\frac{t\_m}{\ell} \cdot \left(\sin k \cdot \left(t\_m \cdot \tan k\right)\right)\right)\right) \cdot \mathsf{fma}\left(k, \frac{k}{t\_m} \cdot \frac{1}{t\_m}, 2\right)}\\
\end{array}
\end{array}
if t < 2.24999999999999987e-23Initial program 53.0%
Taylor expanded in t around 0
associate-*r/N/A
lower-/.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-cos.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6466.7
Applied rewrites66.7%
if 2.24999999999999987e-23 < t < 5.60000000000000037e102Initial program 81.1%
lift-/.f64N/A
lift-pow.f64N/A
pow-to-expN/A
lift-*.f64N/A
pow2N/A
pow-to-expN/A
div-expN/A
lower-exp.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f6447.6
Applied rewrites47.6%
Applied rewrites92.5%
if 5.60000000000000037e102 < t Initial program 71.9%
lift-/.f64N/A
lift-pow.f64N/A
pow-to-expN/A
lift-*.f64N/A
pow2N/A
pow-to-expN/A
div-expN/A
lower-exp.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f6442.4
Applied rewrites42.4%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
lift-*.f64N/A
*-commutativeN/A
lift-log.f64N/A
pow-to-expN/A
lift-*.f64N/A
lift-log.f64N/A
pow-to-expN/A
pow2N/A
lift-*.f64N/A
Applied rewrites91.2%
lift-+.f64N/A
lift-+.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-/.f64N/A
unpow2N/A
lift-/.f64N/A
lift-/.f64N/A
times-fracN/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
+-commutativeN/A
associate-+l+N/A
metadata-evalN/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
lift-/.f64N/A
div-invN/A
associate-*l*N/A
Applied rewrites91.2%
Final simplification73.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 3.7e-186)
(/
2.0
(* 2.0 (* (* t_m (* (sin k) (tan k))) (/ 1.0 (/ (* l (/ l t_m)) t_m)))))
(if (<= t_m 6e-104)
(/
2.0
(*
(+ 1.0 (+ 1.0 (pow (/ k t_m) 2.0)))
(*
(/ t_m l)
(*
(/ t_m l)
(*
k
(*
k
(fma
(* k k)
(* t_m (fma (* k k) 0.08611111111111111 0.16666666666666666))
t_m)))))))
(if (<= t_m 6.8e+90)
(*
l
(/
2.0
(*
(* (tan k) (fma k (/ k (* t_m t_m)) 2.0))
(* (sin k) (/ (* t_m (* t_m t_m)) l)))))
(* l (* (/ (/ l k) t_m) (/ (/ 1.0 (* t_m k)) t_m))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 3.7e-186) {
tmp = 2.0 / (2.0 * ((t_m * (sin(k) * tan(k))) * (1.0 / ((l * (l / t_m)) / t_m))));
} else if (t_m <= 6e-104) {
tmp = 2.0 / ((1.0 + (1.0 + pow((k / t_m), 2.0))) * ((t_m / l) * ((t_m / l) * (k * (k * fma((k * k), (t_m * fma((k * k), 0.08611111111111111, 0.16666666666666666)), t_m))))));
} else if (t_m <= 6.8e+90) {
tmp = l * (2.0 / ((tan(k) * fma(k, (k / (t_m * t_m)), 2.0)) * (sin(k) * ((t_m * (t_m * t_m)) / l))));
} else {
tmp = l * (((l / k) / t_m) * ((1.0 / (t_m * k)) / t_m));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 3.7e-186) tmp = Float64(2.0 / Float64(2.0 * Float64(Float64(t_m * Float64(sin(k) * tan(k))) * Float64(1.0 / Float64(Float64(l * Float64(l / t_m)) / t_m))))); elseif (t_m <= 6e-104) tmp = Float64(2.0 / Float64(Float64(1.0 + Float64(1.0 + (Float64(k / t_m) ^ 2.0))) * Float64(Float64(t_m / l) * Float64(Float64(t_m / l) * Float64(k * Float64(k * fma(Float64(k * k), Float64(t_m * fma(Float64(k * k), 0.08611111111111111, 0.16666666666666666)), t_m))))))); elseif (t_m <= 6.8e+90) tmp = Float64(l * Float64(2.0 / Float64(Float64(tan(k) * fma(k, Float64(k / Float64(t_m * t_m)), 2.0)) * Float64(sin(k) * Float64(Float64(t_m * Float64(t_m * t_m)) / l))))); else tmp = Float64(l * Float64(Float64(Float64(l / k) / t_m) * Float64(Float64(1.0 / Float64(t_m * k)) / t_m))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 3.7e-186], N[(2.0 / N[(2.0 * N[(N[(t$95$m * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(N[(l * N[(l / t$95$m), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 6e-104], 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[(t$95$m / l), $MachinePrecision] * N[(N[(t$95$m / l), $MachinePrecision] * N[(k * N[(k * N[(N[(k * k), $MachinePrecision] * N[(t$95$m * N[(N[(k * k), $MachinePrecision] * 0.08611111111111111 + 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 6.8e+90], N[(l * N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(k * N[(k / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[(t$95$m * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(N[(l / k), $MachinePrecision] / t$95$m), $MachinePrecision] * N[(N[(1.0 / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] / t$95$m), $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.7 \cdot 10^{-186}:\\
\;\;\;\;\frac{2}{2 \cdot \left(\left(t\_m \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \frac{1}{\frac{\ell \cdot \frac{\ell}{t\_m}}{t\_m}}\right)}\\
\mathbf{elif}\;t\_m \leq 6 \cdot 10^{-104}:\\
\;\;\;\;\frac{2}{\left(1 + \left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right) \cdot \left(\frac{t\_m}{\ell} \cdot \left(\frac{t\_m}{\ell} \cdot \left(k \cdot \left(k \cdot \mathsf{fma}\left(k \cdot k, t\_m \cdot \mathsf{fma}\left(k \cdot k, 0.08611111111111111, 0.16666666666666666\right), t\_m\right)\right)\right)\right)\right)}\\
\mathbf{elif}\;t\_m \leq 6.8 \cdot 10^{+90}:\\
\;\;\;\;\ell \cdot \frac{2}{\left(\tan k \cdot \mathsf{fma}\left(k, \frac{k}{t\_m \cdot t\_m}, 2\right)\right) \cdot \left(\sin k \cdot \frac{t\_m \cdot \left(t\_m \cdot t\_m\right)}{\ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \left(\frac{\frac{\ell}{k}}{t\_m} \cdot \frac{\frac{1}{t\_m \cdot k}}{t\_m}\right)\\
\end{array}
\end{array}
if t < 3.7000000000000002e-186Initial program 54.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-/.f64N/A
lift-pow.f64N/A
cube-multN/A
associate-/l*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6455.2
Applied rewrites55.2%
Taylor expanded in k around 0
Applied rewrites56.7%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
clear-numN/A
frac-timesN/A
clear-numN/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6462.3
Applied rewrites62.3%
if 3.7000000000000002e-186 < t < 6.0000000000000005e-104Initial program 25.6%
lift-/.f64N/A
lift-pow.f64N/A
pow-to-expN/A
lift-*.f64N/A
pow2N/A
pow-to-expN/A
div-expN/A
lower-exp.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f6433.8
Applied rewrites33.8%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
lift-*.f64N/A
*-commutativeN/A
lift-log.f64N/A
pow-to-expN/A
lift-*.f64N/A
lift-log.f64N/A
pow-to-expN/A
pow2N/A
lift-*.f64N/A
Applied rewrites65.5%
Taylor expanded in k around 0
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r*N/A
distribute-rgt-outN/A
lower-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6470.7
Applied rewrites70.7%
if 6.0000000000000005e-104 < t < 6.80000000000000036e90Initial program 75.6%
lift-/.f64N/A
lift-pow.f64N/A
pow-to-expN/A
lift-*.f64N/A
pow2N/A
pow-to-expN/A
div-expN/A
lower-exp.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f6435.4
Applied rewrites35.4%
Applied rewrites80.8%
if 6.80000000000000036e90 < t Initial program 71.7%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6458.9
Applied rewrites58.9%
Applied rewrites76.0%
Applied rewrites88.2%
Applied rewrites95.9%
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 2.75e-45)
(/
2.0
(*
(+ 1.0 (+ 1.0 (pow (/ k t_m) 2.0)))
(* (* (/ t_m l) (* t_m (tan k))) (* k (/ t_m l)))))
(/
2.0
(*
t_m
(*
(/ t_m l)
(*
(/ t_m l)
(* (sin k) (* (tan k) (fma k (/ k (* t_m 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 (k <= 2.75e-45) {
tmp = 2.0 / ((1.0 + (1.0 + pow((k / t_m), 2.0))) * (((t_m / l) * (t_m * tan(k))) * (k * (t_m / l))));
} else {
tmp = 2.0 / (t_m * ((t_m / l) * ((t_m / l) * (sin(k) * (tan(k) * fma(k, (k / (t_m * 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 (k <= 2.75e-45) tmp = Float64(2.0 / Float64(Float64(1.0 + Float64(1.0 + (Float64(k / t_m) ^ 2.0))) * Float64(Float64(Float64(t_m / l) * Float64(t_m * tan(k))) * Float64(k * Float64(t_m / l))))); else tmp = Float64(2.0 / Float64(t_m * Float64(Float64(t_m / l) * Float64(Float64(t_m / l) * Float64(sin(k) * Float64(tan(k) * fma(k, Float64(k / Float64(t_m * t_m)), 2.0))))))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 2.75e-45], 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[(N[(t$95$m / l), $MachinePrecision] * N[(t$95$m * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(k * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(t$95$m * N[(N[(t$95$m / l), $MachinePrecision] * N[(N[(t$95$m / l), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(k * N[(k / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision]), $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.75 \cdot 10^{-45}:\\
\;\;\;\;\frac{2}{\left(1 + \left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right) \cdot \left(\left(\frac{t\_m}{\ell} \cdot \left(t\_m \cdot \tan k\right)\right) \cdot \left(k \cdot \frac{t\_m}{\ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t\_m \cdot \left(\frac{t\_m}{\ell} \cdot \left(\frac{t\_m}{\ell} \cdot \left(\sin k \cdot \left(\tan k \cdot \mathsf{fma}\left(k, \frac{k}{t\_m \cdot t\_m}, 2\right)\right)\right)\right)\right)}\\
\end{array}
\end{array}
if k < 2.75000000000000015e-45Initial program 60.4%
lift-/.f64N/A
lift-pow.f64N/A
pow-to-expN/A
lift-*.f64N/A
pow2N/A
pow-to-expN/A
div-expN/A
lower-exp.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f6421.4
Applied rewrites21.4%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
lift-*.f64N/A
*-commutativeN/A
lift-log.f64N/A
pow-to-expN/A
lift-*.f64N/A
lift-log.f64N/A
pow-to-expN/A
pow2N/A
lift-*.f64N/A
Applied rewrites74.3%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6480.3
Applied rewrites80.3%
Taylor expanded in k around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f6477.5
Applied rewrites77.5%
if 2.75000000000000015e-45 < k Initial program 57.0%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
associate-*l*N/A
lift-/.f64N/A
lift-pow.f64N/A
cube-multN/A
associate-/l*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites54.9%
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
associate-*l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f6469.6
lift-+.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
lift-/.f64N/A
lift-/.f64N/A
unpow2N/A
lift-pow.f64N/A
Applied rewrites77.4%
Final simplification77.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 (* t_m (tan k))))
(*
t_s
(if (<= l 2.9e+65)
(/
2.0
(*
(+ 1.0 (+ 1.0 (pow (/ k t_m) 2.0)))
(* (* (/ t_m l) t_2) (* k (/ t_m l)))))
(/ 2.0 (* (/ t_m l) (* (* (/ t_m l) (* (sin k) t_2)) 2.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = t_m * tan(k);
double tmp;
if (l <= 2.9e+65) {
tmp = 2.0 / ((1.0 + (1.0 + pow((k / t_m), 2.0))) * (((t_m / l) * t_2) * (k * (t_m / l))));
} else {
tmp = 2.0 / ((t_m / l) * (((t_m / l) * (sin(k) * t_2)) * 2.0));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_2
real(8) :: tmp
t_2 = t_m * tan(k)
if (l <= 2.9d+65) then
tmp = 2.0d0 / ((1.0d0 + (1.0d0 + ((k / t_m) ** 2.0d0))) * (((t_m / l) * t_2) * (k * (t_m / l))))
else
tmp = 2.0d0 / ((t_m / l) * (((t_m / l) * (sin(k) * t_2)) * 2.0d0))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = t_m * Math.tan(k);
double tmp;
if (l <= 2.9e+65) {
tmp = 2.0 / ((1.0 + (1.0 + Math.pow((k / t_m), 2.0))) * (((t_m / l) * t_2) * (k * (t_m / l))));
} else {
tmp = 2.0 / ((t_m / l) * (((t_m / l) * (Math.sin(k) * t_2)) * 2.0));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): t_2 = t_m * math.tan(k) tmp = 0 if l <= 2.9e+65: tmp = 2.0 / ((1.0 + (1.0 + math.pow((k / t_m), 2.0))) * (((t_m / l) * t_2) * (k * (t_m / l)))) else: tmp = 2.0 / ((t_m / l) * (((t_m / l) * (math.sin(k) * t_2)) * 2.0)) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(t_m * tan(k)) tmp = 0.0 if (l <= 2.9e+65) tmp = Float64(2.0 / Float64(Float64(1.0 + Float64(1.0 + (Float64(k / t_m) ^ 2.0))) * Float64(Float64(Float64(t_m / l) * t_2) * Float64(k * Float64(t_m / l))))); else tmp = Float64(2.0 / Float64(Float64(t_m / l) * Float64(Float64(Float64(t_m / l) * Float64(sin(k) * t_2)) * 2.0))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) t_2 = t_m * tan(k); tmp = 0.0; if (l <= 2.9e+65) tmp = 2.0 / ((1.0 + (1.0 + ((k / t_m) ^ 2.0))) * (((t_m / l) * t_2) * (k * (t_m / l)))); else tmp = 2.0 / ((t_m / l) * (((t_m / l) * (sin(k) * t_2)) * 2.0)); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(t$95$m * N[Tan[k], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[l, 2.9e+65], 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[(N[(t$95$m / l), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(k * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(t$95$m / l), $MachinePrecision] * N[(N[(N[(t$95$m / l), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision] * 2.0), $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 := t\_m \cdot \tan k\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \leq 2.9 \cdot 10^{+65}:\\
\;\;\;\;\frac{2}{\left(1 + \left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right) \cdot \left(\left(\frac{t\_m}{\ell} \cdot t\_2\right) \cdot \left(k \cdot \frac{t\_m}{\ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{t\_m}{\ell} \cdot \left(\left(\frac{t\_m}{\ell} \cdot \left(\sin k \cdot t\_2\right)\right) \cdot 2\right)}\\
\end{array}
\end{array}
\end{array}
if l < 2.9e65Initial program 61.5%
lift-/.f64N/A
lift-pow.f64N/A
pow-to-expN/A
lift-*.f64N/A
pow2N/A
pow-to-expN/A
div-expN/A
lower-exp.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f6417.5
Applied rewrites17.5%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-exp.f64N/A
lift--.f64N/A
exp-diffN/A
lift-*.f64N/A
*-commutativeN/A
lift-log.f64N/A
pow-to-expN/A
lift-*.f64N/A
lift-log.f64N/A
pow-to-expN/A
pow2N/A
lift-*.f64N/A
Applied rewrites76.8%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6481.7
Applied rewrites81.7%
Taylor expanded in k around 0
associate-/l*N/A
lower-*.f64N/A
lower-/.f6478.5
Applied rewrites78.5%
if 2.9e65 < l Initial program 50.0%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-/.f64N/A
lift-pow.f64N/A
cube-multN/A
associate-/l*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6452.1
Applied rewrites52.1%
Taylor expanded in k around 0
Applied rewrites60.4%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
lift-/.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
Applied rewrites71.8%
Final simplification77.2%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 1e-145)
(* l (* (/ (/ l k) t_m) (/ (/ 1.0 (* t_m k)) t_m)))
(if (<= k 1.36e+121)
(/ 2.0 (* (/ t_m l) (* (* (/ t_m l) (* (sin k) (* t_m (tan k)))) 2.0)))
(/ (/ (/ (* l l) (* k (* t_m k))) 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) {
double tmp;
if (k <= 1e-145) {
tmp = l * (((l / k) / t_m) * ((1.0 / (t_m * k)) / t_m));
} else if (k <= 1.36e+121) {
tmp = 2.0 / ((t_m / l) * (((t_m / l) * (sin(k) * (t_m * tan(k)))) * 2.0));
} else {
tmp = (((l * l) / (k * (t_m * k))) / t_m) / t_m;
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 1d-145) then
tmp = l * (((l / k) / t_m) * ((1.0d0 / (t_m * k)) / t_m))
else if (k <= 1.36d+121) then
tmp = 2.0d0 / ((t_m / l) * (((t_m / l) * (sin(k) * (t_m * tan(k)))) * 2.0d0))
else
tmp = (((l * l) / (k * (t_m * k))) / t_m) / t_m
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1e-145) {
tmp = l * (((l / k) / t_m) * ((1.0 / (t_m * k)) / t_m));
} else if (k <= 1.36e+121) {
tmp = 2.0 / ((t_m / l) * (((t_m / l) * (Math.sin(k) * (t_m * Math.tan(k)))) * 2.0));
} else {
tmp = (((l * l) / (k * (t_m * k))) / t_m) / t_m;
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 1e-145: tmp = l * (((l / k) / t_m) * ((1.0 / (t_m * k)) / t_m)) elif k <= 1.36e+121: tmp = 2.0 / ((t_m / l) * (((t_m / l) * (math.sin(k) * (t_m * math.tan(k)))) * 2.0)) else: tmp = (((l * l) / (k * (t_m * k))) / t_m) / t_m return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1e-145) tmp = Float64(l * Float64(Float64(Float64(l / k) / t_m) * Float64(Float64(1.0 / Float64(t_m * k)) / t_m))); elseif (k <= 1.36e+121) tmp = Float64(2.0 / Float64(Float64(t_m / l) * Float64(Float64(Float64(t_m / l) * Float64(sin(k) * Float64(t_m * tan(k)))) * 2.0))); else tmp = Float64(Float64(Float64(Float64(l * l) / Float64(k * Float64(t_m * k))) / t_m) / t_m); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 1e-145) tmp = l * (((l / k) / t_m) * ((1.0 / (t_m * k)) / t_m)); elseif (k <= 1.36e+121) tmp = 2.0 / ((t_m / l) * (((t_m / l) * (sin(k) * (t_m * tan(k)))) * 2.0)); else tmp = (((l * l) / (k * (t_m * k))) / t_m) / t_m; end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1e-145], N[(l * N[(N[(N[(l / k), $MachinePrecision] / t$95$m), $MachinePrecision] * N[(N[(1.0 / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.36e+121], N[(2.0 / N[(N[(t$95$m / l), $MachinePrecision] * N[(N[(N[(t$95$m / l), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(t$95$m * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(l * l), $MachinePrecision] / N[(k * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision] / t$95$m), $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 10^{-145}:\\
\;\;\;\;\ell \cdot \left(\frac{\frac{\ell}{k}}{t\_m} \cdot \frac{\frac{1}{t\_m \cdot k}}{t\_m}\right)\\
\mathbf{elif}\;k \leq 1.36 \cdot 10^{+121}:\\
\;\;\;\;\frac{2}{\frac{t\_m}{\ell} \cdot \left(\left(\frac{t\_m}{\ell} \cdot \left(\sin k \cdot \left(t\_m \cdot \tan k\right)\right)\right) \cdot 2\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{\ell \cdot \ell}{k \cdot \left(t\_m \cdot k\right)}}{t\_m}}{t\_m}\\
\end{array}
\end{array}
if k < 9.99999999999999915e-146Initial program 60.1%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6455.2
Applied rewrites55.2%
Applied rewrites64.9%
Applied rewrites70.9%
Applied rewrites76.1%
if 9.99999999999999915e-146 < k < 1.36e121Initial program 57.8%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-/.f64N/A
lift-pow.f64N/A
cube-multN/A
associate-/l*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6459.5
Applied rewrites59.5%
Taylor expanded in k around 0
Applied rewrites60.0%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
lift-/.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
Applied rewrites78.4%
if 1.36e121 < k Initial program 58.1%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6454.7
Applied rewrites54.7%
Applied rewrites55.4%
Applied rewrites57.4%
Applied rewrites68.2%
Final simplification75.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 3.2e-72)
(* l (* (/ (/ l k) t_m) (/ (/ 1.0 (* t_m k)) t_m)))
(if (<= k 1.36e+121)
(/ 2.0 (* t_m (* (/ (* t_m (/ t_m l)) l) (* (sin k) (* (tan k) 2.0)))))
(/ (/ (/ (* l l) (* k (* t_m k))) 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) {
double tmp;
if (k <= 3.2e-72) {
tmp = l * (((l / k) / t_m) * ((1.0 / (t_m * k)) / t_m));
} else if (k <= 1.36e+121) {
tmp = 2.0 / (t_m * (((t_m * (t_m / l)) / l) * (sin(k) * (tan(k) * 2.0))));
} else {
tmp = (((l * l) / (k * (t_m * k))) / t_m) / t_m;
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 3.2d-72) then
tmp = l * (((l / k) / t_m) * ((1.0d0 / (t_m * k)) / t_m))
else if (k <= 1.36d+121) then
tmp = 2.0d0 / (t_m * (((t_m * (t_m / l)) / l) * (sin(k) * (tan(k) * 2.0d0))))
else
tmp = (((l * l) / (k * (t_m * k))) / t_m) / t_m
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 3.2e-72) {
tmp = l * (((l / k) / t_m) * ((1.0 / (t_m * k)) / t_m));
} else if (k <= 1.36e+121) {
tmp = 2.0 / (t_m * (((t_m * (t_m / l)) / l) * (Math.sin(k) * (Math.tan(k) * 2.0))));
} else {
tmp = (((l * l) / (k * (t_m * k))) / t_m) / t_m;
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 3.2e-72: tmp = l * (((l / k) / t_m) * ((1.0 / (t_m * k)) / t_m)) elif k <= 1.36e+121: tmp = 2.0 / (t_m * (((t_m * (t_m / l)) / l) * (math.sin(k) * (math.tan(k) * 2.0)))) else: tmp = (((l * l) / (k * (t_m * k))) / t_m) / t_m return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 3.2e-72) tmp = Float64(l * Float64(Float64(Float64(l / k) / t_m) * Float64(Float64(1.0 / Float64(t_m * k)) / t_m))); elseif (k <= 1.36e+121) tmp = Float64(2.0 / Float64(t_m * Float64(Float64(Float64(t_m * Float64(t_m / l)) / l) * Float64(sin(k) * Float64(tan(k) * 2.0))))); else tmp = Float64(Float64(Float64(Float64(l * l) / Float64(k * Float64(t_m * k))) / t_m) / t_m); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 3.2e-72) tmp = l * (((l / k) / t_m) * ((1.0 / (t_m * k)) / t_m)); elseif (k <= 1.36e+121) tmp = 2.0 / (t_m * (((t_m * (t_m / l)) / l) * (sin(k) * (tan(k) * 2.0)))); else tmp = (((l * l) / (k * (t_m * k))) / t_m) / t_m; end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 3.2e-72], N[(l * N[(N[(N[(l / k), $MachinePrecision] / t$95$m), $MachinePrecision] * N[(N[(1.0 / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.36e+121], N[(2.0 / N[(t$95$m * N[(N[(N[(t$95$m * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(l * l), $MachinePrecision] / N[(k * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision] / t$95$m), $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 3.2 \cdot 10^{-72}:\\
\;\;\;\;\ell \cdot \left(\frac{\frac{\ell}{k}}{t\_m} \cdot \frac{\frac{1}{t\_m \cdot k}}{t\_m}\right)\\
\mathbf{elif}\;k \leq 1.36 \cdot 10^{+121}:\\
\;\;\;\;\frac{2}{t\_m \cdot \left(\frac{t\_m \cdot \frac{t\_m}{\ell}}{\ell} \cdot \left(\sin k \cdot \left(\tan k \cdot 2\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{\ell \cdot \ell}{k \cdot \left(t\_m \cdot k\right)}}{t\_m}}{t\_m}\\
\end{array}
\end{array}
if k < 3.19999999999999999e-72Initial program 59.6%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6455.2
Applied rewrites55.2%
Applied rewrites65.1%
Applied rewrites70.5%
Applied rewrites76.8%
if 3.19999999999999999e-72 < k < 1.36e121Initial program 58.8%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
associate-*l*N/A
lift-/.f64N/A
lift-pow.f64N/A
cube-multN/A
associate-/l*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites61.3%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f6480.9
Applied rewrites80.9%
Taylor expanded in k around 0
Applied rewrites74.2%
if 1.36e121 < k Initial program 58.1%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6454.7
Applied rewrites54.7%
Applied rewrites55.4%
Applied rewrites57.4%
Applied rewrites68.2%
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.35e-24)
(* l (* (/ (/ l k) t_m) (/ (/ 1.0 (* t_m k)) t_m)))
(if (<= k 6.8e+139)
(/ 2.0 (* 2.0 (* (* t_m (* (sin k) (tan k))) (* t_m (/ t_m (* l l))))))
(/ (/ (/ (* l l) (* k (* t_m k))) 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) {
double tmp;
if (k <= 1.35e-24) {
tmp = l * (((l / k) / t_m) * ((1.0 / (t_m * k)) / t_m));
} else if (k <= 6.8e+139) {
tmp = 2.0 / (2.0 * ((t_m * (sin(k) * tan(k))) * (t_m * (t_m / (l * l)))));
} else {
tmp = (((l * l) / (k * (t_m * k))) / t_m) / t_m;
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 1.35d-24) then
tmp = l * (((l / k) / t_m) * ((1.0d0 / (t_m * k)) / t_m))
else if (k <= 6.8d+139) then
tmp = 2.0d0 / (2.0d0 * ((t_m * (sin(k) * tan(k))) * (t_m * (t_m / (l * l)))))
else
tmp = (((l * l) / (k * (t_m * k))) / t_m) / t_m
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.35e-24) {
tmp = l * (((l / k) / t_m) * ((1.0 / (t_m * k)) / t_m));
} else if (k <= 6.8e+139) {
tmp = 2.0 / (2.0 * ((t_m * (Math.sin(k) * Math.tan(k))) * (t_m * (t_m / (l * l)))));
} else {
tmp = (((l * l) / (k * (t_m * k))) / t_m) / t_m;
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 1.35e-24: tmp = l * (((l / k) / t_m) * ((1.0 / (t_m * k)) / t_m)) elif k <= 6.8e+139: tmp = 2.0 / (2.0 * ((t_m * (math.sin(k) * math.tan(k))) * (t_m * (t_m / (l * l))))) else: tmp = (((l * l) / (k * (t_m * k))) / t_m) / t_m return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1.35e-24) tmp = Float64(l * Float64(Float64(Float64(l / k) / t_m) * Float64(Float64(1.0 / Float64(t_m * k)) / t_m))); elseif (k <= 6.8e+139) tmp = Float64(2.0 / Float64(2.0 * Float64(Float64(t_m * Float64(sin(k) * tan(k))) * Float64(t_m * Float64(t_m / Float64(l * l)))))); else tmp = Float64(Float64(Float64(Float64(l * l) / Float64(k * Float64(t_m * k))) / t_m) / t_m); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 1.35e-24) tmp = l * (((l / k) / t_m) * ((1.0 / (t_m * k)) / t_m)); elseif (k <= 6.8e+139) tmp = 2.0 / (2.0 * ((t_m * (sin(k) * tan(k))) * (t_m * (t_m / (l * l))))); else tmp = (((l * l) / (k * (t_m * k))) / t_m) / t_m; end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1.35e-24], N[(l * N[(N[(N[(l / k), $MachinePrecision] / t$95$m), $MachinePrecision] * N[(N[(1.0 / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 6.8e+139], N[(2.0 / N[(2.0 * N[(N[(t$95$m * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * N[(t$95$m / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(l * l), $MachinePrecision] / N[(k * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision] / t$95$m), $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.35 \cdot 10^{-24}:\\
\;\;\;\;\ell \cdot \left(\frac{\frac{\ell}{k}}{t\_m} \cdot \frac{\frac{1}{t\_m \cdot k}}{t\_m}\right)\\
\mathbf{elif}\;k \leq 6.8 \cdot 10^{+139}:\\
\;\;\;\;\frac{2}{2 \cdot \left(\left(t\_m \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \left(t\_m \cdot \frac{t\_m}{\ell \cdot \ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{\ell \cdot \ell}{k \cdot \left(t\_m \cdot k\right)}}{t\_m}}{t\_m}\\
\end{array}
\end{array}
if k < 1.35000000000000003e-24Initial program 59.7%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6456.1
Applied rewrites56.1%
Applied rewrites65.5%
Applied rewrites70.5%
Applied rewrites77.1%
if 1.35000000000000003e-24 < k < 6.8000000000000005e139Initial program 57.8%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-/.f64N/A
lift-pow.f64N/A
cube-multN/A
associate-/l*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6457.9
Applied rewrites57.9%
Taylor expanded in k around 0
Applied rewrites55.8%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6462.0
Applied rewrites62.0%
if 6.8000000000000005e139 < k Initial program 58.4%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6454.9
Applied rewrites54.9%
Applied rewrites55.5%
Applied rewrites57.6%
Applied rewrites68.9%
Final simplification73.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 2.3e+18)
(* l (* (/ (/ l k) t_m) (/ (/ 1.0 (* t_m k)) t_m)))
(/ (/ (/ (* l l) (* k (* t_m k))) 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) {
double tmp;
if (k <= 2.3e+18) {
tmp = l * (((l / k) / t_m) * ((1.0 / (t_m * k)) / t_m));
} else {
tmp = (((l * l) / (k * (t_m * k))) / t_m) / t_m;
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 2.3d+18) then
tmp = l * (((l / k) / t_m) * ((1.0d0 / (t_m * k)) / t_m))
else
tmp = (((l * l) / (k * (t_m * k))) / t_m) / t_m
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 2.3e+18) {
tmp = l * (((l / k) / t_m) * ((1.0 / (t_m * k)) / t_m));
} else {
tmp = (((l * l) / (k * (t_m * k))) / t_m) / t_m;
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 2.3e+18: tmp = l * (((l / k) / t_m) * ((1.0 / (t_m * k)) / t_m)) else: tmp = (((l * l) / (k * (t_m * k))) / t_m) / t_m return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 2.3e+18) tmp = Float64(l * Float64(Float64(Float64(l / k) / t_m) * Float64(Float64(1.0 / Float64(t_m * k)) / t_m))); else tmp = Float64(Float64(Float64(Float64(l * l) / Float64(k * Float64(t_m * k))) / t_m) / t_m); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 2.3e+18) tmp = l * (((l / k) / t_m) * ((1.0 / (t_m * k)) / t_m)); else tmp = (((l * l) / (k * (t_m * k))) / t_m) / t_m; end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 2.3e+18], N[(l * N[(N[(N[(l / k), $MachinePrecision] / t$95$m), $MachinePrecision] * N[(N[(1.0 / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(l * l), $MachinePrecision] / N[(k * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision] / t$95$m), $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.3 \cdot 10^{+18}:\\
\;\;\;\;\ell \cdot \left(\frac{\frac{\ell}{k}}{t\_m} \cdot \frac{\frac{1}{t\_m \cdot k}}{t\_m}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{\ell \cdot \ell}{k \cdot \left(t\_m \cdot k\right)}}{t\_m}}{t\_m}\\
\end{array}
\end{array}
if k < 2.3e18Initial program 59.7%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6456.8
Applied rewrites56.8%
Applied rewrites65.9%
Applied rewrites70.8%
Applied rewrites77.2%
if 2.3e18 < k Initial program 58.0%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6452.4
Applied rewrites52.4%
Applied rewrites54.2%
Applied rewrites55.6%
Applied rewrites62.7%
Final simplification72.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 2.3e+18)
(* l (/ l (* t_m (* (* t_m k) (* t_m k)))))
(/ (/ (/ (* l l) (* k (* t_m k))) 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) {
double tmp;
if (k <= 2.3e+18) {
tmp = l * (l / (t_m * ((t_m * k) * (t_m * k))));
} else {
tmp = (((l * l) / (k * (t_m * k))) / t_m) / t_m;
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 2.3d+18) then
tmp = l * (l / (t_m * ((t_m * k) * (t_m * k))))
else
tmp = (((l * l) / (k * (t_m * k))) / t_m) / t_m
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 2.3e+18) {
tmp = l * (l / (t_m * ((t_m * k) * (t_m * k))));
} else {
tmp = (((l * l) / (k * (t_m * k))) / t_m) / t_m;
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 2.3e+18: tmp = l * (l / (t_m * ((t_m * k) * (t_m * k)))) else: tmp = (((l * l) / (k * (t_m * k))) / t_m) / t_m return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 2.3e+18) tmp = Float64(l * Float64(l / Float64(t_m * Float64(Float64(t_m * k) * Float64(t_m * k))))); else tmp = Float64(Float64(Float64(Float64(l * l) / Float64(k * Float64(t_m * k))) / t_m) / t_m); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 2.3e+18) tmp = l * (l / (t_m * ((t_m * k) * (t_m * k)))); else tmp = (((l * l) / (k * (t_m * k))) / t_m) / t_m; end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 2.3e+18], N[(l * N[(l / N[(t$95$m * N[(N[(t$95$m * k), $MachinePrecision] * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(l * l), $MachinePrecision] / N[(k * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision] / t$95$m), $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.3 \cdot 10^{+18}:\\
\;\;\;\;\ell \cdot \frac{\ell}{t\_m \cdot \left(\left(t\_m \cdot k\right) \cdot \left(t\_m \cdot k\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{\ell \cdot \ell}{k \cdot \left(t\_m \cdot k\right)}}{t\_m}}{t\_m}\\
\end{array}
\end{array}
if k < 2.3e18Initial program 59.7%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6456.8
Applied rewrites56.8%
Applied rewrites65.9%
Applied rewrites70.8%
Applied rewrites73.9%
if 2.3e18 < k Initial program 58.0%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6452.4
Applied rewrites52.4%
Applied rewrites54.2%
Applied rewrites55.6%
Applied rewrites62.7%
Final simplification70.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 8e-240)
(* (/ l (* k (* t_m t_m))) (/ l (* t_m k)))
(/ (* l (/ l (* t_m (* k (* t_m k))))) t_m))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 8e-240) {
tmp = (l / (k * (t_m * t_m))) * (l / (t_m * k));
} else {
tmp = (l * (l / (t_m * (k * (t_m * k))))) / t_m;
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 8d-240) then
tmp = (l / (k * (t_m * t_m))) * (l / (t_m * k))
else
tmp = (l * (l / (t_m * (k * (t_m * k))))) / t_m
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 8e-240) {
tmp = (l / (k * (t_m * t_m))) * (l / (t_m * k));
} else {
tmp = (l * (l / (t_m * (k * (t_m * k))))) / t_m;
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 8e-240: tmp = (l / (k * (t_m * t_m))) * (l / (t_m * k)) else: tmp = (l * (l / (t_m * (k * (t_m * k))))) / t_m return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 8e-240) tmp = Float64(Float64(l / Float64(k * Float64(t_m * t_m))) * Float64(l / Float64(t_m * k))); else tmp = Float64(Float64(l * Float64(l / Float64(t_m * Float64(k * Float64(t_m * k))))) / t_m); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 8e-240) tmp = (l / (k * (t_m * t_m))) * (l / (t_m * k)); else tmp = (l * (l / (t_m * (k * (t_m * k))))) / t_m; end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 8e-240], N[(N[(l / N[(k * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l * N[(l / N[(t$95$m * N[(k * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $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 8 \cdot 10^{-240}:\\
\;\;\;\;\frac{\ell}{k \cdot \left(t\_m \cdot t\_m\right)} \cdot \frac{\ell}{t\_m \cdot k}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell \cdot \frac{\ell}{t\_m \cdot \left(k \cdot \left(t\_m \cdot k\right)\right)}}{t\_m}\\
\end{array}
\end{array}
if k < 7.9999999999999998e-240Initial program 58.5%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6453.6
Applied rewrites53.6%
Applied rewrites62.4%
Applied rewrites67.8%
Applied rewrites69.3%
if 7.9999999999999998e-240 < k Initial program 59.8%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6457.2
Applied rewrites57.2%
Applied rewrites62.3%
Applied rewrites64.6%
Applied rewrites71.2%
Final simplification70.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 (<= k 6.2e-114)
(* l (/ l (* t_m (* (* t_m k) (* t_m k)))))
(* (/ l t_m) (/ l (* 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 <= 6.2e-114) {
tmp = l * (l / (t_m * ((t_m * k) * (t_m * k))));
} else {
tmp = (l / t_m) * (l / (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 <= 6.2d-114) then
tmp = l * (l / (t_m * ((t_m * k) * (t_m * k))))
else
tmp = (l / t_m) * (l / (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 <= 6.2e-114) {
tmp = l * (l / (t_m * ((t_m * k) * (t_m * k))));
} else {
tmp = (l / t_m) * (l / (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 <= 6.2e-114: tmp = l * (l / (t_m * ((t_m * k) * (t_m * k)))) else: tmp = (l / t_m) * (l / (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 <= 6.2e-114) tmp = Float64(l * Float64(l / Float64(t_m * Float64(Float64(t_m * k) * Float64(t_m * k))))); else tmp = Float64(Float64(l / t_m) * Float64(l / 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 <= 6.2e-114) tmp = l * (l / (t_m * ((t_m * k) * (t_m * k)))); else tmp = (l / t_m) * (l / (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, 6.2e-114], N[(l * N[(l / N[(t$95$m * N[(N[(t$95$m * k), $MachinePrecision] * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / t$95$m), $MachinePrecision] * N[(l / N[(t$95$m * N[(t$95$m * N[(k * 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}\;k \leq 6.2 \cdot 10^{-114}:\\
\;\;\;\;\ell \cdot \frac{\ell}{t\_m \cdot \left(\left(t\_m \cdot k\right) \cdot \left(t\_m \cdot k\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{t\_m} \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)}\\
\end{array}
\end{array}
if k < 6.2e-114Initial program 59.8%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6455.1
Applied rewrites55.1%
Applied rewrites65.1%
Applied rewrites70.8%
Applied rewrites73.2%
if 6.2e-114 < k Initial program 58.3%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6455.9
Applied rewrites55.9%
Applied rewrites67.8%
Final simplification71.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 2.25e+179)
(* l (/ l (* t_m (* (* t_m k) (* t_m 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 <= 2.25e+179) {
tmp = l * (l / (t_m * ((t_m * k) * (t_m * 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 <= 2.25d+179) then
tmp = l * (l / (t_m * ((t_m * k) * (t_m * 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 <= 2.25e+179) {
tmp = l * (l / (t_m * ((t_m * k) * (t_m * 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 <= 2.25e+179: tmp = l * (l / (t_m * ((t_m * k) * (t_m * 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 <= 2.25e+179) tmp = Float64(l * Float64(l / Float64(t_m * Float64(Float64(t_m * k) * Float64(t_m * k))))); else tmp = Float64(Float64(l * 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 <= 2.25e+179) tmp = l * (l / (t_m * ((t_m * k) * (t_m * 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, 2.25e+179], N[(l * N[(l / N[(t$95$m * N[(N[(t$95$m * k), $MachinePrecision] * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l * l), $MachinePrecision] / N[(t$95$m * N[(t$95$m * N[(t$95$m * N[(k * 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}\;k \leq 2.25 \cdot 10^{+179}:\\
\;\;\;\;\ell \cdot \frac{\ell}{t\_m \cdot \left(\left(t\_m \cdot k\right) \cdot \left(t\_m \cdot k\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell \cdot \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.2500000000000001e179Initial program 60.5%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6456.1
Applied rewrites56.1%
Applied rewrites64.0%
Applied rewrites68.0%
Applied rewrites70.5%
if 2.2500000000000001e179 < k Initial program 51.7%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6451.7
Applied rewrites51.7%
Applied rewrites68.5%
Final simplification70.2%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (* l (/ l (* t_m (* (* t_m k) (* 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 * ((t_m * k) * (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 * ((t_m * k) * (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 * ((t_m * k) * (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 * ((t_m * k) * (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(t_m * Float64(Float64(t_m * k) * 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 / (t_m * ((t_m * k) * (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[(t$95$m * N[(N[(t$95$m * k), $MachinePrecision] * 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 \left(\ell \cdot \frac{\ell}{t\_m \cdot \left(\left(t\_m \cdot k\right) \cdot \left(t\_m \cdot k\right)\right)}\right)
\end{array}
Initial program 59.2%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6455.4
Applied rewrites55.4%
Applied rewrites62.4%
Applied rewrites66.2%
Applied rewrites68.7%
Final simplification68.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(l / Float64(k * Float64(Float64(t_m * 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[(N[(t$95$m * t$95$m), $MachinePrecision] * 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 \left(\ell \cdot \frac{\ell}{k \cdot \left(\left(t\_m \cdot t\_m\right) \cdot \left(t\_m \cdot k\right)\right)}\right)
\end{array}
Initial program 59.2%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6455.4
Applied rewrites55.4%
Applied rewrites62.4%
Applied rewrites66.2%
Final simplification66.2%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (* l (/ l (* 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 59.2%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6455.4
Applied rewrites55.4%
Applied rewrites62.4%
Final simplification62.4%
herbie shell --seed 2024233
(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))))