
(FPCore (u v t1) :precision binary64 (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))
double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-t1 * v) / ((t1 + u) * (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
def code(u, v, t1): return (-t1 * v) / ((t1 + u) * (t1 + u))
function code(u, v, t1) return Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (-t1 * v) / ((t1 + u) * (t1 + u)); end
code[u_, v_, t1_] := N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (u v t1) :precision binary64 (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))
double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-t1 * v) / ((t1 + u) * (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
def code(u, v, t1): return (-t1 * v) / ((t1 + u) * (t1 + u))
function code(u, v, t1) return Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (-t1 * v) / ((t1 + u) * (t1 + u)); end
code[u_, v_, t1_] := N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}
\end{array}
(FPCore (u v t1) :precision binary64 (/ (/ 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 73.9%
*-commutative73.9%
times-frac98.1%
neg-mul-198.1%
associate-/l*98.1%
associate-*r/98.1%
associate-/l*98.1%
associate-/l/98.1%
neg-mul-198.1%
*-lft-identity98.1%
metadata-eval98.1%
times-frac98.1%
neg-mul-198.1%
remove-double-neg98.1%
neg-mul-198.1%
sub0-neg98.1%
associate--r+98.1%
neg-sub098.1%
div-sub98.2%
distribute-frac-neg98.2%
*-inverses98.2%
metadata-eval98.2%
Simplified98.2%
Final simplification98.2%
(FPCore (u v t1)
:precision binary64
(if (<= u -860.0)
(/ (- t1) (/ (+ t1 u) (/ v u)))
(if (<= u 7.5e-31)
(/ (- v) t1)
(if (or (<= u 850000000000.0) (not (<= u 7.8e+97)))
(/ (/ t1 u) (/ (+ t1 u) (- v)))
(/ (- v) (+ t1 (* u 2.0)))))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -860.0) {
tmp = -t1 / ((t1 + u) / (v / u));
} else if (u <= 7.5e-31) {
tmp = -v / t1;
} else if ((u <= 850000000000.0) || !(u <= 7.8e+97)) {
tmp = (t1 / u) / ((t1 + u) / -v);
} else {
tmp = -v / (t1 + (u * 2.0));
}
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 <= (-860.0d0)) then
tmp = -t1 / ((t1 + u) / (v / u))
else if (u <= 7.5d-31) then
tmp = -v / t1
else if ((u <= 850000000000.0d0) .or. (.not. (u <= 7.8d+97))) then
tmp = (t1 / u) / ((t1 + u) / -v)
else
tmp = -v / (t1 + (u * 2.0d0))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -860.0) {
tmp = -t1 / ((t1 + u) / (v / u));
} else if (u <= 7.5e-31) {
tmp = -v / t1;
} else if ((u <= 850000000000.0) || !(u <= 7.8e+97)) {
tmp = (t1 / u) / ((t1 + u) / -v);
} else {
tmp = -v / (t1 + (u * 2.0));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -860.0: tmp = -t1 / ((t1 + u) / (v / u)) elif u <= 7.5e-31: tmp = -v / t1 elif (u <= 850000000000.0) or not (u <= 7.8e+97): tmp = (t1 / u) / ((t1 + u) / -v) else: tmp = -v / (t1 + (u * 2.0)) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -860.0) tmp = Float64(Float64(-t1) / Float64(Float64(t1 + u) / Float64(v / u))); elseif (u <= 7.5e-31) tmp = Float64(Float64(-v) / t1); elseif ((u <= 850000000000.0) || !(u <= 7.8e+97)) tmp = Float64(Float64(t1 / u) / Float64(Float64(t1 + u) / Float64(-v))); else tmp = Float64(Float64(-v) / Float64(t1 + Float64(u * 2.0))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -860.0) tmp = -t1 / ((t1 + u) / (v / u)); elseif (u <= 7.5e-31) tmp = -v / t1; elseif ((u <= 850000000000.0) || ~((u <= 7.8e+97))) tmp = (t1 / u) / ((t1 + u) / -v); else tmp = -v / (t1 + (u * 2.0)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -860.0], N[((-t1) / N[(N[(t1 + u), $MachinePrecision] / N[(v / u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 7.5e-31], N[((-v) / t1), $MachinePrecision], If[Or[LessEqual[u, 850000000000.0], N[Not[LessEqual[u, 7.8e+97]], $MachinePrecision]], N[(N[(t1 / u), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] / (-v)), $MachinePrecision]), $MachinePrecision], N[((-v) / N[(t1 + N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -860:\\
\;\;\;\;\frac{-t1}{\frac{t1 + u}{\frac{v}{u}}}\\
\mathbf{elif}\;u \leq 7.5 \cdot 10^{-31}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{elif}\;u \leq 850000000000 \lor \neg \left(u \leq 7.8 \cdot 10^{+97}\right):\\
\;\;\;\;\frac{\frac{t1}{u}}{\frac{t1 + u}{-v}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u \cdot 2}\\
\end{array}
\end{array}
if u < -860Initial program 80.9%
associate-/l*83.3%
associate-/l*93.2%
Simplified93.2%
Taylor expanded in t1 around 0 83.9%
if -860 < u < 7.49999999999999975e-31Initial program 69.3%
*-commutative69.3%
times-frac98.2%
neg-mul-198.2%
associate-/l*98.2%
associate-*r/98.2%
associate-/l*98.2%
associate-/l/98.2%
neg-mul-198.2%
*-lft-identity98.2%
metadata-eval98.2%
times-frac98.2%
neg-mul-198.2%
remove-double-neg98.2%
neg-mul-198.2%
sub0-neg98.2%
associate--r+98.2%
neg-sub098.2%
div-sub98.2%
distribute-frac-neg98.2%
*-inverses98.2%
metadata-eval98.2%
Simplified98.2%
Taylor expanded in t1 around inf 80.6%
associate-*r/80.6%
neg-mul-180.6%
Simplified80.6%
if 7.49999999999999975e-31 < u < 8.5e11 or 7.7999999999999999e97 < u Initial program 80.8%
associate-/l*77.9%
associate-/l*90.9%
Simplified90.9%
Taylor expanded in t1 around 0 85.2%
Taylor expanded in v around 0 74.6%
mul-1-neg74.6%
times-frac84.2%
distribute-rgt-neg-out84.2%
associate-*l/84.4%
distribute-neg-frac84.4%
associate-*r/76.9%
associate-*l/84.2%
associate-/l*88.4%
Simplified88.4%
if 8.5e11 < u < 7.7999999999999999e97Initial program 50.9%
*-commutative50.9%
times-frac94.4%
neg-mul-194.4%
associate-/l*94.3%
associate-*r/94.3%
associate-/l*94.3%
associate-/l/94.3%
neg-mul-194.3%
*-lft-identity94.3%
metadata-eval94.3%
times-frac94.3%
neg-mul-194.3%
remove-double-neg94.3%
neg-mul-194.3%
sub0-neg94.3%
associate--r+94.3%
neg-sub094.3%
div-sub94.3%
distribute-frac-neg94.3%
*-inverses94.3%
metadata-eval94.3%
Simplified94.3%
Taylor expanded in v around 0 94.4%
mul-1-neg94.4%
Simplified94.4%
Taylor expanded in t1 around inf 76.1%
*-commutative76.1%
Simplified76.1%
Final simplification83.2%
(FPCore (u v t1)
:precision binary64
(if (or (<= u -1400.0)
(and (not (<= u 2.4e-29))
(or (<= u 150000.0) (not (<= u 1.15e+104)))))
(* (/ v u) (/ (- t1) u))
(/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1400.0) || (!(u <= 2.4e-29) && ((u <= 150000.0) || !(u <= 1.15e+104)))) {
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 <= (-1400.0d0)) .or. (.not. (u <= 2.4d-29)) .and. (u <= 150000.0d0) .or. (.not. (u <= 1.15d+104))) 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 <= -1400.0) || (!(u <= 2.4e-29) && ((u <= 150000.0) || !(u <= 1.15e+104)))) {
tmp = (v / u) * (-t1 / u);
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1400.0) or (not (u <= 2.4e-29) and ((u <= 150000.0) or not (u <= 1.15e+104))): tmp = (v / u) * (-t1 / u) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1400.0) || (!(u <= 2.4e-29) && ((u <= 150000.0) || !(u <= 1.15e+104)))) tmp = Float64(Float64(v / 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 <= -1400.0) || (~((u <= 2.4e-29)) && ((u <= 150000.0) || ~((u <= 1.15e+104))))) tmp = (v / u) * (-t1 / u); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1400.0], And[N[Not[LessEqual[u, 2.4e-29]], $MachinePrecision], Or[LessEqual[u, 150000.0], N[Not[LessEqual[u, 1.15e+104]], $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 -1400 \lor \neg \left(u \leq 2.4 \cdot 10^{-29}\right) \land \left(u \leq 150000 \lor \neg \left(u \leq 1.15 \cdot 10^{+104}\right)\right):\\
\;\;\;\;\frac{v}{u} \cdot \frac{-t1}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -1400 or 2.39999999999999992e-29 < u < 1.5e5 or 1.14999999999999992e104 < u Initial program 80.4%
*-commutative80.4%
times-frac98.5%
neg-mul-198.5%
associate-/l*98.5%
associate-*r/98.6%
associate-/l*98.6%
associate-/l/98.6%
neg-mul-198.6%
*-lft-identity98.6%
metadata-eval98.6%
times-frac98.6%
neg-mul-198.6%
remove-double-neg98.6%
neg-mul-198.6%
sub0-neg98.6%
associate--r+98.6%
neg-sub098.6%
div-sub98.6%
distribute-frac-neg98.6%
*-inverses98.6%
metadata-eval98.6%
Simplified98.6%
Taylor expanded in v around 0 89.7%
mul-1-neg89.7%
Simplified89.7%
Taylor expanded in t1 around 0 71.5%
unpow271.5%
associate-*r/73.7%
Simplified73.7%
associate-/r*84.1%
div-inv84.0%
clear-num84.1%
Applied egg-rr84.1%
if -1400 < u < 2.39999999999999992e-29 or 1.5e5 < u < 1.14999999999999992e104Initial program 67.8%
*-commutative67.8%
times-frac97.8%
neg-mul-197.8%
associate-/l*97.8%
associate-*r/97.8%
associate-/l*97.8%
associate-/l/97.8%
neg-mul-197.8%
*-lft-identity97.8%
metadata-eval97.8%
times-frac97.8%
neg-mul-197.8%
remove-double-neg97.8%
neg-mul-197.8%
sub0-neg97.8%
associate--r+97.8%
neg-sub097.8%
div-sub97.8%
distribute-frac-neg97.8%
*-inverses97.8%
metadata-eval97.8%
Simplified97.8%
Taylor expanded in t1 around inf 79.8%
associate-*r/79.8%
neg-mul-179.8%
Simplified79.8%
Final simplification81.9%
(FPCore (u v t1)
:precision binary64
(if (<= u -3000.0)
(* t1 (/ (/ (- v) u) u))
(if (or (<= u 2.15e-29) (and (not (<= u 2500000.0)) (<= u 7.5e+103)))
(/ (- v) t1)
(* (/ v u) (/ (- t1) u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -3000.0) {
tmp = t1 * ((-v / u) / u);
} else if ((u <= 2.15e-29) || (!(u <= 2500000.0) && (u <= 7.5e+103))) {
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 <= (-3000.0d0)) then
tmp = t1 * ((-v / u) / u)
else if ((u <= 2.15d-29) .or. (.not. (u <= 2500000.0d0)) .and. (u <= 7.5d+103)) 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 <= -3000.0) {
tmp = t1 * ((-v / u) / u);
} else if ((u <= 2.15e-29) || (!(u <= 2500000.0) && (u <= 7.5e+103))) {
tmp = -v / t1;
} else {
tmp = (v / u) * (-t1 / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -3000.0: tmp = t1 * ((-v / u) / u) elif (u <= 2.15e-29) or (not (u <= 2500000.0) and (u <= 7.5e+103)): tmp = -v / t1 else: tmp = (v / u) * (-t1 / u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -3000.0) tmp = Float64(t1 * Float64(Float64(Float64(-v) / u) / u)); elseif ((u <= 2.15e-29) || (!(u <= 2500000.0) && (u <= 7.5e+103))) tmp = Float64(Float64(-v) / t1); else tmp = Float64(Float64(v / u) * Float64(Float64(-t1) / u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -3000.0) tmp = t1 * ((-v / u) / u); elseif ((u <= 2.15e-29) || (~((u <= 2500000.0)) && (u <= 7.5e+103))) tmp = -v / t1; else tmp = (v / u) * (-t1 / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -3000.0], N[(t1 * N[(N[((-v) / u), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[u, 2.15e-29], And[N[Not[LessEqual[u, 2500000.0]], $MachinePrecision], LessEqual[u, 7.5e+103]]], N[((-v) / t1), $MachinePrecision], N[(N[(v / u), $MachinePrecision] * N[((-t1) / u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3000:\\
\;\;\;\;t1 \cdot \frac{\frac{-v}{u}}{u}\\
\mathbf{elif}\;u \leq 2.15 \cdot 10^{-29} \lor \neg \left(u \leq 2500000\right) \land u \leq 7.5 \cdot 10^{+103}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u} \cdot \frac{-t1}{u}\\
\end{array}
\end{array}
if u < -3e3Initial program 80.9%
*-commutative80.9%
times-frac97.4%
neg-mul-197.4%
associate-/l*97.4%
associate-*r/97.4%
associate-/l*97.4%
associate-/l/97.4%
neg-mul-197.4%
*-lft-identity97.4%
metadata-eval97.4%
times-frac97.4%
neg-mul-197.4%
remove-double-neg97.4%
neg-mul-197.4%
sub0-neg97.4%
associate--r+97.4%
neg-sub097.4%
div-sub97.4%
distribute-frac-neg97.4%
*-inverses97.4%
metadata-eval97.4%
Simplified97.4%
Taylor expanded in v around 0 90.2%
mul-1-neg90.2%
Simplified90.2%
Taylor expanded in t1 around 0 70.4%
unpow270.4%
associate-*r/72.7%
Simplified72.7%
associate-/r*81.6%
associate-/r/83.9%
Applied egg-rr83.9%
if -3e3 < u < 2.1499999999999999e-29 or 2.5e6 < u < 7.49999999999999922e103Initial program 67.8%
*-commutative67.8%
times-frac97.8%
neg-mul-197.8%
associate-/l*97.8%
associate-*r/97.8%
associate-/l*97.8%
associate-/l/97.8%
neg-mul-197.8%
*-lft-identity97.8%
metadata-eval97.8%
times-frac97.8%
neg-mul-197.8%
remove-double-neg97.8%
neg-mul-197.8%
sub0-neg97.8%
associate--r+97.8%
neg-sub097.8%
div-sub97.8%
distribute-frac-neg97.8%
*-inverses97.8%
metadata-eval97.8%
Simplified97.8%
Taylor expanded in t1 around inf 79.8%
associate-*r/79.8%
neg-mul-179.8%
Simplified79.8%
if 2.1499999999999999e-29 < u < 2.5e6 or 7.49999999999999922e103 < u Initial program 79.9%
*-commutative79.9%
times-frac99.5%
neg-mul-199.5%
associate-/l*99.5%
associate-*r/99.6%
associate-/l*99.6%
associate-/l/99.6%
neg-mul-199.6%
*-lft-identity99.6%
metadata-eval99.6%
times-frac99.6%
neg-mul-199.6%
remove-double-neg99.6%
neg-mul-199.6%
sub0-neg99.6%
associate--r+99.6%
neg-sub099.6%
div-sub99.6%
distribute-frac-neg99.6%
*-inverses99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in v around 0 89.3%
mul-1-neg89.3%
Simplified89.3%
Taylor expanded in t1 around 0 72.4%
unpow272.4%
associate-*r/74.6%
Simplified74.6%
associate-/r*86.3%
div-inv86.2%
clear-num86.3%
Applied egg-rr86.3%
Final simplification82.4%
(FPCore (u v t1)
:precision binary64
(if (<= u -620.0)
(* t1 (/ (/ (- v) u) u))
(if (<= u 3.9e-30)
(/ (- v) t1)
(if (or (<= u 225000000.0) (not (<= u 6.3e+103)))
(* (/ v u) (/ (- t1) u))
(/ (- v) (+ t1 (* u 2.0)))))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -620.0) {
tmp = t1 * ((-v / u) / u);
} else if (u <= 3.9e-30) {
tmp = -v / t1;
} else if ((u <= 225000000.0) || !(u <= 6.3e+103)) {
tmp = (v / u) * (-t1 / u);
} else {
tmp = -v / (t1 + (u * 2.0));
}
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 <= (-620.0d0)) then
tmp = t1 * ((-v / u) / u)
else if (u <= 3.9d-30) then
tmp = -v / t1
else if ((u <= 225000000.0d0) .or. (.not. (u <= 6.3d+103))) then
tmp = (v / u) * (-t1 / u)
else
tmp = -v / (t1 + (u * 2.0d0))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -620.0) {
tmp = t1 * ((-v / u) / u);
} else if (u <= 3.9e-30) {
tmp = -v / t1;
} else if ((u <= 225000000.0) || !(u <= 6.3e+103)) {
tmp = (v / u) * (-t1 / u);
} else {
tmp = -v / (t1 + (u * 2.0));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -620.0: tmp = t1 * ((-v / u) / u) elif u <= 3.9e-30: tmp = -v / t1 elif (u <= 225000000.0) or not (u <= 6.3e+103): tmp = (v / u) * (-t1 / u) else: tmp = -v / (t1 + (u * 2.0)) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -620.0) tmp = Float64(t1 * Float64(Float64(Float64(-v) / u) / u)); elseif (u <= 3.9e-30) tmp = Float64(Float64(-v) / t1); elseif ((u <= 225000000.0) || !(u <= 6.3e+103)) tmp = Float64(Float64(v / u) * Float64(Float64(-t1) / u)); else tmp = Float64(Float64(-v) / Float64(t1 + Float64(u * 2.0))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -620.0) tmp = t1 * ((-v / u) / u); elseif (u <= 3.9e-30) tmp = -v / t1; elseif ((u <= 225000000.0) || ~((u <= 6.3e+103))) tmp = (v / u) * (-t1 / u); else tmp = -v / (t1 + (u * 2.0)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -620.0], N[(t1 * N[(N[((-v) / u), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 3.9e-30], N[((-v) / t1), $MachinePrecision], If[Or[LessEqual[u, 225000000.0], N[Not[LessEqual[u, 6.3e+103]], $MachinePrecision]], N[(N[(v / u), $MachinePrecision] * N[((-t1) / u), $MachinePrecision]), $MachinePrecision], N[((-v) / N[(t1 + N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -620:\\
\;\;\;\;t1 \cdot \frac{\frac{-v}{u}}{u}\\
\mathbf{elif}\;u \leq 3.9 \cdot 10^{-30}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{elif}\;u \leq 225000000 \lor \neg \left(u \leq 6.3 \cdot 10^{+103}\right):\\
\;\;\;\;\frac{v}{u} \cdot \frac{-t1}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u \cdot 2}\\
\end{array}
\end{array}
if u < -620Initial program 80.9%
*-commutative80.9%
times-frac97.4%
neg-mul-197.4%
associate-/l*97.4%
associate-*r/97.4%
associate-/l*97.4%
associate-/l/97.4%
neg-mul-197.4%
*-lft-identity97.4%
metadata-eval97.4%
times-frac97.4%
neg-mul-197.4%
remove-double-neg97.4%
neg-mul-197.4%
sub0-neg97.4%
associate--r+97.4%
neg-sub097.4%
div-sub97.4%
distribute-frac-neg97.4%
*-inverses97.4%
metadata-eval97.4%
Simplified97.4%
Taylor expanded in v around 0 90.2%
mul-1-neg90.2%
Simplified90.2%
Taylor expanded in t1 around 0 70.4%
unpow270.4%
associate-*r/72.7%
Simplified72.7%
associate-/r*81.6%
associate-/r/83.9%
Applied egg-rr83.9%
if -620 < u < 3.9000000000000003e-30Initial program 69.6%
*-commutative69.6%
times-frac98.2%
neg-mul-198.2%
associate-/l*98.2%
associate-*r/98.2%
associate-/l*98.2%
associate-/l/98.2%
neg-mul-198.2%
*-lft-identity98.2%
metadata-eval98.2%
times-frac98.2%
neg-mul-198.2%
remove-double-neg98.2%
neg-mul-198.2%
sub0-neg98.2%
associate--r+98.2%
neg-sub098.2%
div-sub98.2%
distribute-frac-neg98.2%
*-inverses98.2%
metadata-eval98.2%
Simplified98.2%
Taylor expanded in t1 around inf 80.8%
associate-*r/80.8%
neg-mul-180.8%
Simplified80.8%
if 3.9000000000000003e-30 < u < 2.25e8 or 6.29999999999999969e103 < u Initial program 79.9%
*-commutative79.9%
times-frac99.5%
neg-mul-199.5%
associate-/l*99.5%
associate-*r/99.6%
associate-/l*99.6%
associate-/l/99.6%
neg-mul-199.6%
*-lft-identity99.6%
metadata-eval99.6%
times-frac99.6%
neg-mul-199.6%
remove-double-neg99.6%
neg-mul-199.6%
sub0-neg99.6%
associate--r+99.6%
neg-sub099.6%
div-sub99.6%
distribute-frac-neg99.6%
*-inverses99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in v around 0 89.3%
mul-1-neg89.3%
Simplified89.3%
Taylor expanded in t1 around 0 72.4%
unpow272.4%
associate-*r/74.6%
Simplified74.6%
associate-/r*86.3%
div-inv86.2%
clear-num86.3%
Applied egg-rr86.3%
if 2.25e8 < u < 6.29999999999999969e103Initial program 56.3%
*-commutative56.3%
times-frac94.9%
neg-mul-194.9%
associate-/l*94.9%
associate-*r/94.9%
associate-/l*94.9%
associate-/l/94.9%
neg-mul-194.9%
*-lft-identity94.9%
metadata-eval94.9%
times-frac94.9%
neg-mul-194.9%
remove-double-neg94.9%
neg-mul-194.9%
sub0-neg94.9%
associate--r+94.9%
neg-sub094.9%
div-sub94.9%
distribute-frac-neg94.9%
*-inverses94.9%
metadata-eval94.9%
Simplified94.9%
Taylor expanded in v around 0 95.0%
mul-1-neg95.0%
Simplified95.0%
Taylor expanded in t1 around inf 73.6%
*-commutative73.6%
Simplified73.6%
Final simplification82.4%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ (- t1) u)))
(if (<= u -3500.0)
(* t1 (/ (/ (- v) u) u))
(if (<= u 2.15e-30)
(/ (- v) t1)
(if (<= u 140000.0)
(* (/ v u) t_1)
(if (<= u 5.2e+103) (/ (- v) (+ t1 (* u 2.0))) (/ t_1 (/ u v))))))))
double code(double u, double v, double t1) {
double t_1 = -t1 / u;
double tmp;
if (u <= -3500.0) {
tmp = t1 * ((-v / u) / u);
} else if (u <= 2.15e-30) {
tmp = -v / t1;
} else if (u <= 140000.0) {
tmp = (v / u) * t_1;
} else if (u <= 5.2e+103) {
tmp = -v / (t1 + (u * 2.0));
} else {
tmp = t_1 / (u / v);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: t_1
real(8) :: tmp
t_1 = -t1 / u
if (u <= (-3500.0d0)) then
tmp = t1 * ((-v / u) / u)
else if (u <= 2.15d-30) then
tmp = -v / t1
else if (u <= 140000.0d0) then
tmp = (v / u) * t_1
else if (u <= 5.2d+103) then
tmp = -v / (t1 + (u * 2.0d0))
else
tmp = t_1 / (u / v)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = -t1 / u;
double tmp;
if (u <= -3500.0) {
tmp = t1 * ((-v / u) / u);
} else if (u <= 2.15e-30) {
tmp = -v / t1;
} else if (u <= 140000.0) {
tmp = (v / u) * t_1;
} else if (u <= 5.2e+103) {
tmp = -v / (t1 + (u * 2.0));
} else {
tmp = t_1 / (u / v);
}
return tmp;
}
def code(u, v, t1): t_1 = -t1 / u tmp = 0 if u <= -3500.0: tmp = t1 * ((-v / u) / u) elif u <= 2.15e-30: tmp = -v / t1 elif u <= 140000.0: tmp = (v / u) * t_1 elif u <= 5.2e+103: tmp = -v / (t1 + (u * 2.0)) else: tmp = t_1 / (u / v) return tmp
function code(u, v, t1) t_1 = Float64(Float64(-t1) / u) tmp = 0.0 if (u <= -3500.0) tmp = Float64(t1 * Float64(Float64(Float64(-v) / u) / u)); elseif (u <= 2.15e-30) tmp = Float64(Float64(-v) / t1); elseif (u <= 140000.0) tmp = Float64(Float64(v / u) * t_1); elseif (u <= 5.2e+103) tmp = Float64(Float64(-v) / Float64(t1 + Float64(u * 2.0))); else tmp = Float64(t_1 / Float64(u / v)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = -t1 / u; tmp = 0.0; if (u <= -3500.0) tmp = t1 * ((-v / u) / u); elseif (u <= 2.15e-30) tmp = -v / t1; elseif (u <= 140000.0) tmp = (v / u) * t_1; elseif (u <= 5.2e+103) tmp = -v / (t1 + (u * 2.0)); else tmp = t_1 / (u / v); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-t1) / u), $MachinePrecision]}, If[LessEqual[u, -3500.0], N[(t1 * N[(N[((-v) / u), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 2.15e-30], N[((-v) / t1), $MachinePrecision], If[LessEqual[u, 140000.0], N[(N[(v / u), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[u, 5.2e+103], N[((-v) / N[(t1 + N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / N[(u / v), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-t1}{u}\\
\mathbf{if}\;u \leq -3500:\\
\;\;\;\;t1 \cdot \frac{\frac{-v}{u}}{u}\\
\mathbf{elif}\;u \leq 2.15 \cdot 10^{-30}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{elif}\;u \leq 140000:\\
\;\;\;\;\frac{v}{u} \cdot t_1\\
\mathbf{elif}\;u \leq 5.2 \cdot 10^{+103}:\\
\;\;\;\;\frac{-v}{t1 + u \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1}{\frac{u}{v}}\\
\end{array}
\end{array}
if u < -3500Initial program 80.9%
*-commutative80.9%
times-frac97.4%
neg-mul-197.4%
associate-/l*97.4%
associate-*r/97.4%
associate-/l*97.4%
associate-/l/97.4%
neg-mul-197.4%
*-lft-identity97.4%
metadata-eval97.4%
times-frac97.4%
neg-mul-197.4%
remove-double-neg97.4%
neg-mul-197.4%
sub0-neg97.4%
associate--r+97.4%
neg-sub097.4%
div-sub97.4%
distribute-frac-neg97.4%
*-inverses97.4%
metadata-eval97.4%
Simplified97.4%
Taylor expanded in v around 0 90.2%
mul-1-neg90.2%
Simplified90.2%
Taylor expanded in t1 around 0 70.4%
unpow270.4%
associate-*r/72.7%
Simplified72.7%
associate-/r*81.6%
associate-/r/83.9%
Applied egg-rr83.9%
if -3500 < u < 2.14999999999999983e-30Initial program 69.6%
*-commutative69.6%
times-frac98.2%
neg-mul-198.2%
associate-/l*98.2%
associate-*r/98.2%
associate-/l*98.2%
associate-/l/98.2%
neg-mul-198.2%
*-lft-identity98.2%
metadata-eval98.2%
times-frac98.2%
neg-mul-198.2%
remove-double-neg98.2%
neg-mul-198.2%
sub0-neg98.2%
associate--r+98.2%
neg-sub098.2%
div-sub98.2%
distribute-frac-neg98.2%
*-inverses98.2%
metadata-eval98.2%
Simplified98.2%
Taylor expanded in t1 around inf 80.8%
associate-*r/80.8%
neg-mul-180.8%
Simplified80.8%
if 2.14999999999999983e-30 < u < 1.4e5Initial program 99.4%
*-commutative99.4%
times-frac99.6%
neg-mul-199.6%
associate-/l*99.6%
associate-*r/99.7%
associate-/l*99.7%
associate-/l/99.7%
neg-mul-199.7%
*-lft-identity99.7%
metadata-eval99.7%
times-frac99.7%
neg-mul-199.7%
remove-double-neg99.7%
neg-mul-199.7%
sub0-neg99.7%
associate--r+99.7%
neg-sub099.7%
div-sub99.9%
distribute-frac-neg99.9%
*-inverses99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in v around 0 99.7%
mul-1-neg99.7%
Simplified99.7%
Taylor expanded in t1 around 0 69.3%
unpow269.3%
associate-*r/69.1%
Simplified69.1%
associate-/r*69.3%
div-inv69.3%
clear-num69.3%
Applied egg-rr69.3%
if 1.4e5 < u < 5.2000000000000003e103Initial program 56.3%
*-commutative56.3%
times-frac94.9%
neg-mul-194.9%
associate-/l*94.9%
associate-*r/94.9%
associate-/l*94.9%
associate-/l/94.9%
neg-mul-194.9%
*-lft-identity94.9%
metadata-eval94.9%
times-frac94.9%
neg-mul-194.9%
remove-double-neg94.9%
neg-mul-194.9%
sub0-neg94.9%
associate--r+94.9%
neg-sub094.9%
div-sub94.9%
distribute-frac-neg94.9%
*-inverses94.9%
metadata-eval94.9%
Simplified94.9%
Taylor expanded in v around 0 95.0%
mul-1-neg95.0%
Simplified95.0%
Taylor expanded in t1 around inf 73.6%
*-commutative73.6%
Simplified73.6%
if 5.2000000000000003e103 < u Initial program 76.0%
*-commutative76.0%
times-frac99.5%
neg-mul-199.5%
associate-/l*99.5%
associate-*r/99.6%
associate-/l*99.6%
associate-/l/99.6%
neg-mul-199.6%
*-lft-identity99.6%
metadata-eval99.6%
times-frac99.6%
neg-mul-199.6%
remove-double-neg99.6%
neg-mul-199.6%
sub0-neg99.6%
associate--r+99.6%
neg-sub099.6%
div-sub99.6%
distribute-frac-neg99.6%
*-inverses99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in v around 0 87.2%
mul-1-neg87.2%
Simplified87.2%
Taylor expanded in t1 around 0 73.1%
unpow273.1%
associate-*r/75.8%
Simplified75.8%
associate-/r*89.8%
associate-/r/88.2%
Applied egg-rr88.2%
*-commutative88.2%
associate-*r/90.0%
associate-*l/89.8%
clear-num89.8%
un-div-inv89.8%
Applied egg-rr89.8%
Final simplification82.4%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ (- t1) u)))
(if (<= u -1450.0)
(/ (- t1) (* u (/ u v)))
(if (<= u 4.6e-30)
(/ (- v) t1)
(if (<= u 650000000.0)
(* (/ v u) t_1)
(if (<= u 5.2e+103) (/ (- v) (+ t1 (* u 2.0))) (/ t_1 (/ u v))))))))
double code(double u, double v, double t1) {
double t_1 = -t1 / u;
double tmp;
if (u <= -1450.0) {
tmp = -t1 / (u * (u / v));
} else if (u <= 4.6e-30) {
tmp = -v / t1;
} else if (u <= 650000000.0) {
tmp = (v / u) * t_1;
} else if (u <= 5.2e+103) {
tmp = -v / (t1 + (u * 2.0));
} else {
tmp = t_1 / (u / v);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: t_1
real(8) :: tmp
t_1 = -t1 / u
if (u <= (-1450.0d0)) then
tmp = -t1 / (u * (u / v))
else if (u <= 4.6d-30) then
tmp = -v / t1
else if (u <= 650000000.0d0) then
tmp = (v / u) * t_1
else if (u <= 5.2d+103) then
tmp = -v / (t1 + (u * 2.0d0))
else
tmp = t_1 / (u / v)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = -t1 / u;
double tmp;
if (u <= -1450.0) {
tmp = -t1 / (u * (u / v));
} else if (u <= 4.6e-30) {
tmp = -v / t1;
} else if (u <= 650000000.0) {
tmp = (v / u) * t_1;
} else if (u <= 5.2e+103) {
tmp = -v / (t1 + (u * 2.0));
} else {
tmp = t_1 / (u / v);
}
return tmp;
}
def code(u, v, t1): t_1 = -t1 / u tmp = 0 if u <= -1450.0: tmp = -t1 / (u * (u / v)) elif u <= 4.6e-30: tmp = -v / t1 elif u <= 650000000.0: tmp = (v / u) * t_1 elif u <= 5.2e+103: tmp = -v / (t1 + (u * 2.0)) else: tmp = t_1 / (u / v) return tmp
function code(u, v, t1) t_1 = Float64(Float64(-t1) / u) tmp = 0.0 if (u <= -1450.0) tmp = Float64(Float64(-t1) / Float64(u * Float64(u / v))); elseif (u <= 4.6e-30) tmp = Float64(Float64(-v) / t1); elseif (u <= 650000000.0) tmp = Float64(Float64(v / u) * t_1); elseif (u <= 5.2e+103) tmp = Float64(Float64(-v) / Float64(t1 + Float64(u * 2.0))); else tmp = Float64(t_1 / Float64(u / v)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = -t1 / u; tmp = 0.0; if (u <= -1450.0) tmp = -t1 / (u * (u / v)); elseif (u <= 4.6e-30) tmp = -v / t1; elseif (u <= 650000000.0) tmp = (v / u) * t_1; elseif (u <= 5.2e+103) tmp = -v / (t1 + (u * 2.0)); else tmp = t_1 / (u / v); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-t1) / u), $MachinePrecision]}, If[LessEqual[u, -1450.0], N[((-t1) / N[(u * N[(u / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 4.6e-30], N[((-v) / t1), $MachinePrecision], If[LessEqual[u, 650000000.0], N[(N[(v / u), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[u, 5.2e+103], N[((-v) / N[(t1 + N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / N[(u / v), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-t1}{u}\\
\mathbf{if}\;u \leq -1450:\\
\;\;\;\;\frac{-t1}{u \cdot \frac{u}{v}}\\
\mathbf{elif}\;u \leq 4.6 \cdot 10^{-30}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{elif}\;u \leq 650000000:\\
\;\;\;\;\frac{v}{u} \cdot t_1\\
\mathbf{elif}\;u \leq 5.2 \cdot 10^{+103}:\\
\;\;\;\;\frac{-v}{t1 + u \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1}{\frac{u}{v}}\\
\end{array}
\end{array}
if u < -1450Initial program 80.9%
associate-/l*83.3%
associate-/l*93.2%
Simplified93.2%
Taylor expanded in t1 around 0 83.9%
Taylor expanded in t1 around 0 76.6%
unpow276.6%
associate-*r/83.9%
Simplified83.9%
if -1450 < u < 4.59999999999999968e-30Initial program 69.6%
*-commutative69.6%
times-frac98.2%
neg-mul-198.2%
associate-/l*98.2%
associate-*r/98.2%
associate-/l*98.2%
associate-/l/98.2%
neg-mul-198.2%
*-lft-identity98.2%
metadata-eval98.2%
times-frac98.2%
neg-mul-198.2%
remove-double-neg98.2%
neg-mul-198.2%
sub0-neg98.2%
associate--r+98.2%
neg-sub098.2%
div-sub98.2%
distribute-frac-neg98.2%
*-inverses98.2%
metadata-eval98.2%
Simplified98.2%
Taylor expanded in t1 around inf 80.8%
associate-*r/80.8%
neg-mul-180.8%
Simplified80.8%
if 4.59999999999999968e-30 < u < 6.5e8Initial program 99.4%
*-commutative99.4%
times-frac99.6%
neg-mul-199.6%
associate-/l*99.6%
associate-*r/99.7%
associate-/l*99.7%
associate-/l/99.7%
neg-mul-199.7%
*-lft-identity99.7%
metadata-eval99.7%
times-frac99.7%
neg-mul-199.7%
remove-double-neg99.7%
neg-mul-199.7%
sub0-neg99.7%
associate--r+99.7%
neg-sub099.7%
div-sub99.9%
distribute-frac-neg99.9%
*-inverses99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in v around 0 99.7%
mul-1-neg99.7%
Simplified99.7%
Taylor expanded in t1 around 0 69.3%
unpow269.3%
associate-*r/69.1%
Simplified69.1%
associate-/r*69.3%
div-inv69.3%
clear-num69.3%
Applied egg-rr69.3%
if 6.5e8 < u < 5.2000000000000003e103Initial program 56.3%
*-commutative56.3%
times-frac94.9%
neg-mul-194.9%
associate-/l*94.9%
associate-*r/94.9%
associate-/l*94.9%
associate-/l/94.9%
neg-mul-194.9%
*-lft-identity94.9%
metadata-eval94.9%
times-frac94.9%
neg-mul-194.9%
remove-double-neg94.9%
neg-mul-194.9%
sub0-neg94.9%
associate--r+94.9%
neg-sub094.9%
div-sub94.9%
distribute-frac-neg94.9%
*-inverses94.9%
metadata-eval94.9%
Simplified94.9%
Taylor expanded in v around 0 95.0%
mul-1-neg95.0%
Simplified95.0%
Taylor expanded in t1 around inf 73.6%
*-commutative73.6%
Simplified73.6%
if 5.2000000000000003e103 < u Initial program 76.0%
*-commutative76.0%
times-frac99.5%
neg-mul-199.5%
associate-/l*99.5%
associate-*r/99.6%
associate-/l*99.6%
associate-/l/99.6%
neg-mul-199.6%
*-lft-identity99.6%
metadata-eval99.6%
times-frac99.6%
neg-mul-199.6%
remove-double-neg99.6%
neg-mul-199.6%
sub0-neg99.6%
associate--r+99.6%
neg-sub099.6%
div-sub99.6%
distribute-frac-neg99.6%
*-inverses99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in v around 0 87.2%
mul-1-neg87.2%
Simplified87.2%
Taylor expanded in t1 around 0 73.1%
unpow273.1%
associate-*r/75.8%
Simplified75.8%
associate-/r*89.8%
associate-/r/88.2%
Applied egg-rr88.2%
*-commutative88.2%
associate-*r/90.0%
associate-*l/89.8%
clear-num89.8%
un-div-inv89.8%
Applied egg-rr89.8%
Final simplification82.4%
(FPCore (u v t1)
:precision binary64
(if (<= u -2200.0)
(/ (- t1) (* u (/ u v)))
(if (<= u 1.08e-29)
(/ (- v) t1)
(if (<= u 1750000.0)
(/ (/ v u) (- -1.0 (/ u t1)))
(if (<= u 6.4e+103)
(/ (- v) (+ t1 (* u 2.0)))
(/ (/ (- t1) u) (/ u v)))))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -2200.0) {
tmp = -t1 / (u * (u / v));
} else if (u <= 1.08e-29) {
tmp = -v / t1;
} else if (u <= 1750000.0) {
tmp = (v / u) / (-1.0 - (u / t1));
} else if (u <= 6.4e+103) {
tmp = -v / (t1 + (u * 2.0));
} else {
tmp = (-t1 / u) / (u / v);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-2200.0d0)) then
tmp = -t1 / (u * (u / v))
else if (u <= 1.08d-29) then
tmp = -v / t1
else if (u <= 1750000.0d0) then
tmp = (v / u) / ((-1.0d0) - (u / t1))
else if (u <= 6.4d+103) then
tmp = -v / (t1 + (u * 2.0d0))
else
tmp = (-t1 / u) / (u / v)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -2200.0) {
tmp = -t1 / (u * (u / v));
} else if (u <= 1.08e-29) {
tmp = -v / t1;
} else if (u <= 1750000.0) {
tmp = (v / u) / (-1.0 - (u / t1));
} else if (u <= 6.4e+103) {
tmp = -v / (t1 + (u * 2.0));
} else {
tmp = (-t1 / u) / (u / v);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -2200.0: tmp = -t1 / (u * (u / v)) elif u <= 1.08e-29: tmp = -v / t1 elif u <= 1750000.0: tmp = (v / u) / (-1.0 - (u / t1)) elif u <= 6.4e+103: tmp = -v / (t1 + (u * 2.0)) else: tmp = (-t1 / u) / (u / v) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -2200.0) tmp = Float64(Float64(-t1) / Float64(u * Float64(u / v))); elseif (u <= 1.08e-29) tmp = Float64(Float64(-v) / t1); elseif (u <= 1750000.0) tmp = Float64(Float64(v / u) / Float64(-1.0 - Float64(u / t1))); elseif (u <= 6.4e+103) tmp = Float64(Float64(-v) / Float64(t1 + Float64(u * 2.0))); else tmp = Float64(Float64(Float64(-t1) / u) / Float64(u / v)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -2200.0) tmp = -t1 / (u * (u / v)); elseif (u <= 1.08e-29) tmp = -v / t1; elseif (u <= 1750000.0) tmp = (v / u) / (-1.0 - (u / t1)); elseif (u <= 6.4e+103) tmp = -v / (t1 + (u * 2.0)); else tmp = (-t1 / u) / (u / v); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -2200.0], N[((-t1) / N[(u * N[(u / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 1.08e-29], N[((-v) / t1), $MachinePrecision], If[LessEqual[u, 1750000.0], N[(N[(v / u), $MachinePrecision] / N[(-1.0 - N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 6.4e+103], N[((-v) / N[(t1 + N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[((-t1) / u), $MachinePrecision] / N[(u / v), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2200:\\
\;\;\;\;\frac{-t1}{u \cdot \frac{u}{v}}\\
\mathbf{elif}\;u \leq 1.08 \cdot 10^{-29}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{elif}\;u \leq 1750000:\\
\;\;\;\;\frac{\frac{v}{u}}{-1 - \frac{u}{t1}}\\
\mathbf{elif}\;u \leq 6.4 \cdot 10^{+103}:\\
\;\;\;\;\frac{-v}{t1 + u \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{-t1}{u}}{\frac{u}{v}}\\
\end{array}
\end{array}
if u < -2200Initial program 80.9%
associate-/l*83.3%
associate-/l*93.2%
Simplified93.2%
Taylor expanded in t1 around 0 83.9%
Taylor expanded in t1 around 0 76.6%
unpow276.6%
associate-*r/83.9%
Simplified83.9%
if -2200 < u < 1.07999999999999995e-29Initial program 69.6%
*-commutative69.6%
times-frac98.2%
neg-mul-198.2%
associate-/l*98.2%
associate-*r/98.2%
associate-/l*98.2%
associate-/l/98.2%
neg-mul-198.2%
*-lft-identity98.2%
metadata-eval98.2%
times-frac98.2%
neg-mul-198.2%
remove-double-neg98.2%
neg-mul-198.2%
sub0-neg98.2%
associate--r+98.2%
neg-sub098.2%
div-sub98.2%
distribute-frac-neg98.2%
*-inverses98.2%
metadata-eval98.2%
Simplified98.2%
Taylor expanded in t1 around inf 80.8%
associate-*r/80.8%
neg-mul-180.8%
Simplified80.8%
if 1.07999999999999995e-29 < u < 1.75e6Initial program 99.4%
*-commutative99.4%
times-frac99.6%
neg-mul-199.6%
associate-/l*99.6%
associate-*r/99.7%
associate-/l*99.7%
associate-/l/99.7%
neg-mul-199.7%
*-lft-identity99.7%
metadata-eval99.7%
times-frac99.7%
neg-mul-199.7%
remove-double-neg99.7%
neg-mul-199.7%
sub0-neg99.7%
associate--r+99.7%
neg-sub099.7%
div-sub99.9%
distribute-frac-neg99.9%
*-inverses99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t1 around 0 69.9%
if 1.75e6 < u < 6.39999999999999985e103Initial program 56.3%
*-commutative56.3%
times-frac94.9%
neg-mul-194.9%
associate-/l*94.9%
associate-*r/94.9%
associate-/l*94.9%
associate-/l/94.9%
neg-mul-194.9%
*-lft-identity94.9%
metadata-eval94.9%
times-frac94.9%
neg-mul-194.9%
remove-double-neg94.9%
neg-mul-194.9%
sub0-neg94.9%
associate--r+94.9%
neg-sub094.9%
div-sub94.9%
distribute-frac-neg94.9%
*-inverses94.9%
metadata-eval94.9%
Simplified94.9%
Taylor expanded in v around 0 95.0%
mul-1-neg95.0%
Simplified95.0%
Taylor expanded in t1 around inf 73.6%
*-commutative73.6%
Simplified73.6%
if 6.39999999999999985e103 < u Initial program 76.0%
*-commutative76.0%
times-frac99.5%
neg-mul-199.5%
associate-/l*99.5%
associate-*r/99.6%
associate-/l*99.6%
associate-/l/99.6%
neg-mul-199.6%
*-lft-identity99.6%
metadata-eval99.6%
times-frac99.6%
neg-mul-199.6%
remove-double-neg99.6%
neg-mul-199.6%
sub0-neg99.6%
associate--r+99.6%
neg-sub099.6%
div-sub99.6%
distribute-frac-neg99.6%
*-inverses99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in v around 0 87.2%
mul-1-neg87.2%
Simplified87.2%
Taylor expanded in t1 around 0 73.1%
unpow273.1%
associate-*r/75.8%
Simplified75.8%
associate-/r*89.8%
associate-/r/88.2%
Applied egg-rr88.2%
*-commutative88.2%
associate-*r/90.0%
associate-*l/89.8%
clear-num89.8%
un-div-inv89.8%
Applied egg-rr89.8%
Final simplification82.4%
(FPCore (u v t1)
:precision binary64
(if (<= u -900.0)
(/ (- t1) (* u (/ u v)))
(if (<= u 6.6e-32)
(/ (- v) t1)
(if (<= u 4800000.0)
(/ (- t1) (* (+ t1 u) (/ u v)))
(if (<= u 1.15e+104)
(/ (- v) (+ t1 (* u 2.0)))
(/ (/ (- t1) u) (/ u v)))))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -900.0) {
tmp = -t1 / (u * (u / v));
} else if (u <= 6.6e-32) {
tmp = -v / t1;
} else if (u <= 4800000.0) {
tmp = -t1 / ((t1 + u) * (u / v));
} else if (u <= 1.15e+104) {
tmp = -v / (t1 + (u * 2.0));
} else {
tmp = (-t1 / u) / (u / v);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-900.0d0)) then
tmp = -t1 / (u * (u / v))
else if (u <= 6.6d-32) then
tmp = -v / t1
else if (u <= 4800000.0d0) then
tmp = -t1 / ((t1 + u) * (u / v))
else if (u <= 1.15d+104) then
tmp = -v / (t1 + (u * 2.0d0))
else
tmp = (-t1 / u) / (u / v)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -900.0) {
tmp = -t1 / (u * (u / v));
} else if (u <= 6.6e-32) {
tmp = -v / t1;
} else if (u <= 4800000.0) {
tmp = -t1 / ((t1 + u) * (u / v));
} else if (u <= 1.15e+104) {
tmp = -v / (t1 + (u * 2.0));
} else {
tmp = (-t1 / u) / (u / v);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -900.0: tmp = -t1 / (u * (u / v)) elif u <= 6.6e-32: tmp = -v / t1 elif u <= 4800000.0: tmp = -t1 / ((t1 + u) * (u / v)) elif u <= 1.15e+104: tmp = -v / (t1 + (u * 2.0)) else: tmp = (-t1 / u) / (u / v) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -900.0) tmp = Float64(Float64(-t1) / Float64(u * Float64(u / v))); elseif (u <= 6.6e-32) tmp = Float64(Float64(-v) / t1); elseif (u <= 4800000.0) tmp = Float64(Float64(-t1) / Float64(Float64(t1 + u) * Float64(u / v))); elseif (u <= 1.15e+104) tmp = Float64(Float64(-v) / Float64(t1 + Float64(u * 2.0))); else tmp = Float64(Float64(Float64(-t1) / u) / Float64(u / v)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -900.0) tmp = -t1 / (u * (u / v)); elseif (u <= 6.6e-32) tmp = -v / t1; elseif (u <= 4800000.0) tmp = -t1 / ((t1 + u) * (u / v)); elseif (u <= 1.15e+104) tmp = -v / (t1 + (u * 2.0)); else tmp = (-t1 / u) / (u / v); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -900.0], N[((-t1) / N[(u * N[(u / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 6.6e-32], N[((-v) / t1), $MachinePrecision], If[LessEqual[u, 4800000.0], N[((-t1) / N[(N[(t1 + u), $MachinePrecision] * N[(u / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 1.15e+104], N[((-v) / N[(t1 + N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[((-t1) / u), $MachinePrecision] / N[(u / v), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -900:\\
\;\;\;\;\frac{-t1}{u \cdot \frac{u}{v}}\\
\mathbf{elif}\;u \leq 6.6 \cdot 10^{-32}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{elif}\;u \leq 4800000:\\
\;\;\;\;\frac{-t1}{\left(t1 + u\right) \cdot \frac{u}{v}}\\
\mathbf{elif}\;u \leq 1.15 \cdot 10^{+104}:\\
\;\;\;\;\frac{-v}{t1 + u \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{-t1}{u}}{\frac{u}{v}}\\
\end{array}
\end{array}
if u < -900Initial program 80.9%
associate-/l*83.3%
associate-/l*93.2%
Simplified93.2%
Taylor expanded in t1 around 0 83.9%
Taylor expanded in t1 around 0 76.6%
unpow276.6%
associate-*r/83.9%
Simplified83.9%
if -900 < u < 6.60000000000000051e-32Initial program 69.3%
*-commutative69.3%
times-frac98.2%
neg-mul-198.2%
associate-/l*98.2%
associate-*r/98.2%
associate-/l*98.2%
associate-/l/98.2%
neg-mul-198.2%
*-lft-identity98.2%
metadata-eval98.2%
times-frac98.2%
neg-mul-198.2%
remove-double-neg98.2%
neg-mul-198.2%
sub0-neg98.2%
associate--r+98.2%
neg-sub098.2%
div-sub98.2%
distribute-frac-neg98.2%
*-inverses98.2%
metadata-eval98.2%
Simplified98.2%
Taylor expanded in t1 around inf 80.6%
associate-*r/80.6%
neg-mul-180.6%
Simplified80.6%
if 6.60000000000000051e-32 < u < 4.8e6Initial program 99.5%
associate-/l*95.5%
associate-/l*95.7%
Simplified95.7%
Taylor expanded in t1 around 0 76.4%
clear-num72.4%
associate-/r/76.5%
clear-num76.5%
Applied egg-rr76.5%
if 4.8e6 < u < 1.14999999999999992e104Initial program 56.3%
*-commutative56.3%
times-frac94.9%
neg-mul-194.9%
associate-/l*94.9%
associate-*r/94.9%
associate-/l*94.9%
associate-/l/94.9%
neg-mul-194.9%
*-lft-identity94.9%
metadata-eval94.9%
times-frac94.9%
neg-mul-194.9%
remove-double-neg94.9%
neg-mul-194.9%
sub0-neg94.9%
associate--r+94.9%
neg-sub094.9%
div-sub94.9%
distribute-frac-neg94.9%
*-inverses94.9%
metadata-eval94.9%
Simplified94.9%
Taylor expanded in v around 0 95.0%
mul-1-neg95.0%
Simplified95.0%
Taylor expanded in t1 around inf 73.6%
*-commutative73.6%
Simplified73.6%
if 1.14999999999999992e104 < u Initial program 76.0%
*-commutative76.0%
times-frac99.5%
neg-mul-199.5%
associate-/l*99.5%
associate-*r/99.6%
associate-/l*99.6%
associate-/l/99.6%
neg-mul-199.6%
*-lft-identity99.6%
metadata-eval99.6%
times-frac99.6%
neg-mul-199.6%
remove-double-neg99.6%
neg-mul-199.6%
sub0-neg99.6%
associate--r+99.6%
neg-sub099.6%
div-sub99.6%
distribute-frac-neg99.6%
*-inverses99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in v around 0 87.2%
mul-1-neg87.2%
Simplified87.2%
Taylor expanded in t1 around 0 73.1%
unpow273.1%
associate-*r/75.8%
Simplified75.8%
associate-/r*89.8%
associate-/r/88.2%
Applied egg-rr88.2%
*-commutative88.2%
associate-*r/90.0%
associate-*l/89.8%
clear-num89.8%
un-div-inv89.8%
Applied egg-rr89.8%
Final simplification82.6%
(FPCore (u v t1)
:precision binary64
(if (<= u -510.0)
(/ (- t1) (/ (+ t1 u) (/ v u)))
(if (<= u 7e-31)
(/ (- v) t1)
(if (<= u 2500000.0)
(/ (- t1) (* (+ t1 u) (/ u v)))
(if (<= u 5.2e+103)
(/ (- v) (+ t1 (* u 2.0)))
(/ (/ (- t1) u) (/ u v)))))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -510.0) {
tmp = -t1 / ((t1 + u) / (v / u));
} else if (u <= 7e-31) {
tmp = -v / t1;
} else if (u <= 2500000.0) {
tmp = -t1 / ((t1 + u) * (u / v));
} else if (u <= 5.2e+103) {
tmp = -v / (t1 + (u * 2.0));
} else {
tmp = (-t1 / u) / (u / v);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-510.0d0)) then
tmp = -t1 / ((t1 + u) / (v / u))
else if (u <= 7d-31) then
tmp = -v / t1
else if (u <= 2500000.0d0) then
tmp = -t1 / ((t1 + u) * (u / v))
else if (u <= 5.2d+103) then
tmp = -v / (t1 + (u * 2.0d0))
else
tmp = (-t1 / u) / (u / v)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -510.0) {
tmp = -t1 / ((t1 + u) / (v / u));
} else if (u <= 7e-31) {
tmp = -v / t1;
} else if (u <= 2500000.0) {
tmp = -t1 / ((t1 + u) * (u / v));
} else if (u <= 5.2e+103) {
tmp = -v / (t1 + (u * 2.0));
} else {
tmp = (-t1 / u) / (u / v);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -510.0: tmp = -t1 / ((t1 + u) / (v / u)) elif u <= 7e-31: tmp = -v / t1 elif u <= 2500000.0: tmp = -t1 / ((t1 + u) * (u / v)) elif u <= 5.2e+103: tmp = -v / (t1 + (u * 2.0)) else: tmp = (-t1 / u) / (u / v) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -510.0) tmp = Float64(Float64(-t1) / Float64(Float64(t1 + u) / Float64(v / u))); elseif (u <= 7e-31) tmp = Float64(Float64(-v) / t1); elseif (u <= 2500000.0) tmp = Float64(Float64(-t1) / Float64(Float64(t1 + u) * Float64(u / v))); elseif (u <= 5.2e+103) tmp = Float64(Float64(-v) / Float64(t1 + Float64(u * 2.0))); else tmp = Float64(Float64(Float64(-t1) / u) / Float64(u / v)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -510.0) tmp = -t1 / ((t1 + u) / (v / u)); elseif (u <= 7e-31) tmp = -v / t1; elseif (u <= 2500000.0) tmp = -t1 / ((t1 + u) * (u / v)); elseif (u <= 5.2e+103) tmp = -v / (t1 + (u * 2.0)); else tmp = (-t1 / u) / (u / v); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -510.0], N[((-t1) / N[(N[(t1 + u), $MachinePrecision] / N[(v / u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 7e-31], N[((-v) / t1), $MachinePrecision], If[LessEqual[u, 2500000.0], N[((-t1) / N[(N[(t1 + u), $MachinePrecision] * N[(u / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 5.2e+103], N[((-v) / N[(t1 + N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[((-t1) / u), $MachinePrecision] / N[(u / v), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -510:\\
\;\;\;\;\frac{-t1}{\frac{t1 + u}{\frac{v}{u}}}\\
\mathbf{elif}\;u \leq 7 \cdot 10^{-31}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{elif}\;u \leq 2500000:\\
\;\;\;\;\frac{-t1}{\left(t1 + u\right) \cdot \frac{u}{v}}\\
\mathbf{elif}\;u \leq 5.2 \cdot 10^{+103}:\\
\;\;\;\;\frac{-v}{t1 + u \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{-t1}{u}}{\frac{u}{v}}\\
\end{array}
\end{array}
if u < -510Initial program 80.9%
associate-/l*83.3%
associate-/l*93.2%
Simplified93.2%
Taylor expanded in t1 around 0 83.9%
if -510 < u < 6.99999999999999971e-31Initial program 69.3%
*-commutative69.3%
times-frac98.2%
neg-mul-198.2%
associate-/l*98.2%
associate-*r/98.2%
associate-/l*98.2%
associate-/l/98.2%
neg-mul-198.2%
*-lft-identity98.2%
metadata-eval98.2%
times-frac98.2%
neg-mul-198.2%
remove-double-neg98.2%
neg-mul-198.2%
sub0-neg98.2%
associate--r+98.2%
neg-sub098.2%
div-sub98.2%
distribute-frac-neg98.2%
*-inverses98.2%
metadata-eval98.2%
Simplified98.2%
Taylor expanded in t1 around inf 80.6%
associate-*r/80.6%
neg-mul-180.6%
Simplified80.6%
if 6.99999999999999971e-31 < u < 2.5e6Initial program 99.5%
associate-/l*95.5%
associate-/l*95.7%
Simplified95.7%
Taylor expanded in t1 around 0 76.4%
clear-num72.4%
associate-/r/76.5%
clear-num76.5%
Applied egg-rr76.5%
if 2.5e6 < u < 5.2000000000000003e103Initial program 56.3%
*-commutative56.3%
times-frac94.9%
neg-mul-194.9%
associate-/l*94.9%
associate-*r/94.9%
associate-/l*94.9%
associate-/l/94.9%
neg-mul-194.9%
*-lft-identity94.9%
metadata-eval94.9%
times-frac94.9%
neg-mul-194.9%
remove-double-neg94.9%
neg-mul-194.9%
sub0-neg94.9%
associate--r+94.9%
neg-sub094.9%
div-sub94.9%
distribute-frac-neg94.9%
*-inverses94.9%
metadata-eval94.9%
Simplified94.9%
Taylor expanded in v around 0 95.0%
mul-1-neg95.0%
Simplified95.0%
Taylor expanded in t1 around inf 73.6%
*-commutative73.6%
Simplified73.6%
if 5.2000000000000003e103 < u Initial program 76.0%
*-commutative76.0%
times-frac99.5%
neg-mul-199.5%
associate-/l*99.5%
associate-*r/99.6%
associate-/l*99.6%
associate-/l/99.6%
neg-mul-199.6%
*-lft-identity99.6%
metadata-eval99.6%
times-frac99.6%
neg-mul-199.6%
remove-double-neg99.6%
neg-mul-199.6%
sub0-neg99.6%
associate--r+99.6%
neg-sub099.6%
div-sub99.6%
distribute-frac-neg99.6%
*-inverses99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in v around 0 87.2%
mul-1-neg87.2%
Simplified87.2%
Taylor expanded in t1 around 0 73.1%
unpow273.1%
associate-*r/75.8%
Simplified75.8%
associate-/r*89.8%
associate-/r/88.2%
Applied egg-rr88.2%
*-commutative88.2%
associate-*r/90.0%
associate-*l/89.8%
clear-num89.8%
un-div-inv89.8%
Applied egg-rr89.8%
Final simplification82.6%
(FPCore (u v t1) :precision binary64 (if (or (<= u -3.9e+61) (not (<= u 2.15e+104))) (* v (/ t1 (* u u))) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.9e+61) || !(u <= 2.15e+104)) {
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 <= (-3.9d+61)) .or. (.not. (u <= 2.15d+104))) 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 <= -3.9e+61) || !(u <= 2.15e+104)) {
tmp = v * (t1 / (u * u));
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -3.9e+61) or not (u <= 2.15e+104): tmp = v * (t1 / (u * u)) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -3.9e+61) || !(u <= 2.15e+104)) 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 <= -3.9e+61) || ~((u <= 2.15e+104))) tmp = v * (t1 / (u * u)); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -3.9e+61], N[Not[LessEqual[u, 2.15e+104]], $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 -3.9 \cdot 10^{+61} \lor \neg \left(u \leq 2.15 \cdot 10^{+104}\right):\\
\;\;\;\;v \cdot \frac{t1}{u \cdot u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -3.89999999999999987e61 or 2.1500000000000001e104 < u Initial program 77.9%
Taylor expanded in t1 around 0 77.0%
unpow277.0%
Simplified77.0%
frac-2neg77.0%
div-inv77.0%
*-commutative77.0%
distribute-rgt-neg-in77.0%
remove-double-neg77.0%
Applied egg-rr77.0%
associate-*l*74.4%
associate-*r/74.4%
*-rgt-identity74.4%
distribute-rgt-neg-in74.4%
Simplified74.4%
expm1-log1p-u74.4%
expm1-udef66.8%
add-sqr-sqrt30.1%
sqrt-unprod66.8%
sqr-neg66.8%
sqrt-unprod36.6%
add-sqr-sqrt66.7%
Applied egg-rr66.7%
expm1-def66.5%
expm1-log1p66.6%
Simplified66.6%
if -3.89999999999999987e61 < u < 2.1500000000000001e104Initial program 71.3%
*-commutative71.3%
times-frac97.5%
neg-mul-197.5%
associate-/l*97.4%
associate-*r/97.4%
associate-/l*97.4%
associate-/l/97.4%
neg-mul-197.4%
*-lft-identity97.4%
metadata-eval97.4%
times-frac97.4%
neg-mul-197.4%
remove-double-neg97.4%
neg-mul-197.4%
sub0-neg97.4%
associate--r+97.4%
neg-sub097.4%
div-sub97.5%
distribute-frac-neg97.5%
*-inverses97.5%
metadata-eval97.5%
Simplified97.5%
Taylor expanded in t1 around inf 73.6%
associate-*r/73.6%
neg-mul-173.6%
Simplified73.6%
Final simplification70.8%
(FPCore (u v t1) :precision binary64 (if (or (<= u -5.4e+131) (not (<= u 2.4e+185))) (* (/ v u) (- 0.5)) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -5.4e+131) || !(u <= 2.4e+185)) {
tmp = (v / u) * -0.5;
} 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.4d+131)) .or. (.not. (u <= 2.4d+185))) then
tmp = (v / u) * -0.5d0
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.4e+131) || !(u <= 2.4e+185)) {
tmp = (v / u) * -0.5;
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -5.4e+131) or not (u <= 2.4e+185): tmp = (v / u) * -0.5 else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -5.4e+131) || !(u <= 2.4e+185)) tmp = Float64(Float64(v / u) * Float64(-0.5)); else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -5.4e+131) || ~((u <= 2.4e+185))) tmp = (v / u) * -0.5; else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -5.4e+131], N[Not[LessEqual[u, 2.4e+185]], $MachinePrecision]], N[(N[(v / u), $MachinePrecision] * (-0.5)), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -5.4 \cdot 10^{+131} \lor \neg \left(u \leq 2.4 \cdot 10^{+185}\right):\\
\;\;\;\;\frac{v}{u} \cdot \left(-0.5\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -5.40000000000000008e131 or 2.39999999999999989e185 < u Initial program 81.6%
*-commutative81.6%
times-frac99.0%
neg-mul-199.0%
associate-/l*99.0%
associate-*r/99.0%
associate-/l*99.0%
associate-/l/99.0%
neg-mul-199.0%
*-lft-identity99.0%
metadata-eval99.0%
times-frac99.0%
neg-mul-199.0%
remove-double-neg99.0%
neg-mul-199.0%
sub0-neg99.0%
associate--r+99.0%
neg-sub099.0%
div-sub98.9%
distribute-frac-neg98.9%
*-inverses98.9%
metadata-eval98.9%
Simplified98.9%
Taylor expanded in v around 0 89.1%
mul-1-neg89.1%
Simplified89.1%
Taylor expanded in t1 around inf 39.8%
*-commutative39.8%
Simplified39.8%
Taylor expanded in t1 around 0 36.8%
if -5.40000000000000008e131 < u < 2.39999999999999989e185Initial program 71.4%
*-commutative71.4%
times-frac97.9%
neg-mul-197.9%
associate-/l*97.9%
associate-*r/97.9%
associate-/l*97.9%
associate-/l/97.9%
neg-mul-197.9%
*-lft-identity97.9%
metadata-eval97.9%
times-frac97.9%
neg-mul-197.9%
remove-double-neg97.9%
neg-mul-197.9%
sub0-neg97.9%
associate--r+97.9%
neg-sub097.9%
div-sub97.9%
distribute-frac-neg97.9%
*-inverses97.9%
metadata-eval97.9%
Simplified97.9%
Taylor expanded in t1 around inf 63.4%
associate-*r/63.4%
neg-mul-163.4%
Simplified63.4%
Final simplification57.0%
(FPCore (u v t1) :precision binary64 (if (<= u -7.2e+149) (* t1 (/ v (* t1 t1))) (if (<= u 2.7e+184) (/ (- v) t1) (* (/ v u) (- 0.5)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -7.2e+149) {
tmp = t1 * (v / (t1 * t1));
} else if (u <= 2.7e+184) {
tmp = -v / t1;
} else {
tmp = (v / u) * -0.5;
}
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.2d+149)) then
tmp = t1 * (v / (t1 * t1))
else if (u <= 2.7d+184) then
tmp = -v / t1
else
tmp = (v / u) * -0.5d0
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -7.2e+149) {
tmp = t1 * (v / (t1 * t1));
} else if (u <= 2.7e+184) {
tmp = -v / t1;
} else {
tmp = (v / u) * -0.5;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -7.2e+149: tmp = t1 * (v / (t1 * t1)) elif u <= 2.7e+184: tmp = -v / t1 else: tmp = (v / u) * -0.5 return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -7.2e+149) tmp = Float64(t1 * Float64(v / Float64(t1 * t1))); elseif (u <= 2.7e+184) tmp = Float64(Float64(-v) / t1); else tmp = Float64(Float64(v / u) * Float64(-0.5)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -7.2e+149) tmp = t1 * (v / (t1 * t1)); elseif (u <= 2.7e+184) tmp = -v / t1; else tmp = (v / u) * -0.5; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -7.2e+149], N[(t1 * N[(v / N[(t1 * t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 2.7e+184], N[((-v) / t1), $MachinePrecision], N[(N[(v / u), $MachinePrecision] * (-0.5)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -7.2 \cdot 10^{+149}:\\
\;\;\;\;t1 \cdot \frac{v}{t1 \cdot t1}\\
\mathbf{elif}\;u \leq 2.7 \cdot 10^{+184}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u} \cdot \left(-0.5\right)\\
\end{array}
\end{array}
if u < -7.1999999999999999e149Initial program 77.8%
associate-/l*76.0%
Simplified76.0%
Taylor expanded in t1 around inf 41.0%
unpow241.0%
Simplified41.0%
div-inv41.0%
clear-num37.7%
add-sqr-sqrt16.6%
sqrt-unprod13.2%
sqr-neg13.2%
sqrt-prod20.9%
add-sqr-sqrt37.4%
Applied egg-rr37.4%
if -7.1999999999999999e149 < u < 2.6999999999999999e184Initial program 71.8%
*-commutative71.8%
times-frac97.7%
neg-mul-197.7%
associate-/l*97.7%
associate-*r/97.7%
associate-/l*97.7%
associate-/l/97.7%
neg-mul-197.7%
*-lft-identity97.7%
metadata-eval97.7%
times-frac97.7%
neg-mul-197.7%
remove-double-neg97.7%
neg-mul-197.7%
sub0-neg97.7%
associate--r+97.7%
neg-sub097.7%
div-sub97.7%
distribute-frac-neg97.7%
*-inverses97.7%
metadata-eval97.7%
Simplified97.7%
Taylor expanded in t1 around inf 62.5%
associate-*r/62.5%
neg-mul-162.5%
Simplified62.5%
if 2.6999999999999999e184 < u Initial program 83.3%
*-commutative83.3%
times-frac99.4%
neg-mul-199.4%
associate-/l*99.4%
associate-*r/99.4%
associate-/l*99.4%
associate-/l/99.4%
neg-mul-199.4%
*-lft-identity99.4%
metadata-eval99.4%
times-frac99.4%
neg-mul-199.4%
remove-double-neg99.4%
neg-mul-199.4%
sub0-neg99.4%
associate--r+99.4%
neg-sub099.4%
div-sub99.4%
distribute-frac-neg99.4%
*-inverses99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in v around 0 90.1%
mul-1-neg90.1%
Simplified90.1%
Taylor expanded in t1 around inf 42.7%
*-commutative42.7%
Simplified42.7%
Taylor expanded in t1 around 0 39.6%
Final simplification57.0%
(FPCore (u v t1) :precision binary64 (if (or (<= u -4.2e+131) (not (<= u 1.95e+189))) (/ (- v) u) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -4.2e+131) || !(u <= 1.95e+189)) {
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 <= (-4.2d+131)) .or. (.not. (u <= 1.95d+189))) 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 <= -4.2e+131) || !(u <= 1.95e+189)) {
tmp = -v / u;
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -4.2e+131) or not (u <= 1.95e+189): tmp = -v / u else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -4.2e+131) || !(u <= 1.95e+189)) tmp = Float64(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 <= -4.2e+131) || ~((u <= 1.95e+189))) tmp = -v / u; else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -4.2e+131], N[Not[LessEqual[u, 1.95e+189]], $MachinePrecision]], N[((-v) / u), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -4.2 \cdot 10^{+131} \lor \neg \left(u \leq 1.95 \cdot 10^{+189}\right):\\
\;\;\;\;\frac{-v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -4.19999999999999971e131 or 1.95e189 < u Initial program 81.6%
*-commutative81.6%
times-frac99.0%
neg-mul-199.0%
associate-/l*99.0%
associate-*r/99.0%
associate-/l*99.0%
associate-/l/99.0%
neg-mul-199.0%
*-lft-identity99.0%
metadata-eval99.0%
times-frac99.0%
neg-mul-199.0%
remove-double-neg99.0%
neg-mul-199.0%
sub0-neg99.0%
associate--r+99.0%
neg-sub099.0%
div-sub98.9%
distribute-frac-neg98.9%
*-inverses98.9%
metadata-eval98.9%
Simplified98.9%
Taylor expanded in t1 around 0 95.0%
Taylor expanded in u around 0 36.7%
mul-1-neg36.7%
distribute-frac-neg36.7%
Simplified36.7%
if -4.19999999999999971e131 < u < 1.95e189Initial program 71.4%
*-commutative71.4%
times-frac97.9%
neg-mul-197.9%
associate-/l*97.9%
associate-*r/97.9%
associate-/l*97.9%
associate-/l/97.9%
neg-mul-197.9%
*-lft-identity97.9%
metadata-eval97.9%
times-frac97.9%
neg-mul-197.9%
remove-double-neg97.9%
neg-mul-197.9%
sub0-neg97.9%
associate--r+97.9%
neg-sub097.9%
div-sub97.9%
distribute-frac-neg97.9%
*-inverses97.9%
metadata-eval97.9%
Simplified97.9%
Taylor expanded in t1 around inf 63.4%
associate-*r/63.4%
neg-mul-163.4%
Simplified63.4%
Final simplification57.0%
(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(Float64(-v) / t1) end
function tmp = code(u, v, t1) tmp = -v / t1; end
code[u_, v_, t1_] := N[((-v) / t1), $MachinePrecision]
\begin{array}{l}
\\
\frac{-v}{t1}
\end{array}
Initial program 73.9%
*-commutative73.9%
times-frac98.1%
neg-mul-198.1%
associate-/l*98.1%
associate-*r/98.1%
associate-/l*98.1%
associate-/l/98.1%
neg-mul-198.1%
*-lft-identity98.1%
metadata-eval98.1%
times-frac98.1%
neg-mul-198.1%
remove-double-neg98.1%
neg-mul-198.1%
sub0-neg98.1%
associate--r+98.1%
neg-sub098.1%
div-sub98.2%
distribute-frac-neg98.2%
*-inverses98.2%
metadata-eval98.2%
Simplified98.2%
Taylor expanded in t1 around inf 52.1%
associate-*r/52.1%
neg-mul-152.1%
Simplified52.1%
Final simplification52.1%
herbie shell --seed 2023192
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))