
(FPCore (u v t1) :precision binary64 (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))
double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-t1 * v) / ((t1 + u) * (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
def code(u, v, t1): return (-t1 * v) / ((t1 + u) * (t1 + u))
function code(u, v, t1) return Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (-t1 * v) / ((t1 + u) * (t1 + u)); end
code[u_, v_, t1_] := N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (u v t1) :precision binary64 (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))
double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-t1 * v) / ((t1 + u) * (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
def code(u, v, t1): return (-t1 * v) / ((t1 + u) * (t1 + u))
function code(u, v, t1) return Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (-t1 * v) / ((t1 + u) * (t1 + u)); end
code[u_, v_, t1_] := N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}
\end{array}
(FPCore (u v t1) :precision binary64 (* (/ (- t1) (+ t1 u)) (/ v (+ t1 u))))
double code(double u, double v, double t1) {
return (-t1 / (t1 + u)) * (v / (t1 + u));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-t1 / (t1 + u)) * (v / (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (-t1 / (t1 + u)) * (v / (t1 + u));
}
def code(u, v, t1): return (-t1 / (t1 + u)) * (v / (t1 + u))
function code(u, v, t1) return Float64(Float64(Float64(-t1) / Float64(t1 + u)) * Float64(v / Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (-t1 / (t1 + u)) * (v / (t1 + u)); end
code[u_, v_, t1_] := N[(N[((-t1) / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{-t1}{t1 + u} \cdot \frac{v}{t1 + u}
\end{array}
Initial program 74.1%
times-frac98.4%
Simplified98.4%
Final simplification98.4%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ (+ t1 u) v)))
(if (<= u -5.8e-91)
(/ (/ t1 (- t1 u)) t_1)
(if (<= u 5.2e-14) (/ (- v) t1) (/ (/ t1 t_1) (- t1 u))))))
double code(double u, double v, double t1) {
double t_1 = (t1 + u) / v;
double tmp;
if (u <= -5.8e-91) {
tmp = (t1 / (t1 - u)) / t_1;
} else if (u <= 5.2e-14) {
tmp = -v / t1;
} else {
tmp = (t1 / t_1) / (t1 - u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: t_1
real(8) :: tmp
t_1 = (t1 + u) / v
if (u <= (-5.8d-91)) then
tmp = (t1 / (t1 - u)) / t_1
else if (u <= 5.2d-14) then
tmp = -v / t1
else
tmp = (t1 / t_1) / (t1 - u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = (t1 + u) / v;
double tmp;
if (u <= -5.8e-91) {
tmp = (t1 / (t1 - u)) / t_1;
} else if (u <= 5.2e-14) {
tmp = -v / t1;
} else {
tmp = (t1 / t_1) / (t1 - u);
}
return tmp;
}
def code(u, v, t1): t_1 = (t1 + u) / v tmp = 0 if u <= -5.8e-91: tmp = (t1 / (t1 - u)) / t_1 elif u <= 5.2e-14: tmp = -v / t1 else: tmp = (t1 / t_1) / (t1 - u) return tmp
function code(u, v, t1) t_1 = Float64(Float64(t1 + u) / v) tmp = 0.0 if (u <= -5.8e-91) tmp = Float64(Float64(t1 / Float64(t1 - u)) / t_1); elseif (u <= 5.2e-14) tmp = Float64(Float64(-v) / t1); else tmp = Float64(Float64(t1 / t_1) / Float64(t1 - u)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = (t1 + u) / v; tmp = 0.0; if (u <= -5.8e-91) tmp = (t1 / (t1 - u)) / t_1; elseif (u <= 5.2e-14) tmp = -v / t1; else tmp = (t1 / t_1) / (t1 - u); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(N[(t1 + u), $MachinePrecision] / v), $MachinePrecision]}, If[LessEqual[u, -5.8e-91], N[(N[(t1 / N[(t1 - u), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[u, 5.2e-14], N[((-v) / t1), $MachinePrecision], N[(N[(t1 / t$95$1), $MachinePrecision] / N[(t1 - u), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t1 + u}{v}\\
\mathbf{if}\;u \leq -5.8 \cdot 10^{-91}:\\
\;\;\;\;\frac{\frac{t1}{t1 - u}}{t_1}\\
\mathbf{elif}\;u \leq 5.2 \cdot 10^{-14}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t1}{t_1}}{t1 - u}\\
\end{array}
\end{array}
if u < -5.8000000000000001e-91Initial program 80.2%
times-frac99.1%
Simplified99.1%
*-commutative99.1%
clear-num98.7%
frac-2neg98.7%
frac-times93.0%
*-un-lft-identity93.0%
remove-double-neg93.0%
distribute-neg-in93.0%
add-sqr-sqrt47.0%
sqrt-unprod83.0%
sqr-neg83.0%
sqrt-unprod42.0%
add-sqr-sqrt79.2%
sub-neg79.2%
Applied egg-rr79.2%
*-commutative79.2%
associate-/r*81.3%
Simplified81.3%
if -5.8000000000000001e-91 < u < 5.19999999999999993e-14Initial program 66.3%
times-frac99.9%
Simplified99.9%
Taylor expanded in t1 around inf 88.3%
associate-*r/88.3%
neg-mul-188.3%
Simplified88.3%
if 5.19999999999999993e-14 < u Initial program 80.2%
times-frac94.8%
Simplified94.8%
*-commutative94.8%
clear-num94.7%
frac-2neg94.7%
frac-times89.2%
*-un-lft-identity89.2%
remove-double-neg89.2%
distribute-neg-in89.2%
add-sqr-sqrt51.9%
sqrt-unprod86.4%
sqr-neg86.4%
sqrt-unprod36.0%
add-sqr-sqrt83.4%
sub-neg83.4%
Applied egg-rr83.4%
associate-/r*88.8%
Simplified88.8%
Final simplification86.2%
(FPCore (u v t1) :precision binary64 (if (or (<= u -2.3e-42) (not (<= u 5.2e-14))) (/ t1 (* (- t1 u) (/ u v))) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.3e-42) || !(u <= 5.2e-14)) {
tmp = t1 / ((t1 - u) * (u / v));
} else {
tmp = -v / t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-2.3d-42)) .or. (.not. (u <= 5.2d-14))) then
tmp = t1 / ((t1 - u) * (u / v))
else
tmp = -v / t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.3e-42) || !(u <= 5.2e-14)) {
tmp = t1 / ((t1 - u) * (u / v));
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -2.3e-42) or not (u <= 5.2e-14): tmp = t1 / ((t1 - u) * (u / v)) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -2.3e-42) || !(u <= 5.2e-14)) tmp = Float64(t1 / Float64(Float64(t1 - u) * Float64(u / v))); else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -2.3e-42) || ~((u <= 5.2e-14))) tmp = t1 / ((t1 - u) * (u / v)); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2.3e-42], N[Not[LessEqual[u, 5.2e-14]], $MachinePrecision]], N[(t1 / N[(N[(t1 - u), $MachinePrecision] * N[(u / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.3 \cdot 10^{-42} \lor \neg \left(u \leq 5.2 \cdot 10^{-14}\right):\\
\;\;\;\;\frac{t1}{\left(t1 - u\right) \cdot \frac{u}{v}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -2.30000000000000004e-42 or 5.19999999999999993e-14 < u Initial program 81.3%
times-frac97.1%
Simplified97.1%
Taylor expanded in t1 around 0 80.1%
*-commutative80.1%
clear-num80.0%
frac-2neg80.0%
frac-times83.1%
*-un-lft-identity83.1%
remove-double-neg83.1%
distribute-neg-in83.1%
add-sqr-sqrt43.2%
sqrt-unprod83.1%
sqr-neg83.1%
sqrt-unprod40.0%
add-sqr-sqrt83.1%
sub-neg83.1%
Applied egg-rr83.1%
if -2.30000000000000004e-42 < u < 5.19999999999999993e-14Initial program 65.8%
times-frac99.8%
Simplified99.8%
Taylor expanded in t1 around inf 85.8%
associate-*r/85.8%
neg-mul-185.8%
Simplified85.8%
Final simplification84.3%
(FPCore (u v t1) :precision binary64 (if (<= u -1.7e-42) (/ t1 (* (- t1 u) (/ u v))) (if (<= u 1.35e-12) (/ (- v) t1) (/ (* t1 (/ v u)) (- t1 u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.7e-42) {
tmp = t1 / ((t1 - u) * (u / v));
} else if (u <= 1.35e-12) {
tmp = -v / t1;
} else {
tmp = (t1 * (v / u)) / (t1 - u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-1.7d-42)) then
tmp = t1 / ((t1 - u) * (u / v))
else if (u <= 1.35d-12) then
tmp = -v / t1
else
tmp = (t1 * (v / u)) / (t1 - u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -1.7e-42) {
tmp = t1 / ((t1 - u) * (u / v));
} else if (u <= 1.35e-12) {
tmp = -v / t1;
} else {
tmp = (t1 * (v / u)) / (t1 - u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.7e-42: tmp = t1 / ((t1 - u) * (u / v)) elif u <= 1.35e-12: tmp = -v / t1 else: tmp = (t1 * (v / u)) / (t1 - u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.7e-42) tmp = Float64(t1 / Float64(Float64(t1 - u) * Float64(u / v))); elseif (u <= 1.35e-12) tmp = Float64(Float64(-v) / t1); else tmp = Float64(Float64(t1 * Float64(v / u)) / Float64(t1 - u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -1.7e-42) tmp = t1 / ((t1 - u) * (u / v)); elseif (u <= 1.35e-12) tmp = -v / t1; else tmp = (t1 * (v / u)) / (t1 - u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.7e-42], N[(t1 / N[(N[(t1 - u), $MachinePrecision] * N[(u / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 1.35e-12], N[((-v) / t1), $MachinePrecision], N[(N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision] / N[(t1 - u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.7 \cdot 10^{-42}:\\
\;\;\;\;\frac{t1}{\left(t1 - u\right) \cdot \frac{u}{v}}\\
\mathbf{elif}\;u \leq 1.35 \cdot 10^{-12}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{u}}{t1 - u}\\
\end{array}
\end{array}
if u < -1.70000000000000011e-42Initial program 82.2%
times-frac99.1%
Simplified99.1%
Taylor expanded in t1 around 0 78.1%
*-commutative78.1%
clear-num77.9%
frac-2neg77.9%
frac-times82.9%
*-un-lft-identity82.9%
remove-double-neg82.9%
distribute-neg-in82.9%
add-sqr-sqrt39.6%
sqrt-unprod82.8%
sqr-neg82.8%
sqrt-unprod43.4%
add-sqr-sqrt82.6%
sub-neg82.6%
Applied egg-rr82.6%
if -1.70000000000000011e-42 < u < 1.3499999999999999e-12Initial program 65.8%
times-frac99.8%
Simplified99.8%
Taylor expanded in t1 around inf 85.8%
associate-*r/85.8%
neg-mul-185.8%
Simplified85.8%
if 1.3499999999999999e-12 < u Initial program 80.2%
times-frac94.8%
Simplified94.8%
Taylor expanded in t1 around 0 82.3%
associate-*l/87.3%
frac-2neg87.3%
add-sqr-sqrt47.1%
sqrt-unprod54.2%
sqr-neg54.2%
sqrt-unprod19.3%
add-sqr-sqrt47.9%
distribute-lft-neg-out47.9%
add-sqr-sqrt28.6%
sqrt-unprod55.9%
sqr-neg55.9%
sqrt-unprod40.0%
add-sqr-sqrt87.3%
distribute-neg-in87.3%
add-sqr-sqrt47.2%
sqrt-unprod85.0%
sqr-neg85.0%
sqrt-unprod40.1%
add-sqr-sqrt87.6%
sub-neg87.6%
Applied egg-rr87.6%
Final simplification85.3%
(FPCore (u v t1) :precision binary64 (if (<= u -1.15e-90) (* (/ v (+ t1 u)) (/ (- t1) u)) (if (<= u 3.1e-9) (/ (- v) t1) (/ (* t1 (/ v u)) (- t1 u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.15e-90) {
tmp = (v / (t1 + u)) * (-t1 / u);
} else if (u <= 3.1e-9) {
tmp = -v / t1;
} else {
tmp = (t1 * (v / u)) / (t1 - u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-1.15d-90)) then
tmp = (v / (t1 + u)) * (-t1 / u)
else if (u <= 3.1d-9) then
tmp = -v / t1
else
tmp = (t1 * (v / u)) / (t1 - u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -1.15e-90) {
tmp = (v / (t1 + u)) * (-t1 / u);
} else if (u <= 3.1e-9) {
tmp = -v / t1;
} else {
tmp = (t1 * (v / u)) / (t1 - u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.15e-90: tmp = (v / (t1 + u)) * (-t1 / u) elif u <= 3.1e-9: tmp = -v / t1 else: tmp = (t1 * (v / u)) / (t1 - u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.15e-90) tmp = Float64(Float64(v / Float64(t1 + u)) * Float64(Float64(-t1) / u)); elseif (u <= 3.1e-9) tmp = Float64(Float64(-v) / t1); else tmp = Float64(Float64(t1 * Float64(v / u)) / Float64(t1 - u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -1.15e-90) tmp = (v / (t1 + u)) * (-t1 / u); elseif (u <= 3.1e-9) tmp = -v / t1; else tmp = (t1 * (v / u)) / (t1 - u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.15e-90], N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[((-t1) / u), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 3.1e-9], N[((-v) / t1), $MachinePrecision], N[(N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision] / N[(t1 - u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.15 \cdot 10^{-90}:\\
\;\;\;\;\frac{v}{t1 + u} \cdot \frac{-t1}{u}\\
\mathbf{elif}\;u \leq 3.1 \cdot 10^{-9}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{u}}{t1 - u}\\
\end{array}
\end{array}
if u < -1.1499999999999999e-90Initial program 80.2%
times-frac99.1%
Simplified99.1%
Taylor expanded in t1 around 0 80.9%
associate-*r/76.1%
mul-1-neg76.1%
Simplified80.9%
if -1.1499999999999999e-90 < u < 3.10000000000000005e-9Initial program 66.3%
times-frac99.9%
Simplified99.9%
Taylor expanded in t1 around inf 88.3%
associate-*r/88.3%
neg-mul-188.3%
Simplified88.3%
if 3.10000000000000005e-9 < u Initial program 80.2%
times-frac94.8%
Simplified94.8%
Taylor expanded in t1 around 0 82.3%
associate-*l/87.3%
frac-2neg87.3%
add-sqr-sqrt47.1%
sqrt-unprod54.2%
sqr-neg54.2%
sqrt-unprod19.3%
add-sqr-sqrt47.9%
distribute-lft-neg-out47.9%
add-sqr-sqrt28.6%
sqrt-unprod55.9%
sqr-neg55.9%
sqrt-unprod40.0%
add-sqr-sqrt87.3%
distribute-neg-in87.3%
add-sqr-sqrt47.2%
sqrt-unprod85.0%
sqr-neg85.0%
sqrt-unprod40.1%
add-sqr-sqrt87.6%
sub-neg87.6%
Applied egg-rr87.6%
Final simplification85.8%
(FPCore (u v t1) :precision binary64 (if (<= u -2.1e-90) (/ (/ t1 (- t1 u)) (/ (+ t1 u) v)) (if (<= u 1.5e-13) (/ (- v) t1) (/ (* t1 (/ v u)) (- t1 u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -2.1e-90) {
tmp = (t1 / (t1 - u)) / ((t1 + u) / v);
} else if (u <= 1.5e-13) {
tmp = -v / t1;
} else {
tmp = (t1 * (v / u)) / (t1 - u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-2.1d-90)) then
tmp = (t1 / (t1 - u)) / ((t1 + u) / v)
else if (u <= 1.5d-13) then
tmp = -v / t1
else
tmp = (t1 * (v / u)) / (t1 - u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -2.1e-90) {
tmp = (t1 / (t1 - u)) / ((t1 + u) / v);
} else if (u <= 1.5e-13) {
tmp = -v / t1;
} else {
tmp = (t1 * (v / u)) / (t1 - u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -2.1e-90: tmp = (t1 / (t1 - u)) / ((t1 + u) / v) elif u <= 1.5e-13: tmp = -v / t1 else: tmp = (t1 * (v / u)) / (t1 - u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -2.1e-90) tmp = Float64(Float64(t1 / Float64(t1 - u)) / Float64(Float64(t1 + u) / v)); elseif (u <= 1.5e-13) tmp = Float64(Float64(-v) / t1); else tmp = Float64(Float64(t1 * Float64(v / u)) / Float64(t1 - u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -2.1e-90) tmp = (t1 / (t1 - u)) / ((t1 + u) / v); elseif (u <= 1.5e-13) tmp = -v / t1; else tmp = (t1 * (v / u)) / (t1 - u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -2.1e-90], N[(N[(t1 / N[(t1 - u), $MachinePrecision]), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 1.5e-13], N[((-v) / t1), $MachinePrecision], N[(N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision] / N[(t1 - u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.1 \cdot 10^{-90}:\\
\;\;\;\;\frac{\frac{t1}{t1 - u}}{\frac{t1 + u}{v}}\\
\mathbf{elif}\;u \leq 1.5 \cdot 10^{-13}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{u}}{t1 - u}\\
\end{array}
\end{array}
if u < -2.0999999999999999e-90Initial program 80.2%
times-frac99.1%
Simplified99.1%
*-commutative99.1%
clear-num98.7%
frac-2neg98.7%
frac-times93.0%
*-un-lft-identity93.0%
remove-double-neg93.0%
distribute-neg-in93.0%
add-sqr-sqrt47.0%
sqrt-unprod83.0%
sqr-neg83.0%
sqrt-unprod42.0%
add-sqr-sqrt79.2%
sub-neg79.2%
Applied egg-rr79.2%
*-commutative79.2%
associate-/r*81.3%
Simplified81.3%
if -2.0999999999999999e-90 < u < 1.49999999999999992e-13Initial program 66.3%
times-frac99.9%
Simplified99.9%
Taylor expanded in t1 around inf 88.3%
associate-*r/88.3%
neg-mul-188.3%
Simplified88.3%
if 1.49999999999999992e-13 < u Initial program 80.2%
times-frac94.8%
Simplified94.8%
Taylor expanded in t1 around 0 82.3%
associate-*l/87.3%
frac-2neg87.3%
add-sqr-sqrt47.1%
sqrt-unprod54.2%
sqr-neg54.2%
sqrt-unprod19.3%
add-sqr-sqrt47.9%
distribute-lft-neg-out47.9%
add-sqr-sqrt28.6%
sqrt-unprod55.9%
sqr-neg55.9%
sqrt-unprod40.0%
add-sqr-sqrt87.3%
distribute-neg-in87.3%
add-sqr-sqrt47.2%
sqrt-unprod85.0%
sqr-neg85.0%
sqrt-unprod40.1%
add-sqr-sqrt87.6%
sub-neg87.6%
Applied egg-rr87.6%
Final simplification85.9%
(FPCore (u v t1) :precision binary64 (if (or (<= u -2.1e-90) (not (<= u 8e-8))) (* (/ v u) (/ (- t1) u)) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.1e-90) || !(u <= 8e-8)) {
tmp = (v / u) * (-t1 / u);
} else {
tmp = -v / t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-2.1d-90)) .or. (.not. (u <= 8d-8))) then
tmp = (v / u) * (-t1 / u)
else
tmp = -v / t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.1e-90) || !(u <= 8e-8)) {
tmp = (v / u) * (-t1 / u);
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -2.1e-90) or not (u <= 8e-8): tmp = (v / u) * (-t1 / u) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -2.1e-90) || !(u <= 8e-8)) tmp = Float64(Float64(v / u) * Float64(Float64(-t1) / u)); else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -2.1e-90) || ~((u <= 8e-8))) tmp = (v / u) * (-t1 / u); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2.1e-90], N[Not[LessEqual[u, 8e-8]], $MachinePrecision]], N[(N[(v / u), $MachinePrecision] * N[((-t1) / u), $MachinePrecision]), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.1 \cdot 10^{-90} \lor \neg \left(u \leq 8 \cdot 10^{-8}\right):\\
\;\;\;\;\frac{v}{u} \cdot \frac{-t1}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -2.0999999999999999e-90 or 8.0000000000000002e-8 < u Initial program 80.2%
times-frac97.2%
Simplified97.2%
Taylor expanded in t1 around 0 79.0%
Taylor expanded in t1 around 0 78.9%
associate-*r/78.9%
mul-1-neg78.9%
Simplified78.9%
if -2.0999999999999999e-90 < u < 8.0000000000000002e-8Initial program 66.3%
times-frac99.9%
Simplified99.9%
Taylor expanded in t1 around inf 88.3%
associate-*r/88.3%
neg-mul-188.3%
Simplified88.3%
Final simplification83.0%
(FPCore (u v t1) :precision binary64 (if (or (<= u -6.5e+130) (not (<= u 3.4e+198))) (/ t1 (/ (* t1 u) v)) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -6.5e+130) || !(u <= 3.4e+198)) {
tmp = t1 / ((t1 * u) / v);
} else {
tmp = -v / t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-6.5d+130)) .or. (.not. (u <= 3.4d+198))) then
tmp = t1 / ((t1 * u) / v)
else
tmp = -v / t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -6.5e+130) || !(u <= 3.4e+198)) {
tmp = t1 / ((t1 * u) / v);
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -6.5e+130) or not (u <= 3.4e+198): tmp = t1 / ((t1 * u) / v) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -6.5e+130) || !(u <= 3.4e+198)) tmp = Float64(t1 / Float64(Float64(t1 * u) / v)); else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -6.5e+130) || ~((u <= 3.4e+198))) tmp = t1 / ((t1 * u) / v); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -6.5e+130], N[Not[LessEqual[u, 3.4e+198]], $MachinePrecision]], N[(t1 / N[(N[(t1 * u), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -6.5 \cdot 10^{+130} \lor \neg \left(u \leq 3.4 \cdot 10^{+198}\right):\\
\;\;\;\;\frac{t1}{\frac{t1 \cdot u}{v}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -6.5e130 or 3.4e198 < u Initial program 79.8%
times-frac99.9%
Simplified99.9%
Taylor expanded in t1 around 0 92.5%
*-commutative92.5%
clear-num92.4%
frac-2neg92.4%
frac-times86.6%
*-un-lft-identity86.6%
remove-double-neg86.6%
distribute-neg-in86.6%
add-sqr-sqrt41.7%
sqrt-unprod86.5%
sqr-neg86.5%
sqrt-unprod44.9%
add-sqr-sqrt86.4%
sub-neg86.4%
Applied egg-rr86.4%
Taylor expanded in u around 0 40.7%
if -6.5e130 < u < 3.4e198Initial program 72.4%
times-frac97.9%
Simplified97.9%
Taylor expanded in t1 around inf 62.7%
associate-*r/62.7%
neg-mul-162.7%
Simplified62.7%
Final simplification57.7%
(FPCore (u v t1) :precision binary64 (if (<= u -5.6e+138) (/ v u) (if (<= u 3.4e+198) (/ (- v) t1) (/ (* v -0.5) u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -5.6e+138) {
tmp = v / u;
} else if (u <= 3.4e+198) {
tmp = -v / t1;
} else {
tmp = (v * -0.5) / u;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-5.6d+138)) then
tmp = v / u
else if (u <= 3.4d+198) then
tmp = -v / t1
else
tmp = (v * (-0.5d0)) / u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -5.6e+138) {
tmp = v / u;
} else if (u <= 3.4e+198) {
tmp = -v / t1;
} else {
tmp = (v * -0.5) / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -5.6e+138: tmp = v / u elif u <= 3.4e+198: tmp = -v / t1 else: tmp = (v * -0.5) / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -5.6e+138) tmp = Float64(v / u); elseif (u <= 3.4e+198) tmp = Float64(Float64(-v) / t1); else tmp = Float64(Float64(v * -0.5) / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -5.6e+138) tmp = v / u; elseif (u <= 3.4e+198) tmp = -v / t1; else tmp = (v * -0.5) / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -5.6e+138], N[(v / u), $MachinePrecision], If[LessEqual[u, 3.4e+198], N[((-v) / t1), $MachinePrecision], N[(N[(v * -0.5), $MachinePrecision] / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -5.6 \cdot 10^{+138}:\\
\;\;\;\;\frac{v}{u}\\
\mathbf{elif}\;u \leq 3.4 \cdot 10^{+198}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v \cdot -0.5}{u}\\
\end{array}
\end{array}
if u < -5.6000000000000002e138Initial program 80.7%
times-frac99.9%
Simplified99.9%
Taylor expanded in t1 around 0 91.9%
associate-*l/91.7%
frac-2neg91.7%
add-sqr-sqrt40.0%
sqrt-unprod80.4%
sqr-neg80.4%
sqrt-unprod46.4%
add-sqr-sqrt81.2%
distribute-lft-neg-out81.2%
add-sqr-sqrt34.8%
sqrt-unprod77.7%
sqr-neg77.7%
sqrt-unprod51.6%
add-sqr-sqrt91.7%
distribute-neg-in91.7%
add-sqr-sqrt40.1%
sqrt-unprod89.1%
sqr-neg89.1%
sqrt-unprod51.9%
add-sqr-sqrt91.9%
sub-neg91.9%
Applied egg-rr91.9%
Taylor expanded in t1 around inf 32.0%
if -5.6000000000000002e138 < u < 3.4e198Initial program 72.7%
times-frac98.0%
Simplified98.0%
Taylor expanded in t1 around inf 62.6%
associate-*r/62.6%
neg-mul-162.6%
Simplified62.6%
if 3.4e198 < u Initial program 76.4%
Taylor expanded in t1 around 0 71.6%
+-commutative71.6%
unpow271.6%
associate-*r*71.6%
distribute-rgt-out76.4%
Simplified76.4%
Taylor expanded in t1 around inf 32.4%
associate-*r/32.4%
Simplified32.4%
Final simplification56.0%
(FPCore (u v t1) :precision binary64 (if (<= u -6.6e+130) (/ t1 (* t1 (/ u v))) (if (<= u 1e+199) (/ (- v) t1) (/ (* v -0.5) u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -6.6e+130) {
tmp = t1 / (t1 * (u / v));
} else if (u <= 1e+199) {
tmp = -v / t1;
} else {
tmp = (v * -0.5) / u;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-6.6d+130)) then
tmp = t1 / (t1 * (u / v))
else if (u <= 1d+199) then
tmp = -v / t1
else
tmp = (v * (-0.5d0)) / u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -6.6e+130) {
tmp = t1 / (t1 * (u / v));
} else if (u <= 1e+199) {
tmp = -v / t1;
} else {
tmp = (v * -0.5) / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -6.6e+130: tmp = t1 / (t1 * (u / v)) elif u <= 1e+199: tmp = -v / t1 else: tmp = (v * -0.5) / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -6.6e+130) tmp = Float64(t1 / Float64(t1 * Float64(u / v))); elseif (u <= 1e+199) tmp = Float64(Float64(-v) / t1); else tmp = Float64(Float64(v * -0.5) / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -6.6e+130) tmp = t1 / (t1 * (u / v)); elseif (u <= 1e+199) tmp = -v / t1; else tmp = (v * -0.5) / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -6.6e+130], N[(t1 / N[(t1 * N[(u / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 1e+199], N[((-v) / t1), $MachinePrecision], N[(N[(v * -0.5), $MachinePrecision] / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -6.6 \cdot 10^{+130}:\\
\;\;\;\;\frac{t1}{t1 \cdot \frac{u}{v}}\\
\mathbf{elif}\;u \leq 10^{+199}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v \cdot -0.5}{u}\\
\end{array}
\end{array}
if u < -6.6e130Initial program 81.7%
times-frac99.9%
Simplified99.9%
Taylor expanded in t1 around 0 89.5%
*-commutative89.5%
clear-num89.4%
frac-2neg89.4%
frac-times89.5%
*-un-lft-identity89.5%
remove-double-neg89.5%
distribute-neg-in89.5%
add-sqr-sqrt40.7%
sqrt-unprod89.3%
sqr-neg89.3%
sqrt-unprod48.8%
add-sqr-sqrt89.3%
sub-neg89.3%
Applied egg-rr89.3%
Taylor expanded in u around 0 43.5%
associate-*r/35.7%
Simplified35.7%
if -6.6e130 < u < 1.0000000000000001e199Initial program 72.4%
times-frac97.9%
Simplified97.9%
Taylor expanded in t1 around inf 62.7%
associate-*r/62.7%
neg-mul-162.7%
Simplified62.7%
if 1.0000000000000001e199 < u Initial program 76.4%
Taylor expanded in t1 around 0 71.6%
+-commutative71.6%
unpow271.6%
associate-*r*71.6%
distribute-rgt-out76.4%
Simplified76.4%
Taylor expanded in t1 around inf 32.4%
associate-*r/32.4%
Simplified32.4%
Final simplification56.3%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.85e+139) (not (<= u 6.6e+198))) (/ v u) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.85e+139) || !(u <= 6.6e+198)) {
tmp = v / u;
} else {
tmp = -v / t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-1.85d+139)) .or. (.not. (u <= 6.6d+198))) then
tmp = v / u
else
tmp = -v / t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.85e+139) || !(u <= 6.6e+198)) {
tmp = v / u;
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.85e+139) or not (u <= 6.6e+198): tmp = v / u else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.85e+139) || !(u <= 6.6e+198)) tmp = Float64(v / u); else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -1.85e+139) || ~((u <= 6.6e+198))) tmp = v / u; else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.85e+139], N[Not[LessEqual[u, 6.6e+198]], $MachinePrecision]], N[(v / u), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.85 \cdot 10^{+139} \lor \neg \left(u \leq 6.6 \cdot 10^{+198}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -1.84999999999999996e139 or 6.59999999999999988e198 < u Initial program 79.1%
times-frac99.9%
Simplified99.9%
Taylor expanded in t1 around 0 94.1%
associate-*l/94.0%
frac-2neg94.0%
add-sqr-sqrt42.8%
sqrt-unprod80.3%
sqr-neg80.3%
sqrt-unprod43.1%
add-sqr-sqrt79.4%
distribute-lft-neg-out79.4%
add-sqr-sqrt36.3%
sqrt-unprod75.8%
sqr-neg75.8%
sqrt-unprod51.1%
add-sqr-sqrt94.0%
distribute-neg-in94.0%
add-sqr-sqrt42.9%
sqrt-unprod88.0%
sqr-neg88.0%
sqrt-unprod51.2%
add-sqr-sqrt94.0%
sub-neg94.0%
Applied egg-rr94.0%
Taylor expanded in t1 around inf 31.8%
if -1.84999999999999996e139 < u < 6.59999999999999988e198Initial program 72.7%
times-frac98.0%
Simplified98.0%
Taylor expanded in t1 around inf 62.6%
associate-*r/62.6%
neg-mul-162.6%
Simplified62.6%
Final simplification55.9%
(FPCore (u v t1) :precision binary64 (if (<= u -2.35e+138) (/ v u) (if (<= u 3.9e+198) (/ (- v) t1) (/ (- v) u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -2.35e+138) {
tmp = v / u;
} else if (u <= 3.9e+198) {
tmp = -v / t1;
} else {
tmp = -v / u;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-2.35d+138)) then
tmp = v / u
else if (u <= 3.9d+198) then
tmp = -v / t1
else
tmp = -v / u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -2.35e+138) {
tmp = v / u;
} else if (u <= 3.9e+198) {
tmp = -v / t1;
} else {
tmp = -v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -2.35e+138: tmp = v / u elif u <= 3.9e+198: tmp = -v / t1 else: tmp = -v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -2.35e+138) tmp = Float64(v / u); elseif (u <= 3.9e+198) tmp = Float64(Float64(-v) / t1); else tmp = Float64(Float64(-v) / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -2.35e+138) tmp = v / u; elseif (u <= 3.9e+198) tmp = -v / t1; else tmp = -v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -2.35e+138], N[(v / u), $MachinePrecision], If[LessEqual[u, 3.9e+198], N[((-v) / t1), $MachinePrecision], N[((-v) / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.35 \cdot 10^{+138}:\\
\;\;\;\;\frac{v}{u}\\
\mathbf{elif}\;u \leq 3.9 \cdot 10^{+198}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{u}\\
\end{array}
\end{array}
if u < -2.3499999999999999e138Initial program 80.7%
times-frac99.9%
Simplified99.9%
Taylor expanded in t1 around 0 91.9%
associate-*l/91.7%
frac-2neg91.7%
add-sqr-sqrt40.0%
sqrt-unprod80.4%
sqr-neg80.4%
sqrt-unprod46.4%
add-sqr-sqrt81.2%
distribute-lft-neg-out81.2%
add-sqr-sqrt34.8%
sqrt-unprod77.7%
sqr-neg77.7%
sqrt-unprod51.6%
add-sqr-sqrt91.7%
distribute-neg-in91.7%
add-sqr-sqrt40.1%
sqrt-unprod89.1%
sqr-neg89.1%
sqrt-unprod51.9%
add-sqr-sqrt91.9%
sub-neg91.9%
Applied egg-rr91.9%
Taylor expanded in t1 around inf 32.0%
if -2.3499999999999999e138 < u < 3.9e198Initial program 72.7%
times-frac98.0%
Simplified98.0%
Taylor expanded in t1 around inf 62.6%
associate-*r/62.6%
neg-mul-162.6%
Simplified62.6%
if 3.9e198 < u Initial program 76.4%
times-frac99.9%
Simplified99.9%
Taylor expanded in t1 around 0 97.8%
Taylor expanded in t1 around inf 32.4%
associate-*r/32.4%
neg-mul-132.4%
Simplified32.4%
Final simplification56.0%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -4.6e+87) (not (<= t1 1.35e+179))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -4.6e+87) || !(t1 <= 1.35e+179)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-4.6d+87)) .or. (.not. (t1 <= 1.35d+179))) then
tmp = v / t1
else
tmp = v / u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -4.6e+87) || !(t1 <= 1.35e+179)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -4.6e+87) or not (t1 <= 1.35e+179): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -4.6e+87) || !(t1 <= 1.35e+179)) tmp = Float64(v / t1); else tmp = Float64(v / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -4.6e+87) || ~((t1 <= 1.35e+179))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -4.6e+87], N[Not[LessEqual[t1, 1.35e+179]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -4.6 \cdot 10^{+87} \lor \neg \left(t1 \leq 1.35 \cdot 10^{+179}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -4.6000000000000003e87 or 1.34999999999999991e179 < t1 Initial program 40.4%
times-frac99.9%
Simplified99.9%
*-commutative99.9%
clear-num99.2%
frac-2neg99.2%
frac-times68.2%
*-un-lft-identity68.2%
remove-double-neg68.2%
distribute-neg-in68.2%
add-sqr-sqrt45.7%
sqrt-unprod41.8%
sqr-neg41.8%
sqrt-unprod12.6%
add-sqr-sqrt31.2%
sub-neg31.2%
Applied egg-rr31.2%
associate-/r*33.3%
Simplified33.3%
Taylor expanded in t1 around inf 29.0%
if -4.6000000000000003e87 < t1 < 1.34999999999999991e179Initial program 84.0%
times-frac97.9%
Simplified97.9%
Taylor expanded in t1 around 0 68.5%
associate-*l/69.4%
frac-2neg69.4%
add-sqr-sqrt34.6%
sqrt-unprod41.5%
sqr-neg41.5%
sqrt-unprod17.6%
add-sqr-sqrt36.1%
distribute-lft-neg-out36.1%
add-sqr-sqrt18.6%
sqrt-unprod41.1%
sqr-neg41.1%
sqrt-unprod34.7%
add-sqr-sqrt69.4%
distribute-neg-in69.4%
add-sqr-sqrt34.7%
sqrt-unprod70.0%
sqr-neg70.0%
sqrt-unprod33.8%
add-sqr-sqrt68.5%
sub-neg68.5%
Applied egg-rr68.5%
Taylor expanded in t1 around inf 16.0%
Final simplification19.0%
(FPCore (u v t1) :precision binary64 (/ (/ (- v) (+ t1 u)) (+ (/ u t1) 1.0)))
double code(double u, double v, double t1) {
return (-v / (t1 + u)) / ((u / t1) + 1.0);
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-v / (t1 + u)) / ((u / t1) + 1.0d0)
end function
public static double code(double u, double v, double t1) {
return (-v / (t1 + u)) / ((u / t1) + 1.0);
}
def code(u, v, t1): return (-v / (t1 + u)) / ((u / t1) + 1.0)
function code(u, v, t1) return Float64(Float64(Float64(-v) / Float64(t1 + u)) / Float64(Float64(u / t1) + 1.0)) end
function tmp = code(u, v, t1) tmp = (-v / (t1 + u)) / ((u / t1) + 1.0); end
code[u_, v_, t1_] := N[(N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[(N[(u / t1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{-v}{t1 + u}}{\frac{u}{t1} + 1}
\end{array}
Initial program 74.1%
associate-/r*83.3%
*-commutative83.3%
associate-/l*97.5%
associate-/l/91.5%
+-commutative91.5%
remove-double-neg91.5%
unsub-neg91.5%
div-sub91.5%
sub-neg91.5%
*-inverses91.5%
metadata-eval91.5%
Simplified91.5%
Taylor expanded in v around 0 91.5%
associate-/r*98.2%
fma-neg98.2%
metadata-eval98.2%
Simplified98.2%
frac-2neg98.2%
distribute-frac-neg98.2%
fma-udef98.2%
distribute-neg-in98.2%
mul-1-neg98.2%
add-sqr-sqrt48.9%
sqrt-unprod74.7%
sqr-neg74.7%
sqrt-unprod36.6%
add-sqr-sqrt72.2%
distribute-frac-neg72.2%
frac-2neg72.2%
add-sqr-sqrt35.6%
sqrt-unprod74.6%
sqr-neg74.6%
sqrt-unprod49.2%
add-sqr-sqrt98.2%
distribute-frac-neg98.2%
frac-2neg98.2%
metadata-eval98.2%
Applied egg-rr98.2%
Final simplification98.2%
(FPCore (u v t1) :precision binary64 (/ v (- (* u -2.0) t1)))
double code(double u, double v, double t1) {
return v / ((u * -2.0) - t1);
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = v / ((u * (-2.0d0)) - t1)
end function
public static double code(double u, double v, double t1) {
return v / ((u * -2.0) - t1);
}
def code(u, v, t1): return v / ((u * -2.0) - t1)
function code(u, v, t1) return Float64(v / Float64(Float64(u * -2.0) - t1)) end
function tmp = code(u, v, t1) tmp = v / ((u * -2.0) - t1); end
code[u_, v_, t1_] := N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{u \cdot -2 - t1}
\end{array}
Initial program 74.1%
associate-/r*83.3%
*-commutative83.3%
associate-/l*97.5%
associate-/l/91.5%
+-commutative91.5%
remove-double-neg91.5%
unsub-neg91.5%
div-sub91.5%
sub-neg91.5%
*-inverses91.5%
metadata-eval91.5%
Simplified91.5%
Taylor expanded in t1 around inf 56.8%
mul-1-neg56.8%
unsub-neg56.8%
*-commutative56.8%
Simplified56.8%
Final simplification56.8%
(FPCore (u v t1) :precision binary64 (/ v t1))
double code(double u, double v, double t1) {
return v / t1;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = v / t1
end function
public static double code(double u, double v, double t1) {
return v / t1;
}
def code(u, v, t1): return v / t1
function code(u, v, t1) return Float64(v / t1) end
function tmp = code(u, v, t1) tmp = v / t1; end
code[u_, v_, t1_] := N[(v / t1), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{t1}
\end{array}
Initial program 74.1%
times-frac98.4%
Simplified98.4%
*-commutative98.4%
clear-num98.1%
frac-2neg98.1%
frac-times86.7%
*-un-lft-identity86.7%
remove-double-neg86.7%
distribute-neg-in86.7%
add-sqr-sqrt43.5%
sqrt-unprod67.0%
sqr-neg67.0%
sqrt-unprod27.2%
add-sqr-sqrt57.1%
sub-neg57.1%
Applied egg-rr57.1%
associate-/r*59.3%
Simplified59.3%
Taylor expanded in t1 around inf 9.7%
Final simplification9.7%
herbie shell --seed 2024020
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))