
(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 22 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 (fma (/ l Om) (fma (* (- U U*) (/ l Om)) (- n) (* -2.0 l)) t)))
(if (<= U 3.4e-290)
(sqrt (* (* t_1 U) (* 2.0 n)))
(* (sqrt (* t_1 (* 2.0 n))) (sqrt U)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = fma((l / Om), fma(((U - U_42_) * (l / Om)), -n, (-2.0 * l)), t);
double tmp;
if (U <= 3.4e-290) {
tmp = sqrt(((t_1 * U) * (2.0 * n)));
} else {
tmp = sqrt((t_1 * (2.0 * n))) * sqrt(U);
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = fma(Float64(l / Om), fma(Float64(Float64(U - U_42_) * Float64(l / Om)), Float64(-n), Float64(-2.0 * l)), t) tmp = 0.0 if (U <= 3.4e-290) tmp = sqrt(Float64(Float64(t_1 * U) * Float64(2.0 * n))); else tmp = Float64(sqrt(Float64(t_1 * Float64(2.0 * n))) * sqrt(U)); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l / Om), $MachinePrecision] * N[(N[(N[(U - U$42$), $MachinePrecision] * N[(l / Om), $MachinePrecision]), $MachinePrecision] * (-n) + N[(-2.0 * l), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[U, 3.4e-290], N[Sqrt[N[(N[(t$95$1 * U), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(t$95$1 * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[U], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{\ell}{Om}, \mathsf{fma}\left(\left(U - U*\right) \cdot \frac{\ell}{Om}, -n, -2 \cdot \ell\right), t\right)\\
\mathbf{if}\;U \leq 3.4 \cdot 10^{-290}:\\
\;\;\;\;\sqrt{\left(t\_1 \cdot U\right) \cdot \left(2 \cdot n\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t\_1 \cdot \left(2 \cdot n\right)} \cdot \sqrt{U}\\
\end{array}
\end{array}
if U < 3.39999999999999984e-290Initial program 50.1%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/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--.f6456.5
lift-*.f64N/A
Applied rewrites55.7%
Applied rewrites54.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites64.3%
if 3.39999999999999984e-290 < U Initial program 50.7%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/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--.f6456.8
lift-*.f64N/A
Applied rewrites49.4%
Applied rewrites49.5%
lift-sqrt.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
Applied rewrites73.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 0.0)
(* (sqrt (* (* 2.0 n) t)) (sqrt U))
(if (<= t_3 1e+145)
(sqrt (* t_2 (fma -2.0 t_1 t)))
(sqrt (* U* (* (* (/ l Om) l) (* (* (/ (* n n) Om) 2.0) U))))))))
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 <= 0.0) {
tmp = sqrt(((2.0 * n) * t)) * sqrt(U);
} else if (t_3 <= 1e+145) {
tmp = sqrt((t_2 * fma(-2.0, t_1, t)));
} else {
tmp = sqrt((U_42_ * (((l / Om) * l) * ((((n * n) / Om) * 2.0) * U))));
}
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 <= 0.0) tmp = Float64(sqrt(Float64(Float64(2.0 * n) * t)) * sqrt(U)); elseif (t_3 <= 1e+145) tmp = sqrt(Float64(t_2 * fma(-2.0, t_1, t))); else tmp = sqrt(Float64(U_42_ * Float64(Float64(Float64(l / Om) * l) * Float64(Float64(Float64(Float64(n * n) / Om) * 2.0) * U)))); 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, 0.0], N[(N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision] * N[Sqrt[U], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 1e+145], N[Sqrt[N[(t$95$2 * N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(U$42$ * N[(N[(N[(l / Om), $MachinePrecision] * l), $MachinePrecision] * N[(N[(N[(N[(n * n), $MachinePrecision] / Om), $MachinePrecision] * 2.0), $MachinePrecision] * U), $MachinePrecision]), $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 0:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot t} \cdot \sqrt{U}\\
\mathbf{elif}\;t\_3 \leq 10^{+145}:\\
\;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, t\_1, t\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{U* \cdot \left(\left(\frac{\ell}{Om} \cdot \ell\right) \cdot \left(\left(\frac{n \cdot n}{Om} \cdot 2\right) \cdot U\right)\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 14.5%
Applied rewrites37.5%
Taylor expanded in n around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f6438.6
Applied rewrites38.6%
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*))))) < 9.9999999999999999e144Initial program 97.8%
Taylor expanded in n around 0
metadata-evalN/A
fp-cancel-sign-sub-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6488.1
Applied rewrites88.1%
if 9.9999999999999999e144 < (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 16.8%
Taylor expanded in U* around inf
count-2-revN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-outN/A
lower-*.f64N/A
associate-*r*N/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
count-2-revN/A
lower-*.f6428.6
Applied rewrites28.6%
Applied rewrites32.2%
(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 2e+53)
(sqrt
(*
(* (+ t (/ (* l (fma -2.0 l (/ (* U* (* l n)) Om))) Om)) U)
(* 2.0 n)))
(if (<= t_3 5e+289)
(sqrt (* t_2 (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 = t_2 * ((t - (2.0 * t_1)) - ((n * pow((l / Om), 2.0)) * (U - U_42_)));
double tmp;
if (t_3 <= 2e+53) {
tmp = sqrt((((t + ((l * fma(-2.0, l, ((U_42_ * (l * n)) / Om))) / Om)) * U) * (2.0 * n)));
} else if (t_3 <= 5e+289) {
tmp = sqrt((t_2 * 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 = 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 <= 2e+53) tmp = sqrt(Float64(Float64(Float64(t + Float64(Float64(l * fma(-2.0, l, Float64(Float64(U_42_ * Float64(l * n)) / Om))) / Om)) * U) * Float64(2.0 * n))); elseif (t_3 <= 5e+289) tmp = sqrt(Float64(t_2 * 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[(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, 2e+53], N[Sqrt[N[(N[(N[(t + N[(N[(l * N[(-2.0 * l + N[(N[(U$42$ * N[(l * n), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, 5e+289], N[Sqrt[N[(t$95$2 * N[(-2.0 * t$95$1 + t), $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 := 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 2 \cdot 10^{+53}:\\
\;\;\;\;\sqrt{\left(\left(t + \frac{\ell \cdot \mathsf{fma}\left(-2, \ell, \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)}{Om}\right) \cdot U\right) \cdot \left(2 \cdot n\right)}\\
\mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+289}:\\
\;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, t\_1, t\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 (*.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*)))) < 2e53Initial program 62.0%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/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--.f6464.0
lift-*.f64N/A
Applied rewrites59.2%
Applied rewrites60.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites70.0%
Taylor expanded in U around 0
lower-+.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6467.3
Applied rewrites67.3%
if 2e53 < (*.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*)))) < 5.00000000000000031e289Initial program 99.8%
Taylor expanded in n around 0
metadata-evalN/A
fp-cancel-sign-sub-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6487.9
Applied rewrites87.9%
if 5.00000000000000031e289 < (*.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 17.9%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/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--.f6431.0
lift-*.f64N/A
Applied rewrites29.6%
Applied rewrites26.0%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites43.4%
Taylor expanded in t around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites49.4%
Final simplification63.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 0.0)
(* (sqrt (* (* 2.0 n) t)) (sqrt U))
(if (<= t_3 1e+145)
(sqrt (* t_2 (fma -2.0 t_1 t)))
(* (* (sqrt (* U* U)) (* (/ n Om) (sqrt 2.0))) l)))))
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 <= 0.0) {
tmp = sqrt(((2.0 * n) * t)) * sqrt(U);
} else if (t_3 <= 1e+145) {
tmp = sqrt((t_2 * fma(-2.0, t_1, t)));
} else {
tmp = (sqrt((U_42_ * U)) * ((n / Om) * sqrt(2.0))) * l;
}
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 <= 0.0) tmp = Float64(sqrt(Float64(Float64(2.0 * n) * t)) * sqrt(U)); elseif (t_3 <= 1e+145) tmp = sqrt(Float64(t_2 * fma(-2.0, t_1, t))); else tmp = Float64(Float64(sqrt(Float64(U_42_ * U)) * Float64(Float64(n / Om) * sqrt(2.0))) * l); 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, 0.0], N[(N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision] * N[Sqrt[U], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 1e+145], N[Sqrt[N[(t$95$2 * N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(N[Sqrt[N[(U$42$ * U), $MachinePrecision]], $MachinePrecision] * N[(N[(n / Om), $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * l), $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 0:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot t} \cdot \sqrt{U}\\
\mathbf{elif}\;t\_3 \leq 10^{+145}:\\
\;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, t\_1, t\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\sqrt{U* \cdot U} \cdot \left(\frac{n}{Om} \cdot \sqrt{2}\right)\right) \cdot \ell\\
\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 14.5%
Applied rewrites37.5%
Taylor expanded in n around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f6438.6
Applied rewrites38.6%
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*))))) < 9.9999999999999999e144Initial program 97.8%
Taylor expanded in n around 0
metadata-evalN/A
fp-cancel-sign-sub-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6488.1
Applied rewrites88.1%
if 9.9999999999999999e144 < (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 16.8%
Taylor expanded in U* around -inf
mul-1-negN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
Applied rewrites19.5%
Applied rewrites21.2%
Final simplification51.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 0.0)
(* (sqrt (* (* 2.0 n) t)) (sqrt U))
(if (<= t_3 1e+145)
(sqrt (* t_2 (fma -2.0 t_1 t)))
(* (* (sqrt 2.0) (* (/ n Om) l)) (sqrt (* U* U)))))))
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 <= 0.0) {
tmp = sqrt(((2.0 * n) * t)) * sqrt(U);
} else if (t_3 <= 1e+145) {
tmp = sqrt((t_2 * fma(-2.0, t_1, t)));
} else {
tmp = (sqrt(2.0) * ((n / Om) * l)) * sqrt((U_42_ * U));
}
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 <= 0.0) tmp = Float64(sqrt(Float64(Float64(2.0 * n) * t)) * sqrt(U)); elseif (t_3 <= 1e+145) tmp = sqrt(Float64(t_2 * fma(-2.0, t_1, t))); else tmp = Float64(Float64(sqrt(2.0) * Float64(Float64(n / Om) * l)) * sqrt(Float64(U_42_ * U))); 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, 0.0], N[(N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision] * N[Sqrt[U], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 1e+145], N[Sqrt[N[(t$95$2 * N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[(n / Om), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(U$42$ * U), $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 0:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot t} \cdot \sqrt{U}\\
\mathbf{elif}\;t\_3 \leq 10^{+145}:\\
\;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, t\_1, t\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\sqrt{2} \cdot \left(\frac{n}{Om} \cdot \ell\right)\right) \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*))))) < 0.0Initial program 14.5%
Applied rewrites37.5%
Taylor expanded in n around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f6438.6
Applied rewrites38.6%
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*))))) < 9.9999999999999999e144Initial program 97.8%
Taylor expanded in n around 0
metadata-evalN/A
fp-cancel-sign-sub-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6488.1
Applied rewrites88.1%
if 9.9999999999999999e144 < (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 16.8%
Taylor expanded in U* around -inf
mul-1-negN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
Applied rewrites19.5%
Applied rewrites19.5%
Final simplification50.8%
(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 0.0)
(* (sqrt (* (* 2.0 n) t)) (sqrt U))
(if (<= t_3 1e+145)
(sqrt (* t_2 (fma -2.0 t_1 t)))
(* (* (* l (sqrt 2.0)) (/ n Om)) (sqrt (* U* U)))))))
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 <= 0.0) {
tmp = sqrt(((2.0 * n) * t)) * sqrt(U);
} else if (t_3 <= 1e+145) {
tmp = sqrt((t_2 * fma(-2.0, t_1, t)));
} else {
tmp = ((l * sqrt(2.0)) * (n / Om)) * sqrt((U_42_ * U));
}
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 <= 0.0) tmp = Float64(sqrt(Float64(Float64(2.0 * n) * t)) * sqrt(U)); elseif (t_3 <= 1e+145) tmp = sqrt(Float64(t_2 * fma(-2.0, t_1, t))); else tmp = Float64(Float64(Float64(l * sqrt(2.0)) * Float64(n / Om)) * sqrt(Float64(U_42_ * U))); 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, 0.0], N[(N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision] * N[Sqrt[U], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 1e+145], N[Sqrt[N[(t$95$2 * N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[(n / Om), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(U$42$ * U), $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 0:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot t} \cdot \sqrt{U}\\
\mathbf{elif}\;t\_3 \leq 10^{+145}:\\
\;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, t\_1, t\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\ell \cdot \sqrt{2}\right) \cdot \frac{n}{Om}\right) \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*))))) < 0.0Initial program 14.5%
Applied rewrites37.5%
Taylor expanded in n around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f6438.6
Applied rewrites38.6%
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*))))) < 9.9999999999999999e144Initial program 97.8%
Taylor expanded in n around 0
metadata-evalN/A
fp-cancel-sign-sub-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6488.1
Applied rewrites88.1%
if 9.9999999999999999e144 < (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 16.8%
Taylor expanded in U* around -inf
mul-1-negN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
Applied rewrites19.5%
Applied rewrites19.5%
Taylor expanded in l around 0
Applied rewrites19.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 0.0)
(* (* (sqrt (* n t)) (sqrt 2.0)) (sqrt U))
(if (<= t_3 5e+289)
(sqrt (* t_2 (fma -2.0 t_1 t)))
(sqrt
(*
(* -2.0 (/ (* (* (* l l) n) (+ 2.0 (/ (* n (- U U*)) Om))) Om))
U))))))
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 <= 0.0) {
tmp = (sqrt((n * t)) * sqrt(2.0)) * sqrt(U);
} else if (t_3 <= 5e+289) {
tmp = sqrt((t_2 * fma(-2.0, t_1, t)));
} else {
tmp = sqrt(((-2.0 * ((((l * l) * n) * (2.0 + ((n * (U - U_42_)) / Om))) / Om)) * U));
}
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 <= 0.0) tmp = Float64(Float64(sqrt(Float64(n * t)) * sqrt(2.0)) * sqrt(U)); elseif (t_3 <= 5e+289) tmp = sqrt(Float64(t_2 * fma(-2.0, t_1, t))); else tmp = sqrt(Float64(Float64(-2.0 * Float64(Float64(Float64(Float64(l * l) * n) * Float64(2.0 + Float64(Float64(n * Float64(U - U_42_)) / Om))) / Om)) * U)); 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, 0.0], N[(N[(N[Sqrt[N[(n * t), $MachinePrecision]], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[U], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 5e+289], N[Sqrt[N[(t$95$2 * N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(-2.0 * N[(N[(N[(N[(l * l), $MachinePrecision] * n), $MachinePrecision] * N[(2.0 + N[(N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] * U), $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 0:\\
\;\;\;\;\left(\sqrt{n \cdot t} \cdot \sqrt{2}\right) \cdot \sqrt{U}\\
\mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+289}:\\
\;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, t\_1, t\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(-2 \cdot \frac{\left(\left(\ell \cdot \ell\right) \cdot n\right) \cdot \left(2 + \frac{n \cdot \left(U - U*\right)}{Om}\right)}{Om}\right) \cdot U}\\
\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 12.1%
Applied rewrites31.4%
Taylor expanded in n around 0
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower-sqrt.f6434.7
Applied rewrites34.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*)))) < 5.00000000000000031e289Initial program 97.8%
Taylor expanded in n around 0
metadata-evalN/A
fp-cancel-sign-sub-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6488.1
Applied rewrites88.1%
if 5.00000000000000031e289 < (*.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 17.9%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/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--.f6431.0
lift-*.f64N/A
Applied rewrites29.6%
Applied rewrites26.0%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites42.5%
Taylor expanded in l around -inf
lower-*.f64N/A
lower-/.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f6435.2
Applied rewrites35.2%
(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 0.0)
(* (* (sqrt (* n t)) (sqrt 2.0)) (sqrt U))
(if (<= t_3 INFINITY)
(sqrt (* t_2 (fma -2.0 t_1 t)))
(sqrt (* t_2 (/ (* U* (* (* l l) n)) (* 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 = t_2 * ((t - (2.0 * t_1)) - ((n * pow((l / Om), 2.0)) * (U - U_42_)));
double tmp;
if (t_3 <= 0.0) {
tmp = (sqrt((n * t)) * sqrt(2.0)) * sqrt(U);
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((t_2 * fma(-2.0, t_1, t)));
} else {
tmp = sqrt((t_2 * ((U_42_ * ((l * l) * n)) / (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 = 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 <= 0.0) tmp = Float64(Float64(sqrt(Float64(n * t)) * sqrt(2.0)) * sqrt(U)); elseif (t_3 <= Inf) tmp = sqrt(Float64(t_2 * fma(-2.0, t_1, t))); else tmp = sqrt(Float64(t_2 * Float64(Float64(U_42_ * Float64(Float64(l * l) * n)) / 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[(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, 0.0], N[(N[(N[Sqrt[N[(n * t), $MachinePrecision]], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[U], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$2 * N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(t$95$2 * N[(N[(U$42$ * N[(N[(l * l), $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $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 := 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 0:\\
\;\;\;\;\left(\sqrt{n \cdot t} \cdot \sqrt{2}\right) \cdot \sqrt{U}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, t\_1, t\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t\_2 \cdot \frac{U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)}{Om \cdot 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*)))) < 0.0Initial program 12.1%
Applied rewrites31.4%
Taylor expanded in n around 0
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower-sqrt.f6434.7
Applied rewrites34.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*)))) < +inf.0Initial program 69.6%
Taylor expanded in n around 0
metadata-evalN/A
fp-cancel-sign-sub-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6462.3
Applied rewrites62.3%
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
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/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--.f6417.6
lift-*.f64N/A
Applied rewrites17.6%
Applied rewrites4.0%
Taylor expanded in U* around inf
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6442.7
Applied rewrites42.7%
(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 0.0)
(* (* (sqrt (* n t)) (sqrt 2.0)) (sqrt U))
(if (<= t_3 INFINITY)
(sqrt (* t_2 (fma -2.0 t_1 t)))
(sqrt (* (* (* (* l l) U*) (/ (* n n) (* Om Om))) (* 2.0 U)))))))
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 <= 0.0) {
tmp = (sqrt((n * t)) * sqrt(2.0)) * sqrt(U);
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((t_2 * fma(-2.0, t_1, t)));
} else {
tmp = sqrt(((((l * l) * U_42_) * ((n * n) / (Om * Om))) * (2.0 * U)));
}
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 <= 0.0) tmp = Float64(Float64(sqrt(Float64(n * t)) * sqrt(2.0)) * sqrt(U)); elseif (t_3 <= Inf) tmp = sqrt(Float64(t_2 * fma(-2.0, t_1, t))); else tmp = sqrt(Float64(Float64(Float64(Float64(l * l) * U_42_) * Float64(Float64(n * n) / Float64(Om * Om))) * Float64(2.0 * U))); 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, 0.0], N[(N[(N[Sqrt[N[(n * t), $MachinePrecision]], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[U], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$2 * N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(l * l), $MachinePrecision] * U$42$), $MachinePrecision] * N[(N[(n * n), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * U), $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 := 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 0:\\
\;\;\;\;\left(\sqrt{n \cdot t} \cdot \sqrt{2}\right) \cdot \sqrt{U}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, t\_1, t\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\left(\left(\ell \cdot \ell\right) \cdot U*\right) \cdot \frac{n \cdot n}{Om \cdot Om}\right) \cdot \left(2 \cdot U\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 12.1%
Applied rewrites31.4%
Taylor expanded in n around 0
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower-sqrt.f6434.7
Applied rewrites34.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*)))) < +inf.0Initial program 69.6%
Taylor expanded in n around 0
metadata-evalN/A
fp-cancel-sign-sub-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6462.3
Applied rewrites62.3%
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
count-2-revN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-outN/A
lower-*.f64N/A
associate-*r*N/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
count-2-revN/A
lower-*.f6442.5
Applied rewrites42.5%
Applied rewrites42.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 0.0)
(* (* (sqrt (* n t)) (sqrt 2.0)) (sqrt U))
(if (<= t_3 INFINITY)
(sqrt (* t_2 (fma -2.0 t_1 t)))
(sqrt (* 2.0 (/ (* (* U U*) (* (* l l) (* n n))) (* 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 = t_2 * ((t - (2.0 * t_1)) - ((n * pow((l / Om), 2.0)) * (U - U_42_)));
double tmp;
if (t_3 <= 0.0) {
tmp = (sqrt((n * t)) * sqrt(2.0)) * sqrt(U);
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((t_2 * fma(-2.0, t_1, t)));
} else {
tmp = sqrt((2.0 * (((U * U_42_) * ((l * l) * (n * n))) / (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 = 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 <= 0.0) tmp = Float64(Float64(sqrt(Float64(n * t)) * sqrt(2.0)) * sqrt(U)); elseif (t_3 <= Inf) tmp = sqrt(Float64(t_2 * fma(-2.0, t_1, t))); else tmp = sqrt(Float64(2.0 * Float64(Float64(Float64(U * U_42_) * Float64(Float64(l * l) * Float64(n * n))) / 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[(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, 0.0], N[(N[(N[Sqrt[N[(n * t), $MachinePrecision]], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[U], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$2 * N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(N[(N[(U * U$42$), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] * N[(n * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $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 := 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 0:\\
\;\;\;\;\left(\sqrt{n \cdot t} \cdot \sqrt{2}\right) \cdot \sqrt{U}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, t\_1, t\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \frac{\left(U \cdot U*\right) \cdot \left(\left(\ell \cdot \ell\right) \cdot \left(n \cdot n\right)\right)}{Om \cdot 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*)))) < 0.0Initial program 12.1%
Applied rewrites31.4%
Taylor expanded in n around 0
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower-sqrt.f6434.7
Applied rewrites34.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*)))) < +inf.0Initial program 69.6%
Taylor expanded in n around 0
metadata-evalN/A
fp-cancel-sign-sub-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6462.3
Applied rewrites62.3%
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
count-2-revN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-outN/A
lower-*.f64N/A
associate-*r*N/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
count-2-revN/A
lower-*.f6442.5
Applied rewrites42.5%
Taylor expanded in n around 0
Applied rewrites42.3%
(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 0.0)
(* (* (sqrt (* n t)) (sqrt 2.0)) (sqrt U))
(if (<= t_3 INFINITY)
(sqrt (* t_2 (fma -2.0 t_1 t)))
(sqrt (* (* t U) (sqrt (* (* n n) 4.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 <= 0.0) {
tmp = (sqrt((n * t)) * sqrt(2.0)) * sqrt(U);
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((t_2 * fma(-2.0, t_1, t)));
} else {
tmp = sqrt(((t * U) * sqrt(((n * n) * 4.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 <= 0.0) tmp = Float64(Float64(sqrt(Float64(n * t)) * sqrt(2.0)) * sqrt(U)); elseif (t_3 <= Inf) tmp = sqrt(Float64(t_2 * fma(-2.0, t_1, t))); else tmp = sqrt(Float64(Float64(t * U) * sqrt(Float64(Float64(n * n) * 4.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, 0.0], N[(N[(N[Sqrt[N[(n * t), $MachinePrecision]], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[U], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$2 * N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(t * U), $MachinePrecision] * N[Sqrt[N[(N[(n * n), $MachinePrecision] * 4.0), $MachinePrecision]], $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 := 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 0:\\
\;\;\;\;\left(\sqrt{n \cdot t} \cdot \sqrt{2}\right) \cdot \sqrt{U}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, t\_1, t\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(t \cdot U\right) \cdot \sqrt{\left(n \cdot n\right) \cdot 4}}\\
\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 12.1%
Applied rewrites31.4%
Taylor expanded in n around 0
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower-sqrt.f6434.7
Applied rewrites34.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*)))) < +inf.0Initial program 69.6%
Taylor expanded in n around 0
metadata-evalN/A
fp-cancel-sign-sub-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6462.3
Applied rewrites62.3%
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 t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f647.2
Applied rewrites7.2%
Applied rewrites4.6%
Applied rewrites1.9%
Applied rewrites21.3%
(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*))))
INFINITY)
(sqrt
(*
(* (fma (/ l Om) (fma (* (- U U*) (/ l Om)) (- n) (* -2.0 l)) t) U)
(* 2.0 n)))
(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 ((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))) <= ((double) INFINITY)) {
tmp = sqrt(((fma((l / Om), fma(((U - U_42_) * (l / Om)), -n, (-2.0 * l)), t) * U) * (2.0 * n)));
} 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 (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_)))) <= Inf) tmp = sqrt(Float64(Float64(fma(Float64(l / Om), fma(Float64(Float64(U - U_42_) * Float64(l / Om)), Float64(-n), Float64(-2.0 * l)), t) * U) * Float64(2.0 * n))); 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[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], Infinity], N[Sqrt[N[(N[(N[(N[(l / Om), $MachinePrecision] * N[(N[(N[(U - U$42$), $MachinePrecision] * N[(l / Om), $MachinePrecision]), $MachinePrecision] * (-n) + N[(-2.0 * l), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] * U), $MachinePrecision] * N[(2.0 * n), $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}\;\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 \infty:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(\frac{\ell}{Om}, \mathsf{fma}\left(\left(U - U*\right) \cdot \frac{\ell}{Om}, -n, -2 \cdot \ell\right), t\right) \cdot U\right) \cdot \left(2 \cdot n\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 (*.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 58.6%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/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--.f6463.0
lift-*.f64N/A
Applied rewrites58.7%
Applied rewrites59.9%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites63.7%
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
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/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--.f6417.6
lift-*.f64N/A
Applied rewrites17.6%
Applied rewrites4.0%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites49.0%
Taylor expanded in t around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites76.1%
Final simplification65.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*))))
0.0)
(sqrt (* (* t U) (+ n n)))
(sqrt (* t (* (* U n) 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(((t * U) * (n + n)));
} else {
tmp = sqrt((t * ((U * n) * 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(((t * u) * (n + n)))
else
tmp = sqrt((t * ((u * n) * 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(((t * U) * (n + n)));
} else {
tmp = Math.sqrt((t * ((U * n) * 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(((t * U) * (n + n))) else: tmp = math.sqrt((t * ((U * n) * 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(t * U) * Float64(n + n))); else tmp = sqrt(Float64(t * Float64(Float64(U * n) * 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(((t * U) * (n + n))); else tmp = sqrt((t * ((U * n) * 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[(t * U), $MachinePrecision] * N[(n + n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(t * N[(N[(U * n), $MachinePrecision] * 2.0), $MachinePrecision]), $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(t \cdot U\right) \cdot \left(n + n\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t \cdot \left(\left(U \cdot n\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 12.1%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6426.9
Applied rewrites26.9%
Applied rewrites18.5%
Applied rewrites31.0%
Applied rewrites31.0%
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 57.9%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6436.9
Applied rewrites36.9%
Applied rewrites42.9%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1
(* (fma (/ l Om) (fma (* (- U U*) (/ l Om)) (- n) (* -2.0 l)) t) U)))
(if (<= n 7.5e-309)
(sqrt (* t_1 (* 2.0 n)))
(* (sqrt t_1) (sqrt (* 2.0 n))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = fma((l / Om), fma(((U - U_42_) * (l / Om)), -n, (-2.0 * l)), t) * U;
double tmp;
if (n <= 7.5e-309) {
tmp = sqrt((t_1 * (2.0 * n)));
} else {
tmp = sqrt(t_1) * sqrt((2.0 * n));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(fma(Float64(l / Om), fma(Float64(Float64(U - U_42_) * Float64(l / Om)), Float64(-n), Float64(-2.0 * l)), t) * U) tmp = 0.0 if (n <= 7.5e-309) tmp = sqrt(Float64(t_1 * Float64(2.0 * n))); else tmp = Float64(sqrt(t_1) * sqrt(Float64(2.0 * n))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(N[(l / Om), $MachinePrecision] * N[(N[(N[(U - U$42$), $MachinePrecision] * N[(l / Om), $MachinePrecision]), $MachinePrecision] * (-n) + N[(-2.0 * l), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] * U), $MachinePrecision]}, If[LessEqual[n, 7.5e-309], N[Sqrt[N[(t$95$1 * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[t$95$1], $MachinePrecision] * N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{\ell}{Om}, \mathsf{fma}\left(\left(U - U*\right) \cdot \frac{\ell}{Om}, -n, -2 \cdot \ell\right), t\right) \cdot U\\
\mathbf{if}\;n \leq 7.5 \cdot 10^{-309}:\\
\;\;\;\;\sqrt{t\_1 \cdot \left(2 \cdot n\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t\_1} \cdot \sqrt{2 \cdot n}\\
\end{array}
\end{array}
if n < 7.5000000000000018e-309Initial program 50.7%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/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.7
lift-*.f64N/A
Applied rewrites54.8%
Applied rewrites51.8%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites65.0%
if 7.5000000000000018e-309 < n Initial program 50.0%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/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--.f6454.2
lift-*.f64N/A
Applied rewrites50.6%
Applied rewrites52.4%
lift-sqrt.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
sqrt-prodN/A
pow1/2N/A
lift-sqrt.f64N/A
lift-*.f64N/A
Applied rewrites67.2%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1
(* (fma (/ l Om) (fma (* (- U U*) (/ l Om)) (- n) (* -2.0 l)) t) U)))
(if (<= n 7.8e-302)
(sqrt (* t_1 (* 2.0 n)))
(* (sqrt n) (sqrt (* 2.0 t_1))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = fma((l / Om), fma(((U - U_42_) * (l / Om)), -n, (-2.0 * l)), t) * U;
double tmp;
if (n <= 7.8e-302) {
tmp = sqrt((t_1 * (2.0 * n)));
} else {
tmp = sqrt(n) * sqrt((2.0 * t_1));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(fma(Float64(l / Om), fma(Float64(Float64(U - U_42_) * Float64(l / Om)), Float64(-n), Float64(-2.0 * l)), t) * U) tmp = 0.0 if (n <= 7.8e-302) tmp = sqrt(Float64(t_1 * Float64(2.0 * n))); else tmp = Float64(sqrt(n) * sqrt(Float64(2.0 * t_1))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(N[(l / Om), $MachinePrecision] * N[(N[(N[(U - U$42$), $MachinePrecision] * N[(l / Om), $MachinePrecision]), $MachinePrecision] * (-n) + N[(-2.0 * l), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] * U), $MachinePrecision]}, If[LessEqual[n, 7.8e-302], N[Sqrt[N[(t$95$1 * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[n], $MachinePrecision] * N[Sqrt[N[(2.0 * t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{\ell}{Om}, \mathsf{fma}\left(\left(U - U*\right) \cdot \frac{\ell}{Om}, -n, -2 \cdot \ell\right), t\right) \cdot U\\
\mathbf{if}\;n \leq 7.8 \cdot 10^{-302}:\\
\;\;\;\;\sqrt{t\_1 \cdot \left(2 \cdot n\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{n} \cdot \sqrt{2 \cdot t\_1}\\
\end{array}
\end{array}
if n < 7.7999999999999998e-302Initial program 50.4%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/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.3
lift-*.f64N/A
Applied rewrites54.5%
Applied rewrites51.5%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites65.2%
if 7.7999999999999998e-302 < n Initial program 50.4%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/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--.f6454.6
lift-*.f64N/A
Applied rewrites51.0%
Applied rewrites52.8%
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
pow1/2N/A
lower-*.f64N/A
Applied rewrites67.0%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= Om -3e+212)
(sqrt
(* (* (fma (/ l Om) (fma (/ (* U l) Om) (- n) (* -2.0 l)) t) (* 2.0 n)) U))
(if (<= Om 3.7e+108)
(sqrt
(*
(* (+ t (/ (* l (fma -2.0 l (/ (* U* (* l n)) Om))) Om)) U)
(* 2.0 n)))
(sqrt (* t (* (* U n) 2.0))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (Om <= -3e+212) {
tmp = sqrt(((fma((l / Om), fma(((U * l) / Om), -n, (-2.0 * l)), t) * (2.0 * n)) * U));
} else if (Om <= 3.7e+108) {
tmp = sqrt((((t + ((l * fma(-2.0, l, ((U_42_ * (l * n)) / Om))) / Om)) * U) * (2.0 * n)));
} else {
tmp = sqrt((t * ((U * n) * 2.0)));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (Om <= -3e+212) tmp = sqrt(Float64(Float64(fma(Float64(l / Om), fma(Float64(Float64(U * l) / Om), Float64(-n), Float64(-2.0 * l)), t) * Float64(2.0 * n)) * U)); elseif (Om <= 3.7e+108) tmp = sqrt(Float64(Float64(Float64(t + Float64(Float64(l * fma(-2.0, l, Float64(Float64(U_42_ * Float64(l * n)) / Om))) / Om)) * U) * Float64(2.0 * n))); else tmp = sqrt(Float64(t * Float64(Float64(U * n) * 2.0))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[Om, -3e+212], N[Sqrt[N[(N[(N[(N[(l / Om), $MachinePrecision] * N[(N[(N[(U * l), $MachinePrecision] / Om), $MachinePrecision] * (-n) + N[(-2.0 * l), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision], If[LessEqual[Om, 3.7e+108], N[Sqrt[N[(N[(N[(t + N[(N[(l * N[(-2.0 * l + N[(N[(U$42$ * N[(l * n), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(t * N[(N[(U * n), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;Om \leq -3 \cdot 10^{+212}:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(\frac{\ell}{Om}, \mathsf{fma}\left(\frac{U \cdot \ell}{Om}, -n, -2 \cdot \ell\right), t\right) \cdot \left(2 \cdot n\right)\right) \cdot U}\\
\mathbf{elif}\;Om \leq 3.7 \cdot 10^{+108}:\\
\;\;\;\;\sqrt{\left(\left(t + \frac{\ell \cdot \mathsf{fma}\left(-2, \ell, \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)}{Om}\right) \cdot U\right) \cdot \left(2 \cdot n\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t \cdot \left(\left(U \cdot n\right) \cdot 2\right)}\\
\end{array}
\end{array}
if Om < -3e212Initial program 40.6%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/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--.f6454.3
lift-*.f64N/A
Applied rewrites48.9%
Applied rewrites48.9%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites57.1%
Taylor expanded in U around inf
lower-/.f64N/A
lower-*.f6452.4
Applied rewrites52.4%
if -3e212 < Om < 3.6999999999999998e108Initial program 48.1%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/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--.f6452.0
lift-*.f64N/A
Applied rewrites50.7%
Applied rewrites49.5%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites61.2%
Taylor expanded in U around 0
lower-+.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6460.0
Applied rewrites60.0%
if 3.6999999999999998e108 < Om Initial program 64.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6451.7
Applied rewrites51.7%
Applied rewrites63.9%
Final simplification60.1%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= Om -2.95e+121)
(sqrt
(* (* (fma (/ l Om) (fma (/ (* U l) Om) (- n) (* -2.0 l)) t) U) (* 2.0 n)))
(if (<= Om 3.7e+108)
(sqrt
(*
(* (+ t (/ (* l (fma -2.0 l (/ (* U* (* l n)) Om))) Om)) U)
(* 2.0 n)))
(sqrt (* t (* (* U n) 2.0))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (Om <= -2.95e+121) {
tmp = sqrt(((fma((l / Om), fma(((U * l) / Om), -n, (-2.0 * l)), t) * U) * (2.0 * n)));
} else if (Om <= 3.7e+108) {
tmp = sqrt((((t + ((l * fma(-2.0, l, ((U_42_ * (l * n)) / Om))) / Om)) * U) * (2.0 * n)));
} else {
tmp = sqrt((t * ((U * n) * 2.0)));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (Om <= -2.95e+121) tmp = sqrt(Float64(Float64(fma(Float64(l / Om), fma(Float64(Float64(U * l) / Om), Float64(-n), Float64(-2.0 * l)), t) * U) * Float64(2.0 * n))); elseif (Om <= 3.7e+108) tmp = sqrt(Float64(Float64(Float64(t + Float64(Float64(l * fma(-2.0, l, Float64(Float64(U_42_ * Float64(l * n)) / Om))) / Om)) * U) * Float64(2.0 * n))); else tmp = sqrt(Float64(t * Float64(Float64(U * n) * 2.0))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[Om, -2.95e+121], N[Sqrt[N[(N[(N[(N[(l / Om), $MachinePrecision] * N[(N[(N[(U * l), $MachinePrecision] / Om), $MachinePrecision] * (-n) + N[(-2.0 * l), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] * U), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[Om, 3.7e+108], N[Sqrt[N[(N[(N[(t + N[(N[(l * N[(-2.0 * l + N[(N[(U$42$ * N[(l * n), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(t * N[(N[(U * n), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;Om \leq -2.95 \cdot 10^{+121}:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(\frac{\ell}{Om}, \mathsf{fma}\left(\frac{U \cdot \ell}{Om}, -n, -2 \cdot \ell\right), t\right) \cdot U\right) \cdot \left(2 \cdot n\right)}\\
\mathbf{elif}\;Om \leq 3.7 \cdot 10^{+108}:\\
\;\;\;\;\sqrt{\left(\left(t + \frac{\ell \cdot \mathsf{fma}\left(-2, \ell, \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)}{Om}\right) \cdot U\right) \cdot \left(2 \cdot n\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t \cdot \left(\left(U \cdot n\right) \cdot 2\right)}\\
\end{array}
\end{array}
if Om < -2.95000000000000007e121Initial program 57.9%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/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--.f6466.0
lift-*.f64N/A
Applied rewrites59.2%
Applied rewrites59.4%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites70.2%
Taylor expanded in U around inf
lower-/.f64N/A
lower-*.f6463.9
Applied rewrites63.9%
if -2.95000000000000007e121 < Om < 3.6999999999999998e108Initial program 44.2%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/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.1
lift-*.f64N/A
Applied rewrites48.0%
Applied rewrites46.5%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites57.7%
Taylor expanded in U around 0
lower-+.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6457.7
Applied rewrites57.7%
if 3.6999999999999998e108 < Om Initial program 64.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6451.7
Applied rewrites51.7%
Applied rewrites63.9%
Final simplification60.0%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 5.6e-70)
(sqrt
(* (* (+ t (/ (* l (fma -2.0 l (/ (* U* (* l n)) Om))) Om)) U) (* 2.0 n)))
(sqrt
(*
(* (fma (/ l Om) (fma (* (- U U*) (/ l Om)) (- n) (* -2.0 l)) t) (+ n n))
U))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 5.6e-70) {
tmp = sqrt((((t + ((l * fma(-2.0, l, ((U_42_ * (l * n)) / Om))) / Om)) * U) * (2.0 * n)));
} else {
tmp = sqrt(((fma((l / Om), fma(((U - U_42_) * (l / Om)), -n, (-2.0 * l)), t) * (n + n)) * U));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 5.6e-70) tmp = sqrt(Float64(Float64(Float64(t + Float64(Float64(l * fma(-2.0, l, Float64(Float64(U_42_ * Float64(l * n)) / Om))) / Om)) * U) * Float64(2.0 * n))); else tmp = sqrt(Float64(Float64(fma(Float64(l / Om), fma(Float64(Float64(U - U_42_) * Float64(l / Om)), Float64(-n), Float64(-2.0 * l)), t) * Float64(n + n)) * U)); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 5.6e-70], N[Sqrt[N[(N[(N[(t + N[(N[(l * N[(-2.0 * l + N[(N[(U$42$ * N[(l * n), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(l / Om), $MachinePrecision] * N[(N[(N[(U - U$42$), $MachinePrecision] * N[(l / Om), $MachinePrecision]), $MachinePrecision] * (-n) + N[(-2.0 * l), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] * N[(n + n), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 5.6 \cdot 10^{-70}:\\
\;\;\;\;\sqrt{\left(\left(t + \frac{\ell \cdot \mathsf{fma}\left(-2, \ell, \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)}{Om}\right) \cdot U\right) \cdot \left(2 \cdot n\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(\frac{\ell}{Om}, \mathsf{fma}\left(\left(U - U*\right) \cdot \frac{\ell}{Om}, -n, -2 \cdot \ell\right), t\right) \cdot \left(n + n\right)\right) \cdot U}\\
\end{array}
\end{array}
if l < 5.5999999999999998e-70Initial program 52.7%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/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--.f6456.6
lift-*.f64N/A
Applied rewrites53.5%
Applied rewrites53.5%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites61.0%
Taylor expanded in U around 0
lower-+.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6457.1
Applied rewrites57.1%
if 5.5999999999999998e-70 < l Initial program 44.5%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/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--.f6456.8
lift-*.f64N/A
Applied rewrites51.4%
Applied rewrites48.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites63.1%
lift-*.f64N/A
count-2-revN/A
lower-+.f6463.1
Applied rewrites63.1%
Final simplification58.8%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= Om 3.7e+108)
(sqrt
(* (* (+ t (/ (* l (fma -2.0 l (/ (* U* (* l n)) Om))) Om)) U) (* 2.0 n)))
(sqrt (* t (* (* U n) 2.0)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (Om <= 3.7e+108) {
tmp = sqrt((((t + ((l * fma(-2.0, l, ((U_42_ * (l * n)) / Om))) / Om)) * U) * (2.0 * n)));
} else {
tmp = sqrt((t * ((U * n) * 2.0)));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (Om <= 3.7e+108) tmp = sqrt(Float64(Float64(Float64(t + Float64(Float64(l * fma(-2.0, l, Float64(Float64(U_42_ * Float64(l * n)) / Om))) / Om)) * U) * Float64(2.0 * n))); else tmp = sqrt(Float64(t * Float64(Float64(U * n) * 2.0))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[Om, 3.7e+108], N[Sqrt[N[(N[(N[(t + N[(N[(l * N[(-2.0 * l + N[(N[(U$42$ * N[(l * n), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(t * N[(N[(U * n), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;Om \leq 3.7 \cdot 10^{+108}:\\
\;\;\;\;\sqrt{\left(\left(t + \frac{\ell \cdot \mathsf{fma}\left(-2, \ell, \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)}{Om}\right) \cdot U\right) \cdot \left(2 \cdot n\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t \cdot \left(\left(U \cdot n\right) \cdot 2\right)}\\
\end{array}
\end{array}
if Om < 3.6999999999999998e108Initial program 47.4%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/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--.f6452.2
lift-*.f64N/A
Applied rewrites50.5%
Applied rewrites49.4%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites60.5%
Taylor expanded in U around 0
lower-+.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6457.1
Applied rewrites57.1%
if 3.6999999999999998e108 < Om Initial program 64.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6451.7
Applied rewrites51.7%
Applied rewrites63.9%
Final simplification58.3%
(FPCore (n U t l Om U*) :precision binary64 (if (<= l 2e-69) (sqrt (* t (* (* U n) 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 <= 2e-69) {
tmp = sqrt((t * ((U * n) * 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 <= 2e-69) tmp = sqrt(Float64(t * Float64(Float64(U * n) * 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, 2e-69], N[Sqrt[N[(t * N[(N[(U * n), $MachinePrecision] * 2.0), $MachinePrecision]), $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 2 \cdot 10^{-69}:\\
\;\;\;\;\sqrt{t \cdot \left(\left(U \cdot n\right) \cdot 2\right)}\\
\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 < 1.9999999999999999e-69Initial program 52.7%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6439.2
Applied rewrites39.2%
Applied rewrites43.5%
if 1.9999999999999999e-69 < l Initial program 44.5%
Taylor expanded in n around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
metadata-evalN/A
fp-cancel-sign-sub-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6440.2
Applied rewrites40.2%
(FPCore (n U t l Om U*) :precision binary64 (if (<= U 3.2e-282) (sqrt (* t (* (* U n) 2.0))) (* (sqrt (* (* 2.0 n) t)) (sqrt U))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U <= 3.2e-282) {
tmp = sqrt((t * ((U * n) * 2.0)));
} else {
tmp = sqrt(((2.0 * n) * t)) * 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 <= 3.2d-282) then
tmp = sqrt((t * ((u * n) * 2.0d0)))
else
tmp = sqrt(((2.0d0 * n) * t)) * 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 <= 3.2e-282) {
tmp = Math.sqrt((t * ((U * n) * 2.0)));
} else {
tmp = Math.sqrt(((2.0 * n) * t)) * Math.sqrt(U);
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if U <= 3.2e-282: tmp = math.sqrt((t * ((U * n) * 2.0))) else: tmp = math.sqrt(((2.0 * n) * t)) * math.sqrt(U) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U <= 3.2e-282) tmp = sqrt(Float64(t * Float64(Float64(U * n) * 2.0))); else tmp = Float64(sqrt(Float64(Float64(2.0 * n) * t)) * sqrt(U)); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U <= 3.2e-282) tmp = sqrt((t * ((U * n) * 2.0))); else tmp = sqrt(((2.0 * n) * t)) * sqrt(U); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U, 3.2e-282], N[Sqrt[N[(t * N[(N[(U * n), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision] * N[Sqrt[U], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;U \leq 3.2 \cdot 10^{-282}:\\
\;\;\;\;\sqrt{t \cdot \left(\left(U \cdot n\right) \cdot 2\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot t} \cdot \sqrt{U}\\
\end{array}
\end{array}
if U < 3.19999999999999983e-282Initial program 49.8%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6432.3
Applied rewrites32.3%
Applied rewrites36.9%
if 3.19999999999999983e-282 < U Initial program 51.1%
Applied rewrites45.1%
Taylor expanded in n around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f6452.4
Applied rewrites52.4%
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* t U) (+ n n))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt(((t * U) * (n + 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(((t * u) * (n + n)))
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt(((t * U) * (n + n)));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt(((t * U) * (n + n)))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(t * U) * Float64(n + n))) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt(((t * U) * (n + n))); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(t * U), $MachinePrecision] * N[(n + n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left(t \cdot U\right) \cdot \left(n + n\right)}
\end{array}
Initial program 50.4%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6435.3
Applied rewrites35.3%
Applied rewrites38.9%
Applied rewrites36.6%
Applied rewrites36.6%
herbie shell --seed 2024340
(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*))))))