
(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 14 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 74.2%
times-frac97.0%
Simplified97.0%
Final simplification97.0%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ v (- (* u -2.0) t1))) (t_2 (/ (/ t1 (/ (+ t1 u) v)) (- t1 u))))
(if (<= u -0.0033)
t_2
(if (<= u 2.9e-38)
t_1
(if (<= u 0.0072)
(* v (/ (/ t1 (- t1 u)) (+ t1 u)))
(if (<= u 3.9e+64) t_1 t_2))))))
double code(double u, double v, double t1) {
double t_1 = v / ((u * -2.0) - t1);
double t_2 = (t1 / ((t1 + u) / v)) / (t1 - u);
double tmp;
if (u <= -0.0033) {
tmp = t_2;
} else if (u <= 2.9e-38) {
tmp = t_1;
} else if (u <= 0.0072) {
tmp = v * ((t1 / (t1 - u)) / (t1 + u));
} else if (u <= 3.9e+64) {
tmp = t_1;
} else {
tmp = t_2;
}
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 * (-2.0d0)) - t1)
t_2 = (t1 / ((t1 + u) / v)) / (t1 - u)
if (u <= (-0.0033d0)) then
tmp = t_2
else if (u <= 2.9d-38) then
tmp = t_1
else if (u <= 0.0072d0) then
tmp = v * ((t1 / (t1 - u)) / (t1 + u))
else if (u <= 3.9d+64) then
tmp = t_1
else
tmp = t_2
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 t_2 = (t1 / ((t1 + u) / v)) / (t1 - u);
double tmp;
if (u <= -0.0033) {
tmp = t_2;
} else if (u <= 2.9e-38) {
tmp = t_1;
} else if (u <= 0.0072) {
tmp = v * ((t1 / (t1 - u)) / (t1 + u));
} else if (u <= 3.9e+64) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(u, v, t1): t_1 = v / ((u * -2.0) - t1) t_2 = (t1 / ((t1 + u) / v)) / (t1 - u) tmp = 0 if u <= -0.0033: tmp = t_2 elif u <= 2.9e-38: tmp = t_1 elif u <= 0.0072: tmp = v * ((t1 / (t1 - u)) / (t1 + u)) elif u <= 3.9e+64: tmp = t_1 else: tmp = t_2 return tmp
function code(u, v, t1) t_1 = Float64(v / Float64(Float64(u * -2.0) - t1)) t_2 = Float64(Float64(t1 / Float64(Float64(t1 + u) / v)) / Float64(t1 - u)) tmp = 0.0 if (u <= -0.0033) tmp = t_2; elseif (u <= 2.9e-38) tmp = t_1; elseif (u <= 0.0072) tmp = Float64(v * Float64(Float64(t1 / Float64(t1 - u)) / Float64(t1 + u))); elseif (u <= 3.9e+64) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(u, v, t1) t_1 = v / ((u * -2.0) - t1); t_2 = (t1 / ((t1 + u) / v)) / (t1 - u); tmp = 0.0; if (u <= -0.0033) tmp = t_2; elseif (u <= 2.9e-38) tmp = t_1; elseif (u <= 0.0072) tmp = v * ((t1 / (t1 - u)) / (t1 + u)); elseif (u <= 3.9e+64) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t1 / N[(N[(t1 + u), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision] / N[(t1 - u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[u, -0.0033], t$95$2, If[LessEqual[u, 2.9e-38], t$95$1, If[LessEqual[u, 0.0072], N[(v * N[(N[(t1 / N[(t1 - u), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 3.9e+64], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{v}{u \cdot -2 - t1}\\
t_2 := \frac{\frac{t1}{\frac{t1 + u}{v}}}{t1 - u}\\
\mathbf{if}\;u \leq -0.0033:\\
\;\;\;\;t_2\\
\mathbf{elif}\;u \leq 2.9 \cdot 10^{-38}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;u \leq 0.0072:\\
\;\;\;\;v \cdot \frac{\frac{t1}{t1 - u}}{t1 + u}\\
\mathbf{elif}\;u \leq 3.9 \cdot 10^{+64}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if u < -0.0033 or 3.8999999999999998e64 < u Initial program 78.9%
times-frac98.0%
Simplified98.0%
*-commutative98.0%
clear-num97.9%
frac-2neg97.9%
frac-times88.0%
*-un-lft-identity88.0%
remove-double-neg88.0%
distribute-neg-in88.0%
add-sqr-sqrt44.7%
sqrt-unprod83.5%
sqr-neg83.5%
sqrt-unprod41.0%
add-sqr-sqrt83.4%
sub-neg83.4%
Applied egg-rr83.4%
associate-/r*86.2%
Simplified86.2%
if -0.0033 < u < 2.89999999999999994e-38 or 0.0071999999999999998 < u < 3.8999999999999998e64Initial program 67.7%
associate-/r*79.3%
*-commutative79.3%
associate-/l*99.0%
associate-/l/99.1%
+-commutative99.1%
remove-double-neg99.1%
unsub-neg99.1%
div-sub99.1%
sub-neg99.1%
*-inverses99.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in t1 around inf 86.0%
mul-1-neg86.0%
unsub-neg86.0%
*-commutative86.0%
Simplified86.0%
if 2.89999999999999994e-38 < u < 0.0071999999999999998Initial program 99.0%
times-frac64.5%
Simplified64.5%
*-commutative64.5%
clear-num64.5%
frac-2neg64.5%
frac-times59.4%
*-un-lft-identity59.4%
remove-double-neg59.4%
distribute-neg-in59.4%
add-sqr-sqrt38.7%
sqrt-unprod59.4%
sqr-neg59.4%
sqrt-unprod20.7%
add-sqr-sqrt59.4%
sub-neg59.4%
Applied egg-rr59.4%
associate-/r*70.2%
Simplified70.2%
div-inv64.7%
clear-num64.7%
sub-neg64.7%
add-sqr-sqrt26.0%
sqrt-unprod64.7%
sqr-neg64.7%
sqrt-unprod38.7%
add-sqr-sqrt64.7%
distribute-neg-in64.7%
associate-*l/64.5%
remove-double-neg64.5%
distribute-frac-neg64.5%
frac-2neg64.5%
distribute-frac-neg64.5%
clear-num64.5%
div-inv70.0%
associate-/r/99.6%
Applied egg-rr99.6%
Final simplification86.5%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ v (- (* u -2.0) t1))) (t_2 (* t1 (/ (/ v u) (- t1 u)))))
(if (<= u -1.35e-6)
t_2
(if (<= u 3.8e-37)
t_1
(if (<= u 4.5e-7)
(/ v (/ (- t1 u) (/ t1 u)))
(if (<= u 1.95e+63) t_1 t_2))))))
double code(double u, double v, double t1) {
double t_1 = v / ((u * -2.0) - t1);
double t_2 = t1 * ((v / u) / (t1 - u));
double tmp;
if (u <= -1.35e-6) {
tmp = t_2;
} else if (u <= 3.8e-37) {
tmp = t_1;
} else if (u <= 4.5e-7) {
tmp = v / ((t1 - u) / (t1 / u));
} else if (u <= 1.95e+63) {
tmp = t_1;
} else {
tmp = t_2;
}
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 * (-2.0d0)) - t1)
t_2 = t1 * ((v / u) / (t1 - u))
if (u <= (-1.35d-6)) then
tmp = t_2
else if (u <= 3.8d-37) then
tmp = t_1
else if (u <= 4.5d-7) then
tmp = v / ((t1 - u) / (t1 / u))
else if (u <= 1.95d+63) then
tmp = t_1
else
tmp = t_2
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 t_2 = t1 * ((v / u) / (t1 - u));
double tmp;
if (u <= -1.35e-6) {
tmp = t_2;
} else if (u <= 3.8e-37) {
tmp = t_1;
} else if (u <= 4.5e-7) {
tmp = v / ((t1 - u) / (t1 / u));
} else if (u <= 1.95e+63) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(u, v, t1): t_1 = v / ((u * -2.0) - t1) t_2 = t1 * ((v / u) / (t1 - u)) tmp = 0 if u <= -1.35e-6: tmp = t_2 elif u <= 3.8e-37: tmp = t_1 elif u <= 4.5e-7: tmp = v / ((t1 - u) / (t1 / u)) elif u <= 1.95e+63: tmp = t_1 else: tmp = t_2 return tmp
function code(u, v, t1) t_1 = Float64(v / Float64(Float64(u * -2.0) - t1)) t_2 = Float64(t1 * Float64(Float64(v / u) / Float64(t1 - u))) tmp = 0.0 if (u <= -1.35e-6) tmp = t_2; elseif (u <= 3.8e-37) tmp = t_1; elseif (u <= 4.5e-7) tmp = Float64(v / Float64(Float64(t1 - u) / Float64(t1 / u))); elseif (u <= 1.95e+63) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(u, v, t1) t_1 = v / ((u * -2.0) - t1); t_2 = t1 * ((v / u) / (t1 - u)); tmp = 0.0; if (u <= -1.35e-6) tmp = t_2; elseif (u <= 3.8e-37) tmp = t_1; elseif (u <= 4.5e-7) tmp = v / ((t1 - u) / (t1 / u)); elseif (u <= 1.95e+63) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t1 * N[(N[(v / u), $MachinePrecision] / N[(t1 - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[u, -1.35e-6], t$95$2, If[LessEqual[u, 3.8e-37], t$95$1, If[LessEqual[u, 4.5e-7], N[(v / N[(N[(t1 - u), $MachinePrecision] / N[(t1 / u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 1.95e+63], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{v}{u \cdot -2 - t1}\\
t_2 := t1 \cdot \frac{\frac{v}{u}}{t1 - u}\\
\mathbf{if}\;u \leq -1.35 \cdot 10^{-6}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;u \leq 3.8 \cdot 10^{-37}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;u \leq 4.5 \cdot 10^{-7}:\\
\;\;\;\;\frac{v}{\frac{t1 - u}{\frac{t1}{u}}}\\
\mathbf{elif}\;u \leq 1.95 \cdot 10^{+63}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if u < -1.34999999999999999e-6 or 1.95e63 < u Initial program 78.9%
times-frac98.0%
Simplified98.0%
*-commutative98.0%
clear-num97.9%
frac-2neg97.9%
frac-times88.0%
*-un-lft-identity88.0%
remove-double-neg88.0%
distribute-neg-in88.0%
add-sqr-sqrt44.7%
sqrt-unprod83.5%
sqr-neg83.5%
sqrt-unprod41.0%
add-sqr-sqrt83.4%
sub-neg83.4%
Applied egg-rr83.4%
associate-/r*86.2%
Simplified86.2%
Taylor expanded in t1 around 0 82.6%
Taylor expanded in v around 0 72.9%
associate-/r*77.8%
associate-*r/82.5%
associate-*r/83.6%
Simplified83.6%
if -1.34999999999999999e-6 < u < 3.8000000000000004e-37 or 4.4999999999999998e-7 < u < 1.95e63Initial program 67.7%
associate-/r*79.3%
*-commutative79.3%
associate-/l*99.0%
associate-/l/99.1%
+-commutative99.1%
remove-double-neg99.1%
unsub-neg99.1%
div-sub99.1%
sub-neg99.1%
*-inverses99.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in t1 around inf 86.0%
mul-1-neg86.0%
unsub-neg86.0%
*-commutative86.0%
Simplified86.0%
if 3.8000000000000004e-37 < u < 4.4999999999999998e-7Initial program 99.0%
times-frac64.5%
Simplified64.5%
*-commutative64.5%
clear-num64.5%
frac-2neg64.5%
frac-times59.4%
*-un-lft-identity59.4%
remove-double-neg59.4%
distribute-neg-in59.4%
add-sqr-sqrt38.7%
sqrt-unprod59.4%
sqr-neg59.4%
sqrt-unprod20.7%
add-sqr-sqrt59.4%
sub-neg59.4%
Applied egg-rr59.4%
associate-/r*70.2%
Simplified70.2%
Taylor expanded in t1 around 0 58.4%
Taylor expanded in v around 0 87.2%
associate-/r*87.6%
associate-*r/52.8%
associate-*r/52.5%
Simplified52.5%
associate-/l/52.7%
associate-*r/87.2%
associate-/l/87.6%
associate-*l/88.0%
*-commutative88.0%
associate-/l*87.8%
Applied egg-rr87.8%
Final simplification84.9%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ v (- (* u -2.0) t1))) (t_2 (* t1 (/ (/ v u) (- t1 u)))))
(if (<= u -2.6e-5)
t_2
(if (<= u 2.8e-37)
t_1
(if (<= u 0.01)
(/ (* v (/ t1 u)) (- t1 u))
(if (<= u 2.8e+63) t_1 t_2))))))
double code(double u, double v, double t1) {
double t_1 = v / ((u * -2.0) - t1);
double t_2 = t1 * ((v / u) / (t1 - u));
double tmp;
if (u <= -2.6e-5) {
tmp = t_2;
} else if (u <= 2.8e-37) {
tmp = t_1;
} else if (u <= 0.01) {
tmp = (v * (t1 / u)) / (t1 - u);
} else if (u <= 2.8e+63) {
tmp = t_1;
} else {
tmp = t_2;
}
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 * (-2.0d0)) - t1)
t_2 = t1 * ((v / u) / (t1 - u))
if (u <= (-2.6d-5)) then
tmp = t_2
else if (u <= 2.8d-37) then
tmp = t_1
else if (u <= 0.01d0) then
tmp = (v * (t1 / u)) / (t1 - u)
else if (u <= 2.8d+63) then
tmp = t_1
else
tmp = t_2
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 t_2 = t1 * ((v / u) / (t1 - u));
double tmp;
if (u <= -2.6e-5) {
tmp = t_2;
} else if (u <= 2.8e-37) {
tmp = t_1;
} else if (u <= 0.01) {
tmp = (v * (t1 / u)) / (t1 - u);
} else if (u <= 2.8e+63) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(u, v, t1): t_1 = v / ((u * -2.0) - t1) t_2 = t1 * ((v / u) / (t1 - u)) tmp = 0 if u <= -2.6e-5: tmp = t_2 elif u <= 2.8e-37: tmp = t_1 elif u <= 0.01: tmp = (v * (t1 / u)) / (t1 - u) elif u <= 2.8e+63: tmp = t_1 else: tmp = t_2 return tmp
function code(u, v, t1) t_1 = Float64(v / Float64(Float64(u * -2.0) - t1)) t_2 = Float64(t1 * Float64(Float64(v / u) / Float64(t1 - u))) tmp = 0.0 if (u <= -2.6e-5) tmp = t_2; elseif (u <= 2.8e-37) tmp = t_1; elseif (u <= 0.01) tmp = Float64(Float64(v * Float64(t1 / u)) / Float64(t1 - u)); elseif (u <= 2.8e+63) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(u, v, t1) t_1 = v / ((u * -2.0) - t1); t_2 = t1 * ((v / u) / (t1 - u)); tmp = 0.0; if (u <= -2.6e-5) tmp = t_2; elseif (u <= 2.8e-37) tmp = t_1; elseif (u <= 0.01) tmp = (v * (t1 / u)) / (t1 - u); elseif (u <= 2.8e+63) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t1 * N[(N[(v / u), $MachinePrecision] / N[(t1 - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[u, -2.6e-5], t$95$2, If[LessEqual[u, 2.8e-37], t$95$1, If[LessEqual[u, 0.01], N[(N[(v * N[(t1 / u), $MachinePrecision]), $MachinePrecision] / N[(t1 - u), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 2.8e+63], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{v}{u \cdot -2 - t1}\\
t_2 := t1 \cdot \frac{\frac{v}{u}}{t1 - u}\\
\mathbf{if}\;u \leq -2.6 \cdot 10^{-5}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;u \leq 2.8 \cdot 10^{-37}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;u \leq 0.01:\\
\;\;\;\;\frac{v \cdot \frac{t1}{u}}{t1 - u}\\
\mathbf{elif}\;u \leq 2.8 \cdot 10^{+63}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if u < -2.59999999999999984e-5 or 2.79999999999999987e63 < u Initial program 78.9%
times-frac98.0%
Simplified98.0%
*-commutative98.0%
clear-num97.9%
frac-2neg97.9%
frac-times88.0%
*-un-lft-identity88.0%
remove-double-neg88.0%
distribute-neg-in88.0%
add-sqr-sqrt44.7%
sqrt-unprod83.5%
sqr-neg83.5%
sqrt-unprod41.0%
add-sqr-sqrt83.4%
sub-neg83.4%
Applied egg-rr83.4%
associate-/r*86.2%
Simplified86.2%
Taylor expanded in t1 around 0 82.6%
Taylor expanded in v around 0 72.9%
associate-/r*77.8%
associate-*r/82.5%
associate-*r/83.6%
Simplified83.6%
if -2.59999999999999984e-5 < u < 2.8000000000000001e-37 or 0.0100000000000000002 < u < 2.79999999999999987e63Initial program 67.7%
associate-/r*79.3%
*-commutative79.3%
associate-/l*99.0%
associate-/l/99.1%
+-commutative99.1%
remove-double-neg99.1%
unsub-neg99.1%
div-sub99.1%
sub-neg99.1%
*-inverses99.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in t1 around inf 86.0%
mul-1-neg86.0%
unsub-neg86.0%
*-commutative86.0%
Simplified86.0%
if 2.8000000000000001e-37 < u < 0.0100000000000000002Initial program 99.0%
times-frac64.5%
Simplified64.5%
*-commutative64.5%
clear-num64.5%
frac-2neg64.5%
frac-times59.4%
*-un-lft-identity59.4%
remove-double-neg59.4%
distribute-neg-in59.4%
add-sqr-sqrt38.7%
sqrt-unprod59.4%
sqr-neg59.4%
sqrt-unprod20.7%
add-sqr-sqrt59.4%
sub-neg59.4%
Applied egg-rr59.4%
associate-/r*70.2%
Simplified70.2%
Taylor expanded in t1 around 0 58.4%
associate-/r/88.0%
Applied egg-rr88.0%
Final simplification84.9%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ v (- (* u -2.0) t1))))
(if (<= u -1.15e-7)
(* (- t1) (/ (/ v u) (+ t1 u)))
(if (<= u 2.6e-37)
t_1
(if (<= u 0.00106)
(/ (* v (/ t1 u)) (- t1 u))
(if (<= u 2.8e+63) t_1 (* t1 (/ (/ v u) (- t1 u)))))))))
double code(double u, double v, double t1) {
double t_1 = v / ((u * -2.0) - t1);
double tmp;
if (u <= -1.15e-7) {
tmp = -t1 * ((v / u) / (t1 + u));
} else if (u <= 2.6e-37) {
tmp = t_1;
} else if (u <= 0.00106) {
tmp = (v * (t1 / u)) / (t1 - u);
} else if (u <= 2.8e+63) {
tmp = t_1;
} else {
tmp = t1 * ((v / u) / (t1 - u));
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: t_1
real(8) :: tmp
t_1 = v / ((u * (-2.0d0)) - t1)
if (u <= (-1.15d-7)) then
tmp = -t1 * ((v / u) / (t1 + u))
else if (u <= 2.6d-37) then
tmp = t_1
else if (u <= 0.00106d0) then
tmp = (v * (t1 / u)) / (t1 - u)
else if (u <= 2.8d+63) then
tmp = t_1
else
tmp = t1 * ((v / u) / (t1 - u))
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 (u <= -1.15e-7) {
tmp = -t1 * ((v / u) / (t1 + u));
} else if (u <= 2.6e-37) {
tmp = t_1;
} else if (u <= 0.00106) {
tmp = (v * (t1 / u)) / (t1 - u);
} else if (u <= 2.8e+63) {
tmp = t_1;
} else {
tmp = t1 * ((v / u) / (t1 - u));
}
return tmp;
}
def code(u, v, t1): t_1 = v / ((u * -2.0) - t1) tmp = 0 if u <= -1.15e-7: tmp = -t1 * ((v / u) / (t1 + u)) elif u <= 2.6e-37: tmp = t_1 elif u <= 0.00106: tmp = (v * (t1 / u)) / (t1 - u) elif u <= 2.8e+63: tmp = t_1 else: tmp = t1 * ((v / u) / (t1 - u)) return tmp
function code(u, v, t1) t_1 = Float64(v / Float64(Float64(u * -2.0) - t1)) tmp = 0.0 if (u <= -1.15e-7) tmp = Float64(Float64(-t1) * Float64(Float64(v / u) / Float64(t1 + u))); elseif (u <= 2.6e-37) tmp = t_1; elseif (u <= 0.00106) tmp = Float64(Float64(v * Float64(t1 / u)) / Float64(t1 - u)); elseif (u <= 2.8e+63) tmp = t_1; else tmp = Float64(t1 * Float64(Float64(v / u) / Float64(t1 - u))); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = v / ((u * -2.0) - t1); tmp = 0.0; if (u <= -1.15e-7) tmp = -t1 * ((v / u) / (t1 + u)); elseif (u <= 2.6e-37) tmp = t_1; elseif (u <= 0.00106) tmp = (v * (t1 / u)) / (t1 - u); elseif (u <= 2.8e+63) tmp = t_1; else tmp = t1 * ((v / u) / (t1 - u)); 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[u, -1.15e-7], N[((-t1) * N[(N[(v / u), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 2.6e-37], t$95$1, If[LessEqual[u, 0.00106], N[(N[(v * N[(t1 / u), $MachinePrecision]), $MachinePrecision] / N[(t1 - u), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 2.8e+63], t$95$1, N[(t1 * N[(N[(v / u), $MachinePrecision] / N[(t1 - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{v}{u \cdot -2 - t1}\\
\mathbf{if}\;u \leq -1.15 \cdot 10^{-7}:\\
\;\;\;\;\left(-t1\right) \cdot \frac{\frac{v}{u}}{t1 + u}\\
\mathbf{elif}\;u \leq 2.6 \cdot 10^{-37}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;u \leq 0.00106:\\
\;\;\;\;\frac{v \cdot \frac{t1}{u}}{t1 - u}\\
\mathbf{elif}\;u \leq 2.8 \cdot 10^{+63}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{t1 - u}\\
\end{array}
\end{array}
if u < -1.14999999999999997e-7Initial program 80.0%
times-frac98.5%
Simplified98.5%
Taylor expanded in t1 around 0 78.9%
Taylor expanded in v around 0 69.0%
associate-*r/69.0%
neg-mul-169.0%
+-commutative69.0%
*-commutative69.0%
distribute-frac-neg69.0%
times-frac78.9%
associate-*l/80.2%
associate-*r/81.9%
distribute-rgt-neg-in81.9%
+-commutative81.9%
Simplified81.9%
if -1.14999999999999997e-7 < u < 2.5999999999999998e-37 or 0.00105999999999999996 < u < 2.79999999999999987e63Initial program 67.7%
associate-/r*79.3%
*-commutative79.3%
associate-/l*99.0%
associate-/l/99.1%
+-commutative99.1%
remove-double-neg99.1%
unsub-neg99.1%
div-sub99.1%
sub-neg99.1%
*-inverses99.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in t1 around inf 86.0%
mul-1-neg86.0%
unsub-neg86.0%
*-commutative86.0%
Simplified86.0%
if 2.5999999999999998e-37 < u < 0.00105999999999999996Initial program 99.0%
times-frac64.5%
Simplified64.5%
*-commutative64.5%
clear-num64.5%
frac-2neg64.5%
frac-times59.4%
*-un-lft-identity59.4%
remove-double-neg59.4%
distribute-neg-in59.4%
add-sqr-sqrt38.7%
sqrt-unprod59.4%
sqr-neg59.4%
sqrt-unprod20.7%
add-sqr-sqrt59.4%
sub-neg59.4%
Applied egg-rr59.4%
associate-/r*70.2%
Simplified70.2%
Taylor expanded in t1 around 0 58.4%
associate-/r/88.0%
Applied egg-rr88.0%
if 2.79999999999999987e63 < u Initial program 77.7%
times-frac97.4%
Simplified97.4%
*-commutative97.4%
clear-num97.4%
frac-2neg97.4%
frac-times87.0%
*-un-lft-identity87.0%
remove-double-neg87.0%
distribute-neg-in87.0%
add-sqr-sqrt36.5%
sqrt-unprod83.8%
sqr-neg83.8%
sqrt-unprod48.8%
add-sqr-sqrt85.4%
sub-neg85.4%
Applied egg-rr85.4%
associate-/r*88.3%
Simplified88.3%
Taylor expanded in t1 around 0 85.3%
Taylor expanded in v around 0 77.6%
associate-/r*80.2%
associate-*r/85.3%
associate-*r/85.8%
Simplified85.8%
Final simplification84.9%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ v (- (* u -2.0) t1))))
(if (<= u -0.00052)
(* (- t1) (/ (/ v u) (+ t1 u)))
(if (<= u 1.76e-37)
t_1
(if (<= u 0.66)
(* v (/ (/ t1 (- t1 u)) (+ t1 u)))
(if (<= u 1.95e+63) t_1 (* t1 (/ (/ v u) (- t1 u)))))))))
double code(double u, double v, double t1) {
double t_1 = v / ((u * -2.0) - t1);
double tmp;
if (u <= -0.00052) {
tmp = -t1 * ((v / u) / (t1 + u));
} else if (u <= 1.76e-37) {
tmp = t_1;
} else if (u <= 0.66) {
tmp = v * ((t1 / (t1 - u)) / (t1 + u));
} else if (u <= 1.95e+63) {
tmp = t_1;
} else {
tmp = t1 * ((v / u) / (t1 - u));
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: t_1
real(8) :: tmp
t_1 = v / ((u * (-2.0d0)) - t1)
if (u <= (-0.00052d0)) then
tmp = -t1 * ((v / u) / (t1 + u))
else if (u <= 1.76d-37) then
tmp = t_1
else if (u <= 0.66d0) then
tmp = v * ((t1 / (t1 - u)) / (t1 + u))
else if (u <= 1.95d+63) then
tmp = t_1
else
tmp = t1 * ((v / u) / (t1 - u))
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 (u <= -0.00052) {
tmp = -t1 * ((v / u) / (t1 + u));
} else if (u <= 1.76e-37) {
tmp = t_1;
} else if (u <= 0.66) {
tmp = v * ((t1 / (t1 - u)) / (t1 + u));
} else if (u <= 1.95e+63) {
tmp = t_1;
} else {
tmp = t1 * ((v / u) / (t1 - u));
}
return tmp;
}
def code(u, v, t1): t_1 = v / ((u * -2.0) - t1) tmp = 0 if u <= -0.00052: tmp = -t1 * ((v / u) / (t1 + u)) elif u <= 1.76e-37: tmp = t_1 elif u <= 0.66: tmp = v * ((t1 / (t1 - u)) / (t1 + u)) elif u <= 1.95e+63: tmp = t_1 else: tmp = t1 * ((v / u) / (t1 - u)) return tmp
function code(u, v, t1) t_1 = Float64(v / Float64(Float64(u * -2.0) - t1)) tmp = 0.0 if (u <= -0.00052) tmp = Float64(Float64(-t1) * Float64(Float64(v / u) / Float64(t1 + u))); elseif (u <= 1.76e-37) tmp = t_1; elseif (u <= 0.66) tmp = Float64(v * Float64(Float64(t1 / Float64(t1 - u)) / Float64(t1 + u))); elseif (u <= 1.95e+63) tmp = t_1; else tmp = Float64(t1 * Float64(Float64(v / u) / Float64(t1 - u))); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = v / ((u * -2.0) - t1); tmp = 0.0; if (u <= -0.00052) tmp = -t1 * ((v / u) / (t1 + u)); elseif (u <= 1.76e-37) tmp = t_1; elseif (u <= 0.66) tmp = v * ((t1 / (t1 - u)) / (t1 + u)); elseif (u <= 1.95e+63) tmp = t_1; else tmp = t1 * ((v / u) / (t1 - u)); 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[u, -0.00052], N[((-t1) * N[(N[(v / u), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 1.76e-37], t$95$1, If[LessEqual[u, 0.66], N[(v * N[(N[(t1 / N[(t1 - u), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 1.95e+63], t$95$1, N[(t1 * N[(N[(v / u), $MachinePrecision] / N[(t1 - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{v}{u \cdot -2 - t1}\\
\mathbf{if}\;u \leq -0.00052:\\
\;\;\;\;\left(-t1\right) \cdot \frac{\frac{v}{u}}{t1 + u}\\
\mathbf{elif}\;u \leq 1.76 \cdot 10^{-37}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;u \leq 0.66:\\
\;\;\;\;v \cdot \frac{\frac{t1}{t1 - u}}{t1 + u}\\
\mathbf{elif}\;u \leq 1.95 \cdot 10^{+63}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{t1 - u}\\
\end{array}
\end{array}
if u < -5.19999999999999954e-4Initial program 80.0%
times-frac98.5%
Simplified98.5%
Taylor expanded in t1 around 0 78.9%
Taylor expanded in v around 0 69.0%
associate-*r/69.0%
neg-mul-169.0%
+-commutative69.0%
*-commutative69.0%
distribute-frac-neg69.0%
times-frac78.9%
associate-*l/80.2%
associate-*r/81.9%
distribute-rgt-neg-in81.9%
+-commutative81.9%
Simplified81.9%
if -5.19999999999999954e-4 < u < 1.76000000000000006e-37 or 0.660000000000000031 < u < 1.95e63Initial program 67.7%
associate-/r*79.3%
*-commutative79.3%
associate-/l*99.0%
associate-/l/99.1%
+-commutative99.1%
remove-double-neg99.1%
unsub-neg99.1%
div-sub99.1%
sub-neg99.1%
*-inverses99.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in t1 around inf 86.0%
mul-1-neg86.0%
unsub-neg86.0%
*-commutative86.0%
Simplified86.0%
if 1.76000000000000006e-37 < u < 0.660000000000000031Initial program 99.0%
times-frac64.5%
Simplified64.5%
*-commutative64.5%
clear-num64.5%
frac-2neg64.5%
frac-times59.4%
*-un-lft-identity59.4%
remove-double-neg59.4%
distribute-neg-in59.4%
add-sqr-sqrt38.7%
sqrt-unprod59.4%
sqr-neg59.4%
sqrt-unprod20.7%
add-sqr-sqrt59.4%
sub-neg59.4%
Applied egg-rr59.4%
associate-/r*70.2%
Simplified70.2%
div-inv64.7%
clear-num64.7%
sub-neg64.7%
add-sqr-sqrt26.0%
sqrt-unprod64.7%
sqr-neg64.7%
sqrt-unprod38.7%
add-sqr-sqrt64.7%
distribute-neg-in64.7%
associate-*l/64.5%
remove-double-neg64.5%
distribute-frac-neg64.5%
frac-2neg64.5%
distribute-frac-neg64.5%
clear-num64.5%
div-inv70.0%
associate-/r/99.6%
Applied egg-rr99.6%
if 1.95e63 < u Initial program 77.7%
times-frac97.4%
Simplified97.4%
*-commutative97.4%
clear-num97.4%
frac-2neg97.4%
frac-times87.0%
*-un-lft-identity87.0%
remove-double-neg87.0%
distribute-neg-in87.0%
add-sqr-sqrt36.5%
sqrt-unprod83.8%
sqr-neg83.8%
sqrt-unprod48.8%
add-sqr-sqrt85.4%
sub-neg85.4%
Applied egg-rr85.4%
associate-/r*88.3%
Simplified88.3%
Taylor expanded in t1 around 0 85.3%
Taylor expanded in v around 0 77.6%
associate-/r*80.2%
associate-*r/85.3%
associate-*r/85.8%
Simplified85.8%
Final simplification85.3%
(FPCore (u v t1) :precision binary64 (if (or (<= u -5.6e-5) (not (<= u 3.9e+64))) (* t1 (/ (/ v u) (- t1 u))) (/ v (- (* u -2.0) t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -5.6e-5) || !(u <= 3.9e+64)) {
tmp = t1 * ((v / u) / (t1 - u));
} 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 <= (-5.6d-5)) .or. (.not. (u <= 3.9d+64))) then
tmp = t1 * ((v / u) / (t1 - u))
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 <= -5.6e-5) || !(u <= 3.9e+64)) {
tmp = t1 * ((v / u) / (t1 - u));
} else {
tmp = v / ((u * -2.0) - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -5.6e-5) or not (u <= 3.9e+64): tmp = t1 * ((v / u) / (t1 - u)) else: tmp = v / ((u * -2.0) - t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -5.6e-5) || !(u <= 3.9e+64)) tmp = Float64(t1 * Float64(Float64(v / u) / Float64(t1 - u))); 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 <= -5.6e-5) || ~((u <= 3.9e+64))) tmp = t1 * ((v / u) / (t1 - u)); else tmp = v / ((u * -2.0) - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -5.6e-5], N[Not[LessEqual[u, 3.9e+64]], $MachinePrecision]], N[(t1 * N[(N[(v / u), $MachinePrecision] / N[(t1 - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -5.6 \cdot 10^{-5} \lor \neg \left(u \leq 3.9 \cdot 10^{+64}\right):\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{t1 - u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u \cdot -2 - t1}\\
\end{array}
\end{array}
if u < -5.59999999999999992e-5 or 3.8999999999999998e64 < u Initial program 78.9%
times-frac98.0%
Simplified98.0%
*-commutative98.0%
clear-num97.9%
frac-2neg97.9%
frac-times88.0%
*-un-lft-identity88.0%
remove-double-neg88.0%
distribute-neg-in88.0%
add-sqr-sqrt44.7%
sqrt-unprod83.5%
sqr-neg83.5%
sqrt-unprod41.0%
add-sqr-sqrt83.4%
sub-neg83.4%
Applied egg-rr83.4%
associate-/r*86.2%
Simplified86.2%
Taylor expanded in t1 around 0 82.6%
Taylor expanded in v around 0 72.9%
associate-/r*77.8%
associate-*r/82.5%
associate-*r/83.6%
Simplified83.6%
if -5.59999999999999992e-5 < u < 3.8999999999999998e64Initial program 69.6%
associate-/r*80.5%
*-commutative80.5%
associate-/l*99.0%
associate-/l/99.1%
+-commutative99.1%
remove-double-neg99.1%
unsub-neg99.1%
div-sub99.1%
sub-neg99.1%
*-inverses99.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in t1 around inf 81.6%
mul-1-neg81.6%
unsub-neg81.6%
*-commutative81.6%
Simplified81.6%
Final simplification82.6%
(FPCore (u v t1) :precision binary64 (if (or (<= u -0.00044) (not (<= u 1.15e+65))) (* (/ v u) (/ (- t1) u)) (/ v (- (* u -2.0) t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -0.00044) || !(u <= 1.15e+65)) {
tmp = (v / u) * (-t1 / u);
} 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 <= (-0.00044d0)) .or. (.not. (u <= 1.15d+65))) then
tmp = (v / u) * (-t1 / u)
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 <= -0.00044) || !(u <= 1.15e+65)) {
tmp = (v / u) * (-t1 / u);
} else {
tmp = v / ((u * -2.0) - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -0.00044) or not (u <= 1.15e+65): tmp = (v / u) * (-t1 / u) else: tmp = v / ((u * -2.0) - t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -0.00044) || !(u <= 1.15e+65)) tmp = Float64(Float64(v / u) * Float64(Float64(-t1) / u)); 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 <= -0.00044) || ~((u <= 1.15e+65))) tmp = (v / u) * (-t1 / u); else tmp = v / ((u * -2.0) - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -0.00044], N[Not[LessEqual[u, 1.15e+65]], $MachinePrecision]], N[(N[(v / u), $MachinePrecision] * N[((-t1) / u), $MachinePrecision]), $MachinePrecision], N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -0.00044 \lor \neg \left(u \leq 1.15 \cdot 10^{+65}\right):\\
\;\;\;\;\frac{v}{u} \cdot \frac{-t1}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u \cdot -2 - t1}\\
\end{array}
\end{array}
if u < -4.40000000000000016e-4 or 1.15e65 < u Initial program 78.9%
times-frac98.0%
Simplified98.0%
Taylor expanded in t1 around 0 80.7%
Taylor expanded in t1 around 0 80.0%
associate-*r/80.0%
mul-1-neg80.0%
Simplified80.0%
if -4.40000000000000016e-4 < u < 1.15e65Initial program 69.6%
associate-/r*80.5%
*-commutative80.5%
associate-/l*99.0%
associate-/l/99.1%
+-commutative99.1%
remove-double-neg99.1%
unsub-neg99.1%
div-sub99.1%
sub-neg99.1%
*-inverses99.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in t1 around inf 81.6%
mul-1-neg81.6%
unsub-neg81.6%
*-commutative81.6%
Simplified81.6%
Final simplification80.8%
(FPCore (u v t1) :precision binary64 (if (or (<= u -7.6e+146) (not (<= u 5e+167))) (* t1 (/ v (* t1 u))) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -7.6e+146) || !(u <= 5e+167)) {
tmp = t1 * (v / (t1 * u));
} else {
tmp = -v / t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-7.6d+146)) .or. (.not. (u <= 5d+167))) then
tmp = t1 * (v / (t1 * u))
else
tmp = -v / t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -7.6e+146) || !(u <= 5e+167)) {
tmp = t1 * (v / (t1 * u));
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -7.6e+146) or not (u <= 5e+167): tmp = t1 * (v / (t1 * u)) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -7.6e+146) || !(u <= 5e+167)) tmp = Float64(t1 * Float64(v / Float64(t1 * u))); else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -7.6e+146) || ~((u <= 5e+167))) tmp = t1 * (v / (t1 * u)); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -7.6e+146], N[Not[LessEqual[u, 5e+167]], $MachinePrecision]], N[(t1 * N[(v / N[(t1 * u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -7.6 \cdot 10^{+146} \lor \neg \left(u \leq 5 \cdot 10^{+167}\right):\\
\;\;\;\;t1 \cdot \frac{v}{t1 \cdot u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -7.59999999999999958e146 or 4.9999999999999997e167 < u Initial program 74.1%
times-frac99.1%
Simplified99.1%
*-commutative99.1%
clear-num99.1%
frac-2neg99.1%
frac-times91.2%
*-un-lft-identity91.2%
remove-double-neg91.2%
distribute-neg-in91.2%
add-sqr-sqrt46.2%
sqrt-unprod85.3%
sqr-neg85.3%
sqrt-unprod43.5%
add-sqr-sqrt89.7%
sub-neg89.7%
Applied egg-rr89.7%
associate-/r*93.9%
Simplified93.9%
Taylor expanded in t1 around 0 92.7%
Taylor expanded in v around 0 74.1%
associate-/r*84.9%
associate-*r/92.6%
associate-*r/90.1%
Simplified90.1%
Taylor expanded in u around 0 50.3%
*-commutative50.3%
Simplified50.3%
if -7.59999999999999958e146 < u < 4.9999999999999997e167Initial program 74.3%
times-frac96.3%
Simplified96.3%
Taylor expanded in t1 around inf 66.9%
associate-*r/66.9%
neg-mul-166.9%
Simplified66.9%
Final simplification62.7%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.55e+147) (not (<= u 6e+171))) (/ v u) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.55e+147) || !(u <= 6e+171)) {
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.55d+147)) .or. (.not. (u <= 6d+171))) 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.55e+147) || !(u <= 6e+171)) {
tmp = v / u;
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.55e+147) or not (u <= 6e+171): tmp = v / u else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.55e+147) || !(u <= 6e+171)) 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.55e+147) || ~((u <= 6e+171))) tmp = v / u; else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.55e+147], N[Not[LessEqual[u, 6e+171]], $MachinePrecision]], N[(v / u), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.55 \cdot 10^{+147} \lor \neg \left(u \leq 6 \cdot 10^{+171}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -1.55e147 or 6.0000000000000002e171 < u Initial program 73.7%
times-frac99.1%
Simplified99.1%
*-commutative99.1%
clear-num99.1%
frac-2neg99.1%
frac-times91.0%
*-un-lft-identity91.0%
remove-double-neg91.0%
distribute-neg-in91.0%
add-sqr-sqrt45.3%
sqrt-unprod85.1%
sqr-neg85.1%
sqrt-unprod44.2%
add-sqr-sqrt89.5%
sub-neg89.5%
Applied egg-rr89.5%
associate-/r*93.9%
Simplified93.9%
Taylor expanded in t1 around 0 94.1%
Taylor expanded in v around 0 73.7%
associate-/r*86.2%
associate-*r/93.9%
associate-*r/89.9%
Simplified89.9%
Taylor expanded in t1 around inf 45.2%
if -1.55e147 < u < 6.0000000000000002e171Initial program 74.4%
times-frac96.3%
Simplified96.3%
Taylor expanded in t1 around inf 67.0%
associate-*r/67.0%
neg-mul-167.0%
Simplified67.0%
Final simplification61.6%
(FPCore (u v t1) :precision binary64 (if (<= u -1e+109) (/ (- v) u) (if (<= u 1.9e+170) (/ (- v) t1) (/ v u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1e+109) {
tmp = -v / u;
} else if (u <= 1.9e+170) {
tmp = -v / t1;
} else {
tmp = v / u;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-1d+109)) then
tmp = -v / u
else if (u <= 1.9d+170) then
tmp = -v / t1
else
tmp = v / u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -1e+109) {
tmp = -v / u;
} else if (u <= 1.9e+170) {
tmp = -v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1e+109: tmp = -v / u elif u <= 1.9e+170: tmp = -v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1e+109) tmp = Float64(Float64(-v) / u); elseif (u <= 1.9e+170) 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 <= -1e+109) tmp = -v / u; elseif (u <= 1.9e+170) tmp = -v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1e+109], N[((-v) / u), $MachinePrecision], If[LessEqual[u, 1.9e+170], N[((-v) / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1 \cdot 10^{+109}:\\
\;\;\;\;\frac{-v}{u}\\
\mathbf{elif}\;u \leq 1.9 \cdot 10^{+170}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if u < -9.99999999999999982e108Initial program 75.5%
times-frac99.9%
Simplified99.9%
*-commutative99.9%
clear-num99.9%
frac-2neg99.9%
frac-times90.2%
*-un-lft-identity90.2%
remove-double-neg90.2%
distribute-neg-in90.2%
add-sqr-sqrt51.4%
sqrt-unprod85.4%
sqr-neg85.4%
sqrt-unprod38.8%
add-sqr-sqrt90.2%
sub-neg90.2%
Applied egg-rr90.2%
associate-/r*95.0%
Simplified95.0%
Taylor expanded in t1 around inf 37.1%
Taylor expanded in t1 around 0 37.1%
neg-mul-137.1%
distribute-neg-frac37.1%
Simplified37.1%
if -9.99999999999999982e108 < u < 1.8999999999999999e170Initial program 74.3%
times-frac96.2%
Simplified96.2%
Taylor expanded in t1 around inf 68.7%
associate-*r/68.7%
neg-mul-168.7%
Simplified68.7%
if 1.8999999999999999e170 < u Initial program 72.2%
times-frac98.4%
Simplified98.4%
*-commutative98.4%
clear-num98.4%
frac-2neg98.4%
frac-times91.2%
*-un-lft-identity91.2%
remove-double-neg91.2%
distribute-neg-in91.2%
add-sqr-sqrt42.4%
sqrt-unprod85.5%
sqr-neg85.5%
sqrt-unprod45.8%
add-sqr-sqrt88.3%
sub-neg88.3%
Applied egg-rr88.3%
associate-/r*91.1%
Simplified91.1%
Taylor expanded in t1 around 0 91.3%
Taylor expanded in v around 0 72.2%
associate-/r*82.3%
associate-*r/91.4%
associate-*r/89.2%
Simplified89.2%
Taylor expanded in t1 around inf 51.1%
Final simplification61.6%
(FPCore (u v t1) :precision binary64 (if (<= u -1e+109) (/ -0.5 (/ u v)) (if (<= u 7.2e+171) (/ (- v) t1) (/ v u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1e+109) {
tmp = -0.5 / (u / v);
} else if (u <= 7.2e+171) {
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 <= (-1d+109)) then
tmp = (-0.5d0) / (u / v)
else if (u <= 7.2d+171) 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 <= -1e+109) {
tmp = -0.5 / (u / v);
} else if (u <= 7.2e+171) {
tmp = -v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1e+109: tmp = -0.5 / (u / v) elif u <= 7.2e+171: tmp = -v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1e+109) tmp = Float64(-0.5 / Float64(u / v)); elseif (u <= 7.2e+171) 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 <= -1e+109) tmp = -0.5 / (u / v); elseif (u <= 7.2e+171) tmp = -v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1e+109], N[(-0.5 / N[(u / v), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 7.2e+171], N[((-v) / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1 \cdot 10^{+109}:\\
\;\;\;\;\frac{-0.5}{\frac{u}{v}}\\
\mathbf{elif}\;u \leq 7.2 \cdot 10^{+171}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if u < -9.99999999999999982e108Initial program 75.5%
associate-/r*90.0%
*-commutative90.0%
associate-/l*99.8%
associate-/l/85.5%
+-commutative85.5%
remove-double-neg85.5%
unsub-neg85.5%
div-sub85.5%
sub-neg85.5%
*-inverses85.5%
metadata-eval85.5%
Simplified85.5%
Taylor expanded in t1 around inf 42.1%
mul-1-neg42.1%
unsub-neg42.1%
*-commutative42.1%
Simplified42.1%
Taylor expanded in u around inf 37.1%
associate-*r/37.1%
associate-/l*37.3%
Simplified37.3%
if -9.99999999999999982e108 < u < 7.20000000000000036e171Initial program 74.3%
times-frac96.2%
Simplified96.2%
Taylor expanded in t1 around inf 68.7%
associate-*r/68.7%
neg-mul-168.7%
Simplified68.7%
if 7.20000000000000036e171 < u Initial program 72.2%
times-frac98.4%
Simplified98.4%
*-commutative98.4%
clear-num98.4%
frac-2neg98.4%
frac-times91.2%
*-un-lft-identity91.2%
remove-double-neg91.2%
distribute-neg-in91.2%
add-sqr-sqrt42.4%
sqrt-unprod85.5%
sqr-neg85.5%
sqrt-unprod45.8%
add-sqr-sqrt88.3%
sub-neg88.3%
Applied egg-rr88.3%
associate-/r*91.1%
Simplified91.1%
Taylor expanded in t1 around 0 91.3%
Taylor expanded in v around 0 72.2%
associate-/r*82.3%
associate-*r/91.4%
associate-*r/89.2%
Simplified89.2%
Taylor expanded in t1 around inf 51.1%
Final simplification61.7%
(FPCore (u v t1) :precision binary64 (/ v (- (* u -2.0) t1)))
double code(double u, double v, double t1) {
return v / ((u * -2.0) - 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 * (-2.0d0)) - t1)
end function
public static double code(double u, double v, double t1) {
return v / ((u * -2.0) - t1);
}
def code(u, v, t1): return v / ((u * -2.0) - t1)
function code(u, v, t1) return Float64(v / Float64(Float64(u * -2.0) - t1)) end
function tmp = code(u, v, t1) tmp = v / ((u * -2.0) - t1); end
code[u_, v_, t1_] := N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{u \cdot -2 - t1}
\end{array}
Initial program 74.2%
associate-/r*85.9%
*-commutative85.9%
associate-/l*98.5%
associate-/l/93.5%
+-commutative93.5%
remove-double-neg93.5%
unsub-neg93.5%
div-sub93.5%
sub-neg93.5%
*-inverses93.5%
metadata-eval93.5%
Simplified93.5%
Taylor expanded in t1 around inf 65.1%
mul-1-neg65.1%
unsub-neg65.1%
*-commutative65.1%
Simplified65.1%
Final simplification65.1%
(FPCore (u v t1) :precision binary64 (/ v u))
double code(double u, double v, double t1) {
return v / u;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = v / u
end function
public static double code(double u, double v, double t1) {
return v / u;
}
def code(u, v, t1): return v / u
function code(u, v, t1) return Float64(v / u) end
function tmp = code(u, v, t1) tmp = v / u; end
code[u_, v_, t1_] := N[(v / u), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{u}
\end{array}
Initial program 74.2%
times-frac97.0%
Simplified97.0%
*-commutative97.0%
clear-num96.2%
frac-2neg96.2%
frac-times82.9%
*-un-lft-identity82.9%
remove-double-neg82.9%
distribute-neg-in82.9%
add-sqr-sqrt40.4%
sqrt-unprod64.9%
sqr-neg64.9%
sqrt-unprod26.8%
add-sqr-sqrt54.9%
sub-neg54.9%
Applied egg-rr54.9%
associate-/r*58.5%
Simplified58.5%
Taylor expanded in t1 around 0 50.9%
Taylor expanded in v around 0 45.8%
associate-/r*49.4%
associate-*r/50.1%
associate-*r/50.0%
Simplified50.0%
Taylor expanded in t1 around inf 17.7%
Final simplification17.7%
herbie shell --seed 2024021
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))