
(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 19 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 (- -1.0 (/ u t1))) (+ u t1)))
double code(double u, double v, double t1) {
return (v / (-1.0 - (u / t1))) / (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 / ((-1.0d0) - (u / t1))) / (u + t1)
end function
public static double code(double u, double v, double t1) {
return (v / (-1.0 - (u / t1))) / (u + t1);
}
def code(u, v, t1): return (v / (-1.0 - (u / t1))) / (u + t1)
function code(u, v, t1) return Float64(Float64(v / Float64(-1.0 - Float64(u / t1))) / Float64(u + t1)) end
function tmp = code(u, v, t1) tmp = (v / (-1.0 - (u / t1))) / (u + t1); end
code[u_, v_, t1_] := N[(N[(v / N[(-1.0 - N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(u + t1), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{v}{-1 - \frac{u}{t1}}}{u + t1}
\end{array}
Initial program 70.4%
times-frac98.7%
distribute-frac-neg98.7%
distribute-neg-frac298.7%
+-commutative98.7%
distribute-neg-in98.7%
unsub-neg98.7%
Simplified98.7%
frac-2neg98.7%
frac-2neg98.7%
frac-times70.4%
sub-neg70.4%
distribute-neg-in70.4%
+-commutative70.4%
remove-double-neg70.4%
frac-times98.7%
associate-*r/99.0%
add-sqr-sqrt48.2%
sqrt-unprod42.8%
sqr-neg42.8%
sqrt-unprod17.0%
add-sqr-sqrt37.2%
add-sqr-sqrt19.4%
sqrt-unprod58.4%
Applied egg-rr99.0%
Taylor expanded in t1 around inf 99.1%
Taylor expanded in v around 0 99.1%
associate-*r/99.1%
mul-1-neg99.1%
Simplified99.1%
Final simplification99.1%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (- (- u) t1)))
(if (<= t1 -3.7e+118)
(/ v t_1)
(if (<= t1 1.35e+93)
(* t1 (/ (/ v (+ u t1)) t_1))
(/ (- (* v (/ u t1)) v) (+ u t1))))))
double code(double u, double v, double t1) {
double t_1 = -u - t1;
double tmp;
if (t1 <= -3.7e+118) {
tmp = v / t_1;
} else if (t1 <= 1.35e+93) {
tmp = t1 * ((v / (u + t1)) / t_1);
} else {
tmp = ((v * (u / t1)) - v) / (u + t1);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: t_1
real(8) :: tmp
t_1 = -u - t1
if (t1 <= (-3.7d+118)) then
tmp = v / t_1
else if (t1 <= 1.35d+93) then
tmp = t1 * ((v / (u + t1)) / t_1)
else
tmp = ((v * (u / t1)) - v) / (u + t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = -u - t1;
double tmp;
if (t1 <= -3.7e+118) {
tmp = v / t_1;
} else if (t1 <= 1.35e+93) {
tmp = t1 * ((v / (u + t1)) / t_1);
} else {
tmp = ((v * (u / t1)) - v) / (u + t1);
}
return tmp;
}
def code(u, v, t1): t_1 = -u - t1 tmp = 0 if t1 <= -3.7e+118: tmp = v / t_1 elif t1 <= 1.35e+93: tmp = t1 * ((v / (u + t1)) / t_1) else: tmp = ((v * (u / t1)) - v) / (u + t1) return tmp
function code(u, v, t1) t_1 = Float64(Float64(-u) - t1) tmp = 0.0 if (t1 <= -3.7e+118) tmp = Float64(v / t_1); elseif (t1 <= 1.35e+93) tmp = Float64(t1 * Float64(Float64(v / Float64(u + t1)) / t_1)); else tmp = Float64(Float64(Float64(v * Float64(u / t1)) - v) / Float64(u + t1)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = -u - t1; tmp = 0.0; if (t1 <= -3.7e+118) tmp = v / t_1; elseif (t1 <= 1.35e+93) tmp = t1 * ((v / (u + t1)) / t_1); else tmp = ((v * (u / t1)) - v) / (u + t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-u) - t1), $MachinePrecision]}, If[LessEqual[t1, -3.7e+118], N[(v / t$95$1), $MachinePrecision], If[LessEqual[t1, 1.35e+93], N[(t1 * N[(N[(v / N[(u + t1), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(N[(v * N[(u / t1), $MachinePrecision]), $MachinePrecision] - v), $MachinePrecision] / N[(u + t1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-u\right) - t1\\
\mathbf{if}\;t1 \leq -3.7 \cdot 10^{+118}:\\
\;\;\;\;\frac{v}{t\_1}\\
\mathbf{elif}\;t1 \leq 1.35 \cdot 10^{+93}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u + t1}}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v \cdot \frac{u}{t1} - v}{u + t1}\\
\end{array}
\end{array}
if t1 < -3.69999999999999987e118Initial program 45.8%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
frac-2neg99.9%
frac-2neg99.9%
frac-times45.8%
sub-neg45.8%
distribute-neg-in45.8%
+-commutative45.8%
remove-double-neg45.8%
frac-times99.9%
associate-*r/99.9%
add-sqr-sqrt99.2%
sqrt-unprod12.6%
sqr-neg12.6%
sqrt-unprod0.0%
add-sqr-sqrt41.3%
add-sqr-sqrt38.6%
sqrt-unprod42.2%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 92.8%
mul-1-neg92.8%
Simplified92.8%
if -3.69999999999999987e118 < t1 < 1.35e93Initial program 81.5%
associate-/l*83.8%
distribute-lft-neg-out83.8%
distribute-rgt-neg-in83.8%
associate-/r*90.3%
distribute-neg-frac290.3%
Simplified90.3%
if 1.35e93 < t1 Initial program 44.6%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
frac-2neg99.9%
frac-2neg99.9%
frac-times44.6%
sub-neg44.6%
distribute-neg-in44.6%
+-commutative44.6%
remove-double-neg44.6%
frac-times99.9%
associate-*r/99.9%
add-sqr-sqrt0.0%
sqrt-unprod8.4%
sqr-neg8.4%
sqrt-unprod31.9%
add-sqr-sqrt31.9%
add-sqr-sqrt0.1%
sqrt-unprod47.9%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 78.0%
+-commutative78.0%
mul-1-neg78.0%
sub-neg78.0%
*-commutative78.0%
*-lft-identity78.0%
times-frac87.8%
/-rgt-identity87.8%
Simplified87.8%
Final simplification90.3%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ v (+ u t1))))
(if (or (<= u -1.25e-11) (not (<= u 7.2e-68)))
(* t_1 (/ (- t1) u))
(* t_1 (+ (/ u t1) -1.0)))))
double code(double u, double v, double t1) {
double t_1 = v / (u + t1);
double tmp;
if ((u <= -1.25e-11) || !(u <= 7.2e-68)) {
tmp = t_1 * (-t1 / u);
} else {
tmp = t_1 * ((u / t1) + -1.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) :: t_1
real(8) :: tmp
t_1 = v / (u + t1)
if ((u <= (-1.25d-11)) .or. (.not. (u <= 7.2d-68))) then
tmp = t_1 * (-t1 / u)
else
tmp = t_1 * ((u / t1) + (-1.0d0))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = v / (u + t1);
double tmp;
if ((u <= -1.25e-11) || !(u <= 7.2e-68)) {
tmp = t_1 * (-t1 / u);
} else {
tmp = t_1 * ((u / t1) + -1.0);
}
return tmp;
}
def code(u, v, t1): t_1 = v / (u + t1) tmp = 0 if (u <= -1.25e-11) or not (u <= 7.2e-68): tmp = t_1 * (-t1 / u) else: tmp = t_1 * ((u / t1) + -1.0) return tmp
function code(u, v, t1) t_1 = Float64(v / Float64(u + t1)) tmp = 0.0 if ((u <= -1.25e-11) || !(u <= 7.2e-68)) tmp = Float64(t_1 * Float64(Float64(-t1) / u)); else tmp = Float64(t_1 * Float64(Float64(u / t1) + -1.0)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = v / (u + t1); tmp = 0.0; if ((u <= -1.25e-11) || ~((u <= 7.2e-68))) tmp = t_1 * (-t1 / u); else tmp = t_1 * ((u / t1) + -1.0); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(v / N[(u + t1), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[u, -1.25e-11], N[Not[LessEqual[u, 7.2e-68]], $MachinePrecision]], N[(t$95$1 * N[((-t1) / u), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(N[(u / t1), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{v}{u + t1}\\
\mathbf{if}\;u \leq -1.25 \cdot 10^{-11} \lor \neg \left(u \leq 7.2 \cdot 10^{-68}\right):\\
\;\;\;\;t\_1 \cdot \frac{-t1}{u}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(\frac{u}{t1} + -1\right)\\
\end{array}
\end{array}
if u < -1.25000000000000005e-11 or 7.20000000000000015e-68 < u Initial program 76.3%
times-frac99.1%
distribute-frac-neg99.1%
distribute-neg-frac299.1%
+-commutative99.1%
distribute-neg-in99.1%
unsub-neg99.1%
Simplified99.1%
Taylor expanded in t1 around 0 83.2%
associate-*r/83.2%
mul-1-neg83.2%
Simplified83.2%
if -1.25000000000000005e-11 < u < 7.20000000000000015e-68Initial program 64.1%
times-frac98.4%
distribute-frac-neg98.4%
distribute-neg-frac298.4%
+-commutative98.4%
distribute-neg-in98.4%
unsub-neg98.4%
Simplified98.4%
Taylor expanded in t1 around inf 82.5%
Final simplification82.9%
(FPCore (u v t1) :precision binary64 (if (or (<= u -3.7e-10) (not (<= u 3.25e-62))) (* (/ v (+ u t1)) (/ (- t1) u)) (* v (/ (+ (* (/ u t1) 2.0) -1.0) t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.7e-10) || !(u <= 3.25e-62)) {
tmp = (v / (u + t1)) * (-t1 / u);
} else {
tmp = v * ((((u / t1) * 2.0) + -1.0) / t1);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-3.7d-10)) .or. (.not. (u <= 3.25d-62))) then
tmp = (v / (u + t1)) * (-t1 / u)
else
tmp = v * ((((u / t1) * 2.0d0) + (-1.0d0)) / t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.7e-10) || !(u <= 3.25e-62)) {
tmp = (v / (u + t1)) * (-t1 / u);
} else {
tmp = v * ((((u / t1) * 2.0) + -1.0) / t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -3.7e-10) or not (u <= 3.25e-62): tmp = (v / (u + t1)) * (-t1 / u) else: tmp = v * ((((u / t1) * 2.0) + -1.0) / t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -3.7e-10) || !(u <= 3.25e-62)) tmp = Float64(Float64(v / Float64(u + t1)) * Float64(Float64(-t1) / u)); else tmp = Float64(v * Float64(Float64(Float64(Float64(u / t1) * 2.0) + -1.0) / t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -3.7e-10) || ~((u <= 3.25e-62))) tmp = (v / (u + t1)) * (-t1 / u); else tmp = v * ((((u / t1) * 2.0) + -1.0) / t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -3.7e-10], N[Not[LessEqual[u, 3.25e-62]], $MachinePrecision]], N[(N[(v / N[(u + t1), $MachinePrecision]), $MachinePrecision] * N[((-t1) / u), $MachinePrecision]), $MachinePrecision], N[(v * N[(N[(N[(N[(u / t1), $MachinePrecision] * 2.0), $MachinePrecision] + -1.0), $MachinePrecision] / t1), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.7 \cdot 10^{-10} \lor \neg \left(u \leq 3.25 \cdot 10^{-62}\right):\\
\;\;\;\;\frac{v}{u + t1} \cdot \frac{-t1}{u}\\
\mathbf{else}:\\
\;\;\;\;v \cdot \frac{\frac{u}{t1} \cdot 2 + -1}{t1}\\
\end{array}
\end{array}
if u < -3.70000000000000015e-10 or 3.25000000000000013e-62 < u Initial program 76.0%
times-frac99.0%
distribute-frac-neg99.0%
distribute-neg-frac299.0%
+-commutative99.0%
distribute-neg-in99.0%
unsub-neg99.0%
Simplified99.0%
Taylor expanded in t1 around 0 83.7%
associate-*r/83.7%
mul-1-neg83.7%
Simplified83.7%
if -3.70000000000000015e-10 < u < 3.25000000000000013e-62Initial program 64.6%
associate-*l/72.6%
*-commutative72.6%
Simplified72.6%
Taylor expanded in t1 around inf 82.0%
Final simplification82.9%
(FPCore (u v t1) :precision binary64 (if (or (<= u -0.0031) (not (<= u 1.25e-62))) (* (/ v (+ u t1)) (/ (- t1) u)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -0.0031) || !(u <= 1.25e-62)) {
tmp = (v / (u + t1)) * (-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 <= (-0.0031d0)) .or. (.not. (u <= 1.25d-62))) then
tmp = (v / (u + t1)) * (-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 <= -0.0031) || !(u <= 1.25e-62)) {
tmp = (v / (u + t1)) * (-t1 / u);
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -0.0031) or not (u <= 1.25e-62): tmp = (v / (u + t1)) * (-t1 / u) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -0.0031) || !(u <= 1.25e-62)) tmp = Float64(Float64(v / Float64(u + t1)) * Float64(Float64(-t1) / u)); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -0.0031) || ~((u <= 1.25e-62))) tmp = (v / (u + t1)) * (-t1 / u); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -0.0031], N[Not[LessEqual[u, 1.25e-62]], $MachinePrecision]], N[(N[(v / N[(u + t1), $MachinePrecision]), $MachinePrecision] * N[((-t1) / u), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -0.0031 \lor \neg \left(u \leq 1.25 \cdot 10^{-62}\right):\\
\;\;\;\;\frac{v}{u + t1} \cdot \frac{-t1}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -0.00309999999999999989 or 1.25e-62 < u Initial program 76.0%
times-frac99.0%
distribute-frac-neg99.0%
distribute-neg-frac299.0%
+-commutative99.0%
distribute-neg-in99.0%
unsub-neg99.0%
Simplified99.0%
Taylor expanded in t1 around 0 83.7%
associate-*r/83.7%
mul-1-neg83.7%
Simplified83.7%
if -0.00309999999999999989 < u < 1.25e-62Initial program 64.6%
times-frac98.4%
distribute-frac-neg98.4%
distribute-neg-frac298.4%
+-commutative98.4%
distribute-neg-in98.4%
unsub-neg98.4%
Simplified98.4%
Taylor expanded in t1 around inf 81.7%
associate-*r/81.7%
neg-mul-181.7%
Simplified81.7%
Final simplification82.7%
(FPCore (u v t1) :precision binary64 (if (<= u -1.3e-11) (/ (/ (- t1) u) (/ u v)) (if (<= u 3.3e-62) (/ v (- t1)) (* t1 (/ (/ v (+ u t1)) (- u))))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.3e-11) {
tmp = (-t1 / u) / (u / v);
} else if (u <= 3.3e-62) {
tmp = v / -t1;
} else {
tmp = t1 * ((v / (u + t1)) / -u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-1.3d-11)) then
tmp = (-t1 / u) / (u / v)
else if (u <= 3.3d-62) then
tmp = v / -t1
else
tmp = t1 * ((v / (u + t1)) / -u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -1.3e-11) {
tmp = (-t1 / u) / (u / v);
} else if (u <= 3.3e-62) {
tmp = v / -t1;
} else {
tmp = t1 * ((v / (u + t1)) / -u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.3e-11: tmp = (-t1 / u) / (u / v) elif u <= 3.3e-62: tmp = v / -t1 else: tmp = t1 * ((v / (u + t1)) / -u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.3e-11) tmp = Float64(Float64(Float64(-t1) / u) / Float64(u / v)); elseif (u <= 3.3e-62) tmp = Float64(v / Float64(-t1)); else tmp = Float64(t1 * Float64(Float64(v / Float64(u + t1)) / Float64(-u))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -1.3e-11) tmp = (-t1 / u) / (u / v); elseif (u <= 3.3e-62) tmp = v / -t1; else tmp = t1 * ((v / (u + t1)) / -u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.3e-11], N[(N[((-t1) / u), $MachinePrecision] / N[(u / v), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 3.3e-62], N[(v / (-t1)), $MachinePrecision], N[(t1 * N[(N[(v / N[(u + t1), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.3 \cdot 10^{-11}:\\
\;\;\;\;\frac{\frac{-t1}{u}}{\frac{u}{v}}\\
\mathbf{elif}\;u \leq 3.3 \cdot 10^{-62}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u + t1}}{-u}\\
\end{array}
\end{array}
if u < -1.3e-11Initial program 80.8%
associate-/l*78.0%
distribute-lft-neg-out78.0%
distribute-rgt-neg-in78.0%
associate-/r*90.3%
distribute-neg-frac290.3%
Simplified90.3%
Taylor expanded in t1 around 0 83.5%
Applied egg-rr83.6%
*-commutative83.6%
associate-/r*84.4%
Simplified84.4%
Taylor expanded in t1 around 0 84.6%
associate-*r/84.6%
mul-1-neg84.6%
Simplified84.6%
if -1.3e-11 < u < 3.30000000000000004e-62Initial program 64.6%
times-frac98.4%
distribute-frac-neg98.4%
distribute-neg-frac298.4%
+-commutative98.4%
distribute-neg-in98.4%
unsub-neg98.4%
Simplified98.4%
Taylor expanded in t1 around inf 81.7%
associate-*r/81.7%
neg-mul-181.7%
Simplified81.7%
if 3.30000000000000004e-62 < u Initial program 71.6%
associate-/l*74.4%
distribute-lft-neg-out74.4%
distribute-rgt-neg-in74.4%
associate-/r*88.4%
distribute-neg-frac288.4%
Simplified88.4%
Taylor expanded in t1 around 0 78.6%
Final simplification81.6%
(FPCore (u v t1) :precision binary64 (if (or (<= u -2e-11) (not (<= u 5.8e-51))) (/ (/ (- t1) u) (/ u v)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -2e-11) || !(u <= 5.8e-51)) {
tmp = (-t1 / u) / (u / v);
} else {
tmp = v / -t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-2d-11)) .or. (.not. (u <= 5.8d-51))) then
tmp = (-t1 / u) / (u / v)
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -2e-11) || !(u <= 5.8e-51)) {
tmp = (-t1 / u) / (u / v);
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -2e-11) or not (u <= 5.8e-51): tmp = (-t1 / u) / (u / v) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -2e-11) || !(u <= 5.8e-51)) tmp = Float64(Float64(Float64(-t1) / u) / Float64(u / v)); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -2e-11) || ~((u <= 5.8e-51))) tmp = (-t1 / u) / (u / v); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2e-11], N[Not[LessEqual[u, 5.8e-51]], $MachinePrecision]], N[(N[((-t1) / u), $MachinePrecision] / N[(u / v), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2 \cdot 10^{-11} \lor \neg \left(u \leq 5.8 \cdot 10^{-51}\right):\\
\;\;\;\;\frac{\frac{-t1}{u}}{\frac{u}{v}}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -1.99999999999999988e-11 or 5.79999999999999945e-51 < u Initial program 76.3%
associate-/l*75.7%
distribute-lft-neg-out75.7%
distribute-rgt-neg-in75.7%
associate-/r*89.1%
distribute-neg-frac289.1%
Simplified89.1%
Taylor expanded in t1 around 0 80.6%
Applied egg-rr80.7%
*-commutative80.7%
associate-/r*81.7%
Simplified81.7%
Taylor expanded in t1 around 0 81.7%
associate-*r/81.7%
mul-1-neg81.7%
Simplified81.7%
if -1.99999999999999988e-11 < u < 5.79999999999999945e-51Initial program 64.5%
times-frac98.4%
distribute-frac-neg98.4%
distribute-neg-frac298.4%
+-commutative98.4%
distribute-neg-in98.4%
unsub-neg98.4%
Simplified98.4%
Taylor expanded in t1 around inf 81.3%
associate-*r/81.3%
neg-mul-181.3%
Simplified81.3%
Final simplification81.5%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.15e-10) (not (<= u 5.2e-51))) (* (/ (- t1) u) (/ v u)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.15e-10) || !(u <= 5.2e-51)) {
tmp = (-t1 / u) * (v / u);
} else {
tmp = v / -t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-1.15d-10)) .or. (.not. (u <= 5.2d-51))) then
tmp = (-t1 / u) * (v / u)
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.15e-10) || !(u <= 5.2e-51)) {
tmp = (-t1 / u) * (v / u);
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.15e-10) or not (u <= 5.2e-51): tmp = (-t1 / u) * (v / u) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.15e-10) || !(u <= 5.2e-51)) tmp = Float64(Float64(Float64(-t1) / u) * Float64(v / u)); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -1.15e-10) || ~((u <= 5.2e-51))) tmp = (-t1 / u) * (v / u); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.15e-10], N[Not[LessEqual[u, 5.2e-51]], $MachinePrecision]], N[(N[((-t1) / u), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.15 \cdot 10^{-10} \lor \neg \left(u \leq 5.2 \cdot 10^{-51}\right):\\
\;\;\;\;\frac{-t1}{u} \cdot \frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -1.15000000000000004e-10 or 5.2e-51 < u Initial program 76.3%
times-frac99.0%
distribute-frac-neg99.0%
distribute-neg-frac299.0%
+-commutative99.0%
distribute-neg-in99.0%
unsub-neg99.0%
Simplified99.0%
Taylor expanded in t1 around 0 81.2%
Taylor expanded in t1 around 0 81.2%
associate-*r/83.4%
mul-1-neg83.4%
Simplified81.2%
if -1.15000000000000004e-10 < u < 5.2e-51Initial program 64.5%
times-frac98.4%
distribute-frac-neg98.4%
distribute-neg-frac298.4%
+-commutative98.4%
distribute-neg-in98.4%
unsub-neg98.4%
Simplified98.4%
Taylor expanded in t1 around inf 81.3%
associate-*r/81.3%
neg-mul-181.3%
Simplified81.3%
Final simplification81.3%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.56e-9) (not (<= u 6.2e-52))) (* t1 (/ (/ v u) (- u))) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.56e-9) || !(u <= 6.2e-52)) {
tmp = t1 * ((v / u) / -u);
} else {
tmp = v / -t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-1.56d-9)) .or. (.not. (u <= 6.2d-52))) then
tmp = t1 * ((v / u) / -u)
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.56e-9) || !(u <= 6.2e-52)) {
tmp = t1 * ((v / u) / -u);
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.56e-9) or not (u <= 6.2e-52): tmp = t1 * ((v / u) / -u) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.56e-9) || !(u <= 6.2e-52)) tmp = Float64(t1 * Float64(Float64(v / u) / Float64(-u))); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -1.56e-9) || ~((u <= 6.2e-52))) tmp = t1 * ((v / u) / -u); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.56e-9], N[Not[LessEqual[u, 6.2e-52]], $MachinePrecision]], N[(t1 * N[(N[(v / u), $MachinePrecision] / (-u)), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.56 \cdot 10^{-9} \lor \neg \left(u \leq 6.2 \cdot 10^{-52}\right):\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -1.56e-9 or 6.1999999999999998e-52 < u Initial program 76.3%
associate-/l*75.7%
distribute-lft-neg-out75.7%
distribute-rgt-neg-in75.7%
associate-/r*89.1%
distribute-neg-frac289.1%
Simplified89.1%
Taylor expanded in t1 around 0 80.6%
Taylor expanded in t1 around 0 78.6%
if -1.56e-9 < u < 6.1999999999999998e-52Initial program 64.5%
times-frac98.4%
distribute-frac-neg98.4%
distribute-neg-frac298.4%
+-commutative98.4%
distribute-neg-in98.4%
unsub-neg98.4%
Simplified98.4%
Taylor expanded in t1 around inf 81.3%
associate-*r/81.3%
neg-mul-181.3%
Simplified81.3%
Final simplification80.0%
(FPCore (u v t1) :precision binary64 (if (or (<= u -3.2e+63) (not (<= u 1.35e+59))) (* t1 (/ (/ v u) u)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.2e+63) || !(u <= 1.35e+59)) {
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 <= (-3.2d+63)) .or. (.not. (u <= 1.35d+59))) 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 <= -3.2e+63) || !(u <= 1.35e+59)) {
tmp = t1 * ((v / u) / u);
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -3.2e+63) or not (u <= 1.35e+59): tmp = t1 * ((v / u) / u) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -3.2e+63) || !(u <= 1.35e+59)) tmp = Float64(t1 * Float64(Float64(v / u) / u)); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -3.2e+63) || ~((u <= 1.35e+59))) tmp = t1 * ((v / u) / u); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -3.2e+63], N[Not[LessEqual[u, 1.35e+59]], $MachinePrecision]], N[(t1 * N[(N[(v / u), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.2 \cdot 10^{+63} \lor \neg \left(u \leq 1.35 \cdot 10^{+59}\right):\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -3.20000000000000011e63 or 1.3500000000000001e59 < u Initial program 76.4%
associate-/l*75.9%
distribute-lft-neg-out75.9%
distribute-rgt-neg-in75.9%
associate-/r*91.3%
distribute-neg-frac291.3%
Simplified91.3%
Taylor expanded in t1 around 0 83.6%
Taylor expanded in t1 around 0 83.1%
associate-*r/86.2%
add-sqr-sqrt45.0%
sqrt-unprod69.6%
sqr-neg69.6%
sqrt-unprod28.6%
add-sqr-sqrt62.5%
Applied egg-rr62.5%
associate-/l*64.0%
Simplified64.0%
if -3.20000000000000011e63 < u < 1.3500000000000001e59Initial program 66.2%
times-frac98.0%
distribute-frac-neg98.0%
distribute-neg-frac298.0%
+-commutative98.0%
distribute-neg-in98.0%
unsub-neg98.0%
Simplified98.0%
Taylor expanded in t1 around inf 75.3%
associate-*r/75.3%
neg-mul-175.3%
Simplified75.3%
Final simplification70.6%
(FPCore (u v t1) :precision binary64 (if (<= u -6.8e+56) (/ t1 (* u (/ u v))) (if (<= u 9.4e+58) (/ v (- t1)) (* t1 (/ (/ v u) u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -6.8e+56) {
tmp = t1 / (u * (u / v));
} else if (u <= 9.4e+58) {
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 <= (-6.8d+56)) then
tmp = t1 / (u * (u / v))
else if (u <= 9.4d+58) 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 <= -6.8e+56) {
tmp = t1 / (u * (u / v));
} else if (u <= 9.4e+58) {
tmp = v / -t1;
} else {
tmp = t1 * ((v / u) / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -6.8e+56: tmp = t1 / (u * (u / v)) elif u <= 9.4e+58: tmp = v / -t1 else: tmp = t1 * ((v / u) / u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -6.8e+56) tmp = Float64(t1 / Float64(u * Float64(u / v))); elseif (u <= 9.4e+58) tmp = Float64(v / Float64(-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 <= -6.8e+56) tmp = t1 / (u * (u / v)); elseif (u <= 9.4e+58) tmp = v / -t1; else tmp = t1 * ((v / u) / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -6.8e+56], N[(t1 / N[(u * N[(u / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 9.4e+58], N[(v / (-t1)), $MachinePrecision], N[(t1 * N[(N[(v / u), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -6.8 \cdot 10^{+56}:\\
\;\;\;\;\frac{t1}{u \cdot \frac{u}{v}}\\
\mathbf{elif}\;u \leq 9.4 \cdot 10^{+58}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{u}\\
\end{array}
\end{array}
if u < -6.80000000000000002e56Initial program 79.9%
associate-/l*78.3%
distribute-lft-neg-out78.3%
distribute-rgt-neg-in78.3%
associate-/r*92.4%
distribute-neg-frac292.4%
Simplified92.4%
Taylor expanded in t1 around 0 84.7%
Taylor expanded in t1 around 0 83.7%
clear-num85.0%
un-div-inv85.0%
div-inv85.0%
clear-num85.0%
add-sqr-sqrt85.0%
sqrt-unprod76.6%
sqr-neg76.6%
sqrt-unprod0.0%
add-sqr-sqrt67.4%
Applied egg-rr67.4%
if -6.80000000000000002e56 < u < 9.39999999999999944e58Initial program 66.2%
times-frac98.0%
distribute-frac-neg98.0%
distribute-neg-frac298.0%
+-commutative98.0%
distribute-neg-in98.0%
unsub-neg98.0%
Simplified98.0%
Taylor expanded in t1 around inf 75.3%
associate-*r/75.3%
neg-mul-175.3%
Simplified75.3%
if 9.39999999999999944e58 < u Initial program 72.8%
associate-/l*73.3%
distribute-lft-neg-out73.3%
distribute-rgt-neg-in73.3%
associate-/r*90.2%
distribute-neg-frac290.2%
Simplified90.2%
Taylor expanded in t1 around 0 82.4%
Taylor expanded in t1 around 0 82.4%
associate-*r/84.8%
add-sqr-sqrt0.0%
sqrt-unprod61.8%
sqr-neg61.8%
sqrt-unprod58.9%
add-sqr-sqrt58.9%
Applied egg-rr58.9%
associate-/l*61.8%
Simplified61.8%
Final simplification70.9%
(FPCore (u v t1) :precision binary64 (if (<= u -1.22e+91) (/ v u) (if (<= u 9.5e+160) (/ v (- t1)) (/ v (+ u t1)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.22e+91) {
tmp = v / u;
} else if (u <= 9.5e+160) {
tmp = v / -t1;
} else {
tmp = v / (u + 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.22d+91)) then
tmp = v / u
else if (u <= 9.5d+160) then
tmp = v / -t1
else
tmp = v / (u + t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -1.22e+91) {
tmp = v / u;
} else if (u <= 9.5e+160) {
tmp = v / -t1;
} else {
tmp = v / (u + t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.22e+91: tmp = v / u elif u <= 9.5e+160: tmp = v / -t1 else: tmp = v / (u + t1) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.22e+91) tmp = Float64(v / u); elseif (u <= 9.5e+160) tmp = Float64(v / Float64(-t1)); else tmp = Float64(v / Float64(u + t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -1.22e+91) tmp = v / u; elseif (u <= 9.5e+160) tmp = v / -t1; else tmp = v / (u + t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.22e+91], N[(v / u), $MachinePrecision], If[LessEqual[u, 9.5e+160], N[(v / (-t1)), $MachinePrecision], N[(v / N[(u + t1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.22 \cdot 10^{+91}:\\
\;\;\;\;\frac{v}{u}\\
\mathbf{elif}\;u \leq 9.5 \cdot 10^{+160}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u + t1}\\
\end{array}
\end{array}
if u < -1.2199999999999999e91Initial program 78.3%
associate-/l*77.1%
Simplified77.1%
Taylor expanded in t1 around inf 33.6%
associate-*r/32.9%
*-commutative32.9%
times-frac38.7%
add-sqr-sqrt16.6%
sqrt-unprod44.6%
sqr-neg44.6%
sqrt-unprod15.9%
add-sqr-sqrt32.1%
*-inverses32.1%
*-un-lft-identity32.1%
clear-num32.1%
Applied egg-rr32.1%
associate-/r/32.1%
Simplified32.1%
Taylor expanded in t1 around 0 32.7%
if -1.2199999999999999e91 < u < 9.5000000000000006e160Initial program 68.0%
times-frac98.3%
distribute-frac-neg98.3%
distribute-neg-frac298.3%
+-commutative98.3%
distribute-neg-in98.3%
unsub-neg98.3%
Simplified98.3%
Taylor expanded in t1 around inf 68.2%
associate-*r/68.2%
neg-mul-168.2%
Simplified68.2%
if 9.5000000000000006e160 < u Initial program 71.8%
associate-/l*72.4%
Simplified72.4%
Taylor expanded in t1 around inf 45.4%
associate-*r/44.8%
*-commutative44.8%
times-frac46.7%
add-sqr-sqrt29.3%
sqrt-unprod49.2%
sqr-neg49.2%
sqrt-unprod14.6%
add-sqr-sqrt44.2%
*-inverses44.2%
*-un-lft-identity44.2%
Applied egg-rr44.2%
Final simplification58.9%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.2e+91) (not (<= u 7.2e+164))) (/ v u) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.2e+91) || !(u <= 7.2e+164)) {
tmp = v / u;
} else {
tmp = v / -t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-1.2d+91)) .or. (.not. (u <= 7.2d+164))) then
tmp = v / u
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.2e+91) || !(u <= 7.2e+164)) {
tmp = v / u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.2e+91) or not (u <= 7.2e+164): tmp = v / u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.2e+91) || !(u <= 7.2e+164)) tmp = Float64(v / u); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -1.2e+91) || ~((u <= 7.2e+164))) tmp = v / u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.2e+91], N[Not[LessEqual[u, 7.2e+164]], $MachinePrecision]], N[(v / u), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.2 \cdot 10^{+91} \lor \neg \left(u \leq 7.2 \cdot 10^{+164}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -1.19999999999999991e91 or 7.19999999999999981e164 < u Initial program 76.1%
associate-/l*75.5%
Simplified75.5%
Taylor expanded in t1 around inf 37.6%
associate-*r/36.9%
*-commutative36.9%
times-frac41.3%
add-sqr-sqrt20.8%
sqrt-unprod46.1%
sqr-neg46.1%
sqrt-unprod15.5%
add-sqr-sqrt36.1%
*-inverses36.1%
*-un-lft-identity36.1%
clear-num36.1%
Applied egg-rr36.1%
associate-/r/36.1%
Simplified36.1%
Taylor expanded in t1 around 0 34.8%
if -1.19999999999999991e91 < u < 7.19999999999999981e164Initial program 68.0%
times-frac98.3%
distribute-frac-neg98.3%
distribute-neg-frac298.3%
+-commutative98.3%
distribute-neg-in98.3%
unsub-neg98.3%
Simplified98.3%
Taylor expanded in t1 around inf 68.2%
associate-*r/68.2%
neg-mul-168.2%
Simplified68.2%
Final simplification58.4%
(FPCore (u v t1) :precision binary64 (if (<= u -1.22e+91) (/ v u) (if (<= u 9.2e+149) (/ v (- t1)) (/ v (- u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.22e+91) {
tmp = v / u;
} else if (u <= 9.2e+149) {
tmp = v / -t1;
} else {
tmp = v / -u;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-1.22d+91)) then
tmp = v / u
else if (u <= 9.2d+149) then
tmp = v / -t1
else
tmp = v / -u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -1.22e+91) {
tmp = v / u;
} else if (u <= 9.2e+149) {
tmp = v / -t1;
} else {
tmp = v / -u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.22e+91: tmp = v / u elif u <= 9.2e+149: tmp = v / -t1 else: tmp = v / -u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.22e+91) tmp = Float64(v / u); elseif (u <= 9.2e+149) tmp = Float64(v / Float64(-t1)); else tmp = Float64(v / Float64(-u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -1.22e+91) tmp = v / u; elseif (u <= 9.2e+149) tmp = v / -t1; else tmp = v / -u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.22e+91], N[(v / u), $MachinePrecision], If[LessEqual[u, 9.2e+149], N[(v / (-t1)), $MachinePrecision], N[(v / (-u)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.22 \cdot 10^{+91}:\\
\;\;\;\;\frac{v}{u}\\
\mathbf{elif}\;u \leq 9.2 \cdot 10^{+149}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-u}\\
\end{array}
\end{array}
if u < -1.2199999999999999e91Initial program 78.3%
associate-/l*77.1%
Simplified77.1%
Taylor expanded in t1 around inf 33.6%
associate-*r/32.9%
*-commutative32.9%
times-frac38.7%
add-sqr-sqrt16.6%
sqrt-unprod44.6%
sqr-neg44.6%
sqrt-unprod15.9%
add-sqr-sqrt32.1%
*-inverses32.1%
*-un-lft-identity32.1%
clear-num32.1%
Applied egg-rr32.1%
associate-/r/32.1%
Simplified32.1%
Taylor expanded in t1 around 0 32.7%
if -1.2199999999999999e91 < u < 9.1999999999999993e149Initial program 68.4%
times-frac98.3%
distribute-frac-neg98.3%
distribute-neg-frac298.3%
+-commutative98.3%
distribute-neg-in98.3%
unsub-neg98.3%
Simplified98.3%
Taylor expanded in t1 around inf 69.6%
associate-*r/69.6%
neg-mul-169.6%
Simplified69.6%
if 9.1999999999999993e149 < u Initial program 68.9%
associate-/l*69.6%
distribute-lft-neg-out69.6%
distribute-rgt-neg-in69.6%
associate-/r*89.2%
distribute-neg-frac289.2%
Simplified89.2%
Taylor expanded in t1 around 0 85.6%
Taylor expanded in t1 around inf 34.9%
associate-*r/34.9%
mul-1-neg34.9%
Simplified34.9%
Final simplification58.4%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1.9e+130) (not (<= t1 2.5e+50))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.9e+130) || !(t1 <= 2.5e+50)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-1.9d+130)) .or. (.not. (t1 <= 2.5d+50))) then
tmp = v / t1
else
tmp = v / u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.9e+130) || !(t1 <= 2.5e+50)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.9e+130) or not (t1 <= 2.5e+50): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.9e+130) || !(t1 <= 2.5e+50)) tmp = Float64(v / t1); else tmp = Float64(v / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -1.9e+130) || ~((t1 <= 2.5e+50))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.9e+130], N[Not[LessEqual[t1, 2.5e+50]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.9 \cdot 10^{+130} \lor \neg \left(t1 \leq 2.5 \cdot 10^{+50}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -1.9000000000000001e130 or 2.5e50 < t1 Initial program 47.6%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in t1 around inf 84.2%
associate-*r/84.2%
neg-mul-184.2%
Simplified84.2%
add-sqr-sqrt39.4%
sqrt-unprod50.5%
sqr-neg50.5%
sqrt-unprod16.4%
add-sqr-sqrt33.6%
div-inv33.6%
Applied egg-rr33.6%
associate-*r/33.6%
*-rgt-identity33.6%
Simplified33.6%
if -1.9000000000000001e130 < t1 < 2.5e50Initial program 82.6%
associate-/l*84.5%
Simplified84.5%
Taylor expanded in t1 around inf 42.0%
associate-*r/44.9%
*-commutative44.9%
times-frac47.3%
add-sqr-sqrt23.3%
sqrt-unprod42.7%
sqr-neg42.7%
sqrt-unprod7.2%
add-sqr-sqrt15.3%
*-inverses15.3%
*-un-lft-identity15.3%
clear-num15.3%
Applied egg-rr15.3%
associate-/r/15.3%
Simplified15.3%
Taylor expanded in t1 around 0 17.9%
Final simplification23.4%
(FPCore (u v t1) :precision binary64 (/ (* v (/ (- t1) (+ u t1))) (+ u t1)))
double code(double u, double v, double t1) {
return (v * (-t1 / (u + t1))) / (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 + t1))) / (u + t1)
end function
public static double code(double u, double v, double t1) {
return (v * (-t1 / (u + t1))) / (u + t1);
}
def code(u, v, t1): return (v * (-t1 / (u + t1))) / (u + t1)
function code(u, v, t1) return Float64(Float64(v * Float64(Float64(-t1) / Float64(u + t1))) / Float64(u + t1)) end
function tmp = code(u, v, t1) tmp = (v * (-t1 / (u + t1))) / (u + t1); end
code[u_, v_, t1_] := N[(N[(v * N[((-t1) / N[(u + t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(u + t1), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{v \cdot \frac{-t1}{u + t1}}{u + t1}
\end{array}
Initial program 70.4%
times-frac98.7%
distribute-frac-neg98.7%
distribute-neg-frac298.7%
+-commutative98.7%
distribute-neg-in98.7%
unsub-neg98.7%
Simplified98.7%
frac-2neg98.7%
frac-2neg98.7%
frac-times70.4%
sub-neg70.4%
distribute-neg-in70.4%
+-commutative70.4%
remove-double-neg70.4%
frac-times98.7%
associate-*r/99.0%
add-sqr-sqrt48.2%
sqrt-unprod42.8%
sqr-neg42.8%
sqrt-unprod17.0%
add-sqr-sqrt37.2%
add-sqr-sqrt19.4%
sqrt-unprod58.4%
Applied egg-rr99.0%
Final simplification99.0%
(FPCore (u v t1) :precision binary64 (* (/ t1 (+ u t1)) (/ v (- (- u) t1))))
double code(double u, double v, double t1) {
return (t1 / (u + t1)) * (v / (-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 = (t1 / (u + t1)) * (v / (-u - t1))
end function
public static double code(double u, double v, double t1) {
return (t1 / (u + t1)) * (v / (-u - t1));
}
def code(u, v, t1): return (t1 / (u + t1)) * (v / (-u - t1))
function code(u, v, t1) return Float64(Float64(t1 / Float64(u + t1)) * Float64(v / Float64(Float64(-u) - t1))) end
function tmp = code(u, v, t1) tmp = (t1 / (u + t1)) * (v / (-u - t1)); end
code[u_, v_, t1_] := N[(N[(t1 / N[(u + t1), $MachinePrecision]), $MachinePrecision] * N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{t1}{u + t1} \cdot \frac{v}{\left(-u\right) - t1}
\end{array}
Initial program 70.4%
times-frac98.7%
distribute-frac-neg98.7%
distribute-neg-frac298.7%
+-commutative98.7%
distribute-neg-in98.7%
unsub-neg98.7%
Simplified98.7%
Final simplification98.7%
(FPCore (u v t1) :precision binary64 (/ v (- (- u) t1)))
double code(double u, double v, double t1) {
return v / (-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 / (-u - t1)
end function
public static double code(double u, double v, double t1) {
return v / (-u - t1);
}
def code(u, v, t1): return v / (-u - t1)
function code(u, v, t1) return Float64(v / Float64(Float64(-u) - t1)) end
function tmp = code(u, v, t1) tmp = v / (-u - t1); end
code[u_, v_, t1_] := N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{\left(-u\right) - t1}
\end{array}
Initial program 70.4%
times-frac98.7%
distribute-frac-neg98.7%
distribute-neg-frac298.7%
+-commutative98.7%
distribute-neg-in98.7%
unsub-neg98.7%
Simplified98.7%
frac-2neg98.7%
frac-2neg98.7%
frac-times70.4%
sub-neg70.4%
distribute-neg-in70.4%
+-commutative70.4%
remove-double-neg70.4%
frac-times98.7%
associate-*r/99.0%
add-sqr-sqrt48.2%
sqrt-unprod42.8%
sqr-neg42.8%
sqrt-unprod17.0%
add-sqr-sqrt37.2%
add-sqr-sqrt19.4%
sqrt-unprod58.4%
Applied egg-rr99.0%
Taylor expanded in t1 around inf 60.3%
mul-1-neg60.3%
Simplified60.3%
Final simplification60.3%
(FPCore (u v t1) :precision binary64 (/ v t1))
double code(double u, double v, double t1) {
return v / t1;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = v / t1
end function
public static double code(double u, double v, double t1) {
return v / t1;
}
def code(u, v, t1): return v / t1
function code(u, v, t1) return Float64(v / t1) end
function tmp = code(u, v, t1) tmp = v / t1; end
code[u_, v_, t1_] := N[(v / t1), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{t1}
\end{array}
Initial program 70.4%
times-frac98.7%
distribute-frac-neg98.7%
distribute-neg-frac298.7%
+-commutative98.7%
distribute-neg-in98.7%
unsub-neg98.7%
Simplified98.7%
Taylor expanded in t1 around inf 52.7%
associate-*r/52.7%
neg-mul-152.7%
Simplified52.7%
add-sqr-sqrt22.9%
sqrt-unprod34.5%
sqr-neg34.5%
sqrt-unprod6.8%
add-sqr-sqrt13.4%
div-inv13.4%
Applied egg-rr13.4%
associate-*r/13.4%
*-rgt-identity13.4%
Simplified13.4%
herbie shell --seed 2024145
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))