
(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 (- t (* 2.0 (/ (* l l) Om))))
(t_2 (* (* 2.0 n) U))
(t_3 (sqrt (* t_2 (- t_1 (* (* n (pow (/ l Om) 2.0)) (- U U*)))))))
(if (<= t_3 1e-159)
(*
(sqrt
(* (fma (/ l Om) (fma (* (/ l Om) (- U U*)) (- n) (* -2.0 l)) t) U))
(sqrt (* 2.0 n)))
(if (<= t_3 2e+152)
(sqrt (* t_2 (- t_1 (* (/ (* n (/ l Om)) (/ Om l)) (- U U*)))))
(sqrt
(*
2.0
(/
(* (* U l) (* n (fma -2.0 l (/ (* l (* n (- U U*))) (- Om)))))
Om)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = t - (2.0 * ((l * l) / Om));
double t_2 = (2.0 * n) * U;
double t_3 = sqrt((t_2 * (t_1 - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
double tmp;
if (t_3 <= 1e-159) {
tmp = sqrt((fma((l / Om), fma(((l / Om) * (U - U_42_)), -n, (-2.0 * l)), t) * U)) * sqrt((2.0 * n));
} else if (t_3 <= 2e+152) {
tmp = sqrt((t_2 * (t_1 - (((n * (l / Om)) / (Om / l)) * (U - U_42_)))));
} else {
tmp = sqrt((2.0 * (((U * l) * (n * fma(-2.0, l, ((l * (n * (U - U_42_))) / -Om)))) / Om)));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) t_2 = Float64(Float64(2.0 * n) * U) t_3 = sqrt(Float64(t_2 * Float64(t_1 - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))) tmp = 0.0 if (t_3 <= 1e-159) tmp = Float64(sqrt(Float64(fma(Float64(l / Om), fma(Float64(Float64(l / Om) * Float64(U - U_42_)), Float64(-n), Float64(-2.0 * l)), t) * U)) * sqrt(Float64(2.0 * n))); elseif (t_3 <= 2e+152) tmp = sqrt(Float64(t_2 * Float64(t_1 - Float64(Float64(Float64(n * Float64(l / Om)) / Float64(Om / l)) * Float64(U - U_42_))))); else tmp = sqrt(Float64(2.0 * Float64(Float64(Float64(U * l) * Float64(n * fma(-2.0, l, Float64(Float64(l * Float64(n * Float64(U - U_42_))) / Float64(-Om))))) / Om))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(t$95$2 * N[(t$95$1 - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 1e-159], N[(N[Sqrt[N[(N[(N[(l / Om), $MachinePrecision] * N[(N[(N[(l / Om), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] * (-n) + N[(-2.0 * l), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 2e+152], N[Sqrt[N[(t$95$2 * N[(t$95$1 - N[(N[(N[(n * N[(l / Om), $MachinePrecision]), $MachinePrecision] / N[(Om / l), $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(N[(N[(U * l), $MachinePrecision] * N[(n * N[(-2.0 * l + N[(N[(l * N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-Om)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - 2 \cdot \frac{\ell \cdot \ell}{Om}\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := \sqrt{t\_2 \cdot \left(t\_1 - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}\\
\mathbf{if}\;t\_3 \leq 10^{-159}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{\ell}{Om}, \mathsf{fma}\left(\frac{\ell}{Om} \cdot \left(U - U*\right), -n, -2 \cdot \ell\right), t\right) \cdot U} \cdot \sqrt{2 \cdot n}\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+152}:\\
\;\;\;\;\sqrt{t\_2 \cdot \left(t\_1 - \frac{n \cdot \frac{\ell}{Om}}{\frac{Om}{\ell}} \cdot \left(U - U*\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \frac{\left(U \cdot \ell\right) \cdot \left(n \cdot \mathsf{fma}\left(-2, \ell, \frac{\ell \cdot \left(n \cdot \left(U - U*\right)\right)}{-Om}\right)\right)}{Om}}\\
\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*))))) < 9.99999999999999989e-160Initial program 16.7%
lift--.f64N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6416.7
lift-*.f64N/A
Applied rewrites16.7%
Applied rewrites16.7%
lift-sqrt.f64N/A
pow1/2N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
unpow-prod-downN/A
lower-*.f64N/A
Applied rewrites43.6%
if 9.99999999999999989e-160 < (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*))))) < 2.0000000000000001e152Initial program 95.2%
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
lift-/.f64N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f6498.2
Applied rewrites98.2%
if 2.0000000000000001e152 < (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 29.3%
lift--.f64N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6439.5
lift-*.f64N/A
Applied rewrites35.3%
Applied rewrites36.0%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6436.0
Applied rewrites44.3%
Taylor expanded in t around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites52.2%
Final simplification68.1%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (/ (* l l) Om))
(t_2 (* (* 2.0 n) U))
(t_3
(sqrt
(*
t_2
(- (- t (* 2.0 t_1)) (* (* n (pow (/ l Om) 2.0)) (- U U*)))))))
(if (<= t_3 1e-159)
(*
(sqrt
(* (fma (/ l Om) (fma (* (/ l Om) (- U U*)) (- n) (* -2.0 l)) t) U))
(sqrt (* 2.0 n)))
(if (<= t_3 2e+152)
(sqrt
(*
t_2
(fma (* (- (- U U*)) (/ l Om)) (* (/ l Om) n) (fma -2.0 t_1 t))))
(sqrt
(*
2.0
(/
(* (* U l) (* n (fma -2.0 l (/ (* l (* n (- U U*))) (- Om)))))
Om)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (l * l) / Om;
double t_2 = (2.0 * n) * U;
double t_3 = sqrt((t_2 * ((t - (2.0 * t_1)) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
double tmp;
if (t_3 <= 1e-159) {
tmp = sqrt((fma((l / Om), fma(((l / Om) * (U - U_42_)), -n, (-2.0 * l)), t) * U)) * sqrt((2.0 * n));
} else if (t_3 <= 2e+152) {
tmp = sqrt((t_2 * fma((-(U - U_42_) * (l / Om)), ((l / Om) * n), fma(-2.0, t_1, t))));
} else {
tmp = sqrt((2.0 * (((U * l) * (n * fma(-2.0, l, ((l * (n * (U - U_42_))) / -Om)))) / Om)));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(l * l) / Om) t_2 = Float64(Float64(2.0 * n) * U) t_3 = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * t_1)) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))) tmp = 0.0 if (t_3 <= 1e-159) tmp = Float64(sqrt(Float64(fma(Float64(l / Om), fma(Float64(Float64(l / Om) * Float64(U - U_42_)), Float64(-n), Float64(-2.0 * l)), t) * U)) * sqrt(Float64(2.0 * n))); elseif (t_3 <= 2e+152) tmp = sqrt(Float64(t_2 * fma(Float64(Float64(-Float64(U - U_42_)) * Float64(l / Om)), Float64(Float64(l / Om) * n), fma(-2.0, t_1, t)))); else tmp = sqrt(Float64(2.0 * Float64(Float64(Float64(U * l) * Float64(n * fma(-2.0, l, Float64(Float64(l * Float64(n * Float64(U - U_42_))) / Float64(-Om))))) / Om))); 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[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 1e-159], N[(N[Sqrt[N[(N[(N[(l / Om), $MachinePrecision] * N[(N[(N[(l / Om), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] * (-n) + N[(-2.0 * l), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 2e+152], N[Sqrt[N[(t$95$2 * N[(N[((-N[(U - U$42$), $MachinePrecision]) * N[(l / Om), $MachinePrecision]), $MachinePrecision] * N[(N[(l / Om), $MachinePrecision] * n), $MachinePrecision] + N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(N[(N[(U * l), $MachinePrecision] * N[(n * N[(-2.0 * l + N[(N[(l * N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-Om)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell \cdot \ell}{Om}\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := \sqrt{t\_2 \cdot \left(\left(t - 2 \cdot t\_1\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}\\
\mathbf{if}\;t\_3 \leq 10^{-159}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{\ell}{Om}, \mathsf{fma}\left(\frac{\ell}{Om} \cdot \left(U - U*\right), -n, -2 \cdot \ell\right), t\right) \cdot U} \cdot \sqrt{2 \cdot n}\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+152}:\\
\;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(\left(-\left(U - U*\right)\right) \cdot \frac{\ell}{Om}, \frac{\ell}{Om} \cdot n, \mathsf{fma}\left(-2, t\_1, t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \frac{\left(U \cdot \ell\right) \cdot \left(n \cdot \mathsf{fma}\left(-2, \ell, \frac{\ell \cdot \left(n \cdot \left(U - U*\right)\right)}{-Om}\right)\right)}{Om}}\\
\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*))))) < 9.99999999999999989e-160Initial program 16.7%
lift--.f64N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6416.7
lift-*.f64N/A
Applied rewrites16.7%
Applied rewrites16.7%
lift-sqrt.f64N/A
pow1/2N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
unpow-prod-downN/A
lower-*.f64N/A
Applied rewrites43.6%
if 9.99999999999999989e-160 < (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*))))) < 2.0000000000000001e152Initial program 95.2%
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-*.f6496.2
lift--.f64N/A
Applied rewrites96.2%
if 2.0000000000000001e152 < (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 29.3%
lift--.f64N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6439.5
lift-*.f64N/A
Applied rewrites35.3%
Applied rewrites36.0%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6436.0
Applied rewrites44.3%
Taylor expanded in t around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites52.2%
Final simplification67.4%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (fma (/ l Om) (fma (* (/ l Om) (- U U*)) (- n) (* -2.0 l)) t))
(t_2 (* (* 2.0 n) U))
(t_3
(sqrt
(*
t_2
(-
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U U*)))))))
(if (<= t_3 1e-159)
(* (sqrt (* t_1 U)) (sqrt (* 2.0 n)))
(if (<= t_3 INFINITY)
(sqrt (* t_1 t_2))
(*
(sqrt
(/ (* (* U l) (* n (fma -2.0 l (/ (* l (* n (- U U*))) (- Om))))) Om))
(sqrt 2.0))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = fma((l / Om), fma(((l / Om) * (U - U_42_)), -n, (-2.0 * l)), t);
double t_2 = (2.0 * n) * U;
double t_3 = sqrt((t_2 * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
double tmp;
if (t_3 <= 1e-159) {
tmp = sqrt((t_1 * U)) * sqrt((2.0 * n));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((t_1 * t_2));
} else {
tmp = sqrt((((U * l) * (n * fma(-2.0, l, ((l * (n * (U - U_42_))) / -Om)))) / Om)) * sqrt(2.0);
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = fma(Float64(l / Om), fma(Float64(Float64(l / Om) * Float64(U - U_42_)), Float64(-n), Float64(-2.0 * l)), t) t_2 = Float64(Float64(2.0 * n) * U) t_3 = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))) tmp = 0.0 if (t_3 <= 1e-159) tmp = Float64(sqrt(Float64(t_1 * U)) * sqrt(Float64(2.0 * n))); elseif (t_3 <= Inf) tmp = sqrt(Float64(t_1 * t_2)); else tmp = Float64(sqrt(Float64(Float64(Float64(U * l) * Float64(n * fma(-2.0, l, Float64(Float64(l * Float64(n * Float64(U - U_42_))) / Float64(-Om))))) / Om)) * sqrt(2.0)); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l / Om), $MachinePrecision] * N[(N[(N[(l / Om), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] * (-n) + N[(-2.0 * l), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(t$95$2 * 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]}, If[LessEqual[t$95$3, 1e-159], N[(N[Sqrt[N[(t$95$1 * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$1 * t$95$2), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(N[(U * l), $MachinePrecision] * N[(n * N[(-2.0 * l + N[(N[(l * N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-Om)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{\ell}{Om}, \mathsf{fma}\left(\frac{\ell}{Om} \cdot \left(U - U*\right), -n, -2 \cdot \ell\right), t\right)\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := \sqrt{t\_2 \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)}\\
\mathbf{if}\;t\_3 \leq 10^{-159}:\\
\;\;\;\;\sqrt{t\_1 \cdot U} \cdot \sqrt{2 \cdot n}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{t\_1 \cdot t\_2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{\left(U \cdot \ell\right) \cdot \left(n \cdot \mathsf{fma}\left(-2, \ell, \frac{\ell \cdot \left(n \cdot \left(U - U*\right)\right)}{-Om}\right)\right)}{Om}} \cdot \sqrt{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*))))) < 9.99999999999999989e-160Initial program 16.7%
lift--.f64N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6416.7
lift-*.f64N/A
Applied rewrites16.7%
Applied rewrites16.7%
lift-sqrt.f64N/A
pow1/2N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
unpow-prod-downN/A
lower-*.f64N/A
Applied rewrites43.6%
if 9.99999999999999989e-160 < (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 67.8%
lift--.f64N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6473.2
lift-*.f64N/A
Applied rewrites68.1%
Applied rewrites69.6%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6469.6
Applied rewrites72.1%
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%
lift--.f64N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f648.9
lift-*.f64N/A
Applied rewrites9.0%
Applied rewrites6.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f646.3
Applied rewrites28.4%
Taylor expanded in t around 0
lower-*.f64N/A
Applied rewrites60.2%
Final simplification67.2%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (/ (* l l) Om))
(t_2 (* (* 2.0 n) U))
(t_3
(sqrt
(*
t_2
(- (- t (* 2.0 t_1)) (* (* n (pow (/ l Om) 2.0)) (- U U*)))))))
(if (<= t_3 1e-122)
(sqrt (* (* (* (fma -2.0 t_1 t) n) U) 2.0))
(if (<= t_3 INFINITY)
(sqrt
(* (fma (/ l Om) (fma (* (/ l Om) (- U U*)) (- n) (* -2.0 l)) t) t_2))
(*
(sqrt
(/ (* (* U l) (* n (fma -2.0 l (/ (* l (* n (- U U*))) (- Om))))) Om))
(sqrt 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 = (2.0 * n) * U;
double t_3 = sqrt((t_2 * ((t - (2.0 * t_1)) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
double tmp;
if (t_3 <= 1e-122) {
tmp = sqrt((((fma(-2.0, t_1, t) * n) * U) * 2.0));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((fma((l / Om), fma(((l / Om) * (U - U_42_)), -n, (-2.0 * l)), t) * t_2));
} else {
tmp = sqrt((((U * l) * (n * fma(-2.0, l, ((l * (n * (U - U_42_))) / -Om)))) / Om)) * sqrt(2.0);
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(l * l) / Om) t_2 = Float64(Float64(2.0 * n) * U) t_3 = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * t_1)) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))) tmp = 0.0 if (t_3 <= 1e-122) tmp = sqrt(Float64(Float64(Float64(fma(-2.0, t_1, t) * n) * U) * 2.0)); elseif (t_3 <= Inf) tmp = sqrt(Float64(fma(Float64(l / Om), fma(Float64(Float64(l / Om) * Float64(U - U_42_)), Float64(-n), Float64(-2.0 * l)), t) * t_2)); else tmp = Float64(sqrt(Float64(Float64(Float64(U * l) * Float64(n * fma(-2.0, l, Float64(Float64(l * Float64(n * Float64(U - U_42_))) / Float64(-Om))))) / Om)) * sqrt(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[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 1e-122], N[Sqrt[N[(N[(N[(N[(-2.0 * t$95$1 + t), $MachinePrecision] * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(N[(N[(l / Om), $MachinePrecision] * N[(N[(N[(l / Om), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] * (-n) + N[(-2.0 * l), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] * t$95$2), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(N[(U * l), $MachinePrecision] * N[(n * N[(-2.0 * l + N[(N[(l * N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-Om)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell \cdot \ell}{Om}\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := \sqrt{t\_2 \cdot \left(\left(t - 2 \cdot t\_1\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}\\
\mathbf{if}\;t\_3 \leq 10^{-122}:\\
\;\;\;\;\sqrt{\left(\left(\mathsf{fma}\left(-2, t\_1, t\right) \cdot n\right) \cdot U\right) \cdot 2}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{\ell}{Om}, \mathsf{fma}\left(\frac{\ell}{Om} \cdot \left(U - U*\right), -n, -2 \cdot \ell\right), t\right) \cdot t\_2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{\left(U \cdot \ell\right) \cdot \left(n \cdot \mathsf{fma}\left(-2, \ell, \frac{\ell \cdot \left(n \cdot \left(U - U*\right)\right)}{-Om}\right)\right)}{Om}} \cdot \sqrt{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*))))) < 1.00000000000000006e-122Initial program 27.4%
Taylor expanded in n around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6444.0
Applied rewrites44.0%
if 1.00000000000000006e-122 < (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 67.4%
lift--.f64N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6473.1
lift-*.f64N/A
Applied rewrites67.8%
Applied rewrites69.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6469.3
Applied rewrites72.0%
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%
lift--.f64N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f648.9
lift-*.f64N/A
Applied rewrites9.0%
Applied rewrites6.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f646.3
Applied rewrites28.4%
Taylor expanded in t around 0
lower-*.f64N/A
Applied rewrites60.2%
Final simplification66.5%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (/ (* l l) Om))
(t_2 (* (* 2.0 n) U))
(t_3
(sqrt
(*
t_2
(- (- t (* 2.0 t_1)) (* (* n (pow (/ l Om) 2.0)) (- U U*)))))))
(if (<= t_3 1e-122)
(sqrt (* (* (* (fma -2.0 t_1 t) n) U) 2.0))
(if (<= t_3 INFINITY)
(sqrt
(* (fma (/ l Om) (fma (* (/ l Om) (- U U*)) (- n) (* -2.0 l)) t) t_2))
(sqrt
(*
2.0
(/
(* (* U l) (* n (fma -2.0 l (/ (* l (* n (- U U*))) (- Om)))))
Om)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (l * l) / Om;
double t_2 = (2.0 * n) * U;
double t_3 = sqrt((t_2 * ((t - (2.0 * t_1)) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
double tmp;
if (t_3 <= 1e-122) {
tmp = sqrt((((fma(-2.0, t_1, t) * n) * U) * 2.0));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((fma((l / Om), fma(((l / Om) * (U - U_42_)), -n, (-2.0 * l)), t) * t_2));
} else {
tmp = sqrt((2.0 * (((U * l) * (n * fma(-2.0, l, ((l * (n * (U - U_42_))) / -Om)))) / Om)));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(l * l) / Om) t_2 = Float64(Float64(2.0 * n) * U) t_3 = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * t_1)) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))) tmp = 0.0 if (t_3 <= 1e-122) tmp = sqrt(Float64(Float64(Float64(fma(-2.0, t_1, t) * n) * U) * 2.0)); elseif (t_3 <= Inf) tmp = sqrt(Float64(fma(Float64(l / Om), fma(Float64(Float64(l / Om) * Float64(U - U_42_)), Float64(-n), Float64(-2.0 * l)), t) * t_2)); else tmp = sqrt(Float64(2.0 * Float64(Float64(Float64(U * l) * Float64(n * fma(-2.0, l, Float64(Float64(l * Float64(n * Float64(U - U_42_))) / Float64(-Om))))) / Om))); 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[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 1e-122], N[Sqrt[N[(N[(N[(N[(-2.0 * t$95$1 + t), $MachinePrecision] * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(N[(N[(l / Om), $MachinePrecision] * N[(N[(N[(l / Om), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] * (-n) + N[(-2.0 * l), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] * t$95$2), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(N[(N[(U * l), $MachinePrecision] * N[(n * N[(-2.0 * l + N[(N[(l * N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-Om)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell \cdot \ell}{Om}\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := \sqrt{t\_2 \cdot \left(\left(t - 2 \cdot t\_1\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}\\
\mathbf{if}\;t\_3 \leq 10^{-122}:\\
\;\;\;\;\sqrt{\left(\left(\mathsf{fma}\left(-2, t\_1, t\right) \cdot n\right) \cdot U\right) \cdot 2}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{\ell}{Om}, \mathsf{fma}\left(\frac{\ell}{Om} \cdot \left(U - U*\right), -n, -2 \cdot \ell\right), t\right) \cdot t\_2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \frac{\left(U \cdot \ell\right) \cdot \left(n \cdot \mathsf{fma}\left(-2, \ell, \frac{\ell \cdot \left(n \cdot \left(U - U*\right)\right)}{-Om}\right)\right)}{Om}}\\
\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*))))) < 1.00000000000000006e-122Initial program 27.4%
Taylor expanded in n around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6444.0
Applied rewrites44.0%
if 1.00000000000000006e-122 < (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 67.4%
lift--.f64N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6473.1
lift-*.f64N/A
Applied rewrites67.8%
Applied rewrites69.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6469.3
Applied rewrites72.0%
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%
lift--.f64N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f648.9
lift-*.f64N/A
Applied rewrites9.0%
Applied rewrites6.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f646.3
Applied rewrites28.4%
Taylor expanded in t around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites60.2%
Final simplification66.5%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (/ (* l l) Om))
(t_2 (* (* 2.0 n) U))
(t_3
(* t_2 (- (- t (* 2.0 t_1)) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
(if (<= t_3 1e-244)
(sqrt (* (* (* (fma -2.0 t_1 t) n) U) 2.0))
(if (<= t_3 INFINITY)
(sqrt (* (fma (/ l Om) (* -2.0 l) t) t_2))
(sqrt (* (/ (* (* U* U) (* (* l n) (* l n))) (* Om Om)) 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 = (2.0 * n) * U;
double t_3 = t_2 * ((t - (2.0 * t_1)) - ((n * pow((l / Om), 2.0)) * (U - U_42_)));
double tmp;
if (t_3 <= 1e-244) {
tmp = sqrt((((fma(-2.0, t_1, t) * n) * U) * 2.0));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((fma((l / Om), (-2.0 * l), t) * t_2));
} else {
tmp = sqrt(((((U_42_ * U) * ((l * n) * (l * n))) / (Om * Om)) * 2.0));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(l * l) / Om) t_2 = Float64(Float64(2.0 * n) * U) t_3 = Float64(t_2 * Float64(Float64(t - Float64(2.0 * t_1)) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_)))) tmp = 0.0 if (t_3 <= 1e-244) tmp = sqrt(Float64(Float64(Float64(fma(-2.0, t_1, t) * n) * U) * 2.0)); elseif (t_3 <= Inf) tmp = sqrt(Float64(fma(Float64(l / Om), Float64(-2.0 * l), t) * t_2)); else tmp = sqrt(Float64(Float64(Float64(Float64(U_42_ * U) * Float64(Float64(l * n) * Float64(l * n))) / Float64(Om * Om)) * 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[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[(N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 1e-244], N[Sqrt[N[(N[(N[(N[(-2.0 * t$95$1 + t), $MachinePrecision] * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(N[(N[(l / Om), $MachinePrecision] * N[(-2.0 * l), $MachinePrecision] + t), $MachinePrecision] * t$95$2), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(U$42$ * U), $MachinePrecision] * N[(N[(l * n), $MachinePrecision] * N[(l * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell \cdot \ell}{Om}\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := t\_2 \cdot \left(\left(t - 2 \cdot t\_1\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\
\mathbf{if}\;t\_3 \leq 10^{-244}:\\
\;\;\;\;\sqrt{\left(\left(\mathsf{fma}\left(-2, t\_1, t\right) \cdot n\right) \cdot U\right) \cdot 2}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{\ell}{Om}, -2 \cdot \ell, t\right) \cdot t\_2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{\left(U* \cdot U\right) \cdot \left(\left(\ell \cdot n\right) \cdot \left(\ell \cdot n\right)\right)}{Om \cdot Om} \cdot 2}\\
\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*)))) < 9.9999999999999993e-245Initial program 26.6%
Taylor expanded in n around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6442.8
Applied rewrites42.8%
if 9.9999999999999993e-245 < (*.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 67.4%
lift--.f64N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6473.1
lift-*.f64N/A
Applied rewrites67.8%
Applied rewrites69.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6469.3
Applied rewrites72.0%
Taylor expanded in n around 0
lower-*.f6458.4
Applied rewrites58.4%
if +inf.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*)))) Initial program 0.0%
lift--.f64N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f649.1
lift-*.f64N/A
Applied rewrites9.3%
Applied rewrites3.9%
Taylor expanded in U* around inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
unpow2N/A
unswap-sqrN/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6429.4
Applied rewrites29.4%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (/ (* l l) Om))
(t_2 (* (* 2.0 n) U))
(t_3
(* t_2 (- (- t (* 2.0 t_1)) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
(if (<= t_3 1e-244)
(sqrt (* (* (* (fma -2.0 t_1 t) n) U) 2.0))
(if (<= t_3 INFINITY)
(sqrt (* (fma (/ l Om) (* -2.0 l) t) t_2))
(* (sqrt (* U* U)) (/ (* (* (sqrt 2.0) n) l) Om))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (l * l) / Om;
double t_2 = (2.0 * n) * U;
double t_3 = t_2 * ((t - (2.0 * t_1)) - ((n * pow((l / Om), 2.0)) * (U - U_42_)));
double tmp;
if (t_3 <= 1e-244) {
tmp = sqrt((((fma(-2.0, t_1, t) * n) * U) * 2.0));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((fma((l / Om), (-2.0 * l), t) * t_2));
} else {
tmp = sqrt((U_42_ * U)) * (((sqrt(2.0) * n) * l) / Om);
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(l * l) / Om) t_2 = Float64(Float64(2.0 * n) * U) t_3 = Float64(t_2 * Float64(Float64(t - Float64(2.0 * t_1)) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_)))) tmp = 0.0 if (t_3 <= 1e-244) tmp = sqrt(Float64(Float64(Float64(fma(-2.0, t_1, t) * n) * U) * 2.0)); elseif (t_3 <= Inf) tmp = sqrt(Float64(fma(Float64(l / Om), Float64(-2.0 * l), t) * t_2)); else tmp = Float64(sqrt(Float64(U_42_ * U)) * Float64(Float64(Float64(sqrt(2.0) * n) * l) / Om)); 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[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[(N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 1e-244], N[Sqrt[N[(N[(N[(N[(-2.0 * t$95$1 + t), $MachinePrecision] * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(N[(N[(l / Om), $MachinePrecision] * N[(-2.0 * l), $MachinePrecision] + t), $MachinePrecision] * t$95$2), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(U$42$ * U), $MachinePrecision]], $MachinePrecision] * N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] * n), $MachinePrecision] * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell \cdot \ell}{Om}\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := t\_2 \cdot \left(\left(t - 2 \cdot t\_1\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\
\mathbf{if}\;t\_3 \leq 10^{-244}:\\
\;\;\;\;\sqrt{\left(\left(\mathsf{fma}\left(-2, t\_1, t\right) \cdot n\right) \cdot U\right) \cdot 2}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{\ell}{Om}, -2 \cdot \ell, t\right) \cdot t\_2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{U* \cdot U} \cdot \frac{\left(\sqrt{2} \cdot n\right) \cdot \ell}{Om}\\
\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*)))) < 9.9999999999999993e-245Initial program 26.6%
Taylor expanded in n around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6442.8
Applied rewrites42.8%
if 9.9999999999999993e-245 < (*.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 67.4%
lift--.f64N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6473.1
lift-*.f64N/A
Applied rewrites67.8%
Applied rewrites69.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6469.3
Applied rewrites72.0%
Taylor expanded in n around 0
lower-*.f6458.4
Applied rewrites58.4%
if +inf.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*)))) 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.f6420.0
Applied rewrites20.0%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (/ (* l l) Om))
(t_2 (fma -2.0 t_1 t))
(t_3 (* (* 2.0 n) U))
(t_4
(* t_3 (- (- t (* 2.0 t_1)) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
(if (or (<= t_4 1e-244) (not (<= t_4 5e+277)))
(sqrt (* (* (* t_2 n) U) 2.0))
(sqrt (* t_3 t_2)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (l * l) / Om;
double t_2 = fma(-2.0, t_1, t);
double t_3 = (2.0 * n) * U;
double t_4 = t_3 * ((t - (2.0 * t_1)) - ((n * pow((l / Om), 2.0)) * (U - U_42_)));
double tmp;
if ((t_4 <= 1e-244) || !(t_4 <= 5e+277)) {
tmp = sqrt((((t_2 * n) * U) * 2.0));
} else {
tmp = sqrt((t_3 * t_2));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(l * l) / Om) t_2 = fma(-2.0, t_1, t) t_3 = Float64(Float64(2.0 * n) * U) t_4 = Float64(t_3 * Float64(Float64(t - Float64(2.0 * t_1)) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_)))) tmp = 0.0 if ((t_4 <= 1e-244) || !(t_4 <= 5e+277)) tmp = sqrt(Float64(Float64(Float64(t_2 * n) * U) * 2.0)); else tmp = sqrt(Float64(t_3 * t_2)); 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[(-2.0 * t$95$1 + t), $MachinePrecision]}, Block[{t$95$3 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 * N[(N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$4, 1e-244], N[Not[LessEqual[t$95$4, 5e+277]], $MachinePrecision]], N[Sqrt[N[(N[(N[(t$95$2 * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(t$95$3 * t$95$2), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell \cdot \ell}{Om}\\
t_2 := \mathsf{fma}\left(-2, t\_1, t\right)\\
t_3 := \left(2 \cdot n\right) \cdot U\\
t_4 := t\_3 \cdot \left(\left(t - 2 \cdot t\_1\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\
\mathbf{if}\;t\_4 \leq 10^{-244} \lor \neg \left(t\_4 \leq 5 \cdot 10^{+277}\right):\\
\;\;\;\;\sqrt{\left(\left(t\_2 \cdot n\right) \cdot U\right) \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t\_3 \cdot t\_2}\\
\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*)))) < 9.9999999999999993e-245 or 4.99999999999999982e277 < (*.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 30.1%
Taylor expanded in n around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6429.5
Applied rewrites29.5%
if 9.9999999999999993e-245 < (*.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*)))) < 4.99999999999999982e277Initial program 96.3%
Taylor expanded in n around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6483.6
Applied rewrites83.6%
Final simplification47.4%
(FPCore (n U t l Om U*)
:precision binary64
(if (<=
(*
(* (* 2.0 n) U)
(- (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U U*))))
4e-216)
(sqrt (* (* (* n t) U) 2.0))
(sqrt (* (* (* U n) t) 2.0))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if ((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))) <= 4e-216) {
tmp = sqrt((((n * t) * U) * 2.0));
} else {
tmp = sqrt((((U * n) * t) * 2.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 ((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) - ((n * ((l / om) ** 2.0d0)) * (u - u_42)))) <= 4d-216) then
tmp = sqrt((((n * t) * u) * 2.0d0))
else
tmp = sqrt((((u * n) * t) * 2.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 ((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * Math.pow((l / Om), 2.0)) * (U - U_42_)))) <= 4e-216) {
tmp = Math.sqrt((((n * t) * U) * 2.0));
} else {
tmp = Math.sqrt((((U * n) * t) * 2.0));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if (((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * math.pow((l / Om), 2.0)) * (U - U_42_)))) <= 4e-216: tmp = math.sqrt((((n * t) * U) * 2.0)) else: tmp = math.sqrt((((U * n) * t) * 2.0)) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (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_)))) <= 4e-216) tmp = sqrt(Float64(Float64(Float64(n * t) * U) * 2.0)); else tmp = sqrt(Float64(Float64(Float64(U * n) * t) * 2.0)); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if ((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * ((l / Om) ^ 2.0)) * (U - U_42_)))) <= 4e-216) tmp = sqrt((((n * t) * U) * 2.0)); else tmp = sqrt((((U * n) * t) * 2.0)); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[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], 4e-216], N[Sqrt[N[(N[(N[(n * t), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(U * n), $MachinePrecision] * t), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\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) \leq 4 \cdot 10^{-216}:\\
\;\;\;\;\sqrt{\left(\left(n \cdot t\right) \cdot U\right) \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\left(U \cdot n\right) \cdot t\right) \cdot 2}\\
\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*)))) < 4.0000000000000002e-216Initial program 30.6%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6434.3
Applied rewrites34.3%
if 4.0000000000000002e-216 < (*.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 55.7%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6431.2
Applied rewrites31.2%
Applied rewrites34.2%
(FPCore (n U t l Om U*)
:precision binary64
(if (<=
(*
(* (* 2.0 n) U)
(- (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U U*))))
0.0)
(sqrt (* (* (* U t) n) 2.0))
(sqrt (* (* (* U n) t) 2.0))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if ((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))) <= 0.0) {
tmp = sqrt((((U * t) * n) * 2.0));
} else {
tmp = sqrt((((U * n) * t) * 2.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 ((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) - ((n * ((l / om) ** 2.0d0)) * (u - u_42)))) <= 0.0d0) then
tmp = sqrt((((u * t) * n) * 2.0d0))
else
tmp = sqrt((((u * n) * t) * 2.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 ((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * Math.pow((l / Om), 2.0)) * (U - U_42_)))) <= 0.0) {
tmp = Math.sqrt((((U * t) * n) * 2.0));
} else {
tmp = Math.sqrt((((U * n) * t) * 2.0));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if (((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * math.pow((l / Om), 2.0)) * (U - U_42_)))) <= 0.0: tmp = math.sqrt((((U * t) * n) * 2.0)) else: tmp = math.sqrt((((U * n) * t) * 2.0)) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (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_)))) <= 0.0) tmp = sqrt(Float64(Float64(Float64(U * t) * n) * 2.0)); else tmp = sqrt(Float64(Float64(Float64(U * n) * t) * 2.0)); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if ((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * ((l / Om) ^ 2.0)) * (U - U_42_)))) <= 0.0) tmp = sqrt((((U * t) * n) * 2.0)); else tmp = sqrt((((U * n) * t) * 2.0)); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[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], 0.0], N[Sqrt[N[(N[(N[(U * t), $MachinePrecision] * n), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(U * n), $MachinePrecision] * t), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\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) \leq 0:\\
\;\;\;\;\sqrt{\left(\left(U \cdot t\right) \cdot n\right) \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\left(U \cdot n\right) \cdot t\right) \cdot 2}\\
\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 14.1%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6429.9
Applied rewrites29.9%
Applied rewrites29.8%
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*)))) Initial program 56.6%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6431.9
Applied rewrites31.9%
Applied rewrites34.4%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (sqrt (* (* (* n (* (/ l Om) l)) (/ (* U* U) Om)) (* 2.0 n))))
(t_2 (sqrt (* (fma (/ l Om) (* -2.0 l) t) (* (* 2.0 n) U)))))
(if (<= n -4.8e+215)
t_1
(if (<= n -1.42e-235)
t_2
(if (<= n 2e-152)
(sqrt (fma (/ (* (* U l) (* n l)) Om) -4.0 (* (* (* n t) U) 2.0)))
(if (<= n 4e+220) t_2 t_1))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = sqrt((((n * ((l / Om) * l)) * ((U_42_ * U) / Om)) * (2.0 * n)));
double t_2 = sqrt((fma((l / Om), (-2.0 * l), t) * ((2.0 * n) * U)));
double tmp;
if (n <= -4.8e+215) {
tmp = t_1;
} else if (n <= -1.42e-235) {
tmp = t_2;
} else if (n <= 2e-152) {
tmp = sqrt(fma((((U * l) * (n * l)) / Om), -4.0, (((n * t) * U) * 2.0)));
} else if (n <= 4e+220) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = sqrt(Float64(Float64(Float64(n * Float64(Float64(l / Om) * l)) * Float64(Float64(U_42_ * U) / Om)) * Float64(2.0 * n))) t_2 = sqrt(Float64(fma(Float64(l / Om), Float64(-2.0 * l), t) * Float64(Float64(2.0 * n) * U))) tmp = 0.0 if (n <= -4.8e+215) tmp = t_1; elseif (n <= -1.42e-235) tmp = t_2; elseif (n <= 2e-152) tmp = sqrt(fma(Float64(Float64(Float64(U * l) * Float64(n * l)) / Om), -4.0, Float64(Float64(Float64(n * t) * U) * 2.0))); elseif (n <= 4e+220) tmp = t_2; else tmp = t_1; end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[Sqrt[N[(N[(N[(n * N[(N[(l / Om), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision] * N[(N[(U$42$ * U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(N[(l / Om), $MachinePrecision] * N[(-2.0 * l), $MachinePrecision] + t), $MachinePrecision] * N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[n, -4.8e+215], t$95$1, If[LessEqual[n, -1.42e-235], t$95$2, If[LessEqual[n, 2e-152], N[Sqrt[N[(N[(N[(N[(U * l), $MachinePrecision] * N[(n * l), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] * -4.0 + N[(N[(N[(n * t), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[n, 4e+220], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{\left(\left(n \cdot \left(\frac{\ell}{Om} \cdot \ell\right)\right) \cdot \frac{U* \cdot U}{Om}\right) \cdot \left(2 \cdot n\right)}\\
t_2 := \sqrt{\mathsf{fma}\left(\frac{\ell}{Om}, -2 \cdot \ell, t\right) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}\\
\mathbf{if}\;n \leq -4.8 \cdot 10^{+215}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;n \leq -1.42 \cdot 10^{-235}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;n \leq 2 \cdot 10^{-152}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{\left(U \cdot \ell\right) \cdot \left(n \cdot \ell\right)}{Om}, -4, \left(\left(n \cdot t\right) \cdot U\right) \cdot 2\right)}\\
\mathbf{elif}\;n \leq 4 \cdot 10^{+220}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if n < -4.8000000000000002e215 or 4e220 < n Initial program 67.2%
Taylor expanded in t around 0
mul-1-negN/A
+-commutativeN/A
unpow2N/A
associate-/r*N/A
metadata-evalN/A
cancel-sign-sub-invN/A
associate-*r/N/A
div-subN/A
distribute-neg-frac2N/A
lower-/.f64N/A
Applied rewrites51.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites60.8%
Taylor expanded in U* around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6447.7
Applied rewrites47.7%
Applied rewrites65.7%
if -4.8000000000000002e215 < n < -1.42e-235 or 2.00000000000000013e-152 < n < 4e220Initial program 52.6%
lift--.f64N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6458.8
lift-*.f64N/A
Applied rewrites53.8%
Applied rewrites54.4%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6454.4
Applied rewrites60.6%
Taylor expanded in n around 0
lower-*.f6451.0
Applied rewrites51.0%
if -1.42e-235 < n < 2.00000000000000013e-152Initial program 40.6%
Taylor expanded in Om around inf
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6447.8
Applied rewrites47.8%
Applied rewrites68.4%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* (* 2.0 n) U)))
(if (<= n -1.1e+74)
(sqrt (* (fma (/ l Om) (/ (* U* (* l n)) Om) t) t_1))
(if (<= n 3.8e-152)
(sqrt (fma (/ (* (* U l) (* n l)) Om) -4.0 (* (* (* n t) U) 2.0)))
(sqrt (* t_1 (- t (/ (* (* l l) (fma (- U U*) (/ n Om) 2.0)) Om))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (2.0 * n) * U;
double tmp;
if (n <= -1.1e+74) {
tmp = sqrt((fma((l / Om), ((U_42_ * (l * n)) / Om), t) * t_1));
} else if (n <= 3.8e-152) {
tmp = sqrt(fma((((U * l) * (n * l)) / Om), -4.0, (((n * t) * U) * 2.0)));
} else {
tmp = sqrt((t_1 * (t - (((l * l) * fma((U - U_42_), (n / Om), 2.0)) / Om))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(2.0 * n) * U) tmp = 0.0 if (n <= -1.1e+74) tmp = sqrt(Float64(fma(Float64(l / Om), Float64(Float64(U_42_ * Float64(l * n)) / Om), t) * t_1)); elseif (n <= 3.8e-152) tmp = sqrt(fma(Float64(Float64(Float64(U * l) * Float64(n * l)) / Om), -4.0, Float64(Float64(Float64(n * t) * U) * 2.0))); else tmp = sqrt(Float64(t_1 * Float64(t - Float64(Float64(Float64(l * l) * fma(Float64(U - U_42_), Float64(n / Om), 2.0)) / Om)))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, If[LessEqual[n, -1.1e+74], N[Sqrt[N[(N[(N[(l / Om), $MachinePrecision] * N[(N[(U$42$ * N[(l * n), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] + t), $MachinePrecision] * t$95$1), $MachinePrecision]], $MachinePrecision], If[LessEqual[n, 3.8e-152], N[Sqrt[N[(N[(N[(N[(U * l), $MachinePrecision] * N[(n * l), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] * -4.0 + N[(N[(N[(n * t), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(t$95$1 * N[(t - N[(N[(N[(l * l), $MachinePrecision] * N[(N[(U - U$42$), $MachinePrecision] * N[(n / Om), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(2 \cdot n\right) \cdot U\\
\mathbf{if}\;n \leq -1.1 \cdot 10^{+74}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{\ell}{Om}, \frac{U* \cdot \left(\ell \cdot n\right)}{Om}, t\right) \cdot t\_1}\\
\mathbf{elif}\;n \leq 3.8 \cdot 10^{-152}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{\left(U \cdot \ell\right) \cdot \left(n \cdot \ell\right)}{Om}, -4, \left(\left(n \cdot t\right) \cdot U\right) \cdot 2\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t\_1 \cdot \left(t - \frac{\left(\ell \cdot \ell\right) \cdot \mathsf{fma}\left(U - U*, \frac{n}{Om}, 2\right)}{Om}\right)}\\
\end{array}
\end{array}
if n < -1.1000000000000001e74Initial program 67.5%
lift--.f64N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6471.4
lift-*.f64N/A
Applied rewrites59.3%
Applied rewrites57.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6457.3
Applied rewrites71.4%
Taylor expanded in U* around inf
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6473.4
Applied rewrites73.4%
if -1.1000000000000001e74 < n < 3.80000000000000012e-152Initial program 43.3%
Taylor expanded in Om around inf
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6443.9
Applied rewrites43.9%
Applied rewrites56.8%
if 3.80000000000000012e-152 < n Initial program 54.8%
Taylor expanded in n around 0
mul-1-negN/A
unsub-negN/A
associate--r+N/A
+-commutativeN/A
lower--.f64N/A
+-commutativeN/A
unpow2N/A
associate-/r*N/A
metadata-evalN/A
cancel-sign-sub-invN/A
associate-*r/N/A
Applied rewrites56.5%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 3.7e+32)
(sqrt (* (fma (/ l Om) (/ (* U* (* l n)) Om) t) (* (* 2.0 n) U)))
(sqrt
(*
2.0
(/ (* (* U l) (* n (fma -2.0 l (/ (* l (* n (- U U*))) (- Om))))) Om)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 3.7e+32) {
tmp = sqrt((fma((l / Om), ((U_42_ * (l * n)) / Om), t) * ((2.0 * n) * U)));
} else {
tmp = sqrt((2.0 * (((U * l) * (n * fma(-2.0, l, ((l * (n * (U - U_42_))) / -Om)))) / Om)));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 3.7e+32) tmp = sqrt(Float64(fma(Float64(l / Om), Float64(Float64(U_42_ * Float64(l * n)) / Om), t) * Float64(Float64(2.0 * n) * U))); else tmp = sqrt(Float64(2.0 * Float64(Float64(Float64(U * l) * Float64(n * fma(-2.0, l, Float64(Float64(l * Float64(n * Float64(U - U_42_))) / Float64(-Om))))) / Om))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 3.7e+32], N[Sqrt[N[(N[(N[(l / Om), $MachinePrecision] * N[(N[(U$42$ * N[(l * n), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] + t), $MachinePrecision] * N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(N[(N[(U * l), $MachinePrecision] * N[(n * N[(-2.0 * l + N[(N[(l * N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-Om)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 3.7 \cdot 10^{+32}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{\ell}{Om}, \frac{U* \cdot \left(\ell \cdot n\right)}{Om}, t\right) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \frac{\left(U \cdot \ell\right) \cdot \left(n \cdot \mathsf{fma}\left(-2, \ell, \frac{\ell \cdot \left(n \cdot \left(U - U*\right)\right)}{-Om}\right)\right)}{Om}}\\
\end{array}
\end{array}
if l < 3.7e32Initial program 56.1%
lift--.f64N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6460.0
lift-*.f64N/A
Applied rewrites55.1%
Applied rewrites56.1%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6456.1
Applied rewrites61.1%
Taylor expanded in U* around inf
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6453.6
Applied rewrites53.6%
if 3.7e32 < l Initial program 38.1%
lift--.f64N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6448.9
lift-*.f64N/A
Applied rewrites48.8%
Applied rewrites48.7%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6448.7
Applied rewrites54.4%
Taylor expanded in t around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites61.0%
Final simplification55.3%
(FPCore (n U t l Om U*) :precision binary64 (if (or (<= n -1.1e+74) (not (<= n 7.4e-11))) (sqrt (* (fma (/ l Om) (/ (* U* (* l n)) Om) t) (* (* 2.0 n) U))) (sqrt (fma (/ (* (* U l) (* n l)) Om) -4.0 (* (* (* n t) U) 2.0)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if ((n <= -1.1e+74) || !(n <= 7.4e-11)) {
tmp = sqrt((fma((l / Om), ((U_42_ * (l * n)) / Om), t) * ((2.0 * n) * U)));
} else {
tmp = sqrt(fma((((U * l) * (n * l)) / Om), -4.0, (((n * t) * U) * 2.0)));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if ((n <= -1.1e+74) || !(n <= 7.4e-11)) tmp = sqrt(Float64(fma(Float64(l / Om), Float64(Float64(U_42_ * Float64(l * n)) / Om), t) * Float64(Float64(2.0 * n) * U))); else tmp = sqrt(fma(Float64(Float64(Float64(U * l) * Float64(n * l)) / Om), -4.0, Float64(Float64(Float64(n * t) * U) * 2.0))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[Or[LessEqual[n, -1.1e+74], N[Not[LessEqual[n, 7.4e-11]], $MachinePrecision]], N[Sqrt[N[(N[(N[(l / Om), $MachinePrecision] * N[(N[(U$42$ * N[(l * n), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] + t), $MachinePrecision] * N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(U * l), $MachinePrecision] * N[(n * l), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] * -4.0 + N[(N[(N[(n * t), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;n \leq -1.1 \cdot 10^{+74} \lor \neg \left(n \leq 7.4 \cdot 10^{-11}\right):\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{\ell}{Om}, \frac{U* \cdot \left(\ell \cdot n\right)}{Om}, t\right) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{\left(U \cdot \ell\right) \cdot \left(n \cdot \ell\right)}{Om}, -4, \left(\left(n \cdot t\right) \cdot U\right) \cdot 2\right)}\\
\end{array}
\end{array}
if n < -1.1000000000000001e74 or 7.4000000000000003e-11 < n Initial program 63.0%
lift--.f64N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6465.7
lift-*.f64N/A
Applied rewrites57.2%
Applied rewrites56.2%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6456.2
Applied rewrites68.3%
Taylor expanded in U* around inf
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6467.5
Applied rewrites67.5%
if -1.1000000000000001e74 < n < 7.4000000000000003e-11Initial program 43.4%
Taylor expanded in Om around inf
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6441.0
Applied rewrites41.0%
Applied rewrites53.7%
Final simplification59.8%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 5.2e-250)
(sqrt (* (* (* U n) t) 2.0))
(if (<= l 1.6e+102)
(sqrt (* (* (* (fma -2.0 (/ (* l l) Om) t) n) U) 2.0))
(if (<= l 1.45e+148)
(sqrt (* (/ (* (* U* U) (* (* l n) (* l n))) (* Om Om)) 2.0))
(sqrt (fma (/ (* (* U l) (* n l)) Om) -4.0 (* (* (* n t) U) 2.0)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 5.2e-250) {
tmp = sqrt((((U * n) * t) * 2.0));
} else if (l <= 1.6e+102) {
tmp = sqrt((((fma(-2.0, ((l * l) / Om), t) * n) * U) * 2.0));
} else if (l <= 1.45e+148) {
tmp = sqrt(((((U_42_ * U) * ((l * n) * (l * n))) / (Om * Om)) * 2.0));
} else {
tmp = sqrt(fma((((U * l) * (n * l)) / Om), -4.0, (((n * t) * U) * 2.0)));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 5.2e-250) tmp = sqrt(Float64(Float64(Float64(U * n) * t) * 2.0)); elseif (l <= 1.6e+102) tmp = sqrt(Float64(Float64(Float64(fma(-2.0, Float64(Float64(l * l) / Om), t) * n) * U) * 2.0)); elseif (l <= 1.45e+148) tmp = sqrt(Float64(Float64(Float64(Float64(U_42_ * U) * Float64(Float64(l * n) * Float64(l * n))) / Float64(Om * Om)) * 2.0)); else tmp = sqrt(fma(Float64(Float64(Float64(U * l) * Float64(n * l)) / Om), -4.0, Float64(Float64(Float64(n * t) * U) * 2.0))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 5.2e-250], N[Sqrt[N[(N[(N[(U * n), $MachinePrecision] * t), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 1.6e+102], N[Sqrt[N[(N[(N[(N[(-2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] + t), $MachinePrecision] * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 1.45e+148], N[Sqrt[N[(N[(N[(N[(U$42$ * U), $MachinePrecision] * N[(N[(l * n), $MachinePrecision] * N[(l * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(U * l), $MachinePrecision] * N[(n * l), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] * -4.0 + N[(N[(N[(n * t), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 5.2 \cdot 10^{-250}:\\
\;\;\;\;\sqrt{\left(\left(U \cdot n\right) \cdot t\right) \cdot 2}\\
\mathbf{elif}\;\ell \leq 1.6 \cdot 10^{+102}:\\
\;\;\;\;\sqrt{\left(\left(\mathsf{fma}\left(-2, \frac{\ell \cdot \ell}{Om}, t\right) \cdot n\right) \cdot U\right) \cdot 2}\\
\mathbf{elif}\;\ell \leq 1.45 \cdot 10^{+148}:\\
\;\;\;\;\sqrt{\frac{\left(U* \cdot U\right) \cdot \left(\left(\ell \cdot n\right) \cdot \left(\ell \cdot n\right)\right)}{Om \cdot Om} \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{\left(U \cdot \ell\right) \cdot \left(n \cdot \ell\right)}{Om}, -4, \left(\left(n \cdot t\right) \cdot U\right) \cdot 2\right)}\\
\end{array}
\end{array}
if l < 5.20000000000000016e-250Initial program 53.5%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6433.7
Applied rewrites33.7%
Applied rewrites36.3%
if 5.20000000000000016e-250 < l < 1.6e102Initial program 62.8%
Taylor expanded in n around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6455.2
Applied rewrites55.2%
if 1.6e102 < l < 1.45e148Initial program 72.3%
lift--.f64N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6472.7
lift-*.f64N/A
Applied rewrites72.2%
Applied rewrites71.7%
Taylor expanded in U* around inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
unpow2N/A
unswap-sqrN/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6465.7
Applied rewrites65.7%
if 1.45e148 < l Initial program 19.1%
Taylor expanded in Om around inf
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6414.4
Applied rewrites14.4%
Applied rewrites42.8%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 5.2e-250)
(sqrt (* (* (* U n) t) 2.0))
(if (<= l 1.6e+102)
(sqrt (* (* (* (fma -2.0 (/ (* l l) Om) t) n) U) 2.0))
(if (<= l 1.45e+148)
(sqrt (* (/ (* (* U* U) (* (* l n) (* l n))) (* Om Om)) 2.0))
(sqrt (fma (/ (* l (* (* n l) U)) Om) -4.0 (* (* (* n t) U) 2.0)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 5.2e-250) {
tmp = sqrt((((U * n) * t) * 2.0));
} else if (l <= 1.6e+102) {
tmp = sqrt((((fma(-2.0, ((l * l) / Om), t) * n) * U) * 2.0));
} else if (l <= 1.45e+148) {
tmp = sqrt(((((U_42_ * U) * ((l * n) * (l * n))) / (Om * Om)) * 2.0));
} else {
tmp = sqrt(fma(((l * ((n * l) * U)) / Om), -4.0, (((n * t) * U) * 2.0)));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 5.2e-250) tmp = sqrt(Float64(Float64(Float64(U * n) * t) * 2.0)); elseif (l <= 1.6e+102) tmp = sqrt(Float64(Float64(Float64(fma(-2.0, Float64(Float64(l * l) / Om), t) * n) * U) * 2.0)); elseif (l <= 1.45e+148) tmp = sqrt(Float64(Float64(Float64(Float64(U_42_ * U) * Float64(Float64(l * n) * Float64(l * n))) / Float64(Om * Om)) * 2.0)); else tmp = sqrt(fma(Float64(Float64(l * Float64(Float64(n * l) * U)) / Om), -4.0, Float64(Float64(Float64(n * t) * U) * 2.0))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 5.2e-250], N[Sqrt[N[(N[(N[(U * n), $MachinePrecision] * t), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 1.6e+102], N[Sqrt[N[(N[(N[(N[(-2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] + t), $MachinePrecision] * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 1.45e+148], N[Sqrt[N[(N[(N[(N[(U$42$ * U), $MachinePrecision] * N[(N[(l * n), $MachinePrecision] * N[(l * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(l * N[(N[(n * l), $MachinePrecision] * U), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] * -4.0 + N[(N[(N[(n * t), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 5.2 \cdot 10^{-250}:\\
\;\;\;\;\sqrt{\left(\left(U \cdot n\right) \cdot t\right) \cdot 2}\\
\mathbf{elif}\;\ell \leq 1.6 \cdot 10^{+102}:\\
\;\;\;\;\sqrt{\left(\left(\mathsf{fma}\left(-2, \frac{\ell \cdot \ell}{Om}, t\right) \cdot n\right) \cdot U\right) \cdot 2}\\
\mathbf{elif}\;\ell \leq 1.45 \cdot 10^{+148}:\\
\;\;\;\;\sqrt{\frac{\left(U* \cdot U\right) \cdot \left(\left(\ell \cdot n\right) \cdot \left(\ell \cdot n\right)\right)}{Om \cdot Om} \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{\ell \cdot \left(\left(n \cdot \ell\right) \cdot U\right)}{Om}, -4, \left(\left(n \cdot t\right) \cdot U\right) \cdot 2\right)}\\
\end{array}
\end{array}
if l < 5.20000000000000016e-250Initial program 53.5%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6433.7
Applied rewrites33.7%
Applied rewrites36.3%
if 5.20000000000000016e-250 < l < 1.6e102Initial program 62.8%
Taylor expanded in n around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6455.2
Applied rewrites55.2%
if 1.6e102 < l < 1.45e148Initial program 72.3%
lift--.f64N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6472.7
lift-*.f64N/A
Applied rewrites72.2%
Applied rewrites71.7%
Taylor expanded in U* around inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
unpow2N/A
unswap-sqrN/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6465.7
Applied rewrites65.7%
if 1.45e148 < l Initial program 19.1%
Taylor expanded in Om around inf
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6414.4
Applied rewrites14.4%
Applied rewrites40.1%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 5.2e-250)
(sqrt (* (* (* U n) t) 2.0))
(if (<= l 2e+129)
(sqrt (* (* (* (fma -2.0 (/ (* l l) Om) t) n) U) 2.0))
(sqrt (* (fma (/ l Om) (* -2.0 l) t) (* (* 2.0 n) U))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 5.2e-250) {
tmp = sqrt((((U * n) * t) * 2.0));
} else if (l <= 2e+129) {
tmp = sqrt((((fma(-2.0, ((l * l) / Om), t) * n) * U) * 2.0));
} else {
tmp = sqrt((fma((l / Om), (-2.0 * l), t) * ((2.0 * n) * U)));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 5.2e-250) tmp = sqrt(Float64(Float64(Float64(U * n) * t) * 2.0)); elseif (l <= 2e+129) tmp = sqrt(Float64(Float64(Float64(fma(-2.0, Float64(Float64(l * l) / Om), t) * n) * U) * 2.0)); else tmp = sqrt(Float64(fma(Float64(l / Om), Float64(-2.0 * l), t) * Float64(Float64(2.0 * n) * U))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 5.2e-250], N[Sqrt[N[(N[(N[(U * n), $MachinePrecision] * t), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 2e+129], N[Sqrt[N[(N[(N[(N[(-2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] + t), $MachinePrecision] * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(l / Om), $MachinePrecision] * N[(-2.0 * l), $MachinePrecision] + t), $MachinePrecision] * N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 5.2 \cdot 10^{-250}:\\
\;\;\;\;\sqrt{\left(\left(U \cdot n\right) \cdot t\right) \cdot 2}\\
\mathbf{elif}\;\ell \leq 2 \cdot 10^{+129}:\\
\;\;\;\;\sqrt{\left(\left(\mathsf{fma}\left(-2, \frac{\ell \cdot \ell}{Om}, t\right) \cdot n\right) \cdot U\right) \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{\ell}{Om}, -2 \cdot \ell, t\right) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}\\
\end{array}
\end{array}
if l < 5.20000000000000016e-250Initial program 53.5%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6433.7
Applied rewrites33.7%
Applied rewrites36.3%
if 5.20000000000000016e-250 < l < 2e129Initial program 64.3%
Taylor expanded in n around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6451.7
Applied rewrites51.7%
if 2e129 < l Initial program 26.4%
lift--.f64N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6441.6
lift-*.f64N/A
Applied rewrites41.7%
Applied rewrites41.6%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6441.6
Applied rewrites49.5%
Taylor expanded in n around 0
lower-*.f6436.9
Applied rewrites36.9%
(FPCore (n U t l Om U*) :precision binary64 (if (<= l 5.2e-250) (sqrt (* (* (* U n) t) 2.0)) (sqrt (* (* (* (fma -2.0 (/ (* l l) Om) t) n) U) 2.0))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 5.2e-250) {
tmp = sqrt((((U * n) * t) * 2.0));
} else {
tmp = sqrt((((fma(-2.0, ((l * l) / Om), t) * n) * U) * 2.0));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 5.2e-250) tmp = sqrt(Float64(Float64(Float64(U * n) * t) * 2.0)); else tmp = sqrt(Float64(Float64(Float64(fma(-2.0, Float64(Float64(l * l) / Om), t) * n) * U) * 2.0)); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 5.2e-250], N[Sqrt[N[(N[(N[(U * n), $MachinePrecision] * t), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(-2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] + t), $MachinePrecision] * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 5.2 \cdot 10^{-250}:\\
\;\;\;\;\sqrt{\left(\left(U \cdot n\right) \cdot t\right) \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\left(\mathsf{fma}\left(-2, \frac{\ell \cdot \ell}{Om}, t\right) \cdot n\right) \cdot U\right) \cdot 2}\\
\end{array}
\end{array}
if l < 5.20000000000000016e-250Initial program 53.5%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6433.7
Applied rewrites33.7%
Applied rewrites36.3%
if 5.20000000000000016e-250 < l Initial program 50.1%
Taylor expanded in n around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6441.7
Applied rewrites41.7%
(FPCore (n U t l Om U*) :precision binary64 (if (<= l 1.12e+36) (sqrt (* (* (* U n) t) 2.0)) (sqrt (* (/ (* (* (* l l) n) U) Om) -4.0))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.12e+36) {
tmp = sqrt((((U * n) * t) * 2.0));
} else {
tmp = sqrt((((((l * l) * n) * U) / Om) * -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 <= 1.12d+36) then
tmp = sqrt((((u * n) * t) * 2.0d0))
else
tmp = sqrt((((((l * l) * n) * u) / om) * (-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 <= 1.12e+36) {
tmp = Math.sqrt((((U * n) * t) * 2.0));
} else {
tmp = Math.sqrt((((((l * l) * n) * U) / Om) * -4.0));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 1.12e+36: tmp = math.sqrt((((U * n) * t) * 2.0)) else: tmp = math.sqrt((((((l * l) * n) * U) / Om) * -4.0)) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.12e+36) tmp = sqrt(Float64(Float64(Float64(U * n) * t) * 2.0)); else tmp = sqrt(Float64(Float64(Float64(Float64(Float64(l * l) * n) * U) / Om) * -4.0)); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 1.12e+36) tmp = sqrt((((U * n) * t) * 2.0)); else tmp = sqrt((((((l * l) * n) * U) / Om) * -4.0)); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1.12e+36], N[Sqrt[N[(N[(N[(U * n), $MachinePrecision] * t), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(N[(l * l), $MachinePrecision] * n), $MachinePrecision] * U), $MachinePrecision] / Om), $MachinePrecision] * -4.0), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.12 \cdot 10^{+36}:\\
\;\;\;\;\sqrt{\left(\left(U \cdot n\right) \cdot t\right) \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{\left(\left(\ell \cdot \ell\right) \cdot n\right) \cdot U}{Om} \cdot -4}\\
\end{array}
\end{array}
if l < 1.11999999999999999e36Initial program 55.9%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6437.8
Applied rewrites37.8%
Applied rewrites38.6%
if 1.11999999999999999e36 < l Initial program 38.7%
Taylor expanded in Om around inf
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6421.9
Applied rewrites21.9%
Taylor expanded in t around 0
Applied rewrites22.2%
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* (* U n) t) 2.0)))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((((U * n) * t) * 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((((u * n) * t) * 2.0d0))
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((((U * n) * t) * 2.0));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt((((U * n) * t) * 2.0))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(Float64(U * n) * t) * 2.0)) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((((U * n) * t) * 2.0)); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(U * n), $MachinePrecision] * t), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left(\left(U \cdot n\right) \cdot t\right) \cdot 2}
\end{array}
Initial program 52.1%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6431.7
Applied rewrites31.7%
Applied rewrites32.2%
herbie shell --seed 2024302
(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*))))))