
(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 18 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 (* (- U U*) (/ l Om))))
(if (<= n -1e-311)
(sqrt (* (* (fma (/ l Om) (fma t_1 (- n) (* -2.0 l)) t) U) (* 2.0 n)))
(*
(sqrt (* (fma (fma (- n) t_1 (* -2.0 l)) (/ l Om) t) (* U 2.0)))
(sqrt n)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (U - U_42_) * (l / Om);
double tmp;
if (n <= -1e-311) {
tmp = sqrt(((fma((l / Om), fma(t_1, -n, (-2.0 * l)), t) * U) * (2.0 * n)));
} else {
tmp = sqrt((fma(fma(-n, t_1, (-2.0 * l)), (l / Om), t) * (U * 2.0))) * sqrt(n);
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(U - U_42_) * Float64(l / Om)) tmp = 0.0 if (n <= -1e-311) tmp = sqrt(Float64(Float64(fma(Float64(l / Om), fma(t_1, Float64(-n), Float64(-2.0 * l)), t) * U) * Float64(2.0 * n))); else tmp = Float64(sqrt(Float64(fma(fma(Float64(-n), t_1, Float64(-2.0 * l)), Float64(l / Om), t) * Float64(U * 2.0))) * sqrt(n)); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(U - U$42$), $MachinePrecision] * N[(l / Om), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[n, -1e-311], N[Sqrt[N[(N[(N[(N[(l / Om), $MachinePrecision] * N[(t$95$1 * (-n) + N[(-2.0 * l), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] * U), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(N[((-n) * t$95$1 + N[(-2.0 * l), $MachinePrecision]), $MachinePrecision] * N[(l / Om), $MachinePrecision] + t), $MachinePrecision] * N[(U * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[n], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(U - U*\right) \cdot \frac{\ell}{Om}\\
\mathbf{if}\;n \leq -1 \cdot 10^{-311}:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(\frac{\ell}{Om}, \mathsf{fma}\left(t\_1, -n, -2 \cdot \ell\right), t\right) \cdot U\right) \cdot \left(2 \cdot n\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(-n, t\_1, -2 \cdot \ell\right), \frac{\ell}{Om}, t\right) \cdot \left(U \cdot 2\right)} \cdot \sqrt{n}\\
\end{array}
\end{array}
if n < -9.99999999999948e-312Initial program 48.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--.f6456.2
lift-*.f64N/A
Applied rewrites55.2%
lift-*.f64N/A
lift-fma.f64N/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites52.3%
Applied rewrites63.7%
if -9.99999999999948e-312 < n Initial program 50.4%
lift--.f64N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6454.0
lift-*.f64N/A
Applied rewrites49.1%
lift-*.f64N/A
lift-fma.f64N/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites52.5%
Applied rewrites56.6%
lift-sqrt.f64N/A
pow1/2N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
unpow-prod-downN/A
lower-*.f64N/A
Applied rewrites69.8%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (/ (* l l) Om))
(t_2 (* (* 2.0 n) U))
(t_3
(* t_2 (- (- t (* 2.0 t_1)) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
(if (<= t_3 2e-194)
(sqrt (* (* (fma (/ l Om) (* -2.0 l) t) U) (* 2.0 n)))
(if (<= t_3 2e+303)
(sqrt (* t_2 (fma -2.0 t_1 t)))
(* l (sqrt (/ (* 2.0 (* U (* U* (* n n)))) (* Om Om))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (l * l) / Om;
double t_2 = (2.0 * n) * U;
double t_3 = t_2 * ((t - (2.0 * t_1)) - ((n * pow((l / Om), 2.0)) * (U - U_42_)));
double tmp;
if (t_3 <= 2e-194) {
tmp = sqrt(((fma((l / Om), (-2.0 * l), t) * U) * (2.0 * n)));
} else if (t_3 <= 2e+303) {
tmp = sqrt((t_2 * fma(-2.0, t_1, t)));
} else {
tmp = l * sqrt(((2.0 * (U * (U_42_ * (n * n)))) / (Om * Om)));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(l * l) / Om) t_2 = Float64(Float64(2.0 * n) * U) t_3 = Float64(t_2 * Float64(Float64(t - Float64(2.0 * t_1)) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_)))) tmp = 0.0 if (t_3 <= 2e-194) tmp = sqrt(Float64(Float64(fma(Float64(l / Om), Float64(-2.0 * l), t) * U) * Float64(2.0 * n))); elseif (t_3 <= 2e+303) tmp = sqrt(Float64(t_2 * fma(-2.0, t_1, t))); else tmp = Float64(l * sqrt(Float64(Float64(2.0 * Float64(U * Float64(U_42_ * Float64(n * n)))) / Float64(Om * Om)))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[(N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 2e-194], N[Sqrt[N[(N[(N[(N[(l / Om), $MachinePrecision] * N[(-2.0 * l), $MachinePrecision] + t), $MachinePrecision] * U), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, 2e+303], N[Sqrt[N[(t$95$2 * N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(l * N[Sqrt[N[(N[(2.0 * N[(U * N[(U$42$ * N[(n * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell \cdot \ell}{Om}\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := t\_2 \cdot \left(\left(t - 2 \cdot t\_1\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\
\mathbf{if}\;t\_3 \leq 2 \cdot 10^{-194}:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(\frac{\ell}{Om}, -2 \cdot \ell, t\right) \cdot U\right) \cdot \left(2 \cdot n\right)}\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+303}:\\
\;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, t\_1, t\right)}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \sqrt{\frac{2 \cdot \left(U \cdot \left(U* \cdot \left(n \cdot n\right)\right)\right)}{Om \cdot Om}}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 2.00000000000000004e-194Initial program 27.7%
lift--.f64N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6434.3
lift-*.f64N/A
Applied rewrites38.6%
lift-*.f64N/A
lift-fma.f64N/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites32.9%
Applied rewrites55.7%
Taylor expanded in n around 0
lower-*.f6445.1
Applied rewrites45.1%
if 2.00000000000000004e-194 < (*.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*)))) < 2e303Initial program 99.7%
Taylor expanded in n around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6487.7
Applied rewrites87.7%
if 2e303 < (*.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 22.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--.f6432.0
lift-*.f64N/A
Applied rewrites30.0%
lift-*.f64N/A
lift-fma.f64N/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites26.9%
Taylor expanded in l around inf
lower-*.f64N/A
lower-sqrt.f64N/A
+-commutativeN/A
lower-fma.f64N/A
associate-*r*N/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites18.8%
Taylor expanded in U* around inf
Applied rewrites14.2%
Final simplification44.4%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (/ (* l l) Om))
(t_2 (* (* 2.0 n) U))
(t_3
(* t_2 (- (- t (* 2.0 t_1)) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
(if (<= t_3 2e-194)
(sqrt (* (* (fma (/ l Om) (* -2.0 l) t) U) (* 2.0 n)))
(if (<= t_3 2e+303)
(sqrt (* t_2 (fma -2.0 t_1 t)))
(sqrt (* (* U 2.0) (* (fma (* -2.0 l) (/ l Om) t) n)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (l * l) / Om;
double t_2 = (2.0 * n) * U;
double t_3 = t_2 * ((t - (2.0 * t_1)) - ((n * pow((l / Om), 2.0)) * (U - U_42_)));
double tmp;
if (t_3 <= 2e-194) {
tmp = sqrt(((fma((l / Om), (-2.0 * l), t) * U) * (2.0 * n)));
} else if (t_3 <= 2e+303) {
tmp = sqrt((t_2 * fma(-2.0, t_1, t)));
} else {
tmp = sqrt(((U * 2.0) * (fma((-2.0 * l), (l / Om), t) * n)));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(l * l) / Om) t_2 = Float64(Float64(2.0 * n) * U) t_3 = Float64(t_2 * Float64(Float64(t - Float64(2.0 * t_1)) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_)))) tmp = 0.0 if (t_3 <= 2e-194) tmp = sqrt(Float64(Float64(fma(Float64(l / Om), Float64(-2.0 * l), t) * U) * Float64(2.0 * n))); elseif (t_3 <= 2e+303) tmp = sqrt(Float64(t_2 * fma(-2.0, t_1, t))); else tmp = sqrt(Float64(Float64(U * 2.0) * Float64(fma(Float64(-2.0 * l), Float64(l / Om), t) * n))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[(N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 2e-194], N[Sqrt[N[(N[(N[(N[(l / Om), $MachinePrecision] * N[(-2.0 * l), $MachinePrecision] + t), $MachinePrecision] * U), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, 2e+303], N[Sqrt[N[(t$95$2 * N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(U * 2.0), $MachinePrecision] * N[(N[(N[(-2.0 * l), $MachinePrecision] * N[(l / Om), $MachinePrecision] + t), $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell \cdot \ell}{Om}\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := t\_2 \cdot \left(\left(t - 2 \cdot t\_1\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\
\mathbf{if}\;t\_3 \leq 2 \cdot 10^{-194}:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(\frac{\ell}{Om}, -2 \cdot \ell, t\right) \cdot U\right) \cdot \left(2 \cdot n\right)}\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+303}:\\
\;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, t\_1, t\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(U \cdot 2\right) \cdot \left(\mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right) \cdot n\right)}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 2.00000000000000004e-194Initial program 27.7%
lift--.f64N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6434.3
lift-*.f64N/A
Applied rewrites38.6%
lift-*.f64N/A
lift-fma.f64N/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites32.9%
Applied rewrites55.7%
Taylor expanded in n around 0
lower-*.f6445.1
Applied rewrites45.1%
if 2.00000000000000004e-194 < (*.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*)))) < 2e303Initial program 99.7%
Taylor expanded in n around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6487.7
Applied rewrites87.7%
if 2e303 < (*.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 22.1%
Taylor expanded in n around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.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-*.f6417.5
Applied rewrites17.5%
Applied rewrites26.1%
(FPCore (n U t l Om U*)
:precision binary64
(if (<=
(*
(* (* 2.0 n) U)
(- (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U U*))))
INFINITY)
(sqrt
(*
(* (fma (/ l Om) (fma (* (- U U*) (/ l Om)) (- n) (* -2.0 l)) t) U)
(* 2.0 n)))
(sqrt
(*
2.0
(/ (* (* U l) (* n (fma -2.0 l (/ (* l (* n (- U U*))) (- Om))))) Om)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if ((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))) <= ((double) INFINITY)) {
tmp = sqrt(((fma((l / Om), fma(((U - U_42_) * (l / Om)), -n, (-2.0 * l)), t) * U) * (2.0 * n)));
} else {
tmp = sqrt((2.0 * (((U * l) * (n * fma(-2.0, l, ((l * (n * (U - U_42_))) / -Om)))) / Om)));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_)))) <= Inf) tmp = sqrt(Float64(Float64(fma(Float64(l / Om), fma(Float64(Float64(U - U_42_) * Float64(l / Om)), Float64(-n), Float64(-2.0 * l)), t) * U) * Float64(2.0 * n))); else tmp = sqrt(Float64(2.0 * Float64(Float64(Float64(U * l) * Float64(n * fma(-2.0, l, Float64(Float64(l * Float64(n * Float64(U - U_42_))) / Float64(-Om))))) / Om))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[Sqrt[N[(N[(N[(N[(l / Om), $MachinePrecision] * N[(N[(N[(U - U$42$), $MachinePrecision] * N[(l / Om), $MachinePrecision]), $MachinePrecision] * (-n) + N[(-2.0 * l), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] * U), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(N[(N[(U * l), $MachinePrecision] * N[(n * N[(-2.0 * l + N[(N[(l * N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-Om)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right) \leq \infty:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(\frac{\ell}{Om}, \mathsf{fma}\left(\left(U - U*\right) \cdot \frac{\ell}{Om}, -n, -2 \cdot \ell\right), t\right) \cdot U\right) \cdot \left(2 \cdot n\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \frac{\left(U \cdot \ell\right) \cdot \left(n \cdot \mathsf{fma}\left(-2, \ell, \frac{\ell \cdot \left(n \cdot \left(U - U*\right)\right)}{-Om}\right)\right)}{Om}}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < +inf.0Initial program 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--.f6462.8
lift-*.f64N/A
Applied rewrites59.5%
lift-*.f64N/A
lift-fma.f64N/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites60.0%
Applied rewrites62.7%
if +inf.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) Initial program 0.0%
lift--.f64N/A
lift--.f64N/A
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--.f6411.2
lift-*.f64N/A
Applied rewrites11.4%
lift-*.f64N/A
lift-fma.f64N/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites8.9%
Applied rewrites46.5%
Taylor expanded in t around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites73.1%
Final simplification64.3%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (/ (* l l) Om)) (t_2 (* (* 2.0 n) U)))
(if (<=
(sqrt
(* t_2 (- (- t (* 2.0 t_1)) (* (* n (pow (/ l Om) 2.0)) (- U U*)))))
5e+151)
(sqrt (* t_2 (fma -2.0 t_1 t)))
(sqrt (* (* U 2.0) (* (fma (* -2.0 l) (/ l Om) t) n))))))
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 tmp;
if (sqrt((t_2 * ((t - (2.0 * t_1)) - ((n * pow((l / Om), 2.0)) * (U - U_42_))))) <= 5e+151) {
tmp = sqrt((t_2 * fma(-2.0, t_1, t)));
} else {
tmp = sqrt(((U * 2.0) * (fma((-2.0 * l), (l / Om), t) * n)));
}
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) tmp = 0.0 if (sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * t_1)) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))) <= 5e+151) tmp = sqrt(Float64(t_2 * fma(-2.0, t_1, t))); else tmp = sqrt(Float64(Float64(U * 2.0) * Float64(fma(Float64(-2.0 * l), Float64(l / Om), t) * n))); 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]}, If[LessEqual[N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 5e+151], N[Sqrt[N[(t$95$2 * N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(U * 2.0), $MachinePrecision] * N[(N[(N[(-2.0 * l), $MachinePrecision] * N[(l / Om), $MachinePrecision] + t), $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell \cdot \ell}{Om}\\
t_2 := \left(2 \cdot n\right) \cdot U\\
\mathbf{if}\;\sqrt{t\_2 \cdot \left(\left(t - 2 \cdot t\_1\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \leq 5 \cdot 10^{+151}:\\
\;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, t\_1, t\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(U \cdot 2\right) \cdot \left(\mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right) \cdot n\right)}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 5.0000000000000002e151Initial program 81.4%
Taylor expanded in n around 0
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6471.3
Applied rewrites71.3%
if 5.0000000000000002e151 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) Initial program 20.3%
Taylor expanded in n around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.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-*.f6417.6
Applied rewrites17.6%
Applied rewrites27.8%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* n (- U U*))))
(if (<= l 4.7e+169)
(sqrt
(*
(* (fma (/ l Om) (fma (* (- U U*) (/ l Om)) (- n) (* -2.0 l)) t) U)
(* 2.0 n)))
(if (<= l 2.6e+260)
(sqrt
(* 2.0 (/ (* (* U l) (* n (fma -2.0 l (/ (* l t_1) (- Om))))) Om)))
(*
(sqrt (* (* (- U) n) (+ (/ t_1 (* Om Om)) (/ 2.0 Om))))
(* l (sqrt 2.0)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = n * (U - U_42_);
double tmp;
if (l <= 4.7e+169) {
tmp = sqrt(((fma((l / Om), fma(((U - U_42_) * (l / Om)), -n, (-2.0 * l)), t) * U) * (2.0 * n)));
} else if (l <= 2.6e+260) {
tmp = sqrt((2.0 * (((U * l) * (n * fma(-2.0, l, ((l * t_1) / -Om)))) / Om)));
} else {
tmp = sqrt(((-U * n) * ((t_1 / (Om * Om)) + (2.0 / Om)))) * (l * sqrt(2.0));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(n * Float64(U - U_42_)) tmp = 0.0 if (l <= 4.7e+169) tmp = sqrt(Float64(Float64(fma(Float64(l / Om), fma(Float64(Float64(U - U_42_) * Float64(l / Om)), Float64(-n), Float64(-2.0 * l)), t) * U) * Float64(2.0 * n))); elseif (l <= 2.6e+260) tmp = sqrt(Float64(2.0 * Float64(Float64(Float64(U * l) * Float64(n * fma(-2.0, l, Float64(Float64(l * t_1) / Float64(-Om))))) / Om))); else tmp = Float64(sqrt(Float64(Float64(Float64(-U) * n) * Float64(Float64(t_1 / Float64(Om * Om)) + Float64(2.0 / Om)))) * Float64(l * sqrt(2.0))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, 4.7e+169], N[Sqrt[N[(N[(N[(N[(l / Om), $MachinePrecision] * N[(N[(N[(U - U$42$), $MachinePrecision] * N[(l / Om), $MachinePrecision]), $MachinePrecision] * (-n) + N[(-2.0 * l), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] * U), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 2.6e+260], N[Sqrt[N[(2.0 * N[(N[(N[(U * l), $MachinePrecision] * N[(n * N[(-2.0 * l + N[(N[(l * t$95$1), $MachinePrecision] / (-Om)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[((-U) * n), $MachinePrecision] * N[(N[(t$95$1 / N[(Om * Om), $MachinePrecision]), $MachinePrecision] + N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := n \cdot \left(U - U*\right)\\
\mathbf{if}\;\ell \leq 4.7 \cdot 10^{+169}:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(\frac{\ell}{Om}, \mathsf{fma}\left(\left(U - U*\right) \cdot \frac{\ell}{Om}, -n, -2 \cdot \ell\right), t\right) \cdot U\right) \cdot \left(2 \cdot n\right)}\\
\mathbf{elif}\;\ell \leq 2.6 \cdot 10^{+260}:\\
\;\;\;\;\sqrt{2 \cdot \frac{\left(U \cdot \ell\right) \cdot \left(n \cdot \mathsf{fma}\left(-2, \ell, \frac{\ell \cdot t\_1}{-Om}\right)\right)}{Om}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\left(-U\right) \cdot n\right) \cdot \left(\frac{t\_1}{Om \cdot Om} + \frac{2}{Om}\right)} \cdot \left(\ell \cdot \sqrt{2}\right)\\
\end{array}
\end{array}
if l < 4.6999999999999998e169Initial program 53.9%
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.0
lift-*.f64N/A
Applied rewrites54.8%
lift-*.f64N/A
lift-fma.f64N/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites54.9%
Applied rewrites62.8%
if 4.6999999999999998e169 < l < 2.5999999999999998e260Initial program 12.9%
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.1
lift-*.f64N/A
Applied rewrites42.1%
lift-*.f64N/A
lift-fma.f64N/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites36.7%
Applied rewrites49.0%
Taylor expanded in t around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites71.3%
if 2.5999999999999998e260 < l Initial program 2.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--.f6412.0
lift-*.f64N/A
Applied rewrites12.7%
lift-*.f64N/A
lift-fma.f64N/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites22.0%
Applied rewrites23.0%
Taylor expanded in l around inf
lower-*.f64N/A
Applied rewrites54.5%
Final simplification63.0%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 1.4e-105)
(sqrt (* (* (* 2.0 n) U) (- t (/ (* (- U*) (/ (* (* l l) n) Om)) Om))))
(if (<= l 4.7e+169)
(sqrt
(*
(* (fma (/ l Om) (* (- l) (fma n (/ (- U U*) Om) 2.0)) t) U)
(* 2.0 n)))
(if (<= l 3.2e+260)
(sqrt
(*
2.0
(/
(* (* U l) (* n (fma -2.0 l (/ (* l (* n (- U U*))) (- Om)))))
Om)))
(*
l
(sqrt
(*
n
(fma -4.0 (/ U Om) (/ (* 2.0 (* U (* n (- U* U)))) (* Om Om))))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.4e-105) {
tmp = sqrt((((2.0 * n) * U) * (t - ((-U_42_ * (((l * l) * n) / Om)) / Om))));
} else if (l <= 4.7e+169) {
tmp = sqrt(((fma((l / Om), (-l * fma(n, ((U - U_42_) / Om), 2.0)), t) * U) * (2.0 * n)));
} else if (l <= 3.2e+260) {
tmp = sqrt((2.0 * (((U * l) * (n * fma(-2.0, l, ((l * (n * (U - U_42_))) / -Om)))) / Om)));
} else {
tmp = l * sqrt((n * fma(-4.0, (U / Om), ((2.0 * (U * (n * (U_42_ - U)))) / (Om * Om)))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.4e-105) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(t - Float64(Float64(Float64(-U_42_) * Float64(Float64(Float64(l * l) * n) / Om)) / Om)))); elseif (l <= 4.7e+169) tmp = sqrt(Float64(Float64(fma(Float64(l / Om), Float64(Float64(-l) * fma(n, Float64(Float64(U - U_42_) / Om), 2.0)), t) * U) * Float64(2.0 * n))); elseif (l <= 3.2e+260) tmp = sqrt(Float64(2.0 * Float64(Float64(Float64(U * l) * Float64(n * fma(-2.0, l, Float64(Float64(l * Float64(n * Float64(U - U_42_))) / Float64(-Om))))) / Om))); else tmp = Float64(l * sqrt(Float64(n * fma(-4.0, Float64(U / Om), Float64(Float64(2.0 * Float64(U * Float64(n * Float64(U_42_ - U)))) / Float64(Om * Om)))))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1.4e-105], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(t - N[(N[((-U$42$) * N[(N[(N[(l * l), $MachinePrecision] * n), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 4.7e+169], N[Sqrt[N[(N[(N[(N[(l / Om), $MachinePrecision] * N[((-l) * N[(n * N[(N[(U - U$42$), $MachinePrecision] / Om), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] * U), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 3.2e+260], N[Sqrt[N[(2.0 * N[(N[(N[(U * l), $MachinePrecision] * N[(n * N[(-2.0 * l + N[(N[(l * N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-Om)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(l * N[Sqrt[N[(n * N[(-4.0 * N[(U / Om), $MachinePrecision] + N[(N[(2.0 * N[(U * N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.4 \cdot 10^{-105}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t - \frac{\left(-U*\right) \cdot \frac{\left(\ell \cdot \ell\right) \cdot n}{Om}}{Om}\right)}\\
\mathbf{elif}\;\ell \leq 4.7 \cdot 10^{+169}:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(\frac{\ell}{Om}, \left(-\ell\right) \cdot \mathsf{fma}\left(n, \frac{U - U*}{Om}, 2\right), t\right) \cdot U\right) \cdot \left(2 \cdot n\right)}\\
\mathbf{elif}\;\ell \leq 3.2 \cdot 10^{+260}:\\
\;\;\;\;\sqrt{2 \cdot \frac{\left(U \cdot \ell\right) \cdot \left(n \cdot \mathsf{fma}\left(-2, \ell, \frac{\ell \cdot \left(n \cdot \left(U - U*\right)\right)}{-Om}\right)\right)}{Om}}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \sqrt{n \cdot \mathsf{fma}\left(-4, \frac{U}{Om}, \frac{2 \cdot \left(U \cdot \left(n \cdot \left(U* - U\right)\right)\right)}{Om \cdot Om}\right)}\\
\end{array}
\end{array}
if l < 1.4e-105Initial program 53.7%
Taylor expanded in n around 0
mul-1-negN/A
unsub-negN/A
associate--r+N/A
+-commutativeN/A
lower--.f64N/A
+-commutativeN/A
unpow2N/A
associate-/r*N/A
metadata-evalN/A
cancel-sign-sub-invN/A
associate-*r/N/A
Applied rewrites52.0%
Taylor expanded in U* around inf
Applied rewrites53.3%
if 1.4e-105 < l < 4.6999999999999998e169Initial program 54.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--.f6460.7
lift-*.f64N/A
Applied rewrites62.2%
lift-*.f64N/A
lift-fma.f64N/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites54.9%
Applied rewrites76.3%
Taylor expanded in l around -inf
mul-1-negN/A
lower-neg.f64N/A
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6476.3
Applied rewrites76.3%
if 4.6999999999999998e169 < l < 3.2e260Initial program 12.9%
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.1
lift-*.f64N/A
Applied rewrites42.1%
lift-*.f64N/A
lift-fma.f64N/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites36.7%
Applied rewrites49.0%
Taylor expanded in t around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites71.3%
if 3.2e260 < l Initial program 2.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--.f6412.0
lift-*.f64N/A
Applied rewrites12.7%
lift-*.f64N/A
lift-fma.f64N/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites22.0%
Taylor expanded in l around inf
lower-*.f64N/A
lower-sqrt.f64N/A
+-commutativeN/A
lower-fma.f64N/A
associate-*r*N/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites41.4%
Taylor expanded in n around 0
Applied rewrites49.9%
Final simplification60.1%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1
(* (fma (/ l Om) (fma (* (- U U*) (/ l Om)) (- n) (* -2.0 l)) t) U)))
(if (<= n -1e-311)
(sqrt (* t_1 (* 2.0 n)))
(* (sqrt t_1) (sqrt (* 2.0 n))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = fma((l / Om), fma(((U - U_42_) * (l / Om)), -n, (-2.0 * l)), t) * U;
double tmp;
if (n <= -1e-311) {
tmp = sqrt((t_1 * (2.0 * n)));
} else {
tmp = sqrt(t_1) * sqrt((2.0 * n));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(fma(Float64(l / Om), fma(Float64(Float64(U - U_42_) * Float64(l / Om)), Float64(-n), Float64(-2.0 * l)), t) * U) tmp = 0.0 if (n <= -1e-311) tmp = sqrt(Float64(t_1 * Float64(2.0 * n))); else tmp = Float64(sqrt(t_1) * sqrt(Float64(2.0 * n))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(N[(l / Om), $MachinePrecision] * N[(N[(N[(U - U$42$), $MachinePrecision] * N[(l / Om), $MachinePrecision]), $MachinePrecision] * (-n) + N[(-2.0 * l), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] * U), $MachinePrecision]}, If[LessEqual[n, -1e-311], N[Sqrt[N[(t$95$1 * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[t$95$1], $MachinePrecision] * N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{\ell}{Om}, \mathsf{fma}\left(\left(U - U*\right) \cdot \frac{\ell}{Om}, -n, -2 \cdot \ell\right), t\right) \cdot U\\
\mathbf{if}\;n \leq -1 \cdot 10^{-311}:\\
\;\;\;\;\sqrt{t\_1 \cdot \left(2 \cdot n\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t\_1} \cdot \sqrt{2 \cdot n}\\
\end{array}
\end{array}
if n < -9.99999999999948e-312Initial program 48.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--.f6456.2
lift-*.f64N/A
Applied rewrites55.2%
lift-*.f64N/A
lift-fma.f64N/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites52.3%
Applied rewrites63.7%
if -9.99999999999948e-312 < n Initial program 50.4%
lift--.f64N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6454.0
lift-*.f64N/A
Applied rewrites49.1%
lift-*.f64N/A
lift-fma.f64N/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites52.5%
Applied rewrites69.7%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 1.4e-105)
(sqrt (* (* (* 2.0 n) U) (- t (/ (* (- U*) (/ (* (* l l) n) Om)) Om))))
(if (<= l 3.2e+260)
(sqrt
(*
(* (fma (/ l Om) (* (- l) (fma n (/ (- U U*) Om) 2.0)) t) U)
(* 2.0 n)))
(*
l
(sqrt
(*
n
(fma -4.0 (/ U Om) (/ (* 2.0 (* U (* n (- U* U)))) (* Om Om)))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.4e-105) {
tmp = sqrt((((2.0 * n) * U) * (t - ((-U_42_ * (((l * l) * n) / Om)) / Om))));
} else if (l <= 3.2e+260) {
tmp = sqrt(((fma((l / Om), (-l * fma(n, ((U - U_42_) / Om), 2.0)), t) * U) * (2.0 * n)));
} else {
tmp = l * sqrt((n * fma(-4.0, (U / Om), ((2.0 * (U * (n * (U_42_ - U)))) / (Om * Om)))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.4e-105) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(t - Float64(Float64(Float64(-U_42_) * Float64(Float64(Float64(l * l) * n) / Om)) / Om)))); elseif (l <= 3.2e+260) tmp = sqrt(Float64(Float64(fma(Float64(l / Om), Float64(Float64(-l) * fma(n, Float64(Float64(U - U_42_) / Om), 2.0)), t) * U) * Float64(2.0 * n))); else tmp = Float64(l * sqrt(Float64(n * fma(-4.0, Float64(U / Om), Float64(Float64(2.0 * Float64(U * Float64(n * Float64(U_42_ - U)))) / Float64(Om * Om)))))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1.4e-105], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(t - N[(N[((-U$42$) * N[(N[(N[(l * l), $MachinePrecision] * n), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 3.2e+260], N[Sqrt[N[(N[(N[(N[(l / Om), $MachinePrecision] * N[((-l) * N[(n * N[(N[(U - U$42$), $MachinePrecision] / Om), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] * U), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(l * N[Sqrt[N[(n * N[(-4.0 * N[(U / Om), $MachinePrecision] + N[(N[(2.0 * N[(U * N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.4 \cdot 10^{-105}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t - \frac{\left(-U*\right) \cdot \frac{\left(\ell \cdot \ell\right) \cdot n}{Om}}{Om}\right)}\\
\mathbf{elif}\;\ell \leq 3.2 \cdot 10^{+260}:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(\frac{\ell}{Om}, \left(-\ell\right) \cdot \mathsf{fma}\left(n, \frac{U - U*}{Om}, 2\right), t\right) \cdot U\right) \cdot \left(2 \cdot n\right)}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \sqrt{n \cdot \mathsf{fma}\left(-4, \frac{U}{Om}, \frac{2 \cdot \left(U \cdot \left(n \cdot \left(U* - U\right)\right)\right)}{Om \cdot Om}\right)}\\
\end{array}
\end{array}
if l < 1.4e-105Initial program 53.7%
Taylor expanded in n around 0
mul-1-negN/A
unsub-negN/A
associate--r+N/A
+-commutativeN/A
lower--.f64N/A
+-commutativeN/A
unpow2N/A
associate-/r*N/A
metadata-evalN/A
cancel-sign-sub-invN/A
associate-*r/N/A
Applied rewrites52.0%
Taylor expanded in U* around inf
Applied rewrites53.3%
if 1.4e-105 < l < 3.2e260Initial program 45.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--.f6456.8
lift-*.f64N/A
Applied rewrites58.0%
lift-*.f64N/A
lift-fma.f64N/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites51.1%
Applied rewrites70.5%
Taylor expanded in l around -inf
mul-1-negN/A
lower-neg.f64N/A
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6470.6
Applied rewrites70.6%
if 3.2e260 < l Initial program 2.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--.f6412.0
lift-*.f64N/A
Applied rewrites12.7%
lift-*.f64N/A
lift-fma.f64N/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites22.0%
Taylor expanded in l around inf
lower-*.f64N/A
lower-sqrt.f64N/A
+-commutativeN/A
lower-fma.f64N/A
associate-*r*N/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites41.4%
Taylor expanded in n around 0
Applied rewrites49.9%
Final simplification58.6%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= U -8000000000000.0)
(sqrt (* (* (* 2.0 n) U) (- t (/ (* (- U*) (/ (* (* l l) n) Om)) Om))))
(if (<= U 8.6e+179)
(sqrt
(*
(* (fma (/ l Om) (* (- l) (fma n (/ (- U U*) Om) 2.0)) t) U)
(* 2.0 n)))
(* (sqrt (* (fma (* -2.0 l) (/ l Om) t) n)) (sqrt (* U 2.0))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U <= -8000000000000.0) {
tmp = sqrt((((2.0 * n) * U) * (t - ((-U_42_ * (((l * l) * n) / Om)) / Om))));
} else if (U <= 8.6e+179) {
tmp = sqrt(((fma((l / Om), (-l * fma(n, ((U - U_42_) / Om), 2.0)), t) * U) * (2.0 * n)));
} else {
tmp = sqrt((fma((-2.0 * l), (l / Om), t) * n)) * sqrt((U * 2.0));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U <= -8000000000000.0) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(t - Float64(Float64(Float64(-U_42_) * Float64(Float64(Float64(l * l) * n) / Om)) / Om)))); elseif (U <= 8.6e+179) tmp = sqrt(Float64(Float64(fma(Float64(l / Om), Float64(Float64(-l) * fma(n, Float64(Float64(U - U_42_) / Om), 2.0)), t) * U) * Float64(2.0 * n))); else tmp = Float64(sqrt(Float64(fma(Float64(-2.0 * l), Float64(l / Om), t) * n)) * sqrt(Float64(U * 2.0))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U, -8000000000000.0], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(t - N[(N[((-U$42$) * N[(N[(N[(l * l), $MachinePrecision] * n), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[U, 8.6e+179], N[Sqrt[N[(N[(N[(N[(l / Om), $MachinePrecision] * N[((-l) * N[(n * N[(N[(U - U$42$), $MachinePrecision] / Om), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] * U), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(N[(-2.0 * l), $MachinePrecision] * N[(l / Om), $MachinePrecision] + t), $MachinePrecision] * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;U \leq -8000000000000:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t - \frac{\left(-U*\right) \cdot \frac{\left(\ell \cdot \ell\right) \cdot n}{Om}}{Om}\right)}\\
\mathbf{elif}\;U \leq 8.6 \cdot 10^{+179}:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(\frac{\ell}{Om}, \left(-\ell\right) \cdot \mathsf{fma}\left(n, \frac{U - U*}{Om}, 2\right), t\right) \cdot U\right) \cdot \left(2 \cdot n\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right) \cdot n} \cdot \sqrt{U \cdot 2}\\
\end{array}
\end{array}
if U < -8e12Initial program 56.0%
Taylor expanded in n around 0
mul-1-negN/A
unsub-negN/A
associate--r+N/A
+-commutativeN/A
lower--.f64N/A
+-commutativeN/A
unpow2N/A
associate-/r*N/A
metadata-evalN/A
cancel-sign-sub-invN/A
associate-*r/N/A
Applied rewrites55.7%
Taylor expanded in U* around inf
Applied rewrites59.6%
if -8e12 < U < 8.5999999999999998e179Initial program 48.0%
lift--.f64N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6453.2
lift-*.f64N/A
Applied rewrites52.1%
lift-*.f64N/A
lift-fma.f64N/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites50.1%
Applied rewrites64.4%
Taylor expanded in l around -inf
mul-1-negN/A
lower-neg.f64N/A
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6461.8
Applied rewrites61.8%
if 8.5999999999999998e179 < U Initial program 41.4%
Taylor expanded in n around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6441.3
Applied rewrites41.3%
Applied rewrites89.0%
Final simplification63.3%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (fma (* -2.0 l) (/ l Om) t)))
(if (<= n -2.9e-42)
(sqrt
(* (* (* 2.0 n) U) (- t (/ (* (* l l) (fma (- U U*) (/ n Om) 2.0)) Om))))
(if (<= n -1e-311)
(sqrt (* (* U 2.0) (* t_1 n)))
(* (sqrt 2.0) (* (sqrt (* U t_1)) (sqrt n)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = fma((-2.0 * l), (l / Om), t);
double tmp;
if (n <= -2.9e-42) {
tmp = sqrt((((2.0 * n) * U) * (t - (((l * l) * fma((U - U_42_), (n / Om), 2.0)) / Om))));
} else if (n <= -1e-311) {
tmp = sqrt(((U * 2.0) * (t_1 * n)));
} else {
tmp = sqrt(2.0) * (sqrt((U * t_1)) * sqrt(n));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = fma(Float64(-2.0 * l), Float64(l / Om), t) tmp = 0.0 if (n <= -2.9e-42) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(t - Float64(Float64(Float64(l * l) * fma(Float64(U - U_42_), Float64(n / Om), 2.0)) / Om)))); elseif (n <= -1e-311) tmp = sqrt(Float64(Float64(U * 2.0) * Float64(t_1 * n))); else tmp = Float64(sqrt(2.0) * Float64(sqrt(Float64(U * t_1)) * sqrt(n))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(-2.0 * l), $MachinePrecision] * N[(l / Om), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[n, -2.9e-42], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(t - N[(N[(N[(l * l), $MachinePrecision] * N[(N[(U - U$42$), $MachinePrecision] * N[(n / Om), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[n, -1e-311], N[Sqrt[N[(N[(U * 2.0), $MachinePrecision] * N[(t$95$1 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[Sqrt[N[(U * t$95$1), $MachinePrecision]], $MachinePrecision] * N[Sqrt[n], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\\
\mathbf{if}\;n \leq -2.9 \cdot 10^{-42}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t - \frac{\left(\ell \cdot \ell\right) \cdot \mathsf{fma}\left(U - U*, \frac{n}{Om}, 2\right)}{Om}\right)}\\
\mathbf{elif}\;n \leq -1 \cdot 10^{-311}:\\
\;\;\;\;\sqrt{\left(U \cdot 2\right) \cdot \left(t\_1 \cdot n\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \left(\sqrt{U \cdot t\_1} \cdot \sqrt{n}\right)\\
\end{array}
\end{array}
if n < -2.9000000000000003e-42Initial program 51.2%
Taylor expanded in n around 0
mul-1-negN/A
unsub-negN/A
associate--r+N/A
+-commutativeN/A
lower--.f64N/A
+-commutativeN/A
unpow2N/A
associate-/r*N/A
metadata-evalN/A
cancel-sign-sub-invN/A
associate-*r/N/A
Applied rewrites61.3%
if -2.9000000000000003e-42 < n < -9.99999999999948e-312Initial program 45.0%
Taylor expanded in n around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.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-*.f6445.3
Applied rewrites45.3%
Applied rewrites58.6%
if -9.99999999999948e-312 < n Initial program 50.4%
Taylor expanded in n around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6441.2
Applied rewrites41.2%
Applied rewrites58.1%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (fma (* -2.0 l) (/ l Om) t)))
(if (<= n -4e-40)
(sqrt (* (* (fma (/ l Om) (/ (* U* (* l n)) Om) t) U) (* 2.0 n)))
(if (<= n -1e-311)
(sqrt (* (* U 2.0) (* t_1 n)))
(* (sqrt 2.0) (* (sqrt (* U t_1)) (sqrt n)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = fma((-2.0 * l), (l / Om), t);
double tmp;
if (n <= -4e-40) {
tmp = sqrt(((fma((l / Om), ((U_42_ * (l * n)) / Om), t) * U) * (2.0 * n)));
} else if (n <= -1e-311) {
tmp = sqrt(((U * 2.0) * (t_1 * n)));
} else {
tmp = sqrt(2.0) * (sqrt((U * t_1)) * sqrt(n));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = fma(Float64(-2.0 * l), Float64(l / Om), t) tmp = 0.0 if (n <= -4e-40) tmp = sqrt(Float64(Float64(fma(Float64(l / Om), Float64(Float64(U_42_ * Float64(l * n)) / Om), t) * U) * Float64(2.0 * n))); elseif (n <= -1e-311) tmp = sqrt(Float64(Float64(U * 2.0) * Float64(t_1 * n))); else tmp = Float64(sqrt(2.0) * Float64(sqrt(Float64(U * t_1)) * sqrt(n))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(-2.0 * l), $MachinePrecision] * N[(l / Om), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[n, -4e-40], N[Sqrt[N[(N[(N[(N[(l / Om), $MachinePrecision] * N[(N[(U$42$ * N[(l * n), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] + t), $MachinePrecision] * U), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[n, -1e-311], N[Sqrt[N[(N[(U * 2.0), $MachinePrecision] * N[(t$95$1 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[Sqrt[N[(U * t$95$1), $MachinePrecision]], $MachinePrecision] * N[Sqrt[n], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\\
\mathbf{if}\;n \leq -4 \cdot 10^{-40}:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(\frac{\ell}{Om}, \frac{U* \cdot \left(\ell \cdot n\right)}{Om}, t\right) \cdot U\right) \cdot \left(2 \cdot n\right)}\\
\mathbf{elif}\;n \leq -1 \cdot 10^{-311}:\\
\;\;\;\;\sqrt{\left(U \cdot 2\right) \cdot \left(t\_1 \cdot n\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \left(\sqrt{U \cdot t\_1} \cdot \sqrt{n}\right)\\
\end{array}
\end{array}
if n < -3.9999999999999997e-40Initial program 51.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--.f6457.9
lift-*.f64N/A
Applied rewrites55.9%
lift-*.f64N/A
lift-fma.f64N/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites50.1%
Applied rewrites68.2%
Taylor expanded in U* around inf
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6461.9
Applied rewrites61.9%
if -3.9999999999999997e-40 < n < -9.99999999999948e-312Initial program 44.4%
Taylor expanded in n around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6444.7
Applied rewrites44.7%
Applied rewrites57.8%
if -9.99999999999948e-312 < n Initial program 50.4%
Taylor expanded in n around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6441.2
Applied rewrites41.2%
Applied rewrites58.1%
(FPCore (n U t l Om U*) :precision binary64 (if (or (<= n -4e-40) (not (<= n 1.95e-109))) (sqrt (* (* (fma (/ l Om) (/ (* U* (* l n)) Om) t) U) (* 2.0 n))) (sqrt (* (* U 2.0) (* (fma (* -2.0 l) (/ l Om) t) n)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if ((n <= -4e-40) || !(n <= 1.95e-109)) {
tmp = sqrt(((fma((l / Om), ((U_42_ * (l * n)) / Om), t) * U) * (2.0 * n)));
} else {
tmp = sqrt(((U * 2.0) * (fma((-2.0 * l), (l / Om), t) * n)));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if ((n <= -4e-40) || !(n <= 1.95e-109)) tmp = sqrt(Float64(Float64(fma(Float64(l / Om), Float64(Float64(U_42_ * Float64(l * n)) / Om), t) * U) * Float64(2.0 * n))); else tmp = sqrt(Float64(Float64(U * 2.0) * Float64(fma(Float64(-2.0 * l), Float64(l / Om), t) * n))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[Or[LessEqual[n, -4e-40], N[Not[LessEqual[n, 1.95e-109]], $MachinePrecision]], N[Sqrt[N[(N[(N[(N[(l / Om), $MachinePrecision] * N[(N[(U$42$ * N[(l * n), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] + t), $MachinePrecision] * U), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(U * 2.0), $MachinePrecision] * N[(N[(N[(-2.0 * l), $MachinePrecision] * N[(l / Om), $MachinePrecision] + t), $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;n \leq -4 \cdot 10^{-40} \lor \neg \left(n \leq 1.95 \cdot 10^{-109}\right):\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(\frac{\ell}{Om}, \frac{U* \cdot \left(\ell \cdot n\right)}{Om}, t\right) \cdot U\right) \cdot \left(2 \cdot n\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(U \cdot 2\right) \cdot \left(\mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right) \cdot n\right)}\\
\end{array}
\end{array}
if n < -3.9999999999999997e-40 or 1.95000000000000011e-109 < n Initial program 53.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--.f6457.5
lift-*.f64N/A
Applied rewrites52.2%
lift-*.f64N/A
lift-fma.f64N/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites51.6%
Applied rewrites66.0%
Taylor expanded in U* around inf
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6460.0
Applied rewrites60.0%
if -3.9999999999999997e-40 < n < 1.95000000000000011e-109Initial program 44.0%
Taylor expanded in n around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.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-*.f6443.7
Applied rewrites43.7%
Applied rewrites54.8%
Final simplification57.7%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (sqrt (* (* (fma (/ l Om) (* -2.0 l) t) U) (* 2.0 n)))))
(if (<= n -7.2e+228)
t_1
(if (<= n -3.8e+83)
(* (* (sqrt (* U* U)) (* (sqrt 2.0) n)) (/ l Om))
(if (<= n 1.75e-210)
(sqrt (* (* U 2.0) (* (fma (* -2.0 l) (/ l Om) t) n)))
t_1)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = sqrt(((fma((l / Om), (-2.0 * l), t) * U) * (2.0 * n)));
double tmp;
if (n <= -7.2e+228) {
tmp = t_1;
} else if (n <= -3.8e+83) {
tmp = (sqrt((U_42_ * U)) * (sqrt(2.0) * n)) * (l / Om);
} else if (n <= 1.75e-210) {
tmp = sqrt(((U * 2.0) * (fma((-2.0 * l), (l / Om), t) * n)));
} else {
tmp = t_1;
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = sqrt(Float64(Float64(fma(Float64(l / Om), Float64(-2.0 * l), t) * U) * Float64(2.0 * n))) tmp = 0.0 if (n <= -7.2e+228) tmp = t_1; elseif (n <= -3.8e+83) tmp = Float64(Float64(sqrt(Float64(U_42_ * U)) * Float64(sqrt(2.0) * n)) * Float64(l / Om)); elseif (n <= 1.75e-210) tmp = sqrt(Float64(Float64(U * 2.0) * Float64(fma(Float64(-2.0 * l), Float64(l / Om), t) * n))); 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[(l / Om), $MachinePrecision] * N[(-2.0 * l), $MachinePrecision] + t), $MachinePrecision] * U), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[n, -7.2e+228], t$95$1, If[LessEqual[n, -3.8e+83], N[(N[(N[Sqrt[N[(U$42$ * U), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision] * N[(l / Om), $MachinePrecision]), $MachinePrecision], If[LessEqual[n, 1.75e-210], N[Sqrt[N[(N[(U * 2.0), $MachinePrecision] * N[(N[(N[(-2.0 * l), $MachinePrecision] * N[(l / Om), $MachinePrecision] + t), $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{\left(\mathsf{fma}\left(\frac{\ell}{Om}, -2 \cdot \ell, t\right) \cdot U\right) \cdot \left(2 \cdot n\right)}\\
\mathbf{if}\;n \leq -7.2 \cdot 10^{+228}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;n \leq -3.8 \cdot 10^{+83}:\\
\;\;\;\;\left(\sqrt{U* \cdot U} \cdot \left(\sqrt{2} \cdot n\right)\right) \cdot \frac{\ell}{Om}\\
\mathbf{elif}\;n \leq 1.75 \cdot 10^{-210}:\\
\;\;\;\;\sqrt{\left(U \cdot 2\right) \cdot \left(\mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right) \cdot n\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if n < -7.2e228 or 1.75000000000000008e-210 < n Initial program 52.9%
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--.f6456.0
lift-*.f64N/A
Applied rewrites51.3%
lift-*.f64N/A
lift-fma.f64N/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites53.3%
Applied rewrites67.8%
Taylor expanded in n around 0
lower-*.f6453.1
Applied rewrites53.1%
if -7.2e228 < n < -3.8000000000000002e83Initial program 52.2%
Taylor expanded in U* around -inf
associate-*r*N/A
lower-*.f64N/A
Applied rewrites32.5%
Applied rewrites32.7%
if -3.8000000000000002e83 < n < 1.75000000000000008e-210Initial program 44.8%
Taylor expanded in n around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.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-*.f6445.1
Applied rewrites45.1%
Applied rewrites54.7%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (sqrt (* (* (fma (/ l Om) (* -2.0 l) t) U) (* 2.0 n)))))
(if (<= n -7.2e+228)
t_1
(if (<= n -3.8e+83)
(* (sqrt (* U* U)) (/ (* (* (sqrt 2.0) n) l) Om))
(if (<= n 1.75e-210)
(sqrt (* (* U 2.0) (* (fma (* -2.0 l) (/ l Om) t) n)))
t_1)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = sqrt(((fma((l / Om), (-2.0 * l), t) * U) * (2.0 * n)));
double tmp;
if (n <= -7.2e+228) {
tmp = t_1;
} else if (n <= -3.8e+83) {
tmp = sqrt((U_42_ * U)) * (((sqrt(2.0) * n) * l) / Om);
} else if (n <= 1.75e-210) {
tmp = sqrt(((U * 2.0) * (fma((-2.0 * l), (l / Om), t) * n)));
} else {
tmp = t_1;
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = sqrt(Float64(Float64(fma(Float64(l / Om), Float64(-2.0 * l), t) * U) * Float64(2.0 * n))) tmp = 0.0 if (n <= -7.2e+228) tmp = t_1; elseif (n <= -3.8e+83) tmp = Float64(sqrt(Float64(U_42_ * U)) * Float64(Float64(Float64(sqrt(2.0) * n) * l) / Om)); elseif (n <= 1.75e-210) tmp = sqrt(Float64(Float64(U * 2.0) * Float64(fma(Float64(-2.0 * l), Float64(l / Om), t) * n))); 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[(l / Om), $MachinePrecision] * N[(-2.0 * l), $MachinePrecision] + t), $MachinePrecision] * U), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[n, -7.2e+228], t$95$1, If[LessEqual[n, -3.8e+83], N[(N[Sqrt[N[(U$42$ * U), $MachinePrecision]], $MachinePrecision] * N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] * n), $MachinePrecision] * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision], If[LessEqual[n, 1.75e-210], N[Sqrt[N[(N[(U * 2.0), $MachinePrecision] * N[(N[(N[(-2.0 * l), $MachinePrecision] * N[(l / Om), $MachinePrecision] + t), $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{\left(\mathsf{fma}\left(\frac{\ell}{Om}, -2 \cdot \ell, t\right) \cdot U\right) \cdot \left(2 \cdot n\right)}\\
\mathbf{if}\;n \leq -7.2 \cdot 10^{+228}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;n \leq -3.8 \cdot 10^{+83}:\\
\;\;\;\;\sqrt{U* \cdot U} \cdot \frac{\left(\sqrt{2} \cdot n\right) \cdot \ell}{Om}\\
\mathbf{elif}\;n \leq 1.75 \cdot 10^{-210}:\\
\;\;\;\;\sqrt{\left(U \cdot 2\right) \cdot \left(\mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right) \cdot n\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if n < -7.2e228 or 1.75000000000000008e-210 < n Initial program 52.9%
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--.f6456.0
lift-*.f64N/A
Applied rewrites51.3%
lift-*.f64N/A
lift-fma.f64N/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites53.3%
Applied rewrites67.8%
Taylor expanded in n around 0
lower-*.f6453.1
Applied rewrites53.1%
if -7.2e228 < n < -3.8000000000000002e83Initial program 52.2%
Taylor expanded in U* around inf
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f6429.6
Applied rewrites29.6%
if -3.8000000000000002e83 < n < 1.75000000000000008e-210Initial program 44.8%
Taylor expanded in n around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.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-*.f6445.1
Applied rewrites45.1%
Applied rewrites54.7%
(FPCore (n U t l Om U*) :precision binary64 (if (<= U* 1.55e+67) (sqrt (* (* U 2.0) (* (fma (* -2.0 l) (/ l Om) t) n))) (sqrt (* (* (* U n) t) 2.0))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U_42_ <= 1.55e+67) {
tmp = sqrt(((U * 2.0) * (fma((-2.0 * l), (l / Om), t) * n)));
} else {
tmp = sqrt((((U * n) * t) * 2.0));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U_42_ <= 1.55e+67) tmp = sqrt(Float64(Float64(U * 2.0) * Float64(fma(Float64(-2.0 * l), Float64(l / Om), t) * n))); else tmp = sqrt(Float64(Float64(Float64(U * n) * t) * 2.0)); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U$42$, 1.55e+67], N[Sqrt[N[(N[(U * 2.0), $MachinePrecision] * N[(N[(N[(-2.0 * l), $MachinePrecision] * N[(l / Om), $MachinePrecision] + t), $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(U * n), $MachinePrecision] * t), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;U* \leq 1.55 \cdot 10^{+67}:\\
\;\;\;\;\sqrt{\left(U \cdot 2\right) \cdot \left(\mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right) \cdot n\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\left(U \cdot n\right) \cdot t\right) \cdot 2}\\
\end{array}
\end{array}
if U* < 1.54999999999999998e67Initial program 49.6%
Taylor expanded in n around 0
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6444.8
Applied rewrites44.8%
Applied rewrites51.3%
if 1.54999999999999998e67 < U* Initial program 47.6%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6425.5
Applied rewrites25.5%
Applied rewrites35.6%
(FPCore (n U t l Om U*) :precision binary64 (if (<= l 5e+153) (sqrt (* (* (* U n) t) 2.0)) (* l (sqrt (* -4.0 (/ (* U n) Om))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 5e+153) {
tmp = sqrt((((U * n) * t) * 2.0));
} else {
tmp = l * sqrt((-4.0 * ((U * n) / Om)));
}
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 <= 5d+153) then
tmp = sqrt((((u * n) * t) * 2.0d0))
else
tmp = l * sqrt(((-4.0d0) * ((u * n) / om)))
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 <= 5e+153) {
tmp = Math.sqrt((((U * n) * t) * 2.0));
} else {
tmp = l * Math.sqrt((-4.0 * ((U * n) / Om)));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 5e+153: tmp = math.sqrt((((U * n) * t) * 2.0)) else: tmp = l * math.sqrt((-4.0 * ((U * n) / Om))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 5e+153) tmp = sqrt(Float64(Float64(Float64(U * n) * t) * 2.0)); else tmp = Float64(l * sqrt(Float64(-4.0 * Float64(Float64(U * n) / Om)))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 5e+153) tmp = sqrt((((U * n) * t) * 2.0)); else tmp = l * sqrt((-4.0 * ((U * n) / Om))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 5e+153], N[Sqrt[N[(N[(N[(U * n), $MachinePrecision] * t), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[(l * N[Sqrt[N[(-4.0 * N[(N[(U * n), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 5 \cdot 10^{+153}:\\
\;\;\;\;\sqrt{\left(\left(U \cdot n\right) \cdot t\right) \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \sqrt{-4 \cdot \frac{U \cdot n}{Om}}\\
\end{array}
\end{array}
if l < 5.00000000000000018e153Initial program 55.1%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6440.3
Applied rewrites40.3%
Applied rewrites42.7%
if 5.00000000000000018e153 < l Initial program 8.0%
lift--.f64N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--l+N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6435.8
lift-*.f64N/A
Applied rewrites36.0%
lift-*.f64N/A
lift-fma.f64N/A
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites32.9%
Taylor expanded in l around inf
lower-*.f64N/A
lower-sqrt.f64N/A
+-commutativeN/A
lower-fma.f64N/A
associate-*r*N/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites36.3%
Taylor expanded in n around 0
Applied rewrites21.7%
Final simplification40.1%
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* (* U n) t) 2.0)))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((((U * n) * t) * 2.0));
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((((u * n) * t) * 2.0d0))
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((((U * n) * t) * 2.0));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt((((U * n) * t) * 2.0))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(Float64(U * n) * t) * 2.0)) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((((U * n) * t) * 2.0)); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(U * n), $MachinePrecision] * t), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left(\left(U \cdot n\right) \cdot t\right) \cdot 2}
\end{array}
Initial program 49.2%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6437.1
Applied rewrites37.1%
Applied rewrites38.8%
herbie shell --seed 2024342
(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*))))))