
(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 18 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)) (/ t1 (+ t1 u)))))
double code(double u, double v, double t1) {
return -((v / (t1 + u)) * (t1 / (t1 + u)));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = -((v / (t1 + u)) * (t1 / (t1 + u)))
end function
public static double code(double u, double v, double t1) {
return -((v / (t1 + u)) * (t1 / (t1 + u)));
}
def code(u, v, t1): return -((v / (t1 + u)) * (t1 / (t1 + u)))
function code(u, v, t1) return Float64(-Float64(Float64(v / Float64(t1 + u)) * Float64(t1 / Float64(t1 + u)))) end
function tmp = code(u, v, t1) tmp = -((v / (t1 + u)) * (t1 / (t1 + u))); end
code[u_, v_, t1_] := (-N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision])
\begin{array}{l}
\\
-\frac{v}{t1 + u} \cdot \frac{t1}{t1 + u}
\end{array}
Initial program 73.1%
times-frac98.0%
distribute-frac-neg98.0%
distribute-neg-frac298.0%
+-commutative98.0%
distribute-neg-in98.0%
unsub-neg98.0%
Simplified98.0%
Final simplification98.0%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -9.2e+73) (not (<= t1 7.5e+117))) (/ v (- (* u (- 2.0)) t1)) (* t1 (/ (/ v (+ t1 u)) (- (- u) t1)))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -9.2e+73) || !(t1 <= 7.5e+117)) {
tmp = v / ((u * -2.0) - t1);
} else {
tmp = t1 * ((v / (t1 + u)) / (-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 ((t1 <= (-9.2d+73)) .or. (.not. (t1 <= 7.5d+117))) then
tmp = v / ((u * -2.0d0) - t1)
else
tmp = t1 * ((v / (t1 + u)) / (-u - t1))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -9.2e+73) || !(t1 <= 7.5e+117)) {
tmp = v / ((u * -2.0) - t1);
} else {
tmp = t1 * ((v / (t1 + u)) / (-u - t1));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -9.2e+73) or not (t1 <= 7.5e+117): tmp = v / ((u * -2.0) - t1) else: tmp = t1 * ((v / (t1 + u)) / (-u - t1)) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -9.2e+73) || !(t1 <= 7.5e+117)) tmp = Float64(v / Float64(Float64(u * Float64(-2.0)) - t1)); else tmp = Float64(t1 * Float64(Float64(v / Float64(t1 + u)) / Float64(Float64(-u) - t1))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -9.2e+73) || ~((t1 <= 7.5e+117))) tmp = v / ((u * -2.0) - t1); else tmp = t1 * ((v / (t1 + u)) / (-u - t1)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -9.2e+73], N[Not[LessEqual[t1, 7.5e+117]], $MachinePrecision]], N[(v / N[(N[(u * (-2.0)), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision], N[(t1 * N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -9.2 \cdot 10^{+73} \lor \neg \left(t1 \leq 7.5 \cdot 10^{+117}\right):\\
\;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{t1 + u}}{\left(-u\right) - t1}\\
\end{array}
\end{array}
if t1 < -9.199999999999999e73 or 7.5e117 < t1 Initial program 46.7%
associate-*l/52.5%
*-commutative52.5%
Simplified52.5%
associate-*r/46.7%
times-frac99.9%
*-commutative99.9%
frac-2neg99.9%
remove-double-neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
clear-num99.9%
frac-2neg99.9%
frac-times97.5%
*-un-lft-identity97.5%
+-commutative97.5%
distribute-neg-in97.5%
sub-neg97.5%
sub-neg97.5%
+-commutative97.5%
add-sqr-sqrt52.5%
sqrt-unprod44.0%
sqr-neg44.0%
sqrt-unprod17.5%
add-sqr-sqrt6.8%
sqrt-unprod16.6%
sqr-neg16.6%
Applied egg-rr97.5%
Taylor expanded in u around 0 89.2%
*-commutative89.2%
Simplified89.2%
if -9.199999999999999e73 < t1 < 7.5e117Initial program 84.7%
associate-/l*87.5%
Simplified87.5%
associate-/r*93.5%
div-inv93.3%
Applied egg-rr93.3%
associate-*r/93.5%
*-rgt-identity93.5%
Simplified93.5%
Final simplification92.2%
(FPCore (u v t1)
:precision binary64
(if (<= t1 -2.2e+158)
(/ v (- t1))
(if (<= t1 4.1e+153)
(* v (/ t1 (* (- (- u) t1) (+ t1 u))))
(* (/ v (+ t1 u)) (+ (/ u t1) -1.0)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -2.2e+158) {
tmp = v / -t1;
} else if (t1 <= 4.1e+153) {
tmp = v * (t1 / ((-u - t1) * (t1 + u)));
} else {
tmp = (v / (t1 + u)) * ((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) :: tmp
if (t1 <= (-2.2d+158)) then
tmp = v / -t1
else if (t1 <= 4.1d+153) then
tmp = v * (t1 / ((-u - t1) * (t1 + u)))
else
tmp = (v / (t1 + u)) * ((u / t1) + (-1.0d0))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -2.2e+158) {
tmp = v / -t1;
} else if (t1 <= 4.1e+153) {
tmp = v * (t1 / ((-u - t1) * (t1 + u)));
} else {
tmp = (v / (t1 + u)) * ((u / t1) + -1.0);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -2.2e+158: tmp = v / -t1 elif t1 <= 4.1e+153: tmp = v * (t1 / ((-u - t1) * (t1 + u))) else: tmp = (v / (t1 + u)) * ((u / t1) + -1.0) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -2.2e+158) tmp = Float64(v / Float64(-t1)); elseif (t1 <= 4.1e+153) tmp = Float64(v * Float64(t1 / Float64(Float64(Float64(-u) - t1) * Float64(t1 + u)))); else tmp = Float64(Float64(v / Float64(t1 + u)) * Float64(Float64(u / t1) + -1.0)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -2.2e+158) tmp = v / -t1; elseif (t1 <= 4.1e+153) tmp = v * (t1 / ((-u - t1) * (t1 + u))); else tmp = (v / (t1 + u)) * ((u / t1) + -1.0); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -2.2e+158], N[(v / (-t1)), $MachinePrecision], If[LessEqual[t1, 4.1e+153], N[(v * N[(t1 / N[(N[((-u) - t1), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(N[(u / t1), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2.2 \cdot 10^{+158}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{elif}\;t1 \leq 4.1 \cdot 10^{+153}:\\
\;\;\;\;v \cdot \frac{t1}{\left(\left(-u\right) - t1\right) \cdot \left(t1 + u\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{t1 + u} \cdot \left(\frac{u}{t1} + -1\right)\\
\end{array}
\end{array}
if t1 < -2.2000000000000001e158Initial program 23.5%
associate-*l/24.9%
*-commutative24.9%
Simplified24.9%
Taylor expanded in t1 around inf 84.1%
associate-*r/84.1%
neg-mul-184.1%
Simplified84.1%
if -2.2000000000000001e158 < t1 < 4.10000000000000017e153Initial program 84.9%
associate-*l/88.7%
*-commutative88.7%
Simplified88.7%
if 4.10000000000000017e153 < t1 Initial program 39.2%
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 96.3%
Final simplification89.0%
(FPCore (u v t1)
:precision binary64
(if (<= t1 -2.7e-129)
(/ (* v (/ t1 (- u t1))) t1)
(if (<= t1 1.35e-85)
(* t1 (/ (/ v (- u)) (+ t1 u)))
(/ v (- (* u (- 2.0)) t1)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -2.7e-129) {
tmp = (v * (t1 / (u - t1))) / t1;
} else if (t1 <= 1.35e-85) {
tmp = t1 * ((v / -u) / (t1 + u));
} else {
tmp = v / ((u * -2.0) - t1);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (t1 <= (-2.7d-129)) then
tmp = (v * (t1 / (u - t1))) / t1
else if (t1 <= 1.35d-85) then
tmp = t1 * ((v / -u) / (t1 + u))
else
tmp = v / ((u * -2.0d0) - t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -2.7e-129) {
tmp = (v * (t1 / (u - t1))) / t1;
} else if (t1 <= 1.35e-85) {
tmp = t1 * ((v / -u) / (t1 + u));
} else {
tmp = v / ((u * -2.0) - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -2.7e-129: tmp = (v * (t1 / (u - t1))) / t1 elif t1 <= 1.35e-85: tmp = t1 * ((v / -u) / (t1 + u)) else: tmp = v / ((u * -2.0) - t1) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -2.7e-129) tmp = Float64(Float64(v * Float64(t1 / Float64(u - t1))) / t1); elseif (t1 <= 1.35e-85) tmp = Float64(t1 * Float64(Float64(v / Float64(-u)) / Float64(t1 + u))); else tmp = Float64(v / Float64(Float64(u * Float64(-2.0)) - t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -2.7e-129) tmp = (v * (t1 / (u - t1))) / t1; elseif (t1 <= 1.35e-85) tmp = t1 * ((v / -u) / (t1 + u)); else tmp = v / ((u * -2.0) - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -2.7e-129], N[(N[(v * N[(t1 / N[(u - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t1), $MachinePrecision], If[LessEqual[t1, 1.35e-85], N[(t1 * N[(N[(v / (-u)), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / N[(N[(u * (-2.0)), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2.7 \cdot 10^{-129}:\\
\;\;\;\;\frac{v \cdot \frac{t1}{u - t1}}{t1}\\
\mathbf{elif}\;t1 \leq 1.35 \cdot 10^{-85}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{-u}}{t1 + u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\
\end{array}
\end{array}
if t1 < -2.69999999999999999e-129Initial program 70.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 77.3%
associate-*r/78.6%
Applied egg-rr78.3%
if -2.69999999999999999e-129 < t1 < 1.3500000000000001e-85Initial program 76.4%
associate-/l*81.0%
Simplified81.0%
associate-/r*89.9%
div-inv89.8%
Applied egg-rr89.8%
associate-*r/89.9%
*-rgt-identity89.9%
Simplified89.9%
Taylor expanded in t1 around 0 84.9%
if 1.3500000000000001e-85 < t1 Initial program 72.4%
associate-*l/77.4%
*-commutative77.4%
Simplified77.4%
associate-*r/72.4%
times-frac99.9%
*-commutative99.9%
frac-2neg99.9%
remove-double-neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
clear-num100.0%
frac-2neg100.0%
frac-times96.4%
*-un-lft-identity96.4%
+-commutative96.4%
distribute-neg-in96.4%
sub-neg96.4%
sub-neg96.4%
+-commutative96.4%
add-sqr-sqrt0.0%
sqrt-unprod31.9%
sqr-neg31.9%
sqrt-unprod32.5%
add-sqr-sqrt13.1%
sqrt-unprod26.9%
sqr-neg26.9%
Applied egg-rr96.4%
Taylor expanded in u around 0 83.4%
*-commutative83.4%
Simplified83.4%
Final simplification82.1%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -4e-42) (not (<= t1 1.1e-87))) (/ v (- (* u (- 2.0)) t1)) (/ (* t1 (/ v (- u))) u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -4e-42) || !(t1 <= 1.1e-87)) {
tmp = v / ((u * -2.0) - 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 ((t1 <= (-4d-42)) .or. (.not. (t1 <= 1.1d-87))) then
tmp = v / ((u * -2.0d0) - 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 ((t1 <= -4e-42) || !(t1 <= 1.1e-87)) {
tmp = v / ((u * -2.0) - t1);
} else {
tmp = (t1 * (v / -u)) / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -4e-42) or not (t1 <= 1.1e-87): tmp = v / ((u * -2.0) - t1) else: tmp = (t1 * (v / -u)) / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -4e-42) || !(t1 <= 1.1e-87)) tmp = Float64(v / Float64(Float64(u * Float64(-2.0)) - t1)); else tmp = Float64(Float64(t1 * Float64(v / Float64(-u))) / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -4e-42) || ~((t1 <= 1.1e-87))) tmp = v / ((u * -2.0) - t1); else tmp = (t1 * (v / -u)) / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -4e-42], N[Not[LessEqual[t1, 1.1e-87]], $MachinePrecision]], N[(v / N[(N[(u * (-2.0)), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision], N[(N[(t1 * N[(v / (-u)), $MachinePrecision]), $MachinePrecision] / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -4 \cdot 10^{-42} \lor \neg \left(t1 \leq 1.1 \cdot 10^{-87}\right):\\
\;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{-u}}{u}\\
\end{array}
\end{array}
if t1 < -4.00000000000000015e-42 or 1.09999999999999994e-87 < t1 Initial program 67.9%
associate-*l/72.8%
*-commutative72.8%
Simplified72.8%
associate-*r/67.9%
times-frac99.9%
*-commutative99.9%
frac-2neg99.9%
remove-double-neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
clear-num99.9%
frac-2neg99.9%
frac-times96.7%
*-un-lft-identity96.7%
+-commutative96.7%
distribute-neg-in96.7%
sub-neg96.7%
sub-neg96.7%
+-commutative96.7%
add-sqr-sqrt43.8%
sqrt-unprod48.0%
sqr-neg48.0%
sqrt-unprod17.8%
add-sqr-sqrt7.1%
sqrt-unprod14.7%
sqr-neg14.7%
Applied egg-rr96.7%
Taylor expanded in u around 0 82.6%
*-commutative82.6%
Simplified82.6%
if -4.00000000000000015e-42 < t1 < 1.09999999999999994e-87Initial program 80.3%
associate-*l/82.2%
*-commutative82.2%
Simplified82.2%
associate-*r/80.3%
*-commutative80.3%
times-frac95.5%
frac-2neg95.5%
+-commutative95.5%
distribute-neg-in95.5%
sub-neg95.5%
associate-*r/93.9%
add-sqr-sqrt48.1%
sqrt-unprod56.7%
sqr-neg56.7%
sqrt-unprod19.5%
add-sqr-sqrt40.5%
sub-neg40.5%
+-commutative40.5%
add-sqr-sqrt21.0%
sqrt-unprod43.2%
sqr-neg43.2%
sqrt-unprod24.8%
add-sqr-sqrt14.1%
sqrt-unprod36.4%
sqr-neg36.4%
Applied egg-rr93.9%
Taylor expanded in t1 around 0 73.6%
mul-1-neg73.6%
associate-/l*77.2%
distribute-rgt-neg-in77.2%
distribute-neg-frac277.2%
Simplified77.2%
Taylor expanded in t1 around 0 79.3%
Final simplification81.2%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1.16e-122) (not (<= t1 1.35e-85))) (/ v (- (* u (- 2.0)) t1)) (/ v (* u (/ (- u) t1)))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.16e-122) || !(t1 <= 1.35e-85)) {
tmp = v / ((u * -2.0) - t1);
} else {
tmp = v / (u * (-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 ((t1 <= (-1.16d-122)) .or. (.not. (t1 <= 1.35d-85))) then
tmp = v / ((u * -2.0d0) - t1)
else
tmp = v / (u * (-u / t1))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.16e-122) || !(t1 <= 1.35e-85)) {
tmp = v / ((u * -2.0) - t1);
} else {
tmp = v / (u * (-u / t1));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.16e-122) or not (t1 <= 1.35e-85): tmp = v / ((u * -2.0) - t1) else: tmp = v / (u * (-u / t1)) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.16e-122) || !(t1 <= 1.35e-85)) tmp = Float64(v / Float64(Float64(u * Float64(-2.0)) - t1)); else tmp = Float64(v / Float64(u * Float64(Float64(-u) / t1))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -1.16e-122) || ~((t1 <= 1.35e-85))) tmp = v / ((u * -2.0) - t1); else tmp = v / (u * (-u / t1)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.16e-122], N[Not[LessEqual[t1, 1.35e-85]], $MachinePrecision]], N[(v / N[(N[(u * (-2.0)), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision], N[(v / N[(u * N[((-u) / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.16 \cdot 10^{-122} \lor \neg \left(t1 \leq 1.35 \cdot 10^{-85}\right):\\
\;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u \cdot \frac{-u}{t1}}\\
\end{array}
\end{array}
if t1 < -1.16000000000000001e-122 or 1.3500000000000001e-85 < t1 Initial program 71.3%
associate-*l/75.6%
*-commutative75.6%
Simplified75.6%
associate-*r/71.3%
times-frac99.9%
*-commutative99.9%
frac-2neg99.9%
remove-double-neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
clear-num99.9%
frac-2neg99.9%
frac-times96.6%
*-un-lft-identity96.6%
+-commutative96.6%
distribute-neg-in96.6%
sub-neg96.6%
sub-neg96.6%
+-commutative96.6%
add-sqr-sqrt50.2%
sqrt-unprod53.9%
sqr-neg53.9%
sqrt-unprod15.6%
add-sqr-sqrt6.3%
sqrt-unprod12.9%
sqr-neg12.9%
Applied egg-rr96.6%
Taylor expanded in u around 0 79.8%
*-commutative79.8%
Simplified79.8%
if -1.16000000000000001e-122 < t1 < 1.3500000000000001e-85Initial program 76.7%
associate-*l/79.1%
*-commutative79.1%
Simplified79.1%
associate-*r/76.7%
times-frac94.4%
*-commutative94.4%
frac-2neg94.4%
remove-double-neg94.4%
+-commutative94.4%
distribute-neg-in94.4%
sub-neg94.4%
clear-num94.3%
frac-2neg94.3%
frac-times92.2%
*-un-lft-identity92.2%
+-commutative92.2%
distribute-neg-in92.2%
sub-neg92.2%
sub-neg92.2%
+-commutative92.2%
add-sqr-sqrt35.7%
sqrt-unprod82.0%
sqr-neg82.0%
sqrt-unprod48.4%
add-sqr-sqrt25.2%
sqrt-unprod33.3%
sqr-neg33.3%
Applied egg-rr92.2%
Taylor expanded in t1 around 0 80.9%
Taylor expanded in t1 around 0 82.3%
Final simplification80.6%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1.16e-122) (not (<= t1 4.6e-86))) (/ v (- (- u) t1)) (/ v (* u (/ (- u) t1)))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.16e-122) || !(t1 <= 4.6e-86)) {
tmp = v / (-u - t1);
} else {
tmp = v / (u * (-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 ((t1 <= (-1.16d-122)) .or. (.not. (t1 <= 4.6d-86))) then
tmp = v / (-u - t1)
else
tmp = v / (u * (-u / t1))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.16e-122) || !(t1 <= 4.6e-86)) {
tmp = v / (-u - t1);
} else {
tmp = v / (u * (-u / t1));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.16e-122) or not (t1 <= 4.6e-86): tmp = v / (-u - t1) else: tmp = v / (u * (-u / t1)) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.16e-122) || !(t1 <= 4.6e-86)) tmp = Float64(v / Float64(Float64(-u) - t1)); else tmp = Float64(v / Float64(u * Float64(Float64(-u) / t1))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -1.16e-122) || ~((t1 <= 4.6e-86))) tmp = v / (-u - t1); else tmp = v / (u * (-u / t1)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.16e-122], N[Not[LessEqual[t1, 4.6e-86]], $MachinePrecision]], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], N[(v / N[(u * N[((-u) / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.16 \cdot 10^{-122} \lor \neg \left(t1 \leq 4.6 \cdot 10^{-86}\right):\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u \cdot \frac{-u}{t1}}\\
\end{array}
\end{array}
if t1 < -1.16000000000000001e-122 or 4.59999999999999992e-86 < t1 Initial program 71.3%
associate-*l/75.6%
*-commutative75.6%
Simplified75.6%
associate-*r/71.3%
*-commutative71.3%
times-frac99.9%
frac-2neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*r/99.9%
add-sqr-sqrt51.7%
sqrt-unprod40.3%
sqr-neg40.3%
sqrt-unprod11.7%
add-sqr-sqrt27.5%
sub-neg27.5%
+-commutative27.5%
add-sqr-sqrt15.9%
sqrt-unprod49.6%
sqr-neg49.6%
sqrt-unprod41.5%
add-sqr-sqrt21.1%
sqrt-unprod43.8%
sqr-neg43.8%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 79.0%
mul-1-neg79.0%
Simplified79.0%
if -1.16000000000000001e-122 < t1 < 4.59999999999999992e-86Initial program 76.7%
associate-*l/79.1%
*-commutative79.1%
Simplified79.1%
associate-*r/76.7%
times-frac94.4%
*-commutative94.4%
frac-2neg94.4%
remove-double-neg94.4%
+-commutative94.4%
distribute-neg-in94.4%
sub-neg94.4%
clear-num94.3%
frac-2neg94.3%
frac-times92.2%
*-un-lft-identity92.2%
+-commutative92.2%
distribute-neg-in92.2%
sub-neg92.2%
sub-neg92.2%
+-commutative92.2%
add-sqr-sqrt35.7%
sqrt-unprod82.0%
sqr-neg82.0%
sqrt-unprod48.4%
add-sqr-sqrt25.2%
sqrt-unprod33.3%
sqr-neg33.3%
Applied egg-rr92.2%
Taylor expanded in t1 around 0 80.9%
Taylor expanded in t1 around 0 82.3%
Final simplification80.1%
(FPCore (u v t1) :precision binary64 (if (<= t1 -1.12e-122) (/ (* v (/ t1 (- u t1))) t1) (if (<= t1 1.05e-86) (/ (* t1 (/ v (- u))) u) (/ v (- (* u (- 2.0)) t1)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1.12e-122) {
tmp = (v * (t1 / (u - t1))) / t1;
} else if (t1 <= 1.05e-86) {
tmp = (t1 * (v / -u)) / u;
} else {
tmp = v / ((u * -2.0) - t1);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (t1 <= (-1.12d-122)) then
tmp = (v * (t1 / (u - t1))) / t1
else if (t1 <= 1.05d-86) then
tmp = (t1 * (v / -u)) / u
else
tmp = v / ((u * -2.0d0) - t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1.12e-122) {
tmp = (v * (t1 / (u - t1))) / t1;
} else if (t1 <= 1.05e-86) {
tmp = (t1 * (v / -u)) / u;
} else {
tmp = v / ((u * -2.0) - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -1.12e-122: tmp = (v * (t1 / (u - t1))) / t1 elif t1 <= 1.05e-86: tmp = (t1 * (v / -u)) / u else: tmp = v / ((u * -2.0) - t1) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -1.12e-122) tmp = Float64(Float64(v * Float64(t1 / Float64(u - t1))) / t1); elseif (t1 <= 1.05e-86) tmp = Float64(Float64(t1 * Float64(v / Float64(-u))) / u); else tmp = Float64(v / Float64(Float64(u * Float64(-2.0)) - t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -1.12e-122) tmp = (v * (t1 / (u - t1))) / t1; elseif (t1 <= 1.05e-86) tmp = (t1 * (v / -u)) / u; else tmp = v / ((u * -2.0) - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -1.12e-122], N[(N[(v * N[(t1 / N[(u - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t1), $MachinePrecision], If[LessEqual[t1, 1.05e-86], N[(N[(t1 * N[(v / (-u)), $MachinePrecision]), $MachinePrecision] / u), $MachinePrecision], N[(v / N[(N[(u * (-2.0)), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.12 \cdot 10^{-122}:\\
\;\;\;\;\frac{v \cdot \frac{t1}{u - t1}}{t1}\\
\mathbf{elif}\;t1 \leq 1.05 \cdot 10^{-86}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{-u}}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\
\end{array}
\end{array}
if t1 < -1.12e-122Initial program 70.3%
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 77.1%
associate-*r/78.4%
Applied egg-rr78.0%
if -1.12e-122 < t1 < 1.05e-86Initial program 76.7%
associate-*l/79.1%
*-commutative79.1%
Simplified79.1%
associate-*r/76.7%
*-commutative76.7%
times-frac94.4%
frac-2neg94.4%
+-commutative94.4%
distribute-neg-in94.4%
sub-neg94.4%
associate-*r/92.4%
add-sqr-sqrt35.7%
sqrt-unprod46.2%
sqr-neg46.2%
sqrt-unprod24.2%
add-sqr-sqrt40.8%
sub-neg40.8%
+-commutative40.8%
add-sqr-sqrt16.6%
sqrt-unprod44.2%
sqr-neg44.2%
sqrt-unprod30.8%
add-sqr-sqrt17.5%
sqrt-unprod45.2%
sqr-neg45.2%
Applied egg-rr92.4%
Taylor expanded in t1 around 0 78.1%
mul-1-neg78.1%
associate-/l*82.1%
distribute-rgt-neg-in82.1%
distribute-neg-frac282.1%
Simplified82.1%
Taylor expanded in t1 around 0 83.4%
if 1.05e-86 < t1 Initial program 72.4%
associate-*l/77.4%
*-commutative77.4%
Simplified77.4%
associate-*r/72.4%
times-frac99.9%
*-commutative99.9%
frac-2neg99.9%
remove-double-neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
clear-num100.0%
frac-2neg100.0%
frac-times96.4%
*-un-lft-identity96.4%
+-commutative96.4%
distribute-neg-in96.4%
sub-neg96.4%
sub-neg96.4%
+-commutative96.4%
add-sqr-sqrt0.0%
sqrt-unprod31.9%
sqr-neg31.9%
sqrt-unprod32.5%
add-sqr-sqrt13.1%
sqrt-unprod26.9%
sqr-neg26.9%
Applied egg-rr96.4%
Taylor expanded in u around 0 83.4%
*-commutative83.4%
Simplified83.4%
Final simplification81.6%
(FPCore (u v t1) :precision binary64 (if (<= t1 -2.85e-123) (/ v (* t1 (/ (- u t1) t1))) (if (<= t1 1.35e-85) (/ (* t1 (/ v (- u))) u) (/ v (- (* u (- 2.0)) t1)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -2.85e-123) {
tmp = v / (t1 * ((u - t1) / t1));
} else if (t1 <= 1.35e-85) {
tmp = (t1 * (v / -u)) / u;
} else {
tmp = v / ((u * -2.0) - t1);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (t1 <= (-2.85d-123)) then
tmp = v / (t1 * ((u - t1) / t1))
else if (t1 <= 1.35d-85) then
tmp = (t1 * (v / -u)) / u
else
tmp = v / ((u * -2.0d0) - t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -2.85e-123) {
tmp = v / (t1 * ((u - t1) / t1));
} else if (t1 <= 1.35e-85) {
tmp = (t1 * (v / -u)) / u;
} else {
tmp = v / ((u * -2.0) - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -2.85e-123: tmp = v / (t1 * ((u - t1) / t1)) elif t1 <= 1.35e-85: tmp = (t1 * (v / -u)) / u else: tmp = v / ((u * -2.0) - t1) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -2.85e-123) tmp = Float64(v / Float64(t1 * Float64(Float64(u - t1) / t1))); elseif (t1 <= 1.35e-85) tmp = Float64(Float64(t1 * Float64(v / Float64(-u))) / u); else tmp = Float64(v / Float64(Float64(u * Float64(-2.0)) - t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -2.85e-123) tmp = v / (t1 * ((u - t1) / t1)); elseif (t1 <= 1.35e-85) tmp = (t1 * (v / -u)) / u; else tmp = v / ((u * -2.0) - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -2.85e-123], N[(v / N[(t1 * N[(N[(u - t1), $MachinePrecision] / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 1.35e-85], N[(N[(t1 * N[(v / (-u)), $MachinePrecision]), $MachinePrecision] / u), $MachinePrecision], N[(v / N[(N[(u * (-2.0)), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2.85 \cdot 10^{-123}:\\
\;\;\;\;\frac{v}{t1 \cdot \frac{u - t1}{t1}}\\
\mathbf{elif}\;t1 \leq 1.35 \cdot 10^{-85}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{-u}}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\
\end{array}
\end{array}
if t1 < -2.85000000000000014e-123Initial program 70.3%
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 77.1%
clear-num77.1%
frac-times78.2%
*-un-lft-identity78.2%
add-sqr-sqrt41.0%
sqrt-unprod79.5%
sqr-neg79.5%
sqrt-unprod37.4%
add-sqr-sqrt77.8%
Applied egg-rr77.8%
if -2.85000000000000014e-123 < t1 < 1.3500000000000001e-85Initial program 76.7%
associate-*l/79.1%
*-commutative79.1%
Simplified79.1%
associate-*r/76.7%
*-commutative76.7%
times-frac94.4%
frac-2neg94.4%
+-commutative94.4%
distribute-neg-in94.4%
sub-neg94.4%
associate-*r/92.4%
add-sqr-sqrt35.7%
sqrt-unprod46.2%
sqr-neg46.2%
sqrt-unprod24.2%
add-sqr-sqrt40.8%
sub-neg40.8%
+-commutative40.8%
add-sqr-sqrt16.6%
sqrt-unprod44.2%
sqr-neg44.2%
sqrt-unprod30.8%
add-sqr-sqrt17.5%
sqrt-unprod45.2%
sqr-neg45.2%
Applied egg-rr92.4%
Taylor expanded in t1 around 0 78.1%
mul-1-neg78.1%
associate-/l*82.1%
distribute-rgt-neg-in82.1%
distribute-neg-frac282.1%
Simplified82.1%
Taylor expanded in t1 around 0 83.4%
if 1.3500000000000001e-85 < t1 Initial program 72.4%
associate-*l/77.4%
*-commutative77.4%
Simplified77.4%
associate-*r/72.4%
times-frac99.9%
*-commutative99.9%
frac-2neg99.9%
remove-double-neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
clear-num100.0%
frac-2neg100.0%
frac-times96.4%
*-un-lft-identity96.4%
+-commutative96.4%
distribute-neg-in96.4%
sub-neg96.4%
sub-neg96.4%
+-commutative96.4%
add-sqr-sqrt0.0%
sqrt-unprod31.9%
sqr-neg31.9%
sqrt-unprod32.5%
add-sqr-sqrt13.1%
sqrt-unprod26.9%
sqr-neg26.9%
Applied egg-rr96.4%
Taylor expanded in u around 0 83.4%
*-commutative83.4%
Simplified83.4%
Final simplification81.5%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.55e+147) (not (<= u 2.8e+123))) (/ (* v (/ t1 u)) u) (/ v (- u t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.55e+147) || !(u <= 2.8e+123)) {
tmp = (v * (t1 / u)) / u;
} 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.55d+147)) .or. (.not. (u <= 2.8d+123))) then
tmp = (v * (t1 / u)) / u
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.55e+147) || !(u <= 2.8e+123)) {
tmp = (v * (t1 / u)) / u;
} else {
tmp = v / (u - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.55e+147) or not (u <= 2.8e+123): tmp = (v * (t1 / u)) / u else: tmp = v / (u - t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.55e+147) || !(u <= 2.8e+123)) tmp = Float64(Float64(v * Float64(t1 / u)) / u); else tmp = Float64(v / Float64(u - t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -1.55e+147) || ~((u <= 2.8e+123))) tmp = (v * (t1 / u)) / u; else tmp = v / (u - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.55e+147], N[Not[LessEqual[u, 2.8e+123]], $MachinePrecision]], N[(N[(v * N[(t1 / u), $MachinePrecision]), $MachinePrecision] / u), $MachinePrecision], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.55 \cdot 10^{+147} \lor \neg \left(u \leq 2.8 \cdot 10^{+123}\right):\\
\;\;\;\;\frac{v \cdot \frac{t1}{u}}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u - t1}\\
\end{array}
\end{array}
if u < -1.55e147 or 2.80000000000000011e123 < u Initial program 80.2%
associate-*l/77.8%
*-commutative77.8%
Simplified77.8%
associate-*r/80.2%
*-commutative80.2%
times-frac97.2%
frac-2neg97.2%
+-commutative97.2%
distribute-neg-in97.2%
sub-neg97.2%
associate-*r/97.2%
add-sqr-sqrt50.0%
sqrt-unprod68.5%
sqr-neg68.5%
sqrt-unprod37.2%
add-sqr-sqrt73.3%
sub-neg73.3%
+-commutative73.3%
add-sqr-sqrt36.1%
sqrt-unprod73.5%
sqr-neg73.5%
sqrt-unprod38.2%
add-sqr-sqrt20.2%
sqrt-unprod40.2%
sqr-neg40.2%
Applied egg-rr97.2%
Taylor expanded in t1 around 0 87.2%
mul-1-neg87.2%
associate-/l*94.4%
distribute-rgt-neg-in94.4%
distribute-neg-frac294.4%
Simplified94.4%
Taylor expanded in t1 around 0 94.5%
clear-num94.4%
un-div-inv94.5%
add-sqr-sqrt51.2%
sqrt-unprod77.7%
sqr-neg77.7%
sqrt-unprod32.9%
add-sqr-sqrt73.2%
Applied egg-rr73.2%
associate-/r/72.0%
Simplified72.0%
if -1.55e147 < u < 2.80000000000000011e123Initial program 70.6%
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.0%
*-commutative69.0%
frac-times48.3%
add-sqr-sqrt25.1%
sqrt-unprod48.7%
sqr-neg48.7%
sqrt-unprod23.0%
add-sqr-sqrt48.6%
Applied egg-rr48.6%
Taylor expanded in v around 0 68.3%
Final simplification69.3%
(FPCore (u v t1) :precision binary64 (if (or (<= u -7.2e+188) (not (<= u 5.2e+118))) (/ 1.0 (/ u v)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -7.2e+188) || !(u <= 5.2e+118)) {
tmp = 1.0 / (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 <= (-7.2d+188)) .or. (.not. (u <= 5.2d+118))) then
tmp = 1.0d0 / (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 <= -7.2e+188) || !(u <= 5.2e+118)) {
tmp = 1.0 / (u / v);
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -7.2e+188) or not (u <= 5.2e+118): tmp = 1.0 / (u / v) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -7.2e+188) || !(u <= 5.2e+118)) tmp = Float64(1.0 / 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 <= -7.2e+188) || ~((u <= 5.2e+118))) tmp = 1.0 / (u / v); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -7.2e+188], N[Not[LessEqual[u, 5.2e+118]], $MachinePrecision]], N[(1.0 / N[(u / v), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -7.2 \cdot 10^{+188} \lor \neg \left(u \leq 5.2 \cdot 10^{+118}\right):\\
\;\;\;\;\frac{1}{\frac{u}{v}}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -7.20000000000000041e188 or 5.20000000000000032e118 < u Initial program 81.0%
times-frac96.9%
distribute-frac-neg96.9%
distribute-neg-frac296.9%
+-commutative96.9%
distribute-neg-in96.9%
unsub-neg96.9%
Simplified96.9%
Taylor expanded in t1 around inf 50.7%
*-commutative50.7%
frac-times54.9%
add-sqr-sqrt28.1%
sqrt-unprod77.8%
sqr-neg77.8%
sqrt-unprod26.7%
add-sqr-sqrt54.8%
Applied egg-rr54.8%
Taylor expanded in t1 around 0 44.0%
clear-num45.5%
inv-pow45.5%
Applied egg-rr45.5%
unpow-145.5%
Simplified45.5%
if -7.20000000000000041e188 < u < 5.20000000000000032e118Initial program 70.7%
associate-*l/75.8%
*-commutative75.8%
Simplified75.8%
Taylor expanded in t1 around inf 64.3%
associate-*r/64.3%
neg-mul-164.3%
Simplified64.3%
Final simplification59.9%
(FPCore (u v t1) :precision binary64 (if (or (<= u -3.7e+186) (not (<= u 1e+117))) (/ v u) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.7e+186) || !(u <= 1e+117)) {
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 <= (-3.7d+186)) .or. (.not. (u <= 1d+117))) 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 <= -3.7e+186) || !(u <= 1e+117)) {
tmp = v / u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -3.7e+186) or not (u <= 1e+117): tmp = v / u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -3.7e+186) || !(u <= 1e+117)) 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 <= -3.7e+186) || ~((u <= 1e+117))) tmp = v / u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -3.7e+186], N[Not[LessEqual[u, 1e+117]], $MachinePrecision]], N[(v / u), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.7 \cdot 10^{+186} \lor \neg \left(u \leq 10^{+117}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -3.7e186 or 1.00000000000000005e117 < u Initial program 81.0%
times-frac96.9%
distribute-frac-neg96.9%
distribute-neg-frac296.9%
+-commutative96.9%
distribute-neg-in96.9%
unsub-neg96.9%
Simplified96.9%
Taylor expanded in t1 around inf 50.7%
*-commutative50.7%
frac-times54.9%
add-sqr-sqrt28.1%
sqrt-unprod77.8%
sqr-neg77.8%
sqrt-unprod26.7%
add-sqr-sqrt54.8%
Applied egg-rr54.8%
Taylor expanded in t1 around 0 44.0%
if -3.7e186 < u < 1.00000000000000005e117Initial program 70.7%
associate-*l/75.8%
*-commutative75.8%
Simplified75.8%
Taylor expanded in t1 around inf 64.3%
associate-*r/64.3%
neg-mul-164.3%
Simplified64.3%
Final simplification59.5%
(FPCore (u v t1) :precision binary64 (if (<= u -4.3e+186) (* (/ v u) -0.5) (if (<= u 2.3e+119) (/ v (- t1)) (/ v u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -4.3e+186) {
tmp = (v / u) * -0.5;
} else if (u <= 2.3e+119) {
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 <= (-4.3d+186)) then
tmp = (v / u) * (-0.5d0)
else if (u <= 2.3d+119) 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 <= -4.3e+186) {
tmp = (v / u) * -0.5;
} else if (u <= 2.3e+119) {
tmp = v / -t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -4.3e+186: tmp = (v / u) * -0.5 elif u <= 2.3e+119: tmp = v / -t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -4.3e+186) tmp = Float64(Float64(v / u) * -0.5); elseif (u <= 2.3e+119) tmp = Float64(v / Float64(-t1)); else tmp = Float64(v / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -4.3e+186) tmp = (v / u) * -0.5; elseif (u <= 2.3e+119) tmp = v / -t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -4.3e+186], N[(N[(v / u), $MachinePrecision] * -0.5), $MachinePrecision], If[LessEqual[u, 2.3e+119], N[(v / (-t1)), $MachinePrecision], N[(v / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -4.3 \cdot 10^{+186}:\\
\;\;\;\;\frac{v}{u} \cdot -0.5\\
\mathbf{elif}\;u \leq 2.3 \cdot 10^{+119}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if u < -4.3e186Initial program 83.3%
associate-*l/83.6%
*-commutative83.6%
Simplified83.6%
associate-*r/83.3%
times-frac96.9%
*-commutative96.9%
frac-2neg96.9%
remove-double-neg96.9%
+-commutative96.9%
distribute-neg-in96.9%
sub-neg96.9%
clear-num96.9%
frac-2neg96.9%
frac-times93.5%
*-un-lft-identity93.5%
+-commutative93.5%
distribute-neg-in93.5%
sub-neg93.5%
sub-neg93.5%
+-commutative93.5%
add-sqr-sqrt55.4%
sqrt-unprod83.6%
sqr-neg83.6%
sqrt-unprod37.2%
add-sqr-sqrt37.2%
sqrt-unprod34.7%
sqr-neg34.7%
Applied egg-rr93.5%
Taylor expanded in u around 0 53.3%
*-commutative53.3%
Simplified53.3%
Taylor expanded in t1 around 0 53.3%
if -4.3e186 < u < 2.3000000000000001e119Initial program 70.7%
associate-*l/75.8%
*-commutative75.8%
Simplified75.8%
Taylor expanded in t1 around inf 64.3%
associate-*r/64.3%
neg-mul-164.3%
Simplified64.3%
if 2.3000000000000001e119 < u Initial program 79.0%
times-frac97.0%
distribute-frac-neg97.0%
distribute-neg-frac297.0%
+-commutative97.0%
distribute-neg-in97.0%
unsub-neg97.0%
Simplified97.0%
Taylor expanded in t1 around inf 43.1%
*-commutative43.1%
frac-times51.0%
add-sqr-sqrt0.0%
sqrt-unprod72.8%
sqr-neg72.8%
sqrt-unprod50.8%
add-sqr-sqrt50.8%
Applied egg-rr50.8%
Taylor expanded in t1 around 0 35.7%
Final simplification59.5%
(FPCore (u v t1) :precision binary64 (if (<= u -5.5e+187) (/ v (- u)) (if (<= u 4.5e+118) (/ v (- t1)) (/ v u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -5.5e+187) {
tmp = v / -u;
} else if (u <= 4.5e+118) {
tmp = v / -t1;
} else {
tmp = v / u;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-5.5d+187)) then
tmp = v / -u
else if (u <= 4.5d+118) then
tmp = v / -t1
else
tmp = v / u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -5.5e+187) {
tmp = v / -u;
} else if (u <= 4.5e+118) {
tmp = v / -t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -5.5e+187: tmp = v / -u elif u <= 4.5e+118: tmp = v / -t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -5.5e+187) tmp = Float64(v / Float64(-u)); elseif (u <= 4.5e+118) tmp = Float64(v / Float64(-t1)); else tmp = Float64(v / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -5.5e+187) tmp = v / -u; elseif (u <= 4.5e+118) tmp = v / -t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -5.5e+187], N[(v / (-u)), $MachinePrecision], If[LessEqual[u, 4.5e+118], N[(v / (-t1)), $MachinePrecision], N[(v / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -5.5 \cdot 10^{+187}:\\
\;\;\;\;\frac{v}{-u}\\
\mathbf{elif}\;u \leq 4.5 \cdot 10^{+118}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if u < -5.49999999999999997e187Initial program 83.3%
times-frac96.9%
distribute-frac-neg96.9%
distribute-neg-frac296.9%
+-commutative96.9%
distribute-neg-in96.9%
unsub-neg96.9%
Simplified96.9%
Taylor expanded in t1 around inf 59.1%
Taylor expanded in t1 around 0 53.3%
associate-*r/53.3%
mul-1-neg53.3%
Simplified53.3%
if -5.49999999999999997e187 < u < 4.50000000000000002e118Initial program 70.7%
associate-*l/75.8%
*-commutative75.8%
Simplified75.8%
Taylor expanded in t1 around inf 64.3%
associate-*r/64.3%
neg-mul-164.3%
Simplified64.3%
if 4.50000000000000002e118 < u Initial program 79.0%
times-frac97.0%
distribute-frac-neg97.0%
distribute-neg-frac297.0%
+-commutative97.0%
distribute-neg-in97.0%
unsub-neg97.0%
Simplified97.0%
Taylor expanded in t1 around inf 43.1%
*-commutative43.1%
frac-times51.0%
add-sqr-sqrt0.0%
sqrt-unprod72.8%
sqr-neg72.8%
sqrt-unprod50.8%
add-sqr-sqrt50.8%
Applied egg-rr50.8%
Taylor expanded in t1 around 0 35.7%
Final simplification59.5%
(FPCore (u v t1) :precision binary64 (if (<= u 3.1e+211) (/ v (- u t1)) (/ (* t1 v) (* t1 u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= 3.1e+211) {
tmp = v / (u - t1);
} else {
tmp = (t1 * v) / (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 <= 3.1d+211) then
tmp = v / (u - t1)
else
tmp = (t1 * v) / (t1 * u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= 3.1e+211) {
tmp = v / (u - t1);
} else {
tmp = (t1 * v) / (t1 * u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= 3.1e+211: tmp = v / (u - t1) else: tmp = (t1 * v) / (t1 * u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= 3.1e+211) tmp = Float64(v / Float64(u - t1)); else tmp = Float64(Float64(t1 * v) / Float64(t1 * u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= 3.1e+211) tmp = v / (u - t1); else tmp = (t1 * v) / (t1 * u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, 3.1e+211], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision], N[(N[(t1 * v), $MachinePrecision] / N[(t1 * u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq 3.1 \cdot 10^{+211}:\\
\;\;\;\;\frac{v}{u - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1 \cdot v}{t1 \cdot u}\\
\end{array}
\end{array}
if u < 3.1000000000000002e211Initial program 72.2%
times-frac97.9%
distribute-frac-neg97.9%
distribute-neg-frac297.9%
+-commutative97.9%
distribute-neg-in97.9%
unsub-neg97.9%
Simplified97.9%
Taylor expanded in t1 around inf 65.4%
*-commutative65.4%
frac-times47.5%
add-sqr-sqrt27.8%
sqrt-unprod52.5%
sqr-neg52.5%
sqrt-unprod19.6%
add-sqr-sqrt47.7%
Applied egg-rr47.7%
Taylor expanded in v around 0 63.8%
if 3.1000000000000002e211 < u Initial program 84.5%
times-frac100.0%
distribute-frac-neg100.0%
distribute-neg-frac2100.0%
+-commutative100.0%
distribute-neg-in100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in t1 around inf 44.9%
*-commutative44.9%
frac-times63.1%
add-sqr-sqrt0.0%
sqrt-unprod84.5%
sqr-neg84.5%
sqrt-unprod63.0%
add-sqr-sqrt63.0%
Applied egg-rr63.0%
Taylor expanded in t1 around 0 63.0%
*-commutative63.0%
Simplified63.0%
Final simplification63.7%
(FPCore (u v t1) :precision binary64 (if (<= t1 1.95e+192) (/ v u) (/ v t1)))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= 1.95e+192) {
tmp = v / u;
} else {
tmp = v / t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (t1 <= 1.95d+192) then
tmp = v / u
else
tmp = v / t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= 1.95e+192) {
tmp = v / u;
} else {
tmp = v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= 1.95e+192: tmp = v / u else: tmp = v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= 1.95e+192) tmp = Float64(v / u); else tmp = Float64(v / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= 1.95e+192) tmp = v / u; else tmp = v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, 1.95e+192], N[(v / u), $MachinePrecision], N[(v / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq 1.95 \cdot 10^{+192}:\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{t1}\\
\end{array}
\end{array}
if t1 < 1.9499999999999999e192Initial program 75.0%
times-frac97.9%
distribute-frac-neg97.9%
distribute-neg-frac297.9%
+-commutative97.9%
distribute-neg-in97.9%
unsub-neg97.9%
Simplified97.9%
Taylor expanded in t1 around inf 60.9%
*-commutative60.9%
frac-times48.5%
add-sqr-sqrt26.5%
sqrt-unprod55.2%
sqr-neg55.2%
sqrt-unprod21.8%
add-sqr-sqrt48.7%
Applied egg-rr48.7%
Taylor expanded in t1 around 0 17.0%
if 1.9499999999999999e192 < t1 Initial program 51.1%
associate-*l/52.4%
*-commutative52.4%
Simplified52.4%
Taylor expanded in t1 around inf 98.5%
associate-*r/98.5%
neg-mul-198.5%
Simplified98.5%
add-sqr-sqrt44.7%
sqrt-unprod61.4%
sqr-neg61.4%
sqrt-unprod26.2%
add-sqr-sqrt51.7%
div-inv51.7%
Applied egg-rr51.7%
associate-*r/51.7%
*-rgt-identity51.7%
Simplified51.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(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}{u - t1}
\end{array}
Initial program 73.1%
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 63.9%
*-commutative63.9%
frac-times48.7%
add-sqr-sqrt25.7%
sqrt-unprod54.9%
sqr-neg54.9%
sqrt-unprod22.8%
add-sqr-sqrt48.9%
Applied egg-rr48.9%
Taylor expanded in v around 0 61.8%
(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 73.1%
associate-*l/76.7%
*-commutative76.7%
Simplified76.7%
Taylor expanded in t1 around inf 53.6%
associate-*r/53.6%
neg-mul-153.6%
Simplified53.6%
add-sqr-sqrt26.3%
sqrt-unprod33.2%
sqr-neg33.2%
sqrt-unprod5.7%
add-sqr-sqrt10.3%
div-inv10.3%
Applied egg-rr10.3%
associate-*r/10.3%
*-rgt-identity10.3%
Simplified10.3%
herbie shell --seed 2024188
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))