
(FPCore (u v t1) :precision binary64 (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))
double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-t1 * v) / ((t1 + u) * (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
def code(u, v, t1): return (-t1 * v) / ((t1 + u) * (t1 + u))
function code(u, v, t1) return Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (-t1 * v) / ((t1 + u) * (t1 + u)); end
code[u_, v_, t1_] := N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (u v t1) :precision binary64 (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))
double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-t1 * v) / ((t1 + u) * (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
def code(u, v, t1): return (-t1 * v) / ((t1 + u) * (t1 + u))
function code(u, v, t1) return Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (-t1 * v) / ((t1 + u) * (t1 + u)); end
code[u_, v_, t1_] := N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}
\end{array}
(FPCore (u v t1) :precision binary64 (/ (* 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(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 * N[(v / N[((-t1) - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{t1 \cdot \frac{v}{\left(-t1\right) - u}}{t1 + u}
\end{array}
Initial program 73.3%
distribute-lft-neg-out73.3%
*-commutative73.3%
distribute-lft-neg-out73.3%
associate-*l/71.8%
*-commutative71.8%
Simplified71.8%
associate-/r*80.5%
associate-*r/97.1%
remove-double-neg97.1%
frac-2neg97.1%
+-commutative97.1%
distribute-neg-in97.1%
unsub-neg97.1%
Applied egg-rr97.1%
Final simplification97.1%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ v (- (* u -2.0) t1))))
(if (<= t1 -2e+37)
t_1
(if (<= t1 1.1e-84)
(/ (/ (- t1) u) (/ u v))
(if (or (<= t1 1.2e-8) (not (<= t1 4.2e+86)))
t_1
(* t1 (/ (/ -1.0 (+ t1 u)) (/ u v))))))))
double code(double u, double v, double t1) {
double t_1 = v / ((u * -2.0) - t1);
double tmp;
if (t1 <= -2e+37) {
tmp = t_1;
} else if (t1 <= 1.1e-84) {
tmp = (-t1 / u) / (u / v);
} else if ((t1 <= 1.2e-8) || !(t1 <= 4.2e+86)) {
tmp = t_1;
} else {
tmp = t1 * ((-1.0 / (t1 + u)) / (u / v));
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: t_1
real(8) :: tmp
t_1 = v / ((u * (-2.0d0)) - t1)
if (t1 <= (-2d+37)) then
tmp = t_1
else if (t1 <= 1.1d-84) then
tmp = (-t1 / u) / (u / v)
else if ((t1 <= 1.2d-8) .or. (.not. (t1 <= 4.2d+86))) then
tmp = t_1
else
tmp = t1 * (((-1.0d0) / (t1 + u)) / (u / v))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = v / ((u * -2.0) - t1);
double tmp;
if (t1 <= -2e+37) {
tmp = t_1;
} else if (t1 <= 1.1e-84) {
tmp = (-t1 / u) / (u / v);
} else if ((t1 <= 1.2e-8) || !(t1 <= 4.2e+86)) {
tmp = t_1;
} else {
tmp = t1 * ((-1.0 / (t1 + u)) / (u / v));
}
return tmp;
}
def code(u, v, t1): t_1 = v / ((u * -2.0) - t1) tmp = 0 if t1 <= -2e+37: tmp = t_1 elif t1 <= 1.1e-84: tmp = (-t1 / u) / (u / v) elif (t1 <= 1.2e-8) or not (t1 <= 4.2e+86): tmp = t_1 else: tmp = t1 * ((-1.0 / (t1 + u)) / (u / v)) return tmp
function code(u, v, t1) t_1 = Float64(v / Float64(Float64(u * -2.0) - t1)) tmp = 0.0 if (t1 <= -2e+37) tmp = t_1; elseif (t1 <= 1.1e-84) tmp = Float64(Float64(Float64(-t1) / u) / Float64(u / v)); elseif ((t1 <= 1.2e-8) || !(t1 <= 4.2e+86)) tmp = t_1; else tmp = Float64(t1 * Float64(Float64(-1.0 / Float64(t1 + u)) / Float64(u / v))); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = v / ((u * -2.0) - t1); tmp = 0.0; if (t1 <= -2e+37) tmp = t_1; elseif (t1 <= 1.1e-84) tmp = (-t1 / u) / (u / v); elseif ((t1 <= 1.2e-8) || ~((t1 <= 4.2e+86))) tmp = t_1; else tmp = t1 * ((-1.0 / (t1 + u)) / (u / v)); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -2e+37], t$95$1, If[LessEqual[t1, 1.1e-84], N[(N[((-t1) / u), $MachinePrecision] / N[(u / v), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t1, 1.2e-8], N[Not[LessEqual[t1, 4.2e+86]], $MachinePrecision]], t$95$1, N[(t1 * N[(N[(-1.0 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[(u / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{v}{u \cdot -2 - t1}\\
\mathbf{if}\;t1 \leq -2 \cdot 10^{+37}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t1 \leq 1.1 \cdot 10^{-84}:\\
\;\;\;\;\frac{\frac{-t1}{u}}{\frac{u}{v}}\\
\mathbf{elif}\;t1 \leq 1.2 \cdot 10^{-8} \lor \neg \left(t1 \leq 4.2 \cdot 10^{+86}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t1 \cdot \frac{\frac{-1}{t1 + u}}{\frac{u}{v}}\\
\end{array}
\end{array}
if t1 < -1.99999999999999991e37 or 1.0999999999999999e-84 < t1 < 1.19999999999999999e-8 or 4.1999999999999998e86 < t1 Initial program 67.3%
distribute-lft-neg-out67.3%
*-commutative67.3%
distribute-lft-neg-out67.3%
associate-*l/66.6%
*-commutative66.6%
Simplified66.6%
associate-*r/67.3%
distribute-rgt-neg-in67.3%
distribute-lft-neg-out67.3%
associate-/r*81.2%
*-commutative81.2%
associate-/l*100.0%
associate-/l/98.5%
Applied egg-rr98.5%
Taylor expanded in t1 around inf 92.3%
mul-1-neg92.3%
unsub-neg92.3%
*-commutative92.3%
Simplified92.3%
if -1.99999999999999991e37 < t1 < 1.0999999999999999e-84Initial program 79.8%
distribute-lft-neg-out79.8%
*-commutative79.8%
distribute-lft-neg-out79.8%
associate-*l/76.1%
*-commutative76.1%
Simplified76.1%
clear-num76.1%
un-div-inv78.6%
neg-mul-178.6%
times-frac83.8%
associate-/r*93.7%
div-inv93.7%
metadata-eval93.7%
*-commutative93.7%
neg-mul-193.7%
+-commutative93.7%
distribute-neg-in93.7%
unsub-neg93.7%
Applied egg-rr93.7%
Taylor expanded in t1 around 0 83.5%
Taylor expanded in t1 around 0 83.5%
associate-*r/83.5%
neg-mul-183.5%
Simplified83.5%
if 1.19999999999999999e-8 < t1 < 4.1999999999999998e86Initial program 77.9%
distribute-lft-neg-out77.9%
*-commutative77.9%
distribute-lft-neg-out77.9%
associate-*l/83.6%
*-commutative83.6%
Simplified83.6%
clear-num83.5%
un-div-inv83.5%
neg-mul-183.5%
times-frac99.3%
associate-/r*99.5%
div-inv99.5%
metadata-eval99.5%
*-commutative99.5%
neg-mul-199.5%
+-commutative99.5%
distribute-neg-in99.5%
unsub-neg99.5%
Applied egg-rr99.5%
Taylor expanded in t1 around 0 72.5%
frac-2neg72.5%
div-inv72.5%
distribute-lft-neg-in72.5%
neg-mul-172.5%
times-frac72.6%
frac-2neg72.6%
remove-double-neg72.6%
metadata-eval72.6%
/-rgt-identity72.6%
sub-neg72.6%
distribute-neg-in72.6%
+-commutative72.6%
metadata-eval72.6%
frac-2neg72.6%
metadata-eval72.6%
metadata-eval72.6%
remove-double-neg72.6%
Applied egg-rr72.6%
Final simplification87.2%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ v (- (* u -2.0) t1))))
(if (<= t1 -1.52e+37)
t_1
(if (<= t1 5.8e-88)
(/ (/ (- t1) u) (/ u v))
(if (or (<= t1 1.25e-9) (not (<= t1 4.2e+86)))
t_1
(/ (/ t1 (- (- t1) u)) (/ u v)))))))
double code(double u, double v, double t1) {
double t_1 = v / ((u * -2.0) - t1);
double tmp;
if (t1 <= -1.52e+37) {
tmp = t_1;
} else if (t1 <= 5.8e-88) {
tmp = (-t1 / u) / (u / v);
} else if ((t1 <= 1.25e-9) || !(t1 <= 4.2e+86)) {
tmp = t_1;
} else {
tmp = (t1 / (-t1 - u)) / (u / v);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: t_1
real(8) :: tmp
t_1 = v / ((u * (-2.0d0)) - t1)
if (t1 <= (-1.52d+37)) then
tmp = t_1
else if (t1 <= 5.8d-88) then
tmp = (-t1 / u) / (u / v)
else if ((t1 <= 1.25d-9) .or. (.not. (t1 <= 4.2d+86))) then
tmp = t_1
else
tmp = (t1 / (-t1 - u)) / (u / v)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = v / ((u * -2.0) - t1);
double tmp;
if (t1 <= -1.52e+37) {
tmp = t_1;
} else if (t1 <= 5.8e-88) {
tmp = (-t1 / u) / (u / v);
} else if ((t1 <= 1.25e-9) || !(t1 <= 4.2e+86)) {
tmp = t_1;
} else {
tmp = (t1 / (-t1 - u)) / (u / v);
}
return tmp;
}
def code(u, v, t1): t_1 = v / ((u * -2.0) - t1) tmp = 0 if t1 <= -1.52e+37: tmp = t_1 elif t1 <= 5.8e-88: tmp = (-t1 / u) / (u / v) elif (t1 <= 1.25e-9) or not (t1 <= 4.2e+86): tmp = t_1 else: tmp = (t1 / (-t1 - u)) / (u / v) return tmp
function code(u, v, t1) t_1 = Float64(v / Float64(Float64(u * -2.0) - t1)) tmp = 0.0 if (t1 <= -1.52e+37) tmp = t_1; elseif (t1 <= 5.8e-88) tmp = Float64(Float64(Float64(-t1) / u) / Float64(u / v)); elseif ((t1 <= 1.25e-9) || !(t1 <= 4.2e+86)) tmp = t_1; else tmp = Float64(Float64(t1 / Float64(Float64(-t1) - u)) / Float64(u / v)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = v / ((u * -2.0) - t1); tmp = 0.0; if (t1 <= -1.52e+37) tmp = t_1; elseif (t1 <= 5.8e-88) tmp = (-t1 / u) / (u / v); elseif ((t1 <= 1.25e-9) || ~((t1 <= 4.2e+86))) tmp = t_1; else tmp = (t1 / (-t1 - u)) / (u / v); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -1.52e+37], t$95$1, If[LessEqual[t1, 5.8e-88], N[(N[((-t1) / u), $MachinePrecision] / N[(u / v), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t1, 1.25e-9], N[Not[LessEqual[t1, 4.2e+86]], $MachinePrecision]], t$95$1, N[(N[(t1 / N[((-t1) - u), $MachinePrecision]), $MachinePrecision] / N[(u / v), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{v}{u \cdot -2 - t1}\\
\mathbf{if}\;t1 \leq -1.52 \cdot 10^{+37}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t1 \leq 5.8 \cdot 10^{-88}:\\
\;\;\;\;\frac{\frac{-t1}{u}}{\frac{u}{v}}\\
\mathbf{elif}\;t1 \leq 1.25 \cdot 10^{-9} \lor \neg \left(t1 \leq 4.2 \cdot 10^{+86}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t1}{\left(-t1\right) - u}}{\frac{u}{v}}\\
\end{array}
\end{array}
if t1 < -1.5200000000000001e37 or 5.8000000000000003e-88 < t1 < 1.25e-9 or 4.1999999999999998e86 < t1 Initial program 67.3%
distribute-lft-neg-out67.3%
*-commutative67.3%
distribute-lft-neg-out67.3%
associate-*l/66.6%
*-commutative66.6%
Simplified66.6%
associate-*r/67.3%
distribute-rgt-neg-in67.3%
distribute-lft-neg-out67.3%
associate-/r*81.2%
*-commutative81.2%
associate-/l*100.0%
associate-/l/98.5%
Applied egg-rr98.5%
Taylor expanded in t1 around inf 92.3%
mul-1-neg92.3%
unsub-neg92.3%
*-commutative92.3%
Simplified92.3%
if -1.5200000000000001e37 < t1 < 5.8000000000000003e-88Initial program 79.8%
distribute-lft-neg-out79.8%
*-commutative79.8%
distribute-lft-neg-out79.8%
associate-*l/76.1%
*-commutative76.1%
Simplified76.1%
clear-num76.1%
un-div-inv78.6%
neg-mul-178.6%
times-frac83.8%
associate-/r*93.7%
div-inv93.7%
metadata-eval93.7%
*-commutative93.7%
neg-mul-193.7%
+-commutative93.7%
distribute-neg-in93.7%
unsub-neg93.7%
Applied egg-rr93.7%
Taylor expanded in t1 around 0 83.5%
Taylor expanded in t1 around 0 83.5%
associate-*r/83.5%
neg-mul-183.5%
Simplified83.5%
if 1.25e-9 < t1 < 4.1999999999999998e86Initial program 77.9%
distribute-lft-neg-out77.9%
*-commutative77.9%
distribute-lft-neg-out77.9%
associate-*l/83.6%
*-commutative83.6%
Simplified83.6%
clear-num83.5%
un-div-inv83.5%
neg-mul-183.5%
times-frac99.3%
associate-/r*99.5%
div-inv99.5%
metadata-eval99.5%
*-commutative99.5%
neg-mul-199.5%
+-commutative99.5%
distribute-neg-in99.5%
unsub-neg99.5%
Applied egg-rr99.5%
Taylor expanded in t1 around 0 72.5%
Final simplification87.2%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ v (- (* u -2.0) t1))))
(if (<= t1 -1.22e+37)
t_1
(if (<= t1 2.05e-162)
(* v (/ (/ t1 u) (- (- t1) u)))
(if (<= t1 3.2e+75) (* t1 (/ (- v) (* (+ t1 u) (+ t1 u)))) t_1)))))
double code(double u, double v, double t1) {
double t_1 = v / ((u * -2.0) - t1);
double tmp;
if (t1 <= -1.22e+37) {
tmp = t_1;
} else if (t1 <= 2.05e-162) {
tmp = v * ((t1 / u) / (-t1 - u));
} else if (t1 <= 3.2e+75) {
tmp = t1 * (-v / ((t1 + u) * (t1 + u)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: t_1
real(8) :: tmp
t_1 = v / ((u * (-2.0d0)) - t1)
if (t1 <= (-1.22d+37)) then
tmp = t_1
else if (t1 <= 2.05d-162) then
tmp = v * ((t1 / u) / (-t1 - u))
else if (t1 <= 3.2d+75) then
tmp = t1 * (-v / ((t1 + u) * (t1 + u)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = v / ((u * -2.0) - t1);
double tmp;
if (t1 <= -1.22e+37) {
tmp = t_1;
} else if (t1 <= 2.05e-162) {
tmp = v * ((t1 / u) / (-t1 - u));
} else if (t1 <= 3.2e+75) {
tmp = t1 * (-v / ((t1 + u) * (t1 + u)));
} else {
tmp = t_1;
}
return tmp;
}
def code(u, v, t1): t_1 = v / ((u * -2.0) - t1) tmp = 0 if t1 <= -1.22e+37: tmp = t_1 elif t1 <= 2.05e-162: tmp = v * ((t1 / u) / (-t1 - u)) elif t1 <= 3.2e+75: tmp = t1 * (-v / ((t1 + u) * (t1 + u))) else: tmp = t_1 return tmp
function code(u, v, t1) t_1 = Float64(v / Float64(Float64(u * -2.0) - t1)) tmp = 0.0 if (t1 <= -1.22e+37) tmp = t_1; elseif (t1 <= 2.05e-162) tmp = Float64(v * Float64(Float64(t1 / u) / Float64(Float64(-t1) - u))); elseif (t1 <= 3.2e+75) tmp = Float64(t1 * Float64(Float64(-v) / Float64(Float64(t1 + u) * Float64(t1 + u)))); else tmp = t_1; end return tmp end
function tmp_2 = code(u, v, t1) t_1 = v / ((u * -2.0) - t1); tmp = 0.0; if (t1 <= -1.22e+37) tmp = t_1; elseif (t1 <= 2.05e-162) tmp = v * ((t1 / u) / (-t1 - u)); elseif (t1 <= 3.2e+75) tmp = t1 * (-v / ((t1 + u) * (t1 + u))); else tmp = t_1; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -1.22e+37], t$95$1, If[LessEqual[t1, 2.05e-162], N[(v * N[(N[(t1 / u), $MachinePrecision] / N[((-t1) - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 3.2e+75], N[(t1 * N[((-v) / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{v}{u \cdot -2 - t1}\\
\mathbf{if}\;t1 \leq -1.22 \cdot 10^{+37}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t1 \leq 2.05 \cdot 10^{-162}:\\
\;\;\;\;v \cdot \frac{\frac{t1}{u}}{\left(-t1\right) - u}\\
\mathbf{elif}\;t1 \leq 3.2 \cdot 10^{+75}:\\
\;\;\;\;t1 \cdot \frac{-v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t1 < -1.22e37 or 3.19999999999999985e75 < t1 Initial program 62.6%
distribute-lft-neg-out62.6%
*-commutative62.6%
distribute-lft-neg-out62.6%
associate-*l/61.8%
*-commutative61.8%
Simplified61.8%
associate-*r/62.6%
distribute-rgt-neg-in62.6%
distribute-lft-neg-out62.6%
associate-/r*78.2%
*-commutative78.2%
associate-/l*100.0%
associate-/l/97.5%
Applied egg-rr97.5%
Taylor expanded in t1 around inf 92.8%
mul-1-neg92.8%
unsub-neg92.8%
*-commutative92.8%
Simplified92.8%
if -1.22e37 < t1 < 2.0500000000000001e-162Initial program 78.8%
sqr-neg78.8%
times-frac91.9%
frac-2neg91.9%
associate-*r/92.4%
associate-/l*92.9%
associate-/r/93.8%
+-commutative93.8%
distribute-neg-in93.8%
unsub-neg93.8%
Applied egg-rr93.8%
Taylor expanded in t1 around 0 84.0%
if 2.0500000000000001e-162 < t1 < 3.19999999999999985e75Initial program 89.0%
distribute-lft-neg-out89.0%
*-commutative89.0%
distribute-lft-neg-out89.0%
associate-*l/91.5%
*-commutative91.5%
Simplified91.5%
Final simplification89.3%
(FPCore (u v t1)
:precision binary64
(if (or (<= t1 -1.22e+37)
(and (not (<= t1 1e-84)) (or (<= t1 1.25e-9) (not (<= t1 4.2e+86)))))
(/ v (- (* u -2.0) t1))
(* (/ t1 u) (/ (- v) u))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.22e+37) || (!(t1 <= 1e-84) && ((t1 <= 1.25e-9) || !(t1 <= 4.2e+86)))) {
tmp = v / ((u * -2.0) - t1);
} else {
tmp = (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 <= (-1.22d+37)) .or. (.not. (t1 <= 1d-84)) .and. (t1 <= 1.25d-9) .or. (.not. (t1 <= 4.2d+86))) then
tmp = v / ((u * (-2.0d0)) - t1)
else
tmp = (t1 / u) * (-v / u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.22e+37) || (!(t1 <= 1e-84) && ((t1 <= 1.25e-9) || !(t1 <= 4.2e+86)))) {
tmp = v / ((u * -2.0) - t1);
} else {
tmp = (t1 / u) * (-v / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.22e+37) or (not (t1 <= 1e-84) and ((t1 <= 1.25e-9) or not (t1 <= 4.2e+86))): tmp = v / ((u * -2.0) - t1) else: tmp = (t1 / u) * (-v / u) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.22e+37) || (!(t1 <= 1e-84) && ((t1 <= 1.25e-9) || !(t1 <= 4.2e+86)))) tmp = Float64(v / Float64(Float64(u * -2.0) - t1)); else tmp = Float64(Float64(t1 / u) * Float64(Float64(-v) / u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -1.22e+37) || (~((t1 <= 1e-84)) && ((t1 <= 1.25e-9) || ~((t1 <= 4.2e+86))))) tmp = v / ((u * -2.0) - t1); else tmp = (t1 / u) * (-v / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.22e+37], And[N[Not[LessEqual[t1, 1e-84]], $MachinePrecision], Or[LessEqual[t1, 1.25e-9], N[Not[LessEqual[t1, 4.2e+86]], $MachinePrecision]]]], N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision], N[(N[(t1 / u), $MachinePrecision] * N[((-v) / u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.22 \cdot 10^{+37} \lor \neg \left(t1 \leq 10^{-84}\right) \land \left(t1 \leq 1.25 \cdot 10^{-9} \lor \neg \left(t1 \leq 4.2 \cdot 10^{+86}\right)\right):\\
\;\;\;\;\frac{v}{u \cdot -2 - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{u} \cdot \frac{-v}{u}\\
\end{array}
\end{array}
if t1 < -1.22e37 or 1e-84 < t1 < 1.25e-9 or 4.1999999999999998e86 < t1 Initial program 67.3%
distribute-lft-neg-out67.3%
*-commutative67.3%
distribute-lft-neg-out67.3%
associate-*l/66.6%
*-commutative66.6%
Simplified66.6%
associate-*r/67.3%
distribute-rgt-neg-in67.3%
distribute-lft-neg-out67.3%
associate-/r*81.2%
*-commutative81.2%
associate-/l*100.0%
associate-/l/98.5%
Applied egg-rr98.5%
Taylor expanded in t1 around inf 92.3%
mul-1-neg92.3%
unsub-neg92.3%
*-commutative92.3%
Simplified92.3%
if -1.22e37 < t1 < 1e-84 or 1.25e-9 < t1 < 4.1999999999999998e86Initial program 79.6%
distribute-lft-neg-out79.6%
*-commutative79.6%
distribute-lft-neg-out79.6%
associate-*l/77.1%
*-commutative77.1%
Simplified77.1%
associate-*r/79.6%
distribute-rgt-neg-in79.6%
distribute-lft-neg-out79.6%
associate-/r*85.8%
*-commutative85.8%
associate-/l*94.3%
associate-/l/91.6%
Applied egg-rr91.6%
Taylor expanded in t1 around 0 72.2%
*-commutative72.2%
unpow272.2%
associate-*r/72.2%
neg-mul-172.2%
distribute-rgt-neg-in72.2%
times-frac81.2%
Simplified81.2%
Final simplification86.9%
(FPCore (u v t1)
:precision binary64
(if (or (<= t1 -1.5e+39)
(and (not (<= t1 1e-85)) (or (<= t1 4.5e-9) (not (<= t1 4.2e+86)))))
(/ v (- (* u -2.0) t1))
(/ (/ (- t1) u) (/ u v))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.5e+39) || (!(t1 <= 1e-85) && ((t1 <= 4.5e-9) || !(t1 <= 4.2e+86)))) {
tmp = v / ((u * -2.0) - t1);
} else {
tmp = (-t1 / u) / (u / v);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-1.5d+39)) .or. (.not. (t1 <= 1d-85)) .and. (t1 <= 4.5d-9) .or. (.not. (t1 <= 4.2d+86))) then
tmp = v / ((u * (-2.0d0)) - t1)
else
tmp = (-t1 / u) / (u / v)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.5e+39) || (!(t1 <= 1e-85) && ((t1 <= 4.5e-9) || !(t1 <= 4.2e+86)))) {
tmp = v / ((u * -2.0) - t1);
} else {
tmp = (-t1 / u) / (u / v);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.5e+39) or (not (t1 <= 1e-85) and ((t1 <= 4.5e-9) or not (t1 <= 4.2e+86))): tmp = v / ((u * -2.0) - t1) else: tmp = (-t1 / u) / (u / v) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.5e+39) || (!(t1 <= 1e-85) && ((t1 <= 4.5e-9) || !(t1 <= 4.2e+86)))) tmp = Float64(v / Float64(Float64(u * -2.0) - t1)); else tmp = Float64(Float64(Float64(-t1) / u) / Float64(u / v)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -1.5e+39) || (~((t1 <= 1e-85)) && ((t1 <= 4.5e-9) || ~((t1 <= 4.2e+86))))) tmp = v / ((u * -2.0) - t1); else tmp = (-t1 / u) / (u / v); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.5e+39], And[N[Not[LessEqual[t1, 1e-85]], $MachinePrecision], Or[LessEqual[t1, 4.5e-9], N[Not[LessEqual[t1, 4.2e+86]], $MachinePrecision]]]], N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision], N[(N[((-t1) / u), $MachinePrecision] / N[(u / v), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.5 \cdot 10^{+39} \lor \neg \left(t1 \leq 10^{-85}\right) \land \left(t1 \leq 4.5 \cdot 10^{-9} \lor \neg \left(t1 \leq 4.2 \cdot 10^{+86}\right)\right):\\
\;\;\;\;\frac{v}{u \cdot -2 - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{-t1}{u}}{\frac{u}{v}}\\
\end{array}
\end{array}
if t1 < -1.5e39 or 9.9999999999999998e-86 < t1 < 4.49999999999999976e-9 or 4.1999999999999998e86 < t1 Initial program 67.3%
distribute-lft-neg-out67.3%
*-commutative67.3%
distribute-lft-neg-out67.3%
associate-*l/66.6%
*-commutative66.6%
Simplified66.6%
associate-*r/67.3%
distribute-rgt-neg-in67.3%
distribute-lft-neg-out67.3%
associate-/r*81.2%
*-commutative81.2%
associate-/l*100.0%
associate-/l/98.5%
Applied egg-rr98.5%
Taylor expanded in t1 around inf 92.3%
mul-1-neg92.3%
unsub-neg92.3%
*-commutative92.3%
Simplified92.3%
if -1.5e39 < t1 < 9.9999999999999998e-86 or 4.49999999999999976e-9 < t1 < 4.1999999999999998e86Initial program 79.6%
distribute-lft-neg-out79.6%
*-commutative79.6%
distribute-lft-neg-out79.6%
associate-*l/77.1%
*-commutative77.1%
Simplified77.1%
clear-num77.1%
un-div-inv79.3%
neg-mul-179.3%
times-frac86.0%
associate-/r*94.6%
div-inv94.6%
metadata-eval94.6%
*-commutative94.6%
neg-mul-194.6%
+-commutative94.6%
distribute-neg-in94.6%
unsub-neg94.6%
Applied egg-rr94.6%
Taylor expanded in t1 around 0 81.9%
Taylor expanded in t1 around 0 81.9%
associate-*r/81.9%
neg-mul-181.9%
Simplified81.9%
Final simplification87.2%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ v (- (* u -2.0) t1))))
(if (<= t1 -1.22e+37)
t_1
(if (<= t1 1e-85)
(* (/ t1 u) (/ (- v) u))
(if (or (<= t1 4.6e-10) (not (<= t1 4.2e+86)))
t_1
(/ (- t1) (* u (/ u v))))))))
double code(double u, double v, double t1) {
double t_1 = v / ((u * -2.0) - t1);
double tmp;
if (t1 <= -1.22e+37) {
tmp = t_1;
} else if (t1 <= 1e-85) {
tmp = (t1 / u) * (-v / u);
} else if ((t1 <= 4.6e-10) || !(t1 <= 4.2e+86)) {
tmp = t_1;
} else {
tmp = -t1 / (u * (u / v));
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: t_1
real(8) :: tmp
t_1 = v / ((u * (-2.0d0)) - t1)
if (t1 <= (-1.22d+37)) then
tmp = t_1
else if (t1 <= 1d-85) then
tmp = (t1 / u) * (-v / u)
else if ((t1 <= 4.6d-10) .or. (.not. (t1 <= 4.2d+86))) then
tmp = t_1
else
tmp = -t1 / (u * (u / v))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = v / ((u * -2.0) - t1);
double tmp;
if (t1 <= -1.22e+37) {
tmp = t_1;
} else if (t1 <= 1e-85) {
tmp = (t1 / u) * (-v / u);
} else if ((t1 <= 4.6e-10) || !(t1 <= 4.2e+86)) {
tmp = t_1;
} else {
tmp = -t1 / (u * (u / v));
}
return tmp;
}
def code(u, v, t1): t_1 = v / ((u * -2.0) - t1) tmp = 0 if t1 <= -1.22e+37: tmp = t_1 elif t1 <= 1e-85: tmp = (t1 / u) * (-v / u) elif (t1 <= 4.6e-10) or not (t1 <= 4.2e+86): tmp = t_1 else: tmp = -t1 / (u * (u / v)) return tmp
function code(u, v, t1) t_1 = Float64(v / Float64(Float64(u * -2.0) - t1)) tmp = 0.0 if (t1 <= -1.22e+37) tmp = t_1; elseif (t1 <= 1e-85) tmp = Float64(Float64(t1 / u) * Float64(Float64(-v) / u)); elseif ((t1 <= 4.6e-10) || !(t1 <= 4.2e+86)) tmp = t_1; else tmp = Float64(Float64(-t1) / Float64(u * Float64(u / v))); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = v / ((u * -2.0) - t1); tmp = 0.0; if (t1 <= -1.22e+37) tmp = t_1; elseif (t1 <= 1e-85) tmp = (t1 / u) * (-v / u); elseif ((t1 <= 4.6e-10) || ~((t1 <= 4.2e+86))) tmp = t_1; else tmp = -t1 / (u * (u / v)); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -1.22e+37], t$95$1, If[LessEqual[t1, 1e-85], N[(N[(t1 / u), $MachinePrecision] * N[((-v) / u), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t1, 4.6e-10], N[Not[LessEqual[t1, 4.2e+86]], $MachinePrecision]], t$95$1, N[((-t1) / N[(u * N[(u / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{v}{u \cdot -2 - t1}\\
\mathbf{if}\;t1 \leq -1.22 \cdot 10^{+37}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t1 \leq 10^{-85}:\\
\;\;\;\;\frac{t1}{u} \cdot \frac{-v}{u}\\
\mathbf{elif}\;t1 \leq 4.6 \cdot 10^{-10} \lor \neg \left(t1 \leq 4.2 \cdot 10^{+86}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{-t1}{u \cdot \frac{u}{v}}\\
\end{array}
\end{array}
if t1 < -1.22e37 or 9.9999999999999998e-86 < t1 < 4.60000000000000014e-10 or 4.1999999999999998e86 < t1 Initial program 67.3%
distribute-lft-neg-out67.3%
*-commutative67.3%
distribute-lft-neg-out67.3%
associate-*l/66.6%
*-commutative66.6%
Simplified66.6%
associate-*r/67.3%
distribute-rgt-neg-in67.3%
distribute-lft-neg-out67.3%
associate-/r*81.2%
*-commutative81.2%
associate-/l*100.0%
associate-/l/98.5%
Applied egg-rr98.5%
Taylor expanded in t1 around inf 92.3%
mul-1-neg92.3%
unsub-neg92.3%
*-commutative92.3%
Simplified92.3%
if -1.22e37 < t1 < 9.9999999999999998e-86Initial program 79.8%
distribute-lft-neg-out79.8%
*-commutative79.8%
distribute-lft-neg-out79.8%
associate-*l/76.1%
*-commutative76.1%
Simplified76.1%
associate-*r/79.8%
distribute-rgt-neg-in79.8%
distribute-lft-neg-out79.8%
associate-/r*86.2%
*-commutative86.2%
associate-/l*93.4%
associate-/l/92.0%
Applied egg-rr92.0%
Taylor expanded in t1 around 0 75.4%
*-commutative75.4%
unpow275.4%
associate-*r/75.4%
neg-mul-175.4%
distribute-rgt-neg-in75.4%
times-frac82.7%
Simplified82.7%
if 4.60000000000000014e-10 < t1 < 4.1999999999999998e86Initial program 77.9%
distribute-lft-neg-out77.9%
*-commutative77.9%
distribute-lft-neg-out77.9%
associate-*l/83.6%
*-commutative83.6%
Simplified83.6%
associate-/r*99.6%
associate-*r/99.5%
remove-double-neg99.5%
frac-2neg99.5%
+-commutative99.5%
distribute-neg-in99.5%
unsub-neg99.5%
Applied egg-rr99.5%
associate-*r/83.6%
frac-2neg83.6%
distribute-lft-neg-out83.6%
sub-neg83.6%
distribute-neg-in83.6%
+-commutative83.6%
remove-double-neg83.6%
associate-*r/99.5%
clear-num99.3%
div-inv99.4%
associate-/r*99.5%
associate-*r/99.7%
associate-*r/99.7%
*-rgt-identity99.7%
frac-2neg99.7%
remove-double-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
sub-neg99.7%
frac-2neg99.7%
Applied egg-rr99.7%
associate-/l/99.3%
Simplified99.3%
Taylor expanded in t1 around 0 53.3%
mul-1-neg53.3%
associate-/l*56.5%
unpow256.5%
associate-*r/72.4%
distribute-frac-neg72.4%
Simplified72.4%
Final simplification86.9%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (* t1 (/ (- v) (* u u)))) (t_2 (/ v (- (* u -2.0) t1))))
(if (<= t1 -1.52e+37)
t_2
(if (<= t1 1.15e-87)
t_1
(if (<= t1 1.6e-8)
t_2
(if (<= t1 18.5) t_1 (/ -1.0 (/ (+ t1 u) v))))))))
double code(double u, double v, double t1) {
double t_1 = t1 * (-v / (u * u));
double t_2 = v / ((u * -2.0) - t1);
double tmp;
if (t1 <= -1.52e+37) {
tmp = t_2;
} else if (t1 <= 1.15e-87) {
tmp = t_1;
} else if (t1 <= 1.6e-8) {
tmp = t_2;
} else if (t1 <= 18.5) {
tmp = t_1;
} else {
tmp = -1.0 / ((t1 + u) / v);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t1 * (-v / (u * u))
t_2 = v / ((u * (-2.0d0)) - t1)
if (t1 <= (-1.52d+37)) then
tmp = t_2
else if (t1 <= 1.15d-87) then
tmp = t_1
else if (t1 <= 1.6d-8) then
tmp = t_2
else if (t1 <= 18.5d0) then
tmp = t_1
else
tmp = (-1.0d0) / ((t1 + u) / v)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = t1 * (-v / (u * u));
double t_2 = v / ((u * -2.0) - t1);
double tmp;
if (t1 <= -1.52e+37) {
tmp = t_2;
} else if (t1 <= 1.15e-87) {
tmp = t_1;
} else if (t1 <= 1.6e-8) {
tmp = t_2;
} else if (t1 <= 18.5) {
tmp = t_1;
} else {
tmp = -1.0 / ((t1 + u) / v);
}
return tmp;
}
def code(u, v, t1): t_1 = t1 * (-v / (u * u)) t_2 = v / ((u * -2.0) - t1) tmp = 0 if t1 <= -1.52e+37: tmp = t_2 elif t1 <= 1.15e-87: tmp = t_1 elif t1 <= 1.6e-8: tmp = t_2 elif t1 <= 18.5: tmp = t_1 else: tmp = -1.0 / ((t1 + u) / v) return tmp
function code(u, v, t1) t_1 = Float64(t1 * Float64(Float64(-v) / Float64(u * u))) t_2 = Float64(v / Float64(Float64(u * -2.0) - t1)) tmp = 0.0 if (t1 <= -1.52e+37) tmp = t_2; elseif (t1 <= 1.15e-87) tmp = t_1; elseif (t1 <= 1.6e-8) tmp = t_2; elseif (t1 <= 18.5) tmp = t_1; else tmp = Float64(-1.0 / Float64(Float64(t1 + u) / v)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = t1 * (-v / (u * u)); t_2 = v / ((u * -2.0) - t1); tmp = 0.0; if (t1 <= -1.52e+37) tmp = t_2; elseif (t1 <= 1.15e-87) tmp = t_1; elseif (t1 <= 1.6e-8) tmp = t_2; elseif (t1 <= 18.5) tmp = t_1; else tmp = -1.0 / ((t1 + u) / v); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(t1 * N[((-v) / N[(u * u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -1.52e+37], t$95$2, If[LessEqual[t1, 1.15e-87], t$95$1, If[LessEqual[t1, 1.6e-8], t$95$2, If[LessEqual[t1, 18.5], t$95$1, N[(-1.0 / N[(N[(t1 + u), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t1 \cdot \frac{-v}{u \cdot u}\\
t_2 := \frac{v}{u \cdot -2 - t1}\\
\mathbf{if}\;t1 \leq -1.52 \cdot 10^{+37}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t1 \leq 1.15 \cdot 10^{-87}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t1 \leq 1.6 \cdot 10^{-8}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t1 \leq 18.5:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\frac{t1 + u}{v}}\\
\end{array}
\end{array}
if t1 < -1.5200000000000001e37 or 1.1500000000000001e-87 < t1 < 1.6000000000000001e-8Initial program 72.9%
distribute-lft-neg-out72.9%
*-commutative72.9%
distribute-lft-neg-out72.9%
associate-*l/70.7%
*-commutative70.7%
Simplified70.7%
associate-*r/72.9%
distribute-rgt-neg-in72.9%
distribute-lft-neg-out72.9%
associate-/r*86.7%
*-commutative86.7%
associate-/l*100.0%
associate-/l/97.8%
Applied egg-rr97.8%
Taylor expanded in t1 around inf 90.9%
mul-1-neg90.9%
unsub-neg90.9%
*-commutative90.9%
Simplified90.9%
if -1.5200000000000001e37 < t1 < 1.1500000000000001e-87 or 1.6000000000000001e-8 < t1 < 18.5Initial program 80.7%
distribute-lft-neg-out80.7%
*-commutative80.7%
distribute-lft-neg-out80.7%
associate-*l/77.1%
*-commutative77.1%
Simplified77.1%
Taylor expanded in t1 around 0 72.0%
unpow272.0%
associate-*r/72.0%
neg-mul-172.0%
Simplified72.0%
if 18.5 < t1 Initial program 58.6%
distribute-lft-neg-out58.6%
*-commutative58.6%
distribute-lft-neg-out58.6%
associate-*l/62.4%
*-commutative62.4%
Simplified62.4%
clear-num61.2%
un-div-inv61.3%
neg-mul-161.3%
times-frac80.7%
associate-/r*99.6%
div-inv99.6%
metadata-eval99.6%
*-commutative99.6%
neg-mul-199.6%
+-commutative99.6%
distribute-neg-in99.6%
unsub-neg99.6%
Applied egg-rr99.6%
Taylor expanded in t1 around inf 84.0%
Final simplification81.1%
(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.3%
distribute-lft-neg-out73.3%
*-commutative73.3%
distribute-lft-neg-out73.3%
times-frac97.0%
Simplified97.0%
Final simplification97.0%
(FPCore (u v t1) :precision binary64 (if (or (<= u -8.6e+135) (not (<= u 4.5e+221))) (* (/ t1 u) (/ v u)) (/ (- v) (+ t1 u))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -8.6e+135) || !(u <= 4.5e+221)) {
tmp = (t1 / u) * (v / u);
} else {
tmp = -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 <= (-8.6d+135)) .or. (.not. (u <= 4.5d+221))) then
tmp = (t1 / u) * (v / u)
else
tmp = -v / (t1 + u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -8.6e+135) || !(u <= 4.5e+221)) {
tmp = (t1 / u) * (v / u);
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -8.6e+135) or not (u <= 4.5e+221): tmp = (t1 / u) * (v / u) else: tmp = -v / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -8.6e+135) || !(u <= 4.5e+221)) tmp = Float64(Float64(t1 / u) * Float64(v / u)); else tmp = Float64(Float64(-v) / Float64(t1 + u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -8.6e+135) || ~((u <= 4.5e+221))) tmp = (t1 / u) * (v / u); else tmp = -v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -8.6e+135], N[Not[LessEqual[u, 4.5e+221]], $MachinePrecision]], N[(N[(t1 / u), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -8.6 \cdot 10^{+135} \lor \neg \left(u \leq 4.5 \cdot 10^{+221}\right):\\
\;\;\;\;\frac{t1}{u} \cdot \frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\end{array}
\end{array}
if u < -8.59999999999999945e135 or 4.5000000000000002e221 < u Initial program 82.3%
distribute-lft-neg-out82.3%
*-commutative82.3%
distribute-lft-neg-out82.3%
associate-*l/82.8%
*-commutative82.8%
Simplified82.8%
Taylor expanded in t1 around 0 82.8%
unpow282.8%
associate-*r/82.8%
neg-mul-182.8%
Simplified82.8%
Applied egg-rr76.8%
associate-*r/77.1%
associate-/l*76.8%
associate-/r/75.0%
*-commutative75.0%
Applied egg-rr75.0%
if -8.59999999999999945e135 < u < 4.5000000000000002e221Initial program 71.2%
distribute-lft-neg-out71.2%
*-commutative71.2%
distribute-lft-neg-out71.2%
associate-*l/69.1%
*-commutative69.1%
Simplified69.1%
associate-/r*77.1%
associate-*r/96.4%
remove-double-neg96.4%
frac-2neg96.4%
+-commutative96.4%
distribute-neg-in96.4%
unsub-neg96.4%
Applied egg-rr96.4%
Taylor expanded in t1 around inf 65.5%
mul-1-neg65.5%
Simplified65.5%
Final simplification67.4%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.75e+78) (not (<= u 2.15e+83))) (/ t1 (* u (/ u v))) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.75e+78) || !(u <= 2.15e+83)) {
tmp = t1 / (u * (u / v));
} else {
tmp = -v / t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-1.75d+78)) .or. (.not. (u <= 2.15d+83))) then
tmp = t1 / (u * (u / v))
else
tmp = -v / t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.75e+78) || !(u <= 2.15e+83)) {
tmp = t1 / (u * (u / v));
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.75e+78) or not (u <= 2.15e+83): tmp = t1 / (u * (u / v)) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.75e+78) || !(u <= 2.15e+83)) tmp = Float64(t1 / Float64(u * Float64(u / v))); else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -1.75e+78) || ~((u <= 2.15e+83))) tmp = t1 / (u * (u / v)); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.75e+78], N[Not[LessEqual[u, 2.15e+83]], $MachinePrecision]], N[(t1 / N[(u * N[(u / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.75 \cdot 10^{+78} \lor \neg \left(u \leq 2.15 \cdot 10^{+83}\right):\\
\;\;\;\;\frac{t1}{u \cdot \frac{u}{v}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -1.7500000000000001e78 or 2.15e83 < u Initial program 79.5%
distribute-lft-neg-out79.5%
*-commutative79.5%
distribute-lft-neg-out79.5%
associate-*l/80.1%
*-commutative80.1%
Simplified80.1%
Taylor expanded in t1 around 0 79.1%
unpow279.1%
associate-*r/79.1%
neg-mul-179.1%
Simplified79.1%
Applied egg-rr69.3%
if -1.7500000000000001e78 < u < 2.15e83Initial program 69.9%
distribute-lft-neg-out69.9%
*-commutative69.9%
distribute-lft-neg-out69.9%
associate-*l/67.2%
*-commutative67.2%
Simplified67.2%
Taylor expanded in t1 around inf 68.3%
associate-*r/68.3%
neg-mul-168.3%
Simplified68.3%
Final simplification68.6%
(FPCore (u v t1) :precision binary64 (if (<= u -6.5e+83) (/ v u) (if (<= u 4.5e+221) (/ (- v) t1) (/ v u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -6.5e+83) {
tmp = v / u;
} else if (u <= 4.5e+221) {
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 <= (-6.5d+83)) then
tmp = v / u
else if (u <= 4.5d+221) 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 <= -6.5e+83) {
tmp = v / u;
} else if (u <= 4.5e+221) {
tmp = -v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -6.5e+83: tmp = v / u elif u <= 4.5e+221: tmp = -v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -6.5e+83) tmp = Float64(v / u); elseif (u <= 4.5e+221) tmp = Float64(Float64(-v) / t1); else tmp = Float64(v / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -6.5e+83) tmp = v / u; elseif (u <= 4.5e+221) tmp = -v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -6.5e+83], N[(v / u), $MachinePrecision], If[LessEqual[u, 4.5e+221], N[((-v) / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -6.5 \cdot 10^{+83}:\\
\;\;\;\;\frac{v}{u}\\
\mathbf{elif}\;u \leq 4.5 \cdot 10^{+221}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if u < -6.5000000000000003e83 or 4.5000000000000002e221 < u Initial program 83.0%
distribute-lft-neg-out83.0%
*-commutative83.0%
distribute-lft-neg-out83.0%
times-frac96.6%
Simplified96.6%
Taylor expanded in t1 around 0 90.0%
Applied egg-rr73.6%
Taylor expanded in t1 around inf 45.3%
if -6.5000000000000003e83 < u < 4.5000000000000002e221Initial program 70.5%
distribute-lft-neg-out70.5%
*-commutative70.5%
distribute-lft-neg-out70.5%
associate-*l/68.3%
*-commutative68.3%
Simplified68.3%
Taylor expanded in t1 around inf 64.6%
associate-*r/64.6%
neg-mul-164.6%
Simplified64.6%
Final simplification60.2%
(FPCore (u v t1) :precision binary64 (if (<= u -4.8e+156) (/ -1.0 (/ u v)) (if (<= u 2.5e+223) (/ (- v) t1) (/ v u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -4.8e+156) {
tmp = -1.0 / (u / v);
} else if (u <= 2.5e+223) {
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.8d+156)) then
tmp = (-1.0d0) / (u / v)
else if (u <= 2.5d+223) 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.8e+156) {
tmp = -1.0 / (u / v);
} else if (u <= 2.5e+223) {
tmp = -v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -4.8e+156: tmp = -1.0 / (u / v) elif u <= 2.5e+223: tmp = -v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -4.8e+156) tmp = Float64(-1.0 / Float64(u / v)); elseif (u <= 2.5e+223) tmp = Float64(Float64(-v) / t1); else tmp = Float64(v / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -4.8e+156) tmp = -1.0 / (u / v); elseif (u <= 2.5e+223) tmp = -v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -4.8e+156], N[(-1.0 / N[(u / v), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 2.5e+223], N[((-v) / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -4.8 \cdot 10^{+156}:\\
\;\;\;\;\frac{-1}{\frac{u}{v}}\\
\mathbf{elif}\;u \leq 2.5 \cdot 10^{+223}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if u < -4.8000000000000002e156Initial program 82.9%
distribute-lft-neg-out82.9%
*-commutative82.9%
distribute-lft-neg-out82.9%
associate-*l/83.2%
*-commutative83.2%
Simplified83.2%
clear-num83.2%
un-div-inv83.2%
neg-mul-183.2%
times-frac94.5%
associate-/r*99.9%
div-inv99.9%
metadata-eval99.9%
*-commutative99.9%
neg-mul-199.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Applied egg-rr99.9%
Taylor expanded in t1 around 0 91.6%
Taylor expanded in t1 around inf 56.0%
if -4.8000000000000002e156 < u < 2.49999999999999992e223Initial program 71.2%
distribute-lft-neg-out71.2%
*-commutative71.2%
distribute-lft-neg-out71.2%
associate-*l/69.2%
*-commutative69.2%
Simplified69.2%
Taylor expanded in t1 around inf 62.0%
associate-*r/62.0%
neg-mul-162.0%
Simplified62.0%
if 2.49999999999999992e223 < u Initial program 83.3%
distribute-lft-neg-out83.3%
*-commutative83.3%
distribute-lft-neg-out83.3%
times-frac99.9%
Simplified99.9%
Taylor expanded in t1 around 0 99.9%
Applied egg-rr83.8%
Taylor expanded in t1 around inf 44.7%
Final simplification60.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(Float64(-v) / Float64(t1 + u)) end
function tmp = code(u, v, t1) tmp = -v / (t1 + u); end
code[u_, v_, t1_] := N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{-v}{t1 + u}
\end{array}
Initial program 73.3%
distribute-lft-neg-out73.3%
*-commutative73.3%
distribute-lft-neg-out73.3%
associate-*l/71.8%
*-commutative71.8%
Simplified71.8%
associate-/r*80.5%
associate-*r/97.1%
remove-double-neg97.1%
frac-2neg97.1%
+-commutative97.1%
distribute-neg-in97.1%
unsub-neg97.1%
Applied egg-rr97.1%
Taylor expanded in t1 around inf 63.1%
mul-1-neg63.1%
Simplified63.1%
Final simplification63.1%
(FPCore (u v t1) :precision binary64 (/ v u))
double code(double u, double v, double t1) {
return v / 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 / u
end function
public static double code(double u, double v, double t1) {
return v / u;
}
def code(u, v, t1): return v / u
function code(u, v, t1) return Float64(v / u) end
function tmp = code(u, v, t1) tmp = v / u; end
code[u_, v_, t1_] := N[(v / u), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{u}
\end{array}
Initial program 73.3%
distribute-lft-neg-out73.3%
*-commutative73.3%
distribute-lft-neg-out73.3%
times-frac97.0%
Simplified97.0%
Taylor expanded in t1 around 0 57.3%
Applied egg-rr32.8%
Taylor expanded in t1 around inf 18.5%
Final simplification18.5%
herbie shell --seed 2023297
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))