
(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 17 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 75.9%
times-frac97.8%
Simplified97.8%
Final simplification97.8%
(FPCore (u v t1) :precision binary64 (if (or (<= u -5.5e-67) (not (<= u 1.3e-79))) (/ (* t1 (/ v (- t1 u))) (+ t1 u)) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -5.5e-67) || !(u <= 1.3e-79)) {
tmp = (t1 * (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 <= (-5.5d-67)) .or. (.not. (u <= 1.3d-79))) then
tmp = (t1 * (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 <= -5.5e-67) || !(u <= 1.3e-79)) {
tmp = (t1 * (v / (t1 - u))) / (t1 + u);
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -5.5e-67) or not (u <= 1.3e-79): tmp = (t1 * (v / (t1 - u))) / (t1 + u) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -5.5e-67) || !(u <= 1.3e-79)) tmp = Float64(Float64(t1 * Float64(v / Float64(t1 - 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 <= -5.5e-67) || ~((u <= 1.3e-79))) tmp = (t1 * (v / (t1 - u))) / (t1 + u); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -5.5e-67], N[Not[LessEqual[u, 1.3e-79]], $MachinePrecision]], N[(N[(t1 * N[(v / N[(t1 - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -5.5 \cdot 10^{-67} \lor \neg \left(u \leq 1.3 \cdot 10^{-79}\right):\\
\;\;\;\;\frac{t1 \cdot \frac{v}{t1 - u}}{t1 + u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -5.5000000000000003e-67 or 1.29999999999999997e-79 < u Initial program 81.8%
times-frac97.5%
Simplified97.5%
associate-*l/99.8%
add-sqr-sqrt53.6%
sqrt-unprod60.3%
sqr-neg60.3%
sqrt-unprod26.9%
add-sqr-sqrt55.6%
frac-2neg55.6%
add-sqr-sqrt27.0%
sqrt-unprod62.5%
sqr-neg62.5%
sqrt-unprod46.0%
add-sqr-sqrt99.8%
distribute-neg-in99.8%
add-sqr-sqrt53.7%
sqrt-unprod89.4%
sqr-neg89.4%
sqrt-unprod40.3%
add-sqr-sqrt85.9%
sub-neg85.9%
Applied egg-rr85.9%
if -5.5000000000000003e-67 < u < 1.29999999999999997e-79Initial program 66.7%
times-frac98.2%
Simplified98.2%
Taylor expanded in t1 around inf 87.8%
associate-*r/87.8%
neg-mul-187.8%
Simplified87.8%
Final simplification86.6%
(FPCore (u v t1) :precision binary64 (if (<= u -5e-67) (/ (/ v (- t1 u)) (/ u t1)) (if (<= u 7.2e-88) (/ (- v) t1) (* (/ v (+ t1 u)) (/ (- t1) u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -5e-67) {
tmp = (v / (t1 - u)) / (u / t1);
} else if (u <= 7.2e-88) {
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 <= (-5d-67)) then
tmp = (v / (t1 - u)) / (u / t1)
else if (u <= 7.2d-88) 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 <= -5e-67) {
tmp = (v / (t1 - u)) / (u / t1);
} else if (u <= 7.2e-88) {
tmp = -v / t1;
} else {
tmp = (v / (t1 + u)) * (-t1 / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -5e-67: tmp = (v / (t1 - u)) / (u / t1) elif u <= 7.2e-88: tmp = -v / t1 else: tmp = (v / (t1 + u)) * (-t1 / u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -5e-67) tmp = Float64(Float64(v / Float64(t1 - u)) / Float64(u / t1)); elseif (u <= 7.2e-88) 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 <= -5e-67) tmp = (v / (t1 - u)) / (u / t1); elseif (u <= 7.2e-88) tmp = -v / t1; else tmp = (v / (t1 + u)) * (-t1 / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -5e-67], N[(N[(v / N[(t1 - u), $MachinePrecision]), $MachinePrecision] / N[(u / t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 7.2e-88], 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 -5 \cdot 10^{-67}:\\
\;\;\;\;\frac{\frac{v}{t1 - u}}{\frac{u}{t1}}\\
\mathbf{elif}\;u \leq 7.2 \cdot 10^{-88}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{t1 + u} \cdot \frac{-t1}{u}\\
\end{array}
\end{array}
if u < -4.9999999999999999e-67Initial program 78.5%
times-frac97.7%
Simplified97.7%
Taylor expanded in t1 around 0 81.5%
associate-*r/81.5%
neg-mul-181.5%
Simplified81.5%
*-commutative81.5%
clear-num81.5%
un-div-inv81.5%
frac-2neg81.5%
add-sqr-sqrt41.4%
sqrt-unprod61.6%
sqr-neg61.6%
sqrt-unprod31.6%
add-sqr-sqrt56.6%
distribute-neg-in56.6%
add-sqr-sqrt25.6%
sqrt-unprod57.0%
sqr-neg57.0%
sqrt-unprod30.8%
add-sqr-sqrt56.7%
sub-neg56.7%
add-sqr-sqrt25.8%
sqrt-unprod51.5%
sqr-neg51.5%
sqrt-unprod42.2%
add-sqr-sqrt81.5%
Applied egg-rr81.5%
if -4.9999999999999999e-67 < u < 7.1999999999999999e-88Initial program 66.1%
times-frac98.2%
Simplified98.2%
Taylor expanded in t1 around inf 88.6%
associate-*r/88.6%
neg-mul-188.6%
Simplified88.6%
if 7.1999999999999999e-88 < u Initial program 84.8%
times-frac97.5%
Simplified97.5%
Taylor expanded in t1 around 0 85.2%
associate-*r/85.2%
neg-mul-185.2%
Simplified85.2%
Final simplification85.5%
(FPCore (u v t1) :precision binary64 (if (or (<= u -6.2e-67) (not (<= u 1.02e-81))) (/ (/ v (- t1 u)) (/ u t1)) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -6.2e-67) || !(u <= 1.02e-81)) {
tmp = (v / (t1 - u)) / (u / t1);
} else {
tmp = -v / t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-6.2d-67)) .or. (.not. (u <= 1.02d-81))) then
tmp = (v / (t1 - u)) / (u / t1)
else
tmp = -v / t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -6.2e-67) || !(u <= 1.02e-81)) {
tmp = (v / (t1 - u)) / (u / t1);
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -6.2e-67) or not (u <= 1.02e-81): tmp = (v / (t1 - u)) / (u / t1) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -6.2e-67) || !(u <= 1.02e-81)) tmp = Float64(Float64(v / Float64(t1 - u)) / Float64(u / t1)); else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -6.2e-67) || ~((u <= 1.02e-81))) tmp = (v / (t1 - u)) / (u / t1); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -6.2e-67], N[Not[LessEqual[u, 1.02e-81]], $MachinePrecision]], N[(N[(v / N[(t1 - u), $MachinePrecision]), $MachinePrecision] / N[(u / t1), $MachinePrecision]), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -6.2 \cdot 10^{-67} \lor \neg \left(u \leq 1.02 \cdot 10^{-81}\right):\\
\;\;\;\;\frac{\frac{v}{t1 - u}}{\frac{u}{t1}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -6.2000000000000005e-67 or 1.01999999999999998e-81 < u Initial program 81.8%
times-frac97.5%
Simplified97.5%
Taylor expanded in t1 around 0 83.4%
associate-*r/83.4%
neg-mul-183.4%
Simplified83.4%
*-commutative83.4%
clear-num82.9%
un-div-inv82.9%
frac-2neg82.9%
add-sqr-sqrt43.2%
sqrt-unprod62.4%
sqr-neg62.4%
sqrt-unprod28.6%
add-sqr-sqrt55.5%
distribute-neg-in55.5%
add-sqr-sqrt28.7%
sqrt-unprod55.8%
sqr-neg55.8%
sqrt-unprod26.7%
add-sqr-sqrt55.4%
sub-neg55.4%
add-sqr-sqrt28.7%
sqrt-unprod51.6%
sqr-neg51.6%
sqrt-unprod39.2%
add-sqr-sqrt83.0%
Applied egg-rr83.0%
if -6.2000000000000005e-67 < u < 1.01999999999999998e-81Initial program 66.7%
times-frac98.2%
Simplified98.2%
Taylor expanded in t1 around inf 87.8%
associate-*r/87.8%
neg-mul-187.8%
Simplified87.8%
Final simplification84.9%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -6.5e-29) (not (<= t1 4.6e-94))) (/ (- v) (+ t1 u)) (* v (/ (/ (- t1) u) u))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -6.5e-29) || !(t1 <= 4.6e-94)) {
tmp = -v / (t1 + u);
} else {
tmp = v * ((-t1 / u) / u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-6.5d-29)) .or. (.not. (t1 <= 4.6d-94))) then
tmp = -v / (t1 + u)
else
tmp = v * ((-t1 / u) / u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -6.5e-29) || !(t1 <= 4.6e-94)) {
tmp = -v / (t1 + u);
} else {
tmp = v * ((-t1 / u) / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -6.5e-29) or not (t1 <= 4.6e-94): tmp = -v / (t1 + u) else: tmp = v * ((-t1 / u) / u) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -6.5e-29) || !(t1 <= 4.6e-94)) tmp = Float64(Float64(-v) / Float64(t1 + u)); else tmp = Float64(v * Float64(Float64(Float64(-t1) / u) / u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -6.5e-29) || ~((t1 <= 4.6e-94))) tmp = -v / (t1 + u); else tmp = v * ((-t1 / u) / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -6.5e-29], N[Not[LessEqual[t1, 4.6e-94]], $MachinePrecision]], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision], N[(v * N[(N[((-t1) / u), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -6.5 \cdot 10^{-29} \lor \neg \left(t1 \leq 4.6 \cdot 10^{-94}\right):\\
\;\;\;\;\frac{-v}{t1 + u}\\
\mathbf{else}:\\
\;\;\;\;v \cdot \frac{\frac{-t1}{u}}{u}\\
\end{array}
\end{array}
if t1 < -6.5e-29 or 4.5999999999999999e-94 < t1 Initial program 69.6%
times-frac99.9%
Simplified99.9%
Taylor expanded in t1 around inf 83.0%
if -6.5e-29 < t1 < 4.5999999999999999e-94Initial program 83.5%
associate-/l*82.2%
neg-mul-182.2%
*-commutative82.2%
associate-*r/81.1%
associate-/l*81.1%
neg-mul-181.1%
associate-/r*86.9%
Simplified86.9%
Taylor expanded in t1 around 0 75.0%
associate-*r/75.0%
neg-mul-175.0%
unpow275.0%
Simplified75.0%
associate-*r/77.1%
clear-num75.9%
distribute-rgt-neg-out75.9%
distribute-lft-neg-out75.9%
associate-/l/75.1%
associate-/l*78.6%
associate-/l/82.3%
add-sqr-sqrt44.5%
sqrt-unprod54.8%
sqr-neg54.8%
sqrt-unprod21.4%
add-sqr-sqrt40.5%
Applied egg-rr40.5%
associate-*r/40.6%
associate-/r/40.6%
associate-*r/40.4%
*-commutative40.4%
associate-*r*40.4%
associate-*l/40.4%
*-lft-identity40.4%
Simplified40.4%
associate-/l/40.4%
associate-/r/40.5%
associate-*l/40.5%
add-sqr-sqrt22.4%
sqrt-unprod50.0%
sqr-neg50.0%
sqrt-unprod39.9%
add-sqr-sqrt79.8%
distribute-frac-neg79.8%
div-inv79.7%
associate-/r*79.8%
clear-num79.9%
Applied egg-rr79.9%
Final simplification81.6%
(FPCore (u v t1) :precision binary64 (if (or (<= u -5.5e-67) (not (<= u 3.8e-85))) (* t1 (/ (/ (- v) u) u)) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -5.5e-67) || !(u <= 3.8e-85)) {
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 <= (-5.5d-67)) .or. (.not. (u <= 3.8d-85))) 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 <= -5.5e-67) || !(u <= 3.8e-85)) {
tmp = t1 * ((-v / u) / u);
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -5.5e-67) or not (u <= 3.8e-85): tmp = t1 * ((-v / u) / u) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -5.5e-67) || !(u <= 3.8e-85)) 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 <= -5.5e-67) || ~((u <= 3.8e-85))) tmp = t1 * ((-v / u) / u); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -5.5e-67], N[Not[LessEqual[u, 3.8e-85]], $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 -5.5 \cdot 10^{-67} \lor \neg \left(u \leq 3.8 \cdot 10^{-85}\right):\\
\;\;\;\;t1 \cdot \frac{\frac{-v}{u}}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -5.5000000000000003e-67 or 3.7999999999999999e-85 < u Initial program 82.1%
associate-/l*80.9%
neg-mul-180.9%
*-commutative80.9%
associate-*r/80.6%
associate-/l*81.0%
neg-mul-181.0%
associate-/r*87.9%
Simplified87.9%
Taylor expanded in t1 around 0 74.7%
associate-*r/74.7%
neg-mul-174.7%
unpow274.7%
Simplified74.7%
frac-2neg74.7%
remove-double-neg74.7%
associate-*r/73.4%
Applied egg-rr73.4%
*-commutative73.4%
distribute-rgt-neg-in73.4%
times-frac79.3%
Simplified79.3%
Taylor expanded in v around 0 73.4%
unpow273.4%
associate-*r/74.7%
associate-*r*74.7%
neg-mul-174.7%
associate-/r*78.9%
Simplified78.9%
if -5.5000000000000003e-67 < u < 3.7999999999999999e-85Initial program 66.1%
times-frac98.2%
Simplified98.2%
Taylor expanded in t1 around inf 88.6%
associate-*r/88.6%
neg-mul-188.6%
Simplified88.6%
Final simplification82.6%
(FPCore (u v t1) :precision binary64 (if (or (<= u -8.2e-67) (not (<= u 3.8e-85))) (/ (* t1 (/ (- v) u)) u) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -8.2e-67) || !(u <= 3.8e-85)) {
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 <= (-8.2d-67)) .or. (.not. (u <= 3.8d-85))) 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 <= -8.2e-67) || !(u <= 3.8e-85)) {
tmp = (t1 * (-v / u)) / u;
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -8.2e-67) or not (u <= 3.8e-85): tmp = (t1 * (-v / u)) / u else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -8.2e-67) || !(u <= 3.8e-85)) tmp = Float64(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 <= -8.2e-67) || ~((u <= 3.8e-85))) tmp = (t1 * (-v / u)) / u; else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -8.2e-67], N[Not[LessEqual[u, 3.8e-85]], $MachinePrecision]], N[(N[(t1 * N[((-v) / u), $MachinePrecision]), $MachinePrecision] / u), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -8.2 \cdot 10^{-67} \lor \neg \left(u \leq 3.8 \cdot 10^{-85}\right):\\
\;\;\;\;\frac{t1 \cdot \frac{-v}{u}}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -8.1999999999999994e-67 or 3.7999999999999999e-85 < u Initial program 82.1%
associate-/l*80.9%
Simplified80.9%
Taylor expanded in t1 around 0 75.7%
unpow275.7%
Simplified75.7%
add-sqr-sqrt39.5%
sqrt-unprod50.4%
sqr-neg50.4%
sqrt-unprod25.3%
add-sqr-sqrt52.9%
associate-/r/50.6%
Applied egg-rr50.6%
associate-*l/50.4%
times-frac50.2%
associate-*l/50.1%
add-sqr-sqrt26.9%
sqrt-prod58.8%
sqr-neg58.8%
sqrt-unprod35.2%
add-sqr-sqrt81.6%
associate-*l/79.3%
*-commutative79.3%
frac-2neg79.3%
remove-double-neg79.3%
associate-*r/81.6%
Applied egg-rr81.6%
if -8.1999999999999994e-67 < u < 3.7999999999999999e-85Initial program 66.1%
times-frac98.2%
Simplified98.2%
Taylor expanded in t1 around inf 88.6%
associate-*r/88.6%
neg-mul-188.6%
Simplified88.6%
Final simplification84.2%
(FPCore (u v t1) :precision binary64 (if (<= u -8.2e-67) (* t1 (/ (/ (- v) u) u)) (if (<= u 3.8e-85) (/ (- v) t1) (* (/ v u) (/ t1 (- u))))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -8.2e-67) {
tmp = t1 * ((-v / u) / u);
} else if (u <= 3.8e-85) {
tmp = -v / t1;
} else {
tmp = (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) :: tmp
if (u <= (-8.2d-67)) then
tmp = t1 * ((-v / u) / u)
else if (u <= 3.8d-85) then
tmp = -v / t1
else
tmp = (v / u) * (t1 / -u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -8.2e-67) {
tmp = t1 * ((-v / u) / u);
} else if (u <= 3.8e-85) {
tmp = -v / t1;
} else {
tmp = (v / u) * (t1 / -u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -8.2e-67: tmp = t1 * ((-v / u) / u) elif u <= 3.8e-85: tmp = -v / t1 else: tmp = (v / u) * (t1 / -u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -8.2e-67) tmp = Float64(t1 * Float64(Float64(Float64(-v) / u) / u)); elseif (u <= 3.8e-85) tmp = Float64(Float64(-v) / t1); else tmp = Float64(Float64(v / u) * Float64(t1 / Float64(-u))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -8.2e-67) tmp = t1 * ((-v / u) / u); elseif (u <= 3.8e-85) tmp = -v / t1; else tmp = (v / u) * (t1 / -u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -8.2e-67], N[(t1 * N[(N[((-v) / u), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 3.8e-85], N[((-v) / t1), $MachinePrecision], N[(N[(v / u), $MachinePrecision] * N[(t1 / (-u)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -8.2 \cdot 10^{-67}:\\
\;\;\;\;t1 \cdot \frac{\frac{-v}{u}}{u}\\
\mathbf{elif}\;u \leq 3.8 \cdot 10^{-85}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u} \cdot \frac{t1}{-u}\\
\end{array}
\end{array}
if u < -8.1999999999999994e-67Initial program 78.5%
associate-/l*80.1%
neg-mul-180.1%
*-commutative80.1%
associate-*r/80.0%
associate-/l*80.1%
neg-mul-180.1%
associate-/r*89.7%
Simplified89.7%
Taylor expanded in t1 around 0 73.0%
associate-*r/73.0%
neg-mul-173.0%
unpow273.0%
Simplified73.0%
frac-2neg73.0%
remove-double-neg73.0%
associate-*r/71.6%
Applied egg-rr71.6%
*-commutative71.6%
distribute-rgt-neg-in71.6%
times-frac78.5%
Simplified78.5%
Taylor expanded in v around 0 71.6%
unpow271.6%
associate-*r/73.0%
associate-*r*73.0%
neg-mul-173.0%
associate-/r*78.5%
Simplified78.5%
if -8.1999999999999994e-67 < u < 3.7999999999999999e-85Initial program 66.1%
times-frac98.2%
Simplified98.2%
Taylor expanded in t1 around inf 88.6%
associate-*r/88.6%
neg-mul-188.6%
Simplified88.6%
if 3.7999999999999999e-85 < u Initial program 84.8%
associate-/l*81.6%
neg-mul-181.6%
*-commutative81.6%
associate-*r/81.0%
associate-/l*81.8%
neg-mul-181.8%
associate-/r*86.5%
Simplified86.5%
Taylor expanded in t1 around 0 76.0%
associate-*r/76.0%
neg-mul-176.0%
unpow276.0%
Simplified76.0%
frac-2neg76.0%
remove-double-neg76.0%
associate-*r/74.8%
Applied egg-rr74.8%
*-commutative74.8%
distribute-rgt-neg-in74.8%
times-frac79.9%
Simplified79.9%
Final simplification82.9%
(FPCore (u v t1) :precision binary64 (if (<= u -8e-67) (/ (- t1) (* u (/ u v))) (if (<= u 3.8e-85) (/ (- v) t1) (* (/ v u) (/ t1 (- u))))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -8e-67) {
tmp = -t1 / (u * (u / v));
} else if (u <= 3.8e-85) {
tmp = -v / t1;
} else {
tmp = (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) :: tmp
if (u <= (-8d-67)) then
tmp = -t1 / (u * (u / v))
else if (u <= 3.8d-85) then
tmp = -v / t1
else
tmp = (v / u) * (t1 / -u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -8e-67) {
tmp = -t1 / (u * (u / v));
} else if (u <= 3.8e-85) {
tmp = -v / t1;
} else {
tmp = (v / u) * (t1 / -u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -8e-67: tmp = -t1 / (u * (u / v)) elif u <= 3.8e-85: tmp = -v / t1 else: tmp = (v / u) * (t1 / -u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -8e-67) tmp = Float64(Float64(-t1) / Float64(u * Float64(u / v))); elseif (u <= 3.8e-85) tmp = Float64(Float64(-v) / t1); else tmp = Float64(Float64(v / u) * Float64(t1 / Float64(-u))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -8e-67) tmp = -t1 / (u * (u / v)); elseif (u <= 3.8e-85) tmp = -v / t1; else tmp = (v / u) * (t1 / -u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -8e-67], N[((-t1) / N[(u * N[(u / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 3.8e-85], N[((-v) / t1), $MachinePrecision], N[(N[(v / u), $MachinePrecision] * N[(t1 / (-u)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -8 \cdot 10^{-67}:\\
\;\;\;\;\frac{-t1}{u \cdot \frac{u}{v}}\\
\mathbf{elif}\;u \leq 3.8 \cdot 10^{-85}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u} \cdot \frac{t1}{-u}\\
\end{array}
\end{array}
if u < -7.99999999999999954e-67Initial program 78.5%
associate-/l*80.1%
Simplified80.1%
Taylor expanded in t1 around 0 74.4%
unpow274.4%
Simplified74.4%
associate-/l*79.9%
associate-/r/79.9%
Applied egg-rr79.9%
if -7.99999999999999954e-67 < u < 3.7999999999999999e-85Initial program 66.1%
times-frac98.2%
Simplified98.2%
Taylor expanded in t1 around inf 88.6%
associate-*r/88.6%
neg-mul-188.6%
Simplified88.6%
if 3.7999999999999999e-85 < u Initial program 84.8%
associate-/l*81.6%
neg-mul-181.6%
*-commutative81.6%
associate-*r/81.0%
associate-/l*81.8%
neg-mul-181.8%
associate-/r*86.5%
Simplified86.5%
Taylor expanded in t1 around 0 76.0%
associate-*r/76.0%
neg-mul-176.0%
unpow276.0%
Simplified76.0%
frac-2neg76.0%
remove-double-neg76.0%
associate-*r/74.8%
Applied egg-rr74.8%
*-commutative74.8%
distribute-rgt-neg-in74.8%
times-frac79.9%
Simplified79.9%
Final simplification83.2%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.15e+106) (not (<= u 5e+18))) (* v (/ t1 (* u u))) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.15e+106) || !(u <= 5e+18)) {
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 <= (-1.15d+106)) .or. (.not. (u <= 5d+18))) 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 <= -1.15e+106) || !(u <= 5e+18)) {
tmp = v * (t1 / (u * u));
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.15e+106) or not (u <= 5e+18): tmp = v * (t1 / (u * u)) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.15e+106) || !(u <= 5e+18)) 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 <= -1.15e+106) || ~((u <= 5e+18))) tmp = v * (t1 / (u * u)); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.15e+106], N[Not[LessEqual[u, 5e+18]], $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 -1.15 \cdot 10^{+106} \lor \neg \left(u \leq 5 \cdot 10^{+18}\right):\\
\;\;\;\;v \cdot \frac{t1}{u \cdot u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -1.1500000000000001e106 or 5e18 < u Initial program 81.8%
associate-/l*82.0%
Simplified82.0%
Taylor expanded in t1 around 0 81.9%
unpow281.9%
Simplified81.9%
add-sqr-sqrt45.5%
sqrt-unprod57.9%
sqr-neg57.9%
sqrt-unprod30.0%
add-sqr-sqrt70.3%
associate-/r/67.7%
Applied egg-rr67.7%
if -1.1500000000000001e106 < u < 5e18Initial program 71.7%
times-frac97.7%
Simplified97.7%
Taylor expanded in t1 around inf 71.6%
associate-*r/71.6%
neg-mul-171.6%
Simplified71.6%
Final simplification70.0%
(FPCore (u v t1) :precision binary64 (if (<= u -5.5e+105) (* v (/ t1 (* u u))) (if (<= u 6.5e+18) (/ (- v) t1) (* t1 (/ (/ v u) u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -5.5e+105) {
tmp = v * (t1 / (u * u));
} else if (u <= 6.5e+18) {
tmp = -v / t1;
} else {
tmp = t1 * ((v / u) / u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-5.5d+105)) then
tmp = v * (t1 / (u * u))
else if (u <= 6.5d+18) then
tmp = -v / t1
else
tmp = t1 * ((v / u) / u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -5.5e+105) {
tmp = v * (t1 / (u * u));
} else if (u <= 6.5e+18) {
tmp = -v / t1;
} else {
tmp = t1 * ((v / u) / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -5.5e+105: tmp = v * (t1 / (u * u)) elif u <= 6.5e+18: tmp = -v / t1 else: tmp = t1 * ((v / u) / u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -5.5e+105) tmp = Float64(v * Float64(t1 / Float64(u * u))); elseif (u <= 6.5e+18) tmp = Float64(Float64(-v) / t1); else tmp = Float64(t1 * Float64(Float64(v / u) / u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -5.5e+105) tmp = v * (t1 / (u * u)); elseif (u <= 6.5e+18) tmp = -v / t1; else tmp = t1 * ((v / u) / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -5.5e+105], N[(v * N[(t1 / N[(u * u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 6.5e+18], N[((-v) / t1), $MachinePrecision], N[(t1 * N[(N[(v / u), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -5.5 \cdot 10^{+105}:\\
\;\;\;\;v \cdot \frac{t1}{u \cdot u}\\
\mathbf{elif}\;u \leq 6.5 \cdot 10^{+18}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{u}\\
\end{array}
\end{array}
if u < -5.49999999999999979e105Initial program 80.0%
associate-/l*80.1%
Simplified80.1%
Taylor expanded in t1 around 0 80.1%
unpow280.1%
Simplified80.1%
add-sqr-sqrt40.2%
sqrt-unprod65.0%
sqr-neg65.0%
sqrt-unprod39.9%
add-sqr-sqrt78.4%
associate-/r/78.4%
Applied egg-rr78.4%
if -5.49999999999999979e105 < u < 6.5e18Initial program 71.7%
times-frac97.7%
Simplified97.7%
Taylor expanded in t1 around inf 71.6%
associate-*r/71.6%
neg-mul-171.6%
Simplified71.6%
if 6.5e18 < u Initial program 83.1%
associate-/l*83.4%
neg-mul-183.4%
*-commutative83.4%
associate-*r/83.4%
associate-/l*83.4%
neg-mul-183.4%
associate-/r*90.1%
Simplified90.1%
Taylor expanded in t1 around 0 83.2%
associate-*r/83.2%
neg-mul-183.2%
unpow283.2%
Simplified83.2%
associate-*r/78.4%
clear-num78.3%
distribute-rgt-neg-out78.3%
distribute-lft-neg-out78.3%
associate-/l/83.1%
associate-/l*87.7%
associate-/l/87.5%
add-sqr-sqrt55.1%
sqrt-unprod58.9%
sqr-neg58.9%
sqrt-unprod21.4%
add-sqr-sqrt59.7%
Applied egg-rr59.7%
associate-*r/59.5%
associate-/r/58.9%
associate-*r/59.7%
*-commutative59.7%
associate-*r*64.4%
associate-*l/64.4%
*-lft-identity64.4%
Simplified64.4%
Final simplification71.0%
(FPCore (u v t1) :precision binary64 (/ (/ v (+ t1 u)) (- -1.0 (/ u t1))))
double code(double u, double v, double t1) {
return (v / (t1 + u)) / (-1.0 - (u / t1));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (v / (t1 + u)) / ((-1.0d0) - (u / t1))
end function
public static double code(double u, double v, double t1) {
return (v / (t1 + u)) / (-1.0 - (u / t1));
}
def code(u, v, t1): return (v / (t1 + u)) / (-1.0 - (u / t1))
function code(u, v, t1) return Float64(Float64(v / Float64(t1 + u)) / Float64(-1.0 - Float64(u / t1))) end
function tmp = code(u, v, t1) tmp = (v / (t1 + u)) / (-1.0 - (u / t1)); end
code[u_, v_, t1_] := N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{v}{t1 + u}}{-1 - \frac{u}{t1}}
\end{array}
Initial program 75.9%
*-commutative75.9%
times-frac97.8%
neg-mul-197.8%
associate-/l*97.5%
associate-*r/97.5%
associate-/l*97.5%
associate-/l/97.5%
neg-mul-197.5%
*-lft-identity97.5%
metadata-eval97.5%
times-frac97.5%
neg-mul-197.5%
remove-double-neg97.5%
neg-mul-197.5%
sub0-neg97.5%
associate--r+97.5%
neg-sub097.5%
div-sub97.5%
distribute-frac-neg97.5%
*-inverses97.5%
metadata-eval97.5%
Simplified97.5%
Final simplification97.5%
(FPCore (u v t1) :precision binary64 (if (or (<= u -6.6e+126) (not (<= u 7e+93))) (/ v (+ t1 u)) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -6.6e+126) || !(u <= 7e+93)) {
tmp = 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 <= (-6.6d+126)) .or. (.not. (u <= 7d+93))) then
tmp = 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 <= -6.6e+126) || !(u <= 7e+93)) {
tmp = v / (t1 + u);
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -6.6e+126) or not (u <= 7e+93): tmp = v / (t1 + u) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -6.6e+126) || !(u <= 7e+93)) tmp = 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 <= -6.6e+126) || ~((u <= 7e+93))) tmp = v / (t1 + u); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -6.6e+126], N[Not[LessEqual[u, 7e+93]], $MachinePrecision]], N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -6.6 \cdot 10^{+126} \lor \neg \left(u \leq 7 \cdot 10^{+93}\right):\\
\;\;\;\;\frac{v}{t1 + u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -6.60000000000000026e126 or 6.99999999999999996e93 < u Initial program 81.5%
times-frac99.8%
Simplified99.8%
associate-*l/99.9%
add-sqr-sqrt57.5%
sqrt-unprod67.4%
sqr-neg67.4%
sqrt-unprod32.8%
add-sqr-sqrt78.4%
frac-2neg78.4%
add-sqr-sqrt36.5%
sqrt-unprod80.1%
sqr-neg80.1%
sqrt-unprod51.7%
add-sqr-sqrt99.9%
distribute-neg-in99.9%
add-sqr-sqrt57.6%
sqrt-unprod91.7%
sqr-neg91.7%
sqrt-unprod39.5%
add-sqr-sqrt94.9%
sub-neg94.9%
Applied egg-rr94.9%
Taylor expanded in t1 around inf 50.2%
if -6.60000000000000026e126 < u < 6.99999999999999996e93Initial program 73.2%
times-frac96.8%
Simplified96.8%
Taylor expanded in t1 around inf 65.1%
associate-*r/65.1%
neg-mul-165.1%
Simplified65.1%
Final simplification60.1%
(FPCore (u v t1) :precision binary64 (if (<= u -2.55e+222) (/ v u) (if (<= u 5.2e+123) (/ (- v) t1) (/ v u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -2.55e+222) {
tmp = v / u;
} else if (u <= 5.2e+123) {
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.55d+222)) then
tmp = v / u
else if (u <= 5.2d+123) 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.55e+222) {
tmp = v / u;
} else if (u <= 5.2e+123) {
tmp = -v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -2.55e+222: tmp = v / u elif u <= 5.2e+123: tmp = -v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -2.55e+222) tmp = Float64(v / u); elseif (u <= 5.2e+123) 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.55e+222) tmp = v / u; elseif (u <= 5.2e+123) tmp = -v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -2.55e+222], N[(v / u), $MachinePrecision], If[LessEqual[u, 5.2e+123], N[((-v) / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.55 \cdot 10^{+222}:\\
\;\;\;\;\frac{v}{u}\\
\mathbf{elif}\;u \leq 5.2 \cdot 10^{+123}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if u < -2.55e222 or 5.19999999999999971e123 < u Initial program 85.2%
times-frac99.8%
Simplified99.8%
Taylor expanded in t1 around 0 96.6%
associate-*r/96.6%
neg-mul-196.6%
Simplified96.6%
*-commutative96.6%
clear-num96.6%
un-div-inv96.7%
frac-2neg96.7%
add-sqr-sqrt41.3%
sqrt-unprod83.3%
sqr-neg83.3%
sqrt-unprod47.2%
add-sqr-sqrt82.0%
distribute-neg-in82.0%
add-sqr-sqrt49.1%
sqrt-unprod82.1%
sqr-neg82.1%
sqrt-unprod33.0%
add-sqr-sqrt81.9%
sub-neg81.9%
add-sqr-sqrt49.0%
sqrt-unprod67.7%
sqr-neg67.7%
sqrt-unprod37.9%
add-sqr-sqrt96.8%
Applied egg-rr96.8%
Taylor expanded in t1 around inf 55.7%
if -2.55e222 < u < 5.19999999999999971e123Initial program 73.2%
times-frac97.2%
Simplified97.2%
Taylor expanded in t1 around inf 60.8%
associate-*r/60.8%
neg-mul-160.8%
Simplified60.8%
Final simplification59.7%
(FPCore (u v t1) :precision binary64 (if (<= t1 -2.05e+136) (/ v t1) (if (<= t1 1.42e+96) (/ v u) (/ v t1))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -2.05e+136) {
tmp = v / t1;
} else if (t1 <= 1.42e+96) {
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.05d+136)) then
tmp = v / t1
else if (t1 <= 1.42d+96) 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.05e+136) {
tmp = v / t1;
} else if (t1 <= 1.42e+96) {
tmp = v / u;
} else {
tmp = v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -2.05e+136: tmp = v / t1 elif t1 <= 1.42e+96: tmp = v / u else: tmp = v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -2.05e+136) tmp = Float64(v / t1); elseif (t1 <= 1.42e+96) 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.05e+136) tmp = v / t1; elseif (t1 <= 1.42e+96) tmp = v / u; else tmp = v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -2.05e+136], N[(v / t1), $MachinePrecision], If[LessEqual[t1, 1.42e+96], N[(v / u), $MachinePrecision], N[(v / t1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2.05 \cdot 10^{+136}:\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{elif}\;t1 \leq 1.42 \cdot 10^{+96}:\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{t1}\\
\end{array}
\end{array}
if t1 < -2.0499999999999999e136 or 1.41999999999999995e96 < t1 Initial program 55.8%
times-frac99.9%
Simplified99.9%
associate-*l/100.0%
add-sqr-sqrt47.1%
sqrt-unprod14.2%
sqr-neg14.2%
sqrt-unprod25.2%
add-sqr-sqrt47.8%
frac-2neg47.8%
add-sqr-sqrt27.3%
sqrt-unprod69.0%
sqr-neg69.0%
sqrt-unprod49.8%
add-sqr-sqrt100.0%
distribute-neg-in100.0%
add-sqr-sqrt47.1%
sqrt-unprod53.7%
sqr-neg53.7%
sqrt-unprod29.1%
add-sqr-sqrt54.2%
sub-neg54.2%
Applied egg-rr54.2%
Taylor expanded in t1 around inf 45.5%
if -2.0499999999999999e136 < t1 < 1.41999999999999995e96Initial program 84.1%
times-frac96.9%
Simplified96.9%
Taylor expanded in t1 around 0 66.5%
associate-*r/66.5%
neg-mul-166.5%
Simplified66.5%
*-commutative66.5%
clear-num66.1%
un-div-inv66.1%
frac-2neg66.1%
add-sqr-sqrt32.8%
sqrt-unprod45.3%
sqr-neg45.3%
sqrt-unprod21.9%
add-sqr-sqrt38.4%
distribute-neg-in38.4%
add-sqr-sqrt20.1%
sqrt-unprod37.9%
sqr-neg37.9%
sqrt-unprod17.9%
add-sqr-sqrt38.5%
sub-neg38.5%
add-sqr-sqrt20.5%
sqrt-unprod43.2%
sqr-neg43.2%
sqrt-unprod30.7%
add-sqr-sqrt66.1%
Applied egg-rr66.1%
Taylor expanded in t1 around inf 19.7%
Final simplification27.2%
(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 75.9%
times-frac97.8%
Simplified97.8%
Taylor expanded in t1 around inf 61.5%
Final simplification61.5%
(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 75.9%
times-frac97.8%
Simplified97.8%
associate-*l/98.8%
add-sqr-sqrt54.1%
sqrt-unprod50.0%
sqr-neg50.0%
sqrt-unprod19.5%
add-sqr-sqrt39.3%
frac-2neg39.3%
add-sqr-sqrt18.7%
sqrt-unprod56.5%
sqr-neg56.5%
sqrt-unprod49.0%
add-sqr-sqrt98.8%
distribute-neg-in98.8%
add-sqr-sqrt54.2%
sqrt-unprod75.9%
sqr-neg75.9%
sqrt-unprod30.1%
add-sqr-sqrt62.1%
sub-neg62.1%
Applied egg-rr62.1%
Taylor expanded in t1 around inf 15.8%
Final simplification15.8%
herbie shell --seed 2023257
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))