
(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 20 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 (/ v (+ t1 u))) -1.0) (+ t1 u)))
double code(double u, double v, double t1) {
return ((t1 * (v / (t1 + u))) / -1.0) / (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))) / (-1.0d0)) / (t1 + u)
end function
public static double code(double u, double v, double t1) {
return ((t1 * (v / (t1 + u))) / -1.0) / (t1 + u);
}
def code(u, v, t1): return ((t1 * (v / (t1 + u))) / -1.0) / (t1 + u)
function code(u, v, t1) return Float64(Float64(Float64(t1 * Float64(v / Float64(t1 + u))) / -1.0) / Float64(t1 + u)) end
function tmp = code(u, v, t1) tmp = ((t1 * (v / (t1 + u))) / -1.0) / (t1 + u); end
code[u_, v_, t1_] := N[(N[(N[(t1 * N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / -1.0), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{t1 \cdot \frac{v}{t1 + u}}{-1}}{t1 + u}
\end{array}
Initial program 70.5%
times-frac97.5%
distribute-frac-neg97.5%
distribute-neg-frac297.5%
+-commutative97.5%
distribute-neg-in97.5%
unsub-neg97.5%
Simplified97.5%
associate-*l/97.9%
sub-neg97.9%
distribute-neg-in97.9%
+-commutative97.9%
neg-mul-197.9%
associate-/r*97.9%
Applied egg-rr97.9%
(FPCore (u v t1) :precision binary64 (if (<= t1 -1.65e+86) (/ v (- (- t1) (* u 2.0))) (if (<= t1 6e+182) (* t1 (/ (/ v (+ t1 u)) (- (- u) t1))) (/ (- v) t1))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1.65e+86) {
tmp = v / (-t1 - (u * 2.0));
} else if (t1 <= 6e+182) {
tmp = t1 * ((v / (t1 + u)) / (-u - t1));
} else {
tmp = -v / t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (t1 <= (-1.65d+86)) then
tmp = v / (-t1 - (u * 2.0d0))
else if (t1 <= 6d+182) then
tmp = t1 * ((v / (t1 + u)) / (-u - t1))
else
tmp = -v / t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1.65e+86) {
tmp = v / (-t1 - (u * 2.0));
} else if (t1 <= 6e+182) {
tmp = t1 * ((v / (t1 + u)) / (-u - t1));
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -1.65e+86: tmp = v / (-t1 - (u * 2.0)) elif t1 <= 6e+182: tmp = t1 * ((v / (t1 + u)) / (-u - t1)) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -1.65e+86) tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); elseif (t1 <= 6e+182) tmp = Float64(t1 * Float64(Float64(v / Float64(t1 + u)) / Float64(Float64(-u) - t1))); else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -1.65e+86) tmp = v / (-t1 - (u * 2.0)); elseif (t1 <= 6e+182) tmp = t1 * ((v / (t1 + u)) / (-u - t1)); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -1.65e+86], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 6e+182], N[(t1 * N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.65 \cdot 10^{+86}:\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\mathbf{elif}\;t1 \leq 6 \cdot 10^{+182}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{t1 + u}}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if t1 < -1.65e86Initial program 41.3%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
clear-num99.9%
frac-2neg99.9%
frac-times95.2%
*-un-lft-identity95.2%
+-commutative95.2%
distribute-neg-in95.2%
sub-neg95.2%
frac-2neg95.2%
sub-neg95.2%
distribute-neg-in95.2%
+-commutative95.2%
remove-double-neg95.2%
add-sqr-sqrt94.9%
sqrt-unprod26.6%
sqr-neg26.6%
sqrt-unprod0.0%
add-sqr-sqrt33.0%
sub-neg33.0%
distribute-neg-in33.0%
+-commutative33.0%
add-sqr-sqrt32.9%
sqrt-unprod33.7%
Applied egg-rr95.2%
Taylor expanded in u around 0 92.9%
*-commutative92.9%
Simplified92.9%
if -1.65e86 < t1 < 6.0000000000000004e182Initial program 78.8%
associate-/l*79.7%
distribute-lft-neg-out79.7%
distribute-rgt-neg-in79.7%
associate-/r*88.9%
distribute-neg-frac288.9%
Simplified88.9%
if 6.0000000000000004e182 < t1 Initial program 48.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 100.0%
associate-*r/100.0%
neg-mul-1100.0%
Simplified100.0%
Final simplification90.4%
(FPCore (u v t1) :precision binary64 (if (or (<= u -470000.0) (not (<= u 5.5e-13))) (/ (/ t1 (/ (+ t1 u) v)) (- u)) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -470000.0) || !(u <= 5.5e-13)) {
tmp = (t1 / ((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 <= (-470000.0d0)) .or. (.not. (u <= 5.5d-13))) then
tmp = (t1 / ((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 <= -470000.0) || !(u <= 5.5e-13)) {
tmp = (t1 / ((t1 + u) / v)) / -u;
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -470000.0) or not (u <= 5.5e-13): tmp = (t1 / ((t1 + u) / v)) / -u else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -470000.0) || !(u <= 5.5e-13)) tmp = Float64(Float64(t1 / Float64(Float64(t1 + u) / v)) / Float64(-u)); else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -470000.0) || ~((u <= 5.5e-13))) tmp = (t1 / ((t1 + u) / v)) / -u; else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -470000.0], N[Not[LessEqual[u, 5.5e-13]], $MachinePrecision]], N[(N[(t1 / N[(N[(t1 + u), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -470000 \lor \neg \left(u \leq 5.5 \cdot 10^{-13}\right):\\
\;\;\;\;\frac{\frac{t1}{\frac{t1 + u}{v}}}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -4.7e5 or 5.49999999999999979e-13 < u Initial program 73.7%
associate-*l/72.1%
*-commutative72.1%
Simplified72.1%
Taylor expanded in t1 around 0 65.1%
associate-*r/67.6%
frac-times81.6%
frac-2neg81.6%
remove-double-neg81.6%
associate-*r/83.9%
*-commutative83.9%
clear-num84.5%
un-div-inv84.5%
Applied egg-rr84.5%
if -4.7e5 < u < 5.49999999999999979e-13Initial program 67.1%
times-frac97.6%
distribute-frac-neg97.6%
distribute-neg-frac297.6%
+-commutative97.6%
distribute-neg-in97.6%
unsub-neg97.6%
Simplified97.6%
Taylor expanded in t1 around inf 78.3%
associate-*r/78.3%
neg-mul-178.3%
Simplified78.3%
Final simplification81.4%
(FPCore (u v t1) :precision binary64 (if (<= u -3.4e+71) (/ (* t1 (/ v (- u))) u) (if (<= u 4.6e-50) (/ (- v) t1) (* (/ v (+ t1 u)) (/ t1 (- u))))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -3.4e+71) {
tmp = (t1 * (v / -u)) / u;
} else if (u <= 4.6e-50) {
tmp = -v / t1;
} else {
tmp = (v / (t1 + u)) * (t1 / -u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-3.4d+71)) then
tmp = (t1 * (v / -u)) / u
else if (u <= 4.6d-50) then
tmp = -v / t1
else
tmp = (v / (t1 + u)) * (t1 / -u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -3.4e+71) {
tmp = (t1 * (v / -u)) / u;
} else if (u <= 4.6e-50) {
tmp = -v / t1;
} else {
tmp = (v / (t1 + u)) * (t1 / -u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -3.4e+71: tmp = (t1 * (v / -u)) / u elif u <= 4.6e-50: tmp = -v / t1 else: tmp = (v / (t1 + u)) * (t1 / -u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -3.4e+71) tmp = Float64(Float64(t1 * Float64(v / Float64(-u))) / u); elseif (u <= 4.6e-50) tmp = Float64(Float64(-v) / t1); else tmp = Float64(Float64(v / Float64(t1 + u)) * Float64(t1 / Float64(-u))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -3.4e+71) tmp = (t1 * (v / -u)) / u; elseif (u <= 4.6e-50) tmp = -v / t1; else tmp = (v / (t1 + u)) * (t1 / -u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -3.4e+71], N[(N[(t1 * N[(v / (-u)), $MachinePrecision]), $MachinePrecision] / u), $MachinePrecision], If[LessEqual[u, 4.6e-50], N[((-v) / t1), $MachinePrecision], N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(t1 / (-u)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.4 \cdot 10^{+71}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{-u}}{u}\\
\mathbf{elif}\;u \leq 4.6 \cdot 10^{-50}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{t1 + u} \cdot \frac{t1}{-u}\\
\end{array}
\end{array}
if u < -3.3999999999999998e71Initial program 72.8%
times-frac94.5%
distribute-frac-neg94.5%
distribute-neg-frac294.5%
+-commutative94.5%
distribute-neg-in94.5%
unsub-neg94.5%
Simplified94.5%
associate-*l/99.8%
sub-neg99.8%
distribute-neg-in99.8%
+-commutative99.8%
neg-mul-199.8%
associate-/r*99.8%
Applied egg-rr99.8%
Taylor expanded in t1 around 0 91.7%
mul-1-neg91.7%
associate-/l*93.8%
distribute-rgt-neg-in93.8%
mul-1-neg93.8%
mul-1-neg93.8%
distribute-frac-neg293.8%
Simplified93.8%
Taylor expanded in t1 around 0 93.9%
if -3.3999999999999998e71 < u < 4.60000000000000039e-50Initial program 67.3%
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 77.6%
associate-*r/77.6%
neg-mul-177.6%
Simplified77.6%
if 4.60000000000000039e-50 < u Initial program 74.6%
times-frac99.0%
distribute-frac-neg99.0%
distribute-neg-frac299.0%
+-commutative99.0%
distribute-neg-in99.0%
unsub-neg99.0%
Simplified99.0%
Taylor expanded in t1 around 0 76.9%
associate-*r/76.9%
mul-1-neg76.9%
Simplified76.9%
Final simplification80.5%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1.06e+24) (not (<= t1 1.08e-29))) (/ v (- (- t1) (* u 2.0))) (/ (* t1 (/ v (- u))) u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.06e+24) || !(t1 <= 1.08e-29)) {
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.06d+24)) .or. (.not. (t1 <= 1.08d-29))) 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.06e+24) || !(t1 <= 1.08e-29)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = (t1 * (v / -u)) / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.06e+24) or not (t1 <= 1.08e-29): 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.06e+24) || !(t1 <= 1.08e-29)) 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 <= -1.06e+24) || ~((t1 <= 1.08e-29))) 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.06e+24], N[Not[LessEqual[t1, 1.08e-29]], $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 -1.06 \cdot 10^{+24} \lor \neg \left(t1 \leq 1.08 \cdot 10^{-29}\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{-u}}{u}\\
\end{array}
\end{array}
if t1 < -1.06e24 or 1.07999999999999995e-29 < t1 Initial program 62.1%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
clear-num99.9%
frac-2neg99.9%
frac-times94.6%
*-un-lft-identity94.6%
+-commutative94.6%
distribute-neg-in94.6%
sub-neg94.6%
frac-2neg94.6%
sub-neg94.6%
distribute-neg-in94.6%
+-commutative94.6%
remove-double-neg94.6%
add-sqr-sqrt42.2%
sqrt-unprod25.8%
sqr-neg25.8%
sqrt-unprod17.0%
add-sqr-sqrt32.9%
sub-neg32.9%
distribute-neg-in32.9%
+-commutative32.9%
add-sqr-sqrt17.5%
sqrt-unprod56.6%
Applied egg-rr94.6%
Taylor expanded in u around 0 84.9%
*-commutative84.9%
Simplified84.9%
if -1.06e24 < t1 < 1.07999999999999995e-29Initial program 78.0%
times-frac95.4%
distribute-frac-neg95.4%
distribute-neg-frac295.4%
+-commutative95.4%
distribute-neg-in95.4%
unsub-neg95.4%
Simplified95.4%
associate-*l/96.1%
sub-neg96.1%
distribute-neg-in96.1%
+-commutative96.1%
neg-mul-196.1%
associate-/r*96.1%
Applied egg-rr96.1%
Taylor expanded in t1 around 0 71.2%
mul-1-neg71.2%
associate-/l*74.0%
distribute-rgt-neg-in74.0%
mul-1-neg74.0%
mul-1-neg74.0%
distribute-frac-neg274.0%
Simplified74.0%
Taylor expanded in t1 around 0 75.7%
Final simplification80.0%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1.3e+24) (not (<= t1 2.25e-28))) (/ v (- (- t1) (* u 2.0))) (* (/ v (- u)) (/ t1 u))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.3e+24) || !(t1 <= 2.25e-28)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = (v / -u) * (t1 / u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-1.3d+24)) .or. (.not. (t1 <= 2.25d-28))) then
tmp = v / (-t1 - (u * 2.0d0))
else
tmp = (v / -u) * (t1 / u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.3e+24) || !(t1 <= 2.25e-28)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = (v / -u) * (t1 / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.3e+24) or not (t1 <= 2.25e-28): tmp = v / (-t1 - (u * 2.0)) else: tmp = (v / -u) * (t1 / u) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.3e+24) || !(t1 <= 2.25e-28)) tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); else tmp = Float64(Float64(v / Float64(-u)) * Float64(t1 / u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -1.3e+24) || ~((t1 <= 2.25e-28))) tmp = v / (-t1 - (u * 2.0)); else tmp = (v / -u) * (t1 / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.3e+24], N[Not[LessEqual[t1, 2.25e-28]], $MachinePrecision]], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(v / (-u)), $MachinePrecision] * N[(t1 / u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.3 \cdot 10^{+24} \lor \neg \left(t1 \leq 2.25 \cdot 10^{-28}\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-u} \cdot \frac{t1}{u}\\
\end{array}
\end{array}
if t1 < -1.2999999999999999e24 or 2.2499999999999999e-28 < t1 Initial program 62.1%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
clear-num99.9%
frac-2neg99.9%
frac-times94.6%
*-un-lft-identity94.6%
+-commutative94.6%
distribute-neg-in94.6%
sub-neg94.6%
frac-2neg94.6%
sub-neg94.6%
distribute-neg-in94.6%
+-commutative94.6%
remove-double-neg94.6%
add-sqr-sqrt42.2%
sqrt-unprod25.8%
sqr-neg25.8%
sqrt-unprod17.0%
add-sqr-sqrt32.9%
sub-neg32.9%
distribute-neg-in32.9%
+-commutative32.9%
add-sqr-sqrt17.5%
sqrt-unprod56.6%
Applied egg-rr94.6%
Taylor expanded in u around 0 84.9%
*-commutative84.9%
Simplified84.9%
if -1.2999999999999999e24 < t1 < 2.2499999999999999e-28Initial program 78.0%
times-frac95.4%
distribute-frac-neg95.4%
distribute-neg-frac295.4%
+-commutative95.4%
distribute-neg-in95.4%
unsub-neg95.4%
Simplified95.4%
Taylor expanded in t1 around 0 73.3%
associate-*r/73.3%
mul-1-neg73.3%
Simplified73.3%
Taylor expanded in t1 around 0 75.0%
Final simplification79.7%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -3.8e+83) (not (<= t1 2.3e-28))) (/ v (- (- u) t1)) (* (/ v (- u)) (/ t1 u))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -3.8e+83) || !(t1 <= 2.3e-28)) {
tmp = v / (-u - t1);
} else {
tmp = (v / -u) * (t1 / u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-3.8d+83)) .or. (.not. (t1 <= 2.3d-28))) then
tmp = v / (-u - t1)
else
tmp = (v / -u) * (t1 / u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -3.8e+83) || !(t1 <= 2.3e-28)) {
tmp = v / (-u - t1);
} else {
tmp = (v / -u) * (t1 / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -3.8e+83) or not (t1 <= 2.3e-28): tmp = v / (-u - t1) else: tmp = (v / -u) * (t1 / u) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -3.8e+83) || !(t1 <= 2.3e-28)) tmp = Float64(v / Float64(Float64(-u) - t1)); else tmp = Float64(Float64(v / Float64(-u)) * Float64(t1 / u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -3.8e+83) || ~((t1 <= 2.3e-28))) tmp = v / (-u - t1); else tmp = (v / -u) * (t1 / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -3.8e+83], N[Not[LessEqual[t1, 2.3e-28]], $MachinePrecision]], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], N[(N[(v / (-u)), $MachinePrecision] * N[(t1 / u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -3.8 \cdot 10^{+83} \lor \neg \left(t1 \leq 2.3 \cdot 10^{-28}\right):\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-u} \cdot \frac{t1}{u}\\
\end{array}
\end{array}
if t1 < -3.8000000000000002e83 or 2.29999999999999986e-28 < t1 Initial program 59.5%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
frac-2neg99.9%
frac-2neg99.9%
frac-times59.5%
sub-neg59.5%
distribute-neg-in59.5%
+-commutative59.5%
remove-double-neg59.5%
frac-times99.9%
associate-*r/99.9%
add-sqr-sqrt37.6%
sqrt-unprod17.0%
sqr-neg17.0%
sqrt-unprod19.3%
add-sqr-sqrt31.8%
add-sqr-sqrt17.2%
sqrt-unprod57.1%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 87.4%
mul-1-neg87.4%
Simplified87.4%
if -3.8000000000000002e83 < t1 < 2.29999999999999986e-28Initial program 78.2%
times-frac95.8%
distribute-frac-neg95.8%
distribute-neg-frac295.8%
+-commutative95.8%
distribute-neg-in95.8%
unsub-neg95.8%
Simplified95.8%
Taylor expanded in t1 around 0 72.3%
associate-*r/72.3%
mul-1-neg72.3%
Simplified72.3%
Taylor expanded in t1 around 0 73.9%
Final simplification79.5%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -3.3e+25) (not (<= t1 7e-30))) (/ v (- (- u) t1)) (* t1 (/ (/ v (- u)) u))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -3.3e+25) || !(t1 <= 7e-30)) {
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+25)) .or. (.not. (t1 <= 7d-30))) 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+25) || !(t1 <= 7e-30)) {
tmp = v / (-u - t1);
} else {
tmp = t1 * ((v / -u) / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -3.3e+25) or not (t1 <= 7e-30): tmp = v / (-u - t1) else: tmp = t1 * ((v / -u) / u) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -3.3e+25) || !(t1 <= 7e-30)) tmp = Float64(v / Float64(Float64(-u) - t1)); else tmp = Float64(t1 * Float64(Float64(v / Float64(-u)) / u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -3.3e+25) || ~((t1 <= 7e-30))) 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+25], N[Not[LessEqual[t1, 7e-30]], $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 -3.3 \cdot 10^{+25} \lor \neg \left(t1 \leq 7 \cdot 10^{-30}\right):\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{-u}}{u}\\
\end{array}
\end{array}
if t1 < -3.3000000000000001e25 or 7.0000000000000006e-30 < t1 Initial program 62.1%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
frac-2neg99.9%
frac-2neg99.9%
frac-times62.1%
sub-neg62.1%
distribute-neg-in62.1%
+-commutative62.1%
remove-double-neg62.1%
frac-times99.9%
associate-*r/99.9%
add-sqr-sqrt45.2%
sqrt-unprod27.3%
sqr-neg27.3%
sqrt-unprod16.9%
add-sqr-sqrt32.8%
add-sqr-sqrt17.5%
sqrt-unprod56.6%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 84.5%
mul-1-neg84.5%
Simplified84.5%
if -3.3000000000000001e25 < t1 < 7.0000000000000006e-30Initial program 78.0%
times-frac95.4%
distribute-frac-neg95.4%
distribute-neg-frac295.4%
+-commutative95.4%
distribute-neg-in95.4%
unsub-neg95.4%
Simplified95.4%
Taylor expanded in t1 around 0 73.3%
associate-*r/73.3%
mul-1-neg73.3%
Simplified73.3%
Taylor expanded in t1 around 0 75.0%
*-commutative75.0%
clear-num74.9%
frac-times73.8%
*-un-lft-identity73.8%
add-sqr-sqrt43.3%
sqrt-unprod46.9%
sqr-neg46.9%
sqrt-unprod12.1%
add-sqr-sqrt33.6%
Applied egg-rr33.6%
frac-2neg33.6%
div-inv33.6%
associate-*l/33.6%
distribute-neg-frac233.6%
add-sqr-sqrt17.6%
sqrt-unprod39.7%
sqr-neg39.7%
sqrt-unprod33.6%
add-sqr-sqrt65.5%
associate-*l/72.9%
associate-/r*72.9%
clear-num73.0%
Applied egg-rr73.0%
Final simplification78.5%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -2e-61) (not (<= t1 1.06e-41))) (/ v (- (- u) t1)) (* (- v) (/ t1 (* u u)))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -2e-61) || !(t1 <= 1.06e-41)) {
tmp = v / (-u - 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 <= (-2d-61)) .or. (.not. (t1 <= 1.06d-41))) then
tmp = v / (-u - 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 <= -2e-61) || !(t1 <= 1.06e-41)) {
tmp = v / (-u - t1);
} else {
tmp = -v * (t1 / (u * u));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -2e-61) or not (t1 <= 1.06e-41): tmp = v / (-u - t1) else: tmp = -v * (t1 / (u * u)) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -2e-61) || !(t1 <= 1.06e-41)) tmp = Float64(v / Float64(Float64(-u) - 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 <= -2e-61) || ~((t1 <= 1.06e-41))) tmp = v / (-u - t1); else tmp = -v * (t1 / (u * u)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -2e-61], N[Not[LessEqual[t1, 1.06e-41]], $MachinePrecision]], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], N[((-v) * N[(t1 / N[(u * u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2 \cdot 10^{-61} \lor \neg \left(t1 \leq 1.06 \cdot 10^{-41}\right):\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\left(-v\right) \cdot \frac{t1}{u \cdot u}\\
\end{array}
\end{array}
if t1 < -2.0000000000000001e-61 or 1.06e-41 < t1 Initial program 65.6%
times-frac99.8%
distribute-frac-neg99.8%
distribute-neg-frac299.8%
+-commutative99.8%
distribute-neg-in99.8%
unsub-neg99.8%
Simplified99.8%
frac-2neg99.8%
frac-2neg99.8%
frac-times65.6%
sub-neg65.6%
distribute-neg-in65.6%
+-commutative65.6%
remove-double-neg65.6%
frac-times99.8%
associate-*r/99.8%
add-sqr-sqrt53.0%
sqrt-unprod38.7%
sqr-neg38.7%
sqrt-unprod13.7%
add-sqr-sqrt29.5%
add-sqr-sqrt16.3%
sqrt-unprod52.0%
Applied egg-rr99.8%
Taylor expanded in t1 around inf 77.9%
mul-1-neg77.9%
Simplified77.9%
if -2.0000000000000001e-61 < t1 < 1.06e-41Initial program 77.4%
associate-*l/81.6%
*-commutative81.6%
Simplified81.6%
Taylor expanded in t1 around 0 72.0%
Taylor expanded in t1 around 0 74.0%
Final simplification76.3%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.2e+82) (not (<= u 3.2e+139))) (/ t1 (* u (/ u v))) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.2e+82) || !(u <= 3.2e+139)) {
tmp = t1 / (u * (u / v));
} else {
tmp = -v / t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-1.2d+82)) .or. (.not. (u <= 3.2d+139))) then
tmp = t1 / (u * (u / v))
else
tmp = -v / t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.2e+82) || !(u <= 3.2e+139)) {
tmp = t1 / (u * (u / v));
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.2e+82) or not (u <= 3.2e+139): tmp = t1 / (u * (u / v)) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.2e+82) || !(u <= 3.2e+139)) tmp = Float64(t1 / Float64(u * Float64(u / v))); else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -1.2e+82) || ~((u <= 3.2e+139))) tmp = t1 / (u * (u / v)); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.2e+82], N[Not[LessEqual[u, 3.2e+139]], $MachinePrecision]], N[(t1 / N[(u * N[(u / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.2 \cdot 10^{+82} \lor \neg \left(u \leq 3.2 \cdot 10^{+139}\right):\\
\;\;\;\;\frac{t1}{u \cdot \frac{u}{v}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -1.19999999999999999e82 or 3.2000000000000001e139 < u Initial program 70.5%
times-frac96.8%
distribute-frac-neg96.8%
distribute-neg-frac296.8%
+-commutative96.8%
distribute-neg-in96.8%
unsub-neg96.8%
Simplified96.8%
Taylor expanded in t1 around 0 89.0%
associate-*r/89.0%
mul-1-neg89.0%
Simplified89.0%
Taylor expanded in t1 around 0 87.8%
*-commutative87.8%
clear-num87.8%
frac-times80.8%
*-un-lft-identity80.8%
add-sqr-sqrt46.9%
sqrt-unprod64.5%
sqr-neg64.5%
sqrt-unprod26.0%
add-sqr-sqrt63.8%
Applied egg-rr63.8%
if -1.19999999999999999e82 < u < 3.2000000000000001e139Initial program 70.5%
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 69.1%
associate-*r/69.1%
neg-mul-169.1%
Simplified69.1%
Final simplification67.4%
(FPCore (u v t1) :precision binary64 (if (or (<= u -2.15e+86) (not (<= u 3.5e+161))) (* (/ v u) (/ t1 u)) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.15e+86) || !(u <= 3.5e+161)) {
tmp = (v / u) * (t1 / u);
} else {
tmp = -v / t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-2.15d+86)) .or. (.not. (u <= 3.5d+161))) then
tmp = (v / u) * (t1 / u)
else
tmp = -v / t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.15e+86) || !(u <= 3.5e+161)) {
tmp = (v / u) * (t1 / u);
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -2.15e+86) or not (u <= 3.5e+161): tmp = (v / u) * (t1 / u) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -2.15e+86) || !(u <= 3.5e+161)) tmp = Float64(Float64(v / u) * Float64(t1 / u)); else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -2.15e+86) || ~((u <= 3.5e+161))) tmp = (v / u) * (t1 / u); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2.15e+86], N[Not[LessEqual[u, 3.5e+161]], $MachinePrecision]], N[(N[(v / u), $MachinePrecision] * N[(t1 / u), $MachinePrecision]), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.15 \cdot 10^{+86} \lor \neg \left(u \leq 3.5 \cdot 10^{+161}\right):\\
\;\;\;\;\frac{v}{u} \cdot \frac{t1}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -2.1500000000000001e86 or 3.49999999999999988e161 < u Initial program 71.9%
times-frac96.5%
distribute-frac-neg96.5%
distribute-neg-frac296.5%
+-commutative96.5%
distribute-neg-in96.5%
unsub-neg96.5%
Simplified96.5%
Taylor expanded in t1 around 0 91.6%
associate-*r/91.6%
mul-1-neg91.6%
Simplified91.6%
Taylor expanded in t1 around 0 90.4%
*-commutative90.4%
clear-num90.4%
frac-times83.1%
*-un-lft-identity83.1%
add-sqr-sqrt47.3%
sqrt-unprod66.4%
sqr-neg66.4%
sqrt-unprod27.2%
add-sqr-sqrt64.6%
Applied egg-rr64.6%
*-un-lft-identity64.6%
times-frac63.2%
clear-num63.2%
Applied egg-rr63.2%
if -2.1500000000000001e86 < u < 3.49999999999999988e161Initial program 69.8%
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 68.2%
associate-*r/68.2%
neg-mul-168.2%
Simplified68.2%
Final simplification66.7%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -9e+83) (not (<= t1 1.2e+74))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -9e+83) || !(t1 <= 1.2e+74)) {
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 <= (-9d+83)) .or. (.not. (t1 <= 1.2d+74))) 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 <= -9e+83) || !(t1 <= 1.2e+74)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -9e+83) or not (t1 <= 1.2e+74): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -9e+83) || !(t1 <= 1.2e+74)) 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 <= -9e+83) || ~((t1 <= 1.2e+74))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -9e+83], N[Not[LessEqual[t1, 1.2e+74]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -9 \cdot 10^{+83} \lor \neg \left(t1 \leq 1.2 \cdot 10^{+74}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -8.9999999999999999e83 or 1.20000000000000004e74 < t1 Initial program 47.7%
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 89.1%
Taylor expanded in u around inf 34.9%
if -8.9999999999999999e83 < t1 < 1.20000000000000004e74Initial program 80.8%
associate-*l/83.5%
*-commutative83.5%
Simplified83.5%
Taylor expanded in t1 around 0 57.8%
Taylor expanded in t1 around inf 14.6%
associate-*r/14.6%
mul-1-neg14.6%
Simplified14.6%
add-sqr-sqrt7.5%
sqrt-unprod16.8%
sqr-neg16.8%
sqrt-unprod6.9%
add-sqr-sqrt14.6%
div-inv14.6%
Applied egg-rr14.6%
associate-*r/14.6%
*-rgt-identity14.6%
Simplified14.6%
Final simplification20.9%
(FPCore (u v t1) :precision binary64 (/ (* v (/ t1 (- (- u) t1))) (+ t1 u)))
double code(double u, double v, double t1) {
return (v * (t1 / (-u - t1))) / (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 - t1))) / (t1 + u)
end function
public static double code(double u, double v, double t1) {
return (v * (t1 / (-u - t1))) / (t1 + u);
}
def code(u, v, t1): return (v * (t1 / (-u - t1))) / (t1 + u)
function code(u, v, t1) return Float64(Float64(v * Float64(t1 / Float64(Float64(-u) - t1))) / Float64(t1 + u)) end
function tmp = code(u, v, t1) tmp = (v * (t1 / (-u - t1))) / (t1 + u); end
code[u_, v_, t1_] := N[(N[(v * N[(t1 / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{v \cdot \frac{t1}{\left(-u\right) - t1}}{t1 + u}
\end{array}
Initial program 70.5%
times-frac97.5%
distribute-frac-neg97.5%
distribute-neg-frac297.5%
+-commutative97.5%
distribute-neg-in97.5%
unsub-neg97.5%
Simplified97.5%
frac-2neg97.5%
frac-2neg97.5%
frac-times70.5%
sub-neg70.5%
distribute-neg-in70.5%
+-commutative70.5%
remove-double-neg70.5%
frac-times97.5%
associate-*r/97.8%
add-sqr-sqrt52.0%
sqrt-unprod43.4%
sqr-neg43.4%
sqrt-unprod14.5%
add-sqr-sqrt33.3%
add-sqr-sqrt17.5%
sqrt-unprod57.4%
Applied egg-rr97.8%
Final simplification97.8%
(FPCore (u v t1) :precision binary64 (* (/ v (+ t1 u)) (/ t1 (- (- u) t1))))
double code(double u, double v, double t1) {
return (v / (t1 + u)) * (t1 / (-u - t1));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (v / (t1 + u)) * (t1 / (-u - t1))
end function
public static double code(double u, double v, double t1) {
return (v / (t1 + u)) * (t1 / (-u - t1));
}
def code(u, v, t1): return (v / (t1 + u)) * (t1 / (-u - t1))
function code(u, v, t1) return Float64(Float64(v / Float64(t1 + u)) * Float64(t1 / Float64(Float64(-u) - t1))) end
function tmp = code(u, v, t1) tmp = (v / (t1 + u)) * (t1 / (-u - t1)); end
code[u_, v_, t1_] := N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(t1 / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{t1 + u} \cdot \frac{t1}{\left(-u\right) - t1}
\end{array}
Initial program 70.5%
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 (if (<= u 7e+168) (/ (- v) t1) (/ 1.0 (/ u v))))
double code(double u, double v, double t1) {
double tmp;
if (u <= 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 <= 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 <= 7e+168) {
tmp = -v / t1;
} else {
tmp = 1.0 / (u / v);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= 7e+168: tmp = -v / t1 else: tmp = 1.0 / (u / v) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= 7e+168) tmp = Float64(Float64(-v) / 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 <= 7e+168) tmp = -v / t1; else tmp = 1.0 / (u / v); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, 7e+168], N[((-v) / t1), $MachinePrecision], N[(1.0 / N[(u / v), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq 7 \cdot 10^{+168}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{u}{v}}\\
\end{array}
\end{array}
if u < 7.0000000000000004e168Initial program 70.9%
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 57.1%
associate-*r/57.1%
neg-mul-157.1%
Simplified57.1%
if 7.0000000000000004e168 < u Initial program 66.9%
associate-*l/67.5%
*-commutative67.5%
Simplified67.5%
Taylor expanded in t1 around 0 67.5%
Taylor expanded in t1 around inf 37.3%
associate-*r/37.3%
mul-1-neg37.3%
Simplified37.3%
clear-num37.8%
inv-pow37.8%
add-sqr-sqrt16.9%
sqrt-unprod36.8%
sqr-neg36.8%
sqrt-unprod20.3%
add-sqr-sqrt37.4%
Applied egg-rr37.4%
unpow-137.4%
Simplified37.4%
(FPCore (u v t1) :precision binary64 (if (<= u 3.3e+169) (/ (- v) t1) (* (/ v u) -0.5)))
double code(double u, double v, double t1) {
double tmp;
if (u <= 3.3e+169) {
tmp = -v / t1;
} else {
tmp = (v / u) * -0.5;
}
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.3d+169) then
tmp = -v / t1
else
tmp = (v / u) * (-0.5d0)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= 3.3e+169) {
tmp = -v / t1;
} else {
tmp = (v / u) * -0.5;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= 3.3e+169: tmp = -v / t1 else: tmp = (v / u) * -0.5 return tmp
function code(u, v, t1) tmp = 0.0 if (u <= 3.3e+169) tmp = Float64(Float64(-v) / t1); else tmp = Float64(Float64(v / u) * -0.5); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= 3.3e+169) tmp = -v / t1; else tmp = (v / u) * -0.5; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, 3.3e+169], N[((-v) / t1), $MachinePrecision], N[(N[(v / u), $MachinePrecision] * -0.5), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq 3.3 \cdot 10^{+169}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u} \cdot -0.5\\
\end{array}
\end{array}
if u < 3.2999999999999997e169Initial program 70.9%
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 57.1%
associate-*r/57.1%
neg-mul-157.1%
Simplified57.1%
if 3.2999999999999997e169 < u Initial program 66.9%
associate-*l/67.5%
*-commutative67.5%
Simplified67.5%
Taylor expanded in t1 around 0 51.9%
+-commutative51.9%
unpow251.9%
associate-*r*51.9%
distribute-rgt-in67.5%
*-commutative67.5%
Simplified67.5%
Taylor expanded in t1 around inf 37.4%
Final simplification55.1%
(FPCore (u v t1) :precision binary64 (if (<= u 1.5e+170) (/ (- v) t1) (/ v (- u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= 1.5e+170) {
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.5d+170) 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.5e+170) {
tmp = -v / t1;
} else {
tmp = v / -u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= 1.5e+170: tmp = -v / t1 else: tmp = v / -u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= 1.5e+170) tmp = Float64(Float64(-v) / t1); else tmp = Float64(v / Float64(-u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= 1.5e+170) tmp = -v / t1; else tmp = v / -u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, 1.5e+170], N[((-v) / t1), $MachinePrecision], N[(v / (-u)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq 1.5 \cdot 10^{+170}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-u}\\
\end{array}
\end{array}
if u < 1.49999999999999998e170Initial program 70.9%
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 57.1%
associate-*r/57.1%
neg-mul-157.1%
Simplified57.1%
if 1.49999999999999998e170 < u Initial program 66.9%
associate-*l/67.5%
*-commutative67.5%
Simplified67.5%
Taylor expanded in t1 around 0 67.5%
Taylor expanded in t1 around inf 37.3%
associate-*r/37.3%
mul-1-neg37.3%
Simplified37.3%
Final simplification55.1%
(FPCore (u v t1) :precision binary64 (if (<= u 2.55e+169) (/ (- v) t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if (u <= 2.55e+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 (u <= 2.55d+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 (u <= 2.55e+169) {
tmp = -v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= 2.55e+169: tmp = -v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= 2.55e+169) tmp = Float64(Float64(-v) / t1); else tmp = Float64(v / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= 2.55e+169) tmp = -v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, 2.55e+169], N[((-v) / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq 2.55 \cdot 10^{+169}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if u < 2.55000000000000004e169Initial program 70.9%
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 57.1%
associate-*r/57.1%
neg-mul-157.1%
Simplified57.1%
if 2.55000000000000004e169 < u Initial program 66.9%
associate-*l/67.5%
*-commutative67.5%
Simplified67.5%
Taylor expanded in t1 around 0 67.5%
Taylor expanded in t1 around inf 37.3%
associate-*r/37.3%
mul-1-neg37.3%
Simplified37.3%
add-sqr-sqrt16.9%
sqrt-unprod36.3%
sqr-neg36.3%
sqrt-unprod19.8%
add-sqr-sqrt36.9%
div-inv36.9%
Applied egg-rr36.9%
associate-*r/36.9%
*-rgt-identity36.9%
Simplified36.9%
(FPCore (u v t1) :precision binary64 (/ v (- (- u) t1)))
double code(double u, double v, double t1) {
return v / (-u - t1);
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = v / (-u - t1)
end function
public static double code(double u, double v, double t1) {
return v / (-u - t1);
}
def code(u, v, t1): return v / (-u - t1)
function code(u, v, t1) return Float64(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 70.5%
times-frac97.5%
distribute-frac-neg97.5%
distribute-neg-frac297.5%
+-commutative97.5%
distribute-neg-in97.5%
unsub-neg97.5%
Simplified97.5%
frac-2neg97.5%
frac-2neg97.5%
frac-times70.5%
sub-neg70.5%
distribute-neg-in70.5%
+-commutative70.5%
remove-double-neg70.5%
frac-times97.5%
associate-*r/97.8%
add-sqr-sqrt52.0%
sqrt-unprod43.4%
sqr-neg43.4%
sqrt-unprod14.5%
add-sqr-sqrt33.3%
add-sqr-sqrt17.5%
sqrt-unprod57.4%
Applied egg-rr97.8%
Taylor expanded in t1 around inf 57.6%
mul-1-neg57.6%
Simplified57.6%
Final simplification57.6%
(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.5%
times-frac97.5%
distribute-frac-neg97.5%
distribute-neg-frac297.5%
+-commutative97.5%
distribute-neg-in97.5%
unsub-neg97.5%
Simplified97.5%
Taylor expanded in t1 around inf 53.0%
Taylor expanded in u around inf 13.7%
herbie shell --seed 2024128
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))