
(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) (fma (* (- U U*) (/ l Om)) (- n) (* -2.0 l)) t))))
(if (<= U -4e-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), fma(((U - U_42_) * (l / Om)), -n, (-2.0 * l)), t);
double tmp;
if (U <= -4e-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(l / Om), fma(Float64(Float64(U - U_42_) * Float64(l / Om)), Float64(-n), Float64(-2.0 * l)), t)) tmp = 0.0 if (U <= -4e-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[(l / Om), $MachinePrecision] * N[(N[(N[(U - U$42$), $MachinePrecision] * N[(l / Om), $MachinePrecision]), $MachinePrecision] * (-n) + N[(-2.0 * l), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[U, -4e-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}, \mathsf{fma}\left(\left(U - U*\right) \cdot \frac{\ell}{Om}, -n, -2 \cdot \ell\right), t\right)\\
\mathbf{if}\;U \leq -4 \cdot 10^{-310}:\\
\;\;\;\;\sqrt{t\_1 \cdot U}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{U} \cdot \sqrt{t\_1}\\
\end{array}
\end{array}
if U < -3.999999999999988e-310Initial program 57.8%
lift--.f64N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6464.9
lift-*.f64N/A
Applied rewrites62.0%
Applied rewrites61.2%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites71.5%
if -3.999999999999988e-310 < U Initial program 49.3%
lift--.f64N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6454.2
lift-*.f64N/A
Applied rewrites50.4%
Applied rewrites49.8%
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 rewrites71.3%
Final simplification71.4%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (/ (* l l) Om))
(t_2 (* (* 2.0 n) U))
(t_3
(* (- (* (- U* U) (* (pow (/ l Om) 2.0) n)) (- (* t_1 2.0) t)) t_2)))
(if (<= t_3 2e-266)
(sqrt (* (fma (/ (* (* l l) n) Om) -4.0 (* (* t n) 2.0)) U))
(if (<= t_3 1e+308)
(sqrt (* (fma -2.0 t_1 t) t_2))
(sqrt (* (* (/ (* n l) Om) (/ (* (* (* U* U) n) l) Om)) 2.0))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (l * l) / Om;
double t_2 = (2.0 * n) * U;
double t_3 = (((U_42_ - U) * (pow((l / Om), 2.0) * n)) - ((t_1 * 2.0) - t)) * t_2;
double tmp;
if (t_3 <= 2e-266) {
tmp = sqrt((fma((((l * l) * n) / Om), -4.0, ((t * n) * 2.0)) * U));
} else if (t_3 <= 1e+308) {
tmp = sqrt((fma(-2.0, t_1, t) * t_2));
} else {
tmp = sqrt(((((n * l) / Om) * ((((U_42_ * U) * n) * l) / Om)) * 2.0));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(l * l) / Om) t_2 = Float64(Float64(2.0 * n) * U) t_3 = Float64(Float64(Float64(Float64(U_42_ - U) * Float64((Float64(l / Om) ^ 2.0) * n)) - Float64(Float64(t_1 * 2.0) - t)) * t_2) tmp = 0.0 if (t_3 <= 2e-266) tmp = sqrt(Float64(fma(Float64(Float64(Float64(l * l) * n) / Om), -4.0, Float64(Float64(t * n) * 2.0)) * U)); elseif (t_3 <= 1e+308) tmp = sqrt(Float64(fma(-2.0, t_1, t) * t_2)); else tmp = sqrt(Float64(Float64(Float64(Float64(n * l) / Om) * Float64(Float64(Float64(Float64(U_42_ * U) * n) * l) / Om)) * 2.0)); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(U$42$ - U), $MachinePrecision] * N[(N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision] - N[(N[(t$95$1 * 2.0), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]}, If[LessEqual[t$95$3, 2e-266], N[Sqrt[N[(N[(N[(N[(N[(l * l), $MachinePrecision] * n), $MachinePrecision] / Om), $MachinePrecision] * -4.0 + N[(N[(t * n), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, 1e+308], N[Sqrt[N[(N[(-2.0 * t$95$1 + t), $MachinePrecision] * t$95$2), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(n * l), $MachinePrecision] / Om), $MachinePrecision] * N[(N[(N[(N[(U$42$ * U), $MachinePrecision] * n), $MachinePrecision] * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell \cdot \ell}{Om}\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := \left(\left(U* - U\right) \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot n\right) - \left(t\_1 \cdot 2 - t\right)\right) \cdot t\_2\\
\mathbf{if}\;t\_3 \leq 2 \cdot 10^{-266}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{\left(\ell \cdot \ell\right) \cdot n}{Om}, -4, \left(t \cdot n\right) \cdot 2\right) \cdot U}\\
\mathbf{elif}\;t\_3 \leq 10^{+308}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(-2, t\_1, t\right) \cdot t\_2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\frac{n \cdot \ell}{Om} \cdot \frac{\left(\left(U* \cdot U\right) \cdot n\right) \cdot \ell}{Om}\right) \cdot 2}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 2e-266Initial program 24.3%
lift--.f64N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6427.2
lift-*.f64N/A
Applied rewrites27.2%
Applied rewrites51.0%
Taylor expanded in Om around inf
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6445.3
Applied rewrites45.3%
if 2e-266 < (*.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*)))) < 1e308Initial program 99.6%
Taylor expanded in Om around inf
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6481.9
Applied rewrites81.9%
if 1e308 < (*.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 23.6%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6410.1
Applied rewrites10.1%
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-*.f6435.9
Applied rewrites35.9%
Applied rewrites40.1%
Final simplification57.0%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (/ (* l l) Om))
(t_2 (* (* 2.0 n) U))
(t_3
(* (- (* (- U* U) (* (pow (/ l Om) 2.0) n)) (- (* t_1 2.0) t)) t_2)))
(if (<= t_3 2e-266)
(sqrt (* (fma (/ (* (* l l) n) Om) -4.0 (* (* t n) 2.0)) U))
(if (<= t_3 1e+308)
(sqrt (* (fma -2.0 t_1 t) t_2))
(sqrt (* (/ (* (* (* (* (* U* U) n) l) n) l) (* Om Om)) 2.0))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (l * l) / Om;
double t_2 = (2.0 * n) * U;
double t_3 = (((U_42_ - U) * (pow((l / Om), 2.0) * n)) - ((t_1 * 2.0) - t)) * t_2;
double tmp;
if (t_3 <= 2e-266) {
tmp = sqrt((fma((((l * l) * n) / Om), -4.0, ((t * n) * 2.0)) * U));
} else if (t_3 <= 1e+308) {
tmp = sqrt((fma(-2.0, t_1, t) * t_2));
} else {
tmp = sqrt((((((((U_42_ * U) * n) * l) * n) * l) / (Om * Om)) * 2.0));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(l * l) / Om) t_2 = Float64(Float64(2.0 * n) * U) t_3 = Float64(Float64(Float64(Float64(U_42_ - U) * Float64((Float64(l / Om) ^ 2.0) * n)) - Float64(Float64(t_1 * 2.0) - t)) * t_2) tmp = 0.0 if (t_3 <= 2e-266) tmp = sqrt(Float64(fma(Float64(Float64(Float64(l * l) * n) / Om), -4.0, Float64(Float64(t * n) * 2.0)) * U)); elseif (t_3 <= 1e+308) tmp = sqrt(Float64(fma(-2.0, t_1, t) * t_2)); else tmp = sqrt(Float64(Float64(Float64(Float64(Float64(Float64(Float64(U_42_ * U) * n) * l) * n) * l) / Float64(Om * Om)) * 2.0)); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(U$42$ - U), $MachinePrecision] * N[(N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision] - N[(N[(t$95$1 * 2.0), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]}, If[LessEqual[t$95$3, 2e-266], N[Sqrt[N[(N[(N[(N[(N[(l * l), $MachinePrecision] * n), $MachinePrecision] / Om), $MachinePrecision] * -4.0 + N[(N[(t * n), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, 1e+308], N[Sqrt[N[(N[(-2.0 * t$95$1 + t), $MachinePrecision] * t$95$2), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(N[(N[(N[(U$42$ * U), $MachinePrecision] * n), $MachinePrecision] * l), $MachinePrecision] * n), $MachinePrecision] * l), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell \cdot \ell}{Om}\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := \left(\left(U* - U\right) \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot n\right) - \left(t\_1 \cdot 2 - t\right)\right) \cdot t\_2\\
\mathbf{if}\;t\_3 \leq 2 \cdot 10^{-266}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{\left(\ell \cdot \ell\right) \cdot n}{Om}, -4, \left(t \cdot n\right) \cdot 2\right) \cdot U}\\
\mathbf{elif}\;t\_3 \leq 10^{+308}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(-2, t\_1, t\right) \cdot t\_2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{\left(\left(\left(\left(U* \cdot U\right) \cdot n\right) \cdot \ell\right) \cdot n\right) \cdot \ell}{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*)))) < 2e-266Initial program 24.3%
lift--.f64N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6427.2
lift-*.f64N/A
Applied rewrites27.2%
Applied rewrites51.0%
Taylor expanded in Om around inf
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6445.3
Applied rewrites45.3%
if 2e-266 < (*.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*)))) < 1e308Initial program 99.6%
Taylor expanded in Om around inf
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6481.9
Applied rewrites81.9%
if 1e308 < (*.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 23.6%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6410.1
Applied rewrites10.1%
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-*.f6435.9
Applied rewrites35.9%
Applied rewrites36.7%
Final simplification55.3%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (/ (* l l) Om))
(t_2 (* (* 2.0 n) U))
(t_3
(* (- (* (- U* U) (* (pow (/ l Om) 2.0) n)) (- (* t_1 2.0) t)) t_2)))
(if (<= t_3 2e-266)
(sqrt (* (fma (/ (* (* l l) n) Om) -4.0 (* (* t n) 2.0)) U))
(if (<= t_3 1e+308)
(sqrt (* (fma -2.0 t_1 t) t_2))
(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 t_1 = (l * l) / Om;
double t_2 = (2.0 * n) * U;
double t_3 = (((U_42_ - U) * (pow((l / Om), 2.0) * n)) - ((t_1 * 2.0) - t)) * t_2;
double tmp;
if (t_3 <= 2e-266) {
tmp = sqrt((fma((((l * l) * n) / Om), -4.0, ((t * n) * 2.0)) * U));
} else if (t_3 <= 1e+308) {
tmp = sqrt((fma(-2.0, t_1, t) * t_2));
} 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_) t_1 = Float64(Float64(l * l) / Om) t_2 = Float64(Float64(2.0 * n) * U) t_3 = Float64(Float64(Float64(Float64(U_42_ - U) * Float64((Float64(l / Om) ^ 2.0) * n)) - Float64(Float64(t_1 * 2.0) - t)) * t_2) tmp = 0.0 if (t_3 <= 2e-266) tmp = sqrt(Float64(fma(Float64(Float64(Float64(l * l) * n) / Om), -4.0, Float64(Float64(t * n) * 2.0)) * U)); elseif (t_3 <= 1e+308) tmp = sqrt(Float64(fma(-2.0, t_1, t) * t_2)); 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$_] := 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[(N[(N[(N[(U$42$ - U), $MachinePrecision] * N[(N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision] - N[(N[(t$95$1 * 2.0), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]}, If[LessEqual[t$95$3, 2e-266], N[Sqrt[N[(N[(N[(N[(N[(l * l), $MachinePrecision] * n), $MachinePrecision] / Om), $MachinePrecision] * -4.0 + N[(N[(t * n), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, 1e+308], N[Sqrt[N[(N[(-2.0 * t$95$1 + t), $MachinePrecision] * t$95$2), $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}
t_1 := \frac{\ell \cdot \ell}{Om}\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := \left(\left(U* - U\right) \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot n\right) - \left(t\_1 \cdot 2 - t\right)\right) \cdot t\_2\\
\mathbf{if}\;t\_3 \leq 2 \cdot 10^{-266}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{\left(\ell \cdot \ell\right) \cdot n}{Om}, -4, \left(t \cdot n\right) \cdot 2\right) \cdot U}\\
\mathbf{elif}\;t\_3 \leq 10^{+308}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(-2, t\_1, t\right) \cdot t\_2}\\
\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*)))) < 2e-266Initial program 24.3%
lift--.f64N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6427.2
lift-*.f64N/A
Applied rewrites27.2%
Applied rewrites51.0%
Taylor expanded in Om around inf
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6445.3
Applied rewrites45.3%
if 2e-266 < (*.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*)))) < 1e308Initial program 99.6%
Taylor expanded in Om around inf
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6481.9
Applied rewrites81.9%
if 1e308 < (*.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 23.6%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6410.1
Applied rewrites10.1%
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-*.f6435.9
Applied rewrites35.9%
Final simplification54.9%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (/ (* l l) Om))
(t_2 (* (* 2.0 n) U))
(t_3
(* (- (* (- U* U) (* (pow (/ l Om) 2.0) n)) (- (* t_1 2.0) t)) t_2)))
(if (<= t_3 2e-266)
(sqrt (* (fma (/ (* (* l l) n) Om) -4.0 (* (* t n) 2.0)) U))
(if (<= t_3 1e+308)
(sqrt (* (fma -2.0 t_1 t) t_2))
(sqrt (* (* (/ (* n l) (* Om Om)) (* (* (* U* U) n) l)) 2.0))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (l * l) / Om;
double t_2 = (2.0 * n) * U;
double t_3 = (((U_42_ - U) * (pow((l / Om), 2.0) * n)) - ((t_1 * 2.0) - t)) * t_2;
double tmp;
if (t_3 <= 2e-266) {
tmp = sqrt((fma((((l * l) * n) / Om), -4.0, ((t * n) * 2.0)) * U));
} else if (t_3 <= 1e+308) {
tmp = sqrt((fma(-2.0, t_1, t) * t_2));
} else {
tmp = sqrt(((((n * l) / (Om * Om)) * (((U_42_ * U) * n) * l)) * 2.0));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(l * l) / Om) t_2 = Float64(Float64(2.0 * n) * U) t_3 = Float64(Float64(Float64(Float64(U_42_ - U) * Float64((Float64(l / Om) ^ 2.0) * n)) - Float64(Float64(t_1 * 2.0) - t)) * t_2) tmp = 0.0 if (t_3 <= 2e-266) tmp = sqrt(Float64(fma(Float64(Float64(Float64(l * l) * n) / Om), -4.0, Float64(Float64(t * n) * 2.0)) * U)); elseif (t_3 <= 1e+308) tmp = sqrt(Float64(fma(-2.0, t_1, t) * t_2)); else tmp = sqrt(Float64(Float64(Float64(Float64(n * l) / Float64(Om * Om)) * Float64(Float64(Float64(U_42_ * U) * n) * l)) * 2.0)); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(U$42$ - U), $MachinePrecision] * N[(N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision] - N[(N[(t$95$1 * 2.0), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]}, If[LessEqual[t$95$3, 2e-266], N[Sqrt[N[(N[(N[(N[(N[(l * l), $MachinePrecision] * n), $MachinePrecision] / Om), $MachinePrecision] * -4.0 + N[(N[(t * n), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, 1e+308], N[Sqrt[N[(N[(-2.0 * t$95$1 + t), $MachinePrecision] * t$95$2), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(n * l), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(U$42$ * U), $MachinePrecision] * n), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell \cdot \ell}{Om}\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := \left(\left(U* - U\right) \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot n\right) - \left(t\_1 \cdot 2 - t\right)\right) \cdot t\_2\\
\mathbf{if}\;t\_3 \leq 2 \cdot 10^{-266}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{\left(\ell \cdot \ell\right) \cdot n}{Om}, -4, \left(t \cdot n\right) \cdot 2\right) \cdot U}\\
\mathbf{elif}\;t\_3 \leq 10^{+308}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(-2, t\_1, t\right) \cdot t\_2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\frac{n \cdot \ell}{Om \cdot Om} \cdot \left(\left(\left(U* \cdot U\right) \cdot n\right) \cdot \ell\right)\right) \cdot 2}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 2e-266Initial program 24.3%
lift--.f64N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6427.2
lift-*.f64N/A
Applied rewrites27.2%
Applied rewrites51.0%
Taylor expanded in Om around inf
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6445.3
Applied rewrites45.3%
if 2e-266 < (*.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*)))) < 1e308Initial program 99.6%
Taylor expanded in Om around inf
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6481.9
Applied rewrites81.9%
if 1e308 < (*.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 23.6%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6410.1
Applied rewrites10.1%
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-*.f6435.9
Applied rewrites35.9%
Applied rewrites35.1%
Final simplification54.6%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* (* 2.0 n) U)))
(if (<=
(*
(- (* (- U* U) (* (pow (/ l Om) 2.0) n)) (- (* (/ (* l l) Om) 2.0) t))
t_1)
0.0)
(sqrt (* (* t U) (* 2.0 n)))
(sqrt (* t_1 t)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (2.0 * n) * U;
double tmp;
if (((((U_42_ - U) * (pow((l / Om), 2.0) * n)) - ((((l * l) / Om) * 2.0) - t)) * t_1) <= 0.0) {
tmp = sqrt(((t * U) * (2.0 * n)));
} else {
tmp = sqrt((t_1 * t));
}
return tmp;
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: t_1
real(8) :: tmp
t_1 = (2.0d0 * n) * u
if (((((u_42 - u) * (((l / om) ** 2.0d0) * n)) - ((((l * l) / om) * 2.0d0) - t)) * t_1) <= 0.0d0) then
tmp = sqrt(((t * u) * (2.0d0 * n)))
else
tmp = sqrt((t_1 * t))
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (2.0 * n) * U;
double tmp;
if (((((U_42_ - U) * (Math.pow((l / Om), 2.0) * n)) - ((((l * l) / Om) * 2.0) - t)) * t_1) <= 0.0) {
tmp = Math.sqrt(((t * U) * (2.0 * n)));
} else {
tmp = Math.sqrt((t_1 * t));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): t_1 = (2.0 * n) * U tmp = 0 if ((((U_42_ - U) * (math.pow((l / Om), 2.0) * n)) - ((((l * l) / Om) * 2.0) - t)) * t_1) <= 0.0: tmp = math.sqrt(((t * U) * (2.0 * n))) else: tmp = math.sqrt((t_1 * t)) return tmp
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(2.0 * n) * U) 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)) * t_1) <= 0.0) tmp = sqrt(Float64(Float64(t * U) * Float64(2.0 * n))); else tmp = sqrt(Float64(t_1 * t)); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = (2.0 * n) * U; tmp = 0.0; if (((((U_42_ - U) * (((l / Om) ^ 2.0) * n)) - ((((l * l) / Om) * 2.0) - t)) * t_1) <= 0.0) tmp = sqrt(((t * U) * (2.0 * n))); else tmp = sqrt((t_1 * t)); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, If[LessEqual[N[(N[(N[(N[(U$42$ - U), $MachinePrecision] * N[(N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] * 2.0), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], 0.0], N[Sqrt[N[(N[(t * U), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(t$95$1 * t), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(2 \cdot n\right) \cdot U\\
\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 t\_1 \leq 0:\\
\;\;\;\;\sqrt{\left(t \cdot U\right) \cdot \left(2 \cdot n\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t\_1 \cdot t}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 0.0Initial program 14.6%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6434.5
Applied rewrites34.5%
Applied rewrites34.5%
if 0.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) Initial program 58.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6436.3
Applied rewrites36.3%
Applied rewrites37.1%
Final simplification36.8%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 7.8e+121)
(sqrt
(*
(*
(* 2.0 n)
(fma (/ l Om) (fma (* (- U U*) (/ l Om)) (- n) (* -2.0 l)) t))
U))
(*
(* (sqrt 2.0) l)
(sqrt (* (* (- n) U) (fma (/ (- U U*) Om) (/ n Om) (/ 2.0 Om)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 7.8e+121) {
tmp = sqrt((((2.0 * n) * fma((l / Om), fma(((U - U_42_) * (l / Om)), -n, (-2.0 * l)), t)) * U));
} else {
tmp = (sqrt(2.0) * l) * sqrt(((-n * U) * fma(((U - U_42_) / Om), (n / Om), (2.0 / Om))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 7.8e+121) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * fma(Float64(l / Om), fma(Float64(Float64(U - U_42_) * Float64(l / Om)), Float64(-n), Float64(-2.0 * l)), t)) * U)); else tmp = Float64(Float64(sqrt(2.0) * l) * sqrt(Float64(Float64(Float64(-n) * U) * fma(Float64(Float64(U - U_42_) / Om), Float64(n / Om), Float64(2.0 / Om))))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 7.8e+121], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * 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]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] * l), $MachinePrecision] * N[Sqrt[N[(N[((-n) * U), $MachinePrecision] * N[(N[(N[(U - U$42$), $MachinePrecision] / Om), $MachinePrecision] * N[(n / Om), $MachinePrecision] + N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 7.8 \cdot 10^{+121}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot \mathsf{fma}\left(\frac{\ell}{Om}, \mathsf{fma}\left(\left(U - U*\right) \cdot \frac{\ell}{Om}, -n, -2 \cdot \ell\right), t\right)\right) \cdot U}\\
\mathbf{else}:\\
\;\;\;\;\left(\sqrt{2} \cdot \ell\right) \cdot \sqrt{\left(\left(-n\right) \cdot U\right) \cdot \mathsf{fma}\left(\frac{U - U*}{Om}, \frac{n}{Om}, \frac{2}{Om}\right)}\\
\end{array}
\end{array}
if l < 7.79999999999999967e121Initial program 57.5%
lift--.f64N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6461.5
lift-*.f64N/A
Applied rewrites57.6%
Applied rewrites57.3%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites67.2%
if 7.79999999999999967e121 < l Initial program 24.6%
lift--.f64N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6442.2
lift-*.f64N/A
Applied rewrites42.1%
Applied rewrites38.4%
Taylor expanded in l around inf
lower-*.f64N/A
Applied rewrites74.2%
Final simplification68.2%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 1e+51)
(sqrt (* (* (* (fma -2.0 (/ (* l l) Om) t) n) U) 2.0))
(sqrt
(*
(* (* (* (/ (fma (- n) (- U U*) (* -2.0 Om)) Om) (/ l Om)) l) U)
(* 2.0 n)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1e+51) {
tmp = sqrt((((fma(-2.0, ((l * l) / Om), t) * n) * U) * 2.0));
} else {
tmp = sqrt((((((fma(-n, (U - U_42_), (-2.0 * Om)) / Om) * (l / Om)) * l) * U) * (2.0 * n)));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1e+51) tmp = sqrt(Float64(Float64(Float64(fma(-2.0, Float64(Float64(l * l) / Om), t) * n) * U) * 2.0)); else tmp = sqrt(Float64(Float64(Float64(Float64(Float64(fma(Float64(-n), Float64(U - U_42_), Float64(-2.0 * Om)) / Om) * Float64(l / Om)) * l) * U) * Float64(2.0 * n))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1e+51], N[Sqrt[N[(N[(N[(N[(-2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] + t), $MachinePrecision] * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(N[(N[((-n) * N[(U - U$42$), $MachinePrecision] + N[(-2.0 * Om), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] * N[(l / Om), $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision] * U), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 10^{+51}:\\
\;\;\;\;\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{\left(\left(\left(\frac{\mathsf{fma}\left(-n, U - U*, -2 \cdot Om\right)}{Om} \cdot \frac{\ell}{Om}\right) \cdot \ell\right) \cdot U\right) \cdot \left(2 \cdot n\right)}\\
\end{array}
\end{array}
if l < 1e51Initial program 56.7%
Taylor expanded in n around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6450.9
Applied rewrites50.9%
if 1e51 < l Initial program 37.2%
Taylor expanded in Om around 0
lower-/.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-out--N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
unpow2N/A
lower-*.f6435.4
Applied rewrites35.4%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites58.4%
Applied rewrites58.6%
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* (* 2.0 n) (fma (/ l Om) (fma (* (- U U*) (/ l Om)) (- n) (* -2.0 l)) t)) U)))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((((2.0 * n) * fma((l / Om), fma(((U - U_42_) * (l / Om)), -n, (-2.0 * l)), t)) * U));
}
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(Float64(2.0 * n) * fma(Float64(l / Om), fma(Float64(Float64(U - U_42_) * Float64(l / Om)), Float64(-n), Float64(-2.0 * l)), t)) * U)) end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * 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]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left(\left(2 \cdot n\right) \cdot \mathsf{fma}\left(\frac{\ell}{Om}, \mathsf{fma}\left(\left(U - U*\right) \cdot \frac{\ell}{Om}, -n, -2 \cdot \ell\right), t\right)\right) \cdot U}
\end{array}
Initial program 53.1%
lift--.f64N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6458.9
lift-*.f64N/A
Applied rewrites55.6%
Applied rewrites54.9%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites65.0%
Final simplification65.0%
(FPCore (n U t l Om U*) :precision binary64 (if (<= l 2.5e+105) (sqrt (* (* (* (fma -2.0 (/ (* l l) Om) t) n) U) 2.0)) (sqrt (* (* (* (* (/ l Om) l) -2.0) U) (* 2.0 n)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 2.5e+105) {
tmp = sqrt((((fma(-2.0, ((l * l) / Om), t) * n) * U) * 2.0));
} else {
tmp = sqrt((((((l / Om) * l) * -2.0) * U) * (2.0 * n)));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 2.5e+105) tmp = sqrt(Float64(Float64(Float64(fma(-2.0, Float64(Float64(l * l) / Om), t) * n) * U) * 2.0)); else tmp = sqrt(Float64(Float64(Float64(Float64(Float64(l / Om) * l) * -2.0) * U) * Float64(2.0 * n))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 2.5e+105], N[Sqrt[N[(N[(N[(N[(-2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] + t), $MachinePrecision] * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(N[(l / Om), $MachinePrecision] * l), $MachinePrecision] * -2.0), $MachinePrecision] * U), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2.5 \cdot 10^{+105}:\\
\;\;\;\;\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{\left(\left(\left(\frac{\ell}{Om} \cdot \ell\right) \cdot -2\right) \cdot U\right) \cdot \left(2 \cdot n\right)}\\
\end{array}
\end{array}
if l < 2.50000000000000023e105Initial program 57.4%
Taylor expanded in n around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6450.4
Applied rewrites50.4%
if 2.50000000000000023e105 < l Initial program 28.0%
Taylor expanded in Om around 0
lower-/.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-out--N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
unpow2N/A
lower-*.f6436.2
Applied rewrites36.2%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites60.0%
Applied rewrites60.1%
Taylor expanded in Om around inf
Applied rewrites33.4%
Final simplification47.9%
(FPCore (n U t l Om U*) :precision binary64 (if (<= l 2.9e+82) (sqrt (* (* (* t n) U) 2.0)) (sqrt (* (* (* (* (/ l Om) l) -2.0) U) (* 2.0 n)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 2.9e+82) {
tmp = sqrt((((t * n) * U) * 2.0));
} else {
tmp = sqrt((((((l / Om) * l) * -2.0) * U) * (2.0 * 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 (l <= 2.9d+82) then
tmp = sqrt((((t * n) * u) * 2.0d0))
else
tmp = sqrt((((((l / om) * l) * (-2.0d0)) * u) * (2.0d0 * 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 (l <= 2.9e+82) {
tmp = Math.sqrt((((t * n) * U) * 2.0));
} else {
tmp = Math.sqrt((((((l / Om) * l) * -2.0) * U) * (2.0 * n)));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 2.9e+82: tmp = math.sqrt((((t * n) * U) * 2.0)) else: tmp = math.sqrt((((((l / Om) * l) * -2.0) * U) * (2.0 * n))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 2.9e+82) tmp = sqrt(Float64(Float64(Float64(t * n) * U) * 2.0)); else tmp = sqrt(Float64(Float64(Float64(Float64(Float64(l / Om) * l) * -2.0) * U) * Float64(2.0 * n))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 2.9e+82) tmp = sqrt((((t * n) * U) * 2.0)); else tmp = sqrt((((((l / Om) * l) * -2.0) * U) * (2.0 * n))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 2.9e+82], N[Sqrt[N[(N[(N[(t * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(N[(l / Om), $MachinePrecision] * l), $MachinePrecision] * -2.0), $MachinePrecision] * U), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2.9 \cdot 10^{+82}:\\
\;\;\;\;\sqrt{\left(\left(t \cdot n\right) \cdot U\right) \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\left(\left(\frac{\ell}{Om} \cdot \ell\right) \cdot -2\right) \cdot U\right) \cdot \left(2 \cdot n\right)}\\
\end{array}
\end{array}
if l < 2.9000000000000001e82Initial program 57.2%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6441.9
Applied rewrites41.9%
if 2.9000000000000001e82 < l Initial program 30.9%
Taylor expanded in Om around 0
lower-/.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-out--N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
unpow2N/A
lower-*.f6433.7
Applied rewrites33.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites60.7%
Applied rewrites60.7%
Taylor expanded in Om around inf
Applied rewrites33.4%
Final simplification40.6%
(FPCore (n U t l Om U*) :precision binary64 (if (<= l 2.9e+82) (sqrt (* (* (* t n) U) 2.0)) (sqrt (* (* (* (/ (* l l) Om) -2.0) U) (* 2.0 n)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 2.9e+82) {
tmp = sqrt((((t * n) * U) * 2.0));
} else {
tmp = sqrt((((((l * l) / Om) * -2.0) * U) * (2.0 * 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 (l <= 2.9d+82) then
tmp = sqrt((((t * n) * u) * 2.0d0))
else
tmp = sqrt((((((l * l) / om) * (-2.0d0)) * u) * (2.0d0 * 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 (l <= 2.9e+82) {
tmp = Math.sqrt((((t * n) * U) * 2.0));
} else {
tmp = Math.sqrt((((((l * l) / Om) * -2.0) * U) * (2.0 * n)));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 2.9e+82: tmp = math.sqrt((((t * n) * U) * 2.0)) else: tmp = math.sqrt((((((l * l) / Om) * -2.0) * U) * (2.0 * n))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 2.9e+82) tmp = sqrt(Float64(Float64(Float64(t * n) * U) * 2.0)); else tmp = sqrt(Float64(Float64(Float64(Float64(Float64(l * l) / Om) * -2.0) * U) * Float64(2.0 * n))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 2.9e+82) tmp = sqrt((((t * n) * U) * 2.0)); else tmp = sqrt((((((l * l) / Om) * -2.0) * U) * (2.0 * n))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 2.9e+82], N[Sqrt[N[(N[(N[(t * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] * -2.0), $MachinePrecision] * U), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2.9 \cdot 10^{+82}:\\
\;\;\;\;\sqrt{\left(\left(t \cdot n\right) \cdot U\right) \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\left(\frac{\ell \cdot \ell}{Om} \cdot -2\right) \cdot U\right) \cdot \left(2 \cdot n\right)}\\
\end{array}
\end{array}
if l < 2.9000000000000001e82Initial program 57.2%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6441.9
Applied rewrites41.9%
if 2.9000000000000001e82 < l Initial program 30.9%
Taylor expanded in Om around 0
lower-/.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-out--N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
unpow2N/A
lower-*.f6433.7
Applied rewrites33.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites60.7%
Taylor expanded in Om around inf
Applied rewrites22.4%
Final simplification38.8%
(FPCore (n U t l Om U*) :precision binary64 (if (<= n 2.5e-75) (sqrt (* (* (* t n) U) 2.0)) (* (sqrt (* t U)) (sqrt (* 2.0 n)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (n <= 2.5e-75) {
tmp = sqrt((((t * n) * U) * 2.0));
} else {
tmp = sqrt((t * U)) * sqrt((2.0 * 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 (n <= 2.5d-75) then
tmp = sqrt((((t * n) * u) * 2.0d0))
else
tmp = sqrt((t * u)) * sqrt((2.0d0 * 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 (n <= 2.5e-75) {
tmp = Math.sqrt((((t * n) * U) * 2.0));
} else {
tmp = Math.sqrt((t * U)) * Math.sqrt((2.0 * n));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if n <= 2.5e-75: tmp = math.sqrt((((t * n) * U) * 2.0)) else: tmp = math.sqrt((t * U)) * math.sqrt((2.0 * n)) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (n <= 2.5e-75) tmp = sqrt(Float64(Float64(Float64(t * n) * U) * 2.0)); else tmp = Float64(sqrt(Float64(t * U)) * sqrt(Float64(2.0 * n))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (n <= 2.5e-75) tmp = sqrt((((t * n) * U) * 2.0)); else tmp = sqrt((t * U)) * sqrt((2.0 * n)); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[n, 2.5e-75], N[Sqrt[N[(N[(N[(t * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(t * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;n \leq 2.5 \cdot 10^{-75}:\\
\;\;\;\;\sqrt{\left(\left(t \cdot n\right) \cdot U\right) \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t \cdot U} \cdot \sqrt{2 \cdot n}\\
\end{array}
\end{array}
if n < 2.49999999999999989e-75Initial program 55.4%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6443.5
Applied rewrites43.5%
if 2.49999999999999989e-75 < n Initial program 46.8%
Taylor expanded in Om around 0
lower-/.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-out--N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
unpow2N/A
lower-*.f6425.3
Applied rewrites25.3%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites47.0%
Taylor expanded in t around inf
lower-*.f6414.2
Applied rewrites14.2%
lift-sqrt.f64N/A
pow1/2N/A
lift-*.f64N/A
*-commutativeN/A
unpow-prod-downN/A
lower-*.f64N/A
pow1/2N/A
lower-sqrt.f64N/A
pow1/2N/A
lower-sqrt.f6424.5
Applied rewrites24.5%
Final simplification38.5%
(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.1%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6436.1
Applied rewrites36.1%
Final simplification36.1%
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* (* 2.0 n) U) t)))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((((2.0 * n) * U) * t));
}
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))
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));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt((((2.0 * n) * U) * t))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(Float64(2.0 * n) * U) * t)) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((((2.0 * n) * U) * t)); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}
\end{array}
Initial program 53.1%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6436.1
Applied rewrites36.1%
Applied rewrites35.0%
Final simplification35.0%
herbie shell --seed 2024241
(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*))))))