
(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 (/ (/ v (- -1.0 (/ u t1))) (+ u t1)))
double code(double u, double v, double t1) {
return (v / (-1.0 - (u / t1))) / (u + 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 / ((-1.0d0) - (u / t1))) / (u + t1)
end function
public static double code(double u, double v, double t1) {
return (v / (-1.0 - (u / t1))) / (u + t1);
}
def code(u, v, t1): return (v / (-1.0 - (u / t1))) / (u + t1)
function code(u, v, t1) return Float64(Float64(v / Float64(-1.0 - Float64(u / t1))) / Float64(u + t1)) end
function tmp = code(u, v, t1) tmp = (v / (-1.0 - (u / t1))) / (u + t1); end
code[u_, v_, t1_] := N[(N[(v / N[(-1.0 - N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(u + t1), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{v}{-1 - \frac{u}{t1}}}{u + t1}
\end{array}
Initial program 78.5%
times-frac97.2%
Simplified97.2%
associate-*r/97.7%
clear-num97.5%
associate-*l/97.5%
*-un-lft-identity97.5%
frac-2neg97.5%
distribute-neg-in97.5%
add-sqr-sqrt48.9%
sqrt-unprod75.4%
sqr-neg75.4%
sqrt-unprod34.5%
add-sqr-sqrt65.8%
sub-neg65.8%
remove-double-neg65.8%
Applied egg-rr65.8%
frac-2neg65.8%
distribute-frac-neg65.8%
add-sqr-sqrt31.3%
sqrt-unprod45.1%
sqr-neg45.1%
sqrt-unprod35.6%
add-sqr-sqrt74.3%
neg-sub074.3%
div-sub74.3%
*-inverses74.3%
sub-neg74.3%
add-sqr-sqrt35.7%
sqrt-unprod76.6%
sqr-neg76.6%
sqrt-unprod49.1%
add-sqr-sqrt97.5%
distribute-frac-neg97.5%
frac-2neg97.5%
Applied egg-rr97.5%
associate--r+97.5%
metadata-eval97.5%
Simplified97.5%
Final simplification97.5%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -4.8e-88) (not (<= t1 3e-8))) (/ v (- (* u -2.0) t1)) (- (/ (/ (* v t1) u) (+ u t1)))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -4.8e-88) || !(t1 <= 3e-8)) {
tmp = v / ((u * -2.0) - t1);
} else {
tmp = -(((v * t1) / u) / (u + 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 ((t1 <= (-4.8d-88)) .or. (.not. (t1 <= 3d-8))) then
tmp = v / ((u * (-2.0d0)) - t1)
else
tmp = -(((v * t1) / u) / (u + t1))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -4.8e-88) || !(t1 <= 3e-8)) {
tmp = v / ((u * -2.0) - t1);
} else {
tmp = -(((v * t1) / u) / (u + t1));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -4.8e-88) or not (t1 <= 3e-8): tmp = v / ((u * -2.0) - t1) else: tmp = -(((v * t1) / u) / (u + t1)) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -4.8e-88) || !(t1 <= 3e-8)) tmp = Float64(v / Float64(Float64(u * -2.0) - t1)); else tmp = Float64(-Float64(Float64(Float64(v * t1) / u) / Float64(u + t1))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -4.8e-88) || ~((t1 <= 3e-8))) tmp = v / ((u * -2.0) - t1); else tmp = -(((v * t1) / u) / (u + t1)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -4.8e-88], N[Not[LessEqual[t1, 3e-8]], $MachinePrecision]], N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision], (-N[(N[(N[(v * t1), $MachinePrecision] / u), $MachinePrecision] / N[(u + t1), $MachinePrecision]), $MachinePrecision])]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -4.8 \cdot 10^{-88} \lor \neg \left(t1 \leq 3 \cdot 10^{-8}\right):\\
\;\;\;\;\frac{v}{u \cdot -2 - t1}\\
\mathbf{else}:\\
\;\;\;\;-\frac{\frac{v \cdot t1}{u}}{u + t1}\\
\end{array}
\end{array}
if t1 < -4.7999999999999999e-88 or 2.99999999999999973e-8 < t1 Initial program 73.7%
associate-/r*80.4%
*-commutative80.4%
associate-/l*99.9%
associate-/l/94.7%
+-commutative94.7%
remove-double-neg94.7%
unsub-neg94.7%
div-sub94.7%
sub-neg94.7%
*-inverses94.7%
metadata-eval94.7%
Simplified94.7%
Taylor expanded in t1 around inf 85.8%
mul-1-neg85.8%
unsub-neg85.8%
*-commutative85.8%
Simplified85.8%
if -4.7999999999999999e-88 < t1 < 2.99999999999999973e-8Initial program 84.6%
times-frac93.8%
Simplified93.8%
associate-*r/94.9%
clear-num94.5%
associate-*l/94.5%
*-un-lft-identity94.5%
frac-2neg94.5%
distribute-neg-in94.5%
add-sqr-sqrt39.5%
sqrt-unprod82.9%
sqr-neg82.9%
sqrt-unprod47.6%
add-sqr-sqrt81.0%
sub-neg81.0%
remove-double-neg81.0%
Applied egg-rr81.0%
Taylor expanded in t1 around 0 82.4%
mul-1-neg82.4%
*-commutative82.4%
Simplified82.4%
Final simplification84.3%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -3.95e-88) (not (<= t1 255000000.0))) (/ v (- (* u -2.0) t1)) (* (/ t1 u) (- (/ v u)))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -3.95e-88) || !(t1 <= 255000000.0)) {
tmp = v / ((u * -2.0) - t1);
} else {
tmp = (t1 / u) * -(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 <= (-3.95d-88)) .or. (.not. (t1 <= 255000000.0d0))) then
tmp = v / ((u * (-2.0d0)) - t1)
else
tmp = (t1 / u) * -(v / u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -3.95e-88) || !(t1 <= 255000000.0)) {
tmp = v / ((u * -2.0) - t1);
} else {
tmp = (t1 / u) * -(v / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -3.95e-88) or not (t1 <= 255000000.0): tmp = v / ((u * -2.0) - t1) else: tmp = (t1 / u) * -(v / u) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -3.95e-88) || !(t1 <= 255000000.0)) tmp = Float64(v / Float64(Float64(u * -2.0) - t1)); else tmp = Float64(Float64(t1 / u) * Float64(-Float64(v / u))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -3.95e-88) || ~((t1 <= 255000000.0))) tmp = v / ((u * -2.0) - t1); else tmp = (t1 / u) * -(v / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -3.95e-88], N[Not[LessEqual[t1, 255000000.0]], $MachinePrecision]], N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision], N[(N[(t1 / u), $MachinePrecision] * (-N[(v / u), $MachinePrecision])), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -3.95 \cdot 10^{-88} \lor \neg \left(t1 \leq 255000000\right):\\
\;\;\;\;\frac{v}{u \cdot -2 - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{u} \cdot \left(-\frac{v}{u}\right)\\
\end{array}
\end{array}
if t1 < -3.94999999999999983e-88 or 2.55e8 < t1 Initial program 73.8%
associate-/r*79.9%
*-commutative79.9%
associate-/l*99.9%
associate-/l/95.3%
+-commutative95.3%
remove-double-neg95.3%
unsub-neg95.3%
div-sub95.3%
sub-neg95.3%
*-inverses95.3%
metadata-eval95.3%
Simplified95.3%
Taylor expanded in t1 around inf 86.2%
mul-1-neg86.2%
unsub-neg86.2%
*-commutative86.2%
Simplified86.2%
if -3.94999999999999983e-88 < t1 < 2.55e8Initial program 84.1%
times-frac94.0%
Simplified94.0%
Taylor expanded in t1 around 0 80.2%
Taylor expanded in t1 around 0 80.4%
associate-*r/80.4%
mul-1-neg80.4%
Simplified80.4%
Final simplification83.6%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -5.1e-88) (not (<= t1 6500000.0))) (/ v (- (* u -2.0) t1)) (/ (* v (/ t1 u)) (- u))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -5.1e-88) || !(t1 <= 6500000.0)) {
tmp = v / ((u * -2.0) - t1);
} else {
tmp = (v * (t1 / u)) / -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 <= (-5.1d-88)) .or. (.not. (t1 <= 6500000.0d0))) then
tmp = v / ((u * (-2.0d0)) - t1)
else
tmp = (v * (t1 / u)) / -u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -5.1e-88) || !(t1 <= 6500000.0)) {
tmp = v / ((u * -2.0) - t1);
} else {
tmp = (v * (t1 / u)) / -u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -5.1e-88) or not (t1 <= 6500000.0): tmp = v / ((u * -2.0) - t1) else: tmp = (v * (t1 / u)) / -u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -5.1e-88) || !(t1 <= 6500000.0)) tmp = Float64(v / Float64(Float64(u * -2.0) - t1)); else tmp = Float64(Float64(v * Float64(t1 / u)) / Float64(-u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -5.1e-88) || ~((t1 <= 6500000.0))) tmp = v / ((u * -2.0) - t1); else tmp = (v * (t1 / u)) / -u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -5.1e-88], N[Not[LessEqual[t1, 6500000.0]], $MachinePrecision]], N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision], N[(N[(v * N[(t1 / u), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -5.1 \cdot 10^{-88} \lor \neg \left(t1 \leq 6500000\right):\\
\;\;\;\;\frac{v}{u \cdot -2 - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v \cdot \frac{t1}{u}}{-u}\\
\end{array}
\end{array}
if t1 < -5.10000000000000046e-88 or 6.5e6 < t1 Initial program 73.8%
associate-/r*79.9%
*-commutative79.9%
associate-/l*99.9%
associate-/l/95.3%
+-commutative95.3%
remove-double-neg95.3%
unsub-neg95.3%
div-sub95.3%
sub-neg95.3%
*-inverses95.3%
metadata-eval95.3%
Simplified95.3%
Taylor expanded in t1 around inf 86.2%
mul-1-neg86.2%
unsub-neg86.2%
*-commutative86.2%
Simplified86.2%
if -5.10000000000000046e-88 < t1 < 6.5e6Initial program 84.1%
times-frac94.0%
Simplified94.0%
Taylor expanded in t1 around 0 80.2%
Taylor expanded in t1 around 0 80.4%
associate-*r/80.4%
mul-1-neg80.4%
Simplified80.4%
*-commutative80.4%
frac-2neg80.4%
remove-double-neg80.4%
associate-*r/80.9%
add-sqr-sqrt47.3%
sqrt-unprod57.3%
sqr-neg57.3%
sqrt-unprod18.8%
add-sqr-sqrt44.0%
*-commutative44.0%
associate-*r/44.2%
associate-*l/44.1%
*-commutative44.1%
add-sqr-sqrt18.8%
sqrt-unprod57.4%
sqr-neg57.4%
sqrt-unprod48.1%
add-sqr-sqrt81.5%
Applied egg-rr81.5%
Final simplification84.1%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -3e-176) (not (<= t1 3.1e-83))) (/ (- v) (- t1 u)) (/ t1 (/ u (/ v u)))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -3e-176) || !(t1 <= 3.1e-83)) {
tmp = -v / (t1 - u);
} else {
tmp = t1 / (u / (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 <= (-3d-176)) .or. (.not. (t1 <= 3.1d-83))) then
tmp = -v / (t1 - u)
else
tmp = t1 / (u / (v / u))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -3e-176) || !(t1 <= 3.1e-83)) {
tmp = -v / (t1 - u);
} else {
tmp = t1 / (u / (v / u));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -3e-176) or not (t1 <= 3.1e-83): tmp = -v / (t1 - u) else: tmp = t1 / (u / (v / u)) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -3e-176) || !(t1 <= 3.1e-83)) tmp = Float64(Float64(-v) / Float64(t1 - u)); else tmp = Float64(t1 / Float64(u / Float64(v / u))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -3e-176) || ~((t1 <= 3.1e-83))) tmp = -v / (t1 - u); else tmp = t1 / (u / (v / u)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -3e-176], N[Not[LessEqual[t1, 3.1e-83]], $MachinePrecision]], N[((-v) / N[(t1 - u), $MachinePrecision]), $MachinePrecision], N[(t1 / N[(u / N[(v / u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -3 \cdot 10^{-176} \lor \neg \left(t1 \leq 3.1 \cdot 10^{-83}\right):\\
\;\;\;\;\frac{-v}{t1 - u}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{\frac{u}{\frac{v}{u}}}\\
\end{array}
\end{array}
if t1 < -3e-176 or 3.09999999999999992e-83 < t1 Initial program 76.1%
times-frac99.9%
Simplified99.9%
associate-*r/99.9%
clear-num99.9%
associate-*l/99.9%
*-un-lft-identity99.9%
frac-2neg99.9%
distribute-neg-in99.9%
add-sqr-sqrt54.0%
sqrt-unprod71.1%
sqr-neg71.1%
sqrt-unprod26.7%
add-sqr-sqrt56.9%
sub-neg56.9%
remove-double-neg56.9%
Applied egg-rr56.9%
Taylor expanded in t1 around inf 36.5%
div-inv36.5%
frac-2neg36.5%
metadata-eval36.5%
distribute-neg-in36.5%
add-sqr-sqrt19.4%
sqrt-unprod51.4%
sqr-neg51.4%
sqrt-unprod35.5%
add-sqr-sqrt78.0%
sub-neg78.0%
Applied egg-rr78.0%
*-commutative78.0%
associate-*l/78.2%
neg-mul-178.2%
Simplified78.2%
if -3e-176 < t1 < 3.09999999999999992e-83Initial program 83.6%
times-frac91.6%
Simplified91.6%
Taylor expanded in t1 around 0 83.4%
Taylor expanded in t1 around 0 83.7%
associate-*r/83.7%
mul-1-neg83.7%
Simplified83.7%
associate-*l/84.2%
associate-/l*81.6%
add-sqr-sqrt34.1%
sqrt-unprod49.3%
sqr-neg49.3%
sqrt-unprod28.9%
add-sqr-sqrt49.0%
Applied egg-rr49.0%
Final simplification68.7%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -4.6e-171) (not (<= t1 3.1e-83))) (/ (- v) (- t1 u)) (/ v (* u (/ u t1)))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -4.6e-171) || !(t1 <= 3.1e-83)) {
tmp = -v / (t1 - u);
} else {
tmp = v / (u * (u / 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 ((t1 <= (-4.6d-171)) .or. (.not. (t1 <= 3.1d-83))) then
tmp = -v / (t1 - u)
else
tmp = v / (u * (u / t1))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -4.6e-171) || !(t1 <= 3.1e-83)) {
tmp = -v / (t1 - u);
} else {
tmp = v / (u * (u / t1));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -4.6e-171) or not (t1 <= 3.1e-83): tmp = -v / (t1 - u) else: tmp = v / (u * (u / t1)) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -4.6e-171) || !(t1 <= 3.1e-83)) tmp = Float64(Float64(-v) / Float64(t1 - u)); else tmp = Float64(v / Float64(u * Float64(u / t1))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -4.6e-171) || ~((t1 <= 3.1e-83))) tmp = -v / (t1 - u); else tmp = v / (u * (u / t1)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -4.6e-171], N[Not[LessEqual[t1, 3.1e-83]], $MachinePrecision]], N[((-v) / N[(t1 - u), $MachinePrecision]), $MachinePrecision], N[(v / N[(u * N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -4.6 \cdot 10^{-171} \lor \neg \left(t1 \leq 3.1 \cdot 10^{-83}\right):\\
\;\;\;\;\frac{-v}{t1 - u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u \cdot \frac{u}{t1}}\\
\end{array}
\end{array}
if t1 < -4.59999999999999956e-171 or 3.09999999999999992e-83 < t1 Initial program 76.1%
times-frac99.9%
Simplified99.9%
associate-*r/99.9%
clear-num99.9%
associate-*l/99.9%
*-un-lft-identity99.9%
frac-2neg99.9%
distribute-neg-in99.9%
add-sqr-sqrt54.0%
sqrt-unprod71.1%
sqr-neg71.1%
sqrt-unprod26.7%
add-sqr-sqrt56.9%
sub-neg56.9%
remove-double-neg56.9%
Applied egg-rr56.9%
Taylor expanded in t1 around inf 36.5%
div-inv36.5%
frac-2neg36.5%
metadata-eval36.5%
distribute-neg-in36.5%
add-sqr-sqrt19.4%
sqrt-unprod51.4%
sqr-neg51.4%
sqrt-unprod35.5%
add-sqr-sqrt78.0%
sub-neg78.0%
Applied egg-rr78.0%
*-commutative78.0%
associate-*l/78.2%
neg-mul-178.2%
Simplified78.2%
if -4.59999999999999956e-171 < t1 < 3.09999999999999992e-83Initial program 83.6%
times-frac91.6%
Simplified91.6%
Taylor expanded in t1 around 0 83.4%
Taylor expanded in t1 around 0 83.7%
associate-*r/83.7%
mul-1-neg83.7%
Simplified83.7%
clear-num83.2%
frac-times87.0%
*-un-lft-identity87.0%
add-sqr-sqrt34.6%
sqrt-unprod49.7%
sqr-neg49.7%
sqrt-unprod28.9%
add-sqr-sqrt49.1%
Applied egg-rr49.1%
Final simplification68.8%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -8e-177) (not (<= t1 3.1e-83))) (/ (- v) (- t1 u)) (/ (* v (/ t1 u)) u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -8e-177) || !(t1 <= 3.1e-83)) {
tmp = -v / (t1 - u);
} else {
tmp = (v * (t1 / u)) / 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 <= (-8d-177)) .or. (.not. (t1 <= 3.1d-83))) then
tmp = -v / (t1 - u)
else
tmp = (v * (t1 / u)) / u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -8e-177) || !(t1 <= 3.1e-83)) {
tmp = -v / (t1 - u);
} else {
tmp = (v * (t1 / u)) / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -8e-177) or not (t1 <= 3.1e-83): tmp = -v / (t1 - u) else: tmp = (v * (t1 / u)) / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -8e-177) || !(t1 <= 3.1e-83)) tmp = Float64(Float64(-v) / Float64(t1 - u)); else tmp = Float64(Float64(v * Float64(t1 / u)) / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -8e-177) || ~((t1 <= 3.1e-83))) tmp = -v / (t1 - u); else tmp = (v * (t1 / u)) / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -8e-177], N[Not[LessEqual[t1, 3.1e-83]], $MachinePrecision]], N[((-v) / N[(t1 - u), $MachinePrecision]), $MachinePrecision], N[(N[(v * N[(t1 / u), $MachinePrecision]), $MachinePrecision] / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -8 \cdot 10^{-177} \lor \neg \left(t1 \leq 3.1 \cdot 10^{-83}\right):\\
\;\;\;\;\frac{-v}{t1 - u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v \cdot \frac{t1}{u}}{u}\\
\end{array}
\end{array}
if t1 < -7.99999999999999962e-177 or 3.09999999999999992e-83 < t1 Initial program 76.1%
times-frac99.9%
Simplified99.9%
associate-*r/99.9%
clear-num99.9%
associate-*l/99.9%
*-un-lft-identity99.9%
frac-2neg99.9%
distribute-neg-in99.9%
add-sqr-sqrt54.0%
sqrt-unprod71.1%
sqr-neg71.1%
sqrt-unprod26.7%
add-sqr-sqrt56.9%
sub-neg56.9%
remove-double-neg56.9%
Applied egg-rr56.9%
Taylor expanded in t1 around inf 36.5%
div-inv36.5%
frac-2neg36.5%
metadata-eval36.5%
distribute-neg-in36.5%
add-sqr-sqrt19.4%
sqrt-unprod51.4%
sqr-neg51.4%
sqrt-unprod35.5%
add-sqr-sqrt78.0%
sub-neg78.0%
Applied egg-rr78.0%
*-commutative78.0%
associate-*l/78.2%
neg-mul-178.2%
Simplified78.2%
if -7.99999999999999962e-177 < t1 < 3.09999999999999992e-83Initial program 83.6%
times-frac91.6%
Simplified91.6%
Taylor expanded in t1 around 0 83.4%
Taylor expanded in t1 around 0 83.7%
associate-*r/83.7%
mul-1-neg83.7%
Simplified83.7%
associate-*r/85.2%
*-commutative85.2%
add-sqr-sqrt34.3%
sqrt-unprod49.7%
sqr-neg49.7%
sqrt-unprod28.9%
add-sqr-sqrt49.1%
Applied egg-rr49.1%
Final simplification68.8%
(FPCore (u v t1) :precision binary64 (if (<= t1 -5.4e-172) (/ (- v) (- t1 u)) (if (<= t1 6.4e-77) (/ v (* u (/ u t1))) (/ v (- (* u -2.0) t1)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -5.4e-172) {
tmp = -v / (t1 - u);
} else if (t1 <= 6.4e-77) {
tmp = v / (u * (u / t1));
} else {
tmp = v / ((u * -2.0) - 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 (t1 <= (-5.4d-172)) then
tmp = -v / (t1 - u)
else if (t1 <= 6.4d-77) then
tmp = v / (u * (u / t1))
else
tmp = v / ((u * (-2.0d0)) - t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -5.4e-172) {
tmp = -v / (t1 - u);
} else if (t1 <= 6.4e-77) {
tmp = v / (u * (u / t1));
} else {
tmp = v / ((u * -2.0) - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -5.4e-172: tmp = -v / (t1 - u) elif t1 <= 6.4e-77: tmp = v / (u * (u / t1)) else: tmp = v / ((u * -2.0) - t1) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -5.4e-172) tmp = Float64(Float64(-v) / Float64(t1 - u)); elseif (t1 <= 6.4e-77) tmp = Float64(v / Float64(u * Float64(u / t1))); else tmp = Float64(v / Float64(Float64(u * -2.0) - t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -5.4e-172) tmp = -v / (t1 - u); elseif (t1 <= 6.4e-77) tmp = v / (u * (u / t1)); else tmp = v / ((u * -2.0) - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -5.4e-172], N[((-v) / N[(t1 - u), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 6.4e-77], N[(v / N[(u * N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -5.4 \cdot 10^{-172}:\\
\;\;\;\;\frac{-v}{t1 - u}\\
\mathbf{elif}\;t1 \leq 6.4 \cdot 10^{-77}:\\
\;\;\;\;\frac{v}{u \cdot \frac{u}{t1}}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u \cdot -2 - t1}\\
\end{array}
\end{array}
if t1 < -5.40000000000000051e-172Initial program 75.6%
times-frac99.9%
Simplified99.9%
associate-*r/99.9%
clear-num99.9%
associate-*l/99.9%
*-un-lft-identity99.9%
frac-2neg99.9%
distribute-neg-in99.9%
add-sqr-sqrt99.4%
sqrt-unprod83.4%
sqr-neg83.4%
sqrt-unprod0.0%
add-sqr-sqrt55.6%
sub-neg55.6%
remove-double-neg55.6%
Applied egg-rr55.6%
Taylor expanded in t1 around inf 35.7%
div-inv35.7%
frac-2neg35.7%
metadata-eval35.7%
distribute-neg-in35.7%
add-sqr-sqrt35.7%
sqrt-unprod36.5%
sqr-neg36.5%
sqrt-unprod0.0%
add-sqr-sqrt78.1%
sub-neg78.1%
Applied egg-rr78.1%
*-commutative78.1%
associate-*l/78.3%
neg-mul-178.3%
Simplified78.3%
if -5.40000000000000051e-172 < t1 < 6.39999999999999999e-77Initial program 82.9%
times-frac91.8%
Simplified91.8%
Taylor expanded in t1 around 0 83.8%
Taylor expanded in t1 around 0 84.0%
associate-*r/84.0%
mul-1-neg84.0%
Simplified84.0%
clear-num83.5%
frac-times86.2%
*-un-lft-identity86.2%
add-sqr-sqrt33.8%
sqrt-unprod48.6%
sqr-neg48.6%
sqrt-unprod28.3%
add-sqr-sqrt48.1%
Applied egg-rr48.1%
if 6.39999999999999999e-77 < t1 Initial program 77.2%
associate-/r*87.4%
*-commutative87.4%
associate-/l*99.9%
associate-/l/92.7%
+-commutative92.7%
remove-double-neg92.7%
unsub-neg92.7%
div-sub92.7%
sub-neg92.7%
*-inverses92.7%
metadata-eval92.7%
Simplified92.7%
Taylor expanded in t1 around inf 80.0%
mul-1-neg80.0%
unsub-neg80.0%
*-commutative80.0%
Simplified80.0%
Final simplification68.8%
(FPCore (u v t1) :precision binary64 (/ (/ v (+ u t1)) (- -1.0 (/ u t1))))
double code(double u, double v, double t1) {
return (v / (u + t1)) / (-1.0 - (u / 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 + t1)) / ((-1.0d0) - (u / t1))
end function
public static double code(double u, double v, double t1) {
return (v / (u + t1)) / (-1.0 - (u / t1));
}
def code(u, v, t1): return (v / (u + t1)) / (-1.0 - (u / t1))
function code(u, v, t1) return Float64(Float64(v / Float64(u + t1)) / Float64(-1.0 - Float64(u / t1))) end
function tmp = code(u, v, t1) tmp = (v / (u + t1)) / (-1.0 - (u / t1)); end
code[u_, v_, t1_] := N[(N[(v / N[(u + t1), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{v}{u + t1}}{-1 - \frac{u}{t1}}
\end{array}
Initial program 78.5%
associate-/r*85.6%
*-commutative85.6%
associate-/l*97.5%
associate-/l/94.7%
+-commutative94.7%
remove-double-neg94.7%
unsub-neg94.7%
div-sub94.7%
sub-neg94.7%
*-inverses94.7%
metadata-eval94.7%
Simplified94.7%
Taylor expanded in v around 0 94.7%
associate-/r*97.1%
fma-neg97.1%
metadata-eval97.1%
Simplified97.1%
Taylor expanded in v around 0 94.7%
associate-/r*97.1%
mul-1-neg97.1%
neg-sub097.1%
associate--r+97.1%
+-commutative97.1%
associate--r+97.1%
metadata-eval97.1%
Simplified97.1%
Final simplification97.1%
(FPCore (u v t1) :precision binary64 (if (or (<= u -2.6e+85) (not (<= u 1.35e+103))) (/ v (+ u t1)) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.6e+85) || !(u <= 1.35e+103)) {
tmp = v / (u + t1);
} 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.6d+85)) .or. (.not. (u <= 1.35d+103))) then
tmp = v / (u + t1)
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.6e+85) || !(u <= 1.35e+103)) {
tmp = v / (u + t1);
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -2.6e+85) or not (u <= 1.35e+103): tmp = v / (u + t1) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -2.6e+85) || !(u <= 1.35e+103)) tmp = Float64(v / Float64(u + t1)); else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -2.6e+85) || ~((u <= 1.35e+103))) tmp = v / (u + t1); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2.6e+85], N[Not[LessEqual[u, 1.35e+103]], $MachinePrecision]], N[(v / N[(u + t1), $MachinePrecision]), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.6 \cdot 10^{+85} \lor \neg \left(u \leq 1.35 \cdot 10^{+103}\right):\\
\;\;\;\;\frac{v}{u + t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -2.60000000000000011e85 or 1.34999999999999996e103 < u Initial program 84.5%
times-frac98.2%
Simplified98.2%
associate-*r/98.2%
clear-num98.2%
associate-*l/98.2%
*-un-lft-identity98.2%
frac-2neg98.2%
distribute-neg-in98.2%
add-sqr-sqrt46.5%
sqrt-unprod90.2%
sqr-neg90.2%
sqrt-unprod50.4%
add-sqr-sqrt94.8%
sub-neg94.8%
remove-double-neg94.8%
Applied egg-rr94.8%
Taylor expanded in t1 around inf 49.8%
if -2.60000000000000011e85 < u < 1.34999999999999996e103Initial program 75.3%
times-frac96.7%
Simplified96.7%
Taylor expanded in t1 around inf 64.6%
associate-*r/64.6%
neg-mul-164.6%
Simplified64.6%
Final simplification59.5%
(FPCore (u v t1) :precision binary64 (if (or (<= u -6.4e+131) (not (<= u 3.4e+113))) (/ v u) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -6.4e+131) || !(u <= 3.4e+113)) {
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 <= (-6.4d+131)) .or. (.not. (u <= 3.4d+113))) 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 <= -6.4e+131) || !(u <= 3.4e+113)) {
tmp = v / u;
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -6.4e+131) or not (u <= 3.4e+113): tmp = v / u else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -6.4e+131) || !(u <= 3.4e+113)) 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 <= -6.4e+131) || ~((u <= 3.4e+113))) tmp = v / u; else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -6.4e+131], N[Not[LessEqual[u, 3.4e+113]], $MachinePrecision]], N[(v / u), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -6.4 \cdot 10^{+131} \lor \neg \left(u \leq 3.4 \cdot 10^{+113}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -6.4000000000000004e131 or 3.40000000000000019e113 < u Initial program 82.9%
times-frac97.9%
Simplified97.9%
associate-*r/97.9%
clear-num97.9%
associate-*l/97.9%
*-un-lft-identity97.9%
frac-2neg97.9%
distribute-neg-in97.9%
add-sqr-sqrt47.2%
sqrt-unprod89.9%
sqr-neg89.9%
sqrt-unprod50.7%
add-sqr-sqrt96.6%
sub-neg96.6%
remove-double-neg96.6%
Applied egg-rr96.6%
Taylor expanded in t1 around inf 50.8%
Taylor expanded in t1 around 0 49.6%
if -6.4000000000000004e131 < u < 3.40000000000000019e113Initial program 76.7%
times-frac96.9%
Simplified96.9%
Taylor expanded in t1 around inf 62.5%
associate-*r/62.5%
neg-mul-162.5%
Simplified62.5%
Final simplification58.7%
(FPCore (u v t1) :precision binary64 (if (<= u -2.5e+135) (- (/ v u)) (if (<= u 6e+119) (/ (- v) t1) (/ v u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -2.5e+135) {
tmp = -(v / u);
} else if (u <= 6e+119) {
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.5d+135)) then
tmp = -(v / u)
else if (u <= 6d+119) 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.5e+135) {
tmp = -(v / u);
} else if (u <= 6e+119) {
tmp = -v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -2.5e+135: tmp = -(v / u) elif u <= 6e+119: tmp = -v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -2.5e+135) tmp = Float64(-Float64(v / u)); elseif (u <= 6e+119) tmp = Float64(Float64(-v) / t1); else tmp = Float64(v / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -2.5e+135) tmp = -(v / u); elseif (u <= 6e+119) tmp = -v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -2.5e+135], (-N[(v / u), $MachinePrecision]), If[LessEqual[u, 6e+119], N[((-v) / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.5 \cdot 10^{+135}:\\
\;\;\;\;-\frac{v}{u}\\
\mathbf{elif}\;u \leq 6 \cdot 10^{+119}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if u < -2.50000000000000015e135Initial program 76.5%
times-frac99.8%
Simplified99.8%
Taylor expanded in t1 around 0 93.7%
Taylor expanded in t1 around inf 44.1%
associate-*r/44.1%
neg-mul-144.1%
Simplified44.1%
if -2.50000000000000015e135 < u < 6.00000000000000002e119Initial program 76.7%
times-frac96.9%
Simplified96.9%
Taylor expanded in t1 around inf 62.5%
associate-*r/62.5%
neg-mul-162.5%
Simplified62.5%
if 6.00000000000000002e119 < u Initial program 87.1%
times-frac96.6%
Simplified96.6%
associate-*r/96.6%
clear-num96.6%
associate-*l/96.6%
*-un-lft-identity96.6%
frac-2neg96.6%
distribute-neg-in96.6%
add-sqr-sqrt45.4%
sqrt-unprod94.6%
sqr-neg94.6%
sqrt-unprod51.2%
add-sqr-sqrt96.6%
sub-neg96.6%
remove-double-neg96.6%
Applied egg-rr96.6%
Taylor expanded in t1 around inf 53.4%
Taylor expanded in t1 around 0 53.4%
Final simplification58.7%
(FPCore (u v t1) :precision binary64 (if (<= u -4.6e+135) (* (/ v u) -0.5) (if (<= u 4.7e+113) (/ (- v) t1) (/ v u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -4.6e+135) {
tmp = (v / u) * -0.5;
} else if (u <= 4.7e+113) {
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 <= (-4.6d+135)) then
tmp = (v / u) * (-0.5d0)
else if (u <= 4.7d+113) 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 <= -4.6e+135) {
tmp = (v / u) * -0.5;
} else if (u <= 4.7e+113) {
tmp = -v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -4.6e+135: tmp = (v / u) * -0.5 elif u <= 4.7e+113: tmp = -v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -4.6e+135) tmp = Float64(Float64(v / u) * -0.5); elseif (u <= 4.7e+113) tmp = Float64(Float64(-v) / t1); else tmp = Float64(v / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -4.6e+135) tmp = (v / u) * -0.5; elseif (u <= 4.7e+113) tmp = -v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -4.6e+135], N[(N[(v / u), $MachinePrecision] * -0.5), $MachinePrecision], If[LessEqual[u, 4.7e+113], N[((-v) / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -4.6 \cdot 10^{+135}:\\
\;\;\;\;\frac{v}{u} \cdot -0.5\\
\mathbf{elif}\;u \leq 4.7 \cdot 10^{+113}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if u < -4.6000000000000002e135Initial program 76.5%
associate-/r*90.2%
*-commutative90.2%
associate-/l*99.9%
associate-/l/84.6%
+-commutative84.6%
remove-double-neg84.6%
unsub-neg84.6%
div-sub84.6%
sub-neg84.6%
*-inverses84.6%
metadata-eval84.6%
Simplified84.6%
Taylor expanded in t1 around inf 50.3%
mul-1-neg50.3%
unsub-neg50.3%
*-commutative50.3%
Simplified50.3%
Taylor expanded in u around inf 44.2%
if -4.6000000000000002e135 < u < 4.6999999999999998e113Initial program 76.7%
times-frac96.9%
Simplified96.9%
Taylor expanded in t1 around inf 62.5%
associate-*r/62.5%
neg-mul-162.5%
Simplified62.5%
if 4.6999999999999998e113 < u Initial program 87.1%
times-frac96.6%
Simplified96.6%
associate-*r/96.6%
clear-num96.6%
associate-*l/96.6%
*-un-lft-identity96.6%
frac-2neg96.6%
distribute-neg-in96.6%
add-sqr-sqrt45.4%
sqrt-unprod94.6%
sqr-neg94.6%
sqrt-unprod51.2%
add-sqr-sqrt96.6%
sub-neg96.6%
remove-double-neg96.6%
Applied egg-rr96.6%
Taylor expanded in t1 around inf 53.4%
Taylor expanded in t1 around 0 53.4%
Final simplification58.7%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1.95e+104) (not (<= t1 8.5e+111))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.95e+104) || !(t1 <= 8.5e+111)) {
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 <= (-1.95d+104)) .or. (.not. (t1 <= 8.5d+111))) 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 <= -1.95e+104) || !(t1 <= 8.5e+111)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.95e+104) or not (t1 <= 8.5e+111): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.95e+104) || !(t1 <= 8.5e+111)) 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 <= -1.95e+104) || ~((t1 <= 8.5e+111))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.95e+104], N[Not[LessEqual[t1, 8.5e+111]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.95 \cdot 10^{+104} \lor \neg \left(t1 \leq 8.5 \cdot 10^{+111}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -1.95000000000000008e104 or 8.49999999999999983e111 < t1 Initial program 61.4%
times-frac99.9%
Simplified99.9%
*-commutative99.9%
clear-num98.0%
frac-2neg98.0%
frac-times71.5%
*-un-lft-identity71.5%
remove-double-neg71.5%
distribute-neg-in71.5%
add-sqr-sqrt35.3%
sqrt-unprod58.6%
sqr-neg58.6%
sqrt-unprod31.0%
add-sqr-sqrt57.1%
sub-neg57.1%
Applied egg-rr57.1%
*-commutative57.1%
associate-*r/54.7%
Simplified54.7%
Taylor expanded in t1 around inf 51.4%
if -1.95000000000000008e104 < t1 < 8.49999999999999983e111Initial program 85.6%
times-frac96.1%
Simplified96.1%
associate-*r/96.8%
clear-num96.5%
associate-*l/96.5%
*-un-lft-identity96.5%
frac-2neg96.5%
distribute-neg-in96.5%
add-sqr-sqrt48.2%
sqrt-unprod80.9%
sqr-neg80.9%
sqrt-unprod35.1%
add-sqr-sqrt66.8%
sub-neg66.8%
remove-double-neg66.8%
Applied egg-rr66.8%
Taylor expanded in t1 around inf 20.3%
Taylor expanded in t1 around 0 19.6%
Final simplification28.9%
(FPCore (u v t1) :precision binary64 (/ (- v) (+ u t1)))
double code(double u, double v, double t1) {
return -v / (u + 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 + t1)
end function
public static double code(double u, double v, double t1) {
return -v / (u + t1);
}
def code(u, v, t1): return -v / (u + t1)
function code(u, v, t1) return Float64(Float64(-v) / Float64(u + t1)) end
function tmp = code(u, v, t1) tmp = -v / (u + t1); end
code[u_, v_, t1_] := N[((-v) / N[(u + t1), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{-v}{u + t1}
\end{array}
Initial program 78.5%
times-frac97.2%
Simplified97.2%
associate-*r/97.7%
clear-num97.5%
associate-*l/97.5%
*-un-lft-identity97.5%
frac-2neg97.5%
distribute-neg-in97.5%
add-sqr-sqrt48.9%
sqrt-unprod75.4%
sqr-neg75.4%
sqrt-unprod34.5%
add-sqr-sqrt65.8%
sub-neg65.8%
remove-double-neg65.8%
Applied egg-rr65.8%
frac-2neg65.8%
distribute-frac-neg65.8%
add-sqr-sqrt31.3%
sqrt-unprod45.1%
sqr-neg45.1%
sqrt-unprod35.6%
add-sqr-sqrt74.3%
neg-sub074.3%
div-sub74.3%
*-inverses74.3%
sub-neg74.3%
add-sqr-sqrt35.7%
sqrt-unprod76.6%
sqr-neg76.6%
sqrt-unprod49.1%
add-sqr-sqrt97.5%
distribute-frac-neg97.5%
frac-2neg97.5%
Applied egg-rr97.5%
associate--r+97.5%
metadata-eval97.5%
Simplified97.5%
Taylor expanded in u around 0 60.2%
neg-mul-160.2%
Simplified60.2%
Final simplification60.2%
(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 78.5%
times-frac97.2%
Simplified97.2%
*-commutative97.2%
clear-num96.4%
frac-2neg96.4%
frac-times84.0%
*-un-lft-identity84.0%
remove-double-neg84.0%
distribute-neg-in84.0%
add-sqr-sqrt41.7%
sqrt-unprod71.2%
sqr-neg71.2%
sqrt-unprod32.1%
add-sqr-sqrt62.3%
sub-neg62.3%
Applied egg-rr62.3%
*-commutative62.3%
associate-*r/59.0%
Simplified59.0%
Taylor expanded in t1 around inf 18.7%
Final simplification18.7%
herbie shell --seed 2023334
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))