
(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 15 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
(* (* 2.0 n) (fma (* (/ l Om) l) (- -2.0 (* (/ (- n) Om) U*)) t))))
(if (<= U -2e-310) (sqrt (* t_1 U)) (* (sqrt U) (sqrt t_1)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (2.0 * n) * fma(((l / Om) * l), (-2.0 - ((-n / Om) * U_42_)), t);
double tmp;
if (U <= -2e-310) {
tmp = sqrt((t_1 * U));
} else {
tmp = sqrt(U) * sqrt(t_1);
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(2.0 * n) * fma(Float64(Float64(l / Om) * l), Float64(-2.0 - Float64(Float64(Float64(-n) / Om) * U_42_)), t)) tmp = 0.0 if (U <= -2e-310) tmp = sqrt(Float64(t_1 * U)); else tmp = Float64(sqrt(U) * sqrt(t_1)); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(2.0 * n), $MachinePrecision] * N[(N[(N[(l / Om), $MachinePrecision] * l), $MachinePrecision] * N[(-2.0 - N[(N[((-n) / Om), $MachinePrecision] * U$42$), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[U, -2e-310], N[Sqrt[N[(t$95$1 * U), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[U], $MachinePrecision] * N[Sqrt[t$95$1], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(2 \cdot n\right) \cdot \mathsf{fma}\left(\frac{\ell}{Om} \cdot \ell, -2 - \frac{-n}{Om} \cdot U*, t\right)\\
\mathbf{if}\;U \leq -2 \cdot 10^{-310}:\\
\;\;\;\;\sqrt{t\_1 \cdot U}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{U} \cdot \sqrt{t\_1}\\
\end{array}
\end{array}
if U < -1.999999999999994e-310Initial program 56.2%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6456.2
Applied rewrites53.2%
lift-fma.f64N/A
*-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f6458.2
lift-*.f64N/A
*-commutativeN/A
lower-*.f6458.2
Applied rewrites58.2%
Taylor expanded in U* around inf
mul-1-negN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f6461.3
Applied rewrites61.3%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites63.8%
if -1.999999999999994e-310 < U Initial program 50.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6450.8
Applied rewrites54.0%
lift-fma.f64N/A
*-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f6461.1
lift-*.f64N/A
*-commutativeN/A
lower-*.f6461.1
Applied rewrites61.1%
Taylor expanded in U* around inf
mul-1-negN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f6461.2
Applied rewrites61.2%
lift-sqrt.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
sqrt-prodN/A
pow1/2N/A
lower-*.f64N/A
Applied rewrites75.0%
Final simplification69.4%
(FPCore (n U t l Om U*)
:precision binary64
(if (<=
(*
(- (* (- U* U) (* (pow (/ l Om) 2.0) n)) (- (* (/ (* l l) Om) 2.0) t))
(* (* 2.0 n) U))
INFINITY)
(sqrt (* (* (fma (* (/ l Om) l) -2.0 t) (* 2.0 n)) U))
(sqrt (* (/ (* (* (* n l) (* n l)) (* U* U)) (* Om Om)) 2.0))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (((((U_42_ - U) * (pow((l / Om), 2.0) * n)) - ((((l * l) / Om) * 2.0) - t)) * ((2.0 * n) * U)) <= ((double) INFINITY)) {
tmp = sqrt(((fma(((l / Om) * l), -2.0, t) * (2.0 * n)) * U));
} else {
tmp = sqrt((((((n * l) * (n * l)) * (U_42_ * U)) / (Om * Om)) * 2.0));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (Float64(Float64(Float64(Float64(U_42_ - U) * Float64((Float64(l / Om) ^ 2.0) * n)) - Float64(Float64(Float64(Float64(l * l) / Om) * 2.0) - t)) * Float64(Float64(2.0 * n) * U)) <= Inf) tmp = sqrt(Float64(Float64(fma(Float64(Float64(l / Om) * l), -2.0, t) * Float64(2.0 * n)) * U)); else tmp = sqrt(Float64(Float64(Float64(Float64(Float64(n * l) * Float64(n * l)) * Float64(U_42_ * U)) / Float64(Om * Om)) * 2.0)); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[N[(N[(N[(N[(U$42$ - U), $MachinePrecision] * N[(N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] * 2.0), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]), $MachinePrecision], Infinity], N[Sqrt[N[(N[(N[(N[(N[(l / Om), $MachinePrecision] * l), $MachinePrecision] * -2.0 + t), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(N[(n * l), $MachinePrecision] * N[(n * l), $MachinePrecision]), $MachinePrecision] * N[(U$42$ * U), $MachinePrecision]), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(\left(U* - U\right) \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot n\right) - \left(\frac{\ell \cdot \ell}{Om} \cdot 2 - t\right)\right) \cdot \left(\left(2 \cdot n\right) \cdot U\right) \leq \infty:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(\frac{\ell}{Om} \cdot \ell, -2, t\right) \cdot \left(2 \cdot n\right)\right) \cdot U}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{\left(\left(n \cdot \ell\right) \cdot \left(n \cdot \ell\right)\right) \cdot \left(U* \cdot U\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*)))) < +inf.0Initial program 60.1%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6460.1
Applied rewrites55.2%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6452.8
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6452.8
lift-*.f64N/A
*-commutativeN/A
lower-*.f6452.8
Applied rewrites52.8%
Taylor expanded in Om around inf
Applied rewrites51.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites59.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
*-commutativeN/A
lower-*.f640.0
Applied rewrites40.8%
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
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6441.0
Applied rewrites41.0%
Final simplification57.4%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (fma (* (/ l Om) l) (- -2.0 (* (/ (- n) Om) U*)) t)))
(if (<= t 7e+219)
(sqrt (* (* (* 2.0 n) t_1) U))
(* (sqrt (* n U)) (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) * l), (-2.0 - ((-n / Om) * U_42_)), t);
double tmp;
if (t <= 7e+219) {
tmp = sqrt((((2.0 * n) * t_1) * U));
} else {
tmp = sqrt((n * U)) * sqrt((2.0 * t_1));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = fma(Float64(Float64(l / Om) * l), Float64(-2.0 - Float64(Float64(Float64(-n) / Om) * U_42_)), t) tmp = 0.0 if (t <= 7e+219) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * t_1) * U)); else tmp = Float64(sqrt(Float64(n * U)) * 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] * l), $MachinePrecision] * N[(-2.0 - N[(N[((-n) / Om), $MachinePrecision] * U$42$), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[t, 7e+219], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * t$95$1), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(n * U), $MachinePrecision]], $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} \cdot \ell, -2 - \frac{-n}{Om} \cdot U*, t\right)\\
\mathbf{if}\;t \leq 7 \cdot 10^{+219}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot t\_1\right) \cdot U}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{n \cdot U} \cdot \sqrt{2 \cdot t\_1}\\
\end{array}
\end{array}
if t < 7.0000000000000002e219Initial program 53.4%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6453.4
Applied rewrites53.6%
lift-fma.f64N/A
*-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f6459.8
lift-*.f64N/A
*-commutativeN/A
lower-*.f6459.8
Applied rewrites59.8%
Taylor expanded in U* around inf
mul-1-negN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f6461.2
Applied rewrites61.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites64.4%
if 7.0000000000000002e219 < t Initial program 54.1%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6454.1
Applied rewrites53.8%
lift-fma.f64N/A
*-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f6458.0
lift-*.f64N/A
*-commutativeN/A
lower-*.f6458.0
Applied rewrites58.0%
Taylor expanded in U* around inf
mul-1-negN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f6462.4
Applied rewrites62.4%
lift-sqrt.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
sqrt-prodN/A
pow1/2N/A
Applied rewrites82.3%
Final simplification66.0%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1
(sqrt
(*
(fma (* (fma (/ (- U* U) Om) n -2.0) l) (/ l Om) t)
(* (* 2.0 n) U)))))
(if (<= n -1.25e-97)
t_1
(if (<= n 1.25e-123)
(sqrt (* (* (fma (* (/ l Om) l) -2.0 t) (* 2.0 n)) U))
t_1))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = sqrt((fma((fma(((U_42_ - U) / Om), n, -2.0) * l), (l / Om), t) * ((2.0 * n) * U)));
double tmp;
if (n <= -1.25e-97) {
tmp = t_1;
} else if (n <= 1.25e-123) {
tmp = sqrt(((fma(((l / Om) * l), -2.0, t) * (2.0 * n)) * U));
} else {
tmp = t_1;
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = sqrt(Float64(fma(Float64(fma(Float64(Float64(U_42_ - U) / Om), n, -2.0) * l), Float64(l / Om), t) * Float64(Float64(2.0 * n) * U))) tmp = 0.0 if (n <= -1.25e-97) tmp = t_1; elseif (n <= 1.25e-123) tmp = sqrt(Float64(Float64(fma(Float64(Float64(l / Om) * l), -2.0, t) * Float64(2.0 * n)) * U)); 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[(U$42$ - U), $MachinePrecision] / Om), $MachinePrecision] * n + -2.0), $MachinePrecision] * l), $MachinePrecision] * N[(l / Om), $MachinePrecision] + t), $MachinePrecision] * N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[n, -1.25e-97], t$95$1, If[LessEqual[n, 1.25e-123], N[Sqrt[N[(N[(N[(N[(N[(l / Om), $MachinePrecision] * l), $MachinePrecision] * -2.0 + t), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\frac{U* - U}{Om}, n, -2\right) \cdot \ell, \frac{\ell}{Om}, t\right) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}\\
\mathbf{if}\;n \leq -1.25 \cdot 10^{-97}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;n \leq 1.25 \cdot 10^{-123}:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(\frac{\ell}{Om} \cdot \ell, -2, t\right) \cdot \left(2 \cdot n\right)\right) \cdot U}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if n < -1.2499999999999999e-97 or 1.25000000000000007e-123 < n Initial program 54.9%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6454.9
Applied rewrites56.9%
lift-fma.f64N/A
*-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f6464.5
lift-*.f64N/A
*-commutativeN/A
lower-*.f6464.5
Applied rewrites64.5%
Taylor expanded in n around 0
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
div-subN/A
lower-/.f64N/A
lower--.f6464.5
Applied rewrites64.5%
if -1.2499999999999999e-97 < n < 1.25000000000000007e-123Initial program 50.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6450.8
Applied rewrites47.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6444.4
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6444.4
lift-*.f64N/A
*-commutativeN/A
lower-*.f6444.4
Applied rewrites44.4%
Taylor expanded in Om around inf
Applied rewrites47.8%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites65.5%
Final simplification64.8%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= t 1.1e+228)
(sqrt
(* (* (* 2.0 n) (fma (* (/ l Om) l) (- -2.0 (* (/ (- n) Om) U*)) t)) U))
(* (sqrt t) (sqrt (* (* 2.0 n) U)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (t <= 1.1e+228) {
tmp = sqrt((((2.0 * n) * fma(((l / Om) * l), (-2.0 - ((-n / Om) * U_42_)), t)) * U));
} else {
tmp = sqrt(t) * sqrt(((2.0 * n) * U));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (t <= 1.1e+228) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * fma(Float64(Float64(l / Om) * l), Float64(-2.0 - Float64(Float64(Float64(-n) / Om) * U_42_)), t)) * U)); else tmp = Float64(sqrt(t) * sqrt(Float64(Float64(2.0 * n) * U))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[t, 1.1e+228], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * N[(N[(N[(l / Om), $MachinePrecision] * l), $MachinePrecision] * N[(-2.0 - N[(N[((-n) / Om), $MachinePrecision] * U$42$), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[t], $MachinePrecision] * N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.1 \cdot 10^{+228}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot \mathsf{fma}\left(\frac{\ell}{Om} \cdot \ell, -2 - \frac{-n}{Om} \cdot U*, t\right)\right) \cdot U}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t} \cdot \sqrt{\left(2 \cdot n\right) \cdot U}\\
\end{array}
\end{array}
if t < 1.1e228Initial program 53.4%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6453.4
Applied rewrites53.6%
lift-fma.f64N/A
*-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f6459.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6459.7
Applied rewrites59.7%
Taylor expanded in U* around inf
mul-1-negN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f6461.1
Applied rewrites61.1%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites64.2%
if 1.1e228 < t Initial program 54.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6454.3
Applied rewrites53.9%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6449.0
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6449.0
lift-*.f64N/A
*-commutativeN/A
lower-*.f6449.0
Applied rewrites49.0%
Taylor expanded in t around inf
Applied rewrites59.8%
lift-sqrt.f64N/A
pow1/2N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lift-*.f64N/A
unpow-prod-downN/A
lower-*.f64N/A
Applied rewrites84.8%
Final simplification65.7%
(FPCore (n U t l Om U*) :precision binary64 (if (<= n 0.0245) (sqrt (* (* (fma (* (/ l Om) l) -2.0 t) (* 2.0 n)) U)) (sqrt (* (fma (* (/ (* n U*) Om) l) (/ l Om) t) (* (* 2.0 n) U)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (n <= 0.0245) {
tmp = sqrt(((fma(((l / Om) * l), -2.0, t) * (2.0 * n)) * U));
} else {
tmp = sqrt((fma((((n * U_42_) / Om) * l), (l / Om), t) * ((2.0 * n) * U)));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (n <= 0.0245) tmp = sqrt(Float64(Float64(fma(Float64(Float64(l / Om) * l), -2.0, t) * Float64(2.0 * n)) * U)); else tmp = sqrt(Float64(fma(Float64(Float64(Float64(n * U_42_) / Om) * l), Float64(l / Om), t) * Float64(Float64(2.0 * n) * U))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[n, 0.0245], N[Sqrt[N[(N[(N[(N[(N[(l / Om), $MachinePrecision] * l), $MachinePrecision] * -2.0 + t), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(N[(n * U$42$), $MachinePrecision] / Om), $MachinePrecision] * l), $MachinePrecision] * N[(l / Om), $MachinePrecision] + t), $MachinePrecision] * N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;n \leq 0.0245:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(\frac{\ell}{Om} \cdot \ell, -2, t\right) \cdot \left(2 \cdot n\right)\right) \cdot U}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{n \cdot U*}{Om} \cdot \ell, \frac{\ell}{Om}, t\right) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}\\
\end{array}
\end{array}
if n < 0.024500000000000001Initial program 54.4%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6454.4
Applied rewrites52.0%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6449.1
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6449.1
lift-*.f64N/A
*-commutativeN/A
lower-*.f6449.1
Applied rewrites49.1%
Taylor expanded in Om around inf
Applied rewrites48.2%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites60.5%
if 0.024500000000000001 < n Initial program 51.2%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6451.2
Applied rewrites57.5%
lift-fma.f64N/A
*-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f6465.5
lift-*.f64N/A
*-commutativeN/A
lower-*.f6465.5
Applied rewrites65.5%
Taylor expanded in U* around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f6460.5
Applied rewrites60.5%
Final simplification60.5%
(FPCore (n U t l Om U*) :precision binary64 (let* ((t_1 (* (fma (* (/ l Om) l) -2.0 t) (* 2.0 n)))) (if (<= U -4.1e-297) (sqrt (* t_1 U)) (* (sqrt t_1) (sqrt U)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = fma(((l / Om) * l), -2.0, t) * (2.0 * n);
double tmp;
if (U <= -4.1e-297) {
tmp = sqrt((t_1 * U));
} else {
tmp = sqrt(t_1) * sqrt(U);
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(fma(Float64(Float64(l / Om) * l), -2.0, t) * Float64(2.0 * n)) tmp = 0.0 if (U <= -4.1e-297) tmp = sqrt(Float64(t_1 * U)); else tmp = Float64(sqrt(t_1) * sqrt(U)); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(N[(N[(l / Om), $MachinePrecision] * l), $MachinePrecision] * -2.0 + t), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[U, -4.1e-297], N[Sqrt[N[(t$95$1 * U), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[t$95$1], $MachinePrecision] * N[Sqrt[U], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{\ell}{Om} \cdot \ell, -2, t\right) \cdot \left(2 \cdot n\right)\\
\mathbf{if}\;U \leq -4.1 \cdot 10^{-297}:\\
\;\;\;\;\sqrt{t\_1 \cdot U}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t\_1} \cdot \sqrt{U}\\
\end{array}
\end{array}
if U < -4.1000000000000002e-297Initial program 56.6%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6456.6
Applied rewrites53.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6451.1
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6451.1
lift-*.f64N/A
*-commutativeN/A
lower-*.f6451.1
Applied rewrites51.1%
Taylor expanded in Om around inf
Applied rewrites48.2%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites56.6%
if -4.1000000000000002e-297 < U Initial program 50.5%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6450.5
Applied rewrites53.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6452.8
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6452.8
lift-*.f64N/A
*-commutativeN/A
lower-*.f6452.8
Applied rewrites52.8%
Taylor expanded in Om around inf
Applied rewrites45.0%
lift-sqrt.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
sqrt-prodN/A
pow1/2N/A
lower-*.f64N/A
Applied rewrites64.0%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (fma (* (/ l Om) l) -2.0 t)))
(if (<= n 1.8e-26)
(sqrt (* (* t_1 (* 2.0 n)) U))
(* (sqrt n) (sqrt (* (* t_1 U) 2.0))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = fma(((l / Om) * l), -2.0, t);
double tmp;
if (n <= 1.8e-26) {
tmp = sqrt(((t_1 * (2.0 * n)) * U));
} else {
tmp = sqrt(n) * sqrt(((t_1 * U) * 2.0));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = fma(Float64(Float64(l / Om) * l), -2.0, t) tmp = 0.0 if (n <= 1.8e-26) tmp = sqrt(Float64(Float64(t_1 * Float64(2.0 * n)) * U)); else tmp = Float64(sqrt(n) * sqrt(Float64(Float64(t_1 * U) * 2.0))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(N[(l / Om), $MachinePrecision] * l), $MachinePrecision] * -2.0 + t), $MachinePrecision]}, If[LessEqual[n, 1.8e-26], N[Sqrt[N[(N[(t$95$1 * N[(2.0 * n), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[n], $MachinePrecision] * N[Sqrt[N[(N[(t$95$1 * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{\ell}{Om} \cdot \ell, -2, t\right)\\
\mathbf{if}\;n \leq 1.8 \cdot 10^{-26}:\\
\;\;\;\;\sqrt{\left(t\_1 \cdot \left(2 \cdot n\right)\right) \cdot U}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{n} \cdot \sqrt{\left(t\_1 \cdot U\right) \cdot 2}\\
\end{array}
\end{array}
if n < 1.8000000000000001e-26Initial program 53.7%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6453.7
Applied rewrites51.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6448.2
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6448.2
lift-*.f64N/A
*-commutativeN/A
lower-*.f6448.2
Applied rewrites48.2%
Taylor expanded in Om around inf
Applied rewrites47.2%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites60.0%
if 1.8000000000000001e-26 < n Initial program 53.0%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6453.0
Applied rewrites58.8%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6460.0
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6460.0
lift-*.f64N/A
*-commutativeN/A
lower-*.f6460.0
Applied rewrites60.0%
Taylor expanded in Om around inf
Applied rewrites45.4%
lift-sqrt.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
sqrt-prodN/A
pow1/2N/A
lower-*.f64N/A
Applied rewrites54.5%
Final simplification58.3%
(FPCore (n U t l Om U*) :precision binary64 (if (<= n 2.3e+119) (sqrt (* (* (fma (* (/ l Om) l) -2.0 t) (* 2.0 n)) U)) (sqrt (* (* (* n l) (/ (* U* l) (* Om Om))) (* (* 2.0 n) U)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (n <= 2.3e+119) {
tmp = sqrt(((fma(((l / Om) * l), -2.0, t) * (2.0 * n)) * U));
} else {
tmp = sqrt((((n * l) * ((U_42_ * l) / (Om * Om))) * ((2.0 * n) * U)));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (n <= 2.3e+119) tmp = sqrt(Float64(Float64(fma(Float64(Float64(l / Om) * l), -2.0, t) * Float64(2.0 * n)) * U)); else tmp = sqrt(Float64(Float64(Float64(n * l) * Float64(Float64(U_42_ * l) / Float64(Om * Om))) * Float64(Float64(2.0 * n) * U))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[n, 2.3e+119], N[Sqrt[N[(N[(N[(N[(N[(l / Om), $MachinePrecision] * l), $MachinePrecision] * -2.0 + t), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(n * l), $MachinePrecision] * N[(N[(U$42$ * l), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;n \leq 2.3 \cdot 10^{+119}:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(\frac{\ell}{Om} \cdot \ell, -2, t\right) \cdot \left(2 \cdot n\right)\right) \cdot U}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\left(n \cdot \ell\right) \cdot \frac{U* \cdot \ell}{Om \cdot Om}\right) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}\\
\end{array}
\end{array}
if n < 2.3000000000000001e119Initial program 54.5%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6454.5
Applied rewrites53.8%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6451.8
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6451.8
lift-*.f64N/A
*-commutativeN/A
lower-*.f6451.8
Applied rewrites51.8%
Taylor expanded in Om around inf
Applied rewrites49.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites58.8%
if 2.3000000000000001e119 < n Initial program 48.6%
Taylor expanded in U* around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6441.3
Applied rewrites41.3%
Applied rewrites51.1%
Applied rewrites52.6%
Final simplification57.7%
(FPCore (n U t l Om U*) :precision binary64 (if (<= t 6e+227) (sqrt (* (* (fma (* (/ l Om) l) -2.0 t) (* 2.0 n)) U)) (* (sqrt t) (sqrt (* (* 2.0 n) U)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (t <= 6e+227) {
tmp = sqrt(((fma(((l / Om) * l), -2.0, t) * (2.0 * n)) * U));
} else {
tmp = sqrt(t) * sqrt(((2.0 * n) * U));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (t <= 6e+227) tmp = sqrt(Float64(Float64(fma(Float64(Float64(l / Om) * l), -2.0, t) * Float64(2.0 * n)) * U)); else tmp = Float64(sqrt(t) * sqrt(Float64(Float64(2.0 * n) * U))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[t, 6e+227], N[Sqrt[N[(N[(N[(N[(N[(l / Om), $MachinePrecision] * l), $MachinePrecision] * -2.0 + t), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[t], $MachinePrecision] * N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 6 \cdot 10^{+227}:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(\frac{\ell}{Om} \cdot \ell, -2, t\right) \cdot \left(2 \cdot n\right)\right) \cdot U}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t} \cdot \sqrt{\left(2 \cdot n\right) \cdot U}\\
\end{array}
\end{array}
if t < 5.99999999999999972e227Initial program 53.4%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6453.4
Applied rewrites53.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6452.2
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6452.2
lift-*.f64N/A
*-commutativeN/A
lower-*.f6452.2
Applied rewrites52.2%
Taylor expanded in Om around inf
Applied rewrites46.4%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites54.7%
if 5.99999999999999972e227 < t Initial program 54.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6454.3
Applied rewrites53.9%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6449.0
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6449.0
lift-*.f64N/A
*-commutativeN/A
lower-*.f6449.0
Applied rewrites49.0%
Taylor expanded in t around inf
Applied rewrites59.8%
lift-sqrt.f64N/A
pow1/2N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lift-*.f64N/A
unpow-prod-downN/A
lower-*.f64N/A
Applied rewrites84.8%
Final simplification56.9%
(FPCore (n U t l Om U*) :precision binary64 (if (<= t 2.8e+227) (sqrt (* (* (* (fma -2.0 (/ (* l l) Om) t) n) U) 2.0)) (* (sqrt t) (sqrt (* (* 2.0 n) U)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (t <= 2.8e+227) {
tmp = sqrt((((fma(-2.0, ((l * l) / Om), t) * n) * U) * 2.0));
} else {
tmp = sqrt(t) * sqrt(((2.0 * n) * U));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (t <= 2.8e+227) tmp = sqrt(Float64(Float64(Float64(fma(-2.0, Float64(Float64(l * l) / Om), t) * n) * U) * 2.0)); else tmp = Float64(sqrt(t) * sqrt(Float64(Float64(2.0 * n) * U))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[t, 2.8e+227], 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[(N[Sqrt[t], $MachinePrecision] * N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.8 \cdot 10^{+227}:\\
\;\;\;\;\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{t} \cdot \sqrt{\left(2 \cdot n\right) \cdot U}\\
\end{array}
\end{array}
if t < 2.79999999999999984e227Initial program 53.4%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6453.4
Applied rewrites53.6%
Taylor expanded in n around 0
*-commutativeN/A
metadata-evalN/A
cancel-sign-sub-invN/A
lower-*.f64N/A
Applied rewrites49.6%
if 2.79999999999999984e227 < t Initial program 54.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6454.3
Applied rewrites53.9%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6449.0
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6449.0
lift-*.f64N/A
*-commutativeN/A
lower-*.f6449.0
Applied rewrites49.0%
Taylor expanded in t around inf
Applied rewrites59.8%
lift-sqrt.f64N/A
pow1/2N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lift-*.f64N/A
unpow-prod-downN/A
lower-*.f64N/A
Applied rewrites84.8%
Final simplification52.2%
(FPCore (n U t l Om U*) :precision binary64 (if (<= U -4.1e-297) (sqrt (* (* (* t n) U) 2.0)) (* (sqrt (* t (* 2.0 n))) (sqrt U))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U <= -4.1e-297) {
tmp = sqrt((((t * n) * U) * 2.0));
} else {
tmp = sqrt((t * (2.0 * n))) * 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 <= (-4.1d-297)) then
tmp = sqrt((((t * n) * u) * 2.0d0))
else
tmp = sqrt((t * (2.0d0 * n))) * 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 <= -4.1e-297) {
tmp = Math.sqrt((((t * n) * U) * 2.0));
} else {
tmp = Math.sqrt((t * (2.0 * n))) * Math.sqrt(U);
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if U <= -4.1e-297: tmp = math.sqrt((((t * n) * U) * 2.0)) else: tmp = math.sqrt((t * (2.0 * n))) * math.sqrt(U) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U <= -4.1e-297) tmp = sqrt(Float64(Float64(Float64(t * n) * U) * 2.0)); else tmp = Float64(sqrt(Float64(t * Float64(2.0 * n))) * sqrt(U)); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U <= -4.1e-297) tmp = sqrt((((t * n) * U) * 2.0)); else tmp = sqrt((t * (2.0 * n))) * sqrt(U); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U, -4.1e-297], N[Sqrt[N[(N[(N[(t * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(t * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[U], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;U \leq -4.1 \cdot 10^{-297}:\\
\;\;\;\;\sqrt{\left(\left(t \cdot n\right) \cdot U\right) \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t \cdot \left(2 \cdot n\right)} \cdot \sqrt{U}\\
\end{array}
\end{array}
if U < -4.1000000000000002e-297Initial program 56.6%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6456.6
Applied rewrites53.6%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6439.9
Applied rewrites39.9%
if -4.1000000000000002e-297 < U Initial program 50.5%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6450.5
Applied rewrites53.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6452.8
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6452.8
lift-*.f64N/A
*-commutativeN/A
lower-*.f6452.8
Applied rewrites52.8%
Taylor expanded in t around inf
Applied rewrites40.5%
lift-sqrt.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
sqrt-prodN/A
pow1/2N/A
lower-*.f64N/A
Applied rewrites51.4%
Final simplification45.7%
(FPCore (n U t l Om U*) :precision binary64 (if (<= U -4.1e-297) (sqrt (* (* (* t n) U) 2.0)) (* (sqrt (* 2.0 U)) (sqrt (* t n)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U <= -4.1e-297) {
tmp = sqrt((((t * n) * U) * 2.0));
} else {
tmp = sqrt((2.0 * U)) * sqrt((t * n));
}
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 <= (-4.1d-297)) then
tmp = sqrt((((t * n) * u) * 2.0d0))
else
tmp = sqrt((2.0d0 * u)) * sqrt((t * n))
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 <= -4.1e-297) {
tmp = Math.sqrt((((t * n) * U) * 2.0));
} else {
tmp = Math.sqrt((2.0 * U)) * Math.sqrt((t * n));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if U <= -4.1e-297: tmp = math.sqrt((((t * n) * U) * 2.0)) else: tmp = math.sqrt((2.0 * U)) * math.sqrt((t * n)) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U <= -4.1e-297) tmp = sqrt(Float64(Float64(Float64(t * n) * U) * 2.0)); else tmp = Float64(sqrt(Float64(2.0 * U)) * sqrt(Float64(t * n))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U <= -4.1e-297) tmp = sqrt((((t * n) * U) * 2.0)); else tmp = sqrt((2.0 * U)) * sqrt((t * n)); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U, -4.1e-297], N[Sqrt[N[(N[(N[(t * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(2.0 * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(t * n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;U \leq -4.1 \cdot 10^{-297}:\\
\;\;\;\;\sqrt{\left(\left(t \cdot n\right) \cdot U\right) \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{t \cdot n}\\
\end{array}
\end{array}
if U < -4.1000000000000002e-297Initial program 56.6%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6456.6
Applied rewrites53.6%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6439.9
Applied rewrites39.9%
if -4.1000000000000002e-297 < U Initial program 50.5%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6450.5
Applied rewrites53.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6452.8
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6452.8
lift-*.f64N/A
*-commutativeN/A
lower-*.f6452.8
Applied rewrites52.8%
Taylor expanded in t around inf
Applied rewrites40.5%
lift-sqrt.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
sqrt-prodN/A
pow1/2N/A
lower-*.f64N/A
Applied rewrites51.4%
Final simplification45.7%
(FPCore (n U t l Om U*) :precision binary64 (if (<= t 1e-311) (sqrt (* (* (* t n) U) 2.0)) (* (sqrt (* t 2.0)) (sqrt (* n U)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (t <= 1e-311) {
tmp = sqrt((((t * n) * U) * 2.0));
} else {
tmp = sqrt((t * 2.0)) * sqrt((n * 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 (t <= 1d-311) then
tmp = sqrt((((t * n) * u) * 2.0d0))
else
tmp = sqrt((t * 2.0d0)) * sqrt((n * 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 (t <= 1e-311) {
tmp = Math.sqrt((((t * n) * U) * 2.0));
} else {
tmp = Math.sqrt((t * 2.0)) * Math.sqrt((n * U));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if t <= 1e-311: tmp = math.sqrt((((t * n) * U) * 2.0)) else: tmp = math.sqrt((t * 2.0)) * math.sqrt((n * U)) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (t <= 1e-311) tmp = sqrt(Float64(Float64(Float64(t * n) * U) * 2.0)); else tmp = Float64(sqrt(Float64(t * 2.0)) * sqrt(Float64(n * U))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (t <= 1e-311) tmp = sqrt((((t * n) * U) * 2.0)); else tmp = sqrt((t * 2.0)) * sqrt((n * U)); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[t, 1e-311], N[Sqrt[N[(N[(N[(t * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(t * 2.0), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(n * U), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 10^{-311}:\\
\;\;\;\;\sqrt{\left(\left(t \cdot n\right) \cdot U\right) \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t \cdot 2} \cdot \sqrt{n \cdot U}\\
\end{array}
\end{array}
if t < 9.99999999999948e-312Initial program 52.2%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6452.2
Applied rewrites49.9%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6441.5
Applied rewrites41.5%
if 9.99999999999948e-312 < t Initial program 54.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6454.8
Applied rewrites57.5%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6453.4
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6453.4
lift-*.f64N/A
*-commutativeN/A
lower-*.f6453.4
Applied rewrites53.4%
Taylor expanded in t around inf
Applied rewrites37.4%
lift-sqrt.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
sqrt-prodN/A
Applied rewrites49.4%
Final simplification45.3%
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* (* t n) U) 2.0)))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((((t * n) * U) * 2.0));
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((((t * n) * u) * 2.0d0))
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((((t * n) * U) * 2.0));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt((((t * n) * U) * 2.0))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(Float64(t * n) * U) * 2.0)) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((((t * n) * U) * 2.0)); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(t * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left(\left(t \cdot n\right) \cdot U\right) \cdot 2}
\end{array}
Initial program 53.5%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6453.5
Applied rewrites53.6%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6440.9
Applied rewrites40.9%
Final simplification40.9%
herbie shell --seed 2024272
(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*))))))