
(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 (/ (* 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(t1 * Float64(v / Float64(t1 + u))) / Float64(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 * N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[((-t1) - u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{t1 \cdot \frac{v}{t1 + u}}{\left(-t1\right) - u}
\end{array}
Initial program 72.2%
associate-/l*74.8%
distribute-lft-neg-out74.8%
distribute-rgt-neg-in74.8%
associate-/r*85.4%
distribute-neg-frac285.4%
Simplified85.4%
associate-*r/98.7%
frac-2neg98.7%
remove-double-neg98.7%
Applied egg-rr98.7%
Final simplification98.7%
(FPCore (u v t1) :precision binary64 (if (<= t1 -3.75e+81) (/ v (- (- t1) (* u 2.0))) (if (<= t1 5e+191) (* t1 (/ (/ v (+ t1 u)) (- (- t1) u))) (/ v (- t1)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -3.75e+81) {
tmp = v / (-t1 - (u * 2.0));
} else if (t1 <= 5e+191) {
tmp = t1 * ((v / (t1 + u)) / (-t1 - u));
} else {
tmp = v / -t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (t1 <= (-3.75d+81)) then
tmp = v / (-t1 - (u * 2.0d0))
else if (t1 <= 5d+191) then
tmp = t1 * ((v / (t1 + u)) / (-t1 - u))
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -3.75e+81) {
tmp = v / (-t1 - (u * 2.0));
} else if (t1 <= 5e+191) {
tmp = t1 * ((v / (t1 + u)) / (-t1 - u));
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -3.75e+81: tmp = v / (-t1 - (u * 2.0)) elif t1 <= 5e+191: tmp = t1 * ((v / (t1 + u)) / (-t1 - u)) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -3.75e+81) tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); elseif (t1 <= 5e+191) tmp = Float64(t1 * Float64(Float64(v / Float64(t1 + u)) / 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 (t1 <= -3.75e+81) tmp = v / (-t1 - (u * 2.0)); elseif (t1 <= 5e+191) tmp = t1 * ((v / (t1 + u)) / (-t1 - u)); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -3.75e+81], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 5e+191], N[(t1 * N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[((-t1) - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -3.75 \cdot 10^{+81}:\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\mathbf{elif}\;t1 \leq 5 \cdot 10^{+191}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{t1 + u}}{\left(-t1\right) - u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if t1 < -3.74999999999999986e81Initial program 64.0%
associate-/l*65.0%
distribute-lft-neg-out65.0%
distribute-rgt-neg-in65.0%
associate-/r*85.5%
distribute-neg-frac285.5%
Simplified85.5%
associate-*r/100.0%
+-commutative100.0%
distribute-neg-in100.0%
sub-neg100.0%
associate-*l/100.0%
frac-2neg100.0%
clear-num100.0%
frac-times100.0%
*-un-lft-identity100.0%
+-commutative100.0%
distribute-neg-in100.0%
sub-neg100.0%
Applied egg-rr100.0%
Taylor expanded in u around 0 96.5%
*-commutative96.5%
Simplified96.5%
if -3.74999999999999986e81 < t1 < 5.0000000000000002e191Initial program 80.7%
associate-/l*84.0%
distribute-lft-neg-out84.0%
distribute-rgt-neg-in84.0%
associate-/r*91.2%
distribute-neg-frac291.2%
Simplified91.2%
if 5.0000000000000002e191 < t1 Initial program 41.0%
associate-/l*42.6%
distribute-lft-neg-out42.6%
distribute-rgt-neg-in42.6%
associate-/r*54.8%
distribute-neg-frac254.8%
Simplified54.8%
Taylor expanded in t1 around inf 100.0%
associate-*r/100.0%
neg-mul-1100.0%
Simplified100.0%
Final simplification93.4%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1.3e-111) (not (<= t1 9.5e-104))) (/ v (- (- t1) (* u 2.0))) (* t1 (/ v (* u (- (- t1) u))))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.3e-111) || !(t1 <= 9.5e-104)) {
tmp = v / (-t1 - (u * 2.0));
} 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 ((t1 <= (-1.3d-111)) .or. (.not. (t1 <= 9.5d-104))) then
tmp = v / (-t1 - (u * 2.0d0))
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 ((t1 <= -1.3e-111) || !(t1 <= 9.5e-104)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = t1 * (v / (u * (-t1 - u)));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.3e-111) or not (t1 <= 9.5e-104): tmp = v / (-t1 - (u * 2.0)) else: tmp = t1 * (v / (u * (-t1 - u))) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.3e-111) || !(t1 <= 9.5e-104)) tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); else tmp = Float64(t1 * Float64(v / Float64(u * Float64(Float64(-t1) - u)))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -1.3e-111) || ~((t1 <= 9.5e-104))) tmp = v / (-t1 - (u * 2.0)); else tmp = t1 * (v / (u * (-t1 - u))); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.3e-111], N[Not[LessEqual[t1, 9.5e-104]], $MachinePrecision]], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t1 * N[(v / N[(u * N[((-t1) - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.3 \cdot 10^{-111} \lor \neg \left(t1 \leq 9.5 \cdot 10^{-104}\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;t1 \cdot \frac{v}{u \cdot \left(\left(-t1\right) - u\right)}\\
\end{array}
\end{array}
if t1 < -1.29999999999999991e-111 or 9.5000000000000002e-104 < t1 Initial program 69.3%
associate-/l*70.9%
distribute-lft-neg-out70.9%
distribute-rgt-neg-in70.9%
associate-/r*84.1%
distribute-neg-frac284.1%
Simplified84.1%
associate-*r/99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*l/99.9%
frac-2neg99.9%
clear-num99.9%
frac-times97.7%
*-un-lft-identity97.7%
+-commutative97.7%
distribute-neg-in97.7%
sub-neg97.7%
Applied egg-rr97.7%
Taylor expanded in u around 0 88.0%
*-commutative88.0%
Simplified88.0%
if -1.29999999999999991e-111 < t1 < 9.5000000000000002e-104Initial program 77.8%
associate-/l*82.4%
distribute-lft-neg-out82.4%
distribute-rgt-neg-in82.4%
associate-/r*87.8%
distribute-neg-frac287.8%
Simplified87.8%
Taylor expanded in t1 around 0 84.5%
Taylor expanded in v around 0 81.1%
associate-*r/81.1%
neg-mul-181.1%
Simplified81.1%
Final simplification85.7%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -6.8e-108) (not (<= t1 8.5e-104))) (/ v (- (- t1) (* u 2.0))) (* t1 (/ (/ v u) (- (- t1) u)))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -6.8e-108) || !(t1 <= 8.5e-104)) {
tmp = v / (-t1 - (u * 2.0));
} 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 ((t1 <= (-6.8d-108)) .or. (.not. (t1 <= 8.5d-104))) then
tmp = v / (-t1 - (u * 2.0d0))
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 ((t1 <= -6.8e-108) || !(t1 <= 8.5e-104)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = t1 * ((v / u) / (-t1 - u));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -6.8e-108) or not (t1 <= 8.5e-104): tmp = v / (-t1 - (u * 2.0)) else: tmp = t1 * ((v / u) / (-t1 - u)) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -6.8e-108) || !(t1 <= 8.5e-104)) tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); else tmp = Float64(t1 * Float64(Float64(v / u) / Float64(Float64(-t1) - u))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -6.8e-108) || ~((t1 <= 8.5e-104))) tmp = v / (-t1 - (u * 2.0)); else tmp = t1 * ((v / u) / (-t1 - u)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -6.8e-108], N[Not[LessEqual[t1, 8.5e-104]], $MachinePrecision]], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t1 * N[(N[(v / u), $MachinePrecision] / N[((-t1) - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -6.8 \cdot 10^{-108} \lor \neg \left(t1 \leq 8.5 \cdot 10^{-104}\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{\left(-t1\right) - u}\\
\end{array}
\end{array}
if t1 < -6.80000000000000004e-108 or 8.50000000000000007e-104 < t1 Initial program 69.3%
associate-/l*70.9%
distribute-lft-neg-out70.9%
distribute-rgt-neg-in70.9%
associate-/r*84.1%
distribute-neg-frac284.1%
Simplified84.1%
associate-*r/99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*l/99.9%
frac-2neg99.9%
clear-num99.9%
frac-times97.7%
*-un-lft-identity97.7%
+-commutative97.7%
distribute-neg-in97.7%
sub-neg97.7%
Applied egg-rr97.7%
Taylor expanded in u around 0 88.0%
*-commutative88.0%
Simplified88.0%
if -6.80000000000000004e-108 < t1 < 8.50000000000000007e-104Initial program 77.8%
associate-/l*82.4%
distribute-lft-neg-out82.4%
distribute-rgt-neg-in82.4%
associate-/r*87.8%
distribute-neg-frac287.8%
Simplified87.8%
Taylor expanded in t1 around 0 84.5%
Final simplification86.8%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -9.5e-110) (not (<= t1 1.15e-101))) (/ v (- (- t1) (* u 2.0))) (* (/ (- t1) (+ t1 u)) (/ v u))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -9.5e-110) || !(t1 <= 1.15e-101)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = (-t1 / (t1 + u)) * (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 <= (-9.5d-110)) .or. (.not. (t1 <= 1.15d-101))) then
tmp = v / (-t1 - (u * 2.0d0))
else
tmp = (-t1 / (t1 + u)) * (v / u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -9.5e-110) || !(t1 <= 1.15e-101)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = (-t1 / (t1 + u)) * (v / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -9.5e-110) or not (t1 <= 1.15e-101): tmp = v / (-t1 - (u * 2.0)) else: tmp = (-t1 / (t1 + u)) * (v / u) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -9.5e-110) || !(t1 <= 1.15e-101)) tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); else tmp = Float64(Float64(Float64(-t1) / Float64(t1 + u)) * Float64(v / u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -9.5e-110) || ~((t1 <= 1.15e-101))) tmp = v / (-t1 - (u * 2.0)); else tmp = (-t1 / (t1 + u)) * (v / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -9.5e-110], N[Not[LessEqual[t1, 1.15e-101]], $MachinePrecision]], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[((-t1) / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -9.5 \cdot 10^{-110} \lor \neg \left(t1 \leq 1.15 \cdot 10^{-101}\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{-t1}{t1 + u} \cdot \frac{v}{u}\\
\end{array}
\end{array}
if t1 < -9.50000000000000004e-110 or 1.15e-101 < t1 Initial program 69.3%
associate-/l*70.9%
distribute-lft-neg-out70.9%
distribute-rgt-neg-in70.9%
associate-/r*84.1%
distribute-neg-frac284.1%
Simplified84.1%
associate-*r/99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*l/99.9%
frac-2neg99.9%
clear-num99.9%
frac-times97.7%
*-un-lft-identity97.7%
+-commutative97.7%
distribute-neg-in97.7%
sub-neg97.7%
Applied egg-rr97.7%
Taylor expanded in u around 0 88.0%
*-commutative88.0%
Simplified88.0%
if -9.50000000000000004e-110 < t1 < 1.15e-101Initial program 77.8%
times-frac95.5%
distribute-frac-neg95.5%
distribute-neg-frac295.5%
+-commutative95.5%
distribute-neg-in95.5%
unsub-neg95.5%
Simplified95.5%
Taylor expanded in t1 around 0 85.8%
Final simplification87.2%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -2.8e-110) (not (<= t1 2e-101))) (/ v (- (- t1) (* u 2.0))) (/ (/ t1 (/ u v)) (- (- t1) u))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -2.8e-110) || !(t1 <= 2e-101)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = (t1 / (u / 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 ((t1 <= (-2.8d-110)) .or. (.not. (t1 <= 2d-101))) then
tmp = v / (-t1 - (u * 2.0d0))
else
tmp = (t1 / (u / v)) / (-t1 - u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -2.8e-110) || !(t1 <= 2e-101)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = (t1 / (u / v)) / (-t1 - u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -2.8e-110) or not (t1 <= 2e-101): tmp = v / (-t1 - (u * 2.0)) else: tmp = (t1 / (u / v)) / (-t1 - u) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -2.8e-110) || !(t1 <= 2e-101)) tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); else tmp = Float64(Float64(t1 / Float64(u / v)) / Float64(Float64(-t1) - u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -2.8e-110) || ~((t1 <= 2e-101))) tmp = v / (-t1 - (u * 2.0)); else tmp = (t1 / (u / v)) / (-t1 - u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -2.8e-110], N[Not[LessEqual[t1, 2e-101]], $MachinePrecision]], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t1 / N[(u / v), $MachinePrecision]), $MachinePrecision] / N[((-t1) - u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2.8 \cdot 10^{-110} \lor \neg \left(t1 \leq 2 \cdot 10^{-101}\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t1}{\frac{u}{v}}}{\left(-t1\right) - u}\\
\end{array}
\end{array}
if t1 < -2.8e-110 or 2.0000000000000001e-101 < t1 Initial program 69.3%
associate-/l*70.9%
distribute-lft-neg-out70.9%
distribute-rgt-neg-in70.9%
associate-/r*84.1%
distribute-neg-frac284.1%
Simplified84.1%
associate-*r/99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*l/99.9%
frac-2neg99.9%
clear-num99.9%
frac-times97.7%
*-un-lft-identity97.7%
+-commutative97.7%
distribute-neg-in97.7%
sub-neg97.7%
Applied egg-rr97.7%
Taylor expanded in u around 0 88.0%
*-commutative88.0%
Simplified88.0%
if -2.8e-110 < t1 < 2.0000000000000001e-101Initial program 77.8%
associate-/l*82.4%
distribute-lft-neg-out82.4%
distribute-rgt-neg-in82.4%
associate-/r*87.8%
distribute-neg-frac287.8%
Simplified87.8%
associate-*r/96.3%
frac-2neg96.3%
remove-double-neg96.3%
Applied egg-rr96.3%
clear-num96.3%
un-div-inv96.4%
Applied egg-rr96.4%
Taylor expanded in t1 around 0 86.6%
Final simplification87.5%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1.82e-177) (not (<= t1 1.45e-147))) (/ v (- (- t1) (* u 2.0))) (* t1 (/ (/ v u) (+ t1 u)))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.82e-177) || !(t1 <= 1.45e-147)) {
tmp = v / (-t1 - (u * 2.0));
} 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 ((t1 <= (-1.82d-177)) .or. (.not. (t1 <= 1.45d-147))) then
tmp = v / (-t1 - (u * 2.0d0))
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 ((t1 <= -1.82e-177) || !(t1 <= 1.45e-147)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = t1 * ((v / u) / (t1 + u));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.82e-177) or not (t1 <= 1.45e-147): tmp = v / (-t1 - (u * 2.0)) else: tmp = t1 * ((v / u) / (t1 + u)) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.82e-177) || !(t1 <= 1.45e-147)) tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); else tmp = Float64(t1 * Float64(Float64(v / u) / Float64(t1 + u))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -1.82e-177) || ~((t1 <= 1.45e-147))) tmp = v / (-t1 - (u * 2.0)); else tmp = t1 * ((v / u) / (t1 + u)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.82e-177], N[Not[LessEqual[t1, 1.45e-147]], $MachinePrecision]], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t1 * N[(N[(v / u), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.82 \cdot 10^{-177} \lor \neg \left(t1 \leq 1.45 \cdot 10^{-147}\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{t1 + u}\\
\end{array}
\end{array}
if t1 < -1.81999999999999993e-177 or 1.4500000000000001e-147 < t1 Initial program 71.3%
associate-/l*71.8%
distribute-lft-neg-out71.8%
distribute-rgt-neg-in71.8%
associate-/r*84.4%
distribute-neg-frac284.4%
Simplified84.4%
associate-*r/99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*l/99.9%
frac-2neg99.9%
clear-num99.9%
frac-times96.4%
*-un-lft-identity96.4%
+-commutative96.4%
distribute-neg-in96.4%
sub-neg96.4%
Applied egg-rr96.4%
Taylor expanded in u around 0 84.8%
*-commutative84.8%
Simplified84.8%
if -1.81999999999999993e-177 < t1 < 1.4500000000000001e-147Initial program 74.5%
associate-/l*82.5%
distribute-lft-neg-out82.5%
distribute-rgt-neg-in82.5%
associate-/r*87.8%
distribute-neg-frac287.8%
Simplified87.8%
Taylor expanded in t1 around 0 83.7%
distribute-frac-neg283.7%
distribute-frac-neg83.7%
associate-*r/86.2%
distribute-neg-frac286.2%
add-sqr-sqrt52.2%
sqrt-unprod68.5%
sqr-neg68.5%
sqrt-unprod20.4%
add-sqr-sqrt50.8%
Applied egg-rr50.8%
associate-/l*50.4%
Simplified50.4%
Final simplification75.3%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -5.8e-178) (not (<= t1 2.8e-104))) (/ v (- (- t1) (* u 2.0))) (* v (/ t1 (* u (+ t1 u))))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -5.8e-178) || !(t1 <= 2.8e-104)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = v * (t1 / (u * (t1 + u)));
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-5.8d-178)) .or. (.not. (t1 <= 2.8d-104))) then
tmp = v / (-t1 - (u * 2.0d0))
else
tmp = v * (t1 / (u * (t1 + u)))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -5.8e-178) || !(t1 <= 2.8e-104)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = v * (t1 / (u * (t1 + u)));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -5.8e-178) or not (t1 <= 2.8e-104): tmp = v / (-t1 - (u * 2.0)) else: tmp = v * (t1 / (u * (t1 + u))) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -5.8e-178) || !(t1 <= 2.8e-104)) tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); else tmp = Float64(v * Float64(t1 / Float64(u * Float64(t1 + u)))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -5.8e-178) || ~((t1 <= 2.8e-104))) tmp = v / (-t1 - (u * 2.0)); else tmp = v * (t1 / (u * (t1 + u))); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -5.8e-178], N[Not[LessEqual[t1, 2.8e-104]], $MachinePrecision]], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v * N[(t1 / N[(u * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -5.8 \cdot 10^{-178} \lor \neg \left(t1 \leq 2.8 \cdot 10^{-104}\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;v \cdot \frac{t1}{u \cdot \left(t1 + u\right)}\\
\end{array}
\end{array}
if t1 < -5.7999999999999995e-178 or 2.8e-104 < t1 Initial program 70.5%
associate-/l*71.6%
distribute-lft-neg-out71.6%
distribute-rgt-neg-in71.6%
associate-/r*84.3%
distribute-neg-frac284.3%
Simplified84.3%
associate-*r/99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*l/99.9%
frac-2neg99.9%
clear-num99.9%
frac-times97.3%
*-un-lft-identity97.3%
+-commutative97.3%
distribute-neg-in97.3%
sub-neg97.3%
Applied egg-rr97.3%
Taylor expanded in u around 0 86.9%
*-commutative86.9%
Simplified86.9%
if -5.7999999999999995e-178 < t1 < 2.8e-104Initial program 75.8%
associate-/l*81.9%
distribute-lft-neg-out81.9%
distribute-rgt-neg-in81.9%
associate-/r*87.8%
distribute-neg-frac287.8%
Simplified87.8%
Taylor expanded in t1 around 0 84.1%
*-commutative84.1%
associate-/l/80.5%
associate-*l/73.3%
add-sqr-sqrt42.6%
sqrt-unprod63.4%
sqr-neg63.4%
sqrt-unprod20.8%
add-sqr-sqrt49.4%
Applied egg-rr49.4%
associate-/l*49.3%
*-commutative49.3%
*-commutative49.3%
Applied egg-rr49.3%
Final simplification75.3%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -2.6e-177) (not (<= t1 7.5e-147))) (/ v (- (- t1) (* u 2.0))) (* (/ v (+ t1 u)) (/ t1 u))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -2.6e-177) || !(t1 <= 7.5e-147)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = (v / (t1 + u)) * (t1 / u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-2.6d-177)) .or. (.not. (t1 <= 7.5d-147))) then
tmp = v / (-t1 - (u * 2.0d0))
else
tmp = (v / (t1 + u)) * (t1 / u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -2.6e-177) || !(t1 <= 7.5e-147)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = (v / (t1 + u)) * (t1 / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -2.6e-177) or not (t1 <= 7.5e-147): tmp = v / (-t1 - (u * 2.0)) else: tmp = (v / (t1 + u)) * (t1 / u) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -2.6e-177) || !(t1 <= 7.5e-147)) tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); else tmp = Float64(Float64(v / Float64(t1 + u)) * Float64(t1 / u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -2.6e-177) || ~((t1 <= 7.5e-147))) tmp = v / (-t1 - (u * 2.0)); else tmp = (v / (t1 + u)) * (t1 / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -2.6e-177], N[Not[LessEqual[t1, 7.5e-147]], $MachinePrecision]], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(t1 / u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2.6 \cdot 10^{-177} \lor \neg \left(t1 \leq 7.5 \cdot 10^{-147}\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{t1 + u} \cdot \frac{t1}{u}\\
\end{array}
\end{array}
if t1 < -2.6000000000000001e-177 or 7.50000000000000047e-147 < t1 Initial program 71.3%
associate-/l*71.8%
distribute-lft-neg-out71.8%
distribute-rgt-neg-in71.8%
associate-/r*84.4%
distribute-neg-frac284.4%
Simplified84.4%
associate-*r/99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*l/99.9%
frac-2neg99.9%
clear-num99.9%
frac-times96.4%
*-un-lft-identity96.4%
+-commutative96.4%
distribute-neg-in96.4%
sub-neg96.4%
Applied egg-rr96.4%
Taylor expanded in u around 0 84.8%
*-commutative84.8%
Simplified84.8%
if -2.6000000000000001e-177 < t1 < 7.50000000000000047e-147Initial program 74.5%
associate-/l*82.5%
distribute-lft-neg-out82.5%
distribute-rgt-neg-in82.5%
associate-/r*87.8%
distribute-neg-frac287.8%
Simplified87.8%
Taylor expanded in t1 around 0 83.7%
*-commutative83.7%
associate-/l/80.9%
associate-*l/72.9%
add-sqr-sqrt43.1%
sqrt-unprod64.8%
sqr-neg64.8%
sqrt-unprod21.6%
add-sqr-sqrt50.5%
Applied egg-rr50.5%
times-frac50.8%
Applied egg-rr50.8%
Final simplification75.4%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -8.1e-178) (not (<= t1 1.45e-148))) (/ v (- (- t1) (* u 2.0))) (/ (* v (/ t1 u)) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -8.1e-178) || !(t1 <= 1.45e-148)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = (v * (t1 / 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 <= (-8.1d-178)) .or. (.not. (t1 <= 1.45d-148))) then
tmp = v / (-t1 - (u * 2.0d0))
else
tmp = (v * (t1 / u)) / t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -8.1e-178) || !(t1 <= 1.45e-148)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = (v * (t1 / u)) / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -8.1e-178) or not (t1 <= 1.45e-148): tmp = v / (-t1 - (u * 2.0)) else: tmp = (v * (t1 / u)) / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -8.1e-178) || !(t1 <= 1.45e-148)) tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); else tmp = Float64(Float64(v * Float64(t1 / u)) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -8.1e-178) || ~((t1 <= 1.45e-148))) tmp = v / (-t1 - (u * 2.0)); else tmp = (v * (t1 / u)) / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -8.1e-178], N[Not[LessEqual[t1, 1.45e-148]], $MachinePrecision]], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(v * N[(t1 / u), $MachinePrecision]), $MachinePrecision] / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -8.1 \cdot 10^{-178} \lor \neg \left(t1 \leq 1.45 \cdot 10^{-148}\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{v \cdot \frac{t1}{u}}{t1}\\
\end{array}
\end{array}
if t1 < -8.0999999999999997e-178 or 1.4499999999999999e-148 < t1 Initial program 71.3%
associate-/l*71.8%
distribute-lft-neg-out71.8%
distribute-rgt-neg-in71.8%
associate-/r*84.4%
distribute-neg-frac284.4%
Simplified84.4%
associate-*r/99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*l/99.9%
frac-2neg99.9%
clear-num99.9%
frac-times96.4%
*-un-lft-identity96.4%
+-commutative96.4%
distribute-neg-in96.4%
sub-neg96.4%
Applied egg-rr96.4%
Taylor expanded in u around 0 84.8%
*-commutative84.8%
Simplified84.8%
if -8.0999999999999997e-178 < t1 < 1.4499999999999999e-148Initial program 74.5%
associate-/l*82.5%
distribute-lft-neg-out82.5%
distribute-rgt-neg-in82.5%
associate-/r*87.8%
distribute-neg-frac287.8%
Simplified87.8%
Taylor expanded in t1 around 0 83.7%
Taylor expanded in u around 0 12.8%
mul-1-neg12.8%
associate-/r*12.9%
distribute-neg-frac212.9%
Simplified12.9%
div-inv12.9%
associate-/l*12.8%
add-sqr-sqrt9.9%
sqrt-unprod25.1%
sqr-neg25.1%
sqrt-unprod2.9%
add-sqr-sqrt15.6%
Applied egg-rr15.6%
associate-/r*15.6%
associate-*r/15.6%
*-rgt-identity15.6%
Simplified15.6%
associate-*r/28.8%
*-commutative28.8%
associate-/r*40.3%
associate-*l/50.2%
*-commutative50.2%
Applied egg-rr50.2%
Final simplification75.2%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1.95e-178) (not (<= t1 2.1e-152))) (/ v (- (- t1) u)) (/ (* v (/ t1 u)) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.95e-178) || !(t1 <= 2.1e-152)) {
tmp = v / (-t1 - u);
} else {
tmp = (v * (t1 / 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.95d-178)) .or. (.not. (t1 <= 2.1d-152))) then
tmp = v / (-t1 - u)
else
tmp = (v * (t1 / u)) / t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.95e-178) || !(t1 <= 2.1e-152)) {
tmp = v / (-t1 - u);
} else {
tmp = (v * (t1 / u)) / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.95e-178) or not (t1 <= 2.1e-152): tmp = v / (-t1 - u) else: tmp = (v * (t1 / u)) / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.95e-178) || !(t1 <= 2.1e-152)) tmp = Float64(v / Float64(Float64(-t1) - u)); else tmp = Float64(Float64(v * Float64(t1 / u)) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -1.95e-178) || ~((t1 <= 2.1e-152))) tmp = v / (-t1 - u); else tmp = (v * (t1 / u)) / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.95e-178], N[Not[LessEqual[t1, 2.1e-152]], $MachinePrecision]], N[(v / N[((-t1) - u), $MachinePrecision]), $MachinePrecision], N[(N[(v * N[(t1 / u), $MachinePrecision]), $MachinePrecision] / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.95 \cdot 10^{-178} \lor \neg \left(t1 \leq 2.1 \cdot 10^{-152}\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v \cdot \frac{t1}{u}}{t1}\\
\end{array}
\end{array}
if t1 < -1.95000000000000013e-178 or 2.09999999999999999e-152 < t1 Initial program 71.3%
associate-/l*71.8%
distribute-lft-neg-out71.8%
distribute-rgt-neg-in71.8%
associate-/r*84.4%
distribute-neg-frac284.4%
Simplified84.4%
associate-*r/99.9%
frac-2neg99.9%
remove-double-neg99.9%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 84.7%
if -1.95000000000000013e-178 < t1 < 2.09999999999999999e-152Initial program 74.5%
associate-/l*82.5%
distribute-lft-neg-out82.5%
distribute-rgt-neg-in82.5%
associate-/r*87.8%
distribute-neg-frac287.8%
Simplified87.8%
Taylor expanded in t1 around 0 83.7%
Taylor expanded in u around 0 12.8%
mul-1-neg12.8%
associate-/r*12.9%
distribute-neg-frac212.9%
Simplified12.9%
div-inv12.9%
associate-/l*12.8%
add-sqr-sqrt9.9%
sqrt-unprod25.1%
sqr-neg25.1%
sqrt-unprod2.9%
add-sqr-sqrt15.6%
Applied egg-rr15.6%
associate-/r*15.6%
associate-*r/15.6%
*-rgt-identity15.6%
Simplified15.6%
associate-*r/28.8%
*-commutative28.8%
associate-/r*40.3%
associate-*l/50.2%
*-commutative50.2%
Applied egg-rr50.2%
Final simplification75.1%
(FPCore (u v t1) :precision binary64 (if (or (<= u -2.1e+54) (not (<= u 2.5e+142))) (/ 1.0 (/ u v)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.1e+54) || !(u <= 2.5e+142)) {
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 <= (-2.1d+54)) .or. (.not. (u <= 2.5d+142))) 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 <= -2.1e+54) || !(u <= 2.5e+142)) {
tmp = 1.0 / (u / v);
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -2.1e+54) or not (u <= 2.5e+142): tmp = 1.0 / (u / v) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -2.1e+54) || !(u <= 2.5e+142)) 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 <= -2.1e+54) || ~((u <= 2.5e+142))) tmp = 1.0 / (u / v); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2.1e+54], N[Not[LessEqual[u, 2.5e+142]], $MachinePrecision]], N[(1.0 / N[(u / v), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.1 \cdot 10^{+54} \lor \neg \left(u \leq 2.5 \cdot 10^{+142}\right):\\
\;\;\;\;\frac{1}{\frac{u}{v}}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -2.09999999999999986e54 or 2.5000000000000001e142 < u Initial program 83.9%
associate-/l*84.2%
distribute-lft-neg-out84.2%
distribute-rgt-neg-in84.2%
associate-/r*93.3%
distribute-neg-frac293.3%
Simplified93.3%
Taylor expanded in t1 around 0 91.3%
Taylor expanded in u around 0 50.7%
mul-1-neg50.7%
associate-/r*49.1%
distribute-neg-frac249.1%
Simplified49.1%
clear-num49.1%
un-div-inv49.1%
associate-/r/49.5%
add-sqr-sqrt27.5%
sqrt-unprod66.8%
sqr-neg66.8%
sqrt-unprod21.9%
add-sqr-sqrt49.9%
Applied egg-rr49.9%
*-commutative49.9%
associate-/r*47.3%
*-inverses47.3%
Simplified47.3%
if -2.09999999999999986e54 < u < 2.5000000000000001e142Initial program 67.6%
associate-/l*71.1%
distribute-lft-neg-out71.1%
distribute-rgt-neg-in71.1%
associate-/r*82.2%
distribute-neg-frac282.2%
Simplified82.2%
Taylor expanded in t1 around inf 72.1%
associate-*r/72.1%
neg-mul-172.1%
Simplified72.1%
Final simplification65.1%
(FPCore (u v t1) :precision binary64 (if (<= u -2.1e+54) (/ 1.0 (/ u v)) (if (<= u 4.2e+143) (/ v (- t1)) (/ -1.0 (/ u v)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -2.1e+54) {
tmp = 1.0 / (u / v);
} else if (u <= 4.2e+143) {
tmp = v / -t1;
} else {
tmp = -1.0 / (u / v);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-2.1d+54)) then
tmp = 1.0d0 / (u / v)
else if (u <= 4.2d+143) then
tmp = v / -t1
else
tmp = (-1.0d0) / (u / v)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -2.1e+54) {
tmp = 1.0 / (u / v);
} else if (u <= 4.2e+143) {
tmp = v / -t1;
} else {
tmp = -1.0 / (u / v);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -2.1e+54: tmp = 1.0 / (u / v) elif u <= 4.2e+143: tmp = v / -t1 else: tmp = -1.0 / (u / v) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -2.1e+54) tmp = Float64(1.0 / Float64(u / v)); elseif (u <= 4.2e+143) tmp = Float64(v / Float64(-t1)); else tmp = Float64(-1.0 / Float64(u / v)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -2.1e+54) tmp = 1.0 / (u / v); elseif (u <= 4.2e+143) tmp = v / -t1; else tmp = -1.0 / (u / v); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -2.1e+54], N[(1.0 / N[(u / v), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 4.2e+143], N[(v / (-t1)), $MachinePrecision], N[(-1.0 / N[(u / v), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.1 \cdot 10^{+54}:\\
\;\;\;\;\frac{1}{\frac{u}{v}}\\
\mathbf{elif}\;u \leq 4.2 \cdot 10^{+143}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\frac{u}{v}}\\
\end{array}
\end{array}
if u < -2.09999999999999986e54Initial program 86.0%
associate-/l*86.1%
distribute-lft-neg-out86.1%
distribute-rgt-neg-in86.1%
associate-/r*95.3%
distribute-neg-frac295.3%
Simplified95.3%
Taylor expanded in t1 around 0 94.1%
Taylor expanded in u around 0 48.2%
mul-1-neg48.2%
associate-/r*47.8%
distribute-neg-frac247.8%
Simplified47.8%
clear-num47.8%
un-div-inv47.8%
associate-/r/48.3%
add-sqr-sqrt48.3%
sqrt-unprod60.3%
sqr-neg60.3%
sqrt-unprod0.0%
add-sqr-sqrt49.0%
Applied egg-rr49.0%
*-commutative49.0%
associate-/r*46.9%
*-inverses46.9%
Simplified46.9%
if -2.09999999999999986e54 < u < 4.19999999999999975e143Initial program 67.6%
associate-/l*71.1%
distribute-lft-neg-out71.1%
distribute-rgt-neg-in71.1%
associate-/r*82.2%
distribute-neg-frac282.2%
Simplified82.2%
Taylor expanded in t1 around inf 72.1%
associate-*r/72.1%
neg-mul-172.1%
Simplified72.1%
if 4.19999999999999975e143 < u Initial program 81.1%
associate-/l*81.6%
distribute-lft-neg-out81.6%
distribute-rgt-neg-in81.6%
associate-/r*90.8%
distribute-neg-frac290.8%
Simplified90.8%
Taylor expanded in t1 around 0 87.7%
Taylor expanded in u around 0 54.0%
mul-1-neg54.0%
associate-/r*50.9%
distribute-neg-frac250.9%
Simplified50.9%
associate-*r/47.9%
distribute-frac-neg247.9%
add-sqr-sqrt47.9%
sqrt-unprod69.1%
sqr-neg69.1%
sqrt-unprod0.0%
add-sqr-sqrt47.8%
associate-*r/50.9%
clear-num50.9%
un-div-inv50.9%
associate-/r/51.0%
add-sqr-sqrt0.0%
sqrt-unprod75.5%
sqr-neg75.5%
sqrt-unprod51.0%
add-sqr-sqrt51.0%
Applied egg-rr51.0%
*-commutative51.0%
associate-/r*48.0%
*-inverses48.0%
Simplified48.0%
Final simplification65.1%
(FPCore (u v t1) :precision binary64 (if (or (<= u -2.1e+54) (not (<= u 2.5e+175))) (/ v u) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.1e+54) || !(u <= 2.5e+175)) {
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 <= (-2.1d+54)) .or. (.not. (u <= 2.5d+175))) 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 <= -2.1e+54) || !(u <= 2.5e+175)) {
tmp = v / u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -2.1e+54) or not (u <= 2.5e+175): tmp = v / u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -2.1e+54) || !(u <= 2.5e+175)) 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 <= -2.1e+54) || ~((u <= 2.5e+175))) tmp = v / u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2.1e+54], N[Not[LessEqual[u, 2.5e+175]], $MachinePrecision]], N[(v / u), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.1 \cdot 10^{+54} \lor \neg \left(u \leq 2.5 \cdot 10^{+175}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -2.09999999999999986e54 or 2.5e175 < u Initial program 85.2%
associate-/l*85.4%
distribute-lft-neg-out85.4%
distribute-rgt-neg-in85.4%
associate-/r*92.7%
distribute-neg-frac292.7%
Simplified92.7%
Taylor expanded in t1 around 0 91.9%
*-commutative91.9%
associate-/l/85.4%
associate-*l/85.2%
add-sqr-sqrt52.5%
sqrt-unprod85.2%
sqr-neg85.2%
sqrt-unprod32.6%
add-sqr-sqrt79.3%
Applied egg-rr79.3%
Taylor expanded in t1 around inf 48.8%
if -2.09999999999999986e54 < u < 2.5e175Initial program 67.8%
associate-/l*71.2%
distribute-lft-neg-out71.2%
distribute-rgt-neg-in71.2%
associate-/r*82.9%
distribute-neg-frac282.9%
Simplified82.9%
Taylor expanded in t1 around inf 70.6%
associate-*r/70.6%
neg-mul-170.6%
Simplified70.6%
Final simplification65.0%
(FPCore (u v t1) :precision binary64 (if (<= u -2e+54) (/ v u) (if (<= u 2.6e+174) (/ v (- t1)) (/ (- v) u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -2e+54) {
tmp = v / u;
} else if (u <= 2.6e+174) {
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 <= (-2d+54)) then
tmp = v / u
else if (u <= 2.6d+174) 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 <= -2e+54) {
tmp = v / u;
} else if (u <= 2.6e+174) {
tmp = v / -t1;
} else {
tmp = -v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -2e+54: tmp = v / u elif u <= 2.6e+174: tmp = v / -t1 else: tmp = -v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -2e+54) tmp = Float64(v / u); elseif (u <= 2.6e+174) tmp = Float64(v / Float64(-t1)); else tmp = Float64(Float64(-v) / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -2e+54) tmp = v / u; elseif (u <= 2.6e+174) tmp = v / -t1; else tmp = -v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -2e+54], N[(v / u), $MachinePrecision], If[LessEqual[u, 2.6e+174], N[(v / (-t1)), $MachinePrecision], N[((-v) / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2 \cdot 10^{+54}:\\
\;\;\;\;\frac{v}{u}\\
\mathbf{elif}\;u \leq 2.6 \cdot 10^{+174}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{u}\\
\end{array}
\end{array}
if u < -2.0000000000000002e54Initial program 86.0%
associate-/l*86.1%
distribute-lft-neg-out86.1%
distribute-rgt-neg-in86.1%
associate-/r*95.3%
distribute-neg-frac295.3%
Simplified95.3%
Taylor expanded in t1 around 0 94.1%
*-commutative94.1%
associate-/l/86.1%
associate-*l/86.0%
add-sqr-sqrt83.3%
sqrt-unprod86.0%
sqr-neg86.0%
sqrt-unprod2.7%
add-sqr-sqrt76.8%
Applied egg-rr76.8%
Taylor expanded in t1 around inf 46.7%
if -2.0000000000000002e54 < u < 2.5999999999999999e174Initial program 67.8%
associate-/l*71.2%
distribute-lft-neg-out71.2%
distribute-rgt-neg-in71.2%
associate-/r*82.9%
distribute-neg-frac282.9%
Simplified82.9%
Taylor expanded in t1 around inf 70.6%
associate-*r/70.6%
neg-mul-170.6%
Simplified70.6%
if 2.5999999999999999e174 < u Initial program 83.7%
associate-/l*84.3%
distribute-lft-neg-out84.3%
distribute-rgt-neg-in84.3%
associate-/r*88.2%
distribute-neg-frac288.2%
Simplified88.2%
Taylor expanded in t1 around 0 88.3%
Taylor expanded in t1 around inf 52.9%
associate-*r/52.9%
neg-mul-152.9%
Simplified52.9%
Final simplification65.1%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -3.6e+50) (not (<= t1 3.9e+52))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -3.6e+50) || !(t1 <= 3.9e+52)) {
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 <= (-3.6d+50)) .or. (.not. (t1 <= 3.9d+52))) 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 <= -3.6e+50) || !(t1 <= 3.9e+52)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -3.6e+50) or not (t1 <= 3.9e+52): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -3.6e+50) || !(t1 <= 3.9e+52)) 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 <= -3.6e+50) || ~((t1 <= 3.9e+52))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -3.6e+50], N[Not[LessEqual[t1, 3.9e+52]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -3.6 \cdot 10^{+50} \lor \neg \left(t1 \leq 3.9 \cdot 10^{+52}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -3.59999999999999986e50 or 3.9e52 < t1 Initial program 56.3%
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 92.4%
Taylor expanded in u around inf 38.2%
if -3.59999999999999986e50 < t1 < 3.9e52Initial program 84.9%
associate-/l*86.9%
distribute-lft-neg-out86.9%
distribute-rgt-neg-in86.9%
associate-/r*90.9%
distribute-neg-frac290.9%
Simplified90.9%
Taylor expanded in t1 around 0 66.7%
*-commutative66.7%
associate-/l/64.0%
associate-*l/60.1%
add-sqr-sqrt31.5%
sqrt-unprod50.1%
sqr-neg50.1%
sqrt-unprod18.6%
add-sqr-sqrt38.5%
Applied egg-rr38.5%
Taylor expanded in t1 around inf 19.0%
Final simplification27.6%
(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(v / Float64(t1 + u)) * Float64(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 72.2%
times-frac98.4%
distribute-frac-neg98.4%
distribute-neg-frac298.4%
+-commutative98.4%
distribute-neg-in98.4%
unsub-neg98.4%
Simplified98.4%
Final simplification98.4%
(FPCore (u v t1) :precision binary64 (/ v (- (- t1) u)))
double code(double u, double v, double t1) {
return v / (-t1 - u);
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = v / (-t1 - u)
end function
public static double code(double u, double v, double t1) {
return v / (-t1 - u);
}
def code(u, v, t1): return v / (-t1 - u)
function code(u, v, t1) return Float64(v / Float64(Float64(-t1) - u)) end
function tmp = code(u, v, t1) tmp = v / (-t1 - u); end
code[u_, v_, t1_] := N[(v / N[((-t1) - u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{\left(-t1\right) - u}
\end{array}
Initial program 72.2%
associate-/l*74.8%
distribute-lft-neg-out74.8%
distribute-rgt-neg-in74.8%
associate-/r*85.4%
distribute-neg-frac285.4%
Simplified85.4%
associate-*r/98.7%
frac-2neg98.7%
remove-double-neg98.7%
Applied egg-rr98.7%
Taylor expanded in t1 around inf 66.8%
Final simplification66.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 72.2%
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 61.7%
Taylor expanded in u around inf 18.2%
Final simplification18.2%
herbie shell --seed 2024071
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))