
(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 9 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 (* l (/ l Om))))
(t_2 (* n (pow (/ l Om) 2.0)))
(t_3
(*
(* (* 2.0 n) U)
(+ (- t (* 2.0 (/ (* l l) Om))) (* t_2 (- U* U))))))
(if (<= t_3 0.0)
(* (sqrt (* U (* n (- t t_1)))) (sqrt 2.0))
(if (<= t_3 4e+305)
(sqrt (* (* 2.0 (* n U)) (- t (+ (* t_2 (- U U*)) t_1))))
(fabs (/ (* (sqrt (* U* (* 2.0 U))) (* n l)) Om))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = 2.0 * (l * (l / Om));
double t_2 = n * pow((l / Om), 2.0);
double t_3 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_2 * (U_42_ - U)));
double tmp;
if (t_3 <= 0.0) {
tmp = sqrt((U * (n * (t - t_1)))) * sqrt(2.0);
} else if (t_3 <= 4e+305) {
tmp = sqrt(((2.0 * (n * U)) * (t - ((t_2 * (U - U_42_)) + t_1))));
} else {
tmp = fabs(((sqrt((U_42_ * (2.0 * U))) * (n * l)) / 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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = 2.0d0 * (l * (l / om))
t_2 = n * ((l / om) ** 2.0d0)
t_3 = ((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) + (t_2 * (u_42 - u)))
if (t_3 <= 0.0d0) then
tmp = sqrt((u * (n * (t - t_1)))) * sqrt(2.0d0)
else if (t_3 <= 4d+305) then
tmp = sqrt(((2.0d0 * (n * u)) * (t - ((t_2 * (u - u_42)) + t_1))))
else
tmp = abs(((sqrt((u_42 * (2.0d0 * u))) * (n * l)) / 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 t_1 = 2.0 * (l * (l / Om));
double t_2 = n * Math.pow((l / Om), 2.0);
double t_3 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_2 * (U_42_ - U)));
double tmp;
if (t_3 <= 0.0) {
tmp = Math.sqrt((U * (n * (t - t_1)))) * Math.sqrt(2.0);
} else if (t_3 <= 4e+305) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t - ((t_2 * (U - U_42_)) + t_1))));
} else {
tmp = Math.abs(((Math.sqrt((U_42_ * (2.0 * U))) * (n * l)) / Om));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): t_1 = 2.0 * (l * (l / Om)) t_2 = n * math.pow((l / Om), 2.0) t_3 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_2 * (U_42_ - U))) tmp = 0 if t_3 <= 0.0: tmp = math.sqrt((U * (n * (t - t_1)))) * math.sqrt(2.0) elif t_3 <= 4e+305: tmp = math.sqrt(((2.0 * (n * U)) * (t - ((t_2 * (U - U_42_)) + t_1)))) else: tmp = math.fabs(((math.sqrt((U_42_ * (2.0 * U))) * (n * l)) / Om)) return tmp
function code(n, U, t, l, Om, U_42_) t_1 = Float64(2.0 * Float64(l * Float64(l / Om))) t_2 = Float64(n * (Float64(l / Om) ^ 2.0)) t_3 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(t_2 * Float64(U_42_ - U)))) tmp = 0.0 if (t_3 <= 0.0) tmp = Float64(sqrt(Float64(U * Float64(n * Float64(t - t_1)))) * sqrt(2.0)); elseif (t_3 <= 4e+305) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - Float64(Float64(t_2 * Float64(U - U_42_)) + t_1)))); else tmp = abs(Float64(Float64(sqrt(Float64(U_42_ * Float64(2.0 * U))) * Float64(n * l)) / Om)); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = 2.0 * (l * (l / Om)); t_2 = n * ((l / Om) ^ 2.0); t_3 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_2 * (U_42_ - U))); tmp = 0.0; if (t_3 <= 0.0) tmp = sqrt((U * (n * (t - t_1)))) * sqrt(2.0); elseif (t_3 <= 4e+305) tmp = sqrt(((2.0 * (n * U)) * (t - ((t_2 * (U - U_42_)) + t_1)))); else tmp = abs(((sqrt((U_42_ * (2.0 * U))) * (n * l)) / Om)); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = 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[(t$95$2 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[(N[Sqrt[N[(U * N[(n * N[(t - t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 4e+305], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(N[(t$95$2 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(N[(N[Sqrt[N[(U$42$ * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(n * l), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\\
t_2 := n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\\
t_3 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t\_2 \cdot \left(U* - U\right)\right)\\
\mathbf{if}\;t\_3 \leq 0:\\
\;\;\;\;\sqrt{U \cdot \left(n \cdot \left(t - t\_1\right)\right)} \cdot \sqrt{2}\\
\mathbf{elif}\;t\_3 \leq 4 \cdot 10^{+305}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(t\_2 \cdot \left(U - U*\right) + t\_1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{\sqrt{U* \cdot \left(2 \cdot U\right)} \cdot \left(n \cdot \ell\right)}{Om}\right|\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 0.0Initial program 6.8%
Simplified33.3%
Taylor expanded in n around 0 34.0%
unpow234.0%
associate-*r/39.0%
*-commutative39.0%
Applied egg-rr39.0%
if 0.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 3.9999999999999998e305Initial program 98.2%
Simplified98.2%
if 3.9999999999999998e305 < (*.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.6%
Simplified28.1%
associate-*r*28.1%
sub-neg28.1%
distribute-lft-in14.9%
Applied egg-rr14.9%
distribute-lft-out28.1%
sub-neg28.1%
Simplified28.1%
Taylor expanded in U* around inf 25.2%
associate-*r/25.2%
Simplified25.2%
add-sqr-sqrt25.2%
rem-sqrt-square25.2%
sqrt-div25.2%
Applied egg-rr25.9%
pow125.9%
associate-*r*26.7%
*-commutative26.7%
sqrt-unprod49.5%
Applied egg-rr49.5%
unpow149.5%
*-commutative49.5%
Simplified49.5%
Final simplification68.6%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* l (/ l Om)))
(t_2 (fabs (/ (* (sqrt (* U* (* 2.0 U))) (* n l)) Om))))
(if (<= Om -1.5e-105)
(sqrt (* 2.0 (* (* n U) (+ t (* t_1 -2.0)))))
(if (<= Om -2.65e-143)
t_2
(if (<= Om -2.8e-253)
(sqrt (* (* 2.0 U) (* n (+ t (* -2.0 (/ (pow l 2.0) Om))))))
(if (<= Om 2.5e-47)
t_2
(* (sqrt (* U (* n (- t (* 2.0 t_1))))) (sqrt 2.0))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = l * (l / Om);
double t_2 = fabs(((sqrt((U_42_ * (2.0 * U))) * (n * l)) / Om));
double tmp;
if (Om <= -1.5e-105) {
tmp = sqrt((2.0 * ((n * U) * (t + (t_1 * -2.0)))));
} else if (Om <= -2.65e-143) {
tmp = t_2;
} else if (Om <= -2.8e-253) {
tmp = sqrt(((2.0 * U) * (n * (t + (-2.0 * (pow(l, 2.0) / Om))))));
} else if (Om <= 2.5e-47) {
tmp = t_2;
} else {
tmp = sqrt((U * (n * (t - (2.0 * t_1))))) * sqrt(2.0);
}
return tmp;
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = l * (l / om)
t_2 = abs(((sqrt((u_42 * (2.0d0 * u))) * (n * l)) / om))
if (om <= (-1.5d-105)) then
tmp = sqrt((2.0d0 * ((n * u) * (t + (t_1 * (-2.0d0))))))
else if (om <= (-2.65d-143)) then
tmp = t_2
else if (om <= (-2.8d-253)) then
tmp = sqrt(((2.0d0 * u) * (n * (t + ((-2.0d0) * ((l ** 2.0d0) / om))))))
else if (om <= 2.5d-47) then
tmp = t_2
else
tmp = sqrt((u * (n * (t - (2.0d0 * t_1))))) * sqrt(2.0d0)
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = l * (l / Om);
double t_2 = Math.abs(((Math.sqrt((U_42_ * (2.0 * U))) * (n * l)) / Om));
double tmp;
if (Om <= -1.5e-105) {
tmp = Math.sqrt((2.0 * ((n * U) * (t + (t_1 * -2.0)))));
} else if (Om <= -2.65e-143) {
tmp = t_2;
} else if (Om <= -2.8e-253) {
tmp = Math.sqrt(((2.0 * U) * (n * (t + (-2.0 * (Math.pow(l, 2.0) / Om))))));
} else if (Om <= 2.5e-47) {
tmp = t_2;
} else {
tmp = Math.sqrt((U * (n * (t - (2.0 * t_1))))) * Math.sqrt(2.0);
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): t_1 = l * (l / Om) t_2 = math.fabs(((math.sqrt((U_42_ * (2.0 * U))) * (n * l)) / Om)) tmp = 0 if Om <= -1.5e-105: tmp = math.sqrt((2.0 * ((n * U) * (t + (t_1 * -2.0))))) elif Om <= -2.65e-143: tmp = t_2 elif Om <= -2.8e-253: tmp = math.sqrt(((2.0 * U) * (n * (t + (-2.0 * (math.pow(l, 2.0) / Om)))))) elif Om <= 2.5e-47: tmp = t_2 else: tmp = math.sqrt((U * (n * (t - (2.0 * t_1))))) * math.sqrt(2.0) return tmp
function code(n, U, t, l, Om, U_42_) t_1 = Float64(l * Float64(l / Om)) t_2 = abs(Float64(Float64(sqrt(Float64(U_42_ * Float64(2.0 * U))) * Float64(n * l)) / Om)) tmp = 0.0 if (Om <= -1.5e-105) tmp = sqrt(Float64(2.0 * Float64(Float64(n * U) * Float64(t + Float64(t_1 * -2.0))))); elseif (Om <= -2.65e-143) tmp = t_2; elseif (Om <= -2.8e-253) tmp = sqrt(Float64(Float64(2.0 * U) * Float64(n * Float64(t + Float64(-2.0 * Float64((l ^ 2.0) / Om)))))); elseif (Om <= 2.5e-47) tmp = t_2; else tmp = Float64(sqrt(Float64(U * Float64(n * Float64(t - Float64(2.0 * t_1))))) * sqrt(2.0)); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = l * (l / Om); t_2 = abs(((sqrt((U_42_ * (2.0 * U))) * (n * l)) / Om)); tmp = 0.0; if (Om <= -1.5e-105) tmp = sqrt((2.0 * ((n * U) * (t + (t_1 * -2.0))))); elseif (Om <= -2.65e-143) tmp = t_2; elseif (Om <= -2.8e-253) tmp = sqrt(((2.0 * U) * (n * (t + (-2.0 * ((l ^ 2.0) / Om)))))); elseif (Om <= 2.5e-47) tmp = t_2; else tmp = sqrt((U * (n * (t - (2.0 * t_1))))) * sqrt(2.0); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Abs[N[(N[(N[Sqrt[N[(U$42$ * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(n * l), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[Om, -1.5e-105], N[Sqrt[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(t + N[(t$95$1 * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[Om, -2.65e-143], t$95$2, If[LessEqual[Om, -2.8e-253], N[Sqrt[N[(N[(2.0 * U), $MachinePrecision] * N[(n * N[(t + N[(-2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[Om, 2.5e-47], t$95$2, N[(N[Sqrt[N[(U * N[(n * N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \ell \cdot \frac{\ell}{Om}\\
t_2 := \left|\frac{\sqrt{U* \cdot \left(2 \cdot U\right)} \cdot \left(n \cdot \ell\right)}{Om}\right|\\
\mathbf{if}\;Om \leq -1.5 \cdot 10^{-105}:\\
\;\;\;\;\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + t\_1 \cdot -2\right)\right)}\\
\mathbf{elif}\;Om \leq -2.65 \cdot 10^{-143}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;Om \leq -2.8 \cdot 10^{-253}:\\
\;\;\;\;\sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)}\\
\mathbf{elif}\;Om \leq 2.5 \cdot 10^{-47}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\sqrt{U \cdot \left(n \cdot \left(t - 2 \cdot t\_1\right)\right)} \cdot \sqrt{2}\\
\end{array}
\end{array}
if Om < -1.5e-105Initial program 55.0%
Simplified52.3%
Taylor expanded in n around 0 48.5%
associate-*r*53.8%
sub-neg53.8%
*-commutative53.8%
distribute-rgt-neg-in53.8%
metadata-eval53.8%
Simplified53.8%
unpow248.3%
associate-*r/53.6%
*-commutative53.6%
Applied egg-rr60.3%
if -1.5e-105 < Om < -2.64999999999999998e-143 or -2.80000000000000006e-253 < Om < 2.50000000000000006e-47Initial program 37.3%
Simplified35.7%
associate-*r*40.8%
sub-neg40.8%
distribute-lft-in26.5%
Applied egg-rr26.5%
distribute-lft-out40.8%
sub-neg40.8%
Simplified40.8%
Taylor expanded in U* around inf 34.2%
associate-*r/34.2%
Simplified34.2%
add-sqr-sqrt34.2%
rem-sqrt-square34.2%
sqrt-div34.2%
Applied egg-rr26.3%
pow126.3%
associate-*r*27.8%
*-commutative27.8%
sqrt-unprod61.3%
Applied egg-rr61.3%
unpow161.3%
*-commutative61.3%
Simplified61.3%
if -2.64999999999999998e-143 < Om < -2.80000000000000006e-253Initial program 42.1%
Simplified53.8%
Taylor expanded in n around 0 54.9%
associate-*r*54.9%
*-commutative54.9%
cancel-sign-sub-inv54.9%
metadata-eval54.9%
Simplified54.9%
if 2.50000000000000006e-47 < Om Initial program 59.1%
Simplified61.4%
Taylor expanded in n around 0 58.3%
unpow258.3%
associate-*r/60.5%
*-commutative60.5%
Applied egg-rr60.5%
Final simplification60.2%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= Om -6.6e-100)
(sqrt (* 2.0 (* (* n U) (+ t (* (* l (/ l Om)) -2.0)))))
(if (or (<= Om -2.7e-143) (and (not (<= Om -6.8e-252)) (<= Om 2e-47)))
(fabs (/ (* (sqrt (* U* (* 2.0 U))) (* n l)) Om))
(sqrt (* (* 2.0 U) (* n (+ t (* -2.0 (/ (pow l 2.0) Om)))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (Om <= -6.6e-100) {
tmp = sqrt((2.0 * ((n * U) * (t + ((l * (l / Om)) * -2.0)))));
} else if ((Om <= -2.7e-143) || (!(Om <= -6.8e-252) && (Om <= 2e-47))) {
tmp = fabs(((sqrt((U_42_ * (2.0 * U))) * (n * l)) / Om));
} else {
tmp = sqrt(((2.0 * U) * (n * (t + (-2.0 * (pow(l, 2.0) / 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 (om <= (-6.6d-100)) then
tmp = sqrt((2.0d0 * ((n * u) * (t + ((l * (l / om)) * (-2.0d0))))))
else if ((om <= (-2.7d-143)) .or. (.not. (om <= (-6.8d-252))) .and. (om <= 2d-47)) then
tmp = abs(((sqrt((u_42 * (2.0d0 * u))) * (n * l)) / om))
else
tmp = sqrt(((2.0d0 * u) * (n * (t + ((-2.0d0) * ((l ** 2.0d0) / 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 (Om <= -6.6e-100) {
tmp = Math.sqrt((2.0 * ((n * U) * (t + ((l * (l / Om)) * -2.0)))));
} else if ((Om <= -2.7e-143) || (!(Om <= -6.8e-252) && (Om <= 2e-47))) {
tmp = Math.abs(((Math.sqrt((U_42_ * (2.0 * U))) * (n * l)) / Om));
} else {
tmp = Math.sqrt(((2.0 * U) * (n * (t + (-2.0 * (Math.pow(l, 2.0) / Om))))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if Om <= -6.6e-100: tmp = math.sqrt((2.0 * ((n * U) * (t + ((l * (l / Om)) * -2.0))))) elif (Om <= -2.7e-143) or (not (Om <= -6.8e-252) and (Om <= 2e-47)): tmp = math.fabs(((math.sqrt((U_42_ * (2.0 * U))) * (n * l)) / Om)) else: tmp = math.sqrt(((2.0 * U) * (n * (t + (-2.0 * (math.pow(l, 2.0) / Om)))))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (Om <= -6.6e-100) tmp = sqrt(Float64(2.0 * Float64(Float64(n * U) * Float64(t + Float64(Float64(l * Float64(l / Om)) * -2.0))))); elseif ((Om <= -2.7e-143) || (!(Om <= -6.8e-252) && (Om <= 2e-47))) tmp = abs(Float64(Float64(sqrt(Float64(U_42_ * Float64(2.0 * U))) * Float64(n * l)) / Om)); else tmp = sqrt(Float64(Float64(2.0 * U) * Float64(n * Float64(t + Float64(-2.0 * Float64((l ^ 2.0) / Om)))))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (Om <= -6.6e-100) tmp = sqrt((2.0 * ((n * U) * (t + ((l * (l / Om)) * -2.0))))); elseif ((Om <= -2.7e-143) || (~((Om <= -6.8e-252)) && (Om <= 2e-47))) tmp = abs(((sqrt((U_42_ * (2.0 * U))) * (n * l)) / Om)); else tmp = sqrt(((2.0 * U) * (n * (t + (-2.0 * ((l ^ 2.0) / Om)))))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[Om, -6.6e-100], N[Sqrt[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(t + N[(N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[Or[LessEqual[Om, -2.7e-143], And[N[Not[LessEqual[Om, -6.8e-252]], $MachinePrecision], LessEqual[Om, 2e-47]]], N[Abs[N[(N[(N[Sqrt[N[(U$42$ * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(n * l), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * U), $MachinePrecision] * N[(n * N[(t + N[(-2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;Om \leq -6.6 \cdot 10^{-100}:\\
\;\;\;\;\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + \left(\ell \cdot \frac{\ell}{Om}\right) \cdot -2\right)\right)}\\
\mathbf{elif}\;Om \leq -2.7 \cdot 10^{-143} \lor \neg \left(Om \leq -6.8 \cdot 10^{-252}\right) \land Om \leq 2 \cdot 10^{-47}:\\
\;\;\;\;\left|\frac{\sqrt{U* \cdot \left(2 \cdot U\right)} \cdot \left(n \cdot \ell\right)}{Om}\right|\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)}\\
\end{array}
\end{array}
if Om < -6.59999999999999993e-100Initial program 55.0%
Simplified52.3%
Taylor expanded in n around 0 48.5%
associate-*r*53.8%
sub-neg53.8%
*-commutative53.8%
distribute-rgt-neg-in53.8%
metadata-eval53.8%
Simplified53.8%
unpow248.3%
associate-*r/53.6%
*-commutative53.6%
Applied egg-rr60.3%
if -6.59999999999999993e-100 < Om < -2.70000000000000009e-143 or -6.7999999999999999e-252 < Om < 1.9999999999999999e-47Initial program 37.3%
Simplified35.7%
associate-*r*40.8%
sub-neg40.8%
distribute-lft-in26.5%
Applied egg-rr26.5%
distribute-lft-out40.8%
sub-neg40.8%
Simplified40.8%
Taylor expanded in U* around inf 34.2%
associate-*r/34.2%
Simplified34.2%
add-sqr-sqrt34.2%
rem-sqrt-square34.2%
sqrt-div34.2%
Applied egg-rr26.3%
pow126.3%
associate-*r*27.8%
*-commutative27.8%
sqrt-unprod61.3%
Applied egg-rr61.3%
unpow161.3%
*-commutative61.3%
Simplified61.3%
if -2.70000000000000009e-143 < Om < -6.7999999999999999e-252 or 1.9999999999999999e-47 < Om Initial program 56.4%
Simplified60.2%
Taylor expanded in n around 0 58.2%
associate-*r*58.2%
*-commutative58.2%
cancel-sign-sub-inv58.2%
metadata-eval58.2%
Simplified58.2%
Final simplification59.6%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (sqrt (* 2.0 (* (* n U) (+ t (* (* l (/ l Om)) -2.0)))))))
(if (<= Om -5.2e-106)
t_1
(if (<= Om 2.5e-47)
(fabs (* (sqrt (* U (* 2.0 U*))) (* n (/ l Om))))
(if (or (<= Om 2.9e+133) (not (<= Om 5.8e+221)))
t_1
(sqrt (* 2.0 (* U (* n t)))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = sqrt((2.0 * ((n * U) * (t + ((l * (l / Om)) * -2.0)))));
double tmp;
if (Om <= -5.2e-106) {
tmp = t_1;
} else if (Om <= 2.5e-47) {
tmp = fabs((sqrt((U * (2.0 * U_42_))) * (n * (l / Om))));
} else if ((Om <= 2.9e+133) || !(Om <= 5.8e+221)) {
tmp = t_1;
} else {
tmp = sqrt((2.0 * (U * (n * 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 = sqrt((2.0d0 * ((n * u) * (t + ((l * (l / om)) * (-2.0d0))))))
if (om <= (-5.2d-106)) then
tmp = t_1
else if (om <= 2.5d-47) then
tmp = abs((sqrt((u * (2.0d0 * u_42))) * (n * (l / om))))
else if ((om <= 2.9d+133) .or. (.not. (om <= 5.8d+221))) then
tmp = t_1
else
tmp = sqrt((2.0d0 * (u * (n * 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 = Math.sqrt((2.0 * ((n * U) * (t + ((l * (l / Om)) * -2.0)))));
double tmp;
if (Om <= -5.2e-106) {
tmp = t_1;
} else if (Om <= 2.5e-47) {
tmp = Math.abs((Math.sqrt((U * (2.0 * U_42_))) * (n * (l / Om))));
} else if ((Om <= 2.9e+133) || !(Om <= 5.8e+221)) {
tmp = t_1;
} else {
tmp = Math.sqrt((2.0 * (U * (n * t))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): t_1 = math.sqrt((2.0 * ((n * U) * (t + ((l * (l / Om)) * -2.0))))) tmp = 0 if Om <= -5.2e-106: tmp = t_1 elif Om <= 2.5e-47: tmp = math.fabs((math.sqrt((U * (2.0 * U_42_))) * (n * (l / Om)))) elif (Om <= 2.9e+133) or not (Om <= 5.8e+221): tmp = t_1 else: tmp = math.sqrt((2.0 * (U * (n * t)))) return tmp
function code(n, U, t, l, Om, U_42_) t_1 = sqrt(Float64(2.0 * Float64(Float64(n * U) * Float64(t + Float64(Float64(l * Float64(l / Om)) * -2.0))))) tmp = 0.0 if (Om <= -5.2e-106) tmp = t_1; elseif (Om <= 2.5e-47) tmp = abs(Float64(sqrt(Float64(U * Float64(2.0 * U_42_))) * Float64(n * Float64(l / Om)))); elseif ((Om <= 2.9e+133) || !(Om <= 5.8e+221)) tmp = t_1; else tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t)))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = sqrt((2.0 * ((n * U) * (t + ((l * (l / Om)) * -2.0))))); tmp = 0.0; if (Om <= -5.2e-106) tmp = t_1; elseif (Om <= 2.5e-47) tmp = abs((sqrt((U * (2.0 * U_42_))) * (n * (l / Om)))); elseif ((Om <= 2.9e+133) || ~((Om <= 5.8e+221))) tmp = t_1; else tmp = sqrt((2.0 * (U * (n * t)))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[Sqrt[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(t + N[(N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[Om, -5.2e-106], t$95$1, If[LessEqual[Om, 2.5e-47], N[Abs[N[(N[Sqrt[N[(U * N[(2.0 * U$42$), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(n * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[Or[LessEqual[Om, 2.9e+133], N[Not[LessEqual[Om, 5.8e+221]], $MachinePrecision]], t$95$1, N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + \left(\ell \cdot \frac{\ell}{Om}\right) \cdot -2\right)\right)}\\
\mathbf{if}\;Om \leq -5.2 \cdot 10^{-106}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;Om \leq 2.5 \cdot 10^{-47}:\\
\;\;\;\;\left|\sqrt{U \cdot \left(2 \cdot U*\right)} \cdot \left(n \cdot \frac{\ell}{Om}\right)\right|\\
\mathbf{elif}\;Om \leq 2.9 \cdot 10^{+133} \lor \neg \left(Om \leq 5.8 \cdot 10^{+221}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\
\end{array}
\end{array}
if Om < -5.2000000000000001e-106 or 2.50000000000000006e-47 < Om < 2.9000000000000001e133 or 5.7999999999999996e221 < Om Initial program 55.5%
Simplified52.6%
Taylor expanded in n around 0 48.6%
associate-*r*53.8%
sub-neg53.8%
*-commutative53.8%
distribute-rgt-neg-in53.8%
metadata-eval53.8%
Simplified53.8%
unpow248.3%
associate-*r/52.2%
*-commutative52.2%
Applied egg-rr58.3%
if -5.2000000000000001e-106 < Om < 2.50000000000000006e-47Initial program 38.4%
Simplified39.8%
associate-*r*43.7%
sub-neg43.7%
distribute-lft-in29.9%
Applied egg-rr29.9%
distribute-lft-out43.7%
sub-neg43.7%
Simplified43.7%
Taylor expanded in U* around inf 29.5%
associate-*r/29.5%
Simplified29.5%
add-sqr-sqrt29.5%
rem-sqrt-square29.5%
sqrt-div29.5%
Applied egg-rr25.8%
div-inv25.8%
associate-*r*26.9%
*-commutative26.9%
sqrt-unprod54.5%
Applied egg-rr54.5%
associate-*r/54.5%
*-rgt-identity54.5%
associate-*r/50.8%
associate-*l*50.8%
associate-/l*51.0%
Simplified51.0%
if 2.9000000000000001e133 < Om < 5.7999999999999996e221Initial program 65.5%
Simplified79.3%
Taylor expanded in t around inf 80.7%
Final simplification58.5%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (sqrt (* 2.0 (* (* n U) (+ t (* (* l (/ l Om)) -2.0)))))))
(if (<= Om -7.2e-101)
t_1
(if (<= Om 2e-47)
(fabs (/ (* (sqrt (* U* (* 2.0 U))) (* n l)) Om))
(if (or (<= Om 1.65e+133) (not (<= Om 4.4e+221)))
t_1
(sqrt (* 2.0 (* U (* n t)))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = sqrt((2.0 * ((n * U) * (t + ((l * (l / Om)) * -2.0)))));
double tmp;
if (Om <= -7.2e-101) {
tmp = t_1;
} else if (Om <= 2e-47) {
tmp = fabs(((sqrt((U_42_ * (2.0 * U))) * (n * l)) / Om));
} else if ((Om <= 1.65e+133) || !(Om <= 4.4e+221)) {
tmp = t_1;
} else {
tmp = sqrt((2.0 * (U * (n * 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 = sqrt((2.0d0 * ((n * u) * (t + ((l * (l / om)) * (-2.0d0))))))
if (om <= (-7.2d-101)) then
tmp = t_1
else if (om <= 2d-47) then
tmp = abs(((sqrt((u_42 * (2.0d0 * u))) * (n * l)) / om))
else if ((om <= 1.65d+133) .or. (.not. (om <= 4.4d+221))) then
tmp = t_1
else
tmp = sqrt((2.0d0 * (u * (n * 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 = Math.sqrt((2.0 * ((n * U) * (t + ((l * (l / Om)) * -2.0)))));
double tmp;
if (Om <= -7.2e-101) {
tmp = t_1;
} else if (Om <= 2e-47) {
tmp = Math.abs(((Math.sqrt((U_42_ * (2.0 * U))) * (n * l)) / Om));
} else if ((Om <= 1.65e+133) || !(Om <= 4.4e+221)) {
tmp = t_1;
} else {
tmp = Math.sqrt((2.0 * (U * (n * t))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): t_1 = math.sqrt((2.0 * ((n * U) * (t + ((l * (l / Om)) * -2.0))))) tmp = 0 if Om <= -7.2e-101: tmp = t_1 elif Om <= 2e-47: tmp = math.fabs(((math.sqrt((U_42_ * (2.0 * U))) * (n * l)) / Om)) elif (Om <= 1.65e+133) or not (Om <= 4.4e+221): tmp = t_1 else: tmp = math.sqrt((2.0 * (U * (n * t)))) return tmp
function code(n, U, t, l, Om, U_42_) t_1 = sqrt(Float64(2.0 * Float64(Float64(n * U) * Float64(t + Float64(Float64(l * Float64(l / Om)) * -2.0))))) tmp = 0.0 if (Om <= -7.2e-101) tmp = t_1; elseif (Om <= 2e-47) tmp = abs(Float64(Float64(sqrt(Float64(U_42_ * Float64(2.0 * U))) * Float64(n * l)) / Om)); elseif ((Om <= 1.65e+133) || !(Om <= 4.4e+221)) tmp = t_1; else tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t)))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = sqrt((2.0 * ((n * U) * (t + ((l * (l / Om)) * -2.0))))); tmp = 0.0; if (Om <= -7.2e-101) tmp = t_1; elseif (Om <= 2e-47) tmp = abs(((sqrt((U_42_ * (2.0 * U))) * (n * l)) / Om)); elseif ((Om <= 1.65e+133) || ~((Om <= 4.4e+221))) tmp = t_1; else tmp = sqrt((2.0 * (U * (n * t)))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[Sqrt[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(t + N[(N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[Om, -7.2e-101], t$95$1, If[LessEqual[Om, 2e-47], N[Abs[N[(N[(N[Sqrt[N[(U$42$ * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(n * l), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision], If[Or[LessEqual[Om, 1.65e+133], N[Not[LessEqual[Om, 4.4e+221]], $MachinePrecision]], t$95$1, N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + \left(\ell \cdot \frac{\ell}{Om}\right) \cdot -2\right)\right)}\\
\mathbf{if}\;Om \leq -7.2 \cdot 10^{-101}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;Om \leq 2 \cdot 10^{-47}:\\
\;\;\;\;\left|\frac{\sqrt{U* \cdot \left(2 \cdot U\right)} \cdot \left(n \cdot \ell\right)}{Om}\right|\\
\mathbf{elif}\;Om \leq 1.65 \cdot 10^{+133} \lor \neg \left(Om \leq 4.4 \cdot 10^{+221}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\
\end{array}
\end{array}
if Om < -7.19999999999999999e-101 or 1.9999999999999999e-47 < Om < 1.65e133 or 4.3999999999999999e221 < Om Initial program 55.5%
Simplified52.6%
Taylor expanded in n around 0 48.6%
associate-*r*53.8%
sub-neg53.8%
*-commutative53.8%
distribute-rgt-neg-in53.8%
metadata-eval53.8%
Simplified53.8%
unpow248.3%
associate-*r/52.2%
*-commutative52.2%
Applied egg-rr58.3%
if -7.19999999999999999e-101 < Om < 1.9999999999999999e-47Initial program 38.4%
Simplified39.8%
associate-*r*43.7%
sub-neg43.7%
distribute-lft-in29.9%
Applied egg-rr29.9%
distribute-lft-out43.7%
sub-neg43.7%
Simplified43.7%
Taylor expanded in U* around inf 29.5%
associate-*r/29.5%
Simplified29.5%
add-sqr-sqrt29.5%
rem-sqrt-square29.5%
sqrt-div29.5%
Applied egg-rr25.8%
pow125.8%
associate-*r*26.9%
*-commutative26.9%
sqrt-unprod54.5%
Applied egg-rr54.5%
unpow154.5%
*-commutative54.5%
Simplified54.5%
if 1.65e133 < Om < 4.3999999999999999e221Initial program 65.5%
Simplified79.3%
Taylor expanded in t around inf 80.7%
Final simplification59.6%
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* 2.0 (* (* n U) (+ t (* (* l (/ l Om)) -2.0))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((2.0 * ((n * U) * (t + ((l * (l / Om)) * -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((2.0d0 * ((n * u) * (t + ((l * (l / om)) * (-2.0d0))))))
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 + ((l * (l / Om)) * -2.0)))));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt((2.0 * ((n * U) * (t + ((l * (l / Om)) * -2.0)))))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(2.0 * Float64(Float64(n * U) * Float64(t + Float64(Float64(l * Float64(l / Om)) * -2.0))))) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((2.0 * ((n * U) * (t + ((l * (l / Om)) * -2.0))))); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(t + N[(N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + \left(\ell \cdot \frac{\ell}{Om}\right) \cdot -2\right)\right)}
\end{array}
Initial program 51.5%
Simplified51.7%
Taylor expanded in n around 0 47.3%
associate-*r*46.9%
sub-neg46.9%
*-commutative46.9%
distribute-rgt-neg-in46.9%
metadata-eval46.9%
Simplified46.9%
unpow247.1%
associate-*r/49.7%
*-commutative49.7%
Applied egg-rr49.6%
Final simplification49.6%
(FPCore (n U t l Om U*) :precision binary64 (if (<= Om 5e+132) (pow (* 2.0 (* t (* n U))) 0.5) (sqrt (* 2.0 (* U (* n t))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (Om <= 5e+132) {
tmp = pow((2.0 * (t * (n * U))), 0.5);
} else {
tmp = sqrt((2.0 * (U * (n * 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) :: tmp
if (om <= 5d+132) then
tmp = (2.0d0 * (t * (n * u))) ** 0.5d0
else
tmp = sqrt((2.0d0 * (u * (n * 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 tmp;
if (Om <= 5e+132) {
tmp = Math.pow((2.0 * (t * (n * U))), 0.5);
} else {
tmp = Math.sqrt((2.0 * (U * (n * t))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if Om <= 5e+132: tmp = math.pow((2.0 * (t * (n * U))), 0.5) else: tmp = math.sqrt((2.0 * (U * (n * t)))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (Om <= 5e+132) tmp = Float64(2.0 * Float64(t * Float64(n * U))) ^ 0.5; else tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t)))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (Om <= 5e+132) tmp = (2.0 * (t * (n * U))) ^ 0.5; else tmp = sqrt((2.0 * (U * (n * t)))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[Om, 5e+132], N[Power[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;Om \leq 5 \cdot 10^{+132}:\\
\;\;\;\;{\left(2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\
\end{array}
\end{array}
if Om < 5.0000000000000001e132Initial program 48.8%
Simplified47.3%
Taylor expanded in t around inf 36.7%
pow1/237.7%
associate-*r*40.6%
*-commutative40.6%
*-commutative40.6%
Applied egg-rr40.6%
if 5.0000000000000001e132 < Om Initial program 63.3%
Simplified71.5%
Taylor expanded in t around inf 72.3%
Final simplification46.4%
(FPCore (n U t l Om U*) :precision binary64 (if (<= Om 5e+132) (sqrt (* 2.0 (* t (* n U)))) (sqrt (* 2.0 (* U (* n t))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (Om <= 5e+132) {
tmp = sqrt((2.0 * (t * (n * U))));
} else {
tmp = sqrt((2.0 * (U * (n * 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) :: tmp
if (om <= 5d+132) then
tmp = sqrt((2.0d0 * (t * (n * u))))
else
tmp = sqrt((2.0d0 * (u * (n * 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 tmp;
if (Om <= 5e+132) {
tmp = Math.sqrt((2.0 * (t * (n * U))));
} else {
tmp = Math.sqrt((2.0 * (U * (n * t))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if Om <= 5e+132: tmp = math.sqrt((2.0 * (t * (n * U)))) else: tmp = math.sqrt((2.0 * (U * (n * t)))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (Om <= 5e+132) tmp = sqrt(Float64(2.0 * Float64(t * Float64(n * U)))); else tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t)))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (Om <= 5e+132) tmp = sqrt((2.0 * (t * (n * U)))); else tmp = sqrt((2.0 * (U * (n * t)))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[Om, 5e+132], N[Sqrt[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;Om \leq 5 \cdot 10^{+132}:\\
\;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\
\end{array}
\end{array}
if Om < 5.0000000000000001e132Initial program 48.8%
Simplified47.3%
Taylor expanded in t around inf 36.7%
associate-*r*39.6%
Simplified39.6%
if 5.0000000000000001e132 < Om Initial program 63.3%
Simplified71.5%
Taylor expanded in t around inf 72.3%
Final simplification45.6%
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* 2.0 (* U (* n t)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((2.0 * (U * (n * 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 * (u * (n * 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 * (U * (n * t))));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt((2.0 * (U * (n * t))))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(2.0 * Float64(U * Float64(n * t)))) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((2.0 * (U * (n * t)))); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}
\end{array}
Initial program 51.5%
Simplified51.7%
Taylor expanded in t around inf 43.3%
Final simplification43.3%
herbie shell --seed 2024071
(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*))))))