
(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 15 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) (- (- 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(Float64(t1 / Float64(t1 + u)) * 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[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * v), $MachinePrecision] / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{t1}{t1 + u} \cdot v}{\left(-u\right) - t1}
\end{array}
Initial program 72.0%
associate-/l*72.6%
distribute-lft-neg-out72.6%
distribute-rgt-neg-in72.6%
associate-/r*83.3%
distribute-neg-frac283.3%
Simplified83.3%
distribute-frac-neg283.3%
associate-/r*72.6%
distribute-rgt-neg-in72.6%
distribute-lft-neg-out72.6%
associate-*r/72.0%
times-frac97.5%
frac-2neg97.5%
associate-*r/98.0%
add-sqr-sqrt55.3%
sqrt-unprod44.4%
sqr-neg44.4%
sqrt-unprod17.5%
add-sqr-sqrt39.2%
add-sqr-sqrt17.1%
sqrt-unprod58.9%
sqr-neg58.9%
sqrt-prod50.6%
add-sqr-sqrt98.0%
Applied egg-rr98.0%
Final simplification98.0%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1.65e+142) (not (<= t1 7.6e+102))) (/ v (- (* u (- 2.0)) t1)) (* t1 (/ (/ v (+ t1 u)) (- (- u) t1)))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.65e+142) || !(t1 <= 7.6e+102)) {
tmp = v / ((u * -2.0) - t1);
} 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 <= (-1.65d+142)) .or. (.not. (t1 <= 7.6d+102))) then
tmp = v / ((u * -2.0d0) - t1)
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 <= -1.65e+142) || !(t1 <= 7.6e+102)) {
tmp = v / ((u * -2.0) - t1);
} else {
tmp = t1 * ((v / (t1 + u)) / (-u - t1));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.65e+142) or not (t1 <= 7.6e+102): tmp = v / ((u * -2.0) - t1) else: tmp = t1 * ((v / (t1 + u)) / (-u - t1)) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.65e+142) || !(t1 <= 7.6e+102)) tmp = Float64(v / Float64(Float64(u * Float64(-2.0)) - t1)); 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 <= -1.65e+142) || ~((t1 <= 7.6e+102))) tmp = v / ((u * -2.0) - t1); else tmp = t1 * ((v / (t1 + u)) / (-u - t1)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.65e+142], N[Not[LessEqual[t1, 7.6e+102]], $MachinePrecision]], N[(v / N[(N[(u * (-2.0)), $MachinePrecision] - t1), $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 -1.65 \cdot 10^{+142} \lor \neg \left(t1 \leq 7.6 \cdot 10^{+102}\right):\\
\;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{t1 + u}}{\left(-u\right) - t1}\\
\end{array}
\end{array}
if t1 < -1.6500000000000001e142 or 7.59999999999999958e102 < t1 Initial program 51.0%
associate-/l*51.0%
distribute-lft-neg-out51.0%
distribute-rgt-neg-in51.0%
associate-/r*70.3%
distribute-neg-frac270.3%
Simplified70.3%
associate-*r/100.0%
+-commutative100.0%
distribute-neg-in100.0%
sub-neg100.0%
associate-*l/100.0%
clear-num100.0%
frac-2neg100.0%
frac-times98.6%
*-un-lft-identity98.6%
add-sqr-sqrt54.1%
sqrt-unprod48.3%
sqr-neg48.3%
sqrt-prod24.1%
add-sqr-sqrt44.7%
Applied egg-rr98.6%
Taylor expanded in u around 0 95.2%
*-commutative95.2%
Simplified95.2%
if -1.6500000000000001e142 < t1 < 7.59999999999999958e102Initial program 80.0%
associate-/l*80.7%
distribute-lft-neg-out80.7%
distribute-rgt-neg-in80.7%
associate-/r*88.1%
distribute-neg-frac288.1%
Simplified88.1%
Final simplification90.1%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -4900000.0) (not (<= t1 3.2e-64))) (/ v (- (* u (- 2.0)) t1)) (/ (* v (/ t1 (- u))) u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -4900000.0) || !(t1 <= 3.2e-64)) {
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 <= (-4900000.0d0)) .or. (.not. (t1 <= 3.2d-64))) 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 <= -4900000.0) || !(t1 <= 3.2e-64)) {
tmp = v / ((u * -2.0) - t1);
} else {
tmp = (v * (t1 / -u)) / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -4900000.0) or not (t1 <= 3.2e-64): tmp = v / ((u * -2.0) - t1) else: tmp = (v * (t1 / -u)) / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -4900000.0) || !(t1 <= 3.2e-64)) tmp = Float64(v / Float64(Float64(u * Float64(-2.0)) - t1)); 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 <= -4900000.0) || ~((t1 <= 3.2e-64))) 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, -4900000.0], N[Not[LessEqual[t1, 3.2e-64]], $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 -4900000 \lor \neg \left(t1 \leq 3.2 \cdot 10^{-64}\right):\\
\;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v \cdot \frac{t1}{-u}}{u}\\
\end{array}
\end{array}
if t1 < -4.9e6 or 3.19999999999999975e-64 < t1 Initial program 66.4%
associate-/l*68.6%
distribute-lft-neg-out68.6%
distribute-rgt-neg-in68.6%
associate-/r*82.6%
distribute-neg-frac282.6%
Simplified82.6%
associate-*r/99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*l/100.0%
clear-num100.0%
frac-2neg100.0%
frac-times96.2%
*-un-lft-identity96.2%
add-sqr-sqrt51.7%
sqrt-unprod58.1%
sqr-neg58.1%
sqrt-prod22.3%
add-sqr-sqrt39.0%
Applied egg-rr96.2%
Taylor expanded in u around 0 83.6%
*-commutative83.6%
Simplified83.6%
if -4.9e6 < t1 < 3.19999999999999975e-64Initial program 78.0%
associate-/l*76.8%
distribute-lft-neg-out76.8%
distribute-rgt-neg-in76.8%
associate-/r*84.0%
distribute-neg-frac284.0%
Simplified84.0%
distribute-frac-neg284.0%
associate-/r*76.8%
distribute-rgt-neg-in76.8%
distribute-lft-neg-out76.8%
associate-*r/78.0%
times-frac94.8%
frac-2neg94.8%
associate-*r/96.0%
add-sqr-sqrt53.5%
sqrt-unprod55.3%
sqr-neg55.3%
sqrt-unprod17.3%
add-sqr-sqrt39.5%
add-sqr-sqrt17.5%
sqrt-unprod65.9%
sqr-neg65.9%
sqrt-prod56.7%
add-sqr-sqrt96.0%
Applied egg-rr96.0%
Taylor expanded in t1 around 0 83.6%
Taylor expanded in t1 around 0 84.1%
Final simplification83.8%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -370000.0) (not (<= t1 4e-64))) (/ v (- (* u (- 2.0)) t1)) (* t1 (/ (/ v u) (- u)))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -370000.0) || !(t1 <= 4e-64)) {
tmp = v / ((u * -2.0) - 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 <= (-370000.0d0)) .or. (.not. (t1 <= 4d-64))) then
tmp = v / ((u * -2.0d0) - 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 <= -370000.0) || !(t1 <= 4e-64)) {
tmp = v / ((u * -2.0) - t1);
} else {
tmp = t1 * ((v / u) / -u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -370000.0) or not (t1 <= 4e-64): tmp = v / ((u * -2.0) - t1) else: tmp = t1 * ((v / u) / -u) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -370000.0) || !(t1 <= 4e-64)) tmp = Float64(v / Float64(Float64(u * Float64(-2.0)) - 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 <= -370000.0) || ~((t1 <= 4e-64))) tmp = v / ((u * -2.0) - t1); else tmp = t1 * ((v / u) / -u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -370000.0], N[Not[LessEqual[t1, 4e-64]], $MachinePrecision]], N[(v / N[(N[(u * (-2.0)), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision], N[(t1 * N[(N[(v / u), $MachinePrecision] / (-u)), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -370000 \lor \neg \left(t1 \leq 4 \cdot 10^{-64}\right):\\
\;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{-u}\\
\end{array}
\end{array}
if t1 < -3.7e5 or 3.99999999999999986e-64 < t1 Initial program 66.4%
associate-/l*68.6%
distribute-lft-neg-out68.6%
distribute-rgt-neg-in68.6%
associate-/r*82.6%
distribute-neg-frac282.6%
Simplified82.6%
associate-*r/99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*l/100.0%
clear-num100.0%
frac-2neg100.0%
frac-times96.2%
*-un-lft-identity96.2%
add-sqr-sqrt51.7%
sqrt-unprod58.1%
sqr-neg58.1%
sqrt-prod22.3%
add-sqr-sqrt39.0%
Applied egg-rr96.2%
Taylor expanded in u around 0 83.6%
*-commutative83.6%
Simplified83.6%
if -3.7e5 < t1 < 3.99999999999999986e-64Initial program 78.0%
associate-/l*76.8%
Simplified76.8%
Taylor expanded in t1 around 0 71.8%
Taylor expanded in t1 around 0 72.2%
associate-/r*78.7%
div-inv78.7%
Applied egg-rr78.7%
un-div-inv78.7%
Applied egg-rr78.7%
Final simplification81.2%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -3800000.0) (not (<= t1 6.5e-65))) (/ v (- (- u) t1)) (* t1 (/ (/ v u) (- u)))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -3800000.0) || !(t1 <= 6.5e-65)) {
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 <= (-3800000.0d0)) .or. (.not. (t1 <= 6.5d-65))) 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 <= -3800000.0) || !(t1 <= 6.5e-65)) {
tmp = v / (-u - t1);
} else {
tmp = t1 * ((v / u) / -u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -3800000.0) or not (t1 <= 6.5e-65): tmp = v / (-u - t1) else: tmp = t1 * ((v / u) / -u) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -3800000.0) || !(t1 <= 6.5e-65)) 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 <= -3800000.0) || ~((t1 <= 6.5e-65))) tmp = v / (-u - t1); else tmp = t1 * ((v / u) / -u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -3800000.0], N[Not[LessEqual[t1, 6.5e-65]], $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 -3800000 \lor \neg \left(t1 \leq 6.5 \cdot 10^{-65}\right):\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{-u}\\
\end{array}
\end{array}
if t1 < -3.8e6 or 6.5e-65 < t1 Initial program 66.4%
associate-/l*68.6%
distribute-lft-neg-out68.6%
distribute-rgt-neg-in68.6%
associate-/r*82.6%
distribute-neg-frac282.6%
Simplified82.6%
distribute-frac-neg282.6%
associate-/r*68.6%
distribute-rgt-neg-in68.6%
distribute-lft-neg-out68.6%
associate-*r/66.4%
times-frac100.0%
frac-2neg100.0%
associate-*r/100.0%
add-sqr-sqrt56.9%
sqrt-unprod34.1%
sqr-neg34.1%
sqrt-unprod17.7%
add-sqr-sqrt39.0%
add-sqr-sqrt16.7%
sqrt-unprod52.2%
sqr-neg52.2%
sqrt-prod44.9%
add-sqr-sqrt100.0%
Applied egg-rr100.0%
Taylor expanded in t1 around inf 83.5%
mul-1-neg83.5%
Simplified83.5%
if -3.8e6 < t1 < 6.5e-65Initial program 78.0%
associate-/l*76.8%
Simplified76.8%
Taylor expanded in t1 around 0 71.8%
Taylor expanded in t1 around 0 72.2%
associate-/r*78.7%
div-inv78.7%
Applied egg-rr78.7%
un-div-inv78.7%
Applied egg-rr78.7%
Final simplification81.2%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -8e-44) (not (<= t1 1.32e-65))) (/ v (- (- u) t1)) (* t1 (/ v (* u (- u))))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -8e-44) || !(t1 <= 1.32e-65)) {
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 <= (-8d-44)) .or. (.not. (t1 <= 1.32d-65))) 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 <= -8e-44) || !(t1 <= 1.32e-65)) {
tmp = v / (-u - t1);
} else {
tmp = t1 * (v / (u * -u));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -8e-44) or not (t1 <= 1.32e-65): tmp = v / (-u - t1) else: tmp = t1 * (v / (u * -u)) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -8e-44) || !(t1 <= 1.32e-65)) tmp = Float64(v / Float64(Float64(-u) - t1)); else tmp = Float64(t1 * Float64(v / Float64(u * Float64(-u)))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -8e-44) || ~((t1 <= 1.32e-65))) tmp = v / (-u - t1); else tmp = t1 * (v / (u * -u)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -8e-44], N[Not[LessEqual[t1, 1.32e-65]], $MachinePrecision]], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], N[(t1 * N[(v / N[(u * (-u)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -8 \cdot 10^{-44} \lor \neg \left(t1 \leq 1.32 \cdot 10^{-65}\right):\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;t1 \cdot \frac{v}{u \cdot \left(-u\right)}\\
\end{array}
\end{array}
if t1 < -7.99999999999999962e-44 or 1.32e-65 < t1 Initial program 66.2%
associate-/l*68.3%
distribute-lft-neg-out68.3%
distribute-rgt-neg-in68.3%
associate-/r*83.6%
distribute-neg-frac283.6%
Simplified83.6%
distribute-frac-neg283.6%
associate-/r*68.3%
distribute-rgt-neg-in68.3%
distribute-lft-neg-out68.3%
associate-*r/66.2%
times-frac99.9%
frac-2neg99.9%
associate-*r/99.9%
add-sqr-sqrt59.4%
sqrt-unprod37.9%
sqr-neg37.9%
sqrt-unprod16.7%
add-sqr-sqrt36.9%
add-sqr-sqrt15.9%
sqrt-unprod49.4%
sqr-neg49.4%
sqrt-prod43.0%
add-sqr-sqrt99.9%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 81.0%
mul-1-neg81.0%
Simplified81.0%
if -7.99999999999999962e-44 < t1 < 1.32e-65Initial program 79.0%
associate-/l*77.7%
Simplified77.7%
Taylor expanded in t1 around 0 74.9%
Taylor expanded in t1 around 0 75.2%
Final simplification78.4%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1e+35) (not (<= u 1.25e+78))) (/ (* t1 (/ v u)) u) (/ v (- (- u) t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1e+35) || !(u <= 1.25e+78)) {
tmp = (t1 * (v / u)) / u;
} else {
tmp = v / (-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 ((u <= (-1d+35)) .or. (.not. (u <= 1.25d+78))) then
tmp = (t1 * (v / u)) / u
else
tmp = v / (-u - t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -1e+35) || !(u <= 1.25e+78)) {
tmp = (t1 * (v / u)) / u;
} else {
tmp = v / (-u - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1e+35) or not (u <= 1.25e+78): tmp = (t1 * (v / u)) / u else: tmp = v / (-u - t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1e+35) || !(u <= 1.25e+78)) tmp = Float64(Float64(t1 * Float64(v / u)) / u); else tmp = Float64(v / Float64(Float64(-u) - t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -1e+35) || ~((u <= 1.25e+78))) tmp = (t1 * (v / u)) / u; else tmp = v / (-u - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1e+35], N[Not[LessEqual[u, 1.25e+78]], $MachinePrecision]], N[(N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision] / u), $MachinePrecision], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1 \cdot 10^{+35} \lor \neg \left(u \leq 1.25 \cdot 10^{+78}\right):\\
\;\;\;\;\frac{t1 \cdot \frac{v}{u}}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\end{array}
\end{array}
if u < -9.9999999999999997e34 or 1.24999999999999996e78 < u Initial program 81.4%
associate-/l*82.8%
Simplified82.8%
Taylor expanded in t1 around 0 82.8%
Taylor expanded in t1 around 0 81.8%
associate-/r*90.1%
associate-*r/91.1%
add-sqr-sqrt51.2%
sqrt-unprod66.9%
sqr-neg66.9%
sqrt-unprod28.3%
add-sqr-sqrt64.9%
Applied egg-rr64.9%
if -9.9999999999999997e34 < u < 1.24999999999999996e78Initial program 65.2%
associate-/l*65.2%
distribute-lft-neg-out65.2%
distribute-rgt-neg-in65.2%
associate-/r*77.6%
distribute-neg-frac277.6%
Simplified77.6%
distribute-frac-neg277.6%
associate-/r*65.2%
distribute-rgt-neg-in65.2%
distribute-lft-neg-out65.2%
associate-*r/65.2%
times-frac97.4%
frac-2neg97.4%
associate-*r/98.4%
add-sqr-sqrt54.9%
sqrt-unprod28.0%
sqr-neg28.0%
sqrt-unprod9.0%
add-sqr-sqrt18.4%
add-sqr-sqrt8.6%
sqrt-unprod50.5%
sqr-neg50.5%
sqrt-prod53.0%
add-sqr-sqrt98.4%
Applied egg-rr98.4%
Taylor expanded in t1 around inf 71.5%
mul-1-neg71.5%
Simplified71.5%
Final simplification68.7%
(FPCore (u v t1) :precision binary64 (if (<= u -2e+34) (/ (* t1 (/ v u)) u) (if (<= u 3.4e+84) (/ v (- (- u) t1)) (/ (/ t1 (/ u v)) u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -2e+34) {
tmp = (t1 * (v / u)) / u;
} else if (u <= 3.4e+84) {
tmp = v / (-u - 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 (u <= (-2d+34)) then
tmp = (t1 * (v / u)) / u
else if (u <= 3.4d+84) then
tmp = v / (-u - 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 (u <= -2e+34) {
tmp = (t1 * (v / u)) / u;
} else if (u <= 3.4e+84) {
tmp = v / (-u - t1);
} else {
tmp = (t1 / (u / v)) / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -2e+34: tmp = (t1 * (v / u)) / u elif u <= 3.4e+84: tmp = v / (-u - t1) else: tmp = (t1 / (u / v)) / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -2e+34) tmp = Float64(Float64(t1 * Float64(v / u)) / u); elseif (u <= 3.4e+84) tmp = Float64(v / Float64(Float64(-u) - t1)); else tmp = Float64(Float64(t1 / Float64(u / v)) / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -2e+34) tmp = (t1 * (v / u)) / u; elseif (u <= 3.4e+84) tmp = v / (-u - t1); else tmp = (t1 / (u / v)) / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -2e+34], N[(N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision] / u), $MachinePrecision], If[LessEqual[u, 3.4e+84], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], N[(N[(t1 / N[(u / v), $MachinePrecision]), $MachinePrecision] / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2 \cdot 10^{+34}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{u}}{u}\\
\mathbf{elif}\;u \leq 3.4 \cdot 10^{+84}:\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t1}{\frac{u}{v}}}{u}\\
\end{array}
\end{array}
if u < -1.99999999999999989e34Initial program 80.8%
associate-/l*82.9%
Simplified82.9%
Taylor expanded in t1 around 0 82.9%
Taylor expanded in t1 around 0 81.0%
associate-/r*90.7%
associate-*r/89.3%
add-sqr-sqrt54.0%
sqrt-unprod62.0%
sqr-neg62.0%
sqrt-unprod19.1%
add-sqr-sqrt53.8%
Applied egg-rr53.8%
if -1.99999999999999989e34 < u < 3.3999999999999998e84Initial program 65.2%
associate-/l*65.2%
distribute-lft-neg-out65.2%
distribute-rgt-neg-in65.2%
associate-/r*77.6%
distribute-neg-frac277.6%
Simplified77.6%
distribute-frac-neg277.6%
associate-/r*65.2%
distribute-rgt-neg-in65.2%
distribute-lft-neg-out65.2%
associate-*r/65.2%
times-frac97.4%
frac-2neg97.4%
associate-*r/98.4%
add-sqr-sqrt54.9%
sqrt-unprod28.0%
sqr-neg28.0%
sqrt-unprod9.0%
add-sqr-sqrt18.4%
add-sqr-sqrt8.6%
sqrt-unprod50.5%
sqr-neg50.5%
sqrt-prod53.0%
add-sqr-sqrt98.4%
Applied egg-rr98.4%
Taylor expanded in t1 around inf 71.5%
mul-1-neg71.5%
Simplified71.5%
if 3.3999999999999998e84 < u Initial program 82.0%
associate-/l*82.6%
Simplified82.6%
Taylor expanded in t1 around 0 82.6%
Taylor expanded in t1 around 0 82.6%
associate-/r*89.4%
div-inv89.4%
Applied egg-rr89.4%
associate-*r*92.9%
un-div-inv92.9%
clear-num92.9%
un-div-inv93.0%
add-sqr-sqrt48.4%
sqrt-unprod71.8%
sqr-neg71.8%
sqrt-unprod37.5%
add-sqr-sqrt75.9%
Applied egg-rr75.9%
Final simplification68.7%
(FPCore (u v t1) :precision binary64 (if (or (<= u -3.2e+184) (not (<= u 3.5e+103))) (/ v u) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.2e+184) || !(u <= 3.5e+103)) {
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 <= (-3.2d+184)) .or. (.not. (u <= 3.5d+103))) 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 <= -3.2e+184) || !(u <= 3.5e+103)) {
tmp = v / u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -3.2e+184) or not (u <= 3.5e+103): tmp = v / u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -3.2e+184) || !(u <= 3.5e+103)) tmp = Float64(v / u); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -3.2e+184) || ~((u <= 3.5e+103))) tmp = v / u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -3.2e+184], N[Not[LessEqual[u, 3.5e+103]], $MachinePrecision]], N[(v / u), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.2 \cdot 10^{+184} \lor \neg \left(u \leq 3.5 \cdot 10^{+103}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -3.19999999999999983e184 or 3.5e103 < u Initial program 79.9%
associate-/l*80.5%
Simplified80.5%
Taylor expanded in t1 around 0 80.5%
Taylor expanded in t1 around inf 46.6%
associate-*r/46.6%
mul-1-neg46.6%
Simplified46.6%
add-sqr-sqrt26.5%
sqrt-unprod46.4%
sqr-neg46.4%
sqrt-unprod20.4%
add-sqr-sqrt46.8%
div-inv46.8%
Applied egg-rr46.8%
associate-*r/46.8%
*-rgt-identity46.8%
Simplified46.8%
if -3.19999999999999983e184 < u < 3.5e103Initial program 69.2%
associate-/l*69.8%
distribute-lft-neg-out69.8%
distribute-rgt-neg-in69.8%
associate-/r*80.3%
distribute-neg-frac280.3%
Simplified80.3%
Taylor expanded in t1 around inf 62.2%
associate-*r/62.2%
neg-mul-162.2%
Simplified62.2%
Final simplification58.1%
(FPCore (u v t1) :precision binary64 (if (<= u -7.5e+185) (* (/ v u) -0.5) (if (<= u 5.7e+103) (/ v (- t1)) (/ v u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -7.5e+185) {
tmp = (v / u) * -0.5;
} else if (u <= 5.7e+103) {
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 <= (-7.5d+185)) then
tmp = (v / u) * (-0.5d0)
else if (u <= 5.7d+103) 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 <= -7.5e+185) {
tmp = (v / u) * -0.5;
} else if (u <= 5.7e+103) {
tmp = v / -t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -7.5e+185: tmp = (v / u) * -0.5 elif u <= 5.7e+103: tmp = v / -t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -7.5e+185) tmp = Float64(Float64(v / u) * -0.5); elseif (u <= 5.7e+103) 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 <= -7.5e+185) tmp = (v / u) * -0.5; elseif (u <= 5.7e+103) tmp = v / -t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -7.5e+185], N[(N[(v / u), $MachinePrecision] * -0.5), $MachinePrecision], If[LessEqual[u, 5.7e+103], N[(v / (-t1)), $MachinePrecision], N[(v / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -7.5 \cdot 10^{+185}:\\
\;\;\;\;\frac{v}{u} \cdot -0.5\\
\mathbf{elif}\;u \leq 5.7 \cdot 10^{+103}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if u < -7.49999999999999955e185Initial program 75.3%
associate-/l*75.8%
distribute-lft-neg-out75.8%
distribute-rgt-neg-in75.8%
associate-/r*94.4%
distribute-neg-frac294.4%
Simplified94.4%
associate-*r/99.8%
+-commutative99.8%
distribute-neg-in99.8%
sub-neg99.8%
associate-*l/99.9%
clear-num99.9%
frac-2neg99.9%
frac-times75.8%
*-un-lft-identity75.8%
add-sqr-sqrt75.8%
sqrt-unprod75.8%
sqr-neg75.8%
sqrt-prod0.0%
add-sqr-sqrt75.8%
Applied egg-rr75.8%
Taylor expanded in u around 0 56.8%
*-commutative56.8%
Simplified56.8%
Taylor expanded in t1 around 0 56.8%
*-commutative56.8%
Simplified56.8%
if -7.49999999999999955e185 < u < 5.70000000000000033e103Initial program 69.2%
associate-/l*69.8%
distribute-lft-neg-out69.8%
distribute-rgt-neg-in69.8%
associate-/r*80.3%
distribute-neg-frac280.3%
Simplified80.3%
Taylor expanded in t1 around inf 62.2%
associate-*r/62.2%
neg-mul-162.2%
Simplified62.2%
if 5.70000000000000033e103 < u Initial program 81.9%
associate-/l*82.5%
Simplified82.5%
Taylor expanded in t1 around 0 82.5%
Taylor expanded in t1 around inf 42.3%
associate-*r/42.3%
mul-1-neg42.3%
Simplified42.3%
add-sqr-sqrt28.8%
sqrt-unprod42.4%
sqr-neg42.4%
sqrt-unprod14.0%
add-sqr-sqrt42.7%
div-inv42.7%
Applied egg-rr42.7%
associate-*r/42.7%
*-rgt-identity42.7%
Simplified42.7%
Final simplification58.1%
(FPCore (u v t1) :precision binary64 (if (<= u -8.5e+184) (/ v (- u)) (if (<= u 6e+100) (/ v (- t1)) (/ v u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -8.5e+184) {
tmp = v / -u;
} else if (u <= 6e+100) {
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 <= (-8.5d+184)) then
tmp = v / -u
else if (u <= 6d+100) 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 <= -8.5e+184) {
tmp = v / -u;
} else if (u <= 6e+100) {
tmp = v / -t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -8.5e+184: tmp = v / -u elif u <= 6e+100: tmp = v / -t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -8.5e+184) tmp = Float64(v / Float64(-u)); elseif (u <= 6e+100) 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 <= -8.5e+184) tmp = v / -u; elseif (u <= 6e+100) tmp = v / -t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -8.5e+184], N[(v / (-u)), $MachinePrecision], If[LessEqual[u, 6e+100], N[(v / (-t1)), $MachinePrecision], N[(v / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -8.5 \cdot 10^{+184}:\\
\;\;\;\;\frac{v}{-u}\\
\mathbf{elif}\;u \leq 6 \cdot 10^{+100}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if u < -8.50000000000000043e184Initial program 75.3%
associate-/l*75.8%
Simplified75.8%
Taylor expanded in t1 around 0 75.8%
Taylor expanded in t1 around inf 56.8%
associate-*r/56.8%
mul-1-neg56.8%
Simplified56.8%
if -8.50000000000000043e184 < u < 5.99999999999999971e100Initial program 69.2%
associate-/l*69.8%
distribute-lft-neg-out69.8%
distribute-rgt-neg-in69.8%
associate-/r*80.3%
distribute-neg-frac280.3%
Simplified80.3%
Taylor expanded in t1 around inf 62.2%
associate-*r/62.2%
neg-mul-162.2%
Simplified62.2%
if 5.99999999999999971e100 < u Initial program 81.9%
associate-/l*82.5%
Simplified82.5%
Taylor expanded in t1 around 0 82.5%
Taylor expanded in t1 around inf 42.3%
associate-*r/42.3%
mul-1-neg42.3%
Simplified42.3%
add-sqr-sqrt28.8%
sqrt-unprod42.4%
sqr-neg42.4%
sqrt-unprod14.0%
add-sqr-sqrt42.7%
div-inv42.7%
Applied egg-rr42.7%
associate-*r/42.7%
*-rgt-identity42.7%
Simplified42.7%
Final simplification58.1%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -2.8e+158) (not (<= t1 4.2e+103))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -2.8e+158) || !(t1 <= 4.2e+103)) {
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 <= (-2.8d+158)) .or. (.not. (t1 <= 4.2d+103))) 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 <= -2.8e+158) || !(t1 <= 4.2e+103)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -2.8e+158) or not (t1 <= 4.2e+103): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -2.8e+158) || !(t1 <= 4.2e+103)) 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 <= -2.8e+158) || ~((t1 <= 4.2e+103))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -2.8e+158], N[Not[LessEqual[t1, 4.2e+103]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2.8 \cdot 10^{+158} \lor \neg \left(t1 \leq 4.2 \cdot 10^{+103}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -2.80000000000000001e158 or 4.2000000000000003e103 < t1 Initial program 49.6%
associate-/l*49.6%
distribute-lft-neg-out49.6%
distribute-rgt-neg-in49.6%
associate-/r*68.6%
distribute-neg-frac268.6%
Simplified68.6%
Taylor expanded in t1 around inf 94.6%
associate-*r/94.6%
neg-mul-194.6%
Simplified94.6%
neg-sub094.6%
sub-neg94.6%
add-sqr-sqrt48.6%
sqrt-unprod62.4%
sqr-neg62.4%
sqrt-unprod25.5%
add-sqr-sqrt47.2%
Applied egg-rr47.2%
+-lft-identity47.2%
Simplified47.2%
if -2.80000000000000001e158 < t1 < 4.2000000000000003e103Initial program 79.8%
associate-/l*80.6%
Simplified80.6%
Taylor expanded in t1 around 0 60.0%
Taylor expanded in t1 around inf 21.3%
associate-*r/21.3%
mul-1-neg21.3%
Simplified21.3%
add-sqr-sqrt13.0%
sqrt-unprod24.8%
sqr-neg24.8%
sqrt-unprod7.7%
add-sqr-sqrt18.2%
div-inv18.2%
Applied egg-rr18.2%
associate-*r/18.2%
*-rgt-identity18.2%
Simplified18.2%
Final simplification25.7%
(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 72.0%
times-frac97.5%
distribute-frac-neg97.5%
distribute-neg-frac297.5%
+-commutative97.5%
distribute-neg-in97.5%
unsub-neg97.5%
Simplified97.5%
Final simplification97.5%
(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 72.0%
associate-/l*72.6%
distribute-lft-neg-out72.6%
distribute-rgt-neg-in72.6%
associate-/r*83.3%
distribute-neg-frac283.3%
Simplified83.3%
distribute-frac-neg283.3%
associate-/r*72.6%
distribute-rgt-neg-in72.6%
distribute-lft-neg-out72.6%
associate-*r/72.0%
times-frac97.5%
frac-2neg97.5%
associate-*r/98.0%
add-sqr-sqrt55.3%
sqrt-unprod44.4%
sqr-neg44.4%
sqrt-unprod17.5%
add-sqr-sqrt39.2%
add-sqr-sqrt17.1%
sqrt-unprod58.9%
sqr-neg58.9%
sqrt-prod50.6%
add-sqr-sqrt98.0%
Applied egg-rr98.0%
Taylor expanded in t1 around inf 59.4%
mul-1-neg59.4%
Simplified59.4%
Final simplification59.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 72.0%
associate-/l*72.6%
distribute-lft-neg-out72.6%
distribute-rgt-neg-in72.6%
associate-/r*83.3%
distribute-neg-frac283.3%
Simplified83.3%
Taylor expanded in t1 around inf 50.5%
associate-*r/50.5%
neg-mul-150.5%
Simplified50.5%
neg-sub050.5%
sub-neg50.5%
add-sqr-sqrt28.8%
sqrt-unprod36.2%
sqr-neg36.2%
sqrt-unprod7.6%
add-sqr-sqrt16.0%
Applied egg-rr16.0%
+-lft-identity16.0%
Simplified16.0%
herbie shell --seed 2024123
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))