
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* (* 2.0 n) U) (- (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) - ((n * ((l / om) ** 2.0d0)) * (u - u_42)))))
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * Math.pow((l / Om), 2.0)) * (U - U_42_)))));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * math.pow((l / Om), 2.0)) * (U - U_42_)))))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * ((l / Om) ^ 2.0)) * (U - U_42_))))); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* (* 2.0 n) U) (- (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) - ((n * ((l / om) ** 2.0d0)) * (u - u_42)))))
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * Math.pow((l / Om), 2.0)) * (U - U_42_)))));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * math.pow((l / Om), 2.0)) * (U - U_42_)))))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * ((l / Om) ^ 2.0)) * (U - U_42_))))); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\end{array}
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (/ (* l l) Om))
(t_2 (pow (/ l Om) 2.0))
(t_3 (* (- (* (- U* U) (* t_2 n)) (- (* t_1 2.0) t)) (* U (* n 2.0)))))
(if (<= t_3 0.0)
(*
(sqrt (* U 2.0))
(sqrt (* (- (fma t_1 -2.0 t) (* (* (- U U*) n) t_2)) n)))
(if (<= t_3 2e+297)
(sqrt t_3)
(sqrt
(fma
(* (* (* l U) (* (/ l Om) n)) (fma (- U U*) (/ n Om) 2.0))
-2.0
(* (* (* t n) U) 2.0)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (l * l) / Om;
double t_2 = pow((l / Om), 2.0);
double t_3 = (((U_42_ - U) * (t_2 * n)) - ((t_1 * 2.0) - t)) * (U * (n * 2.0));
double tmp;
if (t_3 <= 0.0) {
tmp = sqrt((U * 2.0)) * sqrt(((fma(t_1, -2.0, t) - (((U - U_42_) * n) * t_2)) * n));
} else if (t_3 <= 2e+297) {
tmp = sqrt(t_3);
} else {
tmp = sqrt(fma((((l * U) * ((l / Om) * n)) * fma((U - U_42_), (n / Om), 2.0)), -2.0, (((t * n) * U) * 2.0)));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(l * l) / Om) t_2 = Float64(l / Om) ^ 2.0 t_3 = Float64(Float64(Float64(Float64(U_42_ - U) * Float64(t_2 * n)) - Float64(Float64(t_1 * 2.0) - t)) * Float64(U * Float64(n * 2.0))) tmp = 0.0 if (t_3 <= 0.0) tmp = Float64(sqrt(Float64(U * 2.0)) * sqrt(Float64(Float64(fma(t_1, -2.0, t) - Float64(Float64(Float64(U - U_42_) * n) * t_2)) * n))); elseif (t_3 <= 2e+297) tmp = sqrt(t_3); else tmp = sqrt(fma(Float64(Float64(Float64(l * U) * Float64(Float64(l / Om) * n)) * fma(Float64(U - U_42_), Float64(n / Om), 2.0)), -2.0, Float64(Float64(Float64(t * n) * U) * 2.0))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(U$42$ - U), $MachinePrecision] * N[(t$95$2 * n), $MachinePrecision]), $MachinePrecision] - N[(N[(t$95$1 * 2.0), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] * N[(U * N[(n * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[(N[Sqrt[N[(U * 2.0), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(N[(N[(t$95$1 * -2.0 + t), $MachinePrecision] - N[(N[(N[(U - U$42$), $MachinePrecision] * n), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision] * n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 2e+297], N[Sqrt[t$95$3], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(l * U), $MachinePrecision] * N[(N[(l / Om), $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision] * N[(N[(U - U$42$), $MachinePrecision] * N[(n / Om), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision] * -2.0 + N[(N[(N[(t * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell \cdot \ell}{Om}\\
t_2 := {\left(\frac{\ell}{Om}\right)}^{2}\\
t_3 := \left(\left(U* - U\right) \cdot \left(t\_2 \cdot n\right) - \left(t\_1 \cdot 2 - t\right)\right) \cdot \left(U \cdot \left(n \cdot 2\right)\right)\\
\mathbf{if}\;t\_3 \leq 0:\\
\;\;\;\;\sqrt{U \cdot 2} \cdot \sqrt{\left(\mathsf{fma}\left(t\_1, -2, t\right) - \left(\left(U - U*\right) \cdot n\right) \cdot t\_2\right) \cdot n}\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+297}:\\
\;\;\;\;\sqrt{t\_3}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\left(\left(\ell \cdot U\right) \cdot \left(\frac{\ell}{Om} \cdot n\right)\right) \cdot \mathsf{fma}\left(U - U*, \frac{n}{Om}, 2\right), -2, \left(\left(t \cdot n\right) \cdot U\right) \cdot 2\right)}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 0.0Initial program 7.9%
lift-sqrt.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
sqrt-prodN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
Applied rewrites31.8%
lift-*.f64N/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
sqrt-unprodN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
sqrt-prodN/A
pow1/2N/A
lower-*.f64N/A
Applied rewrites38.5%
if 0.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 2e297Initial program 98.8%
if 2e297 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) Initial program 20.0%
Taylor expanded in t around 0
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites30.7%
Applied rewrites39.8%
Applied rewrites46.5%
Applied rewrites47.4%
Final simplification65.9%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1
(*
(-
(* (- U* U) (* (pow (/ l Om) 2.0) n))
(- (* (/ (* l l) Om) 2.0) t))
(* U (* n 2.0)))))
(if (<= t_1 0.0)
(sqrt
(*
(fma
-2.0
(* (/ (* (- 2.0 (/ (* U* n) Om)) n) Om) (* l l))
(* (* t n) 2.0))
U))
(if (<= t_1 2e+297)
(sqrt t_1)
(sqrt
(fma
(* (* (* l U) (* (/ l Om) n)) (fma (- U U*) (/ n Om) 2.0))
-2.0
(* (* (* t n) U) 2.0)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (((U_42_ - U) * (pow((l / Om), 2.0) * n)) - ((((l * l) / Om) * 2.0) - t)) * (U * (n * 2.0));
double tmp;
if (t_1 <= 0.0) {
tmp = sqrt((fma(-2.0, ((((2.0 - ((U_42_ * n) / Om)) * n) / Om) * (l * l)), ((t * n) * 2.0)) * U));
} else if (t_1 <= 2e+297) {
tmp = sqrt(t_1);
} else {
tmp = sqrt(fma((((l * U) * ((l / Om) * n)) * fma((U - U_42_), (n / Om), 2.0)), -2.0, (((t * n) * U) * 2.0)));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(Float64(Float64(U_42_ - U) * Float64((Float64(l / Om) ^ 2.0) * n)) - Float64(Float64(Float64(Float64(l * l) / Om) * 2.0) - t)) * Float64(U * Float64(n * 2.0))) tmp = 0.0 if (t_1 <= 0.0) tmp = sqrt(Float64(fma(-2.0, Float64(Float64(Float64(Float64(2.0 - Float64(Float64(U_42_ * n) / Om)) * n) / Om) * Float64(l * l)), Float64(Float64(t * n) * 2.0)) * U)); elseif (t_1 <= 2e+297) tmp = sqrt(t_1); else tmp = sqrt(fma(Float64(Float64(Float64(l * U) * Float64(Float64(l / Om) * n)) * fma(Float64(U - U_42_), Float64(n / Om), 2.0)), -2.0, Float64(Float64(Float64(t * n) * U) * 2.0))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(N[(N[(U$42$ - U), $MachinePrecision] * N[(N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] * 2.0), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] * N[(U * N[(n * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 0.0], N[Sqrt[N[(N[(-2.0 * N[(N[(N[(N[(2.0 - N[(N[(U$42$ * n), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] * n), $MachinePrecision] / Om), $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision] + N[(N[(t * n), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$1, 2e+297], N[Sqrt[t$95$1], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(l * U), $MachinePrecision] * N[(N[(l / Om), $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision] * N[(N[(U - U$42$), $MachinePrecision] * N[(n / Om), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision] * -2.0 + N[(N[(N[(t * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(U* - U\right) \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot n\right) - \left(\frac{\ell \cdot \ell}{Om} \cdot 2 - t\right)\right) \cdot \left(U \cdot \left(n \cdot 2\right)\right)\\
\mathbf{if}\;t\_1 \leq 0:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(-2, \frac{\left(2 - \frac{U* \cdot n}{Om}\right) \cdot n}{Om} \cdot \left(\ell \cdot \ell\right), \left(t \cdot n\right) \cdot 2\right) \cdot U}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+297}:\\
\;\;\;\;\sqrt{t\_1}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\left(\left(\ell \cdot U\right) \cdot \left(\frac{\ell}{Om} \cdot n\right)\right) \cdot \mathsf{fma}\left(U - U*, \frac{n}{Om}, 2\right), -2, \left(\left(t \cdot n\right) \cdot U\right) \cdot 2\right)}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 0.0Initial program 7.9%
Taylor expanded in t around 0
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites37.6%
Taylor expanded in U around 0
Applied rewrites37.7%
if 0.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 2e297Initial program 98.8%
if 2e297 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) Initial program 20.0%
Taylor expanded in t around 0
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites30.7%
Applied rewrites39.8%
Applied rewrites46.5%
Applied rewrites47.4%
Final simplification65.8%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* U (* n 2.0)))
(t_2 (fma (- U U*) (/ n Om) 2.0))
(t_3 (/ (* l l) Om))
(t_4
(sqrt
(*
(- (* (- U* U) (* (pow (/ l Om) 2.0) n)) (- (* t_3 2.0) t))
t_1))))
(if (<= t_4 0.0)
(* (sqrt (* (* (fma t_3 -2.0 t) n) 2.0)) (sqrt U))
(if (<= t_4 INFINITY)
(sqrt (* (fma (* t_2 (/ l Om)) (- l) t) t_1))
(sqrt (* (* (/ (* t_2 (* l l)) Om) n) (* -2.0 U)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = U * (n * 2.0);
double t_2 = fma((U - U_42_), (n / Om), 2.0);
double t_3 = (l * l) / Om;
double t_4 = sqrt(((((U_42_ - U) * (pow((l / Om), 2.0) * n)) - ((t_3 * 2.0) - t)) * t_1));
double tmp;
if (t_4 <= 0.0) {
tmp = sqrt(((fma(t_3, -2.0, t) * n) * 2.0)) * sqrt(U);
} else if (t_4 <= ((double) INFINITY)) {
tmp = sqrt((fma((t_2 * (l / Om)), -l, t) * t_1));
} else {
tmp = sqrt(((((t_2 * (l * l)) / Om) * n) * (-2.0 * U)));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(U * Float64(n * 2.0)) t_2 = fma(Float64(U - U_42_), Float64(n / Om), 2.0) t_3 = Float64(Float64(l * l) / Om) t_4 = sqrt(Float64(Float64(Float64(Float64(U_42_ - U) * Float64((Float64(l / Om) ^ 2.0) * n)) - Float64(Float64(t_3 * 2.0) - t)) * t_1)) tmp = 0.0 if (t_4 <= 0.0) tmp = Float64(sqrt(Float64(Float64(fma(t_3, -2.0, t) * n) * 2.0)) * sqrt(U)); elseif (t_4 <= Inf) tmp = sqrt(Float64(fma(Float64(t_2 * Float64(l / Om)), Float64(-l), t) * t_1)); else tmp = sqrt(Float64(Float64(Float64(Float64(t_2 * Float64(l * l)) / Om) * n) * Float64(-2.0 * U))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(U * N[(n * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(U - U$42$), $MachinePrecision] * N[(n / Om), $MachinePrecision] + 2.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[(N[(N[(N[(U$42$ - U), $MachinePrecision] * N[(N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision] - N[(N[(t$95$3 * 2.0), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$4, 0.0], N[(N[Sqrt[N[(N[(N[(t$95$3 * -2.0 + t), $MachinePrecision] * n), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] * N[Sqrt[U], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[Sqrt[N[(N[(N[(t$95$2 * N[(l / Om), $MachinePrecision]), $MachinePrecision] * (-l) + t), $MachinePrecision] * t$95$1), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(t$95$2 * N[(l * l), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] * n), $MachinePrecision] * N[(-2.0 * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := U \cdot \left(n \cdot 2\right)\\
t_2 := \mathsf{fma}\left(U - U*, \frac{n}{Om}, 2\right)\\
t_3 := \frac{\ell \cdot \ell}{Om}\\
t_4 := \sqrt{\left(\left(U* - U\right) \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot n\right) - \left(t\_3 \cdot 2 - t\right)\right) \cdot t\_1}\\
\mathbf{if}\;t\_4 \leq 0:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(t\_3, -2, t\right) \cdot n\right) \cdot 2} \cdot \sqrt{U}\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(t\_2 \cdot \frac{\ell}{Om}, -\ell, t\right) \cdot t\_1}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\frac{t\_2 \cdot \left(\ell \cdot \ell\right)}{Om} \cdot n\right) \cdot \left(-2 \cdot U\right)}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 0.0Initial program 8.1%
lift-sqrt.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
sqrt-prodN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
Applied rewrites32.7%
Taylor expanded in n around 0
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-sqrt.f6433.4
Applied rewrites33.4%
Applied rewrites33.7%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < +inf.0Initial program 66.4%
Taylor expanded in t around 0
lower--.f64N/A
+-commutativeN/A
unpow2N/A
associate-/r*N/A
metadata-evalN/A
cancel-sign-sub-invN/A
associate-*r/N/A
div-subN/A
lower-/.f64N/A
Applied rewrites62.1%
Applied rewrites67.8%
if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) Initial program 0.0%
Taylor expanded in t around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites36.3%
Final simplification58.5%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* (/ l Om) n))
(t_2 (/ (* l l) Om))
(t_3 (* U (* n 2.0)))
(t_4
(* (- (* (- U* U) (* (pow (/ l Om) 2.0) n)) (- (* t_2 2.0) t)) t_3)))
(if (<= t_4 0.0)
(sqrt
(*
(fma
-2.0
(* (/ (* (- 2.0 (/ (* U* n) Om)) n) Om) (* l l))
(* (* t n) 2.0))
U))
(if (<= t_4 2e+297)
(sqrt (* (fma (* (- U* U) (/ l Om)) t_1 (fma -2.0 t_2 t)) t_3))
(sqrt
(fma
(* (* (* l U) t_1) (fma (- U U*) (/ n Om) 2.0))
-2.0
(* (* (* t n) U) 2.0)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (l / Om) * n;
double t_2 = (l * l) / Om;
double t_3 = U * (n * 2.0);
double t_4 = (((U_42_ - U) * (pow((l / Om), 2.0) * n)) - ((t_2 * 2.0) - t)) * t_3;
double tmp;
if (t_4 <= 0.0) {
tmp = sqrt((fma(-2.0, ((((2.0 - ((U_42_ * n) / Om)) * n) / Om) * (l * l)), ((t * n) * 2.0)) * U));
} else if (t_4 <= 2e+297) {
tmp = sqrt((fma(((U_42_ - U) * (l / Om)), t_1, fma(-2.0, t_2, t)) * t_3));
} else {
tmp = sqrt(fma((((l * U) * t_1) * fma((U - U_42_), (n / Om), 2.0)), -2.0, (((t * n) * U) * 2.0)));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(l / Om) * n) t_2 = Float64(Float64(l * l) / Om) t_3 = Float64(U * Float64(n * 2.0)) t_4 = Float64(Float64(Float64(Float64(U_42_ - U) * Float64((Float64(l / Om) ^ 2.0) * n)) - Float64(Float64(t_2 * 2.0) - t)) * t_3) tmp = 0.0 if (t_4 <= 0.0) tmp = sqrt(Float64(fma(-2.0, Float64(Float64(Float64(Float64(2.0 - Float64(Float64(U_42_ * n) / Om)) * n) / Om) * Float64(l * l)), Float64(Float64(t * n) * 2.0)) * U)); elseif (t_4 <= 2e+297) tmp = sqrt(Float64(fma(Float64(Float64(U_42_ - U) * Float64(l / Om)), t_1, fma(-2.0, t_2, t)) * t_3)); else tmp = sqrt(fma(Float64(Float64(Float64(l * U) * t_1) * fma(Float64(U - U_42_), Float64(n / Om), 2.0)), -2.0, Float64(Float64(Float64(t * n) * U) * 2.0))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l / Om), $MachinePrecision] * n), $MachinePrecision]}, Block[{t$95$2 = N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$3 = N[(U * N[(n * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(N[(U$42$ - U), $MachinePrecision] * N[(N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision] - N[(N[(t$95$2 * 2.0), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision]}, If[LessEqual[t$95$4, 0.0], N[Sqrt[N[(N[(-2.0 * N[(N[(N[(N[(2.0 - N[(N[(U$42$ * n), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] * n), $MachinePrecision] / Om), $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision] + N[(N[(t * n), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$4, 2e+297], N[Sqrt[N[(N[(N[(N[(U$42$ - U), $MachinePrecision] * N[(l / Om), $MachinePrecision]), $MachinePrecision] * t$95$1 + N[(-2.0 * t$95$2 + t), $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(l * U), $MachinePrecision] * t$95$1), $MachinePrecision] * N[(N[(U - U$42$), $MachinePrecision] * N[(n / Om), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision] * -2.0 + N[(N[(N[(t * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell}{Om} \cdot n\\
t_2 := \frac{\ell \cdot \ell}{Om}\\
t_3 := U \cdot \left(n \cdot 2\right)\\
t_4 := \left(\left(U* - U\right) \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot n\right) - \left(t\_2 \cdot 2 - t\right)\right) \cdot t\_3\\
\mathbf{if}\;t\_4 \leq 0:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(-2, \frac{\left(2 - \frac{U* \cdot n}{Om}\right) \cdot n}{Om} \cdot \left(\ell \cdot \ell\right), \left(t \cdot n\right) \cdot 2\right) \cdot U}\\
\mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+297}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\left(U* - U\right) \cdot \frac{\ell}{Om}, t\_1, \mathsf{fma}\left(-2, t\_2, t\right)\right) \cdot t\_3}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\left(\left(\ell \cdot U\right) \cdot t\_1\right) \cdot \mathsf{fma}\left(U - U*, \frac{n}{Om}, 2\right), -2, \left(\left(t \cdot n\right) \cdot U\right) \cdot 2\right)}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 0.0Initial program 7.9%
Taylor expanded in t around 0
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites37.6%
Taylor expanded in U around 0
Applied rewrites37.7%
if 0.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 2e297Initial program 98.8%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f6497.9
lift--.f64N/A
Applied rewrites97.9%
if 2e297 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) Initial program 20.0%
Taylor expanded in t around 0
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites30.7%
Applied rewrites39.8%
Applied rewrites46.5%
Applied rewrites47.4%
Final simplification65.4%
(FPCore (n U t l Om U*)
:precision binary64
(if (<=
(sqrt
(*
(- (* (- U* U) (* (pow (/ l Om) 2.0) n)) (- (* (/ (* l l) Om) 2.0) t))
(* U (* n 2.0))))
INFINITY)
(sqrt (* (* (fma (* (/ l Om) l) -2.0 t) n) (* U 2.0)))
(sqrt (* (/ (* (* (* l n) (* l n)) (* U* U)) (* Om Om)) 2.0))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (sqrt(((((U_42_ - U) * (pow((l / Om), 2.0) * n)) - ((((l * l) / Om) * 2.0) - t)) * (U * (n * 2.0)))) <= ((double) INFINITY)) {
tmp = sqrt(((fma(((l / Om) * l), -2.0, t) * n) * (U * 2.0)));
} else {
tmp = sqrt((((((l * n) * (l * n)) * (U_42_ * U)) / (Om * Om)) * 2.0));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (sqrt(Float64(Float64(Float64(Float64(U_42_ - U) * Float64((Float64(l / Om) ^ 2.0) * n)) - Float64(Float64(Float64(Float64(l * l) / Om) * 2.0) - t)) * Float64(U * Float64(n * 2.0)))) <= Inf) tmp = sqrt(Float64(Float64(fma(Float64(Float64(l / Om) * l), -2.0, t) * n) * Float64(U * 2.0))); else tmp = sqrt(Float64(Float64(Float64(Float64(Float64(l * n) * Float64(l * n)) * Float64(U_42_ * U)) / Float64(Om * Om)) * 2.0)); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[N[Sqrt[N[(N[(N[(N[(U$42$ - U), $MachinePrecision] * N[(N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] * 2.0), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] * N[(U * N[(n * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], Infinity], N[Sqrt[N[(N[(N[(N[(N[(l / Om), $MachinePrecision] * l), $MachinePrecision] * -2.0 + t), $MachinePrecision] * n), $MachinePrecision] * N[(U * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(N[(l * n), $MachinePrecision] * N[(l * n), $MachinePrecision]), $MachinePrecision] * N[(U$42$ * U), $MachinePrecision]), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sqrt{\left(\left(U* - U\right) \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot n\right) - \left(\frac{\ell \cdot \ell}{Om} \cdot 2 - t\right)\right) \cdot \left(U \cdot \left(n \cdot 2\right)\right)} \leq \infty:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(\frac{\ell}{Om} \cdot \ell, -2, t\right) \cdot n\right) \cdot \left(U \cdot 2\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{\left(\left(\ell \cdot n\right) \cdot \left(\ell \cdot n\right)\right) \cdot \left(U* \cdot U\right)}{Om \cdot Om} \cdot 2}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < +inf.0Initial program 57.2%
lift-sqrt.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
sqrt-prodN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
Applied rewrites29.0%
Taylor expanded in n around 0
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-sqrt.f6453.1
Applied rewrites53.1%
Applied rewrites31.4%
Applied rewrites57.3%
if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) Initial program 0.0%
Taylor expanded in t around 0
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites36.3%
Taylor expanded in U* around inf
lower-*.f64N/A
lower-/.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
unpow2N/A
unswap-sqrN/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6430.1
Applied rewrites30.1%
Final simplification53.2%
(FPCore (n U t l Om U*)
:precision binary64
(if (<=
(sqrt
(*
(- (* (- U* U) (* (pow (/ l Om) 2.0) n)) (- (* (/ (* l l) Om) 2.0) t))
(* U (* n 2.0))))
INFINITY)
(sqrt (* (* (fma (* (/ l Om) l) -2.0 t) n) (* U 2.0)))
(* (/ (* (* (sqrt 2.0) n) l) Om) (sqrt (* U* U)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (sqrt(((((U_42_ - U) * (pow((l / Om), 2.0) * n)) - ((((l * l) / Om) * 2.0) - t)) * (U * (n * 2.0)))) <= ((double) INFINITY)) {
tmp = sqrt(((fma(((l / Om) * l), -2.0, t) * n) * (U * 2.0)));
} else {
tmp = (((sqrt(2.0) * n) * l) / Om) * sqrt((U_42_ * U));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (sqrt(Float64(Float64(Float64(Float64(U_42_ - U) * Float64((Float64(l / Om) ^ 2.0) * n)) - Float64(Float64(Float64(Float64(l * l) / Om) * 2.0) - t)) * Float64(U * Float64(n * 2.0)))) <= Inf) tmp = sqrt(Float64(Float64(fma(Float64(Float64(l / Om) * l), -2.0, t) * n) * Float64(U * 2.0))); else tmp = Float64(Float64(Float64(Float64(sqrt(2.0) * n) * l) / Om) * sqrt(Float64(U_42_ * U))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[N[Sqrt[N[(N[(N[(N[(U$42$ - U), $MachinePrecision] * N[(N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] * 2.0), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] * N[(U * N[(n * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], Infinity], N[Sqrt[N[(N[(N[(N[(N[(l / Om), $MachinePrecision] * l), $MachinePrecision] * -2.0 + t), $MachinePrecision] * n), $MachinePrecision] * N[(U * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] * n), $MachinePrecision] * l), $MachinePrecision] / Om), $MachinePrecision] * N[Sqrt[N[(U$42$ * U), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sqrt{\left(\left(U* - U\right) \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot n\right) - \left(\frac{\ell \cdot \ell}{Om} \cdot 2 - t\right)\right) \cdot \left(U \cdot \left(n \cdot 2\right)\right)} \leq \infty:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(\frac{\ell}{Om} \cdot \ell, -2, t\right) \cdot n\right) \cdot \left(U \cdot 2\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(\sqrt{2} \cdot n\right) \cdot \ell}{Om} \cdot \sqrt{U* \cdot U}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < +inf.0Initial program 57.2%
lift-sqrt.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
sqrt-prodN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
Applied rewrites29.0%
Taylor expanded in n around 0
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-sqrt.f6453.1
Applied rewrites53.1%
Applied rewrites31.4%
Applied rewrites57.3%
if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) Initial program 0.0%
Taylor expanded in U* around inf
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f6422.2
Applied rewrites22.2%
Final simplification51.9%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* U (* n 2.0))))
(if (<=
(sqrt
(*
(-
(* (- U* U) (* (pow (/ l Om) 2.0) n))
(- (* (/ (* l l) Om) 2.0) t))
t_1))
0.0)
(sqrt (* (* (* U 2.0) t) n))
(sqrt (* t t_1)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = U * (n * 2.0);
double tmp;
if (sqrt(((((U_42_ - U) * (pow((l / Om), 2.0) * n)) - ((((l * l) / Om) * 2.0) - t)) * t_1)) <= 0.0) {
tmp = sqrt((((U * 2.0) * t) * n));
} else {
tmp = sqrt((t * t_1));
}
return tmp;
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: t_1
real(8) :: tmp
t_1 = u * (n * 2.0d0)
if (sqrt(((((u_42 - u) * (((l / om) ** 2.0d0) * n)) - ((((l * l) / om) * 2.0d0) - t)) * t_1)) <= 0.0d0) then
tmp = sqrt((((u * 2.0d0) * t) * n))
else
tmp = sqrt((t * t_1))
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = U * (n * 2.0);
double tmp;
if (Math.sqrt(((((U_42_ - U) * (Math.pow((l / Om), 2.0) * n)) - ((((l * l) / Om) * 2.0) - t)) * t_1)) <= 0.0) {
tmp = Math.sqrt((((U * 2.0) * t) * n));
} else {
tmp = Math.sqrt((t * t_1));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): t_1 = U * (n * 2.0) tmp = 0 if math.sqrt(((((U_42_ - U) * (math.pow((l / Om), 2.0) * n)) - ((((l * l) / Om) * 2.0) - t)) * t_1)) <= 0.0: tmp = math.sqrt((((U * 2.0) * t) * n)) else: tmp = math.sqrt((t * t_1)) return tmp
function code(n, U, t, l, Om, U_42_) t_1 = Float64(U * Float64(n * 2.0)) tmp = 0.0 if (sqrt(Float64(Float64(Float64(Float64(U_42_ - U) * Float64((Float64(l / Om) ^ 2.0) * n)) - Float64(Float64(Float64(Float64(l * l) / Om) * 2.0) - t)) * t_1)) <= 0.0) tmp = sqrt(Float64(Float64(Float64(U * 2.0) * t) * n)); else tmp = sqrt(Float64(t * t_1)); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = U * (n * 2.0); tmp = 0.0; if (sqrt(((((U_42_ - U) * (((l / Om) ^ 2.0) * n)) - ((((l * l) / Om) * 2.0) - t)) * t_1)) <= 0.0) tmp = sqrt((((U * 2.0) * t) * n)); else tmp = sqrt((t * t_1)); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(U * N[(n * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Sqrt[N[(N[(N[(N[(U$42$ - U), $MachinePrecision] * N[(N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] * 2.0), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]], $MachinePrecision], 0.0], N[Sqrt[N[(N[(N[(U * 2.0), $MachinePrecision] * t), $MachinePrecision] * n), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(t * t$95$1), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := U \cdot \left(n \cdot 2\right)\\
\mathbf{if}\;\sqrt{\left(\left(U* - U\right) \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot n\right) - \left(\frac{\ell \cdot \ell}{Om} \cdot 2 - t\right)\right) \cdot t\_1} \leq 0:\\
\;\;\;\;\sqrt{\left(\left(U \cdot 2\right) \cdot t\right) \cdot n}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t \cdot t\_1}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 0.0Initial program 8.1%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6427.8
Applied rewrites27.8%
Applied rewrites27.9%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) Initial program 54.7%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6434.3
Applied rewrites34.3%
Applied rewrites34.8%
Final simplification33.9%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (fma (- U U*) (/ n Om) 2.0)))
(if (<= U -1.8e+94)
(sqrt (* (fma (* t_1 (/ l Om)) (- l) t) (* U (* n 2.0))))
(if (<= U 3.3e+99)
(sqrt
(fma (* (* (* (/ l Om) n) t_1) (* l U)) -2.0 (* (* (* t n) U) 2.0)))
(* (sqrt (* (* (fma (/ (* l l) Om) -2.0 t) n) 2.0)) (sqrt U))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = fma((U - U_42_), (n / Om), 2.0);
double tmp;
if (U <= -1.8e+94) {
tmp = sqrt((fma((t_1 * (l / Om)), -l, t) * (U * (n * 2.0))));
} else if (U <= 3.3e+99) {
tmp = sqrt(fma(((((l / Om) * n) * t_1) * (l * U)), -2.0, (((t * n) * U) * 2.0)));
} else {
tmp = sqrt(((fma(((l * l) / Om), -2.0, t) * n) * 2.0)) * sqrt(U);
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = fma(Float64(U - U_42_), Float64(n / Om), 2.0) tmp = 0.0 if (U <= -1.8e+94) tmp = sqrt(Float64(fma(Float64(t_1 * Float64(l / Om)), Float64(-l), t) * Float64(U * Float64(n * 2.0)))); elseif (U <= 3.3e+99) tmp = sqrt(fma(Float64(Float64(Float64(Float64(l / Om) * n) * t_1) * Float64(l * U)), -2.0, Float64(Float64(Float64(t * n) * U) * 2.0))); else tmp = Float64(sqrt(Float64(Float64(fma(Float64(Float64(l * l) / Om), -2.0, t) * n) * 2.0)) * sqrt(U)); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(U - U$42$), $MachinePrecision] * N[(n / Om), $MachinePrecision] + 2.0), $MachinePrecision]}, If[LessEqual[U, -1.8e+94], N[Sqrt[N[(N[(N[(t$95$1 * N[(l / Om), $MachinePrecision]), $MachinePrecision] * (-l) + t), $MachinePrecision] * N[(U * N[(n * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[U, 3.3e+99], N[Sqrt[N[(N[(N[(N[(N[(l / Om), $MachinePrecision] * n), $MachinePrecision] * t$95$1), $MachinePrecision] * N[(l * U), $MachinePrecision]), $MachinePrecision] * -2.0 + N[(N[(N[(t * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(N[(N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] * -2.0 + t), $MachinePrecision] * n), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] * N[Sqrt[U], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(U - U*, \frac{n}{Om}, 2\right)\\
\mathbf{if}\;U \leq -1.8 \cdot 10^{+94}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(t\_1 \cdot \frac{\ell}{Om}, -\ell, t\right) \cdot \left(U \cdot \left(n \cdot 2\right)\right)}\\
\mathbf{elif}\;U \leq 3.3 \cdot 10^{+99}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\left(\left(\frac{\ell}{Om} \cdot n\right) \cdot t\_1\right) \cdot \left(\ell \cdot U\right), -2, \left(\left(t \cdot n\right) \cdot U\right) \cdot 2\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(\frac{\ell \cdot \ell}{Om}, -2, t\right) \cdot n\right) \cdot 2} \cdot \sqrt{U}\\
\end{array}
\end{array}
if U < -1.79999999999999996e94Initial program 62.3%
Taylor expanded in t around 0
lower--.f64N/A
+-commutativeN/A
unpow2N/A
associate-/r*N/A
metadata-evalN/A
cancel-sign-sub-invN/A
associate-*r/N/A
div-subN/A
lower-/.f64N/A
Applied rewrites67.7%
Applied rewrites73.9%
if -1.79999999999999996e94 < U < 3.2999999999999999e99Initial program 43.7%
Taylor expanded in t around 0
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites50.2%
Applied rewrites54.4%
Applied rewrites59.7%
if 3.2999999999999999e99 < U Initial program 65.7%
lift-sqrt.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
sqrt-prodN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
Applied rewrites18.5%
Taylor expanded in n around 0
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-sqrt.f6468.7
Applied rewrites68.7%
Applied rewrites82.4%
Final simplification64.0%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= Om -7.6e-78)
(* (sqrt 2.0) (sqrt (fma (* (* (* -2.0 l) n) (/ l Om)) U (* (* t n) U))))
(if (<= Om 4.5e+47)
(sqrt
(*
(fma
-2.0
(* (/ (* (- 2.0 (/ (* U* n) Om)) n) Om) (* l l))
(* (* t n) 2.0))
U))
(sqrt
(*
(fma (* (fma (- U U*) (/ n Om) 2.0) (/ l Om)) (- l) t)
(* U (* n 2.0)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (Om <= -7.6e-78) {
tmp = sqrt(2.0) * sqrt(fma((((-2.0 * l) * n) * (l / Om)), U, ((t * n) * U)));
} else if (Om <= 4.5e+47) {
tmp = sqrt((fma(-2.0, ((((2.0 - ((U_42_ * n) / Om)) * n) / Om) * (l * l)), ((t * n) * 2.0)) * U));
} else {
tmp = sqrt((fma((fma((U - U_42_), (n / Om), 2.0) * (l / Om)), -l, t) * (U * (n * 2.0))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (Om <= -7.6e-78) tmp = Float64(sqrt(2.0) * sqrt(fma(Float64(Float64(Float64(-2.0 * l) * n) * Float64(l / Om)), U, Float64(Float64(t * n) * U)))); elseif (Om <= 4.5e+47) tmp = sqrt(Float64(fma(-2.0, Float64(Float64(Float64(Float64(2.0 - Float64(Float64(U_42_ * n) / Om)) * n) / Om) * Float64(l * l)), Float64(Float64(t * n) * 2.0)) * U)); else tmp = sqrt(Float64(fma(Float64(fma(Float64(U - U_42_), Float64(n / Om), 2.0) * Float64(l / Om)), Float64(-l), t) * Float64(U * Float64(n * 2.0)))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[Om, -7.6e-78], N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(N[(N[(N[(-2.0 * l), $MachinePrecision] * n), $MachinePrecision] * N[(l / Om), $MachinePrecision]), $MachinePrecision] * U + N[(N[(t * n), $MachinePrecision] * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[Om, 4.5e+47], N[Sqrt[N[(N[(-2.0 * N[(N[(N[(N[(2.0 - N[(N[(U$42$ * n), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] * n), $MachinePrecision] / Om), $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision] + N[(N[(t * n), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(N[(U - U$42$), $MachinePrecision] * N[(n / Om), $MachinePrecision] + 2.0), $MachinePrecision] * N[(l / Om), $MachinePrecision]), $MachinePrecision] * (-l) + t), $MachinePrecision] * N[(U * N[(n * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;Om \leq -7.6 \cdot 10^{-78}:\\
\;\;\;\;\sqrt{2} \cdot \sqrt{\mathsf{fma}\left(\left(\left(-2 \cdot \ell\right) \cdot n\right) \cdot \frac{\ell}{Om}, U, \left(t \cdot n\right) \cdot U\right)}\\
\mathbf{elif}\;Om \leq 4.5 \cdot 10^{+47}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(-2, \frac{\left(2 - \frac{U* \cdot n}{Om}\right) \cdot n}{Om} \cdot \left(\ell \cdot \ell\right), \left(t \cdot n\right) \cdot 2\right) \cdot U}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(U - U*, \frac{n}{Om}, 2\right) \cdot \frac{\ell}{Om}, -\ell, t\right) \cdot \left(U \cdot \left(n \cdot 2\right)\right)}\\
\end{array}
\end{array}
if Om < -7.5999999999999998e-78Initial program 53.6%
lift-sqrt.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
sqrt-prodN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
Applied rewrites32.0%
Taylor expanded in n around 0
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-sqrt.f6455.9
Applied rewrites55.9%
Applied rewrites62.3%
Applied rewrites66.1%
if -7.5999999999999998e-78 < Om < 4.49999999999999979e47Initial program 39.4%
Taylor expanded in t around 0
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites47.3%
Taylor expanded in U around 0
Applied rewrites51.5%
if 4.49999999999999979e47 < Om Initial program 57.9%
Taylor expanded in t around 0
lower--.f64N/A
+-commutativeN/A
unpow2N/A
associate-/r*N/A
metadata-evalN/A
cancel-sign-sub-invN/A
associate-*r/N/A
div-subN/A
lower-/.f64N/A
Applied rewrites58.1%
Applied rewrites66.6%
Final simplification59.8%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= U 1.1e+83)
(sqrt
(*
(fma
(* (* -2.0 U) l)
(* (fma (- U U*) (/ n Om) 2.0) (/ l Om))
(* (* U 2.0) t))
n))
(* (sqrt (* (* (fma (/ (* l l) Om) -2.0 t) n) 2.0)) (sqrt U))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U <= 1.1e+83) {
tmp = sqrt((fma(((-2.0 * U) * l), (fma((U - U_42_), (n / Om), 2.0) * (l / Om)), ((U * 2.0) * t)) * n));
} else {
tmp = sqrt(((fma(((l * l) / Om), -2.0, t) * n) * 2.0)) * sqrt(U);
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U <= 1.1e+83) tmp = sqrt(Float64(fma(Float64(Float64(-2.0 * U) * l), Float64(fma(Float64(U - U_42_), Float64(n / Om), 2.0) * Float64(l / Om)), Float64(Float64(U * 2.0) * t)) * n)); else tmp = Float64(sqrt(Float64(Float64(fma(Float64(Float64(l * l) / Om), -2.0, t) * n) * 2.0)) * sqrt(U)); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U, 1.1e+83], N[Sqrt[N[(N[(N[(N[(-2.0 * U), $MachinePrecision] * l), $MachinePrecision] * N[(N[(N[(U - U$42$), $MachinePrecision] * N[(n / Om), $MachinePrecision] + 2.0), $MachinePrecision] * N[(l / Om), $MachinePrecision]), $MachinePrecision] + N[(N[(U * 2.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] * n), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(N[(N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] * -2.0 + t), $MachinePrecision] * n), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] * N[Sqrt[U], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;U \leq 1.1 \cdot 10^{+83}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\left(-2 \cdot U\right) \cdot \ell, \mathsf{fma}\left(U - U*, \frac{n}{Om}, 2\right) \cdot \frac{\ell}{Om}, \left(U \cdot 2\right) \cdot t\right) \cdot n}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(\frac{\ell \cdot \ell}{Om}, -2, t\right) \cdot n\right) \cdot 2} \cdot \sqrt{U}\\
\end{array}
\end{array}
if U < 1.09999999999999999e83Initial program 46.0%
Taylor expanded in t around 0
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites50.8%
Applied rewrites55.8%
Applied rewrites58.1%
if 1.09999999999999999e83 < U Initial program 64.5%
lift-sqrt.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
sqrt-prodN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
Applied rewrites14.9%
Taylor expanded in n around 0
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-sqrt.f6463.8
Applied rewrites63.8%
Applied rewrites74.8%
Final simplification60.4%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= Om -7.2e-78)
(* (sqrt 2.0) (sqrt (fma (* (* (* -2.0 l) n) (/ l Om)) U (* (* t n) U))))
(if (<= Om 3e+134)
(sqrt
(*
(* (fma (* (- l) l) (/ (fma (- U U*) (/ n Om) 2.0) Om) t) (* n 2.0))
U))
(* (sqrt (* (fma (* (/ l Om) l) -2.0 t) (* U n))) (sqrt 2.0)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (Om <= -7.2e-78) {
tmp = sqrt(2.0) * sqrt(fma((((-2.0 * l) * n) * (l / Om)), U, ((t * n) * U)));
} else if (Om <= 3e+134) {
tmp = sqrt(((fma((-l * l), (fma((U - U_42_), (n / Om), 2.0) / Om), t) * (n * 2.0)) * U));
} else {
tmp = sqrt((fma(((l / Om) * l), -2.0, t) * (U * n))) * sqrt(2.0);
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (Om <= -7.2e-78) tmp = Float64(sqrt(2.0) * sqrt(fma(Float64(Float64(Float64(-2.0 * l) * n) * Float64(l / Om)), U, Float64(Float64(t * n) * U)))); elseif (Om <= 3e+134) tmp = sqrt(Float64(Float64(fma(Float64(Float64(-l) * l), Float64(fma(Float64(U - U_42_), Float64(n / Om), 2.0) / Om), t) * Float64(n * 2.0)) * U)); else tmp = Float64(sqrt(Float64(fma(Float64(Float64(l / Om) * l), -2.0, t) * Float64(U * n))) * sqrt(2.0)); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[Om, -7.2e-78], N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(N[(N[(N[(-2.0 * l), $MachinePrecision] * n), $MachinePrecision] * N[(l / Om), $MachinePrecision]), $MachinePrecision] * U + N[(N[(t * n), $MachinePrecision] * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[Om, 3e+134], N[Sqrt[N[(N[(N[(N[((-l) * l), $MachinePrecision] * N[(N[(N[(U - U$42$), $MachinePrecision] * N[(n / Om), $MachinePrecision] + 2.0), $MachinePrecision] / Om), $MachinePrecision] + t), $MachinePrecision] * N[(n * 2.0), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(N[(N[(l / Om), $MachinePrecision] * l), $MachinePrecision] * -2.0 + t), $MachinePrecision] * N[(U * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;Om \leq -7.2 \cdot 10^{-78}:\\
\;\;\;\;\sqrt{2} \cdot \sqrt{\mathsf{fma}\left(\left(\left(-2 \cdot \ell\right) \cdot n\right) \cdot \frac{\ell}{Om}, U, \left(t \cdot n\right) \cdot U\right)}\\
\mathbf{elif}\;Om \leq 3 \cdot 10^{+134}:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(\left(-\ell\right) \cdot \ell, \frac{\mathsf{fma}\left(U - U*, \frac{n}{Om}, 2\right)}{Om}, t\right) \cdot \left(n \cdot 2\right)\right) \cdot U}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{\ell}{Om} \cdot \ell, -2, t\right) \cdot \left(U \cdot n\right)} \cdot \sqrt{2}\\
\end{array}
\end{array}
if Om < -7.2000000000000005e-78Initial program 53.6%
lift-sqrt.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
sqrt-prodN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
Applied rewrites32.0%
Taylor expanded in n around 0
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-sqrt.f6455.9
Applied rewrites55.9%
Applied rewrites62.3%
Applied rewrites66.1%
if -7.2000000000000005e-78 < Om < 2.99999999999999997e134Initial program 40.9%
Taylor expanded in t around 0
lower--.f64N/A
+-commutativeN/A
unpow2N/A
associate-/r*N/A
metadata-evalN/A
cancel-sign-sub-invN/A
associate-*r/N/A
div-subN/A
lower-/.f64N/A
Applied rewrites43.5%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites45.5%
if 2.99999999999999997e134 < Om Initial program 62.6%
lift-sqrt.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
sqrt-prodN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
Applied rewrites16.0%
Taylor expanded in n around 0
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-sqrt.f6460.3
Applied rewrites60.3%
Applied rewrites43.7%
Applied rewrites75.1%
Final simplification56.9%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= n -2.6e+15)
(sqrt (* (- t (/ (* (/ (* (* l l) n) Om) (- U*)) Om)) (* U (* n 2.0))))
(if (<= n 1.95e-270)
(* (sqrt 2.0) (sqrt (fma (* (* (* -2.0 l) n) (/ l Om)) U (* (* t n) U))))
(* (sqrt (* n 2.0)) (sqrt (* (fma (* (/ l Om) l) -2.0 t) U))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (n <= -2.6e+15) {
tmp = sqrt(((t - (((((l * l) * n) / Om) * -U_42_) / Om)) * (U * (n * 2.0))));
} else if (n <= 1.95e-270) {
tmp = sqrt(2.0) * sqrt(fma((((-2.0 * l) * n) * (l / Om)), U, ((t * n) * U)));
} else {
tmp = sqrt((n * 2.0)) * sqrt((fma(((l / Om) * l), -2.0, t) * U));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (n <= -2.6e+15) tmp = sqrt(Float64(Float64(t - Float64(Float64(Float64(Float64(Float64(l * l) * n) / Om) * Float64(-U_42_)) / Om)) * Float64(U * Float64(n * 2.0)))); elseif (n <= 1.95e-270) tmp = Float64(sqrt(2.0) * sqrt(fma(Float64(Float64(Float64(-2.0 * l) * n) * Float64(l / Om)), U, Float64(Float64(t * n) * U)))); else tmp = Float64(sqrt(Float64(n * 2.0)) * sqrt(Float64(fma(Float64(Float64(l / Om) * l), -2.0, t) * U))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[n, -2.6e+15], N[Sqrt[N[(N[(t - N[(N[(N[(N[(N[(l * l), $MachinePrecision] * n), $MachinePrecision] / Om), $MachinePrecision] * (-U$42$)), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] * N[(U * N[(n * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[n, 1.95e-270], N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(N[(N[(N[(-2.0 * l), $MachinePrecision] * n), $MachinePrecision] * N[(l / Om), $MachinePrecision]), $MachinePrecision] * U + N[(N[(t * n), $MachinePrecision] * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(n * 2.0), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(N[(N[(N[(l / Om), $MachinePrecision] * l), $MachinePrecision] * -2.0 + t), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;n \leq -2.6 \cdot 10^{+15}:\\
\;\;\;\;\sqrt{\left(t - \frac{\frac{\left(\ell \cdot \ell\right) \cdot n}{Om} \cdot \left(-U*\right)}{Om}\right) \cdot \left(U \cdot \left(n \cdot 2\right)\right)}\\
\mathbf{elif}\;n \leq 1.95 \cdot 10^{-270}:\\
\;\;\;\;\sqrt{2} \cdot \sqrt{\mathsf{fma}\left(\left(\left(-2 \cdot \ell\right) \cdot n\right) \cdot \frac{\ell}{Om}, U, \left(t \cdot n\right) \cdot U\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{n \cdot 2} \cdot \sqrt{\mathsf{fma}\left(\frac{\ell}{Om} \cdot \ell, -2, t\right) \cdot U}\\
\end{array}
\end{array}
if n < -2.6e15Initial program 50.6%
Taylor expanded in t around 0
lower--.f64N/A
+-commutativeN/A
unpow2N/A
associate-/r*N/A
metadata-evalN/A
cancel-sign-sub-invN/A
associate-*r/N/A
div-subN/A
lower-/.f64N/A
Applied rewrites48.3%
Taylor expanded in U* around inf
Applied rewrites51.2%
if -2.6e15 < n < 1.94999999999999993e-270Initial program 40.7%
lift-sqrt.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
sqrt-prodN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
Applied rewrites2.3%
Taylor expanded in n around 0
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-sqrt.f6448.7
Applied rewrites48.7%
Applied rewrites54.8%
Applied rewrites57.4%
if 1.94999999999999993e-270 < n Initial program 54.5%
lift-sqrt.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
sqrt-prodN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
Applied rewrites58.1%
Taylor expanded in n around 0
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-sqrt.f6447.6
Applied rewrites47.6%
Applied rewrites26.4%
Applied rewrites58.5%
Final simplification56.5%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= U -2.2e+94)
(* (sqrt (* (fma (* (/ l Om) l) -2.0 t) (* U n))) (sqrt 2.0))
(if (<= U 6.4e-306)
(sqrt (fma (* (* l n) (* (/ U Om) l)) -4.0 (* (* (* t n) U) 2.0)))
(* (sqrt (* (* (fma (/ (* l l) Om) -2.0 t) n) 2.0)) (sqrt U)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U <= -2.2e+94) {
tmp = sqrt((fma(((l / Om) * l), -2.0, t) * (U * n))) * sqrt(2.0);
} else if (U <= 6.4e-306) {
tmp = sqrt(fma(((l * n) * ((U / Om) * l)), -4.0, (((t * n) * U) * 2.0)));
} else {
tmp = sqrt(((fma(((l * l) / Om), -2.0, t) * n) * 2.0)) * sqrt(U);
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U <= -2.2e+94) tmp = Float64(sqrt(Float64(fma(Float64(Float64(l / Om) * l), -2.0, t) * Float64(U * n))) * sqrt(2.0)); elseif (U <= 6.4e-306) tmp = sqrt(fma(Float64(Float64(l * n) * Float64(Float64(U / Om) * l)), -4.0, Float64(Float64(Float64(t * n) * U) * 2.0))); else tmp = Float64(sqrt(Float64(Float64(fma(Float64(Float64(l * l) / Om), -2.0, t) * n) * 2.0)) * sqrt(U)); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U, -2.2e+94], N[(N[Sqrt[N[(N[(N[(N[(l / Om), $MachinePrecision] * l), $MachinePrecision] * -2.0 + t), $MachinePrecision] * N[(U * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[U, 6.4e-306], N[Sqrt[N[(N[(N[(l * n), $MachinePrecision] * N[(N[(U / Om), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision] * -4.0 + N[(N[(N[(t * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(N[(N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] * -2.0 + t), $MachinePrecision] * n), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] * N[Sqrt[U], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;U \leq -2.2 \cdot 10^{+94}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{\ell}{Om} \cdot \ell, -2, t\right) \cdot \left(U \cdot n\right)} \cdot \sqrt{2}\\
\mathbf{elif}\;U \leq 6.4 \cdot 10^{-306}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\left(\ell \cdot n\right) \cdot \left(\frac{U}{Om} \cdot \ell\right), -4, \left(\left(t \cdot n\right) \cdot U\right) \cdot 2\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(\frac{\ell \cdot \ell}{Om}, -2, t\right) \cdot n\right) \cdot 2} \cdot \sqrt{U}\\
\end{array}
\end{array}
if U < -2.20000000000000012e94Initial program 62.3%
lift-sqrt.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
sqrt-prodN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
Applied rewrites24.9%
Taylor expanded in n around 0
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-sqrt.f6450.2
Applied rewrites50.2%
Applied rewrites0.0%
Applied rewrites70.4%
if -2.20000000000000012e94 < U < 6.39999999999999942e-306Initial program 40.7%
Taylor expanded in Om around inf
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6442.1
Applied rewrites42.1%
Applied rewrites50.0%
if 6.39999999999999942e-306 < U Initial program 51.1%
lift-sqrt.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
sqrt-prodN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
Applied rewrites25.1%
Taylor expanded in n around 0
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-sqrt.f6448.3
Applied rewrites48.3%
Applied rewrites56.3%
Final simplification55.7%
(FPCore (n U t l Om U*) :precision binary64 (if (<= U 6.4e-306) (sqrt (* (* (fma (* (/ l Om) l) -2.0 t) n) (* U 2.0))) (* (sqrt (* (* (fma (/ (* l l) Om) -2.0 t) n) 2.0)) (sqrt U))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U <= 6.4e-306) {
tmp = sqrt(((fma(((l / Om) * l), -2.0, t) * n) * (U * 2.0)));
} else {
tmp = sqrt(((fma(((l * l) / Om), -2.0, t) * n) * 2.0)) * sqrt(U);
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U <= 6.4e-306) tmp = sqrt(Float64(Float64(fma(Float64(Float64(l / Om) * l), -2.0, t) * n) * Float64(U * 2.0))); else tmp = Float64(sqrt(Float64(Float64(fma(Float64(Float64(l * l) / Om), -2.0, t) * n) * 2.0)) * sqrt(U)); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U, 6.4e-306], N[Sqrt[N[(N[(N[(N[(N[(l / Om), $MachinePrecision] * l), $MachinePrecision] * -2.0 + t), $MachinePrecision] * n), $MachinePrecision] * N[(U * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(N[(N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] * -2.0 + t), $MachinePrecision] * n), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] * N[Sqrt[U], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;U \leq 6.4 \cdot 10^{-306}:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(\frac{\ell}{Om} \cdot \ell, -2, t\right) \cdot n\right) \cdot \left(U \cdot 2\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(\frac{\ell \cdot \ell}{Om}, -2, t\right) \cdot n\right) \cdot 2} \cdot \sqrt{U}\\
\end{array}
\end{array}
if U < 6.39999999999999942e-306Initial program 46.1%
lift-sqrt.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
sqrt-prodN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
Applied rewrites24.2%
Taylor expanded in n around 0
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-sqrt.f6445.6
Applied rewrites45.6%
Applied rewrites0.0%
Applied rewrites51.5%
if 6.39999999999999942e-306 < U Initial program 51.1%
lift-sqrt.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
sqrt-prodN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
Applied rewrites25.1%
Taylor expanded in n around 0
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-sqrt.f6448.3
Applied rewrites48.3%
Applied rewrites56.3%
Final simplification53.8%
(FPCore (n U t l Om U*) :precision binary64 (if (<= l 4.2e-201) (sqrt (* (* (* t n) U) 2.0)) (sqrt (* (* (fma (* (/ l Om) l) -2.0 t) U) (* n 2.0)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 4.2e-201) {
tmp = sqrt((((t * n) * U) * 2.0));
} else {
tmp = sqrt(((fma(((l / Om) * l), -2.0, t) * U) * (n * 2.0)));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 4.2e-201) tmp = sqrt(Float64(Float64(Float64(t * n) * U) * 2.0)); else tmp = sqrt(Float64(Float64(fma(Float64(Float64(l / Om) * l), -2.0, t) * U) * Float64(n * 2.0))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 4.2e-201], N[Sqrt[N[(N[(N[(t * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(N[(l / Om), $MachinePrecision] * l), $MachinePrecision] * -2.0 + t), $MachinePrecision] * U), $MachinePrecision] * N[(n * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 4.2 \cdot 10^{-201}:\\
\;\;\;\;\sqrt{\left(\left(t \cdot n\right) \cdot U\right) \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(\frac{\ell}{Om} \cdot \ell, -2, t\right) \cdot U\right) \cdot \left(n \cdot 2\right)}\\
\end{array}
\end{array}
if l < 4.20000000000000024e-201Initial program 48.6%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6434.9
Applied rewrites34.9%
if 4.20000000000000024e-201 < l Initial program 48.3%
lift-sqrt.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
sqrt-prodN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
Applied rewrites24.1%
Taylor expanded in n around 0
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-sqrt.f6443.3
Applied rewrites43.3%
Applied rewrites21.3%
Applied rewrites49.2%
Final simplification40.6%
(FPCore (n U t l Om U*) :precision binary64 (if (<= l 6.2e+28) (sqrt (* (* (* t n) U) 2.0)) (sqrt (* (* (/ (* (* l l) n) Om) U) -4.0))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 6.2e+28) {
tmp = sqrt((((t * n) * U) * 2.0));
} else {
tmp = sqrt((((((l * l) * n) / Om) * U) * -4.0));
}
return tmp;
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 6.2d+28) then
tmp = sqrt((((t * n) * u) * 2.0d0))
else
tmp = sqrt((((((l * l) * n) / om) * u) * (-4.0d0)))
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 6.2e+28) {
tmp = Math.sqrt((((t * n) * U) * 2.0));
} else {
tmp = Math.sqrt((((((l * l) * n) / Om) * U) * -4.0));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 6.2e+28: tmp = math.sqrt((((t * n) * U) * 2.0)) else: tmp = math.sqrt((((((l * l) * n) / Om) * U) * -4.0)) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 6.2e+28) tmp = sqrt(Float64(Float64(Float64(t * n) * U) * 2.0)); else tmp = sqrt(Float64(Float64(Float64(Float64(Float64(l * l) * n) / Om) * U) * -4.0)); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 6.2e+28) tmp = sqrt((((t * n) * U) * 2.0)); else tmp = sqrt((((((l * l) * n) / Om) * U) * -4.0)); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 6.2e+28], N[Sqrt[N[(N[(N[(t * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(N[(l * l), $MachinePrecision] * n), $MachinePrecision] / Om), $MachinePrecision] * U), $MachinePrecision] * -4.0), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 6.2 \cdot 10^{+28}:\\
\;\;\;\;\sqrt{\left(\left(t \cdot n\right) \cdot U\right) \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\frac{\left(\ell \cdot \ell\right) \cdot n}{Om} \cdot U\right) \cdot -4}\\
\end{array}
\end{array}
if l < 6.2000000000000001e28Initial program 51.4%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6438.0
Applied rewrites38.0%
if 6.2000000000000001e28 < l Initial program 36.8%
Taylor expanded in Om around inf
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6437.7
Applied rewrites37.7%
Taylor expanded in t around 0
Applied rewrites31.9%
Final simplification36.8%
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* (fma (* (/ l Om) l) -2.0 t) n) (* U 2.0))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt(((fma(((l / Om) * l), -2.0, t) * n) * (U * 2.0)));
}
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(fma(Float64(Float64(l / Om) * l), -2.0, t) * n) * Float64(U * 2.0))) end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(N[(N[(l / Om), $MachinePrecision] * l), $MachinePrecision] * -2.0 + t), $MachinePrecision] * n), $MachinePrecision] * N[(U * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left(\mathsf{fma}\left(\frac{\ell}{Om} \cdot \ell, -2, t\right) \cdot n\right) \cdot \left(U \cdot 2\right)}
\end{array}
Initial program 48.5%
lift-sqrt.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
sqrt-prodN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
Applied rewrites24.7%
Taylor expanded in n around 0
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-sqrt.f6446.9
Applied rewrites46.9%
Applied rewrites27.1%
Applied rewrites51.2%
Final simplification51.2%
(FPCore (n U t l Om U*) :precision binary64 (if (<= U 6.4e-306) (sqrt (* (* (* t n) U) 2.0)) (* (sqrt (* (* t n) 2.0)) (sqrt U))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U <= 6.4e-306) {
tmp = sqrt((((t * n) * U) * 2.0));
} else {
tmp = sqrt(((t * n) * 2.0)) * sqrt(U);
}
return tmp;
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (u <= 6.4d-306) then
tmp = sqrt((((t * n) * u) * 2.0d0))
else
tmp = sqrt(((t * n) * 2.0d0)) * sqrt(u)
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U <= 6.4e-306) {
tmp = Math.sqrt((((t * n) * U) * 2.0));
} else {
tmp = Math.sqrt(((t * n) * 2.0)) * Math.sqrt(U);
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if U <= 6.4e-306: tmp = math.sqrt((((t * n) * U) * 2.0)) else: tmp = math.sqrt(((t * n) * 2.0)) * math.sqrt(U) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U <= 6.4e-306) tmp = sqrt(Float64(Float64(Float64(t * n) * U) * 2.0)); else tmp = Float64(sqrt(Float64(Float64(t * n) * 2.0)) * sqrt(U)); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U <= 6.4e-306) tmp = sqrt((((t * n) * U) * 2.0)); else tmp = sqrt(((t * n) * 2.0)) * sqrt(U); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U, 6.4e-306], N[Sqrt[N[(N[(N[(t * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(t * n), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] * N[Sqrt[U], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;U \leq 6.4 \cdot 10^{-306}:\\
\;\;\;\;\sqrt{\left(\left(t \cdot n\right) \cdot U\right) \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(t \cdot n\right) \cdot 2} \cdot \sqrt{U}\\
\end{array}
\end{array}
if U < 6.39999999999999942e-306Initial program 46.1%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6434.9
Applied rewrites34.9%
if 6.39999999999999942e-306 < U Initial program 51.1%
lift-sqrt.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
sqrt-prodN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
Applied rewrites25.1%
Taylor expanded in n around 0
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-sqrt.f6448.3
Applied rewrites48.3%
Applied rewrites56.3%
Taylor expanded in t around inf
Applied rewrites37.8%
Final simplification36.3%
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* (* t n) U) 2.0)))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((((t * n) * U) * 2.0));
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((((t * n) * u) * 2.0d0))
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((((t * n) * U) * 2.0));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt((((t * n) * U) * 2.0))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(Float64(t * n) * U) * 2.0)) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((((t * n) * U) * 2.0)); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(t * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left(\left(t \cdot n\right) \cdot U\right) \cdot 2}
\end{array}
Initial program 48.5%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6433.4
Applied rewrites33.4%
Final simplification33.4%
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* (* U 2.0) t) n)))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((((U * 2.0) * t) * n));
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((((u * 2.0d0) * t) * n))
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((((U * 2.0) * t) * n));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt((((U * 2.0) * t) * n))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(Float64(U * 2.0) * t) * n)) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((((U * 2.0) * t) * n)); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(U * 2.0), $MachinePrecision] * t), $MachinePrecision] * n), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left(\left(U \cdot 2\right) \cdot t\right) \cdot n}
\end{array}
Initial program 48.5%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6433.4
Applied rewrites33.4%
Applied rewrites31.5%
Final simplification31.5%
herbie shell --seed 2024282
(FPCore (n U t l Om U*)
:name "Toniolo and Linder, Equation (13)"
:precision binary64
(sqrt (* (* (* 2.0 n) U) (- (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))