
(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_)))));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(n, u, t, l, om, u_42)
use fmin_fmax_functions
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}
Herbie found 14 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_)))));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(n, u, t, l, om, u_42)
use fmin_fmax_functions
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) - ((n * ((l / om) ** 2.0d0)) * (u - u_42)))))
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * Math.pow((l / Om), 2.0)) * (U - U_42_)))));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * math.pow((l / Om), 2.0)) * (U - U_42_)))))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * ((l / Om) ^ 2.0)) * (U - U_42_))))); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\end{array}
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* (fma (fma (* n (/ l Om)) (- U* U) (* -2.0 l)) (/ l Om) t) U)))
(if (<= n -7e-220)
(sqrt (* (+ n n) t_1))
(if (<= n 1.06e-119)
(sqrt
(*
t
(fma
2.0
(* U n)
(*
2.0
(/
(* U (* l (* n (fma -2.0 l (/ (* l (* n (- U* U))) Om)))))
(* Om t))))))
(* (sqrt (* t_1 2.0)) (sqrt n))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = fma(fma((n * (l / Om)), (U_42_ - U), (-2.0 * l)), (l / Om), t) * U;
double tmp;
if (n <= -7e-220) {
tmp = sqrt(((n + n) * t_1));
} else if (n <= 1.06e-119) {
tmp = sqrt((t * fma(2.0, (U * n), (2.0 * ((U * (l * (n * fma(-2.0, l, ((l * (n * (U_42_ - U))) / Om))))) / (Om * t))))));
} else {
tmp = sqrt((t_1 * 2.0)) * sqrt(n);
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(fma(fma(Float64(n * Float64(l / Om)), Float64(U_42_ - U), Float64(-2.0 * l)), Float64(l / Om), t) * U) tmp = 0.0 if (n <= -7e-220) tmp = sqrt(Float64(Float64(n + n) * t_1)); elseif (n <= 1.06e-119) tmp = sqrt(Float64(t * fma(2.0, Float64(U * n), Float64(2.0 * Float64(Float64(U * Float64(l * Float64(n * fma(-2.0, l, Float64(Float64(l * Float64(n * Float64(U_42_ - U))) / Om))))) / Float64(Om * t)))))); else tmp = Float64(sqrt(Float64(t_1 * 2.0)) * sqrt(n)); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(N[(N[(n * N[(l / Om), $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision] + N[(-2.0 * l), $MachinePrecision]), $MachinePrecision] * N[(l / Om), $MachinePrecision] + t), $MachinePrecision] * U), $MachinePrecision]}, If[LessEqual[n, -7e-220], N[Sqrt[N[(N[(n + n), $MachinePrecision] * t$95$1), $MachinePrecision]], $MachinePrecision], If[LessEqual[n, 1.06e-119], N[Sqrt[N[(t * N[(2.0 * N[(U * n), $MachinePrecision] + N[(2.0 * N[(N[(U * N[(l * N[(n * N[(-2.0 * l + N[(N[(l * N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(Om * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(t$95$1 * 2.0), $MachinePrecision]], $MachinePrecision] * N[Sqrt[n], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\mathsf{fma}\left(n \cdot \frac{\ell}{Om}, U* - U, -2 \cdot \ell\right), \frac{\ell}{Om}, t\right) \cdot U\\
\mathbf{if}\;n \leq -7 \cdot 10^{-220}:\\
\;\;\;\;\sqrt{\left(n + n\right) \cdot t\_1}\\
\mathbf{elif}\;n \leq 1.06 \cdot 10^{-119}:\\
\;\;\;\;\sqrt{t \cdot \mathsf{fma}\left(2, U \cdot n, 2 \cdot \frac{U \cdot \left(\ell \cdot \left(n \cdot \mathsf{fma}\left(-2, \ell, \frac{\ell \cdot \left(n \cdot \left(U* - U\right)\right)}{Om}\right)\right)\right)}{Om \cdot t}\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t\_1 \cdot 2} \cdot \sqrt{n}\\
\end{array}
\end{array}
if n < -6.99999999999999975e-220Initial program 50.2%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
distribute-rgt-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites52.2%
Applied rewrites55.8%
Applied rewrites60.0%
if -6.99999999999999975e-220 < n < 1.05999999999999999e-119Initial program 50.2%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
distribute-rgt-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites52.2%
Applied rewrites55.8%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites51.4%
if 1.05999999999999999e-119 < n Initial program 50.2%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
distribute-rgt-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites52.2%
Applied rewrites55.8%
Applied rewrites34.9%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* (fma (fma (* n (/ l Om)) (- U* U) (* -2.0 l)) (/ l Om) t) U)))
(if (<= n -2.15e-138)
(sqrt (* (+ n n) t_1))
(if (<= n 7.7e-305)
(sqrt
(*
(* (fma (/ l Om) (fma (* (- U* U) n) (/ l Om) (* -2.0 l)) t) (+ n n))
U))
(* (sqrt (* t_1 2.0)) (sqrt n))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = fma(fma((n * (l / Om)), (U_42_ - U), (-2.0 * l)), (l / Om), t) * U;
double tmp;
if (n <= -2.15e-138) {
tmp = sqrt(((n + n) * t_1));
} else if (n <= 7.7e-305) {
tmp = sqrt(((fma((l / Om), fma(((U_42_ - U) * n), (l / Om), (-2.0 * l)), t) * (n + n)) * U));
} else {
tmp = sqrt((t_1 * 2.0)) * sqrt(n);
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(fma(fma(Float64(n * Float64(l / Om)), Float64(U_42_ - U), Float64(-2.0 * l)), Float64(l / Om), t) * U) tmp = 0.0 if (n <= -2.15e-138) tmp = sqrt(Float64(Float64(n + n) * t_1)); elseif (n <= 7.7e-305) tmp = sqrt(Float64(Float64(fma(Float64(l / Om), fma(Float64(Float64(U_42_ - U) * n), Float64(l / Om), Float64(-2.0 * l)), t) * Float64(n + n)) * U)); else tmp = Float64(sqrt(Float64(t_1 * 2.0)) * sqrt(n)); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(N[(N[(n * N[(l / Om), $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision] + N[(-2.0 * l), $MachinePrecision]), $MachinePrecision] * N[(l / Om), $MachinePrecision] + t), $MachinePrecision] * U), $MachinePrecision]}, If[LessEqual[n, -2.15e-138], N[Sqrt[N[(N[(n + n), $MachinePrecision] * t$95$1), $MachinePrecision]], $MachinePrecision], If[LessEqual[n, 7.7e-305], N[Sqrt[N[(N[(N[(N[(l / Om), $MachinePrecision] * N[(N[(N[(U$42$ - U), $MachinePrecision] * n), $MachinePrecision] * N[(l / Om), $MachinePrecision] + N[(-2.0 * l), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] * N[(n + n), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(t$95$1 * 2.0), $MachinePrecision]], $MachinePrecision] * N[Sqrt[n], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\mathsf{fma}\left(n \cdot \frac{\ell}{Om}, U* - U, -2 \cdot \ell\right), \frac{\ell}{Om}, t\right) \cdot U\\
\mathbf{if}\;n \leq -2.15 \cdot 10^{-138}:\\
\;\;\;\;\sqrt{\left(n + n\right) \cdot t\_1}\\
\mathbf{elif}\;n \leq 7.7 \cdot 10^{-305}:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(\frac{\ell}{Om}, \mathsf{fma}\left(\left(U* - U\right) \cdot n, \frac{\ell}{Om}, -2 \cdot \ell\right), t\right) \cdot \left(n + n\right)\right) \cdot U}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t\_1 \cdot 2} \cdot \sqrt{n}\\
\end{array}
\end{array}
if n < -2.15e-138Initial program 50.2%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
distribute-rgt-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites52.2%
Applied rewrites55.8%
Applied rewrites60.0%
if -2.15e-138 < n < 7.6999999999999998e-305Initial program 50.2%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
distribute-rgt-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites52.2%
Applied rewrites56.5%
if 7.6999999999999998e-305 < n Initial program 50.2%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
distribute-rgt-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites52.2%
Applied rewrites55.8%
Applied rewrites34.9%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* (fma (fma (* n (/ l Om)) (- U* U) (* -2.0 l)) (/ l Om) t) U)))
(if (<= n -2.15e-138)
(sqrt (* (+ n n) t_1))
(if (<= n 7.7e-305)
(sqrt
(*
(* (fma (/ l Om) (fma (* (- U* U) n) (/ l Om) (* -2.0 l)) t) (+ n n))
U))
(* (sqrt (+ n n)) (sqrt t_1))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = fma(fma((n * (l / Om)), (U_42_ - U), (-2.0 * l)), (l / Om), t) * U;
double tmp;
if (n <= -2.15e-138) {
tmp = sqrt(((n + n) * t_1));
} else if (n <= 7.7e-305) {
tmp = sqrt(((fma((l / Om), fma(((U_42_ - U) * n), (l / Om), (-2.0 * l)), t) * (n + n)) * U));
} else {
tmp = sqrt((n + n)) * sqrt(t_1);
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(fma(fma(Float64(n * Float64(l / Om)), Float64(U_42_ - U), Float64(-2.0 * l)), Float64(l / Om), t) * U) tmp = 0.0 if (n <= -2.15e-138) tmp = sqrt(Float64(Float64(n + n) * t_1)); elseif (n <= 7.7e-305) tmp = sqrt(Float64(Float64(fma(Float64(l / Om), fma(Float64(Float64(U_42_ - U) * n), Float64(l / Om), Float64(-2.0 * l)), t) * Float64(n + n)) * U)); else tmp = Float64(sqrt(Float64(n + n)) * sqrt(t_1)); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(N[(N[(n * N[(l / Om), $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision] + N[(-2.0 * l), $MachinePrecision]), $MachinePrecision] * N[(l / Om), $MachinePrecision] + t), $MachinePrecision] * U), $MachinePrecision]}, If[LessEqual[n, -2.15e-138], N[Sqrt[N[(N[(n + n), $MachinePrecision] * t$95$1), $MachinePrecision]], $MachinePrecision], If[LessEqual[n, 7.7e-305], N[Sqrt[N[(N[(N[(N[(l / Om), $MachinePrecision] * N[(N[(N[(U$42$ - U), $MachinePrecision] * n), $MachinePrecision] * N[(l / Om), $MachinePrecision] + N[(-2.0 * l), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] * N[(n + n), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(n + n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[t$95$1], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\mathsf{fma}\left(n \cdot \frac{\ell}{Om}, U* - U, -2 \cdot \ell\right), \frac{\ell}{Om}, t\right) \cdot U\\
\mathbf{if}\;n \leq -2.15 \cdot 10^{-138}:\\
\;\;\;\;\sqrt{\left(n + n\right) \cdot t\_1}\\
\mathbf{elif}\;n \leq 7.7 \cdot 10^{-305}:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(\frac{\ell}{Om}, \mathsf{fma}\left(\left(U* - U\right) \cdot n, \frac{\ell}{Om}, -2 \cdot \ell\right), t\right) \cdot \left(n + n\right)\right) \cdot U}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{n + n} \cdot \sqrt{t\_1}\\
\end{array}
\end{array}
if n < -2.15e-138Initial program 50.2%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
distribute-rgt-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites52.2%
Applied rewrites55.8%
Applied rewrites60.0%
if -2.15e-138 < n < 7.6999999999999998e-305Initial program 50.2%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
distribute-rgt-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites52.2%
Applied rewrites56.5%
if 7.6999999999999998e-305 < n Initial program 50.2%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
distribute-rgt-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites52.2%
Applied rewrites55.8%
Applied rewrites34.9%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1
(*
(* (* 2.0 n) U)
(-
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U U*))))))
(if (<= t_1 2e+84)
(sqrt
(*
(+ n n)
(* (fma (fma (* n (/ l Om)) (- U* U) (* -2.0 l)) (/ l Om) t) U)))
(if (<= t_1 1e+306)
(sqrt (* (fma (/ l Om) (/ (* U* (* l n)) Om) t) (* U (+ n 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 t_1 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)));
double tmp;
if (t_1 <= 2e+84) {
tmp = sqrt(((n + n) * (fma(fma((n * (l / Om)), (U_42_ - U), (-2.0 * l)), (l / Om), t) * U)));
} else if (t_1 <= 1e+306) {
tmp = sqrt((fma((l / Om), ((U_42_ * (l * n)) / Om), t) * (U * (n + n))));
} else {
tmp = sqrt((2.0 * ((U * (l * (n * fma(-2.0, l, ((l * (n * (U_42_ - U))) / Om))))) / Om)));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = 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_)))) tmp = 0.0 if (t_1 <= 2e+84) tmp = sqrt(Float64(Float64(n + n) * Float64(fma(fma(Float64(n * Float64(l / Om)), Float64(U_42_ - U), Float64(-2.0 * l)), Float64(l / Om), t) * U))); elseif (t_1 <= 1e+306) tmp = sqrt(Float64(fma(Float64(l / Om), Float64(Float64(U_42_ * Float64(l * n)) / Om), t) * Float64(U * Float64(n + n)))); else tmp = sqrt(Float64(2.0 * Float64(Float64(U * Float64(l * Float64(n * fma(-2.0, l, Float64(Float64(l * Float64(n * Float64(U_42_ - U))) / Om))))) / Om))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, 2e+84], N[Sqrt[N[(N[(n + n), $MachinePrecision] * N[(N[(N[(N[(n * N[(l / Om), $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision] + N[(-2.0 * l), $MachinePrecision]), $MachinePrecision] * N[(l / Om), $MachinePrecision] + t), $MachinePrecision] * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$1, 1e+306], N[Sqrt[N[(N[(N[(l / Om), $MachinePrecision] * N[(N[(U$42$ * N[(l * n), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] + t), $MachinePrecision] * N[(U * N[(n + n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(N[(U * N[(l * N[(n * N[(-2.0 * l + N[(N[(l * N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \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)\\
\mathbf{if}\;t\_1 \leq 2 \cdot 10^{+84}:\\
\;\;\;\;\sqrt{\left(n + n\right) \cdot \left(\mathsf{fma}\left(\mathsf{fma}\left(n \cdot \frac{\ell}{Om}, U* - U, -2 \cdot \ell\right), \frac{\ell}{Om}, t\right) \cdot U\right)}\\
\mathbf{elif}\;t\_1 \leq 10^{+306}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{\ell}{Om}, \frac{U* \cdot \left(\ell \cdot n\right)}{Om}, t\right) \cdot \left(U \cdot \left(n + n\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \frac{U \cdot \left(\ell \cdot \left(n \cdot \mathsf{fma}\left(-2, \ell, \frac{\ell \cdot \left(n \cdot \left(U* - U\right)\right)}{Om}\right)\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*)))) < 2.00000000000000012e84Initial program 50.2%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
distribute-rgt-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites52.2%
Applied rewrites55.8%
Applied rewrites60.0%
if 2.00000000000000012e84 < (*.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*)))) < 1.00000000000000002e306Initial program 50.2%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
distribute-rgt-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites52.2%
Applied rewrites55.8%
Taylor expanded in U* around inf
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6449.9
Applied rewrites49.9%
if 1.00000000000000002e306 < (*.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 50.2%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
distribute-rgt-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites52.2%
Applied rewrites55.8%
Taylor expanded in t around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites29.2%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1
(*
(* (* 2.0 n) U)
(-
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U U*)))))
(t_2 (* U (+ n n))))
(if (<= t_1 0.0)
(* (* t (sqrt (/ (* U n) t))) (sqrt 2.0))
(if (<= t_1 1e-22)
(sqrt (* (fma (/ l Om) (* -2.0 l) t) t_2))
(if (<= t_1 1e+306)
(sqrt (* (fma (/ l Om) (/ (* U* (* l n)) Om) t) t_2))
(sqrt
(*
2.0
(/
(* U (* l (* n (fma -2.0 l (/ (* l (* n (- U* U))) Om)))))
Om))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)));
double t_2 = U * (n + n);
double tmp;
if (t_1 <= 0.0) {
tmp = (t * sqrt(((U * n) / t))) * sqrt(2.0);
} else if (t_1 <= 1e-22) {
tmp = sqrt((fma((l / Om), (-2.0 * l), t) * t_2));
} else if (t_1 <= 1e+306) {
tmp = sqrt((fma((l / Om), ((U_42_ * (l * n)) / Om), t) * t_2));
} else {
tmp = sqrt((2.0 * ((U * (l * (n * fma(-2.0, l, ((l * (n * (U_42_ - U))) / Om))))) / Om)));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = 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_)))) t_2 = Float64(U * Float64(n + n)) tmp = 0.0 if (t_1 <= 0.0) tmp = Float64(Float64(t * sqrt(Float64(Float64(U * n) / t))) * sqrt(2.0)); elseif (t_1 <= 1e-22) tmp = sqrt(Float64(fma(Float64(l / Om), Float64(-2.0 * l), t) * t_2)); elseif (t_1 <= 1e+306) tmp = sqrt(Float64(fma(Float64(l / Om), Float64(Float64(U_42_ * Float64(l * n)) / Om), t) * t_2)); else tmp = sqrt(Float64(2.0 * Float64(Float64(U * Float64(l * Float64(n * fma(-2.0, l, Float64(Float64(l * Float64(n * Float64(U_42_ - U))) / Om))))) / Om))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = 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]}, Block[{t$95$2 = N[(U * N[(n + n), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 0.0], N[(N[(t * N[Sqrt[N[(N[(U * n), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e-22], N[Sqrt[N[(N[(N[(l / Om), $MachinePrecision] * N[(-2.0 * l), $MachinePrecision] + t), $MachinePrecision] * t$95$2), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$1, 1e+306], N[Sqrt[N[(N[(N[(l / Om), $MachinePrecision] * N[(N[(U$42$ * N[(l * n), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] + t), $MachinePrecision] * t$95$2), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(N[(U * N[(l * N[(n * N[(-2.0 * l + N[(N[(l * N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \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)\\
t_2 := U \cdot \left(n + n\right)\\
\mathbf{if}\;t\_1 \leq 0:\\
\;\;\;\;\left(t \cdot \sqrt{\frac{U \cdot n}{t}}\right) \cdot \sqrt{2}\\
\mathbf{elif}\;t\_1 \leq 10^{-22}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{\ell}{Om}, -2 \cdot \ell, t\right) \cdot t\_2}\\
\mathbf{elif}\;t\_1 \leq 10^{+306}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{\ell}{Om}, \frac{U* \cdot \left(\ell \cdot n\right)}{Om}, t\right) \cdot t\_2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \frac{U \cdot \left(\ell \cdot \left(n \cdot \mathsf{fma}\left(-2, \ell, \frac{\ell \cdot \left(n \cdot \left(U* - U\right)\right)}{Om}\right)\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*)))) < 0.0Initial program 50.2%
lift-*.f64N/A
count-2-revN/A
lift-/.f64N/A
mult-flipN/A
lift-/.f64N/A
mult-flipN/A
distribute-lft-outN/A
lift-*.f64N/A
sqr-neg-revN/A
associate-*l*N/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lower-neg.f64N/A
div-add-revN/A
metadata-evalN/A
lower-/.f6453.6
Applied rewrites53.6%
Applied rewrites45.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-*.f6418.6
Applied rewrites18.6%
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*)))) < 1e-22Initial program 50.2%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
distribute-rgt-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites52.2%
Applied rewrites55.8%
Taylor expanded in n around 0
lower-*.f6446.6
Applied rewrites46.6%
if 1e-22 < (*.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*)))) < 1.00000000000000002e306Initial program 50.2%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
distribute-rgt-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites52.2%
Applied rewrites55.8%
Taylor expanded in U* around inf
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6449.9
Applied rewrites49.9%
if 1.00000000000000002e306 < (*.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 50.2%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
distribute-rgt-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites52.2%
Applied rewrites55.8%
Taylor expanded in t around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites29.2%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (/ (* U* (* l n)) Om))
(t_2
(*
(* (* 2.0 n) U)
(-
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U U*))))))
(if (<= t_2 2e+84)
(sqrt (* 2.0 (* U (* n (+ t (/ (* l (fma -2.0 l t_1)) Om))))))
(if (<= t_2 1e+306)
(sqrt (* (fma (/ l Om) t_1 t) (* U (+ n 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 t_1 = (U_42_ * (l * n)) / Om;
double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)));
double tmp;
if (t_2 <= 2e+84) {
tmp = sqrt((2.0 * (U * (n * (t + ((l * fma(-2.0, l, t_1)) / Om))))));
} else if (t_2 <= 1e+306) {
tmp = sqrt((fma((l / Om), t_1, t) * (U * (n + n))));
} else {
tmp = sqrt((2.0 * ((U * (l * (n * fma(-2.0, l, ((l * (n * (U_42_ - U))) / Om))))) / Om)));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(U_42_ * Float64(l * n)) / Om) t_2 = 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_)))) tmp = 0.0 if (t_2 <= 2e+84) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t + Float64(Float64(l * fma(-2.0, l, t_1)) / Om)))))); elseif (t_2 <= 1e+306) tmp = sqrt(Float64(fma(Float64(l / Om), t_1, t) * Float64(U * Float64(n + n)))); else tmp = sqrt(Float64(2.0 * Float64(Float64(U * Float64(l * Float64(n * fma(-2.0, l, Float64(Float64(l * Float64(n * Float64(U_42_ - U))) / Om))))) / Om))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(U$42$ * N[(l * n), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$2 = 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]}, If[LessEqual[t$95$2, 2e+84], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t + N[(N[(l * N[(-2.0 * l + t$95$1), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, 1e+306], N[Sqrt[N[(N[(N[(l / Om), $MachinePrecision] * t$95$1 + t), $MachinePrecision] * N[(U * N[(n + n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(N[(U * N[(l * N[(n * N[(-2.0 * l + N[(N[(l * N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\\
t_2 := \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)\\
\mathbf{if}\;t\_2 \leq 2 \cdot 10^{+84}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \frac{\ell \cdot \mathsf{fma}\left(-2, \ell, t\_1\right)}{Om}\right)\right)\right)}\\
\mathbf{elif}\;t\_2 \leq 10^{+306}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{\ell}{Om}, t\_1, t\right) \cdot \left(U \cdot \left(n + n\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \frac{U \cdot \left(\ell \cdot \left(n \cdot \mathsf{fma}\left(-2, \ell, \frac{\ell \cdot \left(n \cdot \left(U* - U\right)\right)}{Om}\right)\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*)))) < 2.00000000000000012e84Initial program 50.2%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
distribute-rgt-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites52.2%
Applied rewrites55.8%
Taylor expanded in U around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6454.7
Applied rewrites54.7%
if 2.00000000000000012e84 < (*.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*)))) < 1.00000000000000002e306Initial program 50.2%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
distribute-rgt-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites52.2%
Applied rewrites55.8%
Taylor expanded in U* around inf
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6449.9
Applied rewrites49.9%
if 1.00000000000000002e306 < (*.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 50.2%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
distribute-rgt-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites52.2%
Applied rewrites55.8%
Taylor expanded in t around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites29.2%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* U (+ n n))) (t_2 (sqrt (* (fma (/ l Om) (* -2.0 l) t) t_1))))
(if (<= Om -2e+104)
t_2
(if (<= Om 1.24e+58)
(sqrt (* (fma (/ l Om) (/ (* U* (* l n)) Om) t) t_1))
t_2))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = U * (n + n);
double t_2 = sqrt((fma((l / Om), (-2.0 * l), t) * t_1));
double tmp;
if (Om <= -2e+104) {
tmp = t_2;
} else if (Om <= 1.24e+58) {
tmp = sqrt((fma((l / Om), ((U_42_ * (l * n)) / Om), t) * t_1));
} else {
tmp = t_2;
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(U * Float64(n + n)) t_2 = sqrt(Float64(fma(Float64(l / Om), Float64(-2.0 * l), t) * t_1)) tmp = 0.0 if (Om <= -2e+104) tmp = t_2; elseif (Om <= 1.24e+58) tmp = sqrt(Float64(fma(Float64(l / Om), Float64(Float64(U_42_ * Float64(l * n)) / Om), t) * t_1)); else tmp = t_2; end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(U * N[(n + n), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(N[(l / Om), $MachinePrecision] * N[(-2.0 * l), $MachinePrecision] + t), $MachinePrecision] * t$95$1), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[Om, -2e+104], t$95$2, If[LessEqual[Om, 1.24e+58], N[Sqrt[N[(N[(N[(l / Om), $MachinePrecision] * N[(N[(U$42$ * N[(l * n), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] + t), $MachinePrecision] * t$95$1), $MachinePrecision]], $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := U \cdot \left(n + n\right)\\
t_2 := \sqrt{\mathsf{fma}\left(\frac{\ell}{Om}, -2 \cdot \ell, t\right) \cdot t\_1}\\
\mathbf{if}\;Om \leq -2 \cdot 10^{+104}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;Om \leq 1.24 \cdot 10^{+58}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{\ell}{Om}, \frac{U* \cdot \left(\ell \cdot n\right)}{Om}, t\right) \cdot t\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if Om < -2e104 or 1.24000000000000005e58 < Om Initial program 50.2%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
distribute-rgt-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites52.2%
Applied rewrites55.8%
Taylor expanded in n around 0
lower-*.f6446.6
Applied rewrites46.6%
if -2e104 < Om < 1.24000000000000005e58Initial program 50.2%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
distribute-rgt-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites52.2%
Applied rewrites55.8%
Taylor expanded in U* around inf
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6449.9
Applied rewrites49.9%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* (+ U U) (* t n)))
(t_2
(*
(* (* 2.0 n) U)
(-
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U U*))))))
(if (<= t_2 0.0)
(* (* t (sqrt (/ (* U n) t))) (sqrt 2.0))
(if (<= t_2 INFINITY)
(sqrt (* (fma (/ l Om) (* -2.0 l) t) (* U (+ n n))))
(sqrt (sqrt (* t_1 t_1)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (U + U) * (t * n);
double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)));
double tmp;
if (t_2 <= 0.0) {
tmp = (t * sqrt(((U * n) / t))) * sqrt(2.0);
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt((fma((l / Om), (-2.0 * l), t) * (U * (n + n))));
} else {
tmp = sqrt(sqrt((t_1 * t_1)));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(U + U) * Float64(t * n)) t_2 = 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_)))) tmp = 0.0 if (t_2 <= 0.0) tmp = Float64(Float64(t * sqrt(Float64(Float64(U * n) / t))) * sqrt(2.0)); elseif (t_2 <= Inf) tmp = sqrt(Float64(fma(Float64(l / Om), Float64(-2.0 * l), t) * Float64(U * Float64(n + n)))); else tmp = sqrt(sqrt(Float64(t_1 * t_1))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(U + U), $MachinePrecision] * N[(t * n), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = 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]}, If[LessEqual[t$95$2, 0.0], N[(N[(t * N[Sqrt[N[(N[(U * n), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(N[(l / Om), $MachinePrecision] * N[(-2.0 * l), $MachinePrecision] + t), $MachinePrecision] * N[(U * N[(n + n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[Sqrt[N[(t$95$1 * t$95$1), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(U + U\right) \cdot \left(t \cdot n\right)\\
t_2 := \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)\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;\left(t \cdot \sqrt{\frac{U \cdot n}{t}}\right) \cdot \sqrt{2}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{\ell}{Om}, -2 \cdot \ell, t\right) \cdot \left(U \cdot \left(n + n\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\sqrt{t\_1 \cdot t\_1}}\\
\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 50.2%
lift-*.f64N/A
count-2-revN/A
lift-/.f64N/A
mult-flipN/A
lift-/.f64N/A
mult-flipN/A
distribute-lft-outN/A
lift-*.f64N/A
sqr-neg-revN/A
associate-*l*N/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lower-neg.f64N/A
div-add-revN/A
metadata-evalN/A
lower-/.f6453.6
Applied rewrites53.6%
Applied rewrites45.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-*.f6418.6
Applied rewrites18.6%
if 0.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < +inf.0Initial program 50.2%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
distribute-rgt-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites52.2%
Applied rewrites55.8%
Taylor expanded in n around 0
lower-*.f6446.6
Applied rewrites46.6%
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 50.2%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6435.5
Applied rewrites35.5%
rem-square-sqrtN/A
sqrt-unprodN/A
lower-sqrt.f64N/A
lower-*.f6428.0
Applied rewrites27.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6426.7
Applied rewrites26.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6428.0
Applied rewrites28.0%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* (* (+ U U) t) n))
(t_2
(*
(* (* 2.0 n) U)
(-
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U U*))))))
(if (<= t_2 0.0)
(* (* t (sqrt (/ (* U n) t))) (sqrt 2.0))
(if (<= t_2 INFINITY)
(sqrt (* (fma (/ l Om) (* -2.0 l) t) (* U (+ n n))))
(sqrt (sqrt (* t_1 t_1)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = ((U + U) * t) * n;
double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)));
double tmp;
if (t_2 <= 0.0) {
tmp = (t * sqrt(((U * n) / t))) * sqrt(2.0);
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt((fma((l / Om), (-2.0 * l), t) * (U * (n + n))));
} else {
tmp = sqrt(sqrt((t_1 * t_1)));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(Float64(U + U) * t) * n) t_2 = 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_)))) tmp = 0.0 if (t_2 <= 0.0) tmp = Float64(Float64(t * sqrt(Float64(Float64(U * n) / t))) * sqrt(2.0)); elseif (t_2 <= Inf) tmp = sqrt(Float64(fma(Float64(l / Om), Float64(-2.0 * l), t) * Float64(U * Float64(n + n)))); else tmp = sqrt(sqrt(Float64(t_1 * t_1))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(N[(U + U), $MachinePrecision] * t), $MachinePrecision] * n), $MachinePrecision]}, Block[{t$95$2 = 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]}, If[LessEqual[t$95$2, 0.0], N[(N[(t * N[Sqrt[N[(N[(U * n), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(N[(l / Om), $MachinePrecision] * N[(-2.0 * l), $MachinePrecision] + t), $MachinePrecision] * N[(U * N[(n + n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[Sqrt[N[(t$95$1 * t$95$1), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(U + U\right) \cdot t\right) \cdot n\\
t_2 := \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)\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;\left(t \cdot \sqrt{\frac{U \cdot n}{t}}\right) \cdot \sqrt{2}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{\ell}{Om}, -2 \cdot \ell, t\right) \cdot \left(U \cdot \left(n + n\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\sqrt{t\_1 \cdot t\_1}}\\
\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 50.2%
lift-*.f64N/A
count-2-revN/A
lift-/.f64N/A
mult-flipN/A
lift-/.f64N/A
mult-flipN/A
distribute-lft-outN/A
lift-*.f64N/A
sqr-neg-revN/A
associate-*l*N/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lower-neg.f64N/A
div-add-revN/A
metadata-evalN/A
lower-/.f6453.6
Applied rewrites53.6%
Applied rewrites45.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-*.f6418.6
Applied rewrites18.6%
if 0.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < +inf.0Initial program 50.2%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
distribute-rgt-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites52.2%
Applied rewrites55.8%
Taylor expanded in n around 0
lower-*.f6446.6
Applied rewrites46.6%
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 50.2%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6435.5
Applied rewrites35.5%
rem-square-sqrtN/A
sqrt-unprodN/A
lower-sqrt.f64N/A
lower-*.f6428.0
Applied rewrites27.7%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1
(*
(* (* 2.0 n) U)
(-
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U U*))))))
(if (<= t_1 0.0)
(* (* t (sqrt (/ (* U n) t))) (sqrt 2.0))
(if (<= t_1 INFINITY)
(sqrt (* (fma (/ l Om) (* -2.0 l) t) (* U (+ n n))))
(sqrt (fabs (* (* (+ U U) t) n)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)));
double tmp;
if (t_1 <= 0.0) {
tmp = (t * sqrt(((U * n) / t))) * sqrt(2.0);
} else if (t_1 <= ((double) INFINITY)) {
tmp = sqrt((fma((l / Om), (-2.0 * l), t) * (U * (n + n))));
} else {
tmp = sqrt(fabs((((U + U) * t) * n)));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = 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_)))) tmp = 0.0 if (t_1 <= 0.0) tmp = Float64(Float64(t * sqrt(Float64(Float64(U * n) / t))) * sqrt(2.0)); elseif (t_1 <= Inf) tmp = sqrt(Float64(fma(Float64(l / Om), Float64(-2.0 * l), t) * Float64(U * Float64(n + n)))); else tmp = sqrt(abs(Float64(Float64(Float64(U + U) * t) * n))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, 0.0], N[(N[(t * N[Sqrt[N[(N[(U * n), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[Sqrt[N[(N[(N[(l / Om), $MachinePrecision] * N[(-2.0 * l), $MachinePrecision] + t), $MachinePrecision] * N[(U * N[(n + n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[Abs[N[(N[(N[(U + U), $MachinePrecision] * t), $MachinePrecision] * n), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \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)\\
\mathbf{if}\;t\_1 \leq 0:\\
\;\;\;\;\left(t \cdot \sqrt{\frac{U \cdot n}{t}}\right) \cdot \sqrt{2}\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{\ell}{Om}, -2 \cdot \ell, t\right) \cdot \left(U \cdot \left(n + n\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left|\left(\left(U + U\right) \cdot 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*)))) < 0.0Initial program 50.2%
lift-*.f64N/A
count-2-revN/A
lift-/.f64N/A
mult-flipN/A
lift-/.f64N/A
mult-flipN/A
distribute-lft-outN/A
lift-*.f64N/A
sqr-neg-revN/A
associate-*l*N/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lower-neg.f64N/A
div-add-revN/A
metadata-evalN/A
lower-/.f6453.6
Applied rewrites53.6%
Applied rewrites45.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-*.f6418.6
Applied rewrites18.6%
if 0.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < +inf.0Initial program 50.2%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
distribute-rgt-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites52.2%
Applied rewrites55.8%
Taylor expanded in n around 0
lower-*.f6446.6
Applied rewrites46.6%
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 50.2%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6435.5
Applied rewrites35.5%
rem-square-sqrtN/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
sqr-abs-revN/A
Applied rewrites37.1%
(FPCore (n U t l Om U*) :precision binary64 (if (<= U 5.2e+76) (sqrt (fabs (* (* (+ U U) t) n))) (* (sqrt (* 2.0 (* n t))) (sqrt U))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U <= 5.2e+76) {
tmp = sqrt(fabs((((U + U) * t) * n)));
} else {
tmp = sqrt((2.0 * (n * t))) * sqrt(U);
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(n, u, t, l, om, u_42)
use fmin_fmax_functions
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (u <= 5.2d+76) then
tmp = sqrt(abs((((u + u) * t) * n)))
else
tmp = sqrt((2.0d0 * (n * t))) * sqrt(u)
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U <= 5.2e+76) {
tmp = Math.sqrt(Math.abs((((U + U) * t) * n)));
} else {
tmp = Math.sqrt((2.0 * (n * t))) * Math.sqrt(U);
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if U <= 5.2e+76: tmp = math.sqrt(math.fabs((((U + U) * t) * n))) else: tmp = math.sqrt((2.0 * (n * t))) * math.sqrt(U) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U <= 5.2e+76) tmp = sqrt(abs(Float64(Float64(Float64(U + U) * t) * n))); else tmp = Float64(sqrt(Float64(2.0 * Float64(n * t))) * sqrt(U)); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U <= 5.2e+76) tmp = sqrt(abs((((U + U) * t) * n))); else tmp = sqrt((2.0 * (n * t))) * sqrt(U); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U, 5.2e+76], N[Sqrt[N[Abs[N[(N[(N[(U + U), $MachinePrecision] * t), $MachinePrecision] * n), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(2.0 * N[(n * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[U], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;U \leq 5.2 \cdot 10^{+76}:\\
\;\;\;\;\sqrt{\left|\left(\left(U + U\right) \cdot t\right) \cdot n\right|}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot t\right)} \cdot \sqrt{U}\\
\end{array}
\end{array}
if U < 5.1999999999999999e76Initial program 50.2%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6435.5
Applied rewrites35.5%
rem-square-sqrtN/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
sqr-abs-revN/A
Applied rewrites37.1%
if 5.1999999999999999e76 < U Initial program 50.2%
lift-sqrt.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
sqrt-prodN/A
lower-unsound-*.f64N/A
Applied rewrites24.9%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f6421.0
Applied rewrites21.0%
(FPCore (n U t l Om U*) :precision binary64 (if (<= t 9e-306) (sqrt (fabs (* (* (+ U U) t) n))) (* (sqrt t) (sqrt (* U (+ n n))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (t <= 9e-306) {
tmp = sqrt(fabs((((U + U) * t) * n)));
} else {
tmp = sqrt(t) * sqrt((U * (n + n)));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(n, u, t, l, om, u_42)
use fmin_fmax_functions
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (t <= 9d-306) then
tmp = sqrt(abs((((u + u) * t) * n)))
else
tmp = sqrt(t) * sqrt((u * (n + n)))
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (t <= 9e-306) {
tmp = Math.sqrt(Math.abs((((U + U) * t) * n)));
} else {
tmp = Math.sqrt(t) * Math.sqrt((U * (n + n)));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if t <= 9e-306: tmp = math.sqrt(math.fabs((((U + U) * t) * n))) else: tmp = math.sqrt(t) * math.sqrt((U * (n + n))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (t <= 9e-306) tmp = sqrt(abs(Float64(Float64(Float64(U + U) * t) * n))); else tmp = Float64(sqrt(t) * sqrt(Float64(U * Float64(n + n)))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (t <= 9e-306) tmp = sqrt(abs((((U + U) * t) * n))); else tmp = sqrt(t) * sqrt((U * (n + n))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[t, 9e-306], N[Sqrt[N[Abs[N[(N[(N[(U + U), $MachinePrecision] * t), $MachinePrecision] * n), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[t], $MachinePrecision] * N[Sqrt[N[(U * N[(n + n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 9 \cdot 10^{-306}:\\
\;\;\;\;\sqrt{\left|\left(\left(U + U\right) \cdot t\right) \cdot n\right|}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t} \cdot \sqrt{U \cdot \left(n + n\right)}\\
\end{array}
\end{array}
if t < 9.00000000000000009e-306Initial program 50.2%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6435.5
Applied rewrites35.5%
rem-square-sqrtN/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
sqr-abs-revN/A
Applied rewrites37.1%
if 9.00000000000000009e-306 < t Initial program 50.2%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
distribute-rgt-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites52.2%
Applied rewrites31.8%
Taylor expanded in l around 0
lower-sqrt.f6421.1
Applied rewrites21.1%
(FPCore (n U t l Om U*) :precision binary64 (sqrt (fabs (* (* (+ U U) t) n))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt(fabs((((U + U) * t) * n)));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(n, u, t, l, om, u_42)
use fmin_fmax_functions
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(abs((((u + u) * t) * n)))
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt(Math.abs((((U + U) * t) * n)));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt(math.fabs((((U + U) * t) * n)))
function code(n, U, t, l, Om, U_42_) return sqrt(abs(Float64(Float64(Float64(U + U) * t) * n))) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt(abs((((U + U) * t) * n))); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[Abs[N[(N[(N[(U + U), $MachinePrecision] * t), $MachinePrecision] * n), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left|\left(\left(U + U\right) \cdot t\right) \cdot n\right|}
\end{array}
Initial program 50.2%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6435.5
Applied rewrites35.5%
rem-square-sqrtN/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
sqr-abs-revN/A
Applied rewrites37.1%
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* (+ U U) n) t)))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((((U + U) * n) * t));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(n, u, t, l, om, u_42)
use fmin_fmax_functions
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 + 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((((U + U) * n) * t));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt((((U + U) * n) * t))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(Float64(U + U) * n) * t)) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((((U + U) * n) * t)); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(U + U), $MachinePrecision] * n), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left(\left(U + U\right) \cdot n\right) \cdot t}
\end{array}
Initial program 50.2%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6435.5
Applied rewrites35.5%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
lower-*.f6435.5
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
count-2-revN/A
distribute-rgt-inN/A
count-2-revN/A
associate-*r*N/A
*-commutativeN/A
count-2-revN/A
lower-*.f64N/A
lower-+.f6435.5
Applied rewrites35.5%
herbie shell --seed 2025155
(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*))))))