
(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) (+ 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 69.6%
times-frac97.3%
Simplified97.3%
Final simplification97.3%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (* t1 (/ (/ v u) u))))
(if (<= u -1.06e+219)
t_1
(if (<= u -3.75e+118)
(/ v (- (* u -2.0) t1))
(if (or (<= u -6.8e+64) (not (<= u 1.7e+126))) t_1 (/ (- v) t1))))))
double code(double u, double v, double t1) {
double t_1 = t1 * ((v / u) / u);
double tmp;
if (u <= -1.06e+219) {
tmp = t_1;
} else if (u <= -3.75e+118) {
tmp = v / ((u * -2.0) - t1);
} else if ((u <= -6.8e+64) || !(u <= 1.7e+126)) {
tmp = t_1;
} else {
tmp = -v / t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: t_1
real(8) :: tmp
t_1 = t1 * ((v / u) / u)
if (u <= (-1.06d+219)) then
tmp = t_1
else if (u <= (-3.75d+118)) then
tmp = v / ((u * (-2.0d0)) - t1)
else if ((u <= (-6.8d+64)) .or. (.not. (u <= 1.7d+126))) then
tmp = t_1
else
tmp = -v / t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = t1 * ((v / u) / u);
double tmp;
if (u <= -1.06e+219) {
tmp = t_1;
} else if (u <= -3.75e+118) {
tmp = v / ((u * -2.0) - t1);
} else if ((u <= -6.8e+64) || !(u <= 1.7e+126)) {
tmp = t_1;
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): t_1 = t1 * ((v / u) / u) tmp = 0 if u <= -1.06e+219: tmp = t_1 elif u <= -3.75e+118: tmp = v / ((u * -2.0) - t1) elif (u <= -6.8e+64) or not (u <= 1.7e+126): tmp = t_1 else: tmp = -v / t1 return tmp
function code(u, v, t1) t_1 = Float64(t1 * Float64(Float64(v / u) / u)) tmp = 0.0 if (u <= -1.06e+219) tmp = t_1; elseif (u <= -3.75e+118) tmp = Float64(v / Float64(Float64(u * -2.0) - t1)); elseif ((u <= -6.8e+64) || !(u <= 1.7e+126)) tmp = t_1; else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = t1 * ((v / u) / u); tmp = 0.0; if (u <= -1.06e+219) tmp = t_1; elseif (u <= -3.75e+118) tmp = v / ((u * -2.0) - t1); elseif ((u <= -6.8e+64) || ~((u <= 1.7e+126))) tmp = t_1; else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(t1 * N[(N[(v / u), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[u, -1.06e+219], t$95$1, If[LessEqual[u, -3.75e+118], N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[u, -6.8e+64], N[Not[LessEqual[u, 1.7e+126]], $MachinePrecision]], t$95$1, N[((-v) / t1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t1 \cdot \frac{\frac{v}{u}}{u}\\
\mathbf{if}\;u \leq -1.06 \cdot 10^{+219}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;u \leq -3.75 \cdot 10^{+118}:\\
\;\;\;\;\frac{v}{u \cdot -2 - t1}\\
\mathbf{elif}\;u \leq -6.8 \cdot 10^{+64} \lor \neg \left(u \leq 1.7 \cdot 10^{+126}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -1.06e219 or -3.75000000000000001e118 < u < -6.8000000000000003e64 or 1.69999999999999995e126 < u Initial program 82.6%
times-frac99.9%
Simplified99.9%
Taylor expanded in t1 around 0 94.9%
associate-*r/94.9%
mul-1-neg94.9%
Simplified94.9%
*-commutative94.9%
clear-num94.9%
frac-2neg94.9%
frac-times88.4%
*-un-lft-identity88.4%
remove-double-neg88.4%
Applied egg-rr88.4%
Taylor expanded in t1 around 0 88.4%
clear-num88.4%
associate-/r/88.3%
associate-/r*88.4%
clear-num88.4%
add-sqr-sqrt46.6%
sqrt-unprod80.2%
sqr-neg80.2%
sqrt-unprod36.1%
add-sqr-sqrt74.8%
Applied egg-rr74.8%
if -1.06e219 < u < -3.75000000000000001e118Initial program 47.5%
associate-/r*82.1%
*-commutative82.1%
associate-/l*99.9%
associate-/l/82.8%
+-commutative82.8%
remove-double-neg82.8%
unsub-neg82.8%
div-sub82.8%
sub-neg82.8%
*-inverses82.8%
metadata-eval82.8%
Simplified82.8%
Taylor expanded in t1 around inf 53.8%
mul-1-neg53.8%
unsub-neg53.8%
*-commutative53.8%
Simplified53.8%
if -6.8000000000000003e64 < u < 1.69999999999999995e126Initial program 67.0%
times-frac95.9%
Simplified95.9%
Taylor expanded in t1 around inf 71.8%
associate-*r/71.8%
neg-mul-171.8%
Simplified71.8%
Final simplification71.1%
(FPCore (u v t1) :precision binary64 (if (or (<= u -3e-78) (not (<= u 2.2e+17))) (* (/ v (+ t1 u)) (/ (- t1) u)) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -3e-78) || !(u <= 2.2e+17)) {
tmp = (v / (t1 + u)) * (-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 <= (-3d-78)) .or. (.not. (u <= 2.2d+17))) then
tmp = (v / (t1 + u)) * (-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 <= -3e-78) || !(u <= 2.2e+17)) {
tmp = (v / (t1 + u)) * (-t1 / u);
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -3e-78) or not (u <= 2.2e+17): tmp = (v / (t1 + u)) * (-t1 / u) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -3e-78) || !(u <= 2.2e+17)) tmp = Float64(Float64(v / Float64(t1 + u)) * Float64(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 <= -3e-78) || ~((u <= 2.2e+17))) tmp = (v / (t1 + u)) * (-t1 / u); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -3e-78], N[Not[LessEqual[u, 2.2e+17]], $MachinePrecision]], N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[((-t1) / u), $MachinePrecision]), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3 \cdot 10^{-78} \lor \neg \left(u \leq 2.2 \cdot 10^{+17}\right):\\
\;\;\;\;\frac{v}{t1 + u} \cdot \frac{-t1}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -2.99999999999999988e-78 or 2.2e17 < u Initial program 72.6%
times-frac97.9%
Simplified97.9%
Taylor expanded in t1 around 0 79.4%
associate-*r/79.4%
mul-1-neg79.4%
Simplified79.4%
if -2.99999999999999988e-78 < u < 2.2e17Initial program 65.7%
times-frac96.6%
Simplified96.6%
Taylor expanded in t1 around inf 85.4%
associate-*r/85.4%
neg-mul-185.4%
Simplified85.4%
Final simplification82.0%
(FPCore (u v t1) :precision binary64 (if (or (<= u -2e-34) (not (<= u 4.4e+19))) (/ (* t1 (/ v (+ t1 u))) (- u)) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -2e-34) || !(u <= 4.4e+19)) {
tmp = (t1 * (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 <= (-2d-34)) .or. (.not. (u <= 4.4d+19))) then
tmp = (t1 * (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 <= -2e-34) || !(u <= 4.4e+19)) {
tmp = (t1 * (v / (t1 + u))) / -u;
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -2e-34) or not (u <= 4.4e+19): tmp = (t1 * (v / (t1 + u))) / -u else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -2e-34) || !(u <= 4.4e+19)) tmp = Float64(Float64(t1 * Float64(v / Float64(t1 + u))) / Float64(-u)); else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -2e-34) || ~((u <= 4.4e+19))) tmp = (t1 * (v / (t1 + u))) / -u; else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2e-34], N[Not[LessEqual[u, 4.4e+19]], $MachinePrecision]], N[(N[(t1 * N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2 \cdot 10^{-34} \lor \neg \left(u \leq 4.4 \cdot 10^{+19}\right):\\
\;\;\;\;\frac{t1 \cdot \frac{v}{t1 + u}}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -1.99999999999999986e-34 or 4.4e19 < u Initial program 74.5%
times-frac98.4%
Simplified98.4%
Taylor expanded in t1 around 0 82.9%
associate-*r/82.9%
mul-1-neg82.9%
Simplified82.9%
frac-2neg82.9%
remove-double-neg82.9%
associate-*l/84.3%
Applied egg-rr84.3%
if -1.99999999999999986e-34 < u < 4.4e19Initial program 64.7%
times-frac96.3%
Simplified96.3%
Taylor expanded in t1 around inf 80.4%
associate-*r/80.4%
neg-mul-180.4%
Simplified80.4%
Final simplification82.4%
(FPCore (u v t1) :precision binary64 (if (<= u -2.5e-78) (/ t1 (* u (/ (- (- t1) u) v))) (if (<= u 7.5e+18) (/ (- v) t1) (* (/ v (+ t1 u)) (/ (- t1) u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -2.5e-78) {
tmp = t1 / (u * ((-t1 - u) / v));
} else if (u <= 7.5e+18) {
tmp = -v / t1;
} else {
tmp = (v / (t1 + u)) * (-t1 / u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-2.5d-78)) then
tmp = t1 / (u * ((-t1 - u) / v))
else if (u <= 7.5d+18) then
tmp = -v / t1
else
tmp = (v / (t1 + u)) * (-t1 / u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -2.5e-78) {
tmp = t1 / (u * ((-t1 - u) / v));
} else if (u <= 7.5e+18) {
tmp = -v / t1;
} else {
tmp = (v / (t1 + u)) * (-t1 / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -2.5e-78: tmp = t1 / (u * ((-t1 - u) / v)) elif u <= 7.5e+18: tmp = -v / t1 else: tmp = (v / (t1 + u)) * (-t1 / u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -2.5e-78) tmp = Float64(t1 / Float64(u * Float64(Float64(Float64(-t1) - u) / v))); elseif (u <= 7.5e+18) tmp = Float64(Float64(-v) / t1); else tmp = Float64(Float64(v / Float64(t1 + u)) * Float64(Float64(-t1) / u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -2.5e-78) tmp = t1 / (u * ((-t1 - u) / v)); elseif (u <= 7.5e+18) tmp = -v / t1; else tmp = (v / (t1 + u)) * (-t1 / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -2.5e-78], N[(t1 / N[(u * N[(N[((-t1) - u), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 7.5e+18], N[((-v) / t1), $MachinePrecision], N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[((-t1) / u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.5 \cdot 10^{-78}:\\
\;\;\;\;\frac{t1}{u \cdot \frac{\left(-t1\right) - u}{v}}\\
\mathbf{elif}\;u \leq 7.5 \cdot 10^{+18}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{t1 + u} \cdot \frac{-t1}{u}\\
\end{array}
\end{array}
if u < -2.4999999999999998e-78Initial program 70.5%
times-frac97.6%
Simplified97.6%
Taylor expanded in t1 around 0 77.1%
associate-*r/77.1%
mul-1-neg77.1%
Simplified77.1%
*-commutative77.1%
clear-num78.0%
frac-2neg78.0%
frac-times77.2%
*-un-lft-identity77.2%
remove-double-neg77.2%
Applied egg-rr77.2%
if -2.4999999999999998e-78 < u < 7.5e18Initial program 65.7%
times-frac96.6%
Simplified96.6%
Taylor expanded in t1 around inf 85.4%
associate-*r/85.4%
neg-mul-185.4%
Simplified85.4%
if 7.5e18 < u Initial program 75.7%
times-frac98.3%
Simplified98.3%
Taylor expanded in t1 around 0 82.6%
associate-*r/82.6%
mul-1-neg82.6%
Simplified82.6%
Final simplification82.0%
(FPCore (u v t1) :precision binary64 (if (<= u -2.7e-78) (/ (/ v (/ (- t1 u) t1)) (+ t1 u)) (if (<= u 8e+20) (/ (- v) t1) (/ (* t1 (/ v (+ t1 u))) (- u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -2.7e-78) {
tmp = (v / ((t1 - u) / t1)) / (t1 + u);
} else if (u <= 8e+20) {
tmp = -v / t1;
} else {
tmp = (t1 * (v / (t1 + u))) / -u;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-2.7d-78)) then
tmp = (v / ((t1 - u) / t1)) / (t1 + u)
else if (u <= 8d+20) then
tmp = -v / t1
else
tmp = (t1 * (v / (t1 + u))) / -u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -2.7e-78) {
tmp = (v / ((t1 - u) / t1)) / (t1 + u);
} else if (u <= 8e+20) {
tmp = -v / t1;
} else {
tmp = (t1 * (v / (t1 + u))) / -u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -2.7e-78: tmp = (v / ((t1 - u) / t1)) / (t1 + u) elif u <= 8e+20: tmp = -v / t1 else: tmp = (t1 * (v / (t1 + u))) / -u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -2.7e-78) tmp = Float64(Float64(v / Float64(Float64(t1 - u) / t1)) / Float64(t1 + u)); elseif (u <= 8e+20) tmp = Float64(Float64(-v) / t1); else tmp = Float64(Float64(t1 * Float64(v / Float64(t1 + u))) / Float64(-u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -2.7e-78) tmp = (v / ((t1 - u) / t1)) / (t1 + u); elseif (u <= 8e+20) tmp = -v / t1; else tmp = (t1 * (v / (t1 + u))) / -u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -2.7e-78], N[(N[(v / N[(N[(t1 - u), $MachinePrecision] / t1), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 8e+20], N[((-v) / t1), $MachinePrecision], N[(N[(t1 * N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.7 \cdot 10^{-78}:\\
\;\;\;\;\frac{\frac{v}{\frac{t1 - u}{t1}}}{t1 + u}\\
\mathbf{elif}\;u \leq 8 \cdot 10^{+20}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{t1 + u}}{-u}\\
\end{array}
\end{array}
if u < -2.69999999999999994e-78Initial program 70.5%
times-frac97.6%
Simplified97.6%
associate-*r/96.4%
clear-num96.3%
associate-*l/96.4%
*-un-lft-identity96.4%
frac-2neg96.4%
distribute-neg-in96.4%
add-sqr-sqrt41.0%
sqrt-unprod78.2%
sqr-neg78.2%
sqrt-unprod43.6%
add-sqr-sqrt77.9%
sub-neg77.9%
remove-double-neg77.9%
Applied egg-rr77.9%
if -2.69999999999999994e-78 < u < 8e20Initial program 65.7%
times-frac96.6%
Simplified96.6%
Taylor expanded in t1 around inf 85.4%
associate-*r/85.4%
neg-mul-185.4%
Simplified85.4%
if 8e20 < u Initial program 75.7%
times-frac98.3%
Simplified98.3%
Taylor expanded in t1 around 0 82.6%
associate-*r/82.6%
mul-1-neg82.6%
Simplified82.6%
frac-2neg82.6%
remove-double-neg82.6%
associate-*l/84.0%
Applied egg-rr84.0%
Final simplification82.6%
(FPCore (u v t1) :precision binary64 (if (<= u -2.5e-78) (* (/ (- t1) u) (/ v u)) (if (<= u 2.5e+20) (/ (- v) t1) (/ (* v (/ t1 u)) (- t1 u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -2.5e-78) {
tmp = (-t1 / u) * (v / u);
} else if (u <= 2.5e+20) {
tmp = -v / t1;
} else {
tmp = (v * (t1 / u)) / (t1 - u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-2.5d-78)) then
tmp = (-t1 / u) * (v / u)
else if (u <= 2.5d+20) then
tmp = -v / t1
else
tmp = (v * (t1 / u)) / (t1 - u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -2.5e-78) {
tmp = (-t1 / u) * (v / u);
} else if (u <= 2.5e+20) {
tmp = -v / t1;
} else {
tmp = (v * (t1 / u)) / (t1 - u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -2.5e-78: tmp = (-t1 / u) * (v / u) elif u <= 2.5e+20: tmp = -v / t1 else: tmp = (v * (t1 / u)) / (t1 - u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -2.5e-78) tmp = Float64(Float64(Float64(-t1) / u) * Float64(v / u)); elseif (u <= 2.5e+20) tmp = Float64(Float64(-v) / t1); else tmp = Float64(Float64(v * Float64(t1 / u)) / Float64(t1 - u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -2.5e-78) tmp = (-t1 / u) * (v / u); elseif (u <= 2.5e+20) tmp = -v / t1; else tmp = (v * (t1 / u)) / (t1 - u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -2.5e-78], N[(N[((-t1) / u), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 2.5e+20], N[((-v) / t1), $MachinePrecision], N[(N[(v * N[(t1 / u), $MachinePrecision]), $MachinePrecision] / N[(t1 - u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.5 \cdot 10^{-78}:\\
\;\;\;\;\frac{-t1}{u} \cdot \frac{v}{u}\\
\mathbf{elif}\;u \leq 2.5 \cdot 10^{+20}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v \cdot \frac{t1}{u}}{t1 - u}\\
\end{array}
\end{array}
if u < -2.4999999999999998e-78Initial program 70.5%
times-frac97.6%
Simplified97.6%
Taylor expanded in t1 around 0 77.1%
associate-*r/77.1%
mul-1-neg77.1%
Simplified77.1%
Taylor expanded in t1 around 0 76.3%
if -2.4999999999999998e-78 < u < 2.5e20Initial program 65.7%
times-frac96.6%
Simplified96.6%
Taylor expanded in t1 around inf 85.4%
associate-*r/85.4%
neg-mul-185.4%
Simplified85.4%
if 2.5e20 < u Initial program 75.7%
times-frac98.3%
Simplified98.3%
Taylor expanded in t1 around 0 82.6%
associate-*r/82.6%
mul-1-neg82.6%
Simplified82.6%
associate-*r/80.9%
frac-2neg80.9%
add-sqr-sqrt34.0%
sqrt-unprod55.2%
sqr-neg55.2%
sqrt-unprod33.0%
add-sqr-sqrt54.4%
distribute-lft-neg-out54.4%
distribute-frac-neg54.4%
*-commutative54.4%
add-sqr-sqrt21.4%
sqrt-unprod49.9%
sqr-neg49.9%
sqrt-unprod46.8%
add-sqr-sqrt80.9%
distribute-neg-in80.9%
Applied egg-rr81.2%
Final simplification81.4%
(FPCore (u v t1) :precision binary64 (if (or (<= u -3e-78) (not (<= u 2.25e+19))) (* t1 (/ (/ (- v) u) u)) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -3e-78) || !(u <= 2.25e+19)) {
tmp = t1 * ((-v / 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 <= (-3d-78)) .or. (.not. (u <= 2.25d+19))) then
tmp = t1 * ((-v / 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 <= -3e-78) || !(u <= 2.25e+19)) {
tmp = t1 * ((-v / u) / u);
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -3e-78) or not (u <= 2.25e+19): tmp = t1 * ((-v / u) / u) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -3e-78) || !(u <= 2.25e+19)) tmp = Float64(t1 * Float64(Float64(Float64(-v) / u) / u)); else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -3e-78) || ~((u <= 2.25e+19))) tmp = t1 * ((-v / u) / u); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -3e-78], N[Not[LessEqual[u, 2.25e+19]], $MachinePrecision]], N[(t1 * N[(N[((-v) / u), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3 \cdot 10^{-78} \lor \neg \left(u \leq 2.25 \cdot 10^{+19}\right):\\
\;\;\;\;t1 \cdot \frac{\frac{-v}{u}}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -2.99999999999999988e-78 or 2.25e19 < u Initial program 72.6%
times-frac97.9%
Simplified97.9%
Taylor expanded in t1 around 0 79.4%
associate-*r/79.4%
mul-1-neg79.4%
Simplified79.4%
*-commutative79.4%
clear-num79.9%
frac-2neg79.9%
frac-times77.1%
*-un-lft-identity77.1%
remove-double-neg77.1%
Applied egg-rr77.1%
Taylor expanded in t1 around 0 76.0%
frac-2neg76.0%
div-inv76.0%
distribute-rgt-neg-out76.0%
remove-double-neg76.0%
add-sqr-sqrt31.9%
sqrt-unprod56.6%
sqr-neg56.6%
sqrt-unprod25.9%
add-sqr-sqrt49.0%
associate-/r*49.0%
clear-num49.0%
add-sqr-sqrt25.9%
sqrt-unprod56.6%
sqr-neg56.6%
sqrt-unprod31.9%
add-sqr-sqrt76.0%
Applied egg-rr76.0%
if -2.99999999999999988e-78 < u < 2.25e19Initial program 65.7%
times-frac96.6%
Simplified96.6%
Taylor expanded in t1 around inf 85.4%
associate-*r/85.4%
neg-mul-185.4%
Simplified85.4%
Final simplification80.1%
(FPCore (u v t1) :precision binary64 (if (or (<= u -2.7e-78) (not (<= u 8.5e+21))) (* (/ (- t1) u) (/ v u)) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.7e-78) || !(u <= 8.5e+21)) {
tmp = (-t1 / u) * (v / u);
} else {
tmp = -v / t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-2.7d-78)) .or. (.not. (u <= 8.5d+21))) then
tmp = (-t1 / u) * (v / u)
else
tmp = -v / t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.7e-78) || !(u <= 8.5e+21)) {
tmp = (-t1 / u) * (v / u);
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -2.7e-78) or not (u <= 8.5e+21): tmp = (-t1 / u) * (v / u) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -2.7e-78) || !(u <= 8.5e+21)) tmp = Float64(Float64(Float64(-t1) / u) * Float64(v / u)); else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -2.7e-78) || ~((u <= 8.5e+21))) tmp = (-t1 / u) * (v / u); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2.7e-78], N[Not[LessEqual[u, 8.5e+21]], $MachinePrecision]], N[(N[((-t1) / u), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.7 \cdot 10^{-78} \lor \neg \left(u \leq 8.5 \cdot 10^{+21}\right):\\
\;\;\;\;\frac{-t1}{u} \cdot \frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -2.69999999999999994e-78 or 8.5e21 < u Initial program 72.6%
times-frac97.9%
Simplified97.9%
Taylor expanded in t1 around 0 79.4%
associate-*r/79.4%
mul-1-neg79.4%
Simplified79.4%
Taylor expanded in t1 around 0 78.3%
if -2.69999999999999994e-78 < u < 8.5e21Initial program 65.7%
times-frac96.6%
Simplified96.6%
Taylor expanded in t1 around inf 85.4%
associate-*r/85.4%
neg-mul-185.4%
Simplified85.4%
Final simplification81.4%
(FPCore (u v t1) :precision binary64 (if (or (<= u -3.1e+73) (not (<= u 1.35e+140))) (* (/ v u) (/ t1 u)) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.1e+73) || !(u <= 1.35e+140)) {
tmp = (v / u) * (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 <= (-3.1d+73)) .or. (.not. (u <= 1.35d+140))) then
tmp = (v / u) * (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 <= -3.1e+73) || !(u <= 1.35e+140)) {
tmp = (v / u) * (t1 / u);
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -3.1e+73) or not (u <= 1.35e+140): tmp = (v / u) * (t1 / u) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -3.1e+73) || !(u <= 1.35e+140)) tmp = Float64(Float64(v / u) * 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 <= -3.1e+73) || ~((u <= 1.35e+140))) tmp = (v / u) * (t1 / u); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -3.1e+73], N[Not[LessEqual[u, 1.35e+140]], $MachinePrecision]], N[(N[(v / u), $MachinePrecision] * N[(t1 / u), $MachinePrecision]), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.1 \cdot 10^{+73} \lor \neg \left(u \leq 1.35 \cdot 10^{+140}\right):\\
\;\;\;\;\frac{v}{u} \cdot \frac{t1}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -3.1e73 or 1.35000000000000009e140 < u Initial program 73.1%
times-frac99.9%
Simplified99.9%
Taylor expanded in t1 around 0 89.5%
associate-*r/89.5%
mul-1-neg89.5%
Simplified89.5%
*-commutative89.5%
clear-num89.4%
frac-2neg89.4%
frac-times83.3%
*-un-lft-identity83.3%
remove-double-neg83.3%
Applied egg-rr83.3%
Taylor expanded in t1 around 0 83.4%
*-un-lft-identity83.4%
times-frac89.6%
clear-num89.7%
add-sqr-sqrt55.3%
sqrt-unprod72.5%
sqr-neg72.5%
sqrt-unprod27.5%
add-sqr-sqrt65.5%
Applied egg-rr65.5%
if -3.1e73 < u < 1.35000000000000009e140Initial program 67.8%
times-frac96.0%
Simplified96.0%
Taylor expanded in t1 around inf 71.3%
associate-*r/71.3%
neg-mul-171.3%
Simplified71.3%
Final simplification69.3%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.4e+64) (not (<= u 2.85e+127))) (* t1 (/ (/ v u) u)) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.4e+64) || !(u <= 2.85e+127)) {
tmp = t1 * ((v / 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 <= (-1.4d+64)) .or. (.not. (u <= 2.85d+127))) then
tmp = t1 * ((v / 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 <= -1.4e+64) || !(u <= 2.85e+127)) {
tmp = t1 * ((v / u) / u);
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.4e+64) or not (u <= 2.85e+127): tmp = t1 * ((v / u) / u) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.4e+64) || !(u <= 2.85e+127)) tmp = Float64(t1 * Float64(Float64(v / u) / u)); else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -1.4e+64) || ~((u <= 2.85e+127))) tmp = t1 * ((v / u) / u); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.4e+64], N[Not[LessEqual[u, 2.85e+127]], $MachinePrecision]], N[(t1 * N[(N[(v / u), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.4 \cdot 10^{+64} \lor \neg \left(u \leq 2.85 \cdot 10^{+127}\right):\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -1.40000000000000012e64 or 2.85000000000000021e127 < u Initial program 74.3%
times-frac99.9%
Simplified99.9%
Taylor expanded in t1 around 0 89.9%
associate-*r/89.9%
mul-1-neg89.9%
Simplified89.9%
*-commutative89.9%
clear-num89.9%
frac-2neg89.9%
frac-times84.1%
*-un-lft-identity84.1%
remove-double-neg84.1%
Applied egg-rr84.1%
Taylor expanded in t1 around 0 84.1%
clear-num84.0%
associate-/r/84.0%
associate-/r*84.1%
clear-num84.1%
add-sqr-sqrt52.1%
sqrt-unprod72.6%
sqr-neg72.6%
sqrt-unprod27.6%
add-sqr-sqrt65.2%
Applied egg-rr65.2%
if -1.40000000000000012e64 < u < 2.85000000000000021e127Initial program 67.0%
times-frac95.9%
Simplified95.9%
Taylor expanded in t1 around inf 71.8%
associate-*r/71.8%
neg-mul-171.8%
Simplified71.8%
Final simplification69.4%
(FPCore (u v t1) :precision binary64 (if (<= u -1.4e+146) (/ -0.5 (/ u v)) (if (<= u 2.2e+140) (/ (- v) t1) (/ (* v 0.5) u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.4e+146) {
tmp = -0.5 / (u / v);
} else if (u <= 2.2e+140) {
tmp = -v / t1;
} else {
tmp = (v * 0.5) / 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 <= (-1.4d+146)) then
tmp = (-0.5d0) / (u / v)
else if (u <= 2.2d+140) then
tmp = -v / t1
else
tmp = (v * 0.5d0) / u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -1.4e+146) {
tmp = -0.5 / (u / v);
} else if (u <= 2.2e+140) {
tmp = -v / t1;
} else {
tmp = (v * 0.5) / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.4e+146: tmp = -0.5 / (u / v) elif u <= 2.2e+140: tmp = -v / t1 else: tmp = (v * 0.5) / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.4e+146) tmp = Float64(-0.5 / Float64(u / v)); elseif (u <= 2.2e+140) tmp = Float64(Float64(-v) / t1); else tmp = Float64(Float64(v * 0.5) / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -1.4e+146) tmp = -0.5 / (u / v); elseif (u <= 2.2e+140) tmp = -v / t1; else tmp = (v * 0.5) / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.4e+146], N[(-0.5 / N[(u / v), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 2.2e+140], N[((-v) / t1), $MachinePrecision], N[(N[(v * 0.5), $MachinePrecision] / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.4 \cdot 10^{+146}:\\
\;\;\;\;\frac{-0.5}{\frac{u}{v}}\\
\mathbf{elif}\;u \leq 2.2 \cdot 10^{+140}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v \cdot 0.5}{u}\\
\end{array}
\end{array}
if u < -1.4e146Initial program 64.5%
associate-/r*88.8%
*-commutative88.8%
associate-/l*99.9%
associate-/l/81.3%
+-commutative81.3%
remove-double-neg81.3%
unsub-neg81.3%
div-sub81.3%
sub-neg81.3%
*-inverses81.3%
metadata-eval81.3%
Simplified81.3%
Taylor expanded in t1 around inf 39.4%
mul-1-neg39.4%
unsub-neg39.4%
*-commutative39.4%
Simplified39.4%
Taylor expanded in u around inf 32.3%
*-commutative32.3%
Simplified32.3%
Taylor expanded in v around 0 32.3%
associate-*r/32.3%
*-rgt-identity32.3%
times-frac32.3%
/-rgt-identity32.3%
associate-/r/34.9%
Simplified34.9%
if -1.4e146 < u < 2.1999999999999998e140Initial program 69.6%
times-frac96.4%
Simplified96.4%
Taylor expanded in t1 around inf 67.7%
associate-*r/67.7%
neg-mul-167.7%
Simplified67.7%
if 2.1999999999999998e140 < u Initial program 74.7%
associate-/r*88.4%
*-commutative88.4%
associate-/l*99.8%
associate-/l/88.9%
+-commutative88.9%
remove-double-neg88.9%
unsub-neg88.9%
div-sub88.9%
sub-neg88.9%
*-inverses88.9%
metadata-eval88.9%
Simplified88.9%
Taylor expanded in t1 around inf 42.3%
mul-1-neg42.3%
unsub-neg42.3%
*-commutative42.3%
Simplified42.3%
Taylor expanded in u around inf 35.8%
*-commutative35.8%
Simplified35.8%
associate-*l/35.8%
frac-2neg35.8%
add-sqr-sqrt0.0%
sqrt-unprod64.6%
sqr-neg64.6%
sqrt-unprod36.4%
add-sqr-sqrt36.4%
Applied egg-rr36.4%
distribute-rgt-neg-in36.4%
metadata-eval36.4%
Simplified36.4%
Final simplification59.0%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.9e+167) (not (<= u 3.8e+140))) (/ v u) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.9e+167) || !(u <= 3.8e+140)) {
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.9d+167)) .or. (.not. (u <= 3.8d+140))) 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.9e+167) || !(u <= 3.8e+140)) {
tmp = v / u;
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.9e+167) or not (u <= 3.8e+140): tmp = v / u else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.9e+167) || !(u <= 3.8e+140)) 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.9e+167) || ~((u <= 3.8e+140))) tmp = v / u; else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.9e+167], N[Not[LessEqual[u, 3.8e+140]], $MachinePrecision]], N[(v / u), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.9 \cdot 10^{+167} \lor \neg \left(u \leq 3.8 \cdot 10^{+140}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -1.89999999999999997e167 or 3.8000000000000001e140 < u Initial program 69.7%
times-frac99.9%
Simplified99.9%
Taylor expanded in t1 around 0 91.6%
associate-*r/91.6%
mul-1-neg91.6%
Simplified91.6%
associate-*r/91.6%
frac-2neg91.6%
add-sqr-sqrt43.1%
sqrt-unprod66.4%
sqr-neg66.4%
sqrt-unprod34.2%
add-sqr-sqrt68.5%
distribute-lft-neg-out68.5%
distribute-frac-neg68.5%
*-commutative68.5%
add-sqr-sqrt34.3%
sqrt-unprod68.9%
sqr-neg68.9%
sqrt-unprod48.3%
add-sqr-sqrt91.6%
distribute-neg-in91.6%
Applied egg-rr91.9%
Taylor expanded in t1 around inf 34.5%
if -1.89999999999999997e167 < u < 3.8000000000000001e140Initial program 69.6%
times-frac96.5%
Simplified96.5%
Taylor expanded in t1 around inf 67.2%
associate-*r/67.2%
neg-mul-167.2%
Simplified67.2%
Final simplification58.8%
(FPCore (u v t1) :precision binary64 (if (<= u -1.45e+137) (/ -0.5 (/ u v)) (if (<= u 2.2e+140) (/ (- v) t1) (/ v u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.45e+137) {
tmp = -0.5 / (u / v);
} else if (u <= 2.2e+140) {
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 <= (-1.45d+137)) then
tmp = (-0.5d0) / (u / v)
else if (u <= 2.2d+140) 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 <= -1.45e+137) {
tmp = -0.5 / (u / v);
} else if (u <= 2.2e+140) {
tmp = -v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.45e+137: tmp = -0.5 / (u / v) elif u <= 2.2e+140: tmp = -v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.45e+137) tmp = Float64(-0.5 / Float64(u / v)); elseif (u <= 2.2e+140) 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 <= -1.45e+137) tmp = -0.5 / (u / v); elseif (u <= 2.2e+140) tmp = -v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.45e+137], N[(-0.5 / N[(u / v), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 2.2e+140], N[((-v) / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.45 \cdot 10^{+137}:\\
\;\;\;\;\frac{-0.5}{\frac{u}{v}}\\
\mathbf{elif}\;u \leq 2.2 \cdot 10^{+140}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if u < -1.44999999999999992e137Initial program 64.5%
associate-/r*88.8%
*-commutative88.8%
associate-/l*99.9%
associate-/l/81.3%
+-commutative81.3%
remove-double-neg81.3%
unsub-neg81.3%
div-sub81.3%
sub-neg81.3%
*-inverses81.3%
metadata-eval81.3%
Simplified81.3%
Taylor expanded in t1 around inf 39.4%
mul-1-neg39.4%
unsub-neg39.4%
*-commutative39.4%
Simplified39.4%
Taylor expanded in u around inf 32.3%
*-commutative32.3%
Simplified32.3%
Taylor expanded in v around 0 32.3%
associate-*r/32.3%
*-rgt-identity32.3%
times-frac32.3%
/-rgt-identity32.3%
associate-/r/34.9%
Simplified34.9%
if -1.44999999999999992e137 < u < 2.1999999999999998e140Initial program 69.6%
times-frac96.4%
Simplified96.4%
Taylor expanded in t1 around inf 67.7%
associate-*r/67.7%
neg-mul-167.7%
Simplified67.7%
if 2.1999999999999998e140 < u Initial program 74.7%
times-frac100.0%
Simplified100.0%
Taylor expanded in t1 around 0 89.5%
associate-*r/89.5%
mul-1-neg89.5%
Simplified89.5%
associate-*r/89.4%
frac-2neg89.4%
add-sqr-sqrt30.6%
sqrt-unprod66.2%
sqr-neg66.2%
sqrt-unprod47.6%
add-sqr-sqrt72.4%
distribute-lft-neg-out72.4%
distribute-frac-neg72.4%
*-commutative72.4%
add-sqr-sqrt24.8%
sqrt-unprod65.5%
sqr-neg65.5%
sqrt-unprod58.7%
add-sqr-sqrt89.4%
distribute-neg-in89.4%
Applied egg-rr89.7%
Taylor expanded in t1 around inf 36.3%
Final simplification59.0%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -5.8e+163) (not (<= t1 1.3e+118))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -5.8e+163) || !(t1 <= 1.3e+118)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-5.8d+163)) .or. (.not. (t1 <= 1.3d+118))) then
tmp = v / t1
else
tmp = v / u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -5.8e+163) || !(t1 <= 1.3e+118)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -5.8e+163) or not (t1 <= 1.3e+118): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -5.8e+163) || !(t1 <= 1.3e+118)) tmp = Float64(v / t1); else tmp = Float64(v / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -5.8e+163) || ~((t1 <= 1.3e+118))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -5.8e+163], N[Not[LessEqual[t1, 1.3e+118]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -5.8 \cdot 10^{+163} \lor \neg \left(t1 \leq 1.3 \cdot 10^{+118}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -5.79999999999999996e163 or 1.30000000000000008e118 < t1 Initial program 40.2%
times-frac100.0%
Simplified100.0%
Taylor expanded in t1 around inf 88.5%
Taylor expanded in u around inf 35.1%
if -5.79999999999999996e163 < t1 < 1.30000000000000008e118Initial program 80.0%
times-frac96.4%
Simplified96.4%
Taylor expanded in t1 around 0 59.7%
associate-*r/59.7%
mul-1-neg59.7%
Simplified59.7%
associate-*r/60.6%
frac-2neg60.6%
add-sqr-sqrt25.2%
sqrt-unprod40.1%
sqr-neg40.1%
sqrt-unprod20.4%
add-sqr-sqrt35.2%
distribute-lft-neg-out35.2%
distribute-frac-neg35.2%
*-commutative35.2%
add-sqr-sqrt14.8%
sqrt-unprod40.2%
sqr-neg40.2%
sqrt-unprod35.3%
add-sqr-sqrt60.6%
distribute-neg-in60.6%
Applied egg-rr62.9%
Taylor expanded in t1 around inf 17.8%
Final simplification22.3%
(FPCore (u v t1) :precision binary64 (/ v t1))
double code(double u, double v, double t1) {
return v / t1;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = v / t1
end function
public static double code(double u, double v, double t1) {
return v / t1;
}
def code(u, v, t1): return v / t1
function code(u, v, t1) return Float64(v / t1) end
function tmp = code(u, v, t1) tmp = v / t1; end
code[u_, v_, t1_] := N[(v / t1), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{t1}
\end{array}
Initial program 69.6%
times-frac97.3%
Simplified97.3%
Taylor expanded in t1 around inf 55.9%
Taylor expanded in u around inf 12.7%
Final simplification12.7%
herbie shell --seed 2024011
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))