
(FPCore (u v t1) :precision binary64 (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))
double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-t1 * v) / ((t1 + u) * (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
def code(u, v, t1): return (-t1 * v) / ((t1 + u) * (t1 + u))
function code(u, v, t1) return Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (-t1 * v) / ((t1 + u) * (t1 + u)); end
code[u_, v_, t1_] := N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (u v t1) :precision binary64 (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))
double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-t1 * v) / ((t1 + u) * (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
def code(u, v, t1): return (-t1 * v) / ((t1 + u) * (t1 + u))
function code(u, v, t1) return Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (-t1 * v) / ((t1 + u) * (t1 + u)); end
code[u_, v_, t1_] := N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}
\end{array}
(FPCore (u v t1) :precision binary64 (/ (* (/ t1 (+ t1 u)) (- v)) (+ 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[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * (-v)), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{t1 + u}
\end{array}
Initial program 71.9%
associate-/l*73.6%
distribute-lft-neg-out73.6%
distribute-rgt-neg-in73.6%
associate-/r*83.3%
distribute-neg-frac283.3%
Simplified83.3%
associate-*r/98.3%
+-commutative98.3%
distribute-neg-in98.3%
sub-neg98.3%
associate-*l/97.7%
frac-2neg97.7%
associate-*r/99.0%
sub-neg99.0%
distribute-neg-in99.0%
+-commutative99.0%
remove-double-neg99.0%
frac-2neg99.0%
add-sqr-sqrt55.9%
sqrt-unprod44.4%
sqr-neg44.4%
sqrt-unprod16.7%
add-sqr-sqrt38.3%
add-sqr-sqrt19.4%
sqrt-unprod58.1%
Applied egg-rr99.0%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ v (+ t1 u)))
(t_2 (* t1 (/ t_1 (- (- u) t1))))
(t_3 (* t_1 (+ (/ u t1) -1.0))))
(if (<= t1 -8e+104)
t_3
(if (<= t1 -2.55e-203)
t_2
(if (<= t1 1.36e-219)
(/ (* v (/ t1 u)) (- u))
(if (<= t1 1.2e+103) t_2 t_3))))))
double code(double u, double v, double t1) {
double t_1 = v / (t1 + u);
double t_2 = t1 * (t_1 / (-u - t1));
double t_3 = t_1 * ((u / t1) + -1.0);
double tmp;
if (t1 <= -8e+104) {
tmp = t_3;
} else if (t1 <= -2.55e-203) {
tmp = t_2;
} else if (t1 <= 1.36e-219) {
tmp = (v * (t1 / u)) / -u;
} else if (t1 <= 1.2e+103) {
tmp = t_2;
} else {
tmp = t_3;
}
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) :: t_3
real(8) :: tmp
t_1 = v / (t1 + u)
t_2 = t1 * (t_1 / (-u - t1))
t_3 = t_1 * ((u / t1) + (-1.0d0))
if (t1 <= (-8d+104)) then
tmp = t_3
else if (t1 <= (-2.55d-203)) then
tmp = t_2
else if (t1 <= 1.36d-219) then
tmp = (v * (t1 / u)) / -u
else if (t1 <= 1.2d+103) then
tmp = t_2
else
tmp = t_3
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = v / (t1 + u);
double t_2 = t1 * (t_1 / (-u - t1));
double t_3 = t_1 * ((u / t1) + -1.0);
double tmp;
if (t1 <= -8e+104) {
tmp = t_3;
} else if (t1 <= -2.55e-203) {
tmp = t_2;
} else if (t1 <= 1.36e-219) {
tmp = (v * (t1 / u)) / -u;
} else if (t1 <= 1.2e+103) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(u, v, t1): t_1 = v / (t1 + u) t_2 = t1 * (t_1 / (-u - t1)) t_3 = t_1 * ((u / t1) + -1.0) tmp = 0 if t1 <= -8e+104: tmp = t_3 elif t1 <= -2.55e-203: tmp = t_2 elif t1 <= 1.36e-219: tmp = (v * (t1 / u)) / -u elif t1 <= 1.2e+103: tmp = t_2 else: tmp = t_3 return tmp
function code(u, v, t1) t_1 = Float64(v / Float64(t1 + u)) t_2 = Float64(t1 * Float64(t_1 / Float64(Float64(-u) - t1))) t_3 = Float64(t_1 * Float64(Float64(u / t1) + -1.0)) tmp = 0.0 if (t1 <= -8e+104) tmp = t_3; elseif (t1 <= -2.55e-203) tmp = t_2; elseif (t1 <= 1.36e-219) tmp = Float64(Float64(v * Float64(t1 / u)) / Float64(-u)); elseif (t1 <= 1.2e+103) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(u, v, t1) t_1 = v / (t1 + u); t_2 = t1 * (t_1 / (-u - t1)); t_3 = t_1 * ((u / t1) + -1.0); tmp = 0.0; if (t1 <= -8e+104) tmp = t_3; elseif (t1 <= -2.55e-203) tmp = t_2; elseif (t1 <= 1.36e-219) tmp = (v * (t1 / u)) / -u; elseif (t1 <= 1.2e+103) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t1 * N[(t$95$1 / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 * N[(N[(u / t1), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -8e+104], t$95$3, If[LessEqual[t1, -2.55e-203], t$95$2, If[LessEqual[t1, 1.36e-219], N[(N[(v * N[(t1 / u), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision], If[LessEqual[t1, 1.2e+103], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{v}{t1 + u}\\
t_2 := t1 \cdot \frac{t\_1}{\left(-u\right) - t1}\\
t_3 := t\_1 \cdot \left(\frac{u}{t1} + -1\right)\\
\mathbf{if}\;t1 \leq -8 \cdot 10^{+104}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t1 \leq -2.55 \cdot 10^{-203}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t1 \leq 1.36 \cdot 10^{-219}:\\
\;\;\;\;\frac{v \cdot \frac{t1}{u}}{-u}\\
\mathbf{elif}\;t1 \leq 1.2 \cdot 10^{+103}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if t1 < -8e104 or 1.1999999999999999e103 < t1 Initial program 45.6%
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 94.8%
if -8e104 < t1 < -2.54999999999999992e-203 or 1.35999999999999997e-219 < t1 < 1.1999999999999999e103Initial program 89.1%
associate-/l*88.7%
distribute-lft-neg-out88.7%
distribute-rgt-neg-in88.7%
associate-/r*93.4%
distribute-neg-frac293.4%
Simplified93.4%
if -2.54999999999999992e-203 < t1 < 1.35999999999999997e-219Initial program 74.5%
times-frac91.9%
distribute-frac-neg91.9%
distribute-neg-frac291.9%
+-commutative91.9%
distribute-neg-in91.9%
unsub-neg91.9%
Simplified91.9%
Taylor expanded in t1 around 0 84.8%
associate-*r/84.8%
mul-1-neg84.8%
Simplified84.8%
Taylor expanded in t1 around 0 85.1%
associate-*r/91.1%
frac-2neg91.1%
add-sqr-sqrt67.6%
sqrt-unprod47.8%
sqr-neg47.8%
sqrt-unprod13.2%
add-sqr-sqrt47.0%
add-sqr-sqrt20.3%
sqrt-unprod56.2%
sqr-neg56.2%
sqrt-unprod47.4%
add-sqr-sqrt91.1%
Applied egg-rr91.1%
Final simplification93.4%
(FPCore (u v t1)
:precision binary64
(if (<= t1 -1.75e-42)
(* (/ t1 (+ t1 u)) (/ v (- t1)))
(if (<= t1 7.6e-125)
(/ (* v (/ t1 u)) (- u))
(/ v (* t1 (/ (- u t1) t1))))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1.75e-42) {
tmp = (t1 / (t1 + u)) * (v / -t1);
} else if (t1 <= 7.6e-125) {
tmp = (v * (t1 / u)) / -u;
} else {
tmp = v / (t1 * ((u - t1) / 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.75d-42)) then
tmp = (t1 / (t1 + u)) * (v / -t1)
else if (t1 <= 7.6d-125) then
tmp = (v * (t1 / u)) / -u
else
tmp = v / (t1 * ((u - t1) / t1))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1.75e-42) {
tmp = (t1 / (t1 + u)) * (v / -t1);
} else if (t1 <= 7.6e-125) {
tmp = (v * (t1 / u)) / -u;
} else {
tmp = v / (t1 * ((u - t1) / t1));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -1.75e-42: tmp = (t1 / (t1 + u)) * (v / -t1) elif t1 <= 7.6e-125: tmp = (v * (t1 / u)) / -u else: tmp = v / (t1 * ((u - t1) / t1)) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -1.75e-42) tmp = Float64(Float64(t1 / Float64(t1 + u)) * Float64(v / Float64(-t1))); elseif (t1 <= 7.6e-125) tmp = Float64(Float64(v * Float64(t1 / u)) / Float64(-u)); else tmp = Float64(v / Float64(t1 * Float64(Float64(u - t1) / t1))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -1.75e-42) tmp = (t1 / (t1 + u)) * (v / -t1); elseif (t1 <= 7.6e-125) tmp = (v * (t1 / u)) / -u; else tmp = v / (t1 * ((u - t1) / t1)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -1.75e-42], N[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(v / (-t1)), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 7.6e-125], N[(N[(v * N[(t1 / u), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision], N[(v / N[(t1 * N[(N[(u - t1), $MachinePrecision] / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.75 \cdot 10^{-42}:\\
\;\;\;\;\frac{t1}{t1 + u} \cdot \frac{v}{-t1}\\
\mathbf{elif}\;t1 \leq 7.6 \cdot 10^{-125}:\\
\;\;\;\;\frac{v \cdot \frac{t1}{u}}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{t1 \cdot \frac{u - t1}{t1}}\\
\end{array}
\end{array}
if t1 < -1.7500000000000001e-42Initial program 57.1%
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 82.9%
if -1.7500000000000001e-42 < t1 < 7.6000000000000002e-125Initial program 82.5%
times-frac94.6%
distribute-frac-neg94.6%
distribute-neg-frac294.6%
+-commutative94.6%
distribute-neg-in94.6%
unsub-neg94.6%
Simplified94.6%
Taylor expanded in t1 around 0 79.1%
associate-*r/79.1%
mul-1-neg79.1%
Simplified79.1%
Taylor expanded in t1 around 0 81.3%
associate-*r/84.8%
frac-2neg84.8%
add-sqr-sqrt57.2%
sqrt-unprod53.9%
sqr-neg53.9%
sqrt-unprod15.4%
add-sqr-sqrt44.2%
add-sqr-sqrt21.8%
sqrt-unprod57.8%
sqr-neg57.8%
sqrt-unprod40.9%
add-sqr-sqrt84.8%
Applied egg-rr84.8%
if 7.6000000000000002e-125 < t1 Initial program 71.5%
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 82.8%
clear-num84.1%
frac-times84.1%
*-un-lft-identity84.1%
add-sqr-sqrt36.5%
sqrt-unprod84.8%
sqr-neg84.8%
sqrt-unprod47.3%
add-sqr-sqrt83.9%
Applied egg-rr83.9%
Final simplification83.9%
(FPCore (u v t1)
:precision binary64
(if (<= t1 -1.1e-41)
(/ v (- (- u) t1))
(if (<= t1 4.2e-125)
(/ (* v (/ t1 u)) (- u))
(/ v (* t1 (/ (- u t1) t1))))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1.1e-41) {
tmp = v / (-u - t1);
} else if (t1 <= 4.2e-125) {
tmp = (v * (t1 / u)) / -u;
} else {
tmp = v / (t1 * ((u - t1) / 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.1d-41)) then
tmp = v / (-u - t1)
else if (t1 <= 4.2d-125) then
tmp = (v * (t1 / u)) / -u
else
tmp = v / (t1 * ((u - t1) / t1))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1.1e-41) {
tmp = v / (-u - t1);
} else if (t1 <= 4.2e-125) {
tmp = (v * (t1 / u)) / -u;
} else {
tmp = v / (t1 * ((u - t1) / t1));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -1.1e-41: tmp = v / (-u - t1) elif t1 <= 4.2e-125: tmp = (v * (t1 / u)) / -u else: tmp = v / (t1 * ((u - t1) / t1)) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -1.1e-41) tmp = Float64(v / Float64(Float64(-u) - t1)); elseif (t1 <= 4.2e-125) tmp = Float64(Float64(v * Float64(t1 / u)) / Float64(-u)); else tmp = Float64(v / Float64(t1 * Float64(Float64(u - t1) / t1))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -1.1e-41) tmp = v / (-u - t1); elseif (t1 <= 4.2e-125) tmp = (v * (t1 / u)) / -u; else tmp = v / (t1 * ((u - t1) / t1)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -1.1e-41], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 4.2e-125], N[(N[(v * N[(t1 / u), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision], N[(v / N[(t1 * N[(N[(u - t1), $MachinePrecision] / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.1 \cdot 10^{-41}:\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{elif}\;t1 \leq 4.2 \cdot 10^{-125}:\\
\;\;\;\;\frac{v \cdot \frac{t1}{u}}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{t1 \cdot \frac{u - t1}{t1}}\\
\end{array}
\end{array}
if t1 < -1.1e-41Initial program 57.1%
associate-/l*61.8%
distribute-lft-neg-out61.8%
distribute-rgt-neg-in61.8%
associate-/r*73.1%
distribute-neg-frac273.1%
Simplified73.1%
associate-*r/99.4%
+-commutative99.4%
distribute-neg-in99.4%
sub-neg99.4%
associate-*l/100.0%
frac-2neg100.0%
associate-*r/99.4%
sub-neg99.4%
distribute-neg-in99.4%
+-commutative99.4%
remove-double-neg99.4%
frac-2neg99.4%
add-sqr-sqrt99.1%
sqrt-unprod50.5%
sqr-neg50.5%
sqrt-unprod0.0%
add-sqr-sqrt33.6%
add-sqr-sqrt25.2%
sqrt-unprod38.0%
Applied egg-rr99.4%
Taylor expanded in t1 around inf 82.9%
mul-1-neg82.9%
Simplified82.9%
if -1.1e-41 < t1 < 4.2e-125Initial program 82.5%
times-frac94.6%
distribute-frac-neg94.6%
distribute-neg-frac294.6%
+-commutative94.6%
distribute-neg-in94.6%
unsub-neg94.6%
Simplified94.6%
Taylor expanded in t1 around 0 79.1%
associate-*r/79.1%
mul-1-neg79.1%
Simplified79.1%
Taylor expanded in t1 around 0 81.3%
associate-*r/84.8%
frac-2neg84.8%
add-sqr-sqrt57.2%
sqrt-unprod53.9%
sqr-neg53.9%
sqrt-unprod15.4%
add-sqr-sqrt44.2%
add-sqr-sqrt21.8%
sqrt-unprod57.8%
sqr-neg57.8%
sqrt-unprod40.9%
add-sqr-sqrt84.8%
Applied egg-rr84.8%
if 4.2e-125 < t1 Initial program 71.5%
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 82.8%
clear-num84.1%
frac-times84.1%
*-un-lft-identity84.1%
add-sqr-sqrt36.5%
sqrt-unprod84.8%
sqr-neg84.8%
sqrt-unprod47.3%
add-sqr-sqrt83.9%
Applied egg-rr83.9%
Final simplification83.9%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -5.2e-41) (not (<= t1 2.65e-27))) (/ v (- (- u) t1)) (/ (* v (/ t1 u)) (- u))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -5.2e-41) || !(t1 <= 2.65e-27)) {
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 <= (-5.2d-41)) .or. (.not. (t1 <= 2.65d-27))) 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 <= -5.2e-41) || !(t1 <= 2.65e-27)) {
tmp = v / (-u - t1);
} else {
tmp = (v * (t1 / u)) / -u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -5.2e-41) or not (t1 <= 2.65e-27): tmp = v / (-u - t1) else: tmp = (v * (t1 / u)) / -u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -5.2e-41) || !(t1 <= 2.65e-27)) tmp = Float64(v / Float64(Float64(-u) - t1)); else tmp = Float64(Float64(v * Float64(t1 / u)) / Float64(-u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -5.2e-41) || ~((t1 <= 2.65e-27))) tmp = v / (-u - t1); else tmp = (v * (t1 / u)) / -u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -5.2e-41], N[Not[LessEqual[t1, 2.65e-27]], $MachinePrecision]], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], N[(N[(v * N[(t1 / u), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -5.2 \cdot 10^{-41} \lor \neg \left(t1 \leq 2.65 \cdot 10^{-27}\right):\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v \cdot \frac{t1}{u}}{-u}\\
\end{array}
\end{array}
if t1 < -5.1999999999999999e-41 or 2.65000000000000003e-27 < t1 Initial program 62.4%
associate-/l*66.0%
distribute-lft-neg-out66.0%
distribute-rgt-neg-in66.0%
associate-/r*79.0%
distribute-neg-frac279.0%
Simplified79.0%
associate-*r/99.6%
+-commutative99.6%
distribute-neg-in99.6%
sub-neg99.6%
associate-*l/99.9%
frac-2neg99.9%
associate-*r/99.7%
sub-neg99.7%
distribute-neg-in99.7%
+-commutative99.7%
remove-double-neg99.7%
frac-2neg99.7%
add-sqr-sqrt52.4%
sqrt-unprod34.9%
sqr-neg34.9%
sqrt-unprod17.5%
add-sqr-sqrt35.3%
add-sqr-sqrt18.3%
sqrt-unprod54.8%
Applied egg-rr99.7%
Taylor expanded in t1 around inf 84.9%
mul-1-neg84.9%
Simplified84.9%
if -5.1999999999999999e-41 < t1 < 2.65000000000000003e-27Initial program 83.3%
times-frac95.1%
distribute-frac-neg95.1%
distribute-neg-frac295.1%
+-commutative95.1%
distribute-neg-in95.1%
unsub-neg95.1%
Simplified95.1%
Taylor expanded in t1 around 0 76.0%
associate-*r/76.0%
mul-1-neg76.0%
Simplified76.0%
Taylor expanded in t1 around 0 78.9%
associate-*r/82.1%
frac-2neg82.1%
add-sqr-sqrt51.8%
sqrt-unprod50.6%
sqr-neg50.6%
sqrt-unprod15.8%
add-sqr-sqrt41.9%
add-sqr-sqrt20.7%
sqrt-unprod55.1%
sqr-neg55.1%
sqrt-unprod39.7%
add-sqr-sqrt82.1%
Applied egg-rr82.1%
Final simplification83.6%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -2.75e-45) (not (<= t1 2.2e-28))) (/ v (- (- u) t1)) (/ (* t1 (/ v u)) (- u))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -2.75e-45) || !(t1 <= 2.2e-28)) {
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 <= (-2.75d-45)) .or. (.not. (t1 <= 2.2d-28))) 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 <= -2.75e-45) || !(t1 <= 2.2e-28)) {
tmp = v / (-u - t1);
} else {
tmp = (t1 * (v / u)) / -u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -2.75e-45) or not (t1 <= 2.2e-28): tmp = v / (-u - t1) else: tmp = (t1 * (v / u)) / -u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -2.75e-45) || !(t1 <= 2.2e-28)) tmp = Float64(v / Float64(Float64(-u) - t1)); else tmp = Float64(Float64(t1 * Float64(v / u)) / Float64(-u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -2.75e-45) || ~((t1 <= 2.2e-28))) tmp = v / (-u - t1); else tmp = (t1 * (v / u)) / -u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -2.75e-45], N[Not[LessEqual[t1, 2.2e-28]], $MachinePrecision]], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], N[(N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2.75 \cdot 10^{-45} \lor \neg \left(t1 \leq 2.2 \cdot 10^{-28}\right):\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{u}}{-u}\\
\end{array}
\end{array}
if t1 < -2.75000000000000015e-45 or 2.19999999999999996e-28 < t1 Initial program 62.4%
associate-/l*66.0%
distribute-lft-neg-out66.0%
distribute-rgt-neg-in66.0%
associate-/r*79.0%
distribute-neg-frac279.0%
Simplified79.0%
associate-*r/99.6%
+-commutative99.6%
distribute-neg-in99.6%
sub-neg99.6%
associate-*l/99.9%
frac-2neg99.9%
associate-*r/99.7%
sub-neg99.7%
distribute-neg-in99.7%
+-commutative99.7%
remove-double-neg99.7%
frac-2neg99.7%
add-sqr-sqrt52.4%
sqrt-unprod34.9%
sqr-neg34.9%
sqrt-unprod17.5%
add-sqr-sqrt35.3%
add-sqr-sqrt18.3%
sqrt-unprod54.8%
Applied egg-rr99.7%
Taylor expanded in t1 around inf 84.9%
mul-1-neg84.9%
Simplified84.9%
if -2.75000000000000015e-45 < t1 < 2.19999999999999996e-28Initial program 83.3%
times-frac95.1%
distribute-frac-neg95.1%
distribute-neg-frac295.1%
+-commutative95.1%
distribute-neg-in95.1%
unsub-neg95.1%
Simplified95.1%
Taylor expanded in t1 around 0 76.0%
associate-*r/76.0%
mul-1-neg76.0%
Simplified76.0%
Taylor expanded in t1 around 0 78.9%
associate-*l/80.5%
frac-2neg80.5%
add-sqr-sqrt50.9%
sqrt-unprod50.4%
sqr-neg50.4%
sqrt-unprod15.8%
add-sqr-sqrt41.8%
add-sqr-sqrt20.7%
sqrt-unprod55.0%
sqr-neg55.0%
sqrt-unprod38.9%
add-sqr-sqrt80.5%
Applied egg-rr80.5%
Final simplification82.9%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1.36e-40) (not (<= t1 2e-26))) (/ v (- (- u) t1)) (* (/ t1 u) (/ v (- u)))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.36e-40) || !(t1 <= 2e-26)) {
tmp = v / (-u - t1);
} else {
tmp = (t1 / u) * (v / -u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-1.36d-40)) .or. (.not. (t1 <= 2d-26))) then
tmp = v / (-u - t1)
else
tmp = (t1 / u) * (v / -u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.36e-40) || !(t1 <= 2e-26)) {
tmp = v / (-u - t1);
} else {
tmp = (t1 / u) * (v / -u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.36e-40) or not (t1 <= 2e-26): tmp = v / (-u - t1) else: tmp = (t1 / u) * (v / -u) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.36e-40) || !(t1 <= 2e-26)) tmp = Float64(v / Float64(Float64(-u) - t1)); else tmp = Float64(Float64(t1 / u) * Float64(v / Float64(-u))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -1.36e-40) || ~((t1 <= 2e-26))) tmp = v / (-u - t1); else tmp = (t1 / u) * (v / -u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.36e-40], N[Not[LessEqual[t1, 2e-26]], $MachinePrecision]], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], N[(N[(t1 / u), $MachinePrecision] * N[(v / (-u)), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.36 \cdot 10^{-40} \lor \neg \left(t1 \leq 2 \cdot 10^{-26}\right):\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{u} \cdot \frac{v}{-u}\\
\end{array}
\end{array}
if t1 < -1.3599999999999999e-40 or 2.0000000000000001e-26 < t1 Initial program 62.4%
associate-/l*66.0%
distribute-lft-neg-out66.0%
distribute-rgt-neg-in66.0%
associate-/r*79.0%
distribute-neg-frac279.0%
Simplified79.0%
associate-*r/99.6%
+-commutative99.6%
distribute-neg-in99.6%
sub-neg99.6%
associate-*l/99.9%
frac-2neg99.9%
associate-*r/99.7%
sub-neg99.7%
distribute-neg-in99.7%
+-commutative99.7%
remove-double-neg99.7%
frac-2neg99.7%
add-sqr-sqrt52.4%
sqrt-unprod34.9%
sqr-neg34.9%
sqrt-unprod17.5%
add-sqr-sqrt35.3%
add-sqr-sqrt18.3%
sqrt-unprod54.8%
Applied egg-rr99.7%
Taylor expanded in t1 around inf 84.9%
mul-1-neg84.9%
Simplified84.9%
if -1.3599999999999999e-40 < t1 < 2.0000000000000001e-26Initial program 83.3%
times-frac95.1%
distribute-frac-neg95.1%
distribute-neg-frac295.1%
+-commutative95.1%
distribute-neg-in95.1%
unsub-neg95.1%
Simplified95.1%
Taylor expanded in t1 around 0 76.0%
associate-*r/76.0%
mul-1-neg76.0%
Simplified76.0%
Taylor expanded in t1 around 0 78.9%
Final simplification82.2%
(FPCore (u v t1) :precision binary64 (if (or (<= u -4.5e+168) (not (<= u 1.6e+93))) (/ v (* u (/ u t1))) (/ v (- u t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -4.5e+168) || !(u <= 1.6e+93)) {
tmp = v / (u * (u / t1));
} else {
tmp = v / (u - t1);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-4.5d+168)) .or. (.not. (u <= 1.6d+93))) then
tmp = v / (u * (u / t1))
else
tmp = v / (u - t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -4.5e+168) || !(u <= 1.6e+93)) {
tmp = v / (u * (u / t1));
} else {
tmp = v / (u - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -4.5e+168) or not (u <= 1.6e+93): tmp = v / (u * (u / t1)) else: tmp = v / (u - t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -4.5e+168) || !(u <= 1.6e+93)) tmp = Float64(v / Float64(u * Float64(u / t1))); else tmp = Float64(v / Float64(u - t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -4.5e+168) || ~((u <= 1.6e+93))) tmp = v / (u * (u / t1)); else tmp = v / (u - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -4.5e+168], N[Not[LessEqual[u, 1.6e+93]], $MachinePrecision]], N[(v / N[(u * N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -4.5 \cdot 10^{+168} \lor \neg \left(u \leq 1.6 \cdot 10^{+93}\right):\\
\;\;\;\;\frac{v}{u \cdot \frac{u}{t1}}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u - t1}\\
\end{array}
\end{array}
if u < -4.50000000000000012e168 or 1.6000000000000001e93 < u Initial program 80.0%
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 0 84.8%
associate-*r/84.8%
mul-1-neg84.8%
Simplified84.8%
Taylor expanded in t1 around 0 85.1%
clear-num85.1%
frac-times75.0%
*-un-lft-identity75.0%
add-sqr-sqrt40.6%
sqrt-unprod68.7%
sqr-neg68.7%
sqrt-unprod34.0%
add-sqr-sqrt72.8%
Applied egg-rr72.8%
if -4.50000000000000012e168 < u < 1.6000000000000001e93Initial program 68.6%
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 inf 74.7%
clear-num73.2%
frac-times56.2%
*-commutative56.2%
*-un-lft-identity56.2%
add-sqr-sqrt31.8%
sqrt-unprod57.9%
sqr-neg57.9%
sqrt-unprod25.5%
add-sqr-sqrt56.6%
Applied egg-rr56.6%
associate-/l/71.2%
associate-/r/72.5%
*-rgt-identity72.5%
times-frac72.2%
*-inverses72.2%
/-rgt-identity72.2%
Simplified72.2%
Taylor expanded in v around 0 72.5%
Final simplification72.6%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1.22e-192) (not (<= t1 5.4e-216))) (/ v (- (- u) t1)) (/ v (* t1 (/ u t1)))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.22e-192) || !(t1 <= 5.4e-216)) {
tmp = v / (-u - t1);
} else {
tmp = v / (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 ((t1 <= (-1.22d-192)) .or. (.not. (t1 <= 5.4d-216))) then
tmp = v / (-u - t1)
else
tmp = v / (t1 * (u / t1))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.22e-192) || !(t1 <= 5.4e-216)) {
tmp = v / (-u - t1);
} else {
tmp = v / (t1 * (u / t1));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.22e-192) or not (t1 <= 5.4e-216): tmp = v / (-u - t1) else: tmp = v / (t1 * (u / t1)) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.22e-192) || !(t1 <= 5.4e-216)) tmp = Float64(v / Float64(Float64(-u) - t1)); else tmp = Float64(v / Float64(t1 * Float64(u / t1))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -1.22e-192) || ~((t1 <= 5.4e-216))) tmp = v / (-u - t1); else tmp = v / (t1 * (u / t1)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.22e-192], N[Not[LessEqual[t1, 5.4e-216]], $MachinePrecision]], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], N[(v / N[(t1 * N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.22 \cdot 10^{-192} \lor \neg \left(t1 \leq 5.4 \cdot 10^{-216}\right):\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{t1 \cdot \frac{u}{t1}}\\
\end{array}
\end{array}
if t1 < -1.22000000000000002e-192 or 5.3999999999999998e-216 < t1 Initial program 70.3%
associate-/l*72.3%
distribute-lft-neg-out72.3%
distribute-rgt-neg-in72.3%
associate-/r*83.6%
distribute-neg-frac283.6%
Simplified83.6%
associate-*r/99.2%
+-commutative99.2%
distribute-neg-in99.2%
sub-neg99.2%
associate-*l/99.4%
frac-2neg99.4%
associate-*r/99.7%
sub-neg99.7%
distribute-neg-in99.7%
+-commutative99.7%
remove-double-neg99.7%
frac-2neg99.7%
add-sqr-sqrt51.8%
sqrt-unprod43.5%
sqr-neg43.5%
sqrt-unprod17.6%
add-sqr-sqrt36.0%
add-sqr-sqrt18.2%
sqrt-unprod57.9%
Applied egg-rr99.7%
Taylor expanded in t1 around inf 75.1%
mul-1-neg75.1%
Simplified75.1%
if -1.22000000000000002e-192 < t1 < 5.3999999999999998e-216Initial program 77.9%
times-frac91.2%
distribute-frac-neg91.2%
distribute-neg-frac291.2%
+-commutative91.2%
distribute-neg-in91.2%
unsub-neg91.2%
Simplified91.2%
Taylor expanded in t1 around inf 37.1%
clear-num38.9%
frac-times54.4%
*-un-lft-identity54.4%
add-sqr-sqrt27.0%
sqrt-unprod58.5%
sqr-neg58.5%
sqrt-unprod31.4%
add-sqr-sqrt56.2%
Applied egg-rr56.2%
Taylor expanded in u around inf 47.6%
Final simplification69.4%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.35e+142) (not (<= u 2.9e+225))) (/ v (- u)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.35e+142) || !(u <= 2.9e+225)) {
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.35d+142)) .or. (.not. (u <= 2.9d+225))) 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.35e+142) || !(u <= 2.9e+225)) {
tmp = v / -u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.35e+142) or not (u <= 2.9e+225): tmp = v / -u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.35e+142) || !(u <= 2.9e+225)) 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 <= -1.35e+142) || ~((u <= 2.9e+225))) tmp = v / -u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.35e+142], N[Not[LessEqual[u, 2.9e+225]], $MachinePrecision]], N[(v / (-u)), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.35 \cdot 10^{+142} \lor \neg \left(u \leq 2.9 \cdot 10^{+225}\right):\\
\;\;\;\;\frac{v}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -1.34999999999999991e142 or 2.9000000000000001e225 < u Initial program 82.2%
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 67.4%
Taylor expanded in t1 around 0 53.1%
associate-*r/53.1%
mul-1-neg53.1%
Simplified53.1%
if -1.34999999999999991e142 < u < 2.9000000000000001e225Initial program 69.3%
associate-/l*71.3%
distribute-lft-neg-out71.3%
distribute-rgt-neg-in71.3%
associate-/r*81.9%
distribute-neg-frac281.9%
Simplified81.9%
Taylor expanded in t1 around inf 63.0%
associate-*r/63.0%
neg-mul-163.0%
Simplified63.0%
Final simplification61.1%
(FPCore (u v t1) :precision binary64 (if (or (<= u -2.9e+140) (not (<= u 7.5e+222))) (/ v u) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.9e+140) || !(u <= 7.5e+222)) {
tmp = v / u;
} else {
tmp = v / -t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-2.9d+140)) .or. (.not. (u <= 7.5d+222))) then
tmp = v / u
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.9e+140) || !(u <= 7.5e+222)) {
tmp = v / u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -2.9e+140) or not (u <= 7.5e+222): tmp = v / u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -2.9e+140) || !(u <= 7.5e+222)) tmp = Float64(v / u); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -2.9e+140) || ~((u <= 7.5e+222))) tmp = v / u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2.9e+140], N[Not[LessEqual[u, 7.5e+222]], $MachinePrecision]], N[(v / u), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.9 \cdot 10^{+140} \lor \neg \left(u \leq 7.5 \cdot 10^{+222}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -2.8999999999999999e140 or 7.50000000000000003e222 < u Initial program 82.2%
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 67.4%
clear-num69.3%
frac-times81.3%
*-un-lft-identity81.3%
add-sqr-sqrt56.4%
sqrt-unprod84.8%
sqr-neg84.8%
sqrt-unprod24.8%
add-sqr-sqrt81.2%
Applied egg-rr81.2%
Taylor expanded in u around inf 52.4%
if -2.8999999999999999e140 < u < 7.50000000000000003e222Initial program 69.3%
associate-/l*71.3%
distribute-lft-neg-out71.3%
distribute-rgt-neg-in71.3%
associate-/r*81.9%
distribute-neg-frac281.9%
Simplified81.9%
Taylor expanded in t1 around inf 63.0%
associate-*r/63.0%
neg-mul-163.0%
Simplified63.0%
Final simplification61.0%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1.25e+83) (not (<= t1 9e+126))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.25e+83) || !(t1 <= 9e+126)) {
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.25d+83)) .or. (.not. (t1 <= 9d+126))) 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.25e+83) || !(t1 <= 9e+126)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.25e+83) or not (t1 <= 9e+126): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.25e+83) || !(t1 <= 9e+126)) 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.25e+83) || ~((t1 <= 9e+126))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.25e+83], N[Not[LessEqual[t1, 9e+126]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.25 \cdot 10^{+83} \lor \neg \left(t1 \leq 9 \cdot 10^{+126}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -1.25000000000000007e83 or 8.99999999999999947e126 < t1 Initial program 44.4%
times-frac100.0%
distribute-frac-neg100.0%
distribute-neg-frac2100.0%
+-commutative100.0%
distribute-neg-in100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in t1 around inf 91.3%
Taylor expanded in u around inf 34.5%
if -1.25000000000000007e83 < t1 < 8.99999999999999947e126Initial program 85.7%
times-frac96.6%
distribute-frac-neg96.6%
distribute-neg-frac296.6%
+-commutative96.6%
distribute-neg-in96.6%
unsub-neg96.6%
Simplified96.6%
Taylor expanded in t1 around inf 57.3%
clear-num58.9%
frac-times66.2%
*-un-lft-identity66.2%
add-sqr-sqrt33.6%
sqrt-unprod70.9%
sqr-neg70.9%
sqrt-unprod33.8%
add-sqr-sqrt66.6%
Applied egg-rr66.6%
Taylor expanded in u around inf 20.2%
Final simplification25.0%
(FPCore (u v t1) :precision binary64 (* (/ t1 (+ t1 u)) (/ v (- (- u) t1))))
double code(double u, double v, double t1) {
return (t1 / (t1 + u)) * (v / (-u - t1));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (t1 / (t1 + u)) * (v / (-u - t1))
end function
public static double code(double u, double v, double t1) {
return (t1 / (t1 + u)) * (v / (-u - t1));
}
def code(u, v, t1): return (t1 / (t1 + u)) * (v / (-u - t1))
function code(u, v, t1) return Float64(Float64(t1 / Float64(t1 + u)) * Float64(v / Float64(Float64(-u) - t1))) end
function tmp = code(u, v, t1) tmp = (t1 / (t1 + u)) * (v / (-u - t1)); end
code[u_, v_, t1_] := N[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{t1}{t1 + u} \cdot \frac{v}{\left(-u\right) - t1}
\end{array}
Initial program 71.9%
times-frac97.7%
distribute-frac-neg97.7%
distribute-neg-frac297.7%
+-commutative97.7%
distribute-neg-in97.7%
unsub-neg97.7%
Simplified97.7%
Final simplification97.7%
(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 71.9%
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 68.3%
clear-num67.3%
frac-times52.1%
*-commutative52.1%
*-un-lft-identity52.1%
add-sqr-sqrt27.4%
sqrt-unprod55.9%
sqr-neg55.9%
sqrt-unprod25.4%
add-sqr-sqrt52.3%
Applied egg-rr52.3%
associate-/l/63.3%
associate-/r/64.3%
*-rgt-identity64.3%
times-frac64.1%
*-inverses64.1%
/-rgt-identity64.1%
Simplified64.1%
Taylor expanded in v around 0 64.3%
(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.9%
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 58.7%
Taylor expanded in u around inf 13.7%
herbie shell --seed 2024105
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))