
(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 (/ (* 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(t1 * Float64(Float64(-v) / 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 * N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{t1 \cdot \frac{-v}{t1 + u}}{t1 + u}
\end{array}
Initial program 73.7%
associate-/r*83.0%
associate-/l*97.8%
Simplified97.8%
div-inv97.5%
clear-num98.1%
add-sqr-sqrt50.3%
sqrt-unprod46.0%
sqr-neg46.0%
sqrt-unprod18.2%
add-sqr-sqrt35.1%
distribute-lft-neg-in35.1%
distribute-rgt-neg-in35.1%
add-sqr-sqrt18.2%
sqrt-unprod46.0%
sqr-neg46.0%
sqrt-unprod50.3%
add-sqr-sqrt98.1%
Applied egg-rr98.1%
Final simplification98.1%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (* v (/ (- t1) (* (+ t1 u) (+ t1 u))))))
(if (<= u -4.5e+177)
(/ t1 (* (+ t1 u) (/ (- u) v)))
(if (<= u -4.8e-127)
t_1
(if (<= u 8.5e-162)
(/ (- v) t1)
(if (<= u 7.2e+103) t_1 (/ (/ t1 (+ t1 u)) (/ (- t1 u) v))))))))
double code(double u, double v, double t1) {
double t_1 = v * (-t1 / ((t1 + u) * (t1 + u)));
double tmp;
if (u <= -4.5e+177) {
tmp = t1 / ((t1 + u) * (-u / v));
} else if (u <= -4.8e-127) {
tmp = t_1;
} else if (u <= 8.5e-162) {
tmp = -v / t1;
} else if (u <= 7.2e+103) {
tmp = t_1;
} else {
tmp = (t1 / (t1 + u)) / ((t1 - u) / v);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: t_1
real(8) :: tmp
t_1 = v * (-t1 / ((t1 + u) * (t1 + u)))
if (u <= (-4.5d+177)) then
tmp = t1 / ((t1 + u) * (-u / v))
else if (u <= (-4.8d-127)) then
tmp = t_1
else if (u <= 8.5d-162) then
tmp = -v / t1
else if (u <= 7.2d+103) then
tmp = t_1
else
tmp = (t1 / (t1 + u)) / ((t1 - u) / v)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = v * (-t1 / ((t1 + u) * (t1 + u)));
double tmp;
if (u <= -4.5e+177) {
tmp = t1 / ((t1 + u) * (-u / v));
} else if (u <= -4.8e-127) {
tmp = t_1;
} else if (u <= 8.5e-162) {
tmp = -v / t1;
} else if (u <= 7.2e+103) {
tmp = t_1;
} else {
tmp = (t1 / (t1 + u)) / ((t1 - u) / v);
}
return tmp;
}
def code(u, v, t1): t_1 = v * (-t1 / ((t1 + u) * (t1 + u))) tmp = 0 if u <= -4.5e+177: tmp = t1 / ((t1 + u) * (-u / v)) elif u <= -4.8e-127: tmp = t_1 elif u <= 8.5e-162: tmp = -v / t1 elif u <= 7.2e+103: tmp = t_1 else: tmp = (t1 / (t1 + u)) / ((t1 - u) / v) return tmp
function code(u, v, t1) t_1 = Float64(v * Float64(Float64(-t1) / Float64(Float64(t1 + u) * Float64(t1 + u)))) tmp = 0.0 if (u <= -4.5e+177) tmp = Float64(t1 / Float64(Float64(t1 + u) * Float64(Float64(-u) / v))); elseif (u <= -4.8e-127) tmp = t_1; elseif (u <= 8.5e-162) tmp = Float64(Float64(-v) / t1); elseif (u <= 7.2e+103) tmp = t_1; else tmp = Float64(Float64(t1 / Float64(t1 + u)) / Float64(Float64(t1 - u) / v)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = v * (-t1 / ((t1 + u) * (t1 + u))); tmp = 0.0; if (u <= -4.5e+177) tmp = t1 / ((t1 + u) * (-u / v)); elseif (u <= -4.8e-127) tmp = t_1; elseif (u <= 8.5e-162) tmp = -v / t1; elseif (u <= 7.2e+103) tmp = t_1; else tmp = (t1 / (t1 + u)) / ((t1 - u) / v); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(v * N[((-t1) / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[u, -4.5e+177], N[(t1 / N[(N[(t1 + u), $MachinePrecision] * N[((-u) / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, -4.8e-127], t$95$1, If[LessEqual[u, 8.5e-162], N[((-v) / t1), $MachinePrecision], If[LessEqual[u, 7.2e+103], t$95$1, N[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[(N[(t1 - u), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := v \cdot \frac{-t1}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\
\mathbf{if}\;u \leq -4.5 \cdot 10^{+177}:\\
\;\;\;\;\frac{t1}{\left(t1 + u\right) \cdot \frac{-u}{v}}\\
\mathbf{elif}\;u \leq -4.8 \cdot 10^{-127}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;u \leq 8.5 \cdot 10^{-162}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{elif}\;u \leq 7.2 \cdot 10^{+103}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t1}{t1 + u}}{\frac{t1 - u}{v}}\\
\end{array}
\end{array}
if u < -4.4999999999999997e177Initial program 67.9%
associate-*l/68.3%
*-commutative68.3%
Simplified68.3%
associate-/r*77.5%
associate-*r/97.1%
*-commutative97.1%
associate-/r/99.8%
div-inv99.6%
frac-2neg99.6%
frac-times96.9%
remove-double-neg96.9%
*-commutative96.9%
*-un-lft-identity96.9%
distribute-neg-frac96.9%
distribute-neg-in96.9%
add-sqr-sqrt41.9%
sqrt-unprod93.8%
sqr-neg93.8%
sqrt-unprod54.6%
add-sqr-sqrt96.6%
sub-neg96.6%
Applied egg-rr96.6%
Taylor expanded in t1 around 0 96.6%
neg-mul-196.6%
distribute-neg-frac96.6%
Simplified96.6%
if -4.4999999999999997e177 < u < -4.79999999999999964e-127 or 8.49999999999999955e-162 < u < 7.20000000000000033e103Initial program 77.1%
associate-*l/87.1%
*-commutative87.1%
Simplified87.1%
if -4.79999999999999964e-127 < u < 8.49999999999999955e-162Initial program 68.3%
associate-*l/71.5%
*-commutative71.5%
Simplified71.5%
Taylor expanded in t1 around inf 91.3%
associate-*r/91.3%
neg-mul-191.3%
Simplified91.3%
if 7.20000000000000033e103 < u Initial program 78.4%
associate-*l/73.6%
*-commutative73.6%
Simplified73.6%
associate-/r*80.5%
associate-*r/98.7%
*-commutative98.7%
associate-/r/98.6%
div-inv98.7%
clear-num98.6%
associate-/r/98.6%
clear-num99.8%
*-commutative99.8%
clear-num98.6%
div-inv98.7%
frac-2neg98.7%
remove-double-neg98.7%
associate-*l/97.6%
Applied egg-rr95.2%
Final simplification90.7%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ (- v) (+ t1 u))) (t_2 (/ t1 (- (/ u (/ v u))))))
(if (<= t1 -190000000.0)
t_1
(if (<= t1 -6.2e-47)
t_2
(if (<= t1 -8e-77)
t_1
(if (<= t1 -1.25e-152)
t_2
(if (<= t1 7.5e-17) (* v (- (/ (/ t1 u) u))) t_1)))))))
double code(double u, double v, double t1) {
double t_1 = -v / (t1 + u);
double t_2 = t1 / -(u / (v / u));
double tmp;
if (t1 <= -190000000.0) {
tmp = t_1;
} else if (t1 <= -6.2e-47) {
tmp = t_2;
} else if (t1 <= -8e-77) {
tmp = t_1;
} else if (t1 <= -1.25e-152) {
tmp = t_2;
} else if (t1 <= 7.5e-17) {
tmp = v * -((t1 / u) / u);
} else {
tmp = t_1;
}
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 / (t1 + u)
t_2 = t1 / -(u / (v / u))
if (t1 <= (-190000000.0d0)) then
tmp = t_1
else if (t1 <= (-6.2d-47)) then
tmp = t_2
else if (t1 <= (-8d-77)) then
tmp = t_1
else if (t1 <= (-1.25d-152)) then
tmp = t_2
else if (t1 <= 7.5d-17) then
tmp = v * -((t1 / u) / u)
else
tmp = t_1
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 / -(u / (v / u));
double tmp;
if (t1 <= -190000000.0) {
tmp = t_1;
} else if (t1 <= -6.2e-47) {
tmp = t_2;
} else if (t1 <= -8e-77) {
tmp = t_1;
} else if (t1 <= -1.25e-152) {
tmp = t_2;
} else if (t1 <= 7.5e-17) {
tmp = v * -((t1 / u) / u);
} else {
tmp = t_1;
}
return tmp;
}
def code(u, v, t1): t_1 = -v / (t1 + u) t_2 = t1 / -(u / (v / u)) tmp = 0 if t1 <= -190000000.0: tmp = t_1 elif t1 <= -6.2e-47: tmp = t_2 elif t1 <= -8e-77: tmp = t_1 elif t1 <= -1.25e-152: tmp = t_2 elif t1 <= 7.5e-17: tmp = v * -((t1 / u) / u) else: tmp = t_1 return tmp
function code(u, v, t1) t_1 = Float64(Float64(-v) / Float64(t1 + u)) t_2 = Float64(t1 / Float64(-Float64(u / Float64(v / u)))) tmp = 0.0 if (t1 <= -190000000.0) tmp = t_1; elseif (t1 <= -6.2e-47) tmp = t_2; elseif (t1 <= -8e-77) tmp = t_1; elseif (t1 <= -1.25e-152) tmp = t_2; elseif (t1 <= 7.5e-17) tmp = Float64(v * Float64(-Float64(Float64(t1 / u) / u))); else tmp = t_1; end return tmp end
function tmp_2 = code(u, v, t1) t_1 = -v / (t1 + u); t_2 = t1 / -(u / (v / u)); tmp = 0.0; if (t1 <= -190000000.0) tmp = t_1; elseif (t1 <= -6.2e-47) tmp = t_2; elseif (t1 <= -8e-77) tmp = t_1; elseif (t1 <= -1.25e-152) tmp = t_2; elseif (t1 <= 7.5e-17) tmp = v * -((t1 / u) / u); else tmp = t_1; 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[(u / N[(v / u), $MachinePrecision]), $MachinePrecision])), $MachinePrecision]}, If[LessEqual[t1, -190000000.0], t$95$1, If[LessEqual[t1, -6.2e-47], t$95$2, If[LessEqual[t1, -8e-77], t$95$1, If[LessEqual[t1, -1.25e-152], t$95$2, If[LessEqual[t1, 7.5e-17], N[(v * (-N[(N[(t1 / u), $MachinePrecision] / u), $MachinePrecision])), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-v}{t1 + u}\\
t_2 := \frac{t1}{-\frac{u}{\frac{v}{u}}}\\
\mathbf{if}\;t1 \leq -190000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t1 \leq -6.2 \cdot 10^{-47}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t1 \leq -8 \cdot 10^{-77}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t1 \leq -1.25 \cdot 10^{-152}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t1 \leq 7.5 \cdot 10^{-17}:\\
\;\;\;\;v \cdot \left(-\frac{\frac{t1}{u}}{u}\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t1 < -1.9e8 or -6.1999999999999996e-47 < t1 < -7.9999999999999994e-77 or 7.49999999999999984e-17 < t1 Initial program 68.8%
associate-/r*79.3%
associate-/l*99.1%
Simplified99.1%
Taylor expanded in t1 around inf 83.8%
neg-mul-183.8%
Simplified83.8%
if -1.9e8 < t1 < -6.1999999999999996e-47 or -7.9999999999999994e-77 < t1 < -1.2499999999999999e-152Initial program 74.6%
associate-*l/80.9%
*-commutative80.9%
Simplified80.9%
associate-/r*80.8%
associate-*r/97.8%
*-commutative97.8%
associate-/r/99.4%
div-inv99.3%
frac-2neg99.3%
frac-times99.5%
remove-double-neg99.5%
*-commutative99.5%
*-un-lft-identity99.5%
distribute-neg-frac99.5%
distribute-neg-in99.5%
add-sqr-sqrt99.4%
sqrt-unprod99.5%
sqr-neg99.5%
sqrt-unprod0.0%
add-sqr-sqrt83.2%
sub-neg83.2%
Applied egg-rr83.2%
Taylor expanded in t1 around 0 71.0%
mul-1-neg71.0%
unpow271.0%
associate-/l*84.6%
distribute-neg-frac84.6%
Simplified84.6%
if -1.2499999999999999e-152 < t1 < 7.49999999999999984e-17Initial program 81.1%
associate-/r*87.5%
associate-/l*95.4%
Simplified95.4%
div-inv94.7%
clear-num94.8%
add-sqr-sqrt60.6%
sqrt-unprod62.2%
sqr-neg62.2%
sqrt-unprod14.8%
add-sqr-sqrt38.7%
distribute-lft-neg-in38.7%
distribute-rgt-neg-in38.7%
add-sqr-sqrt14.8%
sqrt-unprod62.2%
sqr-neg62.2%
sqrt-unprod60.6%
add-sqr-sqrt94.8%
Applied egg-rr94.8%
Taylor expanded in t1 around 0 74.9%
mul-1-neg74.9%
associate-*l/79.0%
unpow279.0%
*-commutative79.0%
distribute-lft-neg-in79.0%
associate-/r*84.8%
Simplified84.8%
Final simplification84.3%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ (- v) (+ t1 u))) (t_2 (/ (- (* t1 (/ v u))) u)))
(if (<= t1 -4e+33)
t_1
(if (<= t1 -6e-47)
t_2
(if (<= t1 -7.4e-77)
t_1
(if (<= t1 3.2e-17) t_2 (* (/ (- v) t1) (/ t1 (+ t1 u)))))))))
double code(double u, double v, double t1) {
double t_1 = -v / (t1 + u);
double t_2 = -(t1 * (v / u)) / u;
double tmp;
if (t1 <= -4e+33) {
tmp = t_1;
} else if (t1 <= -6e-47) {
tmp = t_2;
} else if (t1 <= -7.4e-77) {
tmp = t_1;
} else if (t1 <= 3.2e-17) {
tmp = t_2;
} else {
tmp = (-v / t1) * (t1 / (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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = -v / (t1 + u)
t_2 = -(t1 * (v / u)) / u
if (t1 <= (-4d+33)) then
tmp = t_1
else if (t1 <= (-6d-47)) then
tmp = t_2
else if (t1 <= (-7.4d-77)) then
tmp = t_1
else if (t1 <= 3.2d-17) then
tmp = t_2
else
tmp = (-v / t1) * (t1 / (t1 + u))
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 * (v / u)) / u;
double tmp;
if (t1 <= -4e+33) {
tmp = t_1;
} else if (t1 <= -6e-47) {
tmp = t_2;
} else if (t1 <= -7.4e-77) {
tmp = t_1;
} else if (t1 <= 3.2e-17) {
tmp = t_2;
} else {
tmp = (-v / t1) * (t1 / (t1 + u));
}
return tmp;
}
def code(u, v, t1): t_1 = -v / (t1 + u) t_2 = -(t1 * (v / u)) / u tmp = 0 if t1 <= -4e+33: tmp = t_1 elif t1 <= -6e-47: tmp = t_2 elif t1 <= -7.4e-77: tmp = t_1 elif t1 <= 3.2e-17: tmp = t_2 else: tmp = (-v / t1) * (t1 / (t1 + u)) return tmp
function code(u, v, t1) t_1 = Float64(Float64(-v) / Float64(t1 + u)) t_2 = Float64(Float64(-Float64(t1 * Float64(v / u))) / u) tmp = 0.0 if (t1 <= -4e+33) tmp = t_1; elseif (t1 <= -6e-47) tmp = t_2; elseif (t1 <= -7.4e-77) tmp = t_1; elseif (t1 <= 3.2e-17) tmp = t_2; else tmp = Float64(Float64(Float64(-v) / t1) * Float64(t1 / Float64(t1 + u))); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = -v / (t1 + u); t_2 = -(t1 * (v / u)) / u; tmp = 0.0; if (t1 <= -4e+33) tmp = t_1; elseif (t1 <= -6e-47) tmp = t_2; elseif (t1 <= -7.4e-77) tmp = t_1; elseif (t1 <= 3.2e-17) tmp = t_2; else tmp = (-v / t1) * (t1 / (t1 + u)); 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[((-N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision]) / u), $MachinePrecision]}, If[LessEqual[t1, -4e+33], t$95$1, If[LessEqual[t1, -6e-47], t$95$2, If[LessEqual[t1, -7.4e-77], t$95$1, If[LessEqual[t1, 3.2e-17], t$95$2, N[(N[((-v) / t1), $MachinePrecision] * N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-v}{t1 + u}\\
t_2 := \frac{-t1 \cdot \frac{v}{u}}{u}\\
\mathbf{if}\;t1 \leq -4 \cdot 10^{+33}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t1 \leq -6 \cdot 10^{-47}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t1 \leq -7.4 \cdot 10^{-77}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t1 \leq 3.2 \cdot 10^{-17}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1} \cdot \frac{t1}{t1 + u}\\
\end{array}
\end{array}
if t1 < -3.9999999999999998e33 or -6.00000000000000033e-47 < t1 < -7.39999999999999992e-77Initial program 70.5%
associate-/r*79.9%
associate-/l*98.4%
Simplified98.4%
Taylor expanded in t1 around inf 90.6%
neg-mul-190.6%
Simplified90.6%
if -3.9999999999999998e33 < t1 < -6.00000000000000033e-47 or -7.39999999999999992e-77 < t1 < 3.2000000000000002e-17Initial program 79.7%
associate-/r*88.0%
associate-/l*96.3%
Simplified96.3%
Taylor expanded in t1 around 0 93.8%
+-commutative93.8%
Simplified93.8%
Taylor expanded in t1 around 0 71.0%
unpow271.0%
associate-/r*78.6%
associate-*l/83.4%
associate-*r/83.4%
neg-mul-183.4%
distribute-rgt-neg-in83.4%
associate-*l/78.6%
associate-*r/82.1%
Simplified82.1%
if 3.2000000000000002e-17 < t1 Initial program 67.0%
associate-*l/72.8%
*-commutative72.8%
Simplified72.8%
associate-/r*94.8%
associate-*r/99.8%
*-commutative99.8%
associate-/r/99.6%
div-inv99.5%
frac-2neg99.5%
frac-times81.9%
remove-double-neg81.9%
*-commutative81.9%
*-un-lft-identity81.9%
distribute-neg-frac81.9%
distribute-neg-in81.9%
add-sqr-sqrt0.0%
sqrt-unprod43.8%
sqr-neg43.8%
sqrt-unprod44.9%
add-sqr-sqrt44.9%
sub-neg44.9%
Applied egg-rr44.9%
Taylor expanded in t1 around inf 29.6%
frac-2neg29.6%
neg-sub029.6%
div-sub29.6%
Applied egg-rr79.8%
div079.8%
neg-sub079.8%
distribute-lft-neg-in79.8%
distribute-frac-neg79.8%
Simplified79.8%
Final simplification83.5%
(FPCore (u v t1)
:precision binary64
(if (or (<= t1 -16000000.0)
(not
(or (<= t1 -7.8e-47) (and (not (<= t1 -8e-77)) (<= t1 2.1e-16)))))
(/ (- v) (+ t1 u))
(* t1 (/ v (* u (- u))))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -16000000.0) || !((t1 <= -7.8e-47) || (!(t1 <= -8e-77) && (t1 <= 2.1e-16)))) {
tmp = -v / (t1 + u);
} 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 <= (-16000000.0d0)) .or. (.not. (t1 <= (-7.8d-47)) .or. (.not. (t1 <= (-8d-77))) .and. (t1 <= 2.1d-16))) then
tmp = -v / (t1 + u)
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 <= -16000000.0) || !((t1 <= -7.8e-47) || (!(t1 <= -8e-77) && (t1 <= 2.1e-16)))) {
tmp = -v / (t1 + u);
} else {
tmp = t1 * (v / (u * -u));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -16000000.0) or not ((t1 <= -7.8e-47) or (not (t1 <= -8e-77) and (t1 <= 2.1e-16))): tmp = -v / (t1 + u) else: tmp = t1 * (v / (u * -u)) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -16000000.0) || !((t1 <= -7.8e-47) || (!(t1 <= -8e-77) && (t1 <= 2.1e-16)))) tmp = Float64(Float64(-v) / Float64(t1 + u)); else tmp = Float64(t1 * Float64(v / Float64(u * Float64(-u)))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -16000000.0) || ~(((t1 <= -7.8e-47) || (~((t1 <= -8e-77)) && (t1 <= 2.1e-16))))) tmp = -v / (t1 + u); else tmp = t1 * (v / (u * -u)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -16000000.0], N[Not[Or[LessEqual[t1, -7.8e-47], And[N[Not[LessEqual[t1, -8e-77]], $MachinePrecision], LessEqual[t1, 2.1e-16]]]], $MachinePrecision]], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision], N[(t1 * N[(v / N[(u * (-u)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -16000000 \lor \neg \left(t1 \leq -7.8 \cdot 10^{-47} \lor \neg \left(t1 \leq -8 \cdot 10^{-77}\right) \land t1 \leq 2.1 \cdot 10^{-16}\right):\\
\;\;\;\;\frac{-v}{t1 + u}\\
\mathbf{else}:\\
\;\;\;\;t1 \cdot \frac{v}{u \cdot \left(-u\right)}\\
\end{array}
\end{array}
if t1 < -1.6e7 or -7.79999999999999956e-47 < t1 < -7.9999999999999994e-77 or 2.1000000000000001e-16 < t1 Initial program 68.8%
associate-/r*79.3%
associate-/l*99.1%
Simplified99.1%
Taylor expanded in t1 around inf 83.8%
neg-mul-183.8%
Simplified83.8%
if -1.6e7 < t1 < -7.79999999999999956e-47 or -7.9999999999999994e-77 < t1 < 2.1000000000000001e-16Initial program 79.7%
Taylor expanded in t1 around 0 72.4%
unpow272.4%
Simplified72.4%
frac-2neg72.4%
div-inv72.4%
distribute-lft-neg-out72.4%
remove-double-neg72.4%
distribute-rgt-neg-in72.4%
Applied egg-rr72.4%
associate-*l*72.3%
associate-*r/72.3%
*-rgt-identity72.3%
Simplified72.3%
Final simplification78.7%
(FPCore (u v t1)
:precision binary64
(if (or (<= t1 -7.6e+36)
(not (or (<= t1 -7e-47) (and (not (<= t1 -8e-77)) (<= t1 1.3e-16)))))
(/ (- v) (+ t1 u))
(/ (- (* t1 (/ v u))) u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -7.6e+36) || !((t1 <= -7e-47) || (!(t1 <= -8e-77) && (t1 <= 1.3e-16)))) {
tmp = -v / (t1 + u);
} 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 <= (-7.6d+36)) .or. (.not. (t1 <= (-7d-47)) .or. (.not. (t1 <= (-8d-77))) .and. (t1 <= 1.3d-16))) then
tmp = -v / (t1 + u)
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 <= -7.6e+36) || !((t1 <= -7e-47) || (!(t1 <= -8e-77) && (t1 <= 1.3e-16)))) {
tmp = -v / (t1 + u);
} else {
tmp = -(t1 * (v / u)) / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -7.6e+36) or not ((t1 <= -7e-47) or (not (t1 <= -8e-77) and (t1 <= 1.3e-16))): tmp = -v / (t1 + u) else: tmp = -(t1 * (v / u)) / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -7.6e+36) || !((t1 <= -7e-47) || (!(t1 <= -8e-77) && (t1 <= 1.3e-16)))) tmp = Float64(Float64(-v) / Float64(t1 + u)); else tmp = Float64(Float64(-Float64(t1 * Float64(v / u))) / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -7.6e+36) || ~(((t1 <= -7e-47) || (~((t1 <= -8e-77)) && (t1 <= 1.3e-16))))) tmp = -v / (t1 + u); else tmp = -(t1 * (v / u)) / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -7.6e+36], N[Not[Or[LessEqual[t1, -7e-47], And[N[Not[LessEqual[t1, -8e-77]], $MachinePrecision], LessEqual[t1, 1.3e-16]]]], $MachinePrecision]], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision], N[((-N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision]) / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -7.6 \cdot 10^{+36} \lor \neg \left(t1 \leq -7 \cdot 10^{-47} \lor \neg \left(t1 \leq -8 \cdot 10^{-77}\right) \land t1 \leq 1.3 \cdot 10^{-16}\right):\\
\;\;\;\;\frac{-v}{t1 + u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-t1 \cdot \frac{v}{u}}{u}\\
\end{array}
\end{array}
if t1 < -7.6000000000000005e36 or -6.9999999999999996e-47 < t1 < -7.9999999999999994e-77 or 1.2999999999999999e-16 < t1 Initial program 68.6%
associate-/r*78.7%
associate-/l*99.1%
Simplified99.1%
Taylor expanded in t1 around inf 84.8%
neg-mul-184.8%
Simplified84.8%
if -7.6000000000000005e36 < t1 < -6.9999999999999996e-47 or -7.9999999999999994e-77 < t1 < 1.2999999999999999e-16Initial program 79.7%
associate-/r*88.0%
associate-/l*96.3%
Simplified96.3%
Taylor expanded in t1 around 0 93.8%
+-commutative93.8%
Simplified93.8%
Taylor expanded in t1 around 0 71.0%
unpow271.0%
associate-/r*78.6%
associate-*l/83.4%
associate-*r/83.4%
neg-mul-183.4%
distribute-rgt-neg-in83.4%
associate-*l/78.6%
associate-*r/82.1%
Simplified82.1%
Final simplification83.5%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ (- v) (+ t1 u))))
(if (<= t1 -25500000.0)
t_1
(if (<= t1 -6.1e-47)
(* t1 (/ v (* u (- u))))
(if (or (<= t1 -8e-77) (not (<= t1 9.5e-17)))
t_1
(* (- v) (/ t1 (* u u))))))))
double code(double u, double v, double t1) {
double t_1 = -v / (t1 + u);
double tmp;
if (t1 <= -25500000.0) {
tmp = t_1;
} else if (t1 <= -6.1e-47) {
tmp = t1 * (v / (u * -u));
} else if ((t1 <= -8e-77) || !(t1 <= 9.5e-17)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = -v / (t1 + u)
if (t1 <= (-25500000.0d0)) then
tmp = t_1
else if (t1 <= (-6.1d-47)) then
tmp = t1 * (v / (u * -u))
else if ((t1 <= (-8d-77)) .or. (.not. (t1 <= 9.5d-17))) then
tmp = t_1
else
tmp = -v * (t1 / (u * u))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = -v / (t1 + u);
double tmp;
if (t1 <= -25500000.0) {
tmp = t_1;
} else if (t1 <= -6.1e-47) {
tmp = t1 * (v / (u * -u));
} else if ((t1 <= -8e-77) || !(t1 <= 9.5e-17)) {
tmp = t_1;
} else {
tmp = -v * (t1 / (u * u));
}
return tmp;
}
def code(u, v, t1): t_1 = -v / (t1 + u) tmp = 0 if t1 <= -25500000.0: tmp = t_1 elif t1 <= -6.1e-47: tmp = t1 * (v / (u * -u)) elif (t1 <= -8e-77) or not (t1 <= 9.5e-17): tmp = t_1 else: tmp = -v * (t1 / (u * u)) return tmp
function code(u, v, t1) t_1 = Float64(Float64(-v) / Float64(t1 + u)) tmp = 0.0 if (t1 <= -25500000.0) tmp = t_1; elseif (t1 <= -6.1e-47) tmp = Float64(t1 * Float64(v / Float64(u * Float64(-u)))); elseif ((t1 <= -8e-77) || !(t1 <= 9.5e-17)) tmp = t_1; else tmp = Float64(Float64(-v) * Float64(t1 / Float64(u * u))); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = -v / (t1 + u); tmp = 0.0; if (t1 <= -25500000.0) tmp = t_1; elseif (t1 <= -6.1e-47) tmp = t1 * (v / (u * -u)); elseif ((t1 <= -8e-77) || ~((t1 <= 9.5e-17))) tmp = t_1; else tmp = -v * (t1 / (u * u)); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -25500000.0], t$95$1, If[LessEqual[t1, -6.1e-47], N[(t1 * N[(v / N[(u * (-u)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t1, -8e-77], N[Not[LessEqual[t1, 9.5e-17]], $MachinePrecision]], t$95$1, N[((-v) * N[(t1 / N[(u * u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-v}{t1 + u}\\
\mathbf{if}\;t1 \leq -25500000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t1 \leq -6.1 \cdot 10^{-47}:\\
\;\;\;\;t1 \cdot \frac{v}{u \cdot \left(-u\right)}\\
\mathbf{elif}\;t1 \leq -8 \cdot 10^{-77} \lor \neg \left(t1 \leq 9.5 \cdot 10^{-17}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\left(-v\right) \cdot \frac{t1}{u \cdot u}\\
\end{array}
\end{array}
if t1 < -2.55e7 or -6.1e-47 < t1 < -7.9999999999999994e-77 or 9.50000000000000029e-17 < t1 Initial program 68.8%
associate-/r*79.3%
associate-/l*99.1%
Simplified99.1%
Taylor expanded in t1 around inf 83.8%
neg-mul-183.8%
Simplified83.8%
if -2.55e7 < t1 < -6.1e-47Initial program 85.8%
Taylor expanded in t1 around 0 76.1%
unpow276.1%
Simplified76.1%
frac-2neg76.1%
div-inv76.0%
distribute-lft-neg-out76.0%
remove-double-neg76.0%
distribute-rgt-neg-in76.0%
Applied egg-rr76.0%
associate-*l*75.7%
associate-*r/76.0%
*-rgt-identity76.0%
Simplified76.0%
if -7.9999999999999994e-77 < t1 < 9.50000000000000029e-17Initial program 79.2%
associate-*l/85.4%
*-commutative85.4%
Simplified85.4%
Taylor expanded in t1 around 0 77.5%
associate-*r/77.5%
neg-mul-177.5%
unpow277.5%
Simplified77.5%
Final simplification80.9%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ (- v) (+ t1 u))))
(if (<= t1 -48000000.0)
t_1
(if (<= t1 -1.15e-46)
(* t1 (/ v (* u (- u))))
(if (or (<= t1 -8e-77) (not (<= t1 4.9e-17)))
t_1
(* v (/ (/ (- t1) u) u)))))))
double code(double u, double v, double t1) {
double t_1 = -v / (t1 + u);
double tmp;
if (t1 <= -48000000.0) {
tmp = t_1;
} else if (t1 <= -1.15e-46) {
tmp = t1 * (v / (u * -u));
} else if ((t1 <= -8e-77) || !(t1 <= 4.9e-17)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = -v / (t1 + u)
if (t1 <= (-48000000.0d0)) then
tmp = t_1
else if (t1 <= (-1.15d-46)) then
tmp = t1 * (v / (u * -u))
else if ((t1 <= (-8d-77)) .or. (.not. (t1 <= 4.9d-17))) then
tmp = t_1
else
tmp = v * ((-t1 / u) / u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = -v / (t1 + u);
double tmp;
if (t1 <= -48000000.0) {
tmp = t_1;
} else if (t1 <= -1.15e-46) {
tmp = t1 * (v / (u * -u));
} else if ((t1 <= -8e-77) || !(t1 <= 4.9e-17)) {
tmp = t_1;
} else {
tmp = v * ((-t1 / u) / u);
}
return tmp;
}
def code(u, v, t1): t_1 = -v / (t1 + u) tmp = 0 if t1 <= -48000000.0: tmp = t_1 elif t1 <= -1.15e-46: tmp = t1 * (v / (u * -u)) elif (t1 <= -8e-77) or not (t1 <= 4.9e-17): tmp = t_1 else: tmp = v * ((-t1 / u) / u) return tmp
function code(u, v, t1) t_1 = Float64(Float64(-v) / Float64(t1 + u)) tmp = 0.0 if (t1 <= -48000000.0) tmp = t_1; elseif (t1 <= -1.15e-46) tmp = Float64(t1 * Float64(v / Float64(u * Float64(-u)))); elseif ((t1 <= -8e-77) || !(t1 <= 4.9e-17)) tmp = t_1; else tmp = Float64(v * Float64(Float64(Float64(-t1) / u) / u)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = -v / (t1 + u); tmp = 0.0; if (t1 <= -48000000.0) tmp = t_1; elseif (t1 <= -1.15e-46) tmp = t1 * (v / (u * -u)); elseif ((t1 <= -8e-77) || ~((t1 <= 4.9e-17))) tmp = t_1; else tmp = v * ((-t1 / u) / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -48000000.0], t$95$1, If[LessEqual[t1, -1.15e-46], N[(t1 * N[(v / N[(u * (-u)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t1, -8e-77], N[Not[LessEqual[t1, 4.9e-17]], $MachinePrecision]], t$95$1, N[(v * N[(N[((-t1) / u), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-v}{t1 + u}\\
\mathbf{if}\;t1 \leq -48000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t1 \leq -1.15 \cdot 10^{-46}:\\
\;\;\;\;t1 \cdot \frac{v}{u \cdot \left(-u\right)}\\
\mathbf{elif}\;t1 \leq -8 \cdot 10^{-77} \lor \neg \left(t1 \leq 4.9 \cdot 10^{-17}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;v \cdot \frac{\frac{-t1}{u}}{u}\\
\end{array}
\end{array}
if t1 < -4.8e7 or -1.15e-46 < t1 < -7.9999999999999994e-77 or 4.90000000000000012e-17 < t1 Initial program 68.8%
associate-/r*79.3%
associate-/l*99.1%
Simplified99.1%
Taylor expanded in t1 around inf 83.8%
neg-mul-183.8%
Simplified83.8%
if -4.8e7 < t1 < -1.15e-46Initial program 85.8%
Taylor expanded in t1 around 0 76.1%
unpow276.1%
Simplified76.1%
frac-2neg76.1%
div-inv76.0%
distribute-lft-neg-out76.0%
remove-double-neg76.0%
distribute-rgt-neg-in76.0%
Applied egg-rr76.0%
associate-*l*75.7%
associate-*r/76.0%
*-rgt-identity76.0%
Simplified76.0%
if -7.9999999999999994e-77 < t1 < 4.90000000000000012e-17Initial program 79.2%
associate-/r*86.4%
associate-/l*95.9%
Simplified95.9%
div-inv95.3%
clear-num95.5%
add-sqr-sqrt52.5%
sqrt-unprod58.0%
sqr-neg58.0%
sqrt-unprod16.9%
add-sqr-sqrt37.7%
distribute-lft-neg-in37.7%
distribute-rgt-neg-in37.7%
add-sqr-sqrt16.9%
sqrt-unprod58.0%
sqr-neg58.0%
sqrt-unprod52.5%
add-sqr-sqrt95.5%
Applied egg-rr95.5%
Taylor expanded in t1 around 0 72.1%
mul-1-neg72.1%
associate-*l/77.5%
unpow277.5%
*-commutative77.5%
distribute-lft-neg-in77.5%
associate-/r*82.5%
Simplified82.5%
Final simplification83.0%
(FPCore (u v t1) :precision binary64 (if (<= u -2.9e-115) (/ t1 (* (+ t1 u) (/ (- u) v))) (if (<= u 42.0) (/ (- v) t1) (/ (/ t1 (+ t1 u)) (/ (- t1 u) v)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -2.9e-115) {
tmp = t1 / ((t1 + u) * (-u / v));
} else if (u <= 42.0) {
tmp = -v / t1;
} else {
tmp = (t1 / (t1 + u)) / ((t1 - u) / v);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-2.9d-115)) then
tmp = t1 / ((t1 + u) * (-u / v))
else if (u <= 42.0d0) then
tmp = -v / t1
else
tmp = (t1 / (t1 + u)) / ((t1 - u) / v)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -2.9e-115) {
tmp = t1 / ((t1 + u) * (-u / v));
} else if (u <= 42.0) {
tmp = -v / t1;
} else {
tmp = (t1 / (t1 + u)) / ((t1 - u) / v);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -2.9e-115: tmp = t1 / ((t1 + u) * (-u / v)) elif u <= 42.0: tmp = -v / t1 else: tmp = (t1 / (t1 + u)) / ((t1 - u) / v) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -2.9e-115) tmp = Float64(t1 / Float64(Float64(t1 + u) * Float64(Float64(-u) / v))); elseif (u <= 42.0) tmp = Float64(Float64(-v) / t1); else tmp = Float64(Float64(t1 / Float64(t1 + u)) / Float64(Float64(t1 - u) / v)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -2.9e-115) tmp = t1 / ((t1 + u) * (-u / v)); elseif (u <= 42.0) tmp = -v / t1; else tmp = (t1 / (t1 + u)) / ((t1 - u) / v); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -2.9e-115], N[(t1 / N[(N[(t1 + u), $MachinePrecision] * N[((-u) / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 42.0], N[((-v) / t1), $MachinePrecision], N[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[(N[(t1 - u), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.9 \cdot 10^{-115}:\\
\;\;\;\;\frac{t1}{\left(t1 + u\right) \cdot \frac{-u}{v}}\\
\mathbf{elif}\;u \leq 42:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t1}{t1 + u}}{\frac{t1 - u}{v}}\\
\end{array}
\end{array}
if u < -2.8999999999999998e-115Initial program 70.4%
associate-*l/77.7%
*-commutative77.7%
Simplified77.7%
associate-/r*91.8%
associate-*r/97.0%
*-commutative97.0%
associate-/r/95.9%
div-inv95.7%
frac-2neg95.7%
frac-times91.3%
remove-double-neg91.3%
*-commutative91.3%
*-un-lft-identity91.3%
distribute-neg-frac91.3%
distribute-neg-in91.3%
add-sqr-sqrt43.2%
sqrt-unprod83.6%
sqr-neg83.6%
sqrt-unprod44.6%
add-sqr-sqrt77.4%
sub-neg77.4%
Applied egg-rr77.4%
Taylor expanded in t1 around 0 77.9%
neg-mul-177.9%
distribute-neg-frac77.9%
Simplified77.9%
if -2.8999999999999998e-115 < u < 42Initial program 72.0%
associate-*l/77.8%
*-commutative77.8%
Simplified77.8%
Taylor expanded in t1 around inf 81.2%
associate-*r/81.2%
neg-mul-181.2%
Simplified81.2%
if 42 < u Initial program 81.9%
associate-*l/80.4%
*-commutative80.4%
Simplified80.4%
associate-/r*86.7%
associate-*r/99.1%
*-commutative99.1%
associate-/r/99.0%
div-inv99.0%
clear-num98.9%
associate-/r/98.9%
clear-num99.8%
*-commutative99.8%
clear-num98.9%
div-inv99.0%
frac-2neg99.0%
remove-double-neg99.0%
associate-*l/98.3%
Applied egg-rr90.1%
Final simplification82.1%
(FPCore (u v t1) :precision binary64 (if (or (<= u -2.9e-115) (not (<= u 58.0))) (/ t1 (* (+ t1 u) (/ (- u) v))) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.9e-115) || !(u <= 58.0)) {
tmp = t1 / ((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 <= (-2.9d-115)) .or. (.not. (u <= 58.0d0))) then
tmp = t1 / ((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 <= -2.9e-115) || !(u <= 58.0)) {
tmp = t1 / ((t1 + u) * (-u / v));
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -2.9e-115) or not (u <= 58.0): tmp = t1 / ((t1 + u) * (-u / v)) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -2.9e-115) || !(u <= 58.0)) tmp = Float64(t1 / Float64(Float64(t1 + u) * Float64(Float64(-u) / v))); else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -2.9e-115) || ~((u <= 58.0))) tmp = t1 / ((t1 + u) * (-u / v)); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2.9e-115], N[Not[LessEqual[u, 58.0]], $MachinePrecision]], N[(t1 / N[(N[(t1 + u), $MachinePrecision] * N[((-u) / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.9 \cdot 10^{-115} \lor \neg \left(u \leq 58\right):\\
\;\;\;\;\frac{t1}{\left(t1 + u\right) \cdot \frac{-u}{v}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -2.8999999999999998e-115 or 58 < u Initial program 75.0%
associate-*l/78.8%
*-commutative78.8%
Simplified78.8%
associate-/r*89.8%
associate-*r/97.8%
*-commutative97.8%
associate-/r/97.2%
div-inv97.0%
frac-2neg97.0%
frac-times90.6%
remove-double-neg90.6%
*-commutative90.6%
*-un-lft-identity90.6%
distribute-neg-frac90.6%
distribute-neg-in90.6%
add-sqr-sqrt46.7%
sqrt-unprod84.7%
sqr-neg84.7%
sqrt-unprod41.1%
add-sqr-sqrt80.3%
sub-neg80.3%
Applied egg-rr80.3%
Taylor expanded in t1 around 0 80.6%
neg-mul-180.6%
distribute-neg-frac80.6%
Simplified80.6%
if -2.8999999999999998e-115 < u < 58Initial program 72.0%
associate-*l/77.8%
*-commutative77.8%
Simplified77.8%
Taylor expanded in t1 around inf 81.2%
associate-*r/81.2%
neg-mul-181.2%
Simplified81.2%
Final simplification80.8%
(FPCore (u v t1) :precision binary64 (if (<= u -2.9e-115) (/ t1 (* (+ t1 u) (/ (- u) v))) (if (<= u 45.0) (/ (- v) t1) (/ (/ (- t1) (/ u v)) (+ t1 u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -2.9e-115) {
tmp = t1 / ((t1 + u) * (-u / v));
} else if (u <= 45.0) {
tmp = -v / t1;
} else {
tmp = (-t1 / (u / v)) / (t1 + u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-2.9d-115)) then
tmp = t1 / ((t1 + u) * (-u / v))
else if (u <= 45.0d0) then
tmp = -v / t1
else
tmp = (-t1 / (u / v)) / (t1 + u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -2.9e-115) {
tmp = t1 / ((t1 + u) * (-u / v));
} else if (u <= 45.0) {
tmp = -v / t1;
} else {
tmp = (-t1 / (u / v)) / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -2.9e-115: tmp = t1 / ((t1 + u) * (-u / v)) elif u <= 45.0: tmp = -v / t1 else: tmp = (-t1 / (u / v)) / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -2.9e-115) tmp = Float64(t1 / Float64(Float64(t1 + u) * Float64(Float64(-u) / v))); elseif (u <= 45.0) tmp = Float64(Float64(-v) / t1); else tmp = Float64(Float64(Float64(-t1) / Float64(u / v)) / Float64(t1 + u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -2.9e-115) tmp = t1 / ((t1 + u) * (-u / v)); elseif (u <= 45.0) tmp = -v / t1; else tmp = (-t1 / (u / v)) / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -2.9e-115], N[(t1 / N[(N[(t1 + u), $MachinePrecision] * N[((-u) / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 45.0], N[((-v) / t1), $MachinePrecision], N[(N[((-t1) / N[(u / v), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.9 \cdot 10^{-115}:\\
\;\;\;\;\frac{t1}{\left(t1 + u\right) \cdot \frac{-u}{v}}\\
\mathbf{elif}\;u \leq 45:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{-t1}{\frac{u}{v}}}{t1 + u}\\
\end{array}
\end{array}
if u < -2.8999999999999998e-115Initial program 70.4%
associate-*l/77.7%
*-commutative77.7%
Simplified77.7%
associate-/r*91.8%
associate-*r/97.0%
*-commutative97.0%
associate-/r/95.9%
div-inv95.7%
frac-2neg95.7%
frac-times91.3%
remove-double-neg91.3%
*-commutative91.3%
*-un-lft-identity91.3%
distribute-neg-frac91.3%
distribute-neg-in91.3%
add-sqr-sqrt43.2%
sqrt-unprod83.6%
sqr-neg83.6%
sqrt-unprod44.6%
add-sqr-sqrt77.4%
sub-neg77.4%
Applied egg-rr77.4%
Taylor expanded in t1 around 0 77.9%
neg-mul-177.9%
distribute-neg-frac77.9%
Simplified77.9%
if -2.8999999999999998e-115 < u < 45Initial program 72.0%
associate-*l/77.8%
*-commutative77.8%
Simplified77.8%
Taylor expanded in t1 around inf 81.2%
associate-*r/81.2%
neg-mul-181.2%
Simplified81.2%
if 45 < u Initial program 81.9%
associate-/r*88.3%
associate-/l*99.0%
Simplified99.0%
Taylor expanded in t1 around 0 77.5%
mul-1-neg77.5%
associate-/l*84.6%
distribute-neg-frac84.6%
Simplified84.6%
Final simplification80.8%
(FPCore (u v t1) :precision binary64 (if (or (<= u -4.8e+85) (not (<= u 3e+101))) (* v (/ t1 (* u u))) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -4.8e+85) || !(u <= 3e+101)) {
tmp = v * (t1 / (u * u));
} else {
tmp = -v / t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-4.8d+85)) .or. (.not. (u <= 3d+101))) then
tmp = v * (t1 / (u * u))
else
tmp = -v / t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -4.8e+85) || !(u <= 3e+101)) {
tmp = v * (t1 / (u * u));
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -4.8e+85) or not (u <= 3e+101): tmp = v * (t1 / (u * u)) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -4.8e+85) || !(u <= 3e+101)) tmp = Float64(v * Float64(t1 / Float64(u * u))); else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -4.8e+85) || ~((u <= 3e+101))) tmp = v * (t1 / (u * u)); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -4.8e+85], N[Not[LessEqual[u, 3e+101]], $MachinePrecision]], N[(v * N[(t1 / N[(u * u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -4.8 \cdot 10^{+85} \lor \neg \left(u \leq 3 \cdot 10^{+101}\right):\\
\;\;\;\;v \cdot \frac{t1}{u \cdot u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -4.79999999999999993e85 or 2.99999999999999993e101 < u Initial program 74.0%
Taylor expanded in t1 around 0 73.0%
unpow273.0%
Simplified73.0%
associate-/l*74.9%
associate-/r/72.1%
add-sqr-sqrt33.4%
sqrt-unprod48.6%
sqr-neg48.6%
sqrt-unprod34.4%
add-sqr-sqrt66.0%
Applied egg-rr66.0%
if -4.79999999999999993e85 < u < 2.99999999999999993e101Initial program 73.6%
associate-*l/81.2%
*-commutative81.2%
Simplified81.2%
Taylor expanded in t1 around inf 68.2%
associate-*r/68.2%
neg-mul-168.2%
Simplified68.2%
Final simplification67.4%
(FPCore (u v t1) :precision binary64 (if (<= t1 -2.45e+55) (/ v t1) (if (<= t1 5.6e+89) (/ v u) (/ v t1))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -2.45e+55) {
tmp = v / t1;
} else if (t1 <= 5.6e+89) {
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 (t1 <= (-2.45d+55)) then
tmp = v / t1
else if (t1 <= 5.6d+89) 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 (t1 <= -2.45e+55) {
tmp = v / t1;
} else if (t1 <= 5.6e+89) {
tmp = v / u;
} else {
tmp = v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -2.45e+55: tmp = v / t1 elif t1 <= 5.6e+89: tmp = v / u else: tmp = v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -2.45e+55) tmp = Float64(v / t1); elseif (t1 <= 5.6e+89) tmp = Float64(v / u); else tmp = Float64(v / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -2.45e+55) tmp = v / t1; elseif (t1 <= 5.6e+89) tmp = v / u; else tmp = v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -2.45e+55], N[(v / t1), $MachinePrecision], If[LessEqual[t1, 5.6e+89], N[(v / u), $MachinePrecision], N[(v / t1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2.45 \cdot 10^{+55}:\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{elif}\;t1 \leq 5.6 \cdot 10^{+89}:\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{t1}\\
\end{array}
\end{array}
if t1 < -2.45000000000000007e55 or 5.5999999999999996e89 < t1 Initial program 63.0%
associate-*l/67.0%
*-commutative67.0%
Simplified67.0%
associate-/r*96.8%
associate-*r/99.9%
*-commutative99.9%
associate-/r/98.8%
div-inv98.7%
frac-2neg98.7%
frac-times74.4%
remove-double-neg74.4%
*-commutative74.4%
*-un-lft-identity74.4%
distribute-neg-frac74.4%
distribute-neg-in74.4%
add-sqr-sqrt39.5%
sqrt-unprod55.6%
sqr-neg55.6%
sqrt-unprod22.2%
add-sqr-sqrt48.0%
sub-neg48.0%
Applied egg-rr48.0%
Taylor expanded in t1 around inf 45.1%
Taylor expanded in t1 around inf 40.4%
if -2.45000000000000007e55 < t1 < 5.5999999999999996e89Initial program 79.9%
associate-*l/84.9%
*-commutative84.9%
Simplified84.9%
associate-/r*92.4%
associate-*r/97.9%
*-commutative97.9%
associate-/r/97.2%
div-inv97.1%
frac-2neg97.1%
frac-times90.5%
remove-double-neg90.5%
*-commutative90.5%
*-un-lft-identity90.5%
distribute-neg-frac90.5%
distribute-neg-in90.5%
add-sqr-sqrt42.0%
sqrt-unprod72.3%
sqr-neg72.3%
sqrt-unprod31.9%
add-sqr-sqrt62.0%
sub-neg62.0%
Applied egg-rr62.0%
Taylor expanded in t1 around inf 12.9%
Taylor expanded in t1 around 0 15.2%
Final simplification24.4%
(FPCore (u v t1) :precision binary64 (if (<= u 2.35e+110) (- (/ v t1)) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if (u <= 2.35e+110) {
tmp = -(v / t1);
} else {
tmp = v / u;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= 2.35d+110) then
tmp = -(v / t1)
else
tmp = v / u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= 2.35e+110) {
tmp = -(v / t1);
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= 2.35e+110: tmp = -(v / t1) else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= 2.35e+110) tmp = Float64(-Float64(v / t1)); else tmp = Float64(v / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= 2.35e+110) tmp = -(v / t1); else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, 2.35e+110], (-N[(v / t1), $MachinePrecision]), N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq 2.35 \cdot 10^{+110}:\\
\;\;\;\;-\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if u < 2.3499999999999999e110Initial program 72.9%
associate-*l/79.3%
*-commutative79.3%
Simplified79.3%
Taylor expanded in t1 around inf 59.4%
associate-*r/59.4%
neg-mul-159.4%
Simplified59.4%
if 2.3499999999999999e110 < u Initial program 78.4%
associate-*l/73.6%
*-commutative73.6%
Simplified73.6%
associate-/r*80.5%
associate-*r/98.7%
*-commutative98.7%
associate-/r/98.6%
div-inv98.7%
frac-2neg98.7%
frac-times87.0%
remove-double-neg87.0%
*-commutative87.0%
*-un-lft-identity87.0%
distribute-neg-frac87.0%
distribute-neg-in87.0%
add-sqr-sqrt51.6%
sqrt-unprod87.0%
sqr-neg87.0%
sqrt-unprod35.4%
add-sqr-sqrt87.0%
sub-neg87.0%
Applied egg-rr87.0%
Taylor expanded in t1 around inf 49.1%
Taylor expanded in t1 around 0 44.1%
Final simplification57.0%
(FPCore (u v t1) :precision binary64 (/ (- v) (+ t1 u)))
double code(double u, double v, double t1) {
return -v / (t1 + u);
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = -v / (t1 + u)
end function
public static double code(double u, double v, double t1) {
return -v / (t1 + u);
}
def code(u, v, t1): return -v / (t1 + u)
function code(u, v, t1) return Float64(Float64(-v) / Float64(t1 + u)) end
function tmp = code(u, v, t1) tmp = -v / (t1 + u); end
code[u_, v_, t1_] := N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{-v}{t1 + u}
\end{array}
Initial program 73.7%
associate-/r*83.0%
associate-/l*97.8%
Simplified97.8%
Taylor expanded in t1 around inf 59.6%
neg-mul-159.6%
Simplified59.6%
Final simplification59.6%
(FPCore (u v t1) :precision binary64 (/ v t1))
double code(double u, double v, double t1) {
return v / t1;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = v / t1
end function
public static double code(double u, double v, double t1) {
return v / t1;
}
def code(u, v, t1): return v / t1
function code(u, v, t1) return Float64(v / t1) end
function tmp = code(u, v, t1) tmp = v / t1; end
code[u_, v_, t1_] := N[(v / t1), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{t1}
\end{array}
Initial program 73.7%
associate-*l/78.4%
*-commutative78.4%
Simplified78.4%
associate-/r*94.0%
associate-*r/98.6%
*-commutative98.6%
associate-/r/97.8%
div-inv97.6%
frac-2neg97.6%
frac-times84.7%
remove-double-neg84.7%
*-commutative84.7%
*-un-lft-identity84.7%
distribute-neg-frac84.7%
distribute-neg-in84.7%
add-sqr-sqrt41.1%
sqrt-unprod66.2%
sqr-neg66.2%
sqrt-unprod28.3%
add-sqr-sqrt56.9%
sub-neg56.9%
Applied egg-rr56.9%
Taylor expanded in t1 around inf 24.6%
Taylor expanded in t1 around inf 16.3%
Final simplification16.3%
herbie shell --seed 2023279
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))