
(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 17 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 70.1%
times-frac97.9%
distribute-frac-neg97.9%
distribute-neg-frac297.9%
+-commutative97.9%
distribute-neg-in97.9%
unsub-neg97.9%
Simplified97.9%
frac-2neg97.9%
frac-2neg97.9%
frac-times70.1%
sub-neg70.1%
distribute-neg-in70.1%
+-commutative70.1%
remove-double-neg70.1%
frac-times97.9%
associate-*r/99.1%
add-sqr-sqrt46.7%
sqrt-unprod42.4%
sqr-neg42.4%
sqrt-unprod19.8%
add-sqr-sqrt39.5%
add-sqr-sqrt25.2%
sqrt-unprod58.3%
Applied egg-rr99.1%
Final simplification99.1%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.12e-111) (not (<= u 1.3e-123))) (* t1 (/ (/ v (+ t1 u)) (- (- u) t1))) (/ (- v) (+ t1 u))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.12e-111) || !(u <= 1.3e-123)) {
tmp = t1 * ((v / (t1 + u)) / (-u - t1));
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-1.12d-111)) .or. (.not. (u <= 1.3d-123))) then
tmp = t1 * ((v / (t1 + u)) / (-u - t1))
else
tmp = -v / (t1 + u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.12e-111) || !(u <= 1.3e-123)) {
tmp = t1 * ((v / (t1 + u)) / (-u - t1));
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.12e-111) or not (u <= 1.3e-123): tmp = t1 * ((v / (t1 + u)) / (-u - t1)) else: tmp = -v / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.12e-111) || !(u <= 1.3e-123)) tmp = Float64(t1 * Float64(Float64(v / Float64(t1 + u)) / Float64(Float64(-u) - t1))); else tmp = Float64(Float64(-v) / Float64(t1 + u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -1.12e-111) || ~((u <= 1.3e-123))) tmp = t1 * ((v / (t1 + u)) / (-u - t1)); else tmp = -v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.12e-111], N[Not[LessEqual[u, 1.3e-123]], $MachinePrecision]], N[(t1 * N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.12 \cdot 10^{-111} \lor \neg \left(u \leq 1.3 \cdot 10^{-123}\right):\\
\;\;\;\;t1 \cdot \frac{\frac{v}{t1 + u}}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\end{array}
\end{array}
if u < -1.12000000000000009e-111 or 1.29999999999999998e-123 < u Initial program 76.1%
associate-/l*77.9%
distribute-lft-neg-out77.9%
distribute-rgt-neg-in77.9%
associate-/r*91.1%
distribute-neg-frac291.1%
Simplified91.1%
if -1.12000000000000009e-111 < u < 1.29999999999999998e-123Initial program 57.3%
times-frac100.0%
distribute-frac-neg100.0%
distribute-neg-frac2100.0%
+-commutative100.0%
distribute-neg-in100.0%
unsub-neg100.0%
Simplified100.0%
frac-2neg100.0%
frac-2neg100.0%
frac-times57.3%
sub-neg57.3%
distribute-neg-in57.3%
+-commutative57.3%
remove-double-neg57.3%
frac-times100.0%
associate-*r/100.0%
add-sqr-sqrt46.0%
sqrt-unprod24.2%
sqr-neg24.2%
sqrt-unprod10.4%
add-sqr-sqrt20.2%
add-sqr-sqrt9.9%
sqrt-unprod43.9%
Applied egg-rr100.0%
Taylor expanded in t1 around inf 94.2%
mul-1-neg94.2%
Simplified94.2%
Final simplification92.1%
(FPCore (u v t1) :precision binary64 (if (or (<= u -5e+18) (not (<= u 1e-29))) (/ (/ t1 (/ u v)) (- t1 u)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -5e+18) || !(u <= 1e-29)) {
tmp = (t1 / (u / v)) / (t1 - u);
} else {
tmp = v / -t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-5d+18)) .or. (.not. (u <= 1d-29))) then
tmp = (t1 / (u / v)) / (t1 - u)
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -5e+18) || !(u <= 1e-29)) {
tmp = (t1 / (u / v)) / (t1 - u);
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -5e+18) or not (u <= 1e-29): tmp = (t1 / (u / v)) / (t1 - u) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -5e+18) || !(u <= 1e-29)) tmp = Float64(Float64(t1 / Float64(u / v)) / Float64(t1 - u)); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -5e+18) || ~((u <= 1e-29))) tmp = (t1 / (u / v)) / (t1 - u); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -5e+18], N[Not[LessEqual[u, 1e-29]], $MachinePrecision]], N[(N[(t1 / N[(u / v), $MachinePrecision]), $MachinePrecision] / N[(t1 - u), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -5 \cdot 10^{+18} \lor \neg \left(u \leq 10^{-29}\right):\\
\;\;\;\;\frac{\frac{t1}{\frac{u}{v}}}{t1 - u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -5e18 or 9.99999999999999943e-30 < u Initial program 78.9%
Taylor expanded in t1 around 0 76.7%
Taylor expanded in v around 0 76.7%
mul-1-neg76.7%
*-commutative76.7%
times-frac84.1%
distribute-rgt-neg-in84.1%
distribute-neg-frac84.1%
Simplified84.1%
*-commutative84.1%
frac-2neg84.1%
remove-double-neg84.1%
associate-*l/85.2%
add-sqr-sqrt46.7%
sqrt-unprod65.5%
sqr-neg65.5%
sqrt-unprod29.1%
add-sqr-sqrt59.1%
*-commutative59.1%
clear-num59.9%
associate-*l/59.9%
*-un-lft-identity59.9%
add-sqr-sqrt29.6%
sqrt-unprod65.4%
sqr-neg65.4%
sqrt-unprod47.1%
add-sqr-sqrt86.0%
distribute-neg-in86.0%
add-sqr-sqrt38.8%
sqrt-unprod84.9%
sqr-neg84.9%
sqrt-unprod47.0%
add-sqr-sqrt86.1%
Applied egg-rr86.1%
if -5e18 < u < 9.99999999999999943e-30Initial program 61.7%
times-frac97.0%
distribute-frac-neg97.0%
distribute-neg-frac297.0%
+-commutative97.0%
distribute-neg-in97.0%
unsub-neg97.0%
Simplified97.0%
Taylor expanded in t1 around inf 82.2%
associate-*r/82.2%
neg-mul-182.2%
Simplified82.2%
Final simplification84.1%
(FPCore (u v t1) :precision binary64 (if (or (<= u -70000000000000.0) (not (<= u 1.32e-52))) (/ (* v (/ t1 u)) (- t1 u)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -70000000000000.0) || !(u <= 1.32e-52)) {
tmp = (v * (t1 / u)) / (t1 - u);
} else {
tmp = v / -t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-70000000000000.0d0)) .or. (.not. (u <= 1.32d-52))) then
tmp = (v * (t1 / u)) / (t1 - u)
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -70000000000000.0) || !(u <= 1.32e-52)) {
tmp = (v * (t1 / u)) / (t1 - u);
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -70000000000000.0) or not (u <= 1.32e-52): tmp = (v * (t1 / u)) / (t1 - u) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -70000000000000.0) || !(u <= 1.32e-52)) tmp = Float64(Float64(v * Float64(t1 / u)) / Float64(t1 - u)); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -70000000000000.0) || ~((u <= 1.32e-52))) tmp = (v * (t1 / u)) / (t1 - u); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -70000000000000.0], N[Not[LessEqual[u, 1.32e-52]], $MachinePrecision]], N[(N[(v * N[(t1 / u), $MachinePrecision]), $MachinePrecision] / N[(t1 - u), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -70000000000000 \lor \neg \left(u \leq 1.32 \cdot 10^{-52}\right):\\
\;\;\;\;\frac{v \cdot \frac{t1}{u}}{t1 - u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -7e13 or 1.32000000000000002e-52 < u Initial program 79.2%
Taylor expanded in t1 around 0 76.3%
associate-/l*77.8%
add-sqr-sqrt35.1%
sqrt-unprod55.4%
sqr-neg55.4%
sqrt-unprod30.6%
add-sqr-sqrt60.5%
associate-/r*60.5%
Applied egg-rr60.5%
associate-/l/60.5%
associate-/l*59.1%
*-commutative59.1%
associate-*r/59.5%
associate-/r*58.3%
Simplified58.3%
add-sqr-sqrt57.1%
sqrt-unprod66.7%
swap-sqr54.9%
sqr-neg54.9%
associate-/l/54.9%
distribute-frac-neg54.9%
associate-/l/54.9%
distribute-frac-neg54.9%
swap-sqr66.0%
sqrt-unprod65.7%
add-sqr-sqrt75.6%
distribute-frac-neg75.6%
distribute-frac-neg275.6%
associate-*r/76.3%
Applied egg-rr76.4%
associate-/r*79.8%
*-commutative79.8%
associate-*r/83.6%
Simplified83.6%
if -7e13 < u < 1.32000000000000002e-52Initial program 61.1%
times-frac97.7%
distribute-frac-neg97.7%
distribute-neg-frac297.7%
+-commutative97.7%
distribute-neg-in97.7%
unsub-neg97.7%
Simplified97.7%
Taylor expanded in t1 around inf 82.7%
associate-*r/82.7%
neg-mul-182.7%
Simplified82.7%
Final simplification83.2%
(FPCore (u v t1) :precision binary64 (if (or (<= u -4.9e+15) (not (<= u 4.1e-31))) (* (/ t1 u) (/ v (- u))) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -4.9e+15) || !(u <= 4.1e-31)) {
tmp = (t1 / u) * (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 <= (-4.9d+15)) .or. (.not. (u <= 4.1d-31))) then
tmp = (t1 / u) * (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 <= -4.9e+15) || !(u <= 4.1e-31)) {
tmp = (t1 / u) * (v / -u);
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -4.9e+15) or not (u <= 4.1e-31): tmp = (t1 / u) * (v / -u) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -4.9e+15) || !(u <= 4.1e-31)) tmp = Float64(Float64(t1 / u) * Float64(v / Float64(-u))); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -4.9e+15) || ~((u <= 4.1e-31))) tmp = (t1 / u) * (v / -u); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -4.9e+15], N[Not[LessEqual[u, 4.1e-31]], $MachinePrecision]], N[(N[(t1 / u), $MachinePrecision] * N[(v / (-u)), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -4.9 \cdot 10^{+15} \lor \neg \left(u \leq 4.1 \cdot 10^{-31}\right):\\
\;\;\;\;\frac{t1}{u} \cdot \frac{v}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -4.9e15 or 4.0999999999999996e-31 < u Initial program 78.9%
Taylor expanded in t1 around 0 76.7%
Taylor expanded in v around 0 76.7%
mul-1-neg76.7%
*-commutative76.7%
times-frac84.1%
distribute-rgt-neg-in84.1%
distribute-neg-frac84.1%
Simplified84.1%
Taylor expanded in t1 around 0 83.5%
associate-*r/83.5%
mul-1-neg83.5%
Simplified83.5%
if -4.9e15 < u < 4.0999999999999996e-31Initial program 61.7%
times-frac97.0%
distribute-frac-neg97.0%
distribute-neg-frac297.0%
+-commutative97.0%
distribute-neg-in97.0%
unsub-neg97.0%
Simplified97.0%
Taylor expanded in t1 around inf 82.2%
associate-*r/82.2%
neg-mul-182.2%
Simplified82.2%
Final simplification82.8%
(FPCore (u v t1) :precision binary64 (if (<= t1 -4.8e-6) (/ -1.0 (/ (+ t1 u) v)) (if (<= t1 1.1e-77) (* v (/ t1 (* u (- u)))) (/ v (- u t1)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -4.8e-6) {
tmp = -1.0 / ((t1 + u) / v);
} else if (t1 <= 1.1e-77) {
tmp = v * (t1 / (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 (t1 <= (-4.8d-6)) then
tmp = (-1.0d0) / ((t1 + u) / v)
else if (t1 <= 1.1d-77) then
tmp = v * (t1 / (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 (t1 <= -4.8e-6) {
tmp = -1.0 / ((t1 + u) / v);
} else if (t1 <= 1.1e-77) {
tmp = v * (t1 / (u * -u));
} else {
tmp = v / (u - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -4.8e-6: tmp = -1.0 / ((t1 + u) / v) elif t1 <= 1.1e-77: tmp = v * (t1 / (u * -u)) else: tmp = v / (u - t1) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -4.8e-6) tmp = Float64(-1.0 / Float64(Float64(t1 + u) / v)); elseif (t1 <= 1.1e-77) tmp = Float64(v * Float64(t1 / Float64(u * Float64(-u)))); else tmp = Float64(v / Float64(u - t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -4.8e-6) tmp = -1.0 / ((t1 + u) / v); elseif (t1 <= 1.1e-77) tmp = v * (t1 / (u * -u)); else tmp = v / (u - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -4.8e-6], N[(-1.0 / N[(N[(t1 + u), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 1.1e-77], N[(v * N[(t1 / N[(u * (-u)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -4.8 \cdot 10^{-6}:\\
\;\;\;\;\frac{-1}{\frac{t1 + u}{v}}\\
\mathbf{elif}\;t1 \leq 1.1 \cdot 10^{-77}:\\
\;\;\;\;v \cdot \frac{t1}{u \cdot \left(-u\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u - t1}\\
\end{array}
\end{array}
if t1 < -4.7999999999999998e-6Initial program 57.3%
times-frac100.0%
distribute-frac-neg100.0%
distribute-neg-frac2100.0%
+-commutative100.0%
distribute-neg-in100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in t1 around inf 84.7%
clear-num84.7%
un-div-inv84.7%
Applied egg-rr84.7%
if -4.7999999999999998e-6 < t1 < 1.10000000000000003e-77Initial program 82.8%
associate-*l/87.1%
*-commutative87.1%
Simplified87.1%
Taylor expanded in t1 around 0 75.7%
Taylor expanded in t1 around 0 78.0%
if 1.10000000000000003e-77 < t1 Initial program 66.0%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in t1 around inf 77.7%
add-sqr-sqrt44.8%
add-sqr-sqrt44.6%
difference-of-squares44.6%
add-sqr-sqrt44.6%
sqrt-unprod46.9%
sqr-neg46.9%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
add-sqr-sqrt0.0%
sqrt-unprod32.7%
sqr-neg32.7%
sqrt-unprod32.3%
add-sqr-sqrt32.3%
Applied egg-rr32.3%
difference-of-squares32.3%
rem-square-sqrt77.2%
rem-square-sqrt77.7%
Simplified77.7%
Taylor expanded in v around 0 77.7%
Final simplification79.8%
(FPCore (u v t1) :precision binary64 (if (or (<= u -3.4e+44) (not (<= u 8e+167))) (* v (/ (/ t1 u) u)) (/ (- v) (+ t1 u))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.4e+44) || !(u <= 8e+167)) {
tmp = v * ((t1 / u) / u);
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-3.4d+44)) .or. (.not. (u <= 8d+167))) then
tmp = v * ((t1 / u) / u)
else
tmp = -v / (t1 + u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.4e+44) || !(u <= 8e+167)) {
tmp = v * ((t1 / u) / u);
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -3.4e+44) or not (u <= 8e+167): tmp = v * ((t1 / u) / u) else: tmp = -v / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -3.4e+44) || !(u <= 8e+167)) tmp = Float64(v * Float64(Float64(t1 / u) / u)); else tmp = Float64(Float64(-v) / Float64(t1 + u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -3.4e+44) || ~((u <= 8e+167))) tmp = v * ((t1 / u) / u); else tmp = -v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -3.4e+44], N[Not[LessEqual[u, 8e+167]], $MachinePrecision]], N[(v * N[(N[(t1 / u), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.4 \cdot 10^{+44} \lor \neg \left(u \leq 8 \cdot 10^{+167}\right):\\
\;\;\;\;v \cdot \frac{\frac{t1}{u}}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\end{array}
\end{array}
if u < -3.4e44 or 8.0000000000000003e167 < u Initial program 83.4%
Taylor expanded in t1 around 0 83.4%
associate-/l*86.1%
add-sqr-sqrt38.2%
sqrt-unprod69.1%
sqr-neg69.1%
sqrt-unprod39.6%
add-sqr-sqrt74.3%
associate-/r*74.2%
Applied egg-rr74.2%
associate-/l/74.3%
associate-/l*74.0%
*-commutative74.0%
associate-*r/74.4%
associate-/r*74.4%
Simplified74.4%
Taylor expanded in t1 around 0 74.2%
if -3.4e44 < u < 8.0000000000000003e167Initial program 63.8%
times-frac97.7%
distribute-frac-neg97.7%
distribute-neg-frac297.7%
+-commutative97.7%
distribute-neg-in97.7%
unsub-neg97.7%
Simplified97.7%
frac-2neg97.7%
frac-2neg97.7%
frac-times63.8%
sub-neg63.8%
distribute-neg-in63.8%
+-commutative63.8%
remove-double-neg63.8%
frac-times97.7%
associate-*r/99.5%
add-sqr-sqrt47.5%
sqrt-unprod28.1%
sqr-neg28.1%
sqrt-unprod10.5%
add-sqr-sqrt23.2%
add-sqr-sqrt10.3%
sqrt-unprod50.8%
Applied egg-rr99.5%
Taylor expanded in t1 around inf 72.8%
mul-1-neg72.8%
Simplified72.8%
Final simplification73.2%
(FPCore (u v t1) :precision binary64 (if (or (<= u -3.4e+81) (not (<= u 5.6e+137))) (* v (/ (/ t1 u) t1)) (/ (- v) (+ t1 u))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.4e+81) || !(u <= 5.6e+137)) {
tmp = v * ((t1 / u) / t1);
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-3.4d+81)) .or. (.not. (u <= 5.6d+137))) then
tmp = v * ((t1 / u) / t1)
else
tmp = -v / (t1 + u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.4e+81) || !(u <= 5.6e+137)) {
tmp = v * ((t1 / u) / t1);
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -3.4e+81) or not (u <= 5.6e+137): tmp = v * ((t1 / u) / t1) else: tmp = -v / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -3.4e+81) || !(u <= 5.6e+137)) tmp = Float64(v * Float64(Float64(t1 / u) / t1)); else tmp = Float64(Float64(-v) / Float64(t1 + u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -3.4e+81) || ~((u <= 5.6e+137))) tmp = v * ((t1 / u) / t1); else tmp = -v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -3.4e+81], N[Not[LessEqual[u, 5.6e+137]], $MachinePrecision]], N[(v * N[(N[(t1 / u), $MachinePrecision] / t1), $MachinePrecision]), $MachinePrecision], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.4 \cdot 10^{+81} \lor \neg \left(u \leq 5.6 \cdot 10^{+137}\right):\\
\;\;\;\;v \cdot \frac{\frac{t1}{u}}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\end{array}
\end{array}
if u < -3.40000000000000003e81 or 5.60000000000000002e137 < u Initial program 80.7%
Taylor expanded in t1 around 0 80.8%
associate-/l*83.4%
add-sqr-sqrt36.5%
sqrt-unprod65.9%
sqr-neg65.9%
sqrt-unprod37.8%
add-sqr-sqrt72.1%
associate-/r*72.0%
Applied egg-rr72.0%
associate-/l/72.1%
associate-/l*71.7%
*-commutative71.7%
associate-*r/72.2%
associate-/r*72.2%
Simplified72.2%
Taylor expanded in t1 around inf 60.7%
if -3.40000000000000003e81 < u < 5.60000000000000002e137Initial program 64.7%
times-frac97.1%
distribute-frac-neg97.1%
distribute-neg-frac297.1%
+-commutative97.1%
distribute-neg-in97.1%
unsub-neg97.1%
Simplified97.1%
frac-2neg97.1%
frac-2neg97.1%
frac-times64.7%
sub-neg64.7%
distribute-neg-in64.7%
+-commutative64.7%
remove-double-neg64.7%
frac-times97.1%
associate-*r/98.9%
add-sqr-sqrt46.9%
sqrt-unprod28.2%
sqr-neg28.2%
sqrt-unprod10.7%
add-sqr-sqrt23.2%
add-sqr-sqrt11.2%
sqrt-unprod50.8%
Applied egg-rr98.9%
Taylor expanded in t1 around inf 73.8%
mul-1-neg73.8%
Simplified73.8%
Final simplification69.4%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.7e+136) (not (<= u 5.8e+174))) (/ -1.0 (/ u v)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.7e+136) || !(u <= 5.8e+174)) {
tmp = -1.0 / (u / v);
} else {
tmp = v / -t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-1.7d+136)) .or. (.not. (u <= 5.8d+174))) then
tmp = (-1.0d0) / (u / v)
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.7e+136) || !(u <= 5.8e+174)) {
tmp = -1.0 / (u / v);
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.7e+136) or not (u <= 5.8e+174): tmp = -1.0 / (u / v) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.7e+136) || !(u <= 5.8e+174)) tmp = Float64(-1.0 / Float64(u / v)); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -1.7e+136) || ~((u <= 5.8e+174))) tmp = -1.0 / (u / v); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.7e+136], N[Not[LessEqual[u, 5.8e+174]], $MachinePrecision]], N[(-1.0 / N[(u / v), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.7 \cdot 10^{+136} \lor \neg \left(u \leq 5.8 \cdot 10^{+174}\right):\\
\;\;\;\;\frac{-1}{\frac{u}{v}}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -1.69999999999999998e136 or 5.7999999999999999e174 < u Initial program 85.1%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in t1 around inf 45.6%
clear-num47.8%
un-div-inv47.8%
Applied egg-rr47.8%
Taylor expanded in t1 around 0 47.4%
if -1.69999999999999998e136 < u < 5.7999999999999999e174Initial program 65.0%
times-frac97.2%
distribute-frac-neg97.2%
distribute-neg-frac297.2%
+-commutative97.2%
distribute-neg-in97.2%
unsub-neg97.2%
Simplified97.2%
Taylor expanded in t1 around inf 67.0%
associate-*r/67.0%
neg-mul-167.0%
Simplified67.0%
Final simplification62.0%
(FPCore (u v t1) :precision binary64 (if (<= u -6.5e+132) (/ -1.0 (/ u v)) (if (<= u 2.7e+168) (/ v (- t1)) (/ 1.0 (/ u v)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -6.5e+132) {
tmp = -1.0 / (u / v);
} else if (u <= 2.7e+168) {
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 <= (-6.5d+132)) then
tmp = (-1.0d0) / (u / v)
else if (u <= 2.7d+168) 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 <= -6.5e+132) {
tmp = -1.0 / (u / v);
} else if (u <= 2.7e+168) {
tmp = v / -t1;
} else {
tmp = 1.0 / (u / v);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -6.5e+132: tmp = -1.0 / (u / v) elif u <= 2.7e+168: tmp = v / -t1 else: tmp = 1.0 / (u / v) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -6.5e+132) tmp = Float64(-1.0 / Float64(u / v)); elseif (u <= 2.7e+168) 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 <= -6.5e+132) tmp = -1.0 / (u / v); elseif (u <= 2.7e+168) tmp = v / -t1; else tmp = 1.0 / (u / v); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -6.5e+132], N[(-1.0 / N[(u / v), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 2.7e+168], N[(v / (-t1)), $MachinePrecision], N[(1.0 / N[(u / v), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -6.5 \cdot 10^{+132}:\\
\;\;\;\;\frac{-1}{\frac{u}{v}}\\
\mathbf{elif}\;u \leq 2.7 \cdot 10^{+168}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{u}{v}}\\
\end{array}
\end{array}
if u < -6.4999999999999994e132Initial program 87.2%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in t1 around inf 45.7%
clear-num47.2%
un-div-inv47.2%
Applied egg-rr47.2%
Taylor expanded in t1 around 0 47.2%
if -6.4999999999999994e132 < u < 2.70000000000000016e168Initial program 65.3%
times-frac97.2%
distribute-frac-neg97.2%
distribute-neg-frac297.2%
+-commutative97.2%
distribute-neg-in97.2%
unsub-neg97.2%
Simplified97.2%
Taylor expanded in t1 around inf 67.3%
associate-*r/67.3%
neg-mul-167.3%
Simplified67.3%
if 2.70000000000000016e168 < u Initial program 76.8%
times-frac100.0%
distribute-frac-neg100.0%
distribute-neg-frac2100.0%
+-commutative100.0%
distribute-neg-in100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in t1 around inf 43.4%
associate-*r/43.4%
neg-mul-143.4%
clear-num47.0%
add-sqr-sqrt27.3%
sqrt-unprod45.7%
sqr-neg45.7%
sqrt-unprod20.0%
add-sqr-sqrt46.1%
Applied egg-rr46.1%
Taylor expanded in t1 around 0 46.7%
Final simplification62.1%
(FPCore (u v t1) :precision binary64 (if (or (<= u -2.3e+134) (not (<= u 9.6e+172))) (/ v u) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.3e+134) || !(u <= 9.6e+172)) {
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 <= (-2.3d+134)) .or. (.not. (u <= 9.6d+172))) 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 <= -2.3e+134) || !(u <= 9.6e+172)) {
tmp = v / u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -2.3e+134) or not (u <= 9.6e+172): tmp = v / u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -2.3e+134) || !(u <= 9.6e+172)) 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 <= -2.3e+134) || ~((u <= 9.6e+172))) tmp = v / u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2.3e+134], N[Not[LessEqual[u, 9.6e+172]], $MachinePrecision]], N[(v / u), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.3 \cdot 10^{+134} \lor \neg \left(u \leq 9.6 \cdot 10^{+172}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -2.2999999999999998e134 or 9.6000000000000002e172 < u Initial program 83.9%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in t1 around inf 59.9%
add-sqr-sqrt40.5%
add-sqr-sqrt23.1%
difference-of-squares23.1%
add-sqr-sqrt23.1%
sqrt-unprod26.1%
sqr-neg26.1%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
add-sqr-sqrt0.0%
sqrt-unprod12.2%
sqr-neg12.2%
sqrt-unprod10.8%
add-sqr-sqrt10.8%
Applied egg-rr10.8%
difference-of-squares10.8%
rem-square-sqrt34.1%
rem-square-sqrt59.9%
Simplified59.9%
Taylor expanded in t1 around 0 44.8%
if -2.2999999999999998e134 < u < 9.6000000000000002e172Initial program 65.3%
times-frac97.2%
distribute-frac-neg97.2%
distribute-neg-frac297.2%
+-commutative97.2%
distribute-neg-in97.2%
unsub-neg97.2%
Simplified97.2%
Taylor expanded in t1 around inf 67.3%
associate-*r/67.3%
neg-mul-167.3%
Simplified67.3%
Final simplification61.5%
(FPCore (u v t1) :precision binary64 (if (<= u -1.45e+136) (/ v (- u)) (if (<= u 9.4e+167) (/ v (- t1)) (/ v u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.45e+136) {
tmp = v / -u;
} else if (u <= 9.4e+167) {
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.45d+136)) then
tmp = v / -u
else if (u <= 9.4d+167) 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.45e+136) {
tmp = v / -u;
} else if (u <= 9.4e+167) {
tmp = v / -t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.45e+136: tmp = v / -u elif u <= 9.4e+167: tmp = v / -t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.45e+136) tmp = Float64(v / Float64(-u)); elseif (u <= 9.4e+167) 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.45e+136) tmp = v / -u; elseif (u <= 9.4e+167) tmp = v / -t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.45e+136], N[(v / (-u)), $MachinePrecision], If[LessEqual[u, 9.4e+167], N[(v / (-t1)), $MachinePrecision], N[(v / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.45 \cdot 10^{+136}:\\
\;\;\;\;\frac{v}{-u}\\
\mathbf{elif}\;u \leq 9.4 \cdot 10^{+167}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if u < -1.44999999999999987e136Initial program 87.2%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in t1 around inf 45.7%
Taylor expanded in t1 around 0 45.7%
associate-*r/45.7%
mul-1-neg45.7%
Simplified45.7%
if -1.44999999999999987e136 < u < 9.40000000000000026e167Initial program 65.3%
times-frac97.2%
distribute-frac-neg97.2%
distribute-neg-frac297.2%
+-commutative97.2%
distribute-neg-in97.2%
unsub-neg97.2%
Simplified97.2%
Taylor expanded in t1 around inf 67.3%
associate-*r/67.3%
neg-mul-167.3%
Simplified67.3%
if 9.40000000000000026e167 < u Initial program 76.8%
times-frac100.0%
distribute-frac-neg100.0%
distribute-neg-frac2100.0%
+-commutative100.0%
distribute-neg-in100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in t1 around inf 61.1%
add-sqr-sqrt0.0%
add-sqr-sqrt0.0%
difference-of-squares0.0%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
add-sqr-sqrt0.0%
sqrt-unprod38.4%
sqr-neg38.4%
sqrt-unprod33.9%
add-sqr-sqrt33.9%
Applied egg-rr33.9%
difference-of-squares33.9%
rem-square-sqrt33.9%
rem-square-sqrt61.3%
Simplified61.3%
Taylor expanded in t1 around 0 43.2%
Final simplification61.5%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -4.4e+111) (not (<= t1 1.3e+169))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -4.4e+111) || !(t1 <= 1.3e+169)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-4.4d+111)) .or. (.not. (t1 <= 1.3d+169))) then
tmp = v / t1
else
tmp = v / u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -4.4e+111) || !(t1 <= 1.3e+169)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -4.4e+111) or not (t1 <= 1.3e+169): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -4.4e+111) || !(t1 <= 1.3e+169)) tmp = Float64(v / t1); else tmp = Float64(v / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -4.4e+111) || ~((t1 <= 1.3e+169))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -4.4e+111], N[Not[LessEqual[t1, 1.3e+169]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -4.4 \cdot 10^{+111} \lor \neg \left(t1 \leq 1.3 \cdot 10^{+169}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -4.39999999999999997e111 or 1.3e169 < t1 Initial program 44.5%
times-frac100.0%
distribute-frac-neg100.0%
distribute-neg-frac2100.0%
+-commutative100.0%
distribute-neg-in100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in t1 around inf 91.8%
associate-*r/91.8%
neg-mul-191.8%
Simplified91.8%
distribute-frac-neg91.8%
div-inv91.6%
distribute-rgt-neg-in91.6%
frac-2neg91.6%
metadata-eval91.6%
add-sqr-sqrt52.5%
sqrt-unprod45.1%
sqr-neg45.1%
sqrt-unprod16.5%
add-sqr-sqrt36.4%
Applied egg-rr36.4%
distribute-rgt-neg-out36.4%
*-commutative36.4%
associate-*l/36.4%
mul-1-neg36.4%
distribute-neg-frac36.4%
remove-double-neg36.4%
Simplified36.4%
if -4.39999999999999997e111 < t1 < 1.3e169Initial program 80.9%
times-frac97.0%
distribute-frac-neg97.0%
distribute-neg-frac297.0%
+-commutative97.0%
distribute-neg-in97.0%
unsub-neg97.0%
Simplified97.0%
Taylor expanded in t1 around inf 55.4%
add-sqr-sqrt32.1%
add-sqr-sqrt19.8%
difference-of-squares19.8%
add-sqr-sqrt19.8%
sqrt-unprod20.9%
sqr-neg20.9%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
add-sqr-sqrt0.0%
sqrt-unprod13.6%
sqr-neg13.6%
sqrt-unprod13.0%
add-sqr-sqrt13.0%
Applied egg-rr13.0%
difference-of-squares13.0%
rem-square-sqrt33.6%
rem-square-sqrt55.3%
Simplified55.3%
Taylor expanded in t1 around 0 19.3%
Final simplification24.4%
(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(t1 / Float64(t1 + u)) * Float64(Float64(-v) / Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (t1 / (t1 + u)) * (-v / (t1 + u)); end
code[u_, v_, t1_] := N[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{t1}{t1 + u} \cdot \frac{-v}{t1 + u}
\end{array}
Initial program 70.1%
times-frac97.9%
distribute-frac-neg97.9%
distribute-neg-frac297.9%
+-commutative97.9%
distribute-neg-in97.9%
unsub-neg97.9%
Simplified97.9%
Final simplification97.9%
(FPCore (u v t1) :precision binary64 (/ (- v) (+ t1 u)))
double code(double u, double v, double t1) {
return -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 = -v / (t1 + u)
end function
public static double code(double u, double v, double t1) {
return -v / (t1 + u);
}
def code(u, v, t1): return -v / (t1 + u)
function code(u, v, t1) return Float64(Float64(-v) / Float64(t1 + u)) end
function tmp = code(u, v, t1) tmp = -v / (t1 + u); end
code[u_, v_, t1_] := N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{-v}{t1 + u}
\end{array}
Initial program 70.1%
times-frac97.9%
distribute-frac-neg97.9%
distribute-neg-frac297.9%
+-commutative97.9%
distribute-neg-in97.9%
unsub-neg97.9%
Simplified97.9%
frac-2neg97.9%
frac-2neg97.9%
frac-times70.1%
sub-neg70.1%
distribute-neg-in70.1%
+-commutative70.1%
remove-double-neg70.1%
frac-times97.9%
associate-*r/99.1%
add-sqr-sqrt46.7%
sqrt-unprod42.4%
sqr-neg42.4%
sqrt-unprod19.8%
add-sqr-sqrt39.5%
add-sqr-sqrt25.2%
sqrt-unprod58.3%
Applied egg-rr99.1%
Taylor expanded in t1 around inf 62.2%
mul-1-neg62.2%
Simplified62.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(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 70.1%
times-frac97.9%
distribute-frac-neg97.9%
distribute-neg-frac297.9%
+-commutative97.9%
distribute-neg-in97.9%
unsub-neg97.9%
Simplified97.9%
Taylor expanded in t1 around inf 66.8%
add-sqr-sqrt34.4%
add-sqr-sqrt20.1%
difference-of-squares20.1%
add-sqr-sqrt20.1%
sqrt-unprod20.9%
sqr-neg20.9%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
add-sqr-sqrt0.0%
sqrt-unprod14.6%
sqr-neg14.6%
sqrt-unprod14.5%
add-sqr-sqrt14.5%
Applied egg-rr14.5%
difference-of-squares14.5%
rem-square-sqrt35.2%
rem-square-sqrt66.7%
Simplified66.7%
Taylor expanded in v around 0 62.1%
(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 70.1%
times-frac97.9%
distribute-frac-neg97.9%
distribute-neg-frac297.9%
+-commutative97.9%
distribute-neg-in97.9%
unsub-neg97.9%
Simplified97.9%
Taylor expanded in t1 around inf 54.1%
associate-*r/54.1%
neg-mul-154.1%
Simplified54.1%
distribute-frac-neg54.1%
div-inv54.0%
distribute-rgt-neg-in54.0%
frac-2neg54.0%
metadata-eval54.0%
add-sqr-sqrt26.0%
sqrt-unprod25.2%
sqr-neg25.2%
sqrt-unprod7.1%
add-sqr-sqrt15.1%
Applied egg-rr15.1%
distribute-rgt-neg-out15.1%
*-commutative15.1%
associate-*l/15.1%
mul-1-neg15.1%
distribute-neg-frac15.1%
remove-double-neg15.1%
Simplified15.1%
herbie shell --seed 2024143
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))