
(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}
Sampling outcomes in binary64 precision:
Herbie found 28 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 (* (/ l Om) l) -2.0 t))
(t_2 (* (* 2.0 n) U))
(t_3 (pow (/ l Om) 2.0))
(t_4 (* t_2 (- (- t (* 2.0 (/ (* l l) Om))) (* (* n t_3) (- U U*))))))
(if (<= t_4 4e-320)
(* (sqrt (* (- t_1 (* (* t_3 n) (- U U*))) (* 2.0 n))) (sqrt U))
(if (<= t_4 4e+268)
(sqrt t_4)
(if (<= t_4 INFINITY)
(sqrt (* t_2 (fma (* (* (- n) (- U U*)) (/ l Om)) (/ l Om) t_1)))
(sqrt
(*
-2.0
(fma
(* (* (/ (fma (/ n Om) (- U U*) 2.0) Om) n) l)
(* U l)
(* (- n) (* U t))))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = fma(((l / Om) * l), -2.0, t);
double t_2 = (2.0 * n) * U;
double t_3 = pow((l / Om), 2.0);
double t_4 = t_2 * ((t - (2.0 * ((l * l) / Om))) - ((n * t_3) * (U - U_42_)));
double tmp;
if (t_4 <= 4e-320) {
tmp = sqrt(((t_1 - ((t_3 * n) * (U - U_42_))) * (2.0 * n))) * sqrt(U);
} else if (t_4 <= 4e+268) {
tmp = sqrt(t_4);
} else if (t_4 <= ((double) INFINITY)) {
tmp = sqrt((t_2 * fma(((-n * (U - U_42_)) * (l / Om)), (l / Om), t_1)));
} else {
tmp = sqrt((-2.0 * fma((((fma((n / Om), (U - U_42_), 2.0) / Om) * n) * l), (U * l), (-n * (U * t)))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = fma(Float64(Float64(l / Om) * l), -2.0, t) t_2 = Float64(Float64(2.0 * n) * U) t_3 = Float64(l / Om) ^ 2.0 t_4 = Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) - Float64(Float64(n * t_3) * Float64(U - U_42_)))) tmp = 0.0 if (t_4 <= 4e-320) tmp = Float64(sqrt(Float64(Float64(t_1 - Float64(Float64(t_3 * n) * Float64(U - U_42_))) * Float64(2.0 * n))) * sqrt(U)); elseif (t_4 <= 4e+268) tmp = sqrt(t_4); elseif (t_4 <= Inf) tmp = sqrt(Float64(t_2 * fma(Float64(Float64(Float64(-n) * Float64(U - U_42_)) * Float64(l / Om)), Float64(l / Om), t_1))); else tmp = sqrt(Float64(-2.0 * fma(Float64(Float64(Float64(fma(Float64(n / Om), Float64(U - U_42_), 2.0) / Om) * n) * l), Float64(U * l), Float64(Float64(-n) * Float64(U * t))))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(N[(l / Om), $MachinePrecision] * l), $MachinePrecision] * -2.0 + t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$4 = N[(t$95$2 * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * t$95$3), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, 4e-320], N[(N[Sqrt[N[(N[(t$95$1 - N[(N[(t$95$3 * n), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[U], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 4e+268], N[Sqrt[t$95$4], $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[Sqrt[N[(t$95$2 * N[(N[(N[((-n) * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] * N[(l / Om), $MachinePrecision]), $MachinePrecision] * N[(l / Om), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(N[(N[(N[(N[(N[(n / Om), $MachinePrecision] * N[(U - U$42$), $MachinePrecision] + 2.0), $MachinePrecision] / Om), $MachinePrecision] * n), $MachinePrecision] * l), $MachinePrecision] * N[(U * l), $MachinePrecision] + N[((-n) * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{\ell}{Om} \cdot \ell, -2, t\right)\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := {\left(\frac{\ell}{Om}\right)}^{2}\\
t_4 := t\_2 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot t\_3\right) \cdot \left(U - U*\right)\right)\\
\mathbf{if}\;t\_4 \leq 4 \cdot 10^{-320}:\\
\;\;\;\;\sqrt{\left(t\_1 - \left(t\_3 \cdot n\right) \cdot \left(U - U*\right)\right) \cdot \left(2 \cdot n\right)} \cdot \sqrt{U}\\
\mathbf{elif}\;t\_4 \leq 4 \cdot 10^{+268}:\\
\;\;\;\;\sqrt{t\_4}\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(\left(\left(-n\right) \cdot \left(U - U*\right)\right) \cdot \frac{\ell}{Om}, \frac{\ell}{Om}, t\_1\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \mathsf{fma}\left(\left(\frac{\mathsf{fma}\left(\frac{n}{Om}, U - U*, 2\right)}{Om} \cdot n\right) \cdot \ell, U \cdot \ell, \left(-n\right) \cdot \left(U \cdot t\right)\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*)))) < 3.99996e-320Initial program 12.4%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6414.5
lift-*.f64N/A
Applied rewrites14.5%
Applied rewrites44.4%
if 3.99996e-320 < (*.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.9999999999999999e268Initial program 99.1%
if 3.9999999999999999e268 < (*.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 34.0%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6445.5
lift-*.f64N/A
Applied rewrites44.9%
Applied rewrites46.0%
if +inf.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) Initial program 0.0%
Taylor expanded in l around 0
fp-cancel-sign-sub-invN/A
metadata-evalN/A
distribute-lft-out--N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites32.5%
Applied rewrites55.4%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* (* (- n) (- U U*)) (/ l Om)))
(t_2 (* (* 2.0 n) U))
(t_3
(*
t_2
(-
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U U*))))))
(if (<= t_3 4e-290)
(sqrt (* (* (fma t_1 (/ l Om) (fma (* -2.0 (/ l Om)) l t)) (* 2.0 n)) U))
(if (<= t_3 4e+268)
(sqrt t_3)
(if (<= t_3 INFINITY)
(sqrt (* t_2 (fma t_1 (/ l Om) (fma (* (/ l Om) l) -2.0 t))))
(sqrt
(*
-2.0
(fma
(* (* (/ (fma (/ n Om) (- U U*) 2.0) Om) n) l)
(* U l)
(* (- n) (* U t))))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (-n * (U - U_42_)) * (l / Om);
double t_2 = (2.0 * n) * U;
double t_3 = t_2 * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)));
double tmp;
if (t_3 <= 4e-290) {
tmp = sqrt(((fma(t_1, (l / Om), fma((-2.0 * (l / Om)), l, t)) * (2.0 * n)) * U));
} else if (t_3 <= 4e+268) {
tmp = sqrt(t_3);
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((t_2 * fma(t_1, (l / Om), fma(((l / Om) * l), -2.0, t))));
} else {
tmp = sqrt((-2.0 * fma((((fma((n / Om), (U - U_42_), 2.0) / Om) * n) * l), (U * l), (-n * (U * t)))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(Float64(-n) * Float64(U - U_42_)) * Float64(l / Om)) t_2 = Float64(Float64(2.0 * n) * U) t_3 = Float64(t_2 * 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_3 <= 4e-290) tmp = sqrt(Float64(Float64(fma(t_1, Float64(l / Om), fma(Float64(-2.0 * Float64(l / Om)), l, t)) * Float64(2.0 * n)) * U)); elseif (t_3 <= 4e+268) tmp = sqrt(t_3); elseif (t_3 <= Inf) tmp = sqrt(Float64(t_2 * fma(t_1, Float64(l / Om), fma(Float64(Float64(l / Om) * l), -2.0, t)))); else tmp = sqrt(Float64(-2.0 * fma(Float64(Float64(Float64(fma(Float64(n / Om), Float64(U - U_42_), 2.0) / Om) * n) * l), Float64(U * l), Float64(Float64(-n) * Float64(U * t))))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[((-n) * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] * N[(l / Om), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[(N[(t - N[(2.0 * 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$3, 4e-290], N[Sqrt[N[(N[(N[(t$95$1 * N[(l / Om), $MachinePrecision] + N[(N[(-2.0 * N[(l / Om), $MachinePrecision]), $MachinePrecision] * l + t), $MachinePrecision]), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, 4e+268], N[Sqrt[t$95$3], $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$2 * N[(t$95$1 * N[(l / Om), $MachinePrecision] + N[(N[(N[(l / Om), $MachinePrecision] * l), $MachinePrecision] * -2.0 + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(N[(N[(N[(N[(N[(n / Om), $MachinePrecision] * N[(U - U$42$), $MachinePrecision] + 2.0), $MachinePrecision] / Om), $MachinePrecision] * n), $MachinePrecision] * l), $MachinePrecision] * N[(U * l), $MachinePrecision] + N[((-n) * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(-n\right) \cdot \left(U - U*\right)\right) \cdot \frac{\ell}{Om}\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := t\_2 \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\_3 \leq 4 \cdot 10^{-290}:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(t\_1, \frac{\ell}{Om}, \mathsf{fma}\left(-2 \cdot \frac{\ell}{Om}, \ell, t\right)\right) \cdot \left(2 \cdot n\right)\right) \cdot U}\\
\mathbf{elif}\;t\_3 \leq 4 \cdot 10^{+268}:\\
\;\;\;\;\sqrt{t\_3}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(t\_1, \frac{\ell}{Om}, \mathsf{fma}\left(\frac{\ell}{Om} \cdot \ell, -2, t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \mathsf{fma}\left(\left(\frac{\mathsf{fma}\left(\frac{n}{Om}, U - U*, 2\right)}{Om} \cdot n\right) \cdot \ell, U \cdot \ell, \left(-n\right) \cdot \left(U \cdot t\right)\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*)))) < 4.0000000000000003e-290Initial program 14.9%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6417.0
lift-*.f64N/A
Applied rewrites17.0%
Applied rewrites42.2%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
lift-*.f64N/A
associate-*l*N/A
lift--.f64N/A
*-commutativeN/A
distribute-lft-neg-outN/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites42.2%
if 4.0000000000000003e-290 < (*.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.9999999999999999e268Initial program 99.7%
if 3.9999999999999999e268 < (*.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 34.0%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6445.5
lift-*.f64N/A
Applied rewrites44.9%
Applied rewrites46.0%
if +inf.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) Initial program 0.0%
Taylor expanded in l around 0
fp-cancel-sign-sub-invN/A
metadata-evalN/A
distribute-lft-out--N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites32.5%
Applied rewrites55.4%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* (* (- n) (- U U*)) (/ l Om)))
(t_2 (* (* 2.0 n) U))
(t_3 (- t (* 2.0 (/ (* l l) Om))))
(t_4 (* t_2 (- t_3 (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
(if (<= t_4 4e-290)
(sqrt (* (* (fma t_1 (/ l Om) (fma (* -2.0 (/ l Om)) l t)) (* 2.0 n)) U))
(if (<= t_4 4e+268)
(sqrt (* t_2 (- t_3 (* (* (- U U*) (/ l Om)) (* (/ l Om) n)))))
(if (<= t_4 INFINITY)
(sqrt (* t_2 (fma t_1 (/ l Om) (fma (* (/ l Om) l) -2.0 t))))
(sqrt
(*
-2.0
(fma
(* (* (/ (fma (/ n Om) (- U U*) 2.0) Om) n) l)
(* U l)
(* (- n) (* U t))))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (-n * (U - U_42_)) * (l / Om);
double t_2 = (2.0 * n) * U;
double t_3 = t - (2.0 * ((l * l) / Om));
double t_4 = t_2 * (t_3 - ((n * pow((l / Om), 2.0)) * (U - U_42_)));
double tmp;
if (t_4 <= 4e-290) {
tmp = sqrt(((fma(t_1, (l / Om), fma((-2.0 * (l / Om)), l, t)) * (2.0 * n)) * U));
} else if (t_4 <= 4e+268) {
tmp = sqrt((t_2 * (t_3 - (((U - U_42_) * (l / Om)) * ((l / Om) * n)))));
} else if (t_4 <= ((double) INFINITY)) {
tmp = sqrt((t_2 * fma(t_1, (l / Om), fma(((l / Om) * l), -2.0, t))));
} else {
tmp = sqrt((-2.0 * fma((((fma((n / Om), (U - U_42_), 2.0) / Om) * n) * l), (U * l), (-n * (U * t)))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(Float64(-n) * Float64(U - U_42_)) * Float64(l / Om)) t_2 = Float64(Float64(2.0 * n) * U) t_3 = Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) t_4 = Float64(t_2 * Float64(t_3 - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_)))) tmp = 0.0 if (t_4 <= 4e-290) tmp = sqrt(Float64(Float64(fma(t_1, Float64(l / Om), fma(Float64(-2.0 * Float64(l / Om)), l, t)) * Float64(2.0 * n)) * U)); elseif (t_4 <= 4e+268) tmp = sqrt(Float64(t_2 * Float64(t_3 - Float64(Float64(Float64(U - U_42_) * Float64(l / Om)) * Float64(Float64(l / Om) * n))))); elseif (t_4 <= Inf) tmp = sqrt(Float64(t_2 * fma(t_1, Float64(l / Om), fma(Float64(Float64(l / Om) * l), -2.0, t)))); else tmp = sqrt(Float64(-2.0 * fma(Float64(Float64(Float64(fma(Float64(n / Om), Float64(U - U_42_), 2.0) / Om) * n) * l), Float64(U * l), Float64(Float64(-n) * Float64(U * t))))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[((-n) * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] * N[(l / Om), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$2 * N[(t$95$3 - 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$4, 4e-290], N[Sqrt[N[(N[(N[(t$95$1 * N[(l / Om), $MachinePrecision] + N[(N[(-2.0 * N[(l / Om), $MachinePrecision]), $MachinePrecision] * l + t), $MachinePrecision]), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$4, 4e+268], N[Sqrt[N[(t$95$2 * N[(t$95$3 - N[(N[(N[(U - U$42$), $MachinePrecision] * N[(l / Om), $MachinePrecision]), $MachinePrecision] * N[(N[(l / Om), $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[Sqrt[N[(t$95$2 * N[(t$95$1 * N[(l / Om), $MachinePrecision] + N[(N[(N[(l / Om), $MachinePrecision] * l), $MachinePrecision] * -2.0 + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(N[(N[(N[(N[(N[(n / Om), $MachinePrecision] * N[(U - U$42$), $MachinePrecision] + 2.0), $MachinePrecision] / Om), $MachinePrecision] * n), $MachinePrecision] * l), $MachinePrecision] * N[(U * l), $MachinePrecision] + N[((-n) * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(-n\right) \cdot \left(U - U*\right)\right) \cdot \frac{\ell}{Om}\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := t - 2 \cdot \frac{\ell \cdot \ell}{Om}\\
t_4 := t\_2 \cdot \left(t\_3 - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\
\mathbf{if}\;t\_4 \leq 4 \cdot 10^{-290}:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(t\_1, \frac{\ell}{Om}, \mathsf{fma}\left(-2 \cdot \frac{\ell}{Om}, \ell, t\right)\right) \cdot \left(2 \cdot n\right)\right) \cdot U}\\
\mathbf{elif}\;t\_4 \leq 4 \cdot 10^{+268}:\\
\;\;\;\;\sqrt{t\_2 \cdot \left(t\_3 - \left(\left(U - U*\right) \cdot \frac{\ell}{Om}\right) \cdot \left(\frac{\ell}{Om} \cdot n\right)\right)}\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(t\_1, \frac{\ell}{Om}, \mathsf{fma}\left(\frac{\ell}{Om} \cdot \ell, -2, t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \mathsf{fma}\left(\left(\frac{\mathsf{fma}\left(\frac{n}{Om}, U - U*, 2\right)}{Om} \cdot n\right) \cdot \ell, U \cdot \ell, \left(-n\right) \cdot \left(U \cdot t\right)\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*)))) < 4.0000000000000003e-290Initial program 14.9%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6417.0
lift-*.f64N/A
Applied rewrites17.0%
Applied rewrites42.2%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
lift-*.f64N/A
associate-*l*N/A
lift--.f64N/A
*-commutativeN/A
distribute-lft-neg-outN/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites42.2%
if 4.0000000000000003e-290 < (*.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.9999999999999999e268Initial program 99.7%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6498.4
Applied rewrites98.4%
if 3.9999999999999999e268 < (*.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 34.0%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6445.5
lift-*.f64N/A
Applied rewrites44.9%
Applied rewrites46.0%
if +inf.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) Initial program 0.0%
Taylor expanded in l around 0
fp-cancel-sign-sub-invN/A
metadata-evalN/A
distribute-lft-out--N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites32.5%
Applied rewrites55.4%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (/ (* l l) Om))
(t_2 (* (* 2.0 n) U))
(t_3
(* t_2 (- (- t (* 2.0 t_1)) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
(if (<= t_3 4e-320)
(* (sqrt (* (* 2.0 n) t)) (sqrt U))
(if (<= t_3 1e+297)
(sqrt (* t_2 (fma -2.0 t_1 t)))
(if (<= t_3 INFINITY)
(* (* (/ (- l) Om) (sqrt (* U (- U* U)))) (* n (sqrt 2.0)))
(* (* (sqrt 2.0) n) (* (/ (sqrt (* (- U* U) U)) Om) l)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (l * l) / Om;
double t_2 = (2.0 * n) * U;
double t_3 = t_2 * ((t - (2.0 * t_1)) - ((n * pow((l / Om), 2.0)) * (U - U_42_)));
double tmp;
if (t_3 <= 4e-320) {
tmp = sqrt(((2.0 * n) * t)) * sqrt(U);
} else if (t_3 <= 1e+297) {
tmp = sqrt((t_2 * fma(-2.0, t_1, t)));
} else if (t_3 <= ((double) INFINITY)) {
tmp = ((-l / Om) * sqrt((U * (U_42_ - U)))) * (n * sqrt(2.0));
} else {
tmp = (sqrt(2.0) * n) * ((sqrt(((U_42_ - U) * U)) / Om) * l);
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(l * l) / Om) t_2 = Float64(Float64(2.0 * n) * U) t_3 = Float64(t_2 * Float64(Float64(t - Float64(2.0 * t_1)) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_)))) tmp = 0.0 if (t_3 <= 4e-320) tmp = Float64(sqrt(Float64(Float64(2.0 * n) * t)) * sqrt(U)); elseif (t_3 <= 1e+297) tmp = sqrt(Float64(t_2 * fma(-2.0, t_1, t))); elseif (t_3 <= Inf) tmp = Float64(Float64(Float64(Float64(-l) / Om) * sqrt(Float64(U * Float64(U_42_ - U)))) * Float64(n * sqrt(2.0))); else tmp = Float64(Float64(sqrt(2.0) * n) * Float64(Float64(sqrt(Float64(Float64(U_42_ - U) * U)) / Om) * l)); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[(N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 4e-320], N[(N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision] * N[Sqrt[U], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 1e+297], N[Sqrt[N[(t$95$2 * N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[(N[(N[((-l) / Om), $MachinePrecision] * N[Sqrt[N[(U * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(n * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] * n), $MachinePrecision] * N[(N[(N[Sqrt[N[(N[(U$42$ - U), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision] / Om), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell \cdot \ell}{Om}\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := t\_2 \cdot \left(\left(t - 2 \cdot t\_1\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\
\mathbf{if}\;t\_3 \leq 4 \cdot 10^{-320}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot t} \cdot \sqrt{U}\\
\mathbf{elif}\;t\_3 \leq 10^{+297}:\\
\;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, t\_1, t\right)}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\left(\frac{-\ell}{Om} \cdot \sqrt{U \cdot \left(U* - U\right)}\right) \cdot \left(n \cdot \sqrt{2}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\sqrt{2} \cdot n\right) \cdot \left(\frac{\sqrt{\left(U* - U\right) \cdot U}}{Om} \cdot \ell\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*)))) < 3.99996e-320Initial program 12.4%
Applied rewrites31.4%
Taylor expanded in n around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f6438.5
Applied rewrites38.5%
if 3.99996e-320 < (*.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*)))) < 1e297Initial program 99.1%
Taylor expanded in n around 0
metadata-evalN/A
fp-cancel-sign-sub-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6487.4
Applied rewrites87.4%
if 1e297 < (*.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 31.7%
Applied rewrites24.4%
Taylor expanded in n around inf
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower--.f64N/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-sqrt.f6422.4
Applied rewrites22.4%
Taylor expanded in l around inf
Applied rewrites12.5%
Taylor expanded in Om around -inf
Applied rewrites21.5%
if +inf.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) Initial program 0.0%
Applied rewrites18.8%
Taylor expanded in n around inf
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower--.f64N/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-sqrt.f6413.2
Applied rewrites13.2%
Taylor expanded in l around inf
Applied rewrites6.8%
Applied rewrites30.0%
Final simplification48.0%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* (* 2.0 n) U))
(t_2
(sqrt
(*
t_1
(-
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U U*)))))))
(if (<= t_2 5e-145)
(sqrt
(*
(fma
(* (* l l) U)
(* (fma (- U U*) (/ n Om) 2.0) (/ n Om))
(* (* (- n) t) U))
-2.0))
(if (<= t_2 INFINITY)
(sqrt
(*
t_1
(fma
(* (* (- n) (- U U*)) (/ l Om))
(/ l Om)
(fma (* (/ l Om) l) -2.0 t))))
(sqrt
(*
-2.0
(fma
(* (* (/ (fma (/ n Om) (- U U*) 2.0) Om) n) l)
(* U l)
(* (- n) (* U t)))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (2.0 * n) * U;
double t_2 = sqrt((t_1 * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
double tmp;
if (t_2 <= 5e-145) {
tmp = sqrt((fma(((l * l) * U), (fma((U - U_42_), (n / Om), 2.0) * (n / Om)), ((-n * t) * U)) * -2.0));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt((t_1 * fma(((-n * (U - U_42_)) * (l / Om)), (l / Om), fma(((l / Om) * l), -2.0, t))));
} else {
tmp = sqrt((-2.0 * fma((((fma((n / Om), (U - U_42_), 2.0) / Om) * n) * l), (U * l), (-n * (U * t)))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(2.0 * n) * U) t_2 = sqrt(Float64(t_1 * 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 <= 5e-145) tmp = sqrt(Float64(fma(Float64(Float64(l * l) * U), Float64(fma(Float64(U - U_42_), Float64(n / Om), 2.0) * Float64(n / Om)), Float64(Float64(Float64(-n) * t) * U)) * -2.0)); elseif (t_2 <= Inf) tmp = sqrt(Float64(t_1 * fma(Float64(Float64(Float64(-n) * Float64(U - U_42_)) * Float64(l / Om)), Float64(l / Om), fma(Float64(Float64(l / Om) * l), -2.0, t)))); else tmp = sqrt(Float64(-2.0 * fma(Float64(Float64(Float64(fma(Float64(n / Om), Float64(U - U_42_), 2.0) / Om) * n) * l), Float64(U * l), Float64(Float64(-n) * Float64(U * t))))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(t$95$1 * 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]}, If[LessEqual[t$95$2, 5e-145], N[Sqrt[N[(N[(N[(N[(l * l), $MachinePrecision] * U), $MachinePrecision] * N[(N[(N[(U - U$42$), $MachinePrecision] * N[(n / Om), $MachinePrecision] + 2.0), $MachinePrecision] * N[(n / Om), $MachinePrecision]), $MachinePrecision] + N[(N[((-n) * t), $MachinePrecision] * U), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(t$95$1 * N[(N[(N[((-n) * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] * N[(l / Om), $MachinePrecision]), $MachinePrecision] * N[(l / Om), $MachinePrecision] + N[(N[(N[(l / Om), $MachinePrecision] * l), $MachinePrecision] * -2.0 + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(N[(N[(N[(N[(N[(n / Om), $MachinePrecision] * N[(U - U$42$), $MachinePrecision] + 2.0), $MachinePrecision] / Om), $MachinePrecision] * n), $MachinePrecision] * l), $MachinePrecision] * N[(U * l), $MachinePrecision] + N[((-n) * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(2 \cdot n\right) \cdot U\\
t_2 := \sqrt{t\_1 \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 5 \cdot 10^{-145}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\left(\ell \cdot \ell\right) \cdot U, \mathsf{fma}\left(U - U*, \frac{n}{Om}, 2\right) \cdot \frac{n}{Om}, \left(\left(-n\right) \cdot t\right) \cdot U\right) \cdot -2}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{t\_1 \cdot \mathsf{fma}\left(\left(\left(-n\right) \cdot \left(U - U*\right)\right) \cdot \frac{\ell}{Om}, \frac{\ell}{Om}, \mathsf{fma}\left(\frac{\ell}{Om} \cdot \ell, -2, t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \mathsf{fma}\left(\left(\frac{\mathsf{fma}\left(\frac{n}{Om}, U - U*, 2\right)}{Om} \cdot n\right) \cdot \ell, U \cdot \ell, \left(-n\right) \cdot \left(U \cdot t\right)\right)}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 4.9999999999999998e-145Initial program 17.6%
Taylor expanded in l around 0
fp-cancel-sign-sub-invN/A
metadata-evalN/A
distribute-lft-out--N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites43.8%
Applied rewrites42.0%
Applied rewrites43.9%
if 4.9999999999999998e-145 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < +inf.0Initial program 64.9%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6471.0
lift-*.f64N/A
Applied rewrites66.6%
Applied rewrites67.2%
if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) Initial program 0.0%
Taylor expanded in l around 0
fp-cancel-sign-sub-invN/A
metadata-evalN/A
distribute-lft-out--N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites30.0%
Applied rewrites51.2%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* (* (- n) (- U U*)) (/ l Om)))
(t_2 (* (* 2.0 n) U))
(t_3
(*
t_2
(-
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U U*))))))
(if (<= t_3 4e-290)
(sqrt (* (* (fma t_1 (/ l Om) (fma (* -2.0 (/ l Om)) l t)) (* 2.0 n)) U))
(if (<= t_3 INFINITY)
(sqrt (* t_2 (fma t_1 (/ l Om) (fma (* (/ l Om) l) -2.0 t))))
(sqrt
(*
-2.0
(fma
(* (* (/ (fma (/ n Om) (- U U*) 2.0) Om) n) l)
(* U l)
(* (- n) (* U t)))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (-n * (U - U_42_)) * (l / Om);
double t_2 = (2.0 * n) * U;
double t_3 = t_2 * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)));
double tmp;
if (t_3 <= 4e-290) {
tmp = sqrt(((fma(t_1, (l / Om), fma((-2.0 * (l / Om)), l, t)) * (2.0 * n)) * U));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((t_2 * fma(t_1, (l / Om), fma(((l / Om) * l), -2.0, t))));
} else {
tmp = sqrt((-2.0 * fma((((fma((n / Om), (U - U_42_), 2.0) / Om) * n) * l), (U * l), (-n * (U * t)))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(Float64(-n) * Float64(U - U_42_)) * Float64(l / Om)) t_2 = Float64(Float64(2.0 * n) * U) t_3 = Float64(t_2 * 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_3 <= 4e-290) tmp = sqrt(Float64(Float64(fma(t_1, Float64(l / Om), fma(Float64(-2.0 * Float64(l / Om)), l, t)) * Float64(2.0 * n)) * U)); elseif (t_3 <= Inf) tmp = sqrt(Float64(t_2 * fma(t_1, Float64(l / Om), fma(Float64(Float64(l / Om) * l), -2.0, t)))); else tmp = sqrt(Float64(-2.0 * fma(Float64(Float64(Float64(fma(Float64(n / Om), Float64(U - U_42_), 2.0) / Om) * n) * l), Float64(U * l), Float64(Float64(-n) * Float64(U * t))))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[((-n) * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] * N[(l / Om), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[(N[(t - N[(2.0 * 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$3, 4e-290], N[Sqrt[N[(N[(N[(t$95$1 * N[(l / Om), $MachinePrecision] + N[(N[(-2.0 * N[(l / Om), $MachinePrecision]), $MachinePrecision] * l + t), $MachinePrecision]), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$2 * N[(t$95$1 * N[(l / Om), $MachinePrecision] + N[(N[(N[(l / Om), $MachinePrecision] * l), $MachinePrecision] * -2.0 + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(N[(N[(N[(N[(N[(n / Om), $MachinePrecision] * N[(U - U$42$), $MachinePrecision] + 2.0), $MachinePrecision] / Om), $MachinePrecision] * n), $MachinePrecision] * l), $MachinePrecision] * N[(U * l), $MachinePrecision] + N[((-n) * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(-n\right) \cdot \left(U - U*\right)\right) \cdot \frac{\ell}{Om}\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := t\_2 \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\_3 \leq 4 \cdot 10^{-290}:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(t\_1, \frac{\ell}{Om}, \mathsf{fma}\left(-2 \cdot \frac{\ell}{Om}, \ell, t\right)\right) \cdot \left(2 \cdot n\right)\right) \cdot U}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(t\_1, \frac{\ell}{Om}, \mathsf{fma}\left(\frac{\ell}{Om} \cdot \ell, -2, t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \mathsf{fma}\left(\left(\frac{\mathsf{fma}\left(\frac{n}{Om}, U - U*, 2\right)}{Om} \cdot n\right) \cdot \ell, U \cdot \ell, \left(-n\right) \cdot \left(U \cdot t\right)\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*)))) < 4.0000000000000003e-290Initial program 14.9%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6417.0
lift-*.f64N/A
Applied rewrites17.0%
Applied rewrites42.2%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
lift-*.f64N/A
associate-*l*N/A
lift--.f64N/A
*-commutativeN/A
distribute-lft-neg-outN/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
lower-fma.f64N/A
Applied rewrites42.2%
if 4.0000000000000003e-290 < (*.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 65.1%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6471.2
lift-*.f64N/A
Applied rewrites66.8%
Applied rewrites67.4%
if +inf.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) Initial program 0.0%
Taylor expanded in l around 0
fp-cancel-sign-sub-invN/A
metadata-evalN/A
distribute-lft-out--N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites32.5%
Applied rewrites55.4%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (/ (* l l) Om))
(t_2 (fma -2.0 t_1 t))
(t_3 (* (* 2.0 n) U))
(t_4
(sqrt
(*
t_3
(- (- t (* 2.0 t_1)) (* (* n (pow (/ l Om) 2.0)) (- U U*)))))))
(if (<= t_4 2e-145)
(sqrt (* (* (* t_2 n) U) 2.0))
(if (<= t_4 INFINITY)
(sqrt (* t_3 t_2))
(* (sqrt (* U (* n (fma 2.0 n t)))) (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 = fma(-2.0, t_1, t);
double t_3 = (2.0 * n) * U;
double t_4 = sqrt((t_3 * ((t - (2.0 * t_1)) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
double tmp;
if (t_4 <= 2e-145) {
tmp = sqrt((((t_2 * n) * U) * 2.0));
} else if (t_4 <= ((double) INFINITY)) {
tmp = sqrt((t_3 * t_2));
} else {
tmp = sqrt((U * (n * fma(2.0, n, t)))) * sqrt(2.0);
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(l * l) / Om) t_2 = fma(-2.0, t_1, t) t_3 = Float64(Float64(2.0 * n) * U) t_4 = sqrt(Float64(t_3 * Float64(Float64(t - Float64(2.0 * t_1)) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))) tmp = 0.0 if (t_4 <= 2e-145) tmp = sqrt(Float64(Float64(Float64(t_2 * n) * U) * 2.0)); elseif (t_4 <= Inf) tmp = sqrt(Float64(t_3 * t_2)); else tmp = Float64(sqrt(Float64(U * Float64(n * fma(2.0, n, t)))) * sqrt(2.0)); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$2 = N[(-2.0 * t$95$1 + t), $MachinePrecision]}, Block[{t$95$3 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[(t$95$3 * N[(N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$4, 2e-145], N[Sqrt[N[(N[(N[(t$95$2 * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[Sqrt[N[(t$95$3 * t$95$2), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(U * N[(n * N[(2.0 * n + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell \cdot \ell}{Om}\\
t_2 := \mathsf{fma}\left(-2, t\_1, t\right)\\
t_3 := \left(2 \cdot n\right) \cdot U\\
t_4 := \sqrt{t\_3 \cdot \left(\left(t - 2 \cdot t\_1\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}\\
\mathbf{if}\;t\_4 \leq 2 \cdot 10^{-145}:\\
\;\;\;\;\sqrt{\left(\left(t\_2 \cdot n\right) \cdot U\right) \cdot 2}\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;\sqrt{t\_3 \cdot t\_2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{U \cdot \left(n \cdot \mathsf{fma}\left(2, n, t\right)\right)} \cdot \sqrt{2}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 1.99999999999999983e-145Initial program 15.9%
Taylor expanded in n around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
metadata-evalN/A
fp-cancel-sign-sub-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6440.8
Applied rewrites40.8%
if 1.99999999999999983e-145 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < +inf.0Initial program 65.1%
Taylor expanded in n around 0
metadata-evalN/A
fp-cancel-sign-sub-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6454.9
Applied rewrites54.9%
if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) Initial program 0.0%
Applied rewrites20.0%
Taylor expanded in l around 0
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-sqrt.f6418.2
Applied rewrites18.2%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (/ (* l l) Om))
(t_2 (* (* 2.0 n) U))
(t_3
(* t_2 (- (- t (* 2.0 t_1)) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
(if (<= t_3 4e-320)
(* (sqrt (* (* 2.0 n) t)) (sqrt U))
(if (<= t_3 INFINITY)
(sqrt (* t_2 (fma -2.0 t_1 t)))
(* (* (sqrt 2.0) n) (* (/ (sqrt (* (- U* U) U)) Om) l))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (l * l) / Om;
double t_2 = (2.0 * n) * U;
double t_3 = t_2 * ((t - (2.0 * t_1)) - ((n * pow((l / Om), 2.0)) * (U - U_42_)));
double tmp;
if (t_3 <= 4e-320) {
tmp = sqrt(((2.0 * n) * t)) * sqrt(U);
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((t_2 * fma(-2.0, t_1, t)));
} else {
tmp = (sqrt(2.0) * n) * ((sqrt(((U_42_ - U) * U)) / Om) * l);
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(l * l) / Om) t_2 = Float64(Float64(2.0 * n) * U) t_3 = Float64(t_2 * Float64(Float64(t - Float64(2.0 * t_1)) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_)))) tmp = 0.0 if (t_3 <= 4e-320) tmp = Float64(sqrt(Float64(Float64(2.0 * n) * t)) * sqrt(U)); elseif (t_3 <= Inf) tmp = sqrt(Float64(t_2 * fma(-2.0, t_1, t))); else tmp = Float64(Float64(sqrt(2.0) * n) * Float64(Float64(sqrt(Float64(Float64(U_42_ - U) * U)) / Om) * l)); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[(N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 4e-320], N[(N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision] * N[Sqrt[U], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$2 * N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] * n), $MachinePrecision] * N[(N[(N[Sqrt[N[(N[(U$42$ - U), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision] / Om), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell \cdot \ell}{Om}\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := t\_2 \cdot \left(\left(t - 2 \cdot t\_1\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\
\mathbf{if}\;t\_3 \leq 4 \cdot 10^{-320}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot t} \cdot \sqrt{U}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, t\_1, t\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\sqrt{2} \cdot n\right) \cdot \left(\frac{\sqrt{\left(U* - U\right) \cdot U}}{Om} \cdot \ell\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*)))) < 3.99996e-320Initial program 12.4%
Applied rewrites31.4%
Taylor expanded in n around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f6438.5
Applied rewrites38.5%
if 3.99996e-320 < (*.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 65.2%
Taylor expanded in n around 0
metadata-evalN/A
fp-cancel-sign-sub-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6455.1
Applied rewrites55.1%
if +inf.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) Initial program 0.0%
Applied rewrites18.8%
Taylor expanded in n around inf
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower--.f64N/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-sqrt.f6413.2
Applied rewrites13.2%
Taylor expanded in l around inf
Applied rewrites6.8%
Applied rewrites30.0%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (/ (* l l) Om))
(t_2 (* (* 2.0 n) U))
(t_3
(* t_2 (- (- t (* 2.0 t_1)) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
(if (<= t_3 4e-320)
(* (sqrt (* (* 2.0 n) t)) (sqrt U))
(if (<= t_3 INFINITY)
(sqrt (* t_2 (fma -2.0 t_1 t)))
(* (* (/ l Om) (sqrt (* U U*))) (* n (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 = (2.0 * n) * U;
double t_3 = t_2 * ((t - (2.0 * t_1)) - ((n * pow((l / Om), 2.0)) * (U - U_42_)));
double tmp;
if (t_3 <= 4e-320) {
tmp = sqrt(((2.0 * n) * t)) * sqrt(U);
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((t_2 * fma(-2.0, t_1, t)));
} else {
tmp = ((l / Om) * sqrt((U * U_42_))) * (n * sqrt(2.0));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(l * l) / Om) t_2 = Float64(Float64(2.0 * n) * U) t_3 = Float64(t_2 * Float64(Float64(t - Float64(2.0 * t_1)) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_)))) tmp = 0.0 if (t_3 <= 4e-320) tmp = Float64(sqrt(Float64(Float64(2.0 * n) * t)) * sqrt(U)); elseif (t_3 <= Inf) tmp = sqrt(Float64(t_2 * fma(-2.0, t_1, t))); else tmp = Float64(Float64(Float64(l / Om) * sqrt(Float64(U * U_42_))) * Float64(n * sqrt(2.0))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[(N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 4e-320], N[(N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision] * N[Sqrt[U], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$2 * N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(N[(l / Om), $MachinePrecision] * N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(n * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell \cdot \ell}{Om}\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := t\_2 \cdot \left(\left(t - 2 \cdot t\_1\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\
\mathbf{if}\;t\_3 \leq 4 \cdot 10^{-320}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot t} \cdot \sqrt{U}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, t\_1, t\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{\ell}{Om} \cdot \sqrt{U \cdot U*}\right) \cdot \left(n \cdot \sqrt{2}\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*)))) < 3.99996e-320Initial program 12.4%
Applied rewrites31.4%
Taylor expanded in n around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f6438.5
Applied rewrites38.5%
if 3.99996e-320 < (*.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 65.2%
Taylor expanded in n around 0
metadata-evalN/A
fp-cancel-sign-sub-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6455.1
Applied rewrites55.1%
if +inf.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) Initial program 0.0%
Applied rewrites18.8%
Taylor expanded in n around inf
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower--.f64N/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-sqrt.f6413.2
Applied rewrites13.2%
Taylor expanded in U* around inf
Applied rewrites24.7%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (/ (* l l) Om))
(t_2 (* (* 2.0 n) U))
(t_3
(* t_2 (- (- t (* 2.0 t_1)) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
(if (<= t_3 4e-320)
(* (sqrt (* (* 2.0 n) t)) (sqrt U))
(if (<= t_3 INFINITY)
(sqrt (* t_2 (fma -2.0 t_1 t)))
(* (sqrt (* U* U)) (/ (* (* (sqrt 2.0) n) l) Om))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (l * l) / Om;
double t_2 = (2.0 * n) * U;
double t_3 = t_2 * ((t - (2.0 * t_1)) - ((n * pow((l / Om), 2.0)) * (U - U_42_)));
double tmp;
if (t_3 <= 4e-320) {
tmp = sqrt(((2.0 * n) * t)) * sqrt(U);
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((t_2 * fma(-2.0, t_1, t)));
} else {
tmp = sqrt((U_42_ * U)) * (((sqrt(2.0) * n) * l) / Om);
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(l * l) / Om) t_2 = Float64(Float64(2.0 * n) * U) t_3 = Float64(t_2 * Float64(Float64(t - Float64(2.0 * t_1)) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_)))) tmp = 0.0 if (t_3 <= 4e-320) tmp = Float64(sqrt(Float64(Float64(2.0 * n) * t)) * sqrt(U)); elseif (t_3 <= Inf) tmp = sqrt(Float64(t_2 * fma(-2.0, t_1, t))); else tmp = Float64(sqrt(Float64(U_42_ * U)) * Float64(Float64(Float64(sqrt(2.0) * n) * l) / Om)); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[(N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 4e-320], N[(N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision] * N[Sqrt[U], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$2 * N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(U$42$ * U), $MachinePrecision]], $MachinePrecision] * N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] * n), $MachinePrecision] * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell \cdot \ell}{Om}\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := t\_2 \cdot \left(\left(t - 2 \cdot t\_1\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\
\mathbf{if}\;t\_3 \leq 4 \cdot 10^{-320}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot t} \cdot \sqrt{U}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, t\_1, t\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{U* \cdot U} \cdot \frac{\left(\sqrt{2} \cdot n\right) \cdot \ell}{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*)))) < 3.99996e-320Initial program 12.4%
Applied rewrites31.4%
Taylor expanded in n around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f6438.5
Applied rewrites38.5%
if 3.99996e-320 < (*.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 65.2%
Taylor expanded in n around 0
metadata-evalN/A
fp-cancel-sign-sub-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6455.1
Applied rewrites55.1%
if +inf.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) Initial program 0.0%
Taylor expanded in U* around inf
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f6422.4
Applied rewrites22.4%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (/ (* l l) Om)))
(if (<=
(sqrt
(*
(* (* 2.0 n) U)
(- (- t (* 2.0 t_1)) (* (* n (pow (/ l Om) 2.0)) (- U U*)))))
2e-126)
(sqrt (* (* (* (fma -2.0 t_1 t) n) U) 2.0))
(sqrt (fma -4.0 (* (* l U) (* l (/ n Om))) (* 2.0 (* (* U n) t)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (l * l) / Om;
double tmp;
if (sqrt((((2.0 * n) * U) * ((t - (2.0 * t_1)) - ((n * pow((l / Om), 2.0)) * (U - U_42_))))) <= 2e-126) {
tmp = sqrt((((fma(-2.0, t_1, t) * n) * U) * 2.0));
} else {
tmp = sqrt(fma(-4.0, ((l * U) * (l * (n / Om))), (2.0 * ((U * n) * t))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(l * l) / Om) tmp = 0.0 if (sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * t_1)) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))) <= 2e-126) tmp = sqrt(Float64(Float64(Float64(fma(-2.0, t_1, t) * n) * U) * 2.0)); else tmp = sqrt(fma(-4.0, Float64(Float64(l * U) * Float64(l * Float64(n / Om))), Float64(2.0 * Float64(Float64(U * n) * t)))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]}, If[LessEqual[N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 2e-126], N[Sqrt[N[(N[(N[(N[(-2.0 * t$95$1 + t), $MachinePrecision] * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-4.0 * N[(N[(l * U), $MachinePrecision] * N[(l * N[(n / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[(U * n), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell \cdot \ell}{Om}\\
\mathbf{if}\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot t\_1\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \leq 2 \cdot 10^{-126}:\\
\;\;\;\;\sqrt{\left(\left(\mathsf{fma}\left(-2, t\_1, t\right) \cdot n\right) \cdot U\right) \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(-4, \left(\ell \cdot U\right) \cdot \left(\ell \cdot \frac{n}{Om}\right), 2 \cdot \left(\left(U \cdot n\right) \cdot t\right)\right)}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 1.9999999999999999e-126Initial program 23.8%
Taylor expanded in n around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
metadata-evalN/A
fp-cancel-sign-sub-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6446.4
Applied rewrites46.4%
if 1.9999999999999999e-126 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) Initial program 52.4%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6460.2
lift-*.f64N/A
Applied rewrites56.6%
Taylor expanded in Om around inf
lower-fma.f64N/A
lower-/.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6441.8
Applied rewrites41.8%
Applied rewrites48.7%
(FPCore (n U t l Om U*)
:precision binary64
(if (<=
(sqrt
(*
(* (* 2.0 n) U)
(-
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U U*)))))
2e-160)
(sqrt (* (* (* U t) n) 2.0))
(sqrt (* t (* (* U n) 2.0)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_))))) <= 2e-160) {
tmp = sqrt((((U * t) * n) * 2.0));
} else {
tmp = sqrt((t * ((U * n) * 2.0)));
}
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 (sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) - ((n * ((l / om) ** 2.0d0)) * (u - u_42))))) <= 2d-160) then
tmp = sqrt((((u * t) * n) * 2.0d0))
else
tmp = sqrt((t * ((u * n) * 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 tmp;
if (Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * Math.pow((l / Om), 2.0)) * (U - U_42_))))) <= 2e-160) {
tmp = Math.sqrt((((U * t) * n) * 2.0));
} else {
tmp = Math.sqrt((t * ((U * n) * 2.0)));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * math.pow((l / Om), 2.0)) * (U - U_42_))))) <= 2e-160: tmp = math.sqrt((((U * t) * n) * 2.0)) else: tmp = math.sqrt((t * ((U * n) * 2.0))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (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_))))) <= 2e-160) tmp = sqrt(Float64(Float64(Float64(U * t) * n) * 2.0)); else tmp = sqrt(Float64(t * Float64(Float64(U * n) * 2.0))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * ((l / Om) ^ 2.0)) * (U - U_42_))))) <= 2e-160) tmp = sqrt((((U * t) * n) * 2.0)); else tmp = sqrt((t * ((U * n) * 2.0))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[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], 2e-160], N[Sqrt[N[(N[(N[(U * t), $MachinePrecision] * n), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(t * N[(N[(U * n), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\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)} \leq 2 \cdot 10^{-160}:\\
\;\;\;\;\sqrt{\left(\left(U \cdot t\right) \cdot n\right) \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t \cdot \left(\left(U \cdot n\right) \cdot 2\right)}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 2e-160Initial program 13.2%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6436.1
Applied rewrites36.1%
Applied rewrites36.3%
if 2e-160 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) Initial program 53.8%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6434.5
Applied rewrites34.5%
Applied rewrites36.6%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= n 8.8e-119)
(sqrt
(*
-2.0
(fma
(* (* l (/ (fma (- U U*) (/ n Om) 2.0) Om)) n)
(* U l)
(* (- n) (* U t)))))
(*
(sqrt
(*
(- (fma (* (/ l Om) l) -2.0 t) (* (* (pow (/ l Om) 2.0) n) (- U U*)))
U))
(sqrt (* 2.0 n)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (n <= 8.8e-119) {
tmp = sqrt((-2.0 * fma(((l * (fma((U - U_42_), (n / Om), 2.0) / Om)) * n), (U * l), (-n * (U * t)))));
} else {
tmp = sqrt(((fma(((l / Om) * l), -2.0, t) - ((pow((l / Om), 2.0) * n) * (U - U_42_))) * U)) * sqrt((2.0 * n));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (n <= 8.8e-119) tmp = sqrt(Float64(-2.0 * fma(Float64(Float64(l * Float64(fma(Float64(U - U_42_), Float64(n / Om), 2.0) / Om)) * n), Float64(U * l), Float64(Float64(-n) * Float64(U * t))))); else tmp = Float64(sqrt(Float64(Float64(fma(Float64(Float64(l / Om) * l), -2.0, t) - Float64(Float64((Float64(l / Om) ^ 2.0) * n) * Float64(U - U_42_))) * U)) * sqrt(Float64(2.0 * n))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[n, 8.8e-119], N[Sqrt[N[(-2.0 * N[(N[(N[(l * N[(N[(N[(U - U$42$), $MachinePrecision] * N[(n / Om), $MachinePrecision] + 2.0), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] * n), $MachinePrecision] * N[(U * l), $MachinePrecision] + N[((-n) * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(N[(N[(N[(l / Om), $MachinePrecision] * l), $MachinePrecision] * -2.0 + t), $MachinePrecision] - N[(N[(N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision] * n), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;n \leq 8.8 \cdot 10^{-119}:\\
\;\;\;\;\sqrt{-2 \cdot \mathsf{fma}\left(\left(\ell \cdot \frac{\mathsf{fma}\left(U - U*, \frac{n}{Om}, 2\right)}{Om}\right) \cdot n, U \cdot \ell, \left(-n\right) \cdot \left(U \cdot t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(\frac{\ell}{Om} \cdot \ell, -2, t\right) - \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot n\right) \cdot \left(U - U*\right)\right) \cdot U} \cdot \sqrt{2 \cdot n}\\
\end{array}
\end{array}
if n < 8.8000000000000002e-119Initial program 42.5%
Taylor expanded in l around 0
fp-cancel-sign-sub-invN/A
metadata-evalN/A
distribute-lft-out--N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites44.1%
Applied rewrites53.2%
Applied rewrites55.6%
if 8.8000000000000002e-119 < n Initial program 53.3%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6458.8
lift-*.f64N/A
Applied rewrites55.4%
Applied rewrites69.4%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (fma (- U U*) (/ n Om) 2.0)))
(if (<= l 1.1e-140)
(sqrt (* (* (fma -2.0 (/ (* l l) Om) t) (* 2.0 n)) U))
(if (<= l 1.75e+29)
(sqrt (* (fma (* (* l l) U) (* t_1 (/ n Om)) (* (* (- n) t) U)) -2.0))
(sqrt
(* -2.0 (fma (* (* l (/ t_1 Om)) n) (* U l) (* (- n) (* U t)))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = fma((U - U_42_), (n / Om), 2.0);
double tmp;
if (l <= 1.1e-140) {
tmp = sqrt(((fma(-2.0, ((l * l) / Om), t) * (2.0 * n)) * U));
} else if (l <= 1.75e+29) {
tmp = sqrt((fma(((l * l) * U), (t_1 * (n / Om)), ((-n * t) * U)) * -2.0));
} else {
tmp = sqrt((-2.0 * fma(((l * (t_1 / Om)) * n), (U * l), (-n * (U * t)))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = fma(Float64(U - U_42_), Float64(n / Om), 2.0) tmp = 0.0 if (l <= 1.1e-140) tmp = sqrt(Float64(Float64(fma(-2.0, Float64(Float64(l * l) / Om), t) * Float64(2.0 * n)) * U)); elseif (l <= 1.75e+29) tmp = sqrt(Float64(fma(Float64(Float64(l * l) * U), Float64(t_1 * Float64(n / Om)), Float64(Float64(Float64(-n) * t) * U)) * -2.0)); else tmp = sqrt(Float64(-2.0 * fma(Float64(Float64(l * Float64(t_1 / Om)) * n), Float64(U * l), Float64(Float64(-n) * Float64(U * t))))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(U - U$42$), $MachinePrecision] * N[(n / Om), $MachinePrecision] + 2.0), $MachinePrecision]}, If[LessEqual[l, 1.1e-140], N[Sqrt[N[(N[(N[(-2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] + t), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 1.75e+29], N[Sqrt[N[(N[(N[(N[(l * l), $MachinePrecision] * U), $MachinePrecision] * N[(t$95$1 * N[(n / Om), $MachinePrecision]), $MachinePrecision] + N[(N[((-n) * t), $MachinePrecision] * U), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(N[(N[(l * N[(t$95$1 / Om), $MachinePrecision]), $MachinePrecision] * n), $MachinePrecision] * N[(U * l), $MachinePrecision] + N[((-n) * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(U - U*, \frac{n}{Om}, 2\right)\\
\mathbf{if}\;\ell \leq 1.1 \cdot 10^{-140}:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(-2, \frac{\ell \cdot \ell}{Om}, t\right) \cdot \left(2 \cdot n\right)\right) \cdot U}\\
\mathbf{elif}\;\ell \leq 1.75 \cdot 10^{+29}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\left(\ell \cdot \ell\right) \cdot U, t\_1 \cdot \frac{n}{Om}, \left(\left(-n\right) \cdot t\right) \cdot U\right) \cdot -2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \mathsf{fma}\left(\left(\ell \cdot \frac{t\_1}{Om}\right) \cdot n, U \cdot \ell, \left(-n\right) \cdot \left(U \cdot t\right)\right)}\\
\end{array}
\end{array}
if l < 1.1e-140Initial program 49.7%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6454.0
lift-*.f64N/A
Applied rewrites50.6%
Applied rewrites54.4%
Taylor expanded in n around 0
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6445.5
Applied rewrites45.5%
if 1.1e-140 < l < 1.74999999999999989e29Initial program 55.7%
Taylor expanded in l around 0
fp-cancel-sign-sub-invN/A
metadata-evalN/A
distribute-lft-out--N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites58.7%
Applied rewrites52.7%
Applied rewrites58.6%
if 1.74999999999999989e29 < l Initial program 33.6%
Taylor expanded in l around 0
fp-cancel-sign-sub-invN/A
metadata-evalN/A
distribute-lft-out--N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites42.0%
Applied rewrites60.7%
Applied rewrites64.1%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= n -2.2e+167)
(sqrt (/ (/ (* (* (* (* n l) U) (* n l)) (* (- U U*) -2.0)) Om) Om))
(if (<= n 2.5e+122)
(sqrt (* -2.0 (fma (* 2.0 (/ (* l n) Om)) (* U l) (* (- n) (* U t)))))
(*
(sqrt (* U (- 2.0 (* (* (/ (- U U*) Om) (/ l Om)) l))))
(* n (sqrt 2.0))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (n <= -2.2e+167) {
tmp = sqrt(((((((n * l) * U) * (n * l)) * ((U - U_42_) * -2.0)) / Om) / Om));
} else if (n <= 2.5e+122) {
tmp = sqrt((-2.0 * fma((2.0 * ((l * n) / Om)), (U * l), (-n * (U * t)))));
} else {
tmp = sqrt((U * (2.0 - ((((U - U_42_) / Om) * (l / Om)) * l)))) * (n * sqrt(2.0));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (n <= -2.2e+167) tmp = sqrt(Float64(Float64(Float64(Float64(Float64(Float64(n * l) * U) * Float64(n * l)) * Float64(Float64(U - U_42_) * -2.0)) / Om) / Om)); elseif (n <= 2.5e+122) tmp = sqrt(Float64(-2.0 * fma(Float64(2.0 * Float64(Float64(l * n) / Om)), Float64(U * l), Float64(Float64(-n) * Float64(U * t))))); else tmp = Float64(sqrt(Float64(U * Float64(2.0 - Float64(Float64(Float64(Float64(U - U_42_) / Om) * Float64(l / Om)) * l)))) * Float64(n * sqrt(2.0))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[n, -2.2e+167], N[Sqrt[N[(N[(N[(N[(N[(N[(n * l), $MachinePrecision] * U), $MachinePrecision] * N[(n * l), $MachinePrecision]), $MachinePrecision] * N[(N[(U - U$42$), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision], If[LessEqual[n, 2.5e+122], N[Sqrt[N[(-2.0 * N[(N[(2.0 * N[(N[(l * n), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] * N[(U * l), $MachinePrecision] + N[((-n) * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(U * N[(2.0 - N[(N[(N[(N[(U - U$42$), $MachinePrecision] / Om), $MachinePrecision] * N[(l / Om), $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(n * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;n \leq -2.2 \cdot 10^{+167}:\\
\;\;\;\;\sqrt{\frac{\frac{\left(\left(\left(n \cdot \ell\right) \cdot U\right) \cdot \left(n \cdot \ell\right)\right) \cdot \left(\left(U - U*\right) \cdot -2\right)}{Om}}{Om}}\\
\mathbf{elif}\;n \leq 2.5 \cdot 10^{+122}:\\
\;\;\;\;\sqrt{-2 \cdot \mathsf{fma}\left(2 \cdot \frac{\ell \cdot n}{Om}, U \cdot \ell, \left(-n\right) \cdot \left(U \cdot t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{U \cdot \left(2 - \left(\frac{U - U*}{Om} \cdot \frac{\ell}{Om}\right) \cdot \ell\right)} \cdot \left(n \cdot \sqrt{2}\right)\\
\end{array}
\end{array}
if n < -2.20000000000000003e167Initial program 39.1%
Taylor expanded in n around inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower--.f64N/A
unpow2N/A
lower-*.f6436.8
Applied rewrites36.8%
Applied rewrites48.5%
Applied rewrites48.5%
if -2.20000000000000003e167 < n < 2.49999999999999994e122Initial program 46.2%
Taylor expanded in l around 0
fp-cancel-sign-sub-invN/A
metadata-evalN/A
distribute-lft-out--N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites45.2%
Applied rewrites54.4%
Taylor expanded in n around 0
Applied rewrites54.9%
if 2.49999999999999994e122 < n Initial program 52.2%
Applied rewrites16.5%
Taylor expanded in n around inf
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower--.f64N/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-sqrt.f6443.9
Applied rewrites43.9%
Applied rewrites52.3%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 4.8e-138)
(sqrt (* (* (fma -2.0 (/ (* l l) Om) t) (* 2.0 n)) U))
(sqrt
(*
-2.0
(fma
(* (* l (/ (fma (- U U*) (/ n Om) 2.0) Om)) n)
(* U l)
(* (- n) (* U t)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 4.8e-138) {
tmp = sqrt(((fma(-2.0, ((l * l) / Om), t) * (2.0 * n)) * U));
} else {
tmp = sqrt((-2.0 * fma(((l * (fma((U - U_42_), (n / Om), 2.0) / Om)) * n), (U * l), (-n * (U * t)))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 4.8e-138) tmp = sqrt(Float64(Float64(fma(-2.0, Float64(Float64(l * l) / Om), t) * Float64(2.0 * n)) * U)); else tmp = sqrt(Float64(-2.0 * fma(Float64(Float64(l * Float64(fma(Float64(U - U_42_), Float64(n / Om), 2.0) / Om)) * n), Float64(U * l), Float64(Float64(-n) * Float64(U * t))))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 4.8e-138], N[Sqrt[N[(N[(N[(-2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] + t), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(N[(N[(l * N[(N[(N[(U - U$42$), $MachinePrecision] * N[(n / Om), $MachinePrecision] + 2.0), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] * n), $MachinePrecision] * N[(U * l), $MachinePrecision] + N[((-n) * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 4.8 \cdot 10^{-138}:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(-2, \frac{\ell \cdot \ell}{Om}, t\right) \cdot \left(2 \cdot n\right)\right) \cdot U}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \mathsf{fma}\left(\left(\ell \cdot \frac{\mathsf{fma}\left(U - U*, \frac{n}{Om}, 2\right)}{Om}\right) \cdot n, U \cdot \ell, \left(-n\right) \cdot \left(U \cdot t\right)\right)}\\
\end{array}
\end{array}
if l < 4.7999999999999998e-138Initial program 49.7%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6454.0
lift-*.f64N/A
Applied rewrites50.6%
Applied rewrites54.4%
Taylor expanded in n around 0
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6445.5
Applied rewrites45.5%
if 4.7999999999999998e-138 < l Initial program 41.1%
Taylor expanded in l around 0
fp-cancel-sign-sub-invN/A
metadata-evalN/A
distribute-lft-out--N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites47.6%
Applied rewrites58.0%
Applied rewrites60.2%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 7e-93)
(sqrt (fma (/ (* (* (* l l) n) U) Om) -4.0 (* (* (* n t) U) 2.0)))
(sqrt
(*
-2.0
(fma
l
(* l (* (* U n) (/ (fma (/ n Om) (- U U*) 2.0) Om)))
(* (- n) (* U t)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 7e-93) {
tmp = sqrt(fma(((((l * l) * n) * U) / Om), -4.0, (((n * t) * U) * 2.0)));
} else {
tmp = sqrt((-2.0 * fma(l, (l * ((U * n) * (fma((n / Om), (U - U_42_), 2.0) / Om))), (-n * (U * t)))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 7e-93) tmp = sqrt(fma(Float64(Float64(Float64(Float64(l * l) * n) * U) / Om), -4.0, Float64(Float64(Float64(n * t) * U) * 2.0))); else tmp = sqrt(Float64(-2.0 * fma(l, Float64(l * Float64(Float64(U * n) * Float64(fma(Float64(n / Om), Float64(U - U_42_), 2.0) / Om))), Float64(Float64(-n) * Float64(U * t))))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 7e-93], N[Sqrt[N[(N[(N[(N[(N[(l * l), $MachinePrecision] * n), $MachinePrecision] * U), $MachinePrecision] / Om), $MachinePrecision] * -4.0 + N[(N[(N[(n * t), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(l * N[(l * N[(N[(U * n), $MachinePrecision] * N[(N[(N[(n / Om), $MachinePrecision] * N[(U - U$42$), $MachinePrecision] + 2.0), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[((-n) * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 7 \cdot 10^{-93}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{\left(\left(\ell \cdot \ell\right) \cdot n\right) \cdot U}{Om}, -4, \left(\left(n \cdot t\right) \cdot U\right) \cdot 2\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \mathsf{fma}\left(\ell, \ell \cdot \left(\left(U \cdot n\right) \cdot \frac{\mathsf{fma}\left(\frac{n}{Om}, U - U*, 2\right)}{Om}\right), \left(-n\right) \cdot \left(U \cdot t\right)\right)}\\
\end{array}
\end{array}
if l < 7e-93Initial program 49.0%
Taylor expanded in Om around inf
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6444.0
Applied rewrites44.0%
if 7e-93 < l Initial program 41.5%
Taylor expanded in l around 0
fp-cancel-sign-sub-invN/A
metadata-evalN/A
distribute-lft-out--N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites48.7%
Applied rewrites55.6%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= n -2.2e+167)
(sqrt (/ (/ (* (* (* (* n l) U) (* n l)) (* (- U U*) -2.0)) Om) Om))
(if (<= n 1e+141)
(sqrt (* -2.0 (fma (* 2.0 (/ (* l n) Om)) (* U l) (* (- n) (* U t)))))
(*
(sqrt (* U (- 2.0 (/ (* (* l l) (- U U*)) (* Om Om)))))
(* n (sqrt 2.0))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (n <= -2.2e+167) {
tmp = sqrt(((((((n * l) * U) * (n * l)) * ((U - U_42_) * -2.0)) / Om) / Om));
} else if (n <= 1e+141) {
tmp = sqrt((-2.0 * fma((2.0 * ((l * n) / Om)), (U * l), (-n * (U * t)))));
} else {
tmp = sqrt((U * (2.0 - (((l * l) * (U - U_42_)) / (Om * Om))))) * (n * sqrt(2.0));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (n <= -2.2e+167) tmp = sqrt(Float64(Float64(Float64(Float64(Float64(Float64(n * l) * U) * Float64(n * l)) * Float64(Float64(U - U_42_) * -2.0)) / Om) / Om)); elseif (n <= 1e+141) tmp = sqrt(Float64(-2.0 * fma(Float64(2.0 * Float64(Float64(l * n) / Om)), Float64(U * l), Float64(Float64(-n) * Float64(U * t))))); else tmp = Float64(sqrt(Float64(U * Float64(2.0 - Float64(Float64(Float64(l * l) * Float64(U - U_42_)) / Float64(Om * Om))))) * Float64(n * sqrt(2.0))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[n, -2.2e+167], N[Sqrt[N[(N[(N[(N[(N[(N[(n * l), $MachinePrecision] * U), $MachinePrecision] * N[(n * l), $MachinePrecision]), $MachinePrecision] * N[(N[(U - U$42$), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision], If[LessEqual[n, 1e+141], N[Sqrt[N[(-2.0 * N[(N[(2.0 * N[(N[(l * n), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] * N[(U * l), $MachinePrecision] + N[((-n) * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(U * N[(2.0 - N[(N[(N[(l * l), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(n * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;n \leq -2.2 \cdot 10^{+167}:\\
\;\;\;\;\sqrt{\frac{\frac{\left(\left(\left(n \cdot \ell\right) \cdot U\right) \cdot \left(n \cdot \ell\right)\right) \cdot \left(\left(U - U*\right) \cdot -2\right)}{Om}}{Om}}\\
\mathbf{elif}\;n \leq 10^{+141}:\\
\;\;\;\;\sqrt{-2 \cdot \mathsf{fma}\left(2 \cdot \frac{\ell \cdot n}{Om}, U \cdot \ell, \left(-n\right) \cdot \left(U \cdot t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{U \cdot \left(2 - \frac{\left(\ell \cdot \ell\right) \cdot \left(U - U*\right)}{Om \cdot Om}\right)} \cdot \left(n \cdot \sqrt{2}\right)\\
\end{array}
\end{array}
if n < -2.20000000000000003e167Initial program 39.1%
Taylor expanded in n around inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower--.f64N/A
unpow2N/A
lower-*.f6436.8
Applied rewrites36.8%
Applied rewrites48.5%
Applied rewrites48.5%
if -2.20000000000000003e167 < n < 1.00000000000000002e141Initial program 47.0%
Taylor expanded in l around 0
fp-cancel-sign-sub-invN/A
metadata-evalN/A
distribute-lft-out--N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites45.5%
Applied rewrites55.0%
Taylor expanded in n around 0
Applied rewrites54.5%
if 1.00000000000000002e141 < n Initial program 47.3%
Applied rewrites15.5%
Taylor expanded in n around inf
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower--.f64N/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-sqrt.f6444.3
Applied rewrites44.3%
Applied rewrites50.5%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= n -2.2e+167)
(sqrt (/ (/ (* (* (* (* n l) U) (* n l)) (* (- U U*) -2.0)) Om) Om))
(if (<= n 1e+141)
(sqrt (* -2.0 (fma (* 2.0 (/ (* l n) Om)) (* U l) (* (- n) (* U t)))))
(* (sqrt (* U (+ 2.0 (/ (* U* (* l l)) (* Om Om))))) (* n (sqrt 2.0))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (n <= -2.2e+167) {
tmp = sqrt(((((((n * l) * U) * (n * l)) * ((U - U_42_) * -2.0)) / Om) / Om));
} else if (n <= 1e+141) {
tmp = sqrt((-2.0 * fma((2.0 * ((l * n) / Om)), (U * l), (-n * (U * t)))));
} else {
tmp = sqrt((U * (2.0 + ((U_42_ * (l * l)) / (Om * Om))))) * (n * sqrt(2.0));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (n <= -2.2e+167) tmp = sqrt(Float64(Float64(Float64(Float64(Float64(Float64(n * l) * U) * Float64(n * l)) * Float64(Float64(U - U_42_) * -2.0)) / Om) / Om)); elseif (n <= 1e+141) tmp = sqrt(Float64(-2.0 * fma(Float64(2.0 * Float64(Float64(l * n) / Om)), Float64(U * l), Float64(Float64(-n) * Float64(U * t))))); else tmp = Float64(sqrt(Float64(U * Float64(2.0 + Float64(Float64(U_42_ * Float64(l * l)) / Float64(Om * Om))))) * Float64(n * sqrt(2.0))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[n, -2.2e+167], N[Sqrt[N[(N[(N[(N[(N[(N[(n * l), $MachinePrecision] * U), $MachinePrecision] * N[(n * l), $MachinePrecision]), $MachinePrecision] * N[(N[(U - U$42$), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision], If[LessEqual[n, 1e+141], N[Sqrt[N[(-2.0 * N[(N[(2.0 * N[(N[(l * n), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] * N[(U * l), $MachinePrecision] + N[((-n) * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(U * N[(2.0 + N[(N[(U$42$ * N[(l * l), $MachinePrecision]), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(n * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;n \leq -2.2 \cdot 10^{+167}:\\
\;\;\;\;\sqrt{\frac{\frac{\left(\left(\left(n \cdot \ell\right) \cdot U\right) \cdot \left(n \cdot \ell\right)\right) \cdot \left(\left(U - U*\right) \cdot -2\right)}{Om}}{Om}}\\
\mathbf{elif}\;n \leq 10^{+141}:\\
\;\;\;\;\sqrt{-2 \cdot \mathsf{fma}\left(2 \cdot \frac{\ell \cdot n}{Om}, U \cdot \ell, \left(-n\right) \cdot \left(U \cdot t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{U \cdot \left(2 + \frac{U* \cdot \left(\ell \cdot \ell\right)}{Om \cdot Om}\right)} \cdot \left(n \cdot \sqrt{2}\right)\\
\end{array}
\end{array}
if n < -2.20000000000000003e167Initial program 39.1%
Taylor expanded in n around inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower--.f64N/A
unpow2N/A
lower-*.f6436.8
Applied rewrites36.8%
Applied rewrites48.5%
Applied rewrites48.5%
if -2.20000000000000003e167 < n < 1.00000000000000002e141Initial program 47.0%
Taylor expanded in l around 0
fp-cancel-sign-sub-invN/A
metadata-evalN/A
distribute-lft-out--N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites45.5%
Applied rewrites55.0%
Taylor expanded in n around 0
Applied rewrites54.5%
if 1.00000000000000002e141 < n Initial program 47.3%
Applied rewrites15.5%
Taylor expanded in n around inf
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower--.f64N/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-sqrt.f6444.3
Applied rewrites44.3%
Taylor expanded in l around inf
Applied rewrites18.3%
Taylor expanded in U around 0
Applied rewrites50.0%
Final simplification53.6%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= n -2.2e+167)
(sqrt (/ (/ (* (* (* (* n l) U) (* n l)) (* (- U U*) -2.0)) Om) Om))
(if (<= n 3.8e+140)
(sqrt (* -2.0 (fma (* 2.0 (/ (* l n) Om)) (* U l) (* (- n) (* U t)))))
(* (* (sqrt (* U (/ (- U* U) (* Om Om)))) l) (* n (sqrt 2.0))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (n <= -2.2e+167) {
tmp = sqrt(((((((n * l) * U) * (n * l)) * ((U - U_42_) * -2.0)) / Om) / Om));
} else if (n <= 3.8e+140) {
tmp = sqrt((-2.0 * fma((2.0 * ((l * n) / Om)), (U * l), (-n * (U * t)))));
} else {
tmp = (sqrt((U * ((U_42_ - U) / (Om * Om)))) * l) * (n * sqrt(2.0));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (n <= -2.2e+167) tmp = sqrt(Float64(Float64(Float64(Float64(Float64(Float64(n * l) * U) * Float64(n * l)) * Float64(Float64(U - U_42_) * -2.0)) / Om) / Om)); elseif (n <= 3.8e+140) tmp = sqrt(Float64(-2.0 * fma(Float64(2.0 * Float64(Float64(l * n) / Om)), Float64(U * l), Float64(Float64(-n) * Float64(U * t))))); else tmp = Float64(Float64(sqrt(Float64(U * Float64(Float64(U_42_ - U) / Float64(Om * Om)))) * l) * Float64(n * sqrt(2.0))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[n, -2.2e+167], N[Sqrt[N[(N[(N[(N[(N[(N[(n * l), $MachinePrecision] * U), $MachinePrecision] * N[(n * l), $MachinePrecision]), $MachinePrecision] * N[(N[(U - U$42$), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision], If[LessEqual[n, 3.8e+140], N[Sqrt[N[(-2.0 * N[(N[(2.0 * N[(N[(l * n), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] * N[(U * l), $MachinePrecision] + N[((-n) * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(N[Sqrt[N[(U * N[(N[(U$42$ - U), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * l), $MachinePrecision] * N[(n * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;n \leq -2.2 \cdot 10^{+167}:\\
\;\;\;\;\sqrt{\frac{\frac{\left(\left(\left(n \cdot \ell\right) \cdot U\right) \cdot \left(n \cdot \ell\right)\right) \cdot \left(\left(U - U*\right) \cdot -2\right)}{Om}}{Om}}\\
\mathbf{elif}\;n \leq 3.8 \cdot 10^{+140}:\\
\;\;\;\;\sqrt{-2 \cdot \mathsf{fma}\left(2 \cdot \frac{\ell \cdot n}{Om}, U \cdot \ell, \left(-n\right) \cdot \left(U \cdot t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\sqrt{U \cdot \frac{U* - U}{Om \cdot Om}} \cdot \ell\right) \cdot \left(n \cdot \sqrt{2}\right)\\
\end{array}
\end{array}
if n < -2.20000000000000003e167Initial program 39.1%
Taylor expanded in n around inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower--.f64N/A
unpow2N/A
lower-*.f6436.8
Applied rewrites36.8%
Applied rewrites48.5%
Applied rewrites48.5%
if -2.20000000000000003e167 < n < 3.8000000000000001e140Initial program 47.0%
Taylor expanded in l around 0
fp-cancel-sign-sub-invN/A
metadata-evalN/A
distribute-lft-out--N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites45.5%
Applied rewrites55.0%
Taylor expanded in n around 0
Applied rewrites54.5%
if 3.8000000000000001e140 < n Initial program 47.3%
Applied rewrites15.5%
Taylor expanded in n around inf
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower--.f64N/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-sqrt.f6444.3
Applied rewrites44.3%
Taylor expanded in l around inf
Applied rewrites18.3%
Applied rewrites32.1%
(FPCore (n U t l Om U*) :precision binary64 (if (<= n 3.8e+140) (sqrt (* -2.0 (fma (* 2.0 (/ (* l n) Om)) (* U l) (* (- n) (* U t))))) (* (* (sqrt (* U (/ (- U* U) (* Om Om)))) l) (* n (sqrt 2.0)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (n <= 3.8e+140) {
tmp = sqrt((-2.0 * fma((2.0 * ((l * n) / Om)), (U * l), (-n * (U * t)))));
} else {
tmp = (sqrt((U * ((U_42_ - U) / (Om * Om)))) * l) * (n * sqrt(2.0));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (n <= 3.8e+140) tmp = sqrt(Float64(-2.0 * fma(Float64(2.0 * Float64(Float64(l * n) / Om)), Float64(U * l), Float64(Float64(-n) * Float64(U * t))))); else tmp = Float64(Float64(sqrt(Float64(U * Float64(Float64(U_42_ - U) / Float64(Om * Om)))) * l) * Float64(n * sqrt(2.0))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[n, 3.8e+140], N[Sqrt[N[(-2.0 * N[(N[(2.0 * N[(N[(l * n), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] * N[(U * l), $MachinePrecision] + N[((-n) * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(N[Sqrt[N[(U * N[(N[(U$42$ - U), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * l), $MachinePrecision] * N[(n * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;n \leq 3.8 \cdot 10^{+140}:\\
\;\;\;\;\sqrt{-2 \cdot \mathsf{fma}\left(2 \cdot \frac{\ell \cdot n}{Om}, U \cdot \ell, \left(-n\right) \cdot \left(U \cdot t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\sqrt{U \cdot \frac{U* - U}{Om \cdot Om}} \cdot \ell\right) \cdot \left(n \cdot \sqrt{2}\right)\\
\end{array}
\end{array}
if n < 3.8000000000000001e140Initial program 46.4%
Taylor expanded in l around 0
fp-cancel-sign-sub-invN/A
metadata-evalN/A
distribute-lft-out--N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites44.0%
Applied rewrites53.6%
Taylor expanded in n around 0
Applied rewrites51.6%
if 3.8000000000000001e140 < n Initial program 47.3%
Applied rewrites15.5%
Taylor expanded in n around inf
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower--.f64N/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-sqrt.f6444.3
Applied rewrites44.3%
Taylor expanded in l around inf
Applied rewrites18.3%
Applied rewrites32.1%
(FPCore (n U t l Om U*) :precision binary64 (if (<= Om 1e+196) (sqrt (* (* (fma -2.0 (/ (* l l) Om) t) (* 2.0 n)) U)) (sqrt (* (* (* U t) n) 2.0))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (Om <= 1e+196) {
tmp = sqrt(((fma(-2.0, ((l * l) / Om), t) * (2.0 * n)) * U));
} else {
tmp = sqrt((((U * t) * n) * 2.0));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (Om <= 1e+196) tmp = sqrt(Float64(Float64(fma(-2.0, Float64(Float64(l * l) / Om), t) * Float64(2.0 * n)) * U)); else tmp = sqrt(Float64(Float64(Float64(U * t) * n) * 2.0)); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[Om, 1e+196], N[Sqrt[N[(N[(N[(-2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] + t), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(U * t), $MachinePrecision] * n), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;Om \leq 10^{+196}:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(-2, \frac{\ell \cdot \ell}{Om}, t\right) \cdot \left(2 \cdot n\right)\right) \cdot U}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\left(U \cdot t\right) \cdot n\right) \cdot 2}\\
\end{array}
\end{array}
if Om < 9.9999999999999995e195Initial program 48.9%
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower--.f6453.9
lift-*.f64N/A
Applied rewrites51.5%
Applied rewrites54.0%
Taylor expanded in n around 0
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6445.1
Applied rewrites45.1%
if 9.9999999999999995e195 < Om Initial program 28.9%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6430.0
Applied rewrites30.0%
Applied rewrites45.6%
(FPCore (n U t l Om U*) :precision binary64 (if (<= Om 1e+196) (sqrt (* (* (* (fma -2.0 (/ (* l l) Om) t) n) U) 2.0)) (sqrt (* (* (* U t) n) 2.0))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (Om <= 1e+196) {
tmp = sqrt((((fma(-2.0, ((l * l) / Om), t) * n) * U) * 2.0));
} else {
tmp = sqrt((((U * t) * n) * 2.0));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (Om <= 1e+196) tmp = sqrt(Float64(Float64(Float64(fma(-2.0, Float64(Float64(l * l) / Om), t) * n) * U) * 2.0)); else tmp = sqrt(Float64(Float64(Float64(U * t) * n) * 2.0)); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[Om, 1e+196], N[Sqrt[N[(N[(N[(N[(-2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] + t), $MachinePrecision] * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(U * t), $MachinePrecision] * n), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;Om \leq 10^{+196}:\\
\;\;\;\;\sqrt{\left(\left(\mathsf{fma}\left(-2, \frac{\ell \cdot \ell}{Om}, t\right) \cdot n\right) \cdot U\right) \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\left(U \cdot t\right) \cdot n\right) \cdot 2}\\
\end{array}
\end{array}
if Om < 9.9999999999999995e195Initial program 48.9%
Taylor expanded in n around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
metadata-evalN/A
fp-cancel-sign-sub-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6445.1
Applied rewrites45.1%
if 9.9999999999999995e195 < Om Initial program 28.9%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6430.0
Applied rewrites30.0%
Applied rewrites45.6%
(FPCore (n U t l Om U*) :precision binary64 (if (<= U -5e-311) (sqrt (* (* (* n t) U) 2.0)) (* (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 <= -5e-311) {
tmp = sqrt((((n * t) * U) * 2.0));
} 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 <= (-5d-311)) then
tmp = sqrt((((n * t) * u) * 2.0d0))
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 <= -5e-311) {
tmp = Math.sqrt((((n * t) * U) * 2.0));
} 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 <= -5e-311: tmp = math.sqrt((((n * t) * U) * 2.0)) 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 <= -5e-311) tmp = sqrt(Float64(Float64(Float64(n * t) * U) * 2.0)); else tmp = Float64(sqrt(Float64(Float64(2.0 * n) * t)) * sqrt(U)); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U <= -5e-311) tmp = sqrt((((n * t) * U) * 2.0)); 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, -5e-311], N[Sqrt[N[(N[(N[(n * t), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision] * N[Sqrt[U], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;U \leq -5 \cdot 10^{-311}:\\
\;\;\;\;\sqrt{\left(\left(n \cdot t\right) \cdot U\right) \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot t} \cdot \sqrt{U}\\
\end{array}
\end{array}
if U < -5.00000000000023e-311Initial program 47.9%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6443.2
Applied rewrites43.2%
if -5.00000000000023e-311 < U Initial program 45.4%
Applied rewrites39.8%
Taylor expanded in n around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f6439.1
Applied rewrites39.1%
(FPCore (n U t l Om U*) :precision binary64 (if (<= t -5e-310) (sqrt (* (* (* n t) U) 2.0)) (* (sqrt (* 2.0 t)) (sqrt (* U n)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (t <= -5e-310) {
tmp = sqrt((((n * t) * U) * 2.0));
} else {
tmp = sqrt((2.0 * t)) * sqrt((U * 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 <= (-5d-310)) then
tmp = sqrt((((n * t) * u) * 2.0d0))
else
tmp = sqrt((2.0d0 * t)) * sqrt((u * 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 <= -5e-310) {
tmp = Math.sqrt((((n * t) * U) * 2.0));
} else {
tmp = Math.sqrt((2.0 * t)) * Math.sqrt((U * n));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if t <= -5e-310: tmp = math.sqrt((((n * t) * U) * 2.0)) else: tmp = math.sqrt((2.0 * t)) * math.sqrt((U * n)) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (t <= -5e-310) tmp = sqrt(Float64(Float64(Float64(n * t) * U) * 2.0)); else tmp = Float64(sqrt(Float64(2.0 * t)) * sqrt(Float64(U * n))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (t <= -5e-310) tmp = sqrt((((n * t) * U) * 2.0)); else tmp = sqrt((2.0 * t)) * sqrt((U * n)); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[t, -5e-310], N[Sqrt[N[(N[(N[(n * t), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(2.0 * t), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\sqrt{\left(\left(n \cdot t\right) \cdot U\right) \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot t} \cdot \sqrt{U \cdot n}\\
\end{array}
\end{array}
if t < -4.999999999999985e-310Initial program 44.1%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6435.3
Applied rewrites35.3%
if -4.999999999999985e-310 < t Initial program 48.9%
lift-sqrt.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
sqrt-prodN/A
pow1/2N/A
lower-*.f64N/A
Applied rewrites31.4%
Taylor expanded in n around 0
lower-*.f6442.3
Applied rewrites42.3%
(FPCore (n U t l Om U*) :precision binary64 (if (<= U 6.5e-259) (sqrt (* (* (* n t) U) 2.0)) (sqrt (* (* (* U t) n) 2.0))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U <= 6.5e-259) {
tmp = sqrt((((n * t) * U) * 2.0));
} else {
tmp = sqrt((((U * t) * n) * 2.0));
}
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 <= 6.5d-259) then
tmp = sqrt((((n * t) * u) * 2.0d0))
else
tmp = sqrt((((u * t) * n) * 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 tmp;
if (U <= 6.5e-259) {
tmp = Math.sqrt((((n * t) * U) * 2.0));
} else {
tmp = Math.sqrt((((U * t) * n) * 2.0));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if U <= 6.5e-259: tmp = math.sqrt((((n * t) * U) * 2.0)) else: tmp = math.sqrt((((U * t) * n) * 2.0)) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U <= 6.5e-259) tmp = sqrt(Float64(Float64(Float64(n * t) * U) * 2.0)); else tmp = sqrt(Float64(Float64(Float64(U * t) * n) * 2.0)); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U <= 6.5e-259) tmp = sqrt((((n * t) * U) * 2.0)); else tmp = sqrt((((U * t) * n) * 2.0)); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U, 6.5e-259], N[Sqrt[N[(N[(N[(n * t), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(U * t), $MachinePrecision] * n), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;U \leq 6.5 \cdot 10^{-259}:\\
\;\;\;\;\sqrt{\left(\left(n \cdot t\right) \cdot U\right) \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\left(U \cdot t\right) \cdot n\right) \cdot 2}\\
\end{array}
\end{array}
if U < 6.50000000000000045e-259Initial program 44.1%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6440.2
Applied rewrites40.2%
if 6.50000000000000045e-259 < U Initial program 48.7%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6429.6
Applied rewrites29.6%
Applied rewrites33.4%
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* t (* (* U n) 2.0))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((t * ((U * n) * 2.0)));
}
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((t * ((u * n) * 2.0d0)))
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((t * ((U * n) * 2.0)));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt((t * ((U * n) * 2.0)))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(t * Float64(Float64(U * n) * 2.0))) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((t * ((U * n) * 2.0))); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(t * N[(N[(U * n), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{t \cdot \left(\left(U \cdot n\right) \cdot 2\right)}
\end{array}
Initial program 46.5%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6434.8
Applied rewrites34.8%
Applied rewrites32.4%
(FPCore (n U t l Om U*) :precision binary64 (* (* (sqrt U) n) 2.0))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return (sqrt(U) * n) * 2.0;
}
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) * n) * 2.0d0
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return (Math.sqrt(U) * n) * 2.0;
}
def code(n, U, t, l, Om, U_42_): return (math.sqrt(U) * n) * 2.0
function code(n, U, t, l, Om, U_42_) return Float64(Float64(sqrt(U) * n) * 2.0) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = (sqrt(U) * n) * 2.0; end
code[n_, U_, t_, l_, Om_, U$42$_] := N[(N[(N[Sqrt[U], $MachinePrecision] * n), $MachinePrecision] * 2.0), $MachinePrecision]
\begin{array}{l}
\\
\left(\sqrt{U} \cdot n\right) \cdot 2
\end{array}
Initial program 46.5%
Applied rewrites23.0%
Taylor expanded in n around inf
lower-*.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower--.f64N/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-sqrt.f6411.1
Applied rewrites11.1%
Taylor expanded in l around 0
Applied rewrites2.7%
herbie shell --seed 2024354
(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*))))))