
(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[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * (-v)), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{t1 + u}
\end{array}
Initial program 74.4%
associate-/l*74.4%
distribute-lft-neg-out74.4%
distribute-rgt-neg-in74.4%
associate-/r*84.6%
distribute-neg-frac284.6%
Simplified84.6%
associate-*r/98.0%
+-commutative98.0%
distribute-neg-in98.0%
sub-neg98.0%
associate-*l/98.8%
frac-2neg98.8%
associate-*r/99.0%
remove-double-neg99.0%
sub-neg99.0%
distribute-neg-in99.0%
+-commutative99.0%
frac-2neg99.0%
add-sqr-sqrt50.6%
sqrt-unprod42.6%
sqr-neg42.6%
sqrt-unprod17.8%
add-sqr-sqrt38.3%
add-sqr-sqrt21.1%
sqrt-unprod61.2%
Applied egg-rr99.0%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -3e+140) (not (<= t1 4.2e+130))) (/ v (- (- t1) (* u 2.0))) (* t1 (/ (/ v (+ t1 u)) (- (- u) t1)))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -3e+140) || !(t1 <= 4.2e+130)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = t1 * ((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 <= (-3d+140)) .or. (.not. (t1 <= 4.2d+130))) then
tmp = v / (-t1 - (u * 2.0d0))
else
tmp = t1 * ((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 <= -3e+140) || !(t1 <= 4.2e+130)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = t1 * ((v / (t1 + u)) / (-u - t1));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -3e+140) or not (t1 <= 4.2e+130): tmp = v / (-t1 - (u * 2.0)) else: tmp = t1 * ((v / (t1 + u)) / (-u - t1)) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -3e+140) || !(t1 <= 4.2e+130)) tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); else tmp = Float64(t1 * Float64(Float64(v / Float64(t1 + u)) / Float64(Float64(-u) - t1))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -3e+140) || ~((t1 <= 4.2e+130))) tmp = v / (-t1 - (u * 2.0)); else tmp = t1 * ((v / (t1 + u)) / (-u - t1)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -3e+140], N[Not[LessEqual[t1, 4.2e+130]], $MachinePrecision]], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t1 * N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -3 \cdot 10^{+140} \lor \neg \left(t1 \leq 4.2 \cdot 10^{+130}\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{t1 + u}}{\left(-u\right) - t1}\\
\end{array}
\end{array}
if t1 < -2.99999999999999997e140 or 4.19999999999999981e130 < t1 Initial program 47.8%
associate-/l*45.0%
distribute-lft-neg-out45.0%
distribute-rgt-neg-in45.0%
associate-/r*67.9%
distribute-neg-frac267.9%
Simplified67.9%
associate-*r/100.0%
+-commutative100.0%
distribute-neg-in100.0%
sub-neg100.0%
associate-*l/100.0%
frac-2neg100.0%
clear-num99.9%
frac-times98.8%
*-un-lft-identity98.8%
+-commutative98.8%
distribute-neg-in98.8%
sub-neg98.8%
Applied egg-rr98.8%
Taylor expanded in u around 0 96.2%
*-commutative96.2%
Simplified96.2%
if -2.99999999999999997e140 < t1 < 4.19999999999999981e130Initial program 85.6%
associate-/l*86.8%
distribute-lft-neg-out86.8%
distribute-rgt-neg-in86.8%
associate-/r*91.6%
distribute-neg-frac291.6%
Simplified91.6%
Final simplification93.0%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -5.3e+22) (not (<= t1 3.7e-63))) (/ v (- (- t1) (* u 2.0))) (/ (* v (/ t1 (- u))) u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -5.3e+22) || !(t1 <= 3.7e-63)) {
tmp = v / (-t1 - (u * 2.0));
} 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.3d+22)) .or. (.not. (t1 <= 3.7d-63))) then
tmp = v / (-t1 - (u * 2.0d0))
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.3e+22) || !(t1 <= 3.7e-63)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = (v * (t1 / -u)) / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -5.3e+22) or not (t1 <= 3.7e-63): tmp = v / (-t1 - (u * 2.0)) else: tmp = (v * (t1 / -u)) / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -5.3e+22) || !(t1 <= 3.7e-63)) tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); else tmp = Float64(Float64(v * Float64(t1 / Float64(-u))) / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -5.3e+22) || ~((t1 <= 3.7e-63))) tmp = v / (-t1 - (u * 2.0)); else tmp = (v * (t1 / -u)) / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -5.3e+22], N[Not[LessEqual[t1, 3.7e-63]], $MachinePrecision]], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(v * N[(t1 / (-u)), $MachinePrecision]), $MachinePrecision] / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -5.3 \cdot 10^{+22} \lor \neg \left(t1 \leq 3.7 \cdot 10^{-63}\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{v \cdot \frac{t1}{-u}}{u}\\
\end{array}
\end{array}
if t1 < -5.2999999999999998e22 or 3.70000000000000012e-63 < t1 Initial program 64.9%
associate-/l*64.3%
distribute-lft-neg-out64.3%
distribute-rgt-neg-in64.3%
associate-/r*80.6%
distribute-neg-frac280.6%
Simplified80.6%
associate-*r/99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*l/99.9%
frac-2neg99.9%
clear-num99.9%
frac-times96.5%
*-un-lft-identity96.5%
+-commutative96.5%
distribute-neg-in96.5%
sub-neg96.5%
Applied egg-rr96.5%
Taylor expanded in u around 0 83.1%
*-commutative83.1%
Simplified83.1%
if -5.2999999999999998e22 < t1 < 3.70000000000000012e-63Initial program 86.0%
associate-/l*86.8%
distribute-lft-neg-out86.8%
distribute-rgt-neg-in86.8%
associate-/r*89.3%
distribute-neg-frac289.3%
Simplified89.3%
Taylor expanded in t1 around 0 76.2%
Taylor expanded in t1 around 0 79.9%
associate-*r/81.4%
clear-num81.4%
un-div-inv81.6%
add-sqr-sqrt30.6%
sqrt-unprod54.4%
sqr-neg54.4%
sqrt-unprod23.9%
add-sqr-sqrt43.0%
Applied egg-rr43.0%
frac-2neg43.0%
associate-/r/43.0%
add-sqr-sqrt26.9%
sqrt-unprod55.1%
sqr-neg55.1%
sqrt-unprod37.4%
add-sqr-sqrt83.7%
Applied egg-rr83.7%
Final simplification83.4%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -2.5e+22) (not (<= t1 3.45e-63))) (/ v (- (- t1) (* u 2.0))) (/ (* t1 (/ v (- u))) u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -2.5e+22) || !(t1 <= 3.45e-63)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = (t1 * (v / -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 <= (-2.5d+22)) .or. (.not. (t1 <= 3.45d-63))) then
tmp = v / (-t1 - (u * 2.0d0))
else
tmp = (t1 * (v / -u)) / u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -2.5e+22) || !(t1 <= 3.45e-63)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = (t1 * (v / -u)) / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -2.5e+22) or not (t1 <= 3.45e-63): tmp = v / (-t1 - (u * 2.0)) else: tmp = (t1 * (v / -u)) / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -2.5e+22) || !(t1 <= 3.45e-63)) tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); else tmp = Float64(Float64(t1 * Float64(v / Float64(-u))) / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -2.5e+22) || ~((t1 <= 3.45e-63))) tmp = v / (-t1 - (u * 2.0)); else tmp = (t1 * (v / -u)) / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -2.5e+22], N[Not[LessEqual[t1, 3.45e-63]], $MachinePrecision]], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t1 * N[(v / (-u)), $MachinePrecision]), $MachinePrecision] / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2.5 \cdot 10^{+22} \lor \neg \left(t1 \leq 3.45 \cdot 10^{-63}\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{-u}}{u}\\
\end{array}
\end{array}
if t1 < -2.4999999999999998e22 or 3.45e-63 < t1 Initial program 64.9%
associate-/l*64.3%
distribute-lft-neg-out64.3%
distribute-rgt-neg-in64.3%
associate-/r*80.6%
distribute-neg-frac280.6%
Simplified80.6%
associate-*r/99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*l/99.9%
frac-2neg99.9%
clear-num99.9%
frac-times96.5%
*-un-lft-identity96.5%
+-commutative96.5%
distribute-neg-in96.5%
sub-neg96.5%
Applied egg-rr96.5%
Taylor expanded in u around 0 83.1%
*-commutative83.1%
Simplified83.1%
if -2.4999999999999998e22 < t1 < 3.45e-63Initial program 86.0%
associate-/l*86.8%
distribute-lft-neg-out86.8%
distribute-rgt-neg-in86.8%
associate-/r*89.3%
distribute-neg-frac289.3%
Simplified89.3%
associate-*r/95.6%
+-commutative95.6%
distribute-neg-in95.6%
sub-neg95.6%
associate-*l/97.5%
frac-2neg97.5%
associate-*r/98.0%
remove-double-neg98.0%
sub-neg98.0%
distribute-neg-in98.0%
+-commutative98.0%
frac-2neg98.0%
add-sqr-sqrt51.3%
sqrt-unprod62.1%
sqr-neg62.1%
sqrt-unprod23.9%
add-sqr-sqrt43.0%
add-sqr-sqrt19.1%
sqrt-unprod69.6%
Applied egg-rr98.0%
Taylor expanded in t1 around 0 75.4%
mul-1-neg75.4%
associate-/l*77.7%
distribute-lft-neg-in77.7%
Simplified77.7%
Taylor expanded in t1 around 0 81.4%
Final simplification82.3%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1.85e+22) (not (<= t1 3.8e-63))) (/ v (- (- t1) (* u 2.0))) (* t1 (/ (/ v u) (- u)))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.85e+22) || !(t1 <= 3.8e-63)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = t1 * ((v / 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 <= (-1.85d+22)) .or. (.not. (t1 <= 3.8d-63))) then
tmp = v / (-t1 - (u * 2.0d0))
else
tmp = t1 * ((v / u) / -u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.85e+22) || !(t1 <= 3.8e-63)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = t1 * ((v / u) / -u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.85e+22) or not (t1 <= 3.8e-63): tmp = v / (-t1 - (u * 2.0)) else: tmp = t1 * ((v / u) / -u) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.85e+22) || !(t1 <= 3.8e-63)) tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); else tmp = Float64(t1 * Float64(Float64(v / u) / Float64(-u))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -1.85e+22) || ~((t1 <= 3.8e-63))) tmp = v / (-t1 - (u * 2.0)); else tmp = t1 * ((v / u) / -u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.85e+22], N[Not[LessEqual[t1, 3.8e-63]], $MachinePrecision]], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t1 * N[(N[(v / u), $MachinePrecision] / (-u)), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.85 \cdot 10^{+22} \lor \neg \left(t1 \leq 3.8 \cdot 10^{-63}\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{-u}\\
\end{array}
\end{array}
if t1 < -1.8499999999999999e22 or 3.80000000000000017e-63 < t1 Initial program 64.9%
associate-/l*64.3%
distribute-lft-neg-out64.3%
distribute-rgt-neg-in64.3%
associate-/r*80.6%
distribute-neg-frac280.6%
Simplified80.6%
associate-*r/99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*l/99.9%
frac-2neg99.9%
clear-num99.9%
frac-times96.5%
*-un-lft-identity96.5%
+-commutative96.5%
distribute-neg-in96.5%
sub-neg96.5%
Applied egg-rr96.5%
Taylor expanded in u around 0 83.1%
*-commutative83.1%
Simplified83.1%
if -1.8499999999999999e22 < t1 < 3.80000000000000017e-63Initial program 86.0%
associate-/l*86.8%
distribute-lft-neg-out86.8%
distribute-rgt-neg-in86.8%
associate-/r*89.3%
distribute-neg-frac289.3%
Simplified89.3%
Taylor expanded in t1 around 0 76.2%
Taylor expanded in t1 around 0 79.9%
Final simplification81.7%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -5.4e+25) (not (<= t1 4.05e-63))) (/ v (- (- u) t1)) (* t1 (/ (/ v u) (- u)))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -5.4e+25) || !(t1 <= 4.05e-63)) {
tmp = v / (-u - t1);
} else {
tmp = t1 * ((v / 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.4d+25)) .or. (.not. (t1 <= 4.05d-63))) then
tmp = v / (-u - t1)
else
tmp = t1 * ((v / u) / -u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -5.4e+25) || !(t1 <= 4.05e-63)) {
tmp = v / (-u - t1);
} else {
tmp = t1 * ((v / u) / -u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -5.4e+25) or not (t1 <= 4.05e-63): tmp = v / (-u - t1) else: tmp = t1 * ((v / u) / -u) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -5.4e+25) || !(t1 <= 4.05e-63)) tmp = Float64(v / Float64(Float64(-u) - t1)); else tmp = Float64(t1 * Float64(Float64(v / u) / Float64(-u))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -5.4e+25) || ~((t1 <= 4.05e-63))) tmp = v / (-u - t1); else tmp = t1 * ((v / u) / -u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -5.4e+25], N[Not[LessEqual[t1, 4.05e-63]], $MachinePrecision]], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], N[(t1 * N[(N[(v / u), $MachinePrecision] / (-u)), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -5.4 \cdot 10^{+25} \lor \neg \left(t1 \leq 4.05 \cdot 10^{-63}\right):\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{-u}\\
\end{array}
\end{array}
if t1 < -5.4e25 or 4.04999999999999975e-63 < t1 Initial program 64.9%
associate-/l*64.3%
distribute-lft-neg-out64.3%
distribute-rgt-neg-in64.3%
associate-/r*80.6%
distribute-neg-frac280.6%
Simplified80.6%
associate-*r/99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*l/99.9%
frac-2neg99.9%
associate-*r/99.9%
remove-double-neg99.9%
sub-neg99.9%
distribute-neg-in99.9%
+-commutative99.9%
frac-2neg99.9%
add-sqr-sqrt50.1%
sqrt-unprod26.8%
sqr-neg26.8%
sqrt-unprod12.9%
add-sqr-sqrt34.4%
add-sqr-sqrt22.8%
sqrt-unprod54.4%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 82.8%
mul-1-neg82.8%
Simplified82.8%
if -5.4e25 < t1 < 4.04999999999999975e-63Initial program 86.0%
associate-/l*86.8%
distribute-lft-neg-out86.8%
distribute-rgt-neg-in86.8%
associate-/r*89.3%
distribute-neg-frac289.3%
Simplified89.3%
Taylor expanded in t1 around 0 76.2%
Taylor expanded in t1 around 0 79.9%
Final simplification81.5%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -4.2e-211) (not (<= t1 2.15e-165))) (/ v (- (- u) t1)) (/ (/ (* t1 v) u) u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -4.2e-211) || !(t1 <= 2.15e-165)) {
tmp = v / (-u - t1);
} else {
tmp = ((t1 * v) / 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 <= (-4.2d-211)) .or. (.not. (t1 <= 2.15d-165))) then
tmp = v / (-u - t1)
else
tmp = ((t1 * v) / u) / u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -4.2e-211) || !(t1 <= 2.15e-165)) {
tmp = v / (-u - t1);
} else {
tmp = ((t1 * v) / u) / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -4.2e-211) or not (t1 <= 2.15e-165): tmp = v / (-u - t1) else: tmp = ((t1 * v) / u) / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -4.2e-211) || !(t1 <= 2.15e-165)) tmp = Float64(v / Float64(Float64(-u) - t1)); else tmp = Float64(Float64(Float64(t1 * v) / u) / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -4.2e-211) || ~((t1 <= 2.15e-165))) tmp = v / (-u - t1); else tmp = ((t1 * v) / u) / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -4.2e-211], N[Not[LessEqual[t1, 2.15e-165]], $MachinePrecision]], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t1 * v), $MachinePrecision] / u), $MachinePrecision] / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -4.2 \cdot 10^{-211} \lor \neg \left(t1 \leq 2.15 \cdot 10^{-165}\right):\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t1 \cdot v}{u}}{u}\\
\end{array}
\end{array}
if t1 < -4.20000000000000015e-211 or 2.15000000000000003e-165 < t1 Initial program 73.2%
associate-/l*71.0%
distribute-lft-neg-out71.0%
distribute-rgt-neg-in71.0%
associate-/r*83.8%
distribute-neg-frac283.8%
Simplified83.8%
associate-*r/99.4%
+-commutative99.4%
distribute-neg-in99.4%
sub-neg99.4%
associate-*l/99.4%
frac-2neg99.4%
associate-*r/99.9%
remove-double-neg99.9%
sub-neg99.9%
distribute-neg-in99.9%
+-commutative99.9%
frac-2neg99.9%
add-sqr-sqrt53.9%
sqrt-unprod39.0%
sqr-neg39.0%
sqrt-unprod12.0%
add-sqr-sqrt33.6%
add-sqr-sqrt18.9%
sqrt-unprod56.7%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 71.4%
mul-1-neg71.4%
Simplified71.4%
if -4.20000000000000015e-211 < t1 < 2.15000000000000003e-165Initial program 78.9%
associate-/l*87.5%
distribute-lft-neg-out87.5%
distribute-rgt-neg-in87.5%
associate-/r*87.6%
distribute-neg-frac287.6%
Simplified87.6%
Taylor expanded in t1 around 0 85.7%
Taylor expanded in t1 around 0 87.6%
associate-*r/89.2%
clear-num89.2%
un-div-inv89.2%
add-sqr-sqrt36.1%
sqrt-unprod62.5%
sqr-neg62.5%
sqrt-unprod26.4%
add-sqr-sqrt56.0%
Applied egg-rr56.0%
Taylor expanded in t1 around 0 56.3%
Final simplification68.2%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -3.3e-211) (not (<= t1 2.4e-165))) (/ v (- (- u) t1)) (/ (* t1 (/ v u)) u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -3.3e-211) || !(t1 <= 2.4e-165)) {
tmp = v / (-u - t1);
} else {
tmp = (t1 * (v / 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 <= (-3.3d-211)) .or. (.not. (t1 <= 2.4d-165))) then
tmp = v / (-u - t1)
else
tmp = (t1 * (v / u)) / u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -3.3e-211) || !(t1 <= 2.4e-165)) {
tmp = v / (-u - t1);
} else {
tmp = (t1 * (v / u)) / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -3.3e-211) or not (t1 <= 2.4e-165): tmp = v / (-u - t1) else: tmp = (t1 * (v / u)) / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -3.3e-211) || !(t1 <= 2.4e-165)) tmp = Float64(v / Float64(Float64(-u) - t1)); else tmp = Float64(Float64(t1 * Float64(v / u)) / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -3.3e-211) || ~((t1 <= 2.4e-165))) tmp = v / (-u - t1); else tmp = (t1 * (v / u)) / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -3.3e-211], N[Not[LessEqual[t1, 2.4e-165]], $MachinePrecision]], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], N[(N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision] / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -3.3 \cdot 10^{-211} \lor \neg \left(t1 \leq 2.4 \cdot 10^{-165}\right):\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{u}}{u}\\
\end{array}
\end{array}
if t1 < -3.3000000000000002e-211 or 2.4000000000000002e-165 < t1 Initial program 73.2%
associate-/l*71.0%
distribute-lft-neg-out71.0%
distribute-rgt-neg-in71.0%
associate-/r*83.8%
distribute-neg-frac283.8%
Simplified83.8%
associate-*r/99.4%
+-commutative99.4%
distribute-neg-in99.4%
sub-neg99.4%
associate-*l/99.4%
frac-2neg99.4%
associate-*r/99.9%
remove-double-neg99.9%
sub-neg99.9%
distribute-neg-in99.9%
+-commutative99.9%
frac-2neg99.9%
add-sqr-sqrt53.9%
sqrt-unprod39.0%
sqr-neg39.0%
sqrt-unprod12.0%
add-sqr-sqrt33.6%
add-sqr-sqrt18.9%
sqrt-unprod56.7%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 71.4%
mul-1-neg71.4%
Simplified71.4%
if -3.3000000000000002e-211 < t1 < 2.4000000000000002e-165Initial program 78.9%
associate-/l*87.5%
distribute-lft-neg-out87.5%
distribute-rgt-neg-in87.5%
associate-/r*87.6%
distribute-neg-frac287.6%
Simplified87.6%
Taylor expanded in t1 around 0 85.7%
Taylor expanded in t1 around 0 87.6%
associate-*r/89.2%
clear-num89.2%
un-div-inv89.2%
add-sqr-sqrt36.1%
sqrt-unprod62.5%
sqr-neg62.5%
sqrt-unprod26.4%
add-sqr-sqrt56.0%
Applied egg-rr56.0%
clear-num56.1%
associate-/r/56.0%
clear-num56.0%
Applied egg-rr56.0%
Final simplification68.2%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1.35e-208) (not (<= t1 2.15e-165))) (/ v (- (- u) t1)) (/ t1 (* u (/ u v)))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.35e-208) || !(t1 <= 2.15e-165)) {
tmp = v / (-u - t1);
} else {
tmp = t1 / (u * (u / v));
}
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.35d-208)) .or. (.not. (t1 <= 2.15d-165))) then
tmp = v / (-u - t1)
else
tmp = t1 / (u * (u / v))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.35e-208) || !(t1 <= 2.15e-165)) {
tmp = v / (-u - t1);
} else {
tmp = t1 / (u * (u / v));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.35e-208) or not (t1 <= 2.15e-165): tmp = v / (-u - t1) else: tmp = t1 / (u * (u / v)) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.35e-208) || !(t1 <= 2.15e-165)) tmp = Float64(v / Float64(Float64(-u) - t1)); else tmp = Float64(t1 / Float64(u * Float64(u / v))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -1.35e-208) || ~((t1 <= 2.15e-165))) tmp = v / (-u - t1); else tmp = t1 / (u * (u / v)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.35e-208], N[Not[LessEqual[t1, 2.15e-165]], $MachinePrecision]], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], N[(t1 / N[(u * N[(u / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.35 \cdot 10^{-208} \lor \neg \left(t1 \leq 2.15 \cdot 10^{-165}\right):\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{u \cdot \frac{u}{v}}\\
\end{array}
\end{array}
if t1 < -1.35e-208 or 2.15000000000000003e-165 < t1 Initial program 73.2%
associate-/l*71.0%
distribute-lft-neg-out71.0%
distribute-rgt-neg-in71.0%
associate-/r*83.8%
distribute-neg-frac283.8%
Simplified83.8%
associate-*r/99.4%
+-commutative99.4%
distribute-neg-in99.4%
sub-neg99.4%
associate-*l/99.4%
frac-2neg99.4%
associate-*r/99.9%
remove-double-neg99.9%
sub-neg99.9%
distribute-neg-in99.9%
+-commutative99.9%
frac-2neg99.9%
add-sqr-sqrt53.9%
sqrt-unprod39.0%
sqr-neg39.0%
sqrt-unprod12.0%
add-sqr-sqrt33.6%
add-sqr-sqrt18.9%
sqrt-unprod56.7%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 71.4%
mul-1-neg71.4%
Simplified71.4%
if -1.35e-208 < t1 < 2.15000000000000003e-165Initial program 78.9%
associate-/l*87.5%
distribute-lft-neg-out87.5%
distribute-rgt-neg-in87.5%
associate-/r*87.6%
distribute-neg-frac287.6%
Simplified87.6%
Taylor expanded in t1 around 0 85.7%
Taylor expanded in t1 around 0 87.6%
clear-num87.5%
un-div-inv87.6%
div-inv87.6%
clear-num87.6%
add-sqr-sqrt39.6%
sqrt-unprod66.1%
sqr-neg66.1%
sqrt-unprod26.4%
add-sqr-sqrt55.9%
Applied egg-rr55.9%
Final simplification68.2%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1.35e+86) (not (<= t1 9e+113))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.35e+86) || !(t1 <= 9e+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 ((t1 <= (-1.35d+86)) .or. (.not. (t1 <= 9d+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 ((t1 <= -1.35e+86) || !(t1 <= 9e+113)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.35e+86) or not (t1 <= 9e+113): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.35e+86) || !(t1 <= 9e+113)) 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.35e+86) || ~((t1 <= 9e+113))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.35e+86], N[Not[LessEqual[t1, 9e+113]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.35 \cdot 10^{+86} \lor \neg \left(t1 \leq 9 \cdot 10^{+113}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -1.35000000000000009e86 or 9.0000000000000001e113 < t1 Initial program 54.2%
associate-/l*54.0%
distribute-lft-neg-out54.0%
distribute-rgt-neg-in54.0%
associate-/r*73.8%
distribute-neg-frac273.8%
Simplified73.8%
Taylor expanded in t1 around inf 91.9%
associate-*r/91.9%
neg-mul-191.9%
Simplified91.9%
div-inv91.6%
add-sqr-sqrt44.2%
sqrt-unprod56.0%
sqr-neg56.0%
sqrt-unprod21.7%
add-sqr-sqrt43.0%
Applied egg-rr43.0%
associate-*r/43.0%
*-rgt-identity43.0%
Simplified43.0%
if -1.35000000000000009e86 < t1 < 9.0000000000000001e113Initial program 86.7%
associate-/l*86.8%
distribute-lft-neg-out86.8%
distribute-rgt-neg-in86.8%
associate-/r*91.1%
distribute-neg-frac291.1%
Simplified91.1%
Taylor expanded in t1 around 0 66.9%
Taylor expanded in t1 around inf 17.1%
associate-*r/17.1%
mul-1-neg17.1%
Simplified17.1%
add-sqr-sqrt7.5%
sqrt-unprod21.9%
sqr-neg21.9%
sqrt-unprod7.7%
add-sqr-sqrt16.9%
div-inv16.9%
Applied egg-rr16.9%
associate-*r/16.9%
*-rgt-identity16.9%
Simplified16.9%
Final simplification26.8%
(FPCore (u v t1) :precision binary64 (* (/ t1 (+ t1 u)) (/ v (- (- u) t1))))
double code(double u, double v, double t1) {
return (t1 / (t1 + u)) * (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 = (t1 / (t1 + u)) * (v / (-u - t1))
end function
public static double code(double u, double v, double t1) {
return (t1 / (t1 + u)) * (v / (-u - t1));
}
def code(u, v, t1): return (t1 / (t1 + u)) * (v / (-u - t1))
function code(u, v, t1) return Float64(Float64(t1 / Float64(t1 + u)) * Float64(v / Float64(Float64(-u) - t1))) end
function tmp = code(u, v, t1) tmp = (t1 / (t1 + u)) * (v / (-u - t1)); end
code[u_, v_, t1_] := N[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{t1}{t1 + u} \cdot \frac{v}{\left(-u\right) - t1}
\end{array}
Initial program 74.4%
times-frac98.8%
distribute-frac-neg98.8%
distribute-neg-frac298.8%
+-commutative98.8%
distribute-neg-in98.8%
unsub-neg98.8%
Simplified98.8%
Final simplification98.8%
(FPCore (u v t1) :precision binary64 (if (<= u 5e+189) (/ v (- t1)) (/ 1.0 (/ u v))))
double code(double u, double v, double t1) {
double tmp;
if (u <= 5e+189) {
tmp = v / -t1;
} else {
tmp = 1.0 / (u / v);
}
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 <= 5d+189) then
tmp = v / -t1
else
tmp = 1.0d0 / (u / v)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= 5e+189) {
tmp = v / -t1;
} else {
tmp = 1.0 / (u / v);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= 5e+189: tmp = v / -t1 else: tmp = 1.0 / (u / v) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= 5e+189) tmp = Float64(v / Float64(-t1)); else tmp = Float64(1.0 / Float64(u / v)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= 5e+189) tmp = v / -t1; else tmp = 1.0 / (u / v); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, 5e+189], N[(v / (-t1)), $MachinePrecision], N[(1.0 / N[(u / v), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq 5 \cdot 10^{+189}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{u}{v}}\\
\end{array}
\end{array}
if u < 5.0000000000000004e189Initial program 74.5%
associate-/l*74.4%
distribute-lft-neg-out74.4%
distribute-rgt-neg-in74.4%
associate-/r*83.2%
distribute-neg-frac283.2%
Simplified83.2%
Taylor expanded in t1 around inf 61.0%
associate-*r/61.0%
neg-mul-161.0%
Simplified61.0%
if 5.0000000000000004e189 < u Initial program 73.7%
associate-/l*74.4%
distribute-lft-neg-out74.4%
distribute-rgt-neg-in74.4%
associate-/r*96.2%
distribute-neg-frac296.2%
Simplified96.2%
Taylor expanded in t1 around 0 96.2%
Taylor expanded in t1 around inf 43.5%
associate-*r/43.5%
mul-1-neg43.5%
Simplified43.5%
add-sqr-sqrt19.6%
sqrt-unprod43.0%
sqr-neg43.0%
sqrt-unprod23.8%
add-sqr-sqrt43.3%
clear-num45.1%
inv-pow45.1%
Applied egg-rr45.1%
unpow-145.1%
Simplified45.1%
Final simplification59.4%
(FPCore (u v t1) :precision binary64 (if (<= u 1.1e+190) (/ v (- t1)) (/ v (- u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= 1.1e+190) {
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 <= 1.1d+190) 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 <= 1.1e+190) {
tmp = v / -t1;
} else {
tmp = v / -u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= 1.1e+190: tmp = v / -t1 else: tmp = v / -u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= 1.1e+190) tmp = Float64(v / Float64(-t1)); else tmp = Float64(v / Float64(-u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= 1.1e+190) tmp = v / -t1; else tmp = v / -u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, 1.1e+190], N[(v / (-t1)), $MachinePrecision], N[(v / (-u)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq 1.1 \cdot 10^{+190}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-u}\\
\end{array}
\end{array}
if u < 1.1e190Initial program 74.5%
associate-/l*74.4%
distribute-lft-neg-out74.4%
distribute-rgt-neg-in74.4%
associate-/r*83.2%
distribute-neg-frac283.2%
Simplified83.2%
Taylor expanded in t1 around inf 61.0%
associate-*r/61.0%
neg-mul-161.0%
Simplified61.0%
if 1.1e190 < u Initial program 73.7%
associate-/l*74.4%
distribute-lft-neg-out74.4%
distribute-rgt-neg-in74.4%
associate-/r*96.2%
distribute-neg-frac296.2%
Simplified96.2%
Taylor expanded in t1 around 0 96.2%
Taylor expanded in t1 around inf 43.5%
associate-*r/43.5%
mul-1-neg43.5%
Simplified43.5%
Final simplification59.2%
(FPCore (u v t1) :precision binary64 (if (<= u 1.1e+190) (/ v (- t1)) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if (u <= 1.1e+190) {
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 <= 1.1d+190) 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 <= 1.1e+190) {
tmp = v / -t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= 1.1e+190: tmp = v / -t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= 1.1e+190) tmp = Float64(v / Float64(-t1)); else tmp = Float64(v / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= 1.1e+190) tmp = v / -t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, 1.1e+190], N[(v / (-t1)), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq 1.1 \cdot 10^{+190}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if u < 1.1e190Initial program 74.5%
associate-/l*74.4%
distribute-lft-neg-out74.4%
distribute-rgt-neg-in74.4%
associate-/r*83.2%
distribute-neg-frac283.2%
Simplified83.2%
Taylor expanded in t1 around inf 61.0%
associate-*r/61.0%
neg-mul-161.0%
Simplified61.0%
if 1.1e190 < u Initial program 73.7%
associate-/l*74.4%
distribute-lft-neg-out74.4%
distribute-rgt-neg-in74.4%
associate-/r*96.2%
distribute-neg-frac296.2%
Simplified96.2%
Taylor expanded in t1 around 0 96.2%
Taylor expanded in t1 around inf 43.5%
associate-*r/43.5%
mul-1-neg43.5%
Simplified43.5%
add-sqr-sqrt19.6%
sqrt-unprod43.0%
sqr-neg43.0%
sqrt-unprod23.8%
add-sqr-sqrt43.3%
div-inv43.3%
Applied egg-rr43.3%
associate-*r/43.3%
*-rgt-identity43.3%
Simplified43.3%
Final simplification59.2%
(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(v / Float64(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}{\left(-u\right) - t1}
\end{array}
Initial program 74.4%
associate-/l*74.4%
distribute-lft-neg-out74.4%
distribute-rgt-neg-in74.4%
associate-/r*84.6%
distribute-neg-frac284.6%
Simplified84.6%
associate-*r/98.0%
+-commutative98.0%
distribute-neg-in98.0%
sub-neg98.0%
associate-*l/98.8%
frac-2neg98.8%
associate-*r/99.0%
remove-double-neg99.0%
sub-neg99.0%
distribute-neg-in99.0%
+-commutative99.0%
frac-2neg99.0%
add-sqr-sqrt50.6%
sqrt-unprod42.6%
sqr-neg42.6%
sqrt-unprod17.8%
add-sqr-sqrt38.3%
add-sqr-sqrt21.1%
sqrt-unprod61.2%
Applied egg-rr99.0%
Taylor expanded in t1 around inf 62.4%
mul-1-neg62.4%
Simplified62.4%
Final simplification62.4%
(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.4%
associate-/l*74.4%
distribute-lft-neg-out74.4%
distribute-rgt-neg-in74.4%
associate-/r*84.6%
distribute-neg-frac284.6%
Simplified84.6%
Taylor expanded in t1 around inf 56.9%
associate-*r/56.9%
neg-mul-156.9%
Simplified56.9%
div-inv56.8%
add-sqr-sqrt27.9%
sqrt-unprod37.7%
sqr-neg37.7%
sqrt-unprod8.7%
add-sqr-sqrt17.7%
Applied egg-rr17.7%
associate-*r/17.7%
*-rgt-identity17.7%
Simplified17.7%
herbie shell --seed 2024136
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))