
(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 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (u v t1) :precision binary64 (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))
double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-t1 * v) / ((t1 + u) * (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
def code(u, v, t1): return (-t1 * v) / ((t1 + u) * (t1 + u))
function code(u, v, t1) return Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (-t1 * v) / ((t1 + u) * (t1 + u)); end
code[u_, v_, t1_] := N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}
\end{array}
(FPCore (u v t1) :precision binary64 (* (/ (- t1) (+ t1 u)) (/ v (+ t1 u))))
double code(double u, double v, double t1) {
return (-t1 / (t1 + u)) * (v / (t1 + u));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-t1 / (t1 + u)) * (v / (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (-t1 / (t1 + u)) * (v / (t1 + u));
}
def code(u, v, t1): return (-t1 / (t1 + u)) * (v / (t1 + u))
function code(u, v, t1) return Float64(Float64(Float64(-t1) / Float64(t1 + u)) * Float64(v / Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (-t1 / (t1 + u)) * (v / (t1 + u)); end
code[u_, v_, t1_] := N[(N[((-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 71.3%
times-frac98.5%
Simplified98.5%
Final simplification98.5%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (* (/ v u) (/ (- t1) u))) (t_2 (/ v (- (* u -2.0) t1))))
(if (<= t1 -1600000.0)
t_2
(if (<= t1 -2.3e-28)
t_1
(if (<= t1 -1.22e-67) t_2 (if (<= t1 5.6e+164) t_1 (/ (- v) t1)))))))
double code(double u, double v, double t1) {
double t_1 = (v / u) * (-t1 / u);
double t_2 = v / ((u * -2.0) - t1);
double tmp;
if (t1 <= -1600000.0) {
tmp = t_2;
} else if (t1 <= -2.3e-28) {
tmp = t_1;
} else if (t1 <= -1.22e-67) {
tmp = t_2;
} else if (t1 <= 5.6e+164) {
tmp = t_1;
} 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (v / u) * (-t1 / u)
t_2 = v / ((u * (-2.0d0)) - t1)
if (t1 <= (-1600000.0d0)) then
tmp = t_2
else if (t1 <= (-2.3d-28)) then
tmp = t_1
else if (t1 <= (-1.22d-67)) then
tmp = t_2
else if (t1 <= 5.6d+164) then
tmp = t_1
else
tmp = -v / t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = (v / u) * (-t1 / u);
double t_2 = v / ((u * -2.0) - t1);
double tmp;
if (t1 <= -1600000.0) {
tmp = t_2;
} else if (t1 <= -2.3e-28) {
tmp = t_1;
} else if (t1 <= -1.22e-67) {
tmp = t_2;
} else if (t1 <= 5.6e+164) {
tmp = t_1;
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): t_1 = (v / u) * (-t1 / u) t_2 = v / ((u * -2.0) - t1) tmp = 0 if t1 <= -1600000.0: tmp = t_2 elif t1 <= -2.3e-28: tmp = t_1 elif t1 <= -1.22e-67: tmp = t_2 elif t1 <= 5.6e+164: tmp = t_1 else: tmp = -v / t1 return tmp
function code(u, v, t1) t_1 = Float64(Float64(v / u) * Float64(Float64(-t1) / u)) t_2 = Float64(v / Float64(Float64(u * -2.0) - t1)) tmp = 0.0 if (t1 <= -1600000.0) tmp = t_2; elseif (t1 <= -2.3e-28) tmp = t_1; elseif (t1 <= -1.22e-67) tmp = t_2; elseif (t1 <= 5.6e+164) tmp = t_1; else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = (v / u) * (-t1 / u); t_2 = v / ((u * -2.0) - t1); tmp = 0.0; if (t1 <= -1600000.0) tmp = t_2; elseif (t1 <= -2.3e-28) tmp = t_1; elseif (t1 <= -1.22e-67) tmp = t_2; elseif (t1 <= 5.6e+164) tmp = t_1; else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(N[(v / u), $MachinePrecision] * N[((-t1) / u), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -1600000.0], t$95$2, If[LessEqual[t1, -2.3e-28], t$95$1, If[LessEqual[t1, -1.22e-67], t$95$2, If[LessEqual[t1, 5.6e+164], t$95$1, N[((-v) / t1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{v}{u} \cdot \frac{-t1}{u}\\
t_2 := \frac{v}{u \cdot -2 - t1}\\
\mathbf{if}\;t1 \leq -1600000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t1 \leq -2.3 \cdot 10^{-28}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t1 \leq -1.22 \cdot 10^{-67}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t1 \leq 5.6 \cdot 10^{+164}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if t1 < -1.6e6 or -2.29999999999999986e-28 < t1 < -1.22e-67Initial program 75.5%
associate-/r*83.2%
*-commutative83.2%
associate-/l*99.9%
associate-/l/98.8%
+-commutative98.8%
remove-double-neg98.8%
unsub-neg98.8%
div-sub98.8%
sub-neg98.8%
*-inverses98.8%
metadata-eval98.8%
Simplified98.8%
Taylor expanded in t1 around inf 88.0%
mul-1-neg88.0%
unsub-neg88.0%
*-commutative88.0%
Simplified88.0%
if -1.6e6 < t1 < -2.29999999999999986e-28 or -1.22e-67 < t1 < 5.6000000000000004e164Initial program 75.5%
times-frac97.4%
Simplified97.4%
Taylor expanded in t1 around 0 75.0%
Taylor expanded in t1 around 0 75.9%
associate-*r/75.9%
mul-1-neg75.9%
Simplified75.9%
if 5.6000000000000004e164 < t1 Initial program 34.4%
times-frac99.9%
Simplified99.9%
Taylor expanded in t1 around inf 92.7%
associate-*r/92.7%
neg-mul-192.7%
Simplified92.7%
Final simplification81.4%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ (* t1 (/ v u)) (- u))) (t_2 (/ v (- (* u -2.0) t1))))
(if (<= t1 -480000.0)
t_2
(if (<= t1 -1.2e-28)
t_1
(if (<= t1 -1.15e-72) t_2 (if (<= t1 5.6e+164) t_1 (/ (- v) t1)))))))
double code(double u, double v, double t1) {
double t_1 = (t1 * (v / u)) / -u;
double t_2 = v / ((u * -2.0) - t1);
double tmp;
if (t1 <= -480000.0) {
tmp = t_2;
} else if (t1 <= -1.2e-28) {
tmp = t_1;
} else if (t1 <= -1.15e-72) {
tmp = t_2;
} else if (t1 <= 5.6e+164) {
tmp = t_1;
} 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (t1 * (v / u)) / -u
t_2 = v / ((u * (-2.0d0)) - t1)
if (t1 <= (-480000.0d0)) then
tmp = t_2
else if (t1 <= (-1.2d-28)) then
tmp = t_1
else if (t1 <= (-1.15d-72)) then
tmp = t_2
else if (t1 <= 5.6d+164) then
tmp = t_1
else
tmp = -v / t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = (t1 * (v / u)) / -u;
double t_2 = v / ((u * -2.0) - t1);
double tmp;
if (t1 <= -480000.0) {
tmp = t_2;
} else if (t1 <= -1.2e-28) {
tmp = t_1;
} else if (t1 <= -1.15e-72) {
tmp = t_2;
} else if (t1 <= 5.6e+164) {
tmp = t_1;
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): t_1 = (t1 * (v / u)) / -u t_2 = v / ((u * -2.0) - t1) tmp = 0 if t1 <= -480000.0: tmp = t_2 elif t1 <= -1.2e-28: tmp = t_1 elif t1 <= -1.15e-72: tmp = t_2 elif t1 <= 5.6e+164: tmp = t_1 else: tmp = -v / t1 return tmp
function code(u, v, t1) t_1 = Float64(Float64(t1 * Float64(v / u)) / Float64(-u)) t_2 = Float64(v / Float64(Float64(u * -2.0) - t1)) tmp = 0.0 if (t1 <= -480000.0) tmp = t_2; elseif (t1 <= -1.2e-28) tmp = t_1; elseif (t1 <= -1.15e-72) tmp = t_2; elseif (t1 <= 5.6e+164) tmp = t_1; else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = (t1 * (v / u)) / -u; t_2 = v / ((u * -2.0) - t1); tmp = 0.0; if (t1 <= -480000.0) tmp = t_2; elseif (t1 <= -1.2e-28) tmp = t_1; elseif (t1 <= -1.15e-72) tmp = t_2; elseif (t1 <= 5.6e+164) tmp = t_1; else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision]}, Block[{t$95$2 = N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -480000.0], t$95$2, If[LessEqual[t1, -1.2e-28], t$95$1, If[LessEqual[t1, -1.15e-72], t$95$2, If[LessEqual[t1, 5.6e+164], t$95$1, N[((-v) / t1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t1 \cdot \frac{v}{u}}{-u}\\
t_2 := \frac{v}{u \cdot -2 - t1}\\
\mathbf{if}\;t1 \leq -480000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t1 \leq -1.2 \cdot 10^{-28}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t1 \leq -1.15 \cdot 10^{-72}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t1 \leq 5.6 \cdot 10^{+164}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if t1 < -4.8e5 or -1.2000000000000001e-28 < t1 < -1.14999999999999997e-72Initial program 75.5%
associate-/r*83.2%
*-commutative83.2%
associate-/l*99.9%
associate-/l/98.8%
+-commutative98.8%
remove-double-neg98.8%
unsub-neg98.8%
div-sub98.8%
sub-neg98.8%
*-inverses98.8%
metadata-eval98.8%
Simplified98.8%
Taylor expanded in t1 around inf 88.0%
mul-1-neg88.0%
unsub-neg88.0%
*-commutative88.0%
Simplified88.0%
if -4.8e5 < t1 < -1.2000000000000001e-28 or -1.14999999999999997e-72 < t1 < 5.6000000000000004e164Initial program 75.5%
times-frac97.4%
Simplified97.4%
Taylor expanded in t1 around 0 75.0%
Taylor expanded in t1 around 0 75.9%
associate-*r/75.9%
mul-1-neg75.9%
Simplified75.9%
frac-2neg75.9%
remove-double-neg75.9%
associate-*l/76.6%
Applied egg-rr76.6%
if 5.6000000000000004e164 < t1 Initial program 34.4%
times-frac99.9%
Simplified99.9%
Taylor expanded in t1 around inf 92.7%
associate-*r/92.7%
neg-mul-192.7%
Simplified92.7%
Final simplification81.8%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ v (- (* u -2.0) t1))))
(if (<= t1 -3300000.0)
t_1
(if (<= t1 -7e-28)
(/ (* t1 (/ v u)) (- u))
(if (<= t1 -6.3e-68)
t_1
(if (<= t1 5.6e+164) (/ (/ t1 (/ u v)) (- u)) (/ (- v) t1)))))))
double code(double u, double v, double t1) {
double t_1 = v / ((u * -2.0) - t1);
double tmp;
if (t1 <= -3300000.0) {
tmp = t_1;
} else if (t1 <= -7e-28) {
tmp = (t1 * (v / u)) / -u;
} else if (t1 <= -6.3e-68) {
tmp = t_1;
} else if (t1 <= 5.6e+164) {
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) :: t_1
real(8) :: tmp
t_1 = v / ((u * (-2.0d0)) - t1)
if (t1 <= (-3300000.0d0)) then
tmp = t_1
else if (t1 <= (-7d-28)) then
tmp = (t1 * (v / u)) / -u
else if (t1 <= (-6.3d-68)) then
tmp = t_1
else if (t1 <= 5.6d+164) 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 t_1 = v / ((u * -2.0) - t1);
double tmp;
if (t1 <= -3300000.0) {
tmp = t_1;
} else if (t1 <= -7e-28) {
tmp = (t1 * (v / u)) / -u;
} else if (t1 <= -6.3e-68) {
tmp = t_1;
} else if (t1 <= 5.6e+164) {
tmp = (t1 / (u / v)) / -u;
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): t_1 = v / ((u * -2.0) - t1) tmp = 0 if t1 <= -3300000.0: tmp = t_1 elif t1 <= -7e-28: tmp = (t1 * (v / u)) / -u elif t1 <= -6.3e-68: tmp = t_1 elif t1 <= 5.6e+164: tmp = (t1 / (u / v)) / -u else: tmp = -v / t1 return tmp
function code(u, v, t1) t_1 = Float64(v / Float64(Float64(u * -2.0) - t1)) tmp = 0.0 if (t1 <= -3300000.0) tmp = t_1; elseif (t1 <= -7e-28) tmp = Float64(Float64(t1 * Float64(v / u)) / Float64(-u)); elseif (t1 <= -6.3e-68) tmp = t_1; elseif (t1 <= 5.6e+164) tmp = Float64(Float64(t1 / Float64(u / v)) / Float64(-u)); else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = v / ((u * -2.0) - t1); tmp = 0.0; if (t1 <= -3300000.0) tmp = t_1; elseif (t1 <= -7e-28) tmp = (t1 * (v / u)) / -u; elseif (t1 <= -6.3e-68) tmp = t_1; elseif (t1 <= 5.6e+164) tmp = (t1 / (u / v)) / -u; else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -3300000.0], t$95$1, If[LessEqual[t1, -7e-28], N[(N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision], If[LessEqual[t1, -6.3e-68], t$95$1, If[LessEqual[t1, 5.6e+164], N[(N[(t1 / N[(u / v), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{v}{u \cdot -2 - t1}\\
\mathbf{if}\;t1 \leq -3300000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t1 \leq -7 \cdot 10^{-28}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{u}}{-u}\\
\mathbf{elif}\;t1 \leq -6.3 \cdot 10^{-68}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t1 \leq 5.6 \cdot 10^{+164}:\\
\;\;\;\;\frac{\frac{t1}{\frac{u}{v}}}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if t1 < -3.3e6 or -6.9999999999999999e-28 < t1 < -6.2999999999999998e-68Initial program 75.5%
associate-/r*83.2%
*-commutative83.2%
associate-/l*99.9%
associate-/l/98.8%
+-commutative98.8%
remove-double-neg98.8%
unsub-neg98.8%
div-sub98.8%
sub-neg98.8%
*-inverses98.8%
metadata-eval98.8%
Simplified98.8%
Taylor expanded in t1 around inf 88.0%
mul-1-neg88.0%
unsub-neg88.0%
*-commutative88.0%
Simplified88.0%
if -3.3e6 < t1 < -6.9999999999999999e-28Initial program 78.9%
times-frac99.7%
Simplified99.7%
Taylor expanded in t1 around 0 88.7%
Taylor expanded in t1 around 0 89.0%
associate-*r/89.0%
mul-1-neg89.0%
Simplified89.0%
frac-2neg89.0%
remove-double-neg89.0%
associate-*l/89.2%
Applied egg-rr89.2%
if -6.2999999999999998e-68 < t1 < 5.6000000000000004e164Initial program 75.2%
times-frac97.3%
Simplified97.3%
Taylor expanded in t1 around 0 74.2%
Taylor expanded in t1 around 0 75.1%
associate-*r/75.1%
mul-1-neg75.1%
Simplified75.1%
frac-2neg75.1%
remove-double-neg75.1%
associate-*l/75.8%
Applied egg-rr75.8%
clear-num75.8%
un-div-inv75.8%
Applied egg-rr75.8%
if 5.6000000000000004e164 < t1 Initial program 34.4%
times-frac99.9%
Simplified99.9%
Taylor expanded in t1 around inf 92.7%
associate-*r/92.7%
neg-mul-192.7%
Simplified92.7%
Final simplification81.8%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ v (- (* u -2.0) t1))))
(if (<= t1 -260000.0)
t_1
(if (<= t1 -7.5e-29)
(/ t1 (* (- t1 u) (/ u v)))
(if (<= t1 -1.2e-67)
t_1
(if (<= t1 5.6e+164) (/ (/ t1 (/ u v)) (- u)) (/ (- v) t1)))))))
double code(double u, double v, double t1) {
double t_1 = v / ((u * -2.0) - t1);
double tmp;
if (t1 <= -260000.0) {
tmp = t_1;
} else if (t1 <= -7.5e-29) {
tmp = t1 / ((t1 - u) * (u / v));
} else if (t1 <= -1.2e-67) {
tmp = t_1;
} else if (t1 <= 5.6e+164) {
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) :: t_1
real(8) :: tmp
t_1 = v / ((u * (-2.0d0)) - t1)
if (t1 <= (-260000.0d0)) then
tmp = t_1
else if (t1 <= (-7.5d-29)) then
tmp = t1 / ((t1 - u) * (u / v))
else if (t1 <= (-1.2d-67)) then
tmp = t_1
else if (t1 <= 5.6d+164) 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 t_1 = v / ((u * -2.0) - t1);
double tmp;
if (t1 <= -260000.0) {
tmp = t_1;
} else if (t1 <= -7.5e-29) {
tmp = t1 / ((t1 - u) * (u / v));
} else if (t1 <= -1.2e-67) {
tmp = t_1;
} else if (t1 <= 5.6e+164) {
tmp = (t1 / (u / v)) / -u;
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): t_1 = v / ((u * -2.0) - t1) tmp = 0 if t1 <= -260000.0: tmp = t_1 elif t1 <= -7.5e-29: tmp = t1 / ((t1 - u) * (u / v)) elif t1 <= -1.2e-67: tmp = t_1 elif t1 <= 5.6e+164: tmp = (t1 / (u / v)) / -u else: tmp = -v / t1 return tmp
function code(u, v, t1) t_1 = Float64(v / Float64(Float64(u * -2.0) - t1)) tmp = 0.0 if (t1 <= -260000.0) tmp = t_1; elseif (t1 <= -7.5e-29) tmp = Float64(t1 / Float64(Float64(t1 - u) * Float64(u / v))); elseif (t1 <= -1.2e-67) tmp = t_1; elseif (t1 <= 5.6e+164) tmp = Float64(Float64(t1 / Float64(u / v)) / Float64(-u)); else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = v / ((u * -2.0) - t1); tmp = 0.0; if (t1 <= -260000.0) tmp = t_1; elseif (t1 <= -7.5e-29) tmp = t1 / ((t1 - u) * (u / v)); elseif (t1 <= -1.2e-67) tmp = t_1; elseif (t1 <= 5.6e+164) tmp = (t1 / (u / v)) / -u; else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -260000.0], t$95$1, If[LessEqual[t1, -7.5e-29], N[(t1 / N[(N[(t1 - u), $MachinePrecision] * N[(u / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, -1.2e-67], t$95$1, If[LessEqual[t1, 5.6e+164], N[(N[(t1 / N[(u / v), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{v}{u \cdot -2 - t1}\\
\mathbf{if}\;t1 \leq -260000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t1 \leq -7.5 \cdot 10^{-29}:\\
\;\;\;\;\frac{t1}{\left(t1 - u\right) \cdot \frac{u}{v}}\\
\mathbf{elif}\;t1 \leq -1.2 \cdot 10^{-67}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t1 \leq 5.6 \cdot 10^{+164}:\\
\;\;\;\;\frac{\frac{t1}{\frac{u}{v}}}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if t1 < -2.6e5 or -7.50000000000000006e-29 < t1 < -1.2e-67Initial program 75.5%
associate-/r*83.2%
*-commutative83.2%
associate-/l*99.9%
associate-/l/98.8%
+-commutative98.8%
remove-double-neg98.8%
unsub-neg98.8%
div-sub98.8%
sub-neg98.8%
*-inverses98.8%
metadata-eval98.8%
Simplified98.8%
Taylor expanded in t1 around inf 88.0%
mul-1-neg88.0%
unsub-neg88.0%
*-commutative88.0%
Simplified88.0%
if -2.6e5 < t1 < -7.50000000000000006e-29Initial program 78.9%
times-frac99.7%
Simplified99.7%
*-commutative99.7%
clear-num100.0%
frac-2neg100.0%
frac-times99.5%
*-un-lft-identity99.5%
remove-double-neg99.5%
distribute-neg-in99.5%
add-sqr-sqrt99.5%
sqrt-unprod99.5%
sqr-neg99.5%
sqrt-unprod0.0%
add-sqr-sqrt88.8%
sub-neg88.8%
Applied egg-rr88.8%
Taylor expanded in t1 around 0 89.2%
if -1.2e-67 < t1 < 5.6000000000000004e164Initial program 75.2%
times-frac97.3%
Simplified97.3%
Taylor expanded in t1 around 0 74.2%
Taylor expanded in t1 around 0 75.1%
associate-*r/75.1%
mul-1-neg75.1%
Simplified75.1%
frac-2neg75.1%
remove-double-neg75.1%
associate-*l/75.8%
Applied egg-rr75.8%
clear-num75.8%
un-div-inv75.8%
Applied egg-rr75.8%
if 5.6000000000000004e164 < t1 Initial program 34.4%
times-frac99.9%
Simplified99.9%
Taylor expanded in t1 around inf 92.7%
associate-*r/92.7%
neg-mul-192.7%
Simplified92.7%
Final simplification81.8%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ v (- (* u -2.0) t1))))
(if (<= t1 -250000.0)
t_1
(if (<= t1 -4.8e-28)
(/ (* t1 (/ v u)) (- t1 u))
(if (<= t1 -1.22e-67)
t_1
(if (<= t1 5.6e+164) (/ (/ t1 (/ u v)) (- u)) (/ (- v) t1)))))))
double code(double u, double v, double t1) {
double t_1 = v / ((u * -2.0) - t1);
double tmp;
if (t1 <= -250000.0) {
tmp = t_1;
} else if (t1 <= -4.8e-28) {
tmp = (t1 * (v / u)) / (t1 - u);
} else if (t1 <= -1.22e-67) {
tmp = t_1;
} else if (t1 <= 5.6e+164) {
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) :: t_1
real(8) :: tmp
t_1 = v / ((u * (-2.0d0)) - t1)
if (t1 <= (-250000.0d0)) then
tmp = t_1
else if (t1 <= (-4.8d-28)) then
tmp = (t1 * (v / u)) / (t1 - u)
else if (t1 <= (-1.22d-67)) then
tmp = t_1
else if (t1 <= 5.6d+164) 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 t_1 = v / ((u * -2.0) - t1);
double tmp;
if (t1 <= -250000.0) {
tmp = t_1;
} else if (t1 <= -4.8e-28) {
tmp = (t1 * (v / u)) / (t1 - u);
} else if (t1 <= -1.22e-67) {
tmp = t_1;
} else if (t1 <= 5.6e+164) {
tmp = (t1 / (u / v)) / -u;
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): t_1 = v / ((u * -2.0) - t1) tmp = 0 if t1 <= -250000.0: tmp = t_1 elif t1 <= -4.8e-28: tmp = (t1 * (v / u)) / (t1 - u) elif t1 <= -1.22e-67: tmp = t_1 elif t1 <= 5.6e+164: tmp = (t1 / (u / v)) / -u else: tmp = -v / t1 return tmp
function code(u, v, t1) t_1 = Float64(v / Float64(Float64(u * -2.0) - t1)) tmp = 0.0 if (t1 <= -250000.0) tmp = t_1; elseif (t1 <= -4.8e-28) tmp = Float64(Float64(t1 * Float64(v / u)) / Float64(t1 - u)); elseif (t1 <= -1.22e-67) tmp = t_1; elseif (t1 <= 5.6e+164) tmp = Float64(Float64(t1 / Float64(u / v)) / Float64(-u)); else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = v / ((u * -2.0) - t1); tmp = 0.0; if (t1 <= -250000.0) tmp = t_1; elseif (t1 <= -4.8e-28) tmp = (t1 * (v / u)) / (t1 - u); elseif (t1 <= -1.22e-67) tmp = t_1; elseif (t1 <= 5.6e+164) tmp = (t1 / (u / v)) / -u; else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -250000.0], t$95$1, If[LessEqual[t1, -4.8e-28], N[(N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision] / N[(t1 - u), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, -1.22e-67], t$95$1, If[LessEqual[t1, 5.6e+164], N[(N[(t1 / N[(u / v), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{v}{u \cdot -2 - t1}\\
\mathbf{if}\;t1 \leq -250000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t1 \leq -4.8 \cdot 10^{-28}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{u}}{t1 - u}\\
\mathbf{elif}\;t1 \leq -1.22 \cdot 10^{-67}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t1 \leq 5.6 \cdot 10^{+164}:\\
\;\;\;\;\frac{\frac{t1}{\frac{u}{v}}}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if t1 < -2.5e5 or -4.8000000000000004e-28 < t1 < -1.22e-67Initial program 75.5%
associate-/r*83.2%
*-commutative83.2%
associate-/l*99.9%
associate-/l/98.8%
+-commutative98.8%
remove-double-neg98.8%
unsub-neg98.8%
div-sub98.8%
sub-neg98.8%
*-inverses98.8%
metadata-eval98.8%
Simplified98.8%
Taylor expanded in t1 around inf 88.0%
mul-1-neg88.0%
unsub-neg88.0%
*-commutative88.0%
Simplified88.0%
if -2.5e5 < t1 < -4.8000000000000004e-28Initial program 78.9%
times-frac99.7%
Simplified99.7%
Taylor expanded in t1 around 0 88.7%
distribute-frac-neg88.7%
frac-2neg88.7%
distribute-frac-neg88.7%
remove-double-neg88.7%
associate-*l/88.9%
distribute-neg-in88.9%
add-sqr-sqrt88.9%
sqrt-unprod88.9%
sqr-neg88.9%
sqrt-unprod0.0%
add-sqr-sqrt89.3%
sub-neg89.3%
Applied egg-rr89.3%
if -1.22e-67 < t1 < 5.6000000000000004e164Initial program 75.2%
times-frac97.3%
Simplified97.3%
Taylor expanded in t1 around 0 74.2%
Taylor expanded in t1 around 0 75.1%
associate-*r/75.1%
mul-1-neg75.1%
Simplified75.1%
frac-2neg75.1%
remove-double-neg75.1%
associate-*l/75.8%
Applied egg-rr75.8%
clear-num75.8%
un-div-inv75.8%
Applied egg-rr75.8%
if 5.6000000000000004e164 < t1 Initial program 34.4%
times-frac99.9%
Simplified99.9%
Taylor expanded in t1 around inf 92.7%
associate-*r/92.7%
neg-mul-192.7%
Simplified92.7%
Final simplification81.8%
(FPCore (u v t1) :precision binary64 (if (or (<= u -3.2e+148) (not (<= u 1.5e+247))) (* v (/ (/ t1 u) t1)) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.2e+148) || !(u <= 1.5e+247)) {
tmp = v * ((t1 / 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 ((u <= (-3.2d+148)) .or. (.not. (u <= 1.5d+247))) then
tmp = v * ((t1 / 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 ((u <= -3.2e+148) || !(u <= 1.5e+247)) {
tmp = v * ((t1 / u) / t1);
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -3.2e+148) or not (u <= 1.5e+247): tmp = v * ((t1 / u) / t1) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -3.2e+148) || !(u <= 1.5e+247)) tmp = Float64(v * Float64(Float64(t1 / u) / t1)); else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -3.2e+148) || ~((u <= 1.5e+247))) tmp = v * ((t1 / u) / t1); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -3.2e+148], N[Not[LessEqual[u, 1.5e+247]], $MachinePrecision]], N[(v * N[(N[(t1 / u), $MachinePrecision] / t1), $MachinePrecision]), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.2 \cdot 10^{+148} \lor \neg \left(u \leq 1.5 \cdot 10^{+247}\right):\\
\;\;\;\;v \cdot \frac{\frac{t1}{u}}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -3.1999999999999999e148 or 1.5e247 < u Initial program 82.0%
times-frac96.5%
Simplified96.5%
*-commutative96.5%
clear-num96.5%
frac-2neg96.5%
frac-times92.9%
*-un-lft-identity92.9%
remove-double-neg92.9%
distribute-neg-in92.9%
add-sqr-sqrt45.5%
sqrt-unprod91.1%
sqr-neg91.1%
sqrt-unprod47.4%
add-sqr-sqrt92.9%
sub-neg92.9%
Applied egg-rr92.9%
Taylor expanded in t1 around 0 92.9%
Taylor expanded in u around 0 53.1%
associate-/r/51.5%
*-commutative51.5%
associate-/r*64.3%
Applied egg-rr64.3%
if -3.1999999999999999e148 < u < 1.5e247Initial program 68.5%
times-frac99.0%
Simplified99.0%
Taylor expanded in t1 around inf 61.3%
associate-*r/61.3%
neg-mul-161.3%
Simplified61.3%
Final simplification62.0%
(FPCore (u v t1) :precision binary64 (if (or (<= u -6.8e+102) (not (<= u 1.95e+90))) (/ t1 (/ u (/ v u))) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -6.8e+102) || !(u <= 1.95e+90)) {
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 <= (-6.8d+102)) .or. (.not. (u <= 1.95d+90))) 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 <= -6.8e+102) || !(u <= 1.95e+90)) {
tmp = t1 / (u / (v / u));
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -6.8e+102) or not (u <= 1.95e+90): tmp = t1 / (u / (v / u)) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -6.8e+102) || !(u <= 1.95e+90)) tmp = Float64(t1 / Float64(u / Float64(v / u))); else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -6.8e+102) || ~((u <= 1.95e+90))) tmp = t1 / (u / (v / u)); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -6.8e+102], N[Not[LessEqual[u, 1.95e+90]], $MachinePrecision]], N[(t1 / N[(u / N[(v / u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -6.8 \cdot 10^{+102} \lor \neg \left(u \leq 1.95 \cdot 10^{+90}\right):\\
\;\;\;\;\frac{t1}{\frac{u}{\frac{v}{u}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -6.8000000000000001e102 or 1.9500000000000001e90 < u Initial program 70.0%
times-frac97.1%
Simplified97.1%
Taylor expanded in t1 around 0 81.1%
Taylor expanded in t1 around 0 81.0%
associate-*r/81.0%
mul-1-neg81.0%
Simplified81.0%
associate-*l/83.7%
associate-/l*80.5%
add-sqr-sqrt41.8%
sqrt-unprod62.7%
sqr-neg62.7%
sqrt-unprod30.7%
add-sqr-sqrt66.4%
Applied egg-rr66.4%
if -6.8000000000000001e102 < u < 1.9500000000000001e90Initial program 72.1%
times-frac99.3%
Simplified99.3%
Taylor expanded in t1 around inf 67.5%
associate-*r/67.5%
neg-mul-167.5%
Simplified67.5%
Final simplification67.1%
(FPCore (u v t1) :precision binary64 (if (or (<= u -3.75e+149) (not (<= u 1.5e+247))) (/ v (* u (/ u t1))) (/ v (- (* u -2.0) t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.75e+149) || !(u <= 1.5e+247)) {
tmp = v / (u * (u / t1));
} else {
tmp = v / ((u * -2.0) - 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.75d+149)) .or. (.not. (u <= 1.5d+247))) then
tmp = v / (u * (u / t1))
else
tmp = v / ((u * (-2.0d0)) - t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.75e+149) || !(u <= 1.5e+247)) {
tmp = v / (u * (u / t1));
} else {
tmp = v / ((u * -2.0) - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -3.75e+149) or not (u <= 1.5e+247): tmp = v / (u * (u / t1)) else: tmp = v / ((u * -2.0) - t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -3.75e+149) || !(u <= 1.5e+247)) tmp = Float64(v / Float64(u * Float64(u / t1))); else tmp = Float64(v / Float64(Float64(u * -2.0) - t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -3.75e+149) || ~((u <= 1.5e+247))) tmp = v / (u * (u / t1)); else tmp = v / ((u * -2.0) - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -3.75e+149], N[Not[LessEqual[u, 1.5e+247]], $MachinePrecision]], N[(v / N[(u * N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.75 \cdot 10^{+149} \lor \neg \left(u \leq 1.5 \cdot 10^{+247}\right):\\
\;\;\;\;\frac{v}{u \cdot \frac{u}{t1}}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u \cdot -2 - t1}\\
\end{array}
\end{array}
if u < -3.75000000000000016e149 or 1.5e247 < u Initial program 82.0%
times-frac96.5%
Simplified96.5%
Taylor expanded in t1 around 0 94.7%
Taylor expanded in t1 around 0 94.6%
associate-*r/94.6%
mul-1-neg94.6%
Simplified94.6%
clear-num94.7%
frac-times82.3%
*-un-lft-identity82.3%
add-sqr-sqrt42.0%
sqrt-unprod69.1%
sqr-neg69.1%
sqrt-unprod40.3%
add-sqr-sqrt82.3%
Applied egg-rr82.3%
if -3.75000000000000016e149 < u < 1.5e247Initial program 68.5%
associate-/r*80.7%
*-commutative80.7%
associate-/l*98.6%
associate-/l/98.0%
+-commutative98.0%
remove-double-neg98.0%
unsub-neg98.0%
div-sub98.0%
sub-neg98.0%
*-inverses98.0%
metadata-eval98.0%
Simplified98.0%
Taylor expanded in t1 around inf 64.3%
mul-1-neg64.3%
unsub-neg64.3%
*-commutative64.3%
Simplified64.3%
Final simplification68.0%
(FPCore (u v t1) :precision binary64 (if (<= u -1.08e+163) (* (/ t1 u) (/ v t1)) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.08e+163) {
tmp = (t1 / u) * (v / 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 (u <= (-1.08d+163)) then
tmp = (t1 / u) * (v / t1)
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.08e+163) {
tmp = (t1 / u) * (v / t1);
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.08e+163: tmp = (t1 / u) * (v / t1) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.08e+163) tmp = Float64(Float64(t1 / u) * Float64(v / t1)); else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -1.08e+163) tmp = (t1 / u) * (v / t1); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.08e+163], N[(N[(t1 / u), $MachinePrecision] * N[(v / t1), $MachinePrecision]), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.08 \cdot 10^{+163}:\\
\;\;\;\;\frac{t1}{u} \cdot \frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -1.0800000000000001e163Initial program 78.4%
times-frac94.7%
Simplified94.7%
*-commutative94.7%
clear-num94.7%
frac-2neg94.7%
frac-times91.9%
*-un-lft-identity91.9%
remove-double-neg91.9%
distribute-neg-in91.9%
add-sqr-sqrt43.0%
sqrt-unprod89.2%
sqr-neg89.2%
sqrt-unprod48.9%
add-sqr-sqrt91.9%
sub-neg91.9%
Applied egg-rr91.9%
Taylor expanded in t1 around 0 91.9%
Taylor expanded in u around 0 59.2%
associate-/l*56.4%
*-commutative56.4%
times-frac61.8%
Applied egg-rr61.8%
if -1.0800000000000001e163 < u Initial program 70.2%
times-frac99.0%
Simplified99.0%
Taylor expanded in t1 around inf 58.8%
associate-*r/58.8%
neg-mul-158.8%
Simplified58.8%
Final simplification59.2%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -2.5e+128) (not (<= t1 1.3e+172))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -2.5e+128) || !(t1 <= 1.3e+172)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-2.5d+128)) .or. (.not. (t1 <= 1.3d+172))) then
tmp = v / t1
else
tmp = v / u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -2.5e+128) || !(t1 <= 1.3e+172)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -2.5e+128) or not (t1 <= 1.3e+172): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -2.5e+128) || !(t1 <= 1.3e+172)) tmp = Float64(v / t1); else tmp = Float64(v / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -2.5e+128) || ~((t1 <= 1.3e+172))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -2.5e+128], N[Not[LessEqual[t1, 1.3e+172]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2.5 \cdot 10^{+128} \lor \neg \left(t1 \leq 1.3 \cdot 10^{+172}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -2.5e128 or 1.3e172 < t1 Initial program 51.1%
times-frac100.0%
Simplified100.0%
associate-*r/100.0%
clear-num100.0%
associate-*l/100.0%
*-un-lft-identity100.0%
frac-2neg100.0%
distribute-neg-in100.0%
add-sqr-sqrt61.4%
sqrt-unprod52.6%
sqr-neg52.6%
sqrt-unprod17.1%
add-sqr-sqrt54.3%
sub-neg54.3%
remove-double-neg54.3%
Applied egg-rr54.3%
Taylor expanded in t1 around inf 49.8%
if -2.5e128 < t1 < 1.3e172Initial program 78.1%
times-frac97.9%
Simplified97.9%
*-commutative97.9%
clear-num97.7%
frac-2neg97.7%
frac-times85.9%
*-un-lft-identity85.9%
remove-double-neg85.9%
distribute-neg-in85.9%
add-sqr-sqrt46.0%
sqrt-unprod76.0%
sqr-neg76.0%
sqrt-unprod29.4%
add-sqr-sqrt59.8%
sub-neg59.8%
Applied egg-rr59.8%
Taylor expanded in t1 around 0 61.2%
Taylor expanded in t1 around inf 17.7%
Final simplification25.8%
(FPCore (u v t1) :precision binary64 (if (<= u -1.85e+163) (/ v u) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.85e+163) {
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.85d+163)) 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.85e+163) {
tmp = v / u;
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.85e+163: tmp = v / u else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.85e+163) tmp = Float64(v / u); else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -1.85e+163) tmp = v / u; else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.85e+163], N[(v / u), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.85 \cdot 10^{+163}:\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -1.84999999999999996e163Initial program 78.4%
times-frac94.7%
Simplified94.7%
*-commutative94.7%
clear-num94.7%
frac-2neg94.7%
frac-times91.9%
*-un-lft-identity91.9%
remove-double-neg91.9%
distribute-neg-in91.9%
add-sqr-sqrt43.0%
sqrt-unprod89.2%
sqr-neg89.2%
sqrt-unprod48.9%
add-sqr-sqrt91.9%
sub-neg91.9%
Applied egg-rr91.9%
Taylor expanded in t1 around 0 91.9%
Taylor expanded in t1 around inf 54.1%
if -1.84999999999999996e163 < u Initial program 70.2%
times-frac99.0%
Simplified99.0%
Taylor expanded in t1 around inf 58.8%
associate-*r/58.8%
neg-mul-158.8%
Simplified58.8%
Final simplification58.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 71.3%
times-frac98.5%
Simplified98.5%
associate-*r/98.2%
clear-num98.2%
associate-*l/98.2%
*-un-lft-identity98.2%
frac-2neg98.2%
distribute-neg-in98.2%
add-sqr-sqrt54.6%
sqrt-unprod74.5%
sqr-neg74.5%
sqrt-unprod27.9%
add-sqr-sqrt61.9%
sub-neg61.9%
remove-double-neg61.9%
Applied egg-rr61.9%
Taylor expanded in t1 around inf 16.2%
Final simplification16.2%
herbie shell --seed 2023333
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))