
(FPCore (u v t1) :precision binary64 (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))
double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-t1 * v) / ((t1 + u) * (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
def code(u, v, t1): return (-t1 * v) / ((t1 + u) * (t1 + u))
function code(u, v, t1) return Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (-t1 * v) / ((t1 + u) * (t1 + u)); end
code[u_, v_, t1_] := N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (u v t1) :precision binary64 (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))
double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-t1 * v) / ((t1 + u) * (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
def code(u, v, t1): return (-t1 * v) / ((t1 + u) * (t1 + u))
function code(u, v, t1) return Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (-t1 * v) / ((t1 + u) * (t1 + u)); end
code[u_, v_, t1_] := N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}
\end{array}
(FPCore (u v t1) :precision binary64 (* (/ v (- (- u) t1)) (/ t1 (+ t1 u))))
double code(double u, double v, double t1) {
return (v / (-u - t1)) * (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 / (-u - t1)) * (t1 / (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (v / (-u - t1)) * (t1 / (t1 + u));
}
def code(u, v, t1): return (v / (-u - t1)) * (t1 / (t1 + u))
function code(u, v, t1) return Float64(Float64(v / Float64(Float64(-u) - t1)) * Float64(t1 / Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (v / (-u - t1)) * (t1 / (t1 + u)); end
code[u_, v_, t1_] := N[(N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision] * N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{\left(-u\right) - t1} \cdot \frac{t1}{t1 + u}
\end{array}
Initial program 67.6%
times-frac98.0%
distribute-frac-neg98.0%
distribute-neg-frac298.0%
+-commutative98.0%
distribute-neg-in98.0%
unsub-neg98.0%
Simplified98.0%
Final simplification98.0%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -4.5e+145) (not (<= t1 1.06e+119))) (/ v (- (- t1) (* u 2.0))) (* v (/ t1 (* (+ t1 u) (- (- u) t1))))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -4.5e+145) || !(t1 <= 1.06e+119)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = v * (t1 / ((t1 + u) * (-u - t1)));
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-4.5d+145)) .or. (.not. (t1 <= 1.06d+119))) then
tmp = v / (-t1 - (u * 2.0d0))
else
tmp = v * (t1 / ((t1 + u) * (-u - t1)))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -4.5e+145) || !(t1 <= 1.06e+119)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = v * (t1 / ((t1 + u) * (-u - t1)));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -4.5e+145) or not (t1 <= 1.06e+119): tmp = v / (-t1 - (u * 2.0)) else: tmp = v * (t1 / ((t1 + u) * (-u - t1))) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -4.5e+145) || !(t1 <= 1.06e+119)) tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); else tmp = Float64(v * Float64(t1 / Float64(Float64(t1 + u) * Float64(Float64(-u) - t1)))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -4.5e+145) || ~((t1 <= 1.06e+119))) tmp = v / (-t1 - (u * 2.0)); else tmp = v * (t1 / ((t1 + u) * (-u - t1))); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -4.5e+145], N[Not[LessEqual[t1, 1.06e+119]], $MachinePrecision]], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v * N[(t1 / N[(N[(t1 + u), $MachinePrecision] * N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -4.5 \cdot 10^{+145} \lor \neg \left(t1 \leq 1.06 \cdot 10^{+119}\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;v \cdot \frac{t1}{\left(t1 + u\right) \cdot \left(\left(-u\right) - t1\right)}\\
\end{array}
\end{array}
if t1 < -4.4999999999999998e145 or 1.0599999999999999e119 < t1 Initial program 33.2%
associate-*l/38.4%
*-commutative38.4%
Simplified38.4%
associate-*r/33.2%
*-commutative33.2%
associate-/r*52.7%
frac-2neg52.7%
distribute-lft-neg-out52.7%
remove-double-neg52.7%
+-commutative52.7%
distribute-neg-in52.7%
sub-neg52.7%
associate-*l/99.9%
associate-*r/100.0%
clear-num100.0%
frac-2neg100.0%
frac-times98.8%
*-un-lft-identity98.8%
Applied egg-rr98.8%
Taylor expanded in u around 0 94.6%
*-commutative94.6%
Simplified94.6%
if -4.4999999999999998e145 < t1 < 1.0599999999999999e119Initial program 83.9%
associate-*l/87.8%
*-commutative87.8%
Simplified87.8%
Final simplification89.9%
(FPCore (u v t1) :precision binary64 (if (<= u -1.1e+19) (* t1 (/ (/ v (+ t1 u)) (- u))) (if (<= u 7.2e+72) (/ v (- t1)) (/ (/ v (- u)) (/ (+ t1 u) t1)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.1e+19) {
tmp = t1 * ((v / (t1 + u)) / -u);
} else if (u <= 7.2e+72) {
tmp = v / -t1;
} else {
tmp = (v / -u) / ((t1 + 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 <= (-1.1d+19)) then
tmp = t1 * ((v / (t1 + u)) / -u)
else if (u <= 7.2d+72) then
tmp = v / -t1
else
tmp = (v / -u) / ((t1 + u) / t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -1.1e+19) {
tmp = t1 * ((v / (t1 + u)) / -u);
} else if (u <= 7.2e+72) {
tmp = v / -t1;
} else {
tmp = (v / -u) / ((t1 + u) / t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.1e+19: tmp = t1 * ((v / (t1 + u)) / -u) elif u <= 7.2e+72: tmp = v / -t1 else: tmp = (v / -u) / ((t1 + u) / t1) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.1e+19) tmp = Float64(t1 * Float64(Float64(v / Float64(t1 + u)) / Float64(-u))); elseif (u <= 7.2e+72) tmp = Float64(v / Float64(-t1)); else tmp = Float64(Float64(v / Float64(-u)) / Float64(Float64(t1 + u) / t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -1.1e+19) tmp = t1 * ((v / (t1 + u)) / -u); elseif (u <= 7.2e+72) tmp = v / -t1; else tmp = (v / -u) / ((t1 + u) / t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.1e+19], N[(t1 * N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 7.2e+72], N[(v / (-t1)), $MachinePrecision], N[(N[(v / (-u)), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] / t1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.1 \cdot 10^{+19}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{t1 + u}}{-u}\\
\mathbf{elif}\;u \leq 7.2 \cdot 10^{+72}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{v}{-u}}{\frac{t1 + u}{t1}}\\
\end{array}
\end{array}
if u < -1.1e19Initial program 84.4%
times-frac98.5%
distribute-frac-neg98.5%
distribute-neg-frac298.5%
+-commutative98.5%
distribute-neg-in98.5%
unsub-neg98.5%
Simplified98.5%
Taylor expanded in t1 around 0 78.8%
associate-*r/78.8%
mul-1-neg78.8%
Simplified78.8%
distribute-frac-neg78.8%
distribute-lft-neg-out78.8%
add-sqr-sqrt32.4%
sqrt-unprod54.9%
sqr-neg54.9%
sqrt-unprod33.6%
add-sqr-sqrt57.9%
frac-2neg57.9%
clear-num57.9%
frac-times55.4%
*-un-lft-identity55.4%
add-sqr-sqrt32.9%
sqrt-unprod57.7%
sqr-neg57.7%
sqrt-unprod30.7%
add-sqr-sqrt70.7%
add-sqr-sqrt42.2%
sqrt-unprod54.9%
sqr-neg54.9%
sqrt-unprod21.7%
add-sqr-sqrt55.4%
Applied egg-rr70.7%
associate-/l/78.8%
associate-/r/79.1%
distribute-rgt-neg-in79.1%
Simplified79.1%
if -1.1e19 < u < 7.20000000000000069e72Initial program 56.6%
associate-*l/67.3%
*-commutative67.3%
Simplified67.3%
Taylor expanded in t1 around inf 78.9%
associate-*r/78.9%
neg-mul-178.9%
Simplified78.9%
if 7.20000000000000069e72 < u Initial program 76.7%
associate-*l/72.8%
*-commutative72.8%
Simplified72.8%
associate-*r/76.7%
*-commutative76.7%
associate-/r*93.1%
frac-2neg93.1%
distribute-lft-neg-out93.1%
remove-double-neg93.1%
+-commutative93.1%
distribute-neg-in93.1%
sub-neg93.1%
associate-*l/97.7%
associate-*r/97.8%
clear-num97.7%
frac-2neg97.7%
frac-times85.4%
*-un-lft-identity85.4%
Applied egg-rr85.4%
Taylor expanded in t1 around 0 79.3%
neg-mul-179.3%
times-frac91.6%
+-commutative91.6%
Applied egg-rr91.6%
associate-*l/91.8%
associate-*r/91.8%
mul-1-neg91.8%
Simplified91.8%
Final simplification81.2%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -2.2e-44) (not (<= t1 1.22e+66))) (/ v (- (- t1) (* u 2.0))) (* (/ v (- u)) (/ t1 u))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -2.2e-44) || !(t1 <= 1.22e+66)) {
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 <= (-2.2d-44)) .or. (.not. (t1 <= 1.22d+66))) 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 <= -2.2e-44) || !(t1 <= 1.22e+66)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = (v / -u) * (t1 / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -2.2e-44) or not (t1 <= 1.22e+66): tmp = v / (-t1 - (u * 2.0)) else: tmp = (v / -u) * (t1 / u) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -2.2e-44) || !(t1 <= 1.22e+66)) 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 <= -2.2e-44) || ~((t1 <= 1.22e+66))) 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, -2.2e-44], N[Not[LessEqual[t1, 1.22e+66]], $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 -2.2 \cdot 10^{-44} \lor \neg \left(t1 \leq 1.22 \cdot 10^{+66}\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-u} \cdot \frac{t1}{u}\\
\end{array}
\end{array}
if t1 < -2.20000000000000012e-44 or 1.21999999999999993e66 < t1 Initial program 53.9%
associate-*l/57.1%
*-commutative57.1%
Simplified57.1%
associate-*r/53.9%
*-commutative53.9%
associate-/r*70.3%
frac-2neg70.3%
distribute-lft-neg-out70.3%
remove-double-neg70.3%
+-commutative70.3%
distribute-neg-in70.3%
sub-neg70.3%
associate-*l/99.9%
associate-*r/100.0%
clear-num99.9%
frac-2neg99.9%
frac-times96.4%
*-un-lft-identity96.4%
Applied egg-rr96.4%
Taylor expanded in u around 0 86.1%
*-commutative86.1%
Simplified86.1%
if -2.20000000000000012e-44 < t1 < 1.21999999999999993e66Initial program 82.1%
times-frac96.1%
distribute-frac-neg96.1%
distribute-neg-frac296.1%
+-commutative96.1%
distribute-neg-in96.1%
unsub-neg96.1%
Simplified96.1%
Taylor expanded in t1 around 0 73.3%
associate-*r/73.3%
mul-1-neg73.3%
Simplified73.3%
Taylor expanded in t1 around 0 76.1%
Final simplification81.2%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1.5e-43) (not (<= t1 5e+66))) (/ v (- (- u) t1)) (* (/ v (- u)) (/ t1 u))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.5e-43) || !(t1 <= 5e+66)) {
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 <= (-1.5d-43)) .or. (.not. (t1 <= 5d+66))) 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 <= -1.5e-43) || !(t1 <= 5e+66)) {
tmp = v / (-u - t1);
} else {
tmp = (v / -u) * (t1 / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.5e-43) or not (t1 <= 5e+66): tmp = v / (-u - t1) else: tmp = (v / -u) * (t1 / u) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.5e-43) || !(t1 <= 5e+66)) 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 <= -1.5e-43) || ~((t1 <= 5e+66))) tmp = v / (-u - t1); else tmp = (v / -u) * (t1 / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.5e-43], N[Not[LessEqual[t1, 5e+66]], $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 -1.5 \cdot 10^{-43} \lor \neg \left(t1 \leq 5 \cdot 10^{+66}\right):\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-u} \cdot \frac{t1}{u}\\
\end{array}
\end{array}
if t1 < -1.50000000000000002e-43 or 4.99999999999999991e66 < t1 Initial program 53.9%
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 85.2%
add-sqr-sqrt33.3%
sqrt-unprod86.7%
sqr-neg86.7%
sqrt-unprod51.8%
add-sqr-sqrt85.1%
sub-neg85.1%
Applied egg-rr85.1%
mul-1-neg85.1%
neg-sub085.1%
Applied egg-rr85.1%
neg-sub085.1%
distribute-neg-frac85.1%
Simplified85.1%
distribute-frac-neg85.1%
neg-sub085.1%
sub-neg85.1%
add-sqr-sqrt36.6%
sqrt-unprod32.8%
sqr-neg32.8%
sqrt-unprod14.6%
add-sqr-sqrt25.1%
distribute-neg-in25.1%
remove-double-neg25.1%
frac-2neg25.1%
add-sqr-sqrt10.6%
sqrt-unprod41.5%
sqr-neg41.5%
sqrt-unprod41.8%
add-sqr-sqrt85.2%
Applied egg-rr85.2%
neg-sub085.2%
distribute-neg-frac285.2%
Simplified85.2%
if -1.50000000000000002e-43 < t1 < 4.99999999999999991e66Initial program 82.1%
times-frac96.1%
distribute-frac-neg96.1%
distribute-neg-frac296.1%
+-commutative96.1%
distribute-neg-in96.1%
unsub-neg96.1%
Simplified96.1%
Taylor expanded in t1 around 0 73.3%
associate-*r/73.3%
mul-1-neg73.3%
Simplified73.3%
Taylor expanded in t1 around 0 76.1%
Final simplification80.7%
(FPCore (u v t1) :precision binary64 (if (<= u -2.45e+20) (/ t1 (* u (/ (- u) v))) (if (<= u 7.2e+72) (/ v (- t1)) (* (/ v (- u)) (/ t1 u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -2.45e+20) {
tmp = t1 / (u * (-u / v));
} else if (u <= 7.2e+72) {
tmp = v / -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 (u <= (-2.45d+20)) then
tmp = t1 / (u * (-u / v))
else if (u <= 7.2d+72) then
tmp = v / -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 (u <= -2.45e+20) {
tmp = t1 / (u * (-u / v));
} else if (u <= 7.2e+72) {
tmp = v / -t1;
} else {
tmp = (v / -u) * (t1 / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -2.45e+20: tmp = t1 / (u * (-u / v)) elif u <= 7.2e+72: tmp = v / -t1 else: tmp = (v / -u) * (t1 / u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -2.45e+20) tmp = Float64(t1 / Float64(u * Float64(Float64(-u) / v))); elseif (u <= 7.2e+72) tmp = Float64(v / Float64(-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 (u <= -2.45e+20) tmp = t1 / (u * (-u / v)); elseif (u <= 7.2e+72) tmp = v / -t1; else tmp = (v / -u) * (t1 / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -2.45e+20], N[(t1 / N[(u * N[((-u) / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 7.2e+72], N[(v / (-t1)), $MachinePrecision], N[(N[(v / (-u)), $MachinePrecision] * N[(t1 / u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.45 \cdot 10^{+20}:\\
\;\;\;\;\frac{t1}{u \cdot \frac{-u}{v}}\\
\mathbf{elif}\;u \leq 7.2 \cdot 10^{+72}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-u} \cdot \frac{t1}{u}\\
\end{array}
\end{array}
if u < -2.45e20Initial program 84.4%
times-frac98.5%
distribute-frac-neg98.5%
distribute-neg-frac298.5%
+-commutative98.5%
distribute-neg-in98.5%
unsub-neg98.5%
Simplified98.5%
Taylor expanded in t1 around 0 78.8%
associate-*r/78.8%
mul-1-neg78.8%
Simplified78.8%
Taylor expanded in t1 around 0 76.1%
*-commutative76.1%
clear-num76.0%
frac-2neg76.0%
frac-times78.7%
*-un-lft-identity78.7%
remove-double-neg78.7%
Applied egg-rr78.7%
if -2.45e20 < u < 7.20000000000000069e72Initial program 56.6%
associate-*l/67.3%
*-commutative67.3%
Simplified67.3%
Taylor expanded in t1 around inf 78.9%
associate-*r/78.9%
neg-mul-178.9%
Simplified78.9%
if 7.20000000000000069e72 < u Initial program 76.7%
times-frac97.8%
distribute-frac-neg97.8%
distribute-neg-frac297.8%
+-commutative97.8%
distribute-neg-in97.8%
unsub-neg97.8%
Simplified97.8%
Taylor expanded in t1 around 0 91.8%
associate-*r/91.8%
mul-1-neg91.8%
Simplified91.8%
Taylor expanded in t1 around 0 91.7%
Final simplification81.0%
(FPCore (u v t1) :precision binary64 (if (or (<= u -3.8e+86) (not (<= u 3.5e+73))) (/ t1 (* u (/ u v))) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.8e+86) || !(u <= 3.5e+73)) {
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 <= (-3.8d+86)) .or. (.not. (u <= 3.5d+73))) 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 <= -3.8e+86) || !(u <= 3.5e+73)) {
tmp = t1 / (u * (u / v));
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -3.8e+86) or not (u <= 3.5e+73): tmp = t1 / (u * (u / v)) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -3.8e+86) || !(u <= 3.5e+73)) tmp = Float64(t1 / Float64(u * 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 <= -3.8e+86) || ~((u <= 3.5e+73))) tmp = t1 / (u * (u / v)); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -3.8e+86], N[Not[LessEqual[u, 3.5e+73]], $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 -3.8 \cdot 10^{+86} \lor \neg \left(u \leq 3.5 \cdot 10^{+73}\right):\\
\;\;\;\;\frac{t1}{u \cdot \frac{u}{v}}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -3.79999999999999978e86 or 3.50000000000000002e73 < u Initial program 80.5%
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 89.0%
associate-*r/89.0%
mul-1-neg89.0%
Simplified89.0%
Taylor expanded in t1 around 0 87.0%
*-commutative87.0%
clear-num86.9%
frac-times86.6%
*-un-lft-identity86.6%
add-sqr-sqrt44.5%
sqrt-unprod66.6%
sqr-neg66.6%
sqrt-unprod33.1%
add-sqr-sqrt71.3%
Applied egg-rr71.3%
if -3.79999999999999978e86 < u < 3.50000000000000002e73Initial program 60.3%
associate-*l/68.0%
*-commutative68.0%
Simplified68.0%
Taylor expanded in t1 around inf 73.2%
associate-*r/73.2%
neg-mul-173.2%
Simplified73.2%
Final simplification72.5%
(FPCore (u v t1) :precision binary64 (if (<= u -3.2e+86) (/ t1 (* u (/ u v))) (if (<= u 3.4e+73) (/ v (- t1)) (/ v (* u (/ u t1))))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -3.2e+86) {
tmp = t1 / (u * (u / v));
} else if (u <= 3.4e+73) {
tmp = v / -t1;
} else {
tmp = v / (u * (u / t1));
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-3.2d+86)) then
tmp = t1 / (u * (u / v))
else if (u <= 3.4d+73) then
tmp = v / -t1
else
tmp = v / (u * (u / t1))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -3.2e+86) {
tmp = t1 / (u * (u / v));
} else if (u <= 3.4e+73) {
tmp = v / -t1;
} else {
tmp = v / (u * (u / t1));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -3.2e+86: tmp = t1 / (u * (u / v)) elif u <= 3.4e+73: tmp = v / -t1 else: tmp = v / (u * (u / t1)) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -3.2e+86) tmp = Float64(t1 / Float64(u * Float64(u / v))); elseif (u <= 3.4e+73) tmp = Float64(v / Float64(-t1)); else tmp = Float64(v / Float64(u * Float64(u / t1))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -3.2e+86) tmp = t1 / (u * (u / v)); elseif (u <= 3.4e+73) tmp = v / -t1; else tmp = v / (u * (u / t1)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -3.2e+86], N[(t1 / N[(u * N[(u / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 3.4e+73], N[(v / (-t1)), $MachinePrecision], N[(v / N[(u * N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.2 \cdot 10^{+86}:\\
\;\;\;\;\frac{t1}{u \cdot \frac{u}{v}}\\
\mathbf{elif}\;u \leq 3.4 \cdot 10^{+73}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u \cdot \frac{u}{t1}}\\
\end{array}
\end{array}
if u < -3.2e86Initial program 84.0%
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 0 86.5%
associate-*r/86.5%
mul-1-neg86.5%
Simplified86.5%
Taylor expanded in t1 around 0 82.8%
*-commutative82.8%
clear-num82.7%
frac-times86.4%
*-un-lft-identity86.4%
add-sqr-sqrt49.4%
sqrt-unprod64.0%
sqr-neg64.0%
sqrt-unprod32.9%
add-sqr-sqrt78.2%
Applied egg-rr78.2%
if -3.2e86 < u < 3.4000000000000002e73Initial program 60.3%
associate-*l/68.0%
*-commutative68.0%
Simplified68.0%
Taylor expanded in t1 around inf 73.2%
associate-*r/73.2%
neg-mul-173.2%
Simplified73.2%
if 3.4000000000000002e73 < u Initial program 76.7%
times-frac97.8%
distribute-frac-neg97.8%
distribute-neg-frac297.8%
+-commutative97.8%
distribute-neg-in97.8%
unsub-neg97.8%
Simplified97.8%
Taylor expanded in t1 around 0 91.8%
associate-*r/91.8%
mul-1-neg91.8%
Simplified91.8%
Taylor expanded in t1 around 0 91.7%
clear-num91.5%
frac-times79.2%
*-un-lft-identity79.2%
add-sqr-sqrt34.8%
sqrt-unprod65.3%
sqr-neg65.3%
sqrt-unprod33.4%
add-sqr-sqrt63.8%
Applied egg-rr63.8%
Final simplification72.5%
(FPCore (u v t1) :precision binary64 (if (or (<= u -4.2e+118) (not (<= u 1.7e+123))) (/ 1.0 (/ u v)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -4.2e+118) || !(u <= 1.7e+123)) {
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 <= (-4.2d+118)) .or. (.not. (u <= 1.7d+123))) 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 <= -4.2e+118) || !(u <= 1.7e+123)) {
tmp = 1.0 / (u / v);
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -4.2e+118) or not (u <= 1.7e+123): tmp = 1.0 / (u / v) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -4.2e+118) || !(u <= 1.7e+123)) 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 <= -4.2e+118) || ~((u <= 1.7e+123))) tmp = 1.0 / (u / v); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -4.2e+118], N[Not[LessEqual[u, 1.7e+123]], $MachinePrecision]], N[(1.0 / N[(u / v), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -4.2 \cdot 10^{+118} \lor \neg \left(u \leq 1.7 \cdot 10^{+123}\right):\\
\;\;\;\;\frac{1}{\frac{u}{v}}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -4.2e118 or 1.70000000000000001e123 < u Initial program 79.1%
times-frac98.8%
distribute-frac-neg98.8%
distribute-neg-frac298.8%
+-commutative98.8%
distribute-neg-in98.8%
unsub-neg98.8%
Simplified98.8%
Taylor expanded in t1 around inf 50.6%
add-sqr-sqrt20.2%
sqrt-unprod73.7%
sqr-neg73.7%
sqrt-unprod30.2%
add-sqr-sqrt50.5%
sub-neg50.5%
Applied egg-rr50.5%
Taylor expanded in t1 around 0 43.9%
clear-num45.9%
inv-pow45.9%
Applied egg-rr45.9%
unpow-145.9%
Simplified45.9%
if -4.2e118 < u < 1.70000000000000001e123Initial program 62.7%
associate-*l/69.2%
*-commutative69.2%
Simplified69.2%
Taylor expanded in t1 around inf 69.7%
associate-*r/69.7%
neg-mul-169.7%
Simplified69.7%
Final simplification62.5%
(FPCore (u v t1) :precision binary64 (if (or (<= u -6.2e+118) (not (<= u 4.4e+73))) (* (/ v u) -0.5) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -6.2e+118) || !(u <= 4.4e+73)) {
tmp = (v / u) * -0.5;
} else {
tmp = v / -t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-6.2d+118)) .or. (.not. (u <= 4.4d+73))) then
tmp = (v / u) * (-0.5d0)
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -6.2e+118) || !(u <= 4.4e+73)) {
tmp = (v / u) * -0.5;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -6.2e+118) or not (u <= 4.4e+73): tmp = (v / u) * -0.5 else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -6.2e+118) || !(u <= 4.4e+73)) tmp = Float64(Float64(v / u) * -0.5); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -6.2e+118) || ~((u <= 4.4e+73))) tmp = (v / u) * -0.5; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -6.2e+118], N[Not[LessEqual[u, 4.4e+73]], $MachinePrecision]], N[(N[(v / u), $MachinePrecision] * -0.5), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -6.2 \cdot 10^{+118} \lor \neg \left(u \leq 4.4 \cdot 10^{+73}\right):\\
\;\;\;\;\frac{v}{u} \cdot -0.5\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -6.19999999999999973e118 or 4.4e73 < u Initial program 80.4%
associate-*l/78.4%
*-commutative78.4%
Simplified78.4%
associate-*r/80.4%
*-commutative80.4%
associate-/r*92.7%
frac-2neg92.7%
distribute-lft-neg-out92.7%
remove-double-neg92.7%
+-commutative92.7%
distribute-neg-in92.7%
sub-neg92.7%
associate-*l/98.8%
associate-*r/98.8%
clear-num98.7%
frac-2neg98.7%
frac-times89.8%
*-un-lft-identity89.8%
Applied egg-rr89.8%
Taylor expanded in u around 0 48.3%
*-commutative48.3%
Simplified48.3%
Taylor expanded in t1 around 0 41.7%
*-commutative41.7%
Simplified41.7%
if -6.19999999999999973e118 < u < 4.4e73Initial program 61.7%
associate-*l/68.9%
*-commutative68.9%
Simplified68.9%
Taylor expanded in t1 around inf 71.6%
associate-*r/71.6%
neg-mul-171.6%
Simplified71.6%
Final simplification62.0%
(FPCore (u v t1) :precision binary64 (if (or (<= u -3.4e+117) (not (<= u 4.4e+73))) (/ v (- u)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.4e+117) || !(u <= 4.4e+73)) {
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.4d+117)) .or. (.not. (u <= 4.4d+73))) 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.4e+117) || !(u <= 4.4e+73)) {
tmp = v / -u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -3.4e+117) or not (u <= 4.4e+73): tmp = v / -u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -3.4e+117) || !(u <= 4.4e+73)) tmp = 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 <= -3.4e+117) || ~((u <= 4.4e+73))) tmp = v / -u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -3.4e+117], N[Not[LessEqual[u, 4.4e+73]], $MachinePrecision]], N[(v / (-u)), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.4 \cdot 10^{+117} \lor \neg \left(u \leq 4.4 \cdot 10^{+73}\right):\\
\;\;\;\;\frac{v}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -3.4000000000000001e117 or 4.4e73 < u Initial program 80.4%
times-frac98.8%
distribute-frac-neg98.8%
distribute-neg-frac298.8%
+-commutative98.8%
distribute-neg-in98.8%
unsub-neg98.8%
Simplified98.8%
Taylor expanded in t1 around inf 47.8%
Taylor expanded in t1 around 0 41.6%
associate-*r/41.6%
mul-1-neg41.6%
Simplified41.6%
if -3.4000000000000001e117 < u < 4.4e73Initial program 61.7%
associate-*l/68.9%
*-commutative68.9%
Simplified68.9%
Taylor expanded in t1 around inf 71.6%
associate-*r/71.6%
neg-mul-171.6%
Simplified71.6%
Final simplification62.0%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.86e+118) (not (<= u 1.2e+116))) (/ v u) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.86e+118) || !(u <= 1.2e+116)) {
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 <= (-1.86d+118)) .or. (.not. (u <= 1.2d+116))) 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 <= -1.86e+118) || !(u <= 1.2e+116)) {
tmp = v / u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.86e+118) or not (u <= 1.2e+116): tmp = v / u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.86e+118) || !(u <= 1.2e+116)) 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 <= -1.86e+118) || ~((u <= 1.2e+116))) tmp = v / u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.86e+118], N[Not[LessEqual[u, 1.2e+116]], $MachinePrecision]], N[(v / u), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.86 \cdot 10^{+118} \lor \neg \left(u \leq 1.2 \cdot 10^{+116}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -1.85999999999999996e118 or 1.2e116 < u Initial program 79.1%
times-frac98.8%
distribute-frac-neg98.8%
distribute-neg-frac298.8%
+-commutative98.8%
distribute-neg-in98.8%
unsub-neg98.8%
Simplified98.8%
Taylor expanded in t1 around inf 50.6%
add-sqr-sqrt20.2%
sqrt-unprod73.7%
sqr-neg73.7%
sqrt-unprod30.2%
add-sqr-sqrt50.5%
sub-neg50.5%
Applied egg-rr50.5%
Taylor expanded in t1 around 0 43.9%
if -1.85999999999999996e118 < u < 1.2e116Initial program 62.7%
associate-*l/69.2%
*-commutative69.2%
Simplified69.2%
Taylor expanded in t1 around inf 69.7%
associate-*r/69.7%
neg-mul-169.7%
Simplified69.7%
Final simplification61.9%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1.5e+66) (not (<= t1 4.9e+117))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.5e+66) || !(t1 <= 4.9e+117)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-1.5d+66)) .or. (.not. (t1 <= 4.9d+117))) then
tmp = v / t1
else
tmp = v / u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.5e+66) || !(t1 <= 4.9e+117)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.5e+66) or not (t1 <= 4.9e+117): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.5e+66) || !(t1 <= 4.9e+117)) tmp = Float64(v / t1); else tmp = Float64(v / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -1.5e+66) || ~((t1 <= 4.9e+117))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.5e+66], N[Not[LessEqual[t1, 4.9e+117]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.5 \cdot 10^{+66} \lor \neg \left(t1 \leq 4.9 \cdot 10^{+117}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -1.50000000000000001e66 or 4.9000000000000001e117 < t1 Initial program 43.0%
associate-*l/47.2%
*-commutative47.2%
Simplified47.2%
Taylor expanded in t1 around inf 89.3%
associate-*r/89.3%
neg-mul-189.3%
Simplified89.3%
neg-sub089.3%
sub-neg89.3%
add-sqr-sqrt44.6%
sqrt-unprod45.9%
sqr-neg45.9%
sqrt-unprod14.5%
add-sqr-sqrt24.8%
Applied egg-rr24.8%
+-lft-identity24.8%
Simplified24.8%
if -1.50000000000000001e66 < t1 < 4.9000000000000001e117Initial program 83.7%
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 inf 46.2%
add-sqr-sqrt21.6%
sqrt-unprod58.8%
sqr-neg58.8%
sqrt-unprod24.4%
add-sqr-sqrt46.5%
sub-neg46.5%
Applied egg-rr46.5%
Taylor expanded in t1 around 0 22.7%
Final simplification23.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 67.6%
times-frac98.0%
distribute-frac-neg98.0%
distribute-neg-frac298.0%
+-commutative98.0%
distribute-neg-in98.0%
unsub-neg98.0%
Simplified98.0%
Taylor expanded in t1 around inf 64.0%
add-sqr-sqrt26.9%
sqrt-unprod71.3%
sqr-neg71.3%
sqrt-unprod36.9%
add-sqr-sqrt64.1%
sub-neg64.1%
Applied egg-rr64.1%
mul-1-neg64.1%
neg-sub064.1%
Applied egg-rr64.1%
neg-sub064.1%
distribute-neg-frac64.1%
Simplified64.1%
distribute-frac-neg64.1%
neg-sub064.1%
sub-neg64.1%
add-sqr-sqrt30.3%
sqrt-unprod32.7%
sqr-neg32.7%
sqrt-unprod12.0%
add-sqr-sqrt22.8%
distribute-neg-in22.8%
remove-double-neg22.8%
frac-2neg22.8%
add-sqr-sqrt11.7%
sqrt-unprod36.1%
sqr-neg36.1%
sqrt-unprod30.6%
add-sqr-sqrt64.0%
Applied egg-rr64.0%
neg-sub064.0%
distribute-neg-frac264.0%
Simplified64.0%
Final simplification64.0%
(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 67.6%
times-frac98.0%
distribute-frac-neg98.0%
distribute-neg-frac298.0%
+-commutative98.0%
distribute-neg-in98.0%
unsub-neg98.0%
Simplified98.0%
Taylor expanded in t1 around inf 64.0%
add-sqr-sqrt26.9%
sqrt-unprod71.3%
sqr-neg71.3%
sqrt-unprod36.9%
add-sqr-sqrt64.1%
sub-neg64.1%
Applied egg-rr64.1%
mul-1-neg64.1%
neg-sub064.1%
Applied egg-rr64.1%
neg-sub064.1%
distribute-neg-frac64.1%
Simplified64.1%
Final simplification64.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 67.6%
associate-*l/72.0%
*-commutative72.0%
Simplified72.0%
Taylor expanded in t1 around inf 54.7%
associate-*r/54.7%
neg-mul-154.7%
Simplified54.7%
neg-sub054.7%
sub-neg54.7%
add-sqr-sqrt27.2%
sqrt-unprod36.0%
sqr-neg36.0%
sqrt-unprod6.7%
add-sqr-sqrt11.6%
Applied egg-rr11.6%
+-lft-identity11.6%
Simplified11.6%
herbie shell --seed 2024180
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))