
(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) (+ t1 u)) (/ v (+ t1 u))))
double code(double u, double v, double t1) {
return (-t1 / (t1 + u)) * (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 = (-t1 / (t1 + u)) * (v / (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (-t1 / (t1 + u)) * (v / (t1 + u));
}
def code(u, v, t1): return (-t1 / (t1 + u)) * (v / (t1 + u))
function code(u, v, t1) return Float64(Float64(Float64(-t1) / Float64(t1 + u)) * Float64(v / Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (-t1 / (t1 + u)) * (v / (t1 + u)); end
code[u_, v_, t1_] := N[(N[((-t1) / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{-t1}{t1 + u} \cdot \frac{v}{t1 + u}
\end{array}
Initial program 68.1%
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
(let* ((t_1 (* (/ t1 (- u)) (/ v u))))
(if (<= u -4.1e+126)
t_1
(if (<= u -8e+40)
(/ v (- (- u) t1))
(if (or (<= u -3800000000000.0) (not (<= u 1.3e+23)))
t_1
(/ v (- t1)))))))
double code(double u, double v, double t1) {
double t_1 = (t1 / -u) * (v / u);
double tmp;
if (u <= -4.1e+126) {
tmp = t_1;
} else if (u <= -8e+40) {
tmp = v / (-u - t1);
} else if ((u <= -3800000000000.0) || !(u <= 1.3e+23)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (t1 / -u) * (v / u)
if (u <= (-4.1d+126)) then
tmp = t_1
else if (u <= (-8d+40)) then
tmp = v / (-u - t1)
else if ((u <= (-3800000000000.0d0)) .or. (.not. (u <= 1.3d+23))) then
tmp = t_1
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = (t1 / -u) * (v / u);
double tmp;
if (u <= -4.1e+126) {
tmp = t_1;
} else if (u <= -8e+40) {
tmp = v / (-u - t1);
} else if ((u <= -3800000000000.0) || !(u <= 1.3e+23)) {
tmp = t_1;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): t_1 = (t1 / -u) * (v / u) tmp = 0 if u <= -4.1e+126: tmp = t_1 elif u <= -8e+40: tmp = v / (-u - t1) elif (u <= -3800000000000.0) or not (u <= 1.3e+23): tmp = t_1 else: tmp = v / -t1 return tmp
function code(u, v, t1) t_1 = Float64(Float64(t1 / Float64(-u)) * Float64(v / u)) tmp = 0.0 if (u <= -4.1e+126) tmp = t_1; elseif (u <= -8e+40) tmp = Float64(v / Float64(Float64(-u) - t1)); elseif ((u <= -3800000000000.0) || !(u <= 1.3e+23)) tmp = t_1; else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = (t1 / -u) * (v / u); tmp = 0.0; if (u <= -4.1e+126) tmp = t_1; elseif (u <= -8e+40) tmp = v / (-u - t1); elseif ((u <= -3800000000000.0) || ~((u <= 1.3e+23))) tmp = t_1; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(N[(t1 / (-u)), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[u, -4.1e+126], t$95$1, If[LessEqual[u, -8e+40], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[u, -3800000000000.0], N[Not[LessEqual[u, 1.3e+23]], $MachinePrecision]], t$95$1, N[(v / (-t1)), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t1}{-u} \cdot \frac{v}{u}\\
\mathbf{if}\;u \leq -4.1 \cdot 10^{+126}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;u \leq -8 \cdot 10^{+40}:\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{elif}\;u \leq -3800000000000 \lor \neg \left(u \leq 1.3 \cdot 10^{+23}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -4.1000000000000001e126 or -8.00000000000000024e40 < u < -3.8e12 or 1.29999999999999996e23 < u Initial program 72.2%
times-frac98.0%
distribute-frac-neg98.0%
distribute-neg-frac298.0%
+-commutative98.0%
distribute-neg-in98.0%
unsub-neg98.0%
Simplified98.0%
Taylor expanded in t1 around 0 87.8%
mul-1-neg87.8%
distribute-neg-frac287.8%
Simplified87.8%
Taylor expanded in t1 around 0 85.9%
if -4.1000000000000001e126 < u < -8.00000000000000024e40Initial program 59.2%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in t1 around inf 76.9%
if -3.8e12 < u < 1.29999999999999996e23Initial program 65.6%
associate-/l*68.3%
distribute-lft-neg-out68.3%
distribute-rgt-neg-in68.3%
associate-/r*80.5%
distribute-neg-frac280.5%
Simplified80.5%
Taylor expanded in t1 around inf 82.9%
associate-*r/82.9%
neg-mul-182.9%
Simplified82.9%
Final simplification83.9%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (* (/ t1 (- u)) (/ v u))))
(if (<= u -2.7e+122)
t_1
(if (<= u -9.6e+40)
(/ v (- (- t1) (* u 2.0)))
(if (or (<= u -410000000000.0) (not (<= u 2.3e+22)))
t_1
(/ v (- t1)))))))
double code(double u, double v, double t1) {
double t_1 = (t1 / -u) * (v / u);
double tmp;
if (u <= -2.7e+122) {
tmp = t_1;
} else if (u <= -9.6e+40) {
tmp = v / (-t1 - (u * 2.0));
} else if ((u <= -410000000000.0) || !(u <= 2.3e+22)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (t1 / -u) * (v / u)
if (u <= (-2.7d+122)) then
tmp = t_1
else if (u <= (-9.6d+40)) then
tmp = v / (-t1 - (u * 2.0d0))
else if ((u <= (-410000000000.0d0)) .or. (.not. (u <= 2.3d+22))) then
tmp = t_1
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = (t1 / -u) * (v / u);
double tmp;
if (u <= -2.7e+122) {
tmp = t_1;
} else if (u <= -9.6e+40) {
tmp = v / (-t1 - (u * 2.0));
} else if ((u <= -410000000000.0) || !(u <= 2.3e+22)) {
tmp = t_1;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): t_1 = (t1 / -u) * (v / u) tmp = 0 if u <= -2.7e+122: tmp = t_1 elif u <= -9.6e+40: tmp = v / (-t1 - (u * 2.0)) elif (u <= -410000000000.0) or not (u <= 2.3e+22): tmp = t_1 else: tmp = v / -t1 return tmp
function code(u, v, t1) t_1 = Float64(Float64(t1 / Float64(-u)) * Float64(v / u)) tmp = 0.0 if (u <= -2.7e+122) tmp = t_1; elseif (u <= -9.6e+40) tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); elseif ((u <= -410000000000.0) || !(u <= 2.3e+22)) tmp = t_1; else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = (t1 / -u) * (v / u); tmp = 0.0; if (u <= -2.7e+122) tmp = t_1; elseif (u <= -9.6e+40) tmp = v / (-t1 - (u * 2.0)); elseif ((u <= -410000000000.0) || ~((u <= 2.3e+22))) tmp = t_1; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(N[(t1 / (-u)), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[u, -2.7e+122], t$95$1, If[LessEqual[u, -9.6e+40], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[u, -410000000000.0], N[Not[LessEqual[u, 2.3e+22]], $MachinePrecision]], t$95$1, N[(v / (-t1)), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t1}{-u} \cdot \frac{v}{u}\\
\mathbf{if}\;u \leq -2.7 \cdot 10^{+122}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;u \leq -9.6 \cdot 10^{+40}:\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\mathbf{elif}\;u \leq -410000000000 \lor \neg \left(u \leq 2.3 \cdot 10^{+22}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -2.6999999999999998e122 or -9.5999999999999999e40 < u < -4.1e11 or 2.3000000000000002e22 < u Initial program 72.2%
times-frac98.0%
distribute-frac-neg98.0%
distribute-neg-frac298.0%
+-commutative98.0%
distribute-neg-in98.0%
unsub-neg98.0%
Simplified98.0%
Taylor expanded in t1 around 0 87.8%
mul-1-neg87.8%
distribute-neg-frac287.8%
Simplified87.8%
Taylor expanded in t1 around 0 85.9%
if -2.6999999999999998e122 < u < -9.5999999999999999e40Initial program 59.2%
associate-/l*58.5%
distribute-lft-neg-out58.5%
distribute-rgt-neg-in58.5%
associate-/r*74.5%
distribute-neg-frac274.5%
Simplified74.5%
associate-*r/99.7%
+-commutative99.7%
distribute-neg-in99.7%
sub-neg99.7%
associate-*l/99.9%
clear-num99.7%
frac-2neg99.7%
frac-times99.9%
*-un-lft-identity99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 76.9%
*-commutative76.9%
Simplified76.9%
if -4.1e11 < u < 2.3000000000000002e22Initial program 65.6%
associate-/l*68.3%
distribute-lft-neg-out68.3%
distribute-rgt-neg-in68.3%
associate-/r*80.5%
distribute-neg-frac280.5%
Simplified80.5%
Taylor expanded in t1 around inf 82.9%
associate-*r/82.9%
neg-mul-182.9%
Simplified82.9%
Final simplification83.9%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (* (/ t1 (- u)) (/ v u))))
(if (<= u -2.7e+122)
t_1
(if (<= u -1.32e+42)
(/ v (- (- t1) (* u 2.0)))
(if (<= u -19000000000.0)
t_1
(if (<= u 9e+21) (/ v (- t1)) (/ (* t1 (/ v (- u))) u)))))))
double code(double u, double v, double t1) {
double t_1 = (t1 / -u) * (v / u);
double tmp;
if (u <= -2.7e+122) {
tmp = t_1;
} else if (u <= -1.32e+42) {
tmp = v / (-t1 - (u * 2.0));
} else if (u <= -19000000000.0) {
tmp = t_1;
} else if (u <= 9e+21) {
tmp = v / -t1;
} else {
tmp = (t1 * (v / -u)) / u;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: t_1
real(8) :: tmp
t_1 = (t1 / -u) * (v / u)
if (u <= (-2.7d+122)) then
tmp = t_1
else if (u <= (-1.32d+42)) then
tmp = v / (-t1 - (u * 2.0d0))
else if (u <= (-19000000000.0d0)) then
tmp = t_1
else if (u <= 9d+21) then
tmp = v / -t1
else
tmp = (t1 * (v / -u)) / u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = (t1 / -u) * (v / u);
double tmp;
if (u <= -2.7e+122) {
tmp = t_1;
} else if (u <= -1.32e+42) {
tmp = v / (-t1 - (u * 2.0));
} else if (u <= -19000000000.0) {
tmp = t_1;
} else if (u <= 9e+21) {
tmp = v / -t1;
} else {
tmp = (t1 * (v / -u)) / u;
}
return tmp;
}
def code(u, v, t1): t_1 = (t1 / -u) * (v / u) tmp = 0 if u <= -2.7e+122: tmp = t_1 elif u <= -1.32e+42: tmp = v / (-t1 - (u * 2.0)) elif u <= -19000000000.0: tmp = t_1 elif u <= 9e+21: tmp = v / -t1 else: tmp = (t1 * (v / -u)) / u return tmp
function code(u, v, t1) t_1 = Float64(Float64(t1 / Float64(-u)) * Float64(v / u)) tmp = 0.0 if (u <= -2.7e+122) tmp = t_1; elseif (u <= -1.32e+42) tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); elseif (u <= -19000000000.0) tmp = t_1; elseif (u <= 9e+21) tmp = Float64(v / Float64(-t1)); else tmp = Float64(Float64(t1 * Float64(v / Float64(-u))) / u); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = (t1 / -u) * (v / u); tmp = 0.0; if (u <= -2.7e+122) tmp = t_1; elseif (u <= -1.32e+42) tmp = v / (-t1 - (u * 2.0)); elseif (u <= -19000000000.0) tmp = t_1; elseif (u <= 9e+21) tmp = v / -t1; else tmp = (t1 * (v / -u)) / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(N[(t1 / (-u)), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[u, -2.7e+122], t$95$1, If[LessEqual[u, -1.32e+42], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, -19000000000.0], t$95$1, If[LessEqual[u, 9e+21], N[(v / (-t1)), $MachinePrecision], N[(N[(t1 * N[(v / (-u)), $MachinePrecision]), $MachinePrecision] / u), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t1}{-u} \cdot \frac{v}{u}\\
\mathbf{if}\;u \leq -2.7 \cdot 10^{+122}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;u \leq -1.32 \cdot 10^{+42}:\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\mathbf{elif}\;u \leq -19000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;u \leq 9 \cdot 10^{+21}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{-u}}{u}\\
\end{array}
\end{array}
if u < -2.6999999999999998e122 or -1.32e42 < u < -1.9e10Initial program 69.0%
times-frac99.8%
distribute-frac-neg99.8%
distribute-neg-frac299.8%
+-commutative99.8%
distribute-neg-in99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in t1 around 0 97.0%
mul-1-neg97.0%
distribute-neg-frac297.0%
Simplified97.0%
Taylor expanded in t1 around 0 97.0%
if -2.6999999999999998e122 < u < -1.32e42Initial program 59.2%
associate-/l*58.5%
distribute-lft-neg-out58.5%
distribute-rgt-neg-in58.5%
associate-/r*74.5%
distribute-neg-frac274.5%
Simplified74.5%
associate-*r/99.7%
+-commutative99.7%
distribute-neg-in99.7%
sub-neg99.7%
associate-*l/99.9%
clear-num99.7%
frac-2neg99.7%
frac-times99.9%
*-un-lft-identity99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 76.9%
*-commutative76.9%
Simplified76.9%
if -1.9e10 < u < 9e21Initial program 65.6%
associate-/l*68.3%
distribute-lft-neg-out68.3%
distribute-rgt-neg-in68.3%
associate-/r*80.5%
distribute-neg-frac280.5%
Simplified80.5%
Taylor expanded in t1 around inf 82.9%
associate-*r/82.9%
neg-mul-182.9%
Simplified82.9%
if 9e21 < u Initial program 74.9%
times-frac96.6%
distribute-frac-neg96.6%
distribute-neg-frac296.6%
+-commutative96.6%
distribute-neg-in96.6%
unsub-neg96.6%
Simplified96.6%
Taylor expanded in t1 around 0 80.2%
mul-1-neg80.2%
distribute-neg-frac280.2%
Simplified80.2%
distribute-frac-neg280.2%
distribute-frac-neg80.2%
associate-*l/83.4%
frac-2neg83.4%
add-sqr-sqrt43.5%
sqrt-unprod57.7%
sqr-neg57.7%
sqrt-unprod29.6%
add-sqr-sqrt59.7%
+-commutative59.7%
distribute-neg-in59.7%
sub-neg59.7%
add-sqr-sqrt0.0%
sqrt-unprod73.2%
sqr-neg73.2%
sqrt-unprod83.2%
add-sqr-sqrt83.2%
Applied egg-rr83.2%
Taylor expanded in t1 around 0 74.8%
mul-1-neg74.8%
associate-*r/80.0%
distribute-rgt-neg-in80.0%
distribute-neg-frac280.0%
Simplified80.0%
Final simplification84.6%
(FPCore (u v t1)
:precision binary64
(if (<= t1 -4.5e+173)
(/ v (- t1))
(if (<= t1 1.85e+151)
(* t1 (/ (/ v (+ t1 u)) (- (- u) t1)))
(/ v (- (- t1) (* u 2.0))))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -4.5e+173) {
tmp = v / -t1;
} else if (t1 <= 1.85e+151) {
tmp = t1 * ((v / (t1 + u)) / (-u - t1));
} else {
tmp = v / (-t1 - (u * 2.0));
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (t1 <= (-4.5d+173)) then
tmp = v / -t1
else if (t1 <= 1.85d+151) then
tmp = t1 * ((v / (t1 + u)) / (-u - t1))
else
tmp = v / (-t1 - (u * 2.0d0))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -4.5e+173) {
tmp = v / -t1;
} else if (t1 <= 1.85e+151) {
tmp = t1 * ((v / (t1 + u)) / (-u - t1));
} else {
tmp = v / (-t1 - (u * 2.0));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -4.5e+173: tmp = v / -t1 elif t1 <= 1.85e+151: tmp = t1 * ((v / (t1 + u)) / (-u - t1)) else: tmp = v / (-t1 - (u * 2.0)) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -4.5e+173) tmp = Float64(v / Float64(-t1)); elseif (t1 <= 1.85e+151) tmp = Float64(t1 * Float64(Float64(v / Float64(t1 + u)) / Float64(Float64(-u) - t1))); else tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -4.5e+173) tmp = v / -t1; elseif (t1 <= 1.85e+151) tmp = t1 * ((v / (t1 + u)) / (-u - t1)); else tmp = v / (-t1 - (u * 2.0)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -4.5e+173], N[(v / (-t1)), $MachinePrecision], If[LessEqual[t1, 1.85e+151], N[(t1 * N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -4.5 \cdot 10^{+173}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{elif}\;t1 \leq 1.85 \cdot 10^{+151}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{t1 + u}}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\end{array}
\end{array}
if t1 < -4.5000000000000002e173Initial program 27.6%
associate-/l*30.2%
distribute-lft-neg-out30.2%
distribute-rgt-neg-in30.2%
associate-/r*64.4%
distribute-neg-frac264.4%
Simplified64.4%
Taylor expanded in t1 around inf 96.0%
associate-*r/96.0%
neg-mul-196.0%
Simplified96.0%
if -4.5000000000000002e173 < t1 < 1.8499999999999999e151Initial program 77.3%
associate-/l*78.9%
distribute-lft-neg-out78.9%
distribute-rgt-neg-in78.9%
associate-/r*90.0%
distribute-neg-frac290.0%
Simplified90.0%
if 1.8499999999999999e151 < t1 Initial program 42.8%
associate-/l*44.3%
distribute-lft-neg-out44.3%
distribute-rgt-neg-in44.3%
associate-/r*57.1%
distribute-neg-frac257.1%
Simplified57.1%
associate-*r/99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*l/99.9%
clear-num99.9%
frac-2neg99.9%
frac-times99.9%
*-un-lft-identity99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 92.4%
*-commutative92.4%
Simplified92.4%
Final simplification90.9%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (- (- u) t1)))
(if (<= u -98000000000.0)
(/ (* v (/ t1 u)) t_1)
(if (<= u 4.65e+21) (/ v (- t1)) (* t1 (/ (/ v u) t_1))))))
double code(double u, double v, double t1) {
double t_1 = -u - t1;
double tmp;
if (u <= -98000000000.0) {
tmp = (v * (t1 / u)) / t_1;
} else if (u <= 4.65e+21) {
tmp = v / -t1;
} else {
tmp = t1 * ((v / u) / 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 = -u - t1
if (u <= (-98000000000.0d0)) then
tmp = (v * (t1 / u)) / t_1
else if (u <= 4.65d+21) then
tmp = v / -t1
else
tmp = t1 * ((v / u) / t_1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = -u - t1;
double tmp;
if (u <= -98000000000.0) {
tmp = (v * (t1 / u)) / t_1;
} else if (u <= 4.65e+21) {
tmp = v / -t1;
} else {
tmp = t1 * ((v / u) / t_1);
}
return tmp;
}
def code(u, v, t1): t_1 = -u - t1 tmp = 0 if u <= -98000000000.0: tmp = (v * (t1 / u)) / t_1 elif u <= 4.65e+21: tmp = v / -t1 else: tmp = t1 * ((v / u) / t_1) return tmp
function code(u, v, t1) t_1 = Float64(Float64(-u) - t1) tmp = 0.0 if (u <= -98000000000.0) tmp = Float64(Float64(v * Float64(t1 / u)) / t_1); elseif (u <= 4.65e+21) tmp = Float64(v / Float64(-t1)); else tmp = Float64(t1 * Float64(Float64(v / u) / t_1)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = -u - t1; tmp = 0.0; if (u <= -98000000000.0) tmp = (v * (t1 / u)) / t_1; elseif (u <= 4.65e+21) tmp = v / -t1; else tmp = t1 * ((v / u) / t_1); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-u) - t1), $MachinePrecision]}, If[LessEqual[u, -98000000000.0], N[(N[(v * N[(t1 / u), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[u, 4.65e+21], N[(v / (-t1)), $MachinePrecision], N[(t1 * N[(N[(v / u), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-u\right) - t1\\
\mathbf{if}\;u \leq -98000000000:\\
\;\;\;\;\frac{v \cdot \frac{t1}{u}}{t\_1}\\
\mathbf{elif}\;u \leq 4.65 \cdot 10^{+21}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{t\_1}\\
\end{array}
\end{array}
if u < -9.8e10Initial program 67.1%
times-frac99.8%
distribute-frac-neg99.8%
distribute-neg-frac299.8%
+-commutative99.8%
distribute-neg-in99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in t1 around 0 89.5%
mul-1-neg89.5%
distribute-neg-frac289.5%
Simplified89.5%
Taylor expanded in v around 0 65.1%
mul-1-neg65.1%
associate-/r*75.1%
*-commutative75.1%
associate-*r/86.5%
Simplified86.5%
if -9.8e10 < u < 4.65e21Initial program 65.6%
associate-/l*68.3%
distribute-lft-neg-out68.3%
distribute-rgt-neg-in68.3%
associate-/r*80.5%
distribute-neg-frac280.5%
Simplified80.5%
Taylor expanded in t1 around inf 82.9%
associate-*r/82.9%
neg-mul-182.9%
Simplified82.9%
if 4.65e21 < u Initial program 74.9%
associate-/l*75.5%
distribute-lft-neg-out75.5%
distribute-rgt-neg-in75.5%
associate-/r*85.7%
distribute-neg-frac285.7%
Simplified85.7%
Taylor expanded in t1 around 0 81.9%
Final simplification83.5%
(FPCore (u v t1) :precision binary64 (if (<= u -6e-24) (* (/ v (+ t1 u)) (/ t1 (- u))) (if (<= u 1.9e+22) (/ v (- t1)) (* t1 (/ (/ v u) (- (- u) t1))))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -6e-24) {
tmp = (v / (t1 + u)) * (t1 / -u);
} else if (u <= 1.9e+22) {
tmp = v / -t1;
} else {
tmp = t1 * ((v / u) / (-u - t1));
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-6d-24)) then
tmp = (v / (t1 + u)) * (t1 / -u)
else if (u <= 1.9d+22) then
tmp = v / -t1
else
tmp = t1 * ((v / u) / (-u - t1))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -6e-24) {
tmp = (v / (t1 + u)) * (t1 / -u);
} else if (u <= 1.9e+22) {
tmp = v / -t1;
} else {
tmp = t1 * ((v / u) / (-u - t1));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -6e-24: tmp = (v / (t1 + u)) * (t1 / -u) elif u <= 1.9e+22: tmp = v / -t1 else: tmp = t1 * ((v / u) / (-u - t1)) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -6e-24) tmp = Float64(Float64(v / Float64(t1 + u)) * Float64(t1 / Float64(-u))); elseif (u <= 1.9e+22) tmp = Float64(v / Float64(-t1)); else tmp = Float64(t1 * Float64(Float64(v / u) / Float64(Float64(-u) - t1))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -6e-24) tmp = (v / (t1 + u)) * (t1 / -u); elseif (u <= 1.9e+22) tmp = v / -t1; else tmp = t1 * ((v / u) / (-u - t1)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -6e-24], N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(t1 / (-u)), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 1.9e+22], N[(v / (-t1)), $MachinePrecision], N[(t1 * N[(N[(v / u), $MachinePrecision] / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -6 \cdot 10^{-24}:\\
\;\;\;\;\frac{v}{t1 + u} \cdot \frac{t1}{-u}\\
\mathbf{elif}\;u \leq 1.9 \cdot 10^{+22}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{\left(-u\right) - t1}\\
\end{array}
\end{array}
if u < -5.99999999999999991e-24Initial program 68.6%
times-frac99.8%
distribute-frac-neg99.8%
distribute-neg-frac299.8%
+-commutative99.8%
distribute-neg-in99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in t1 around 0 90.0%
mul-1-neg90.0%
distribute-neg-frac290.0%
Simplified90.0%
if -5.99999999999999991e-24 < u < 1.9000000000000002e22Initial program 64.8%
associate-/l*68.4%
distribute-lft-neg-out68.4%
distribute-rgt-neg-in68.4%
associate-/r*80.7%
distribute-neg-frac280.7%
Simplified80.7%
Taylor expanded in t1 around inf 83.2%
associate-*r/83.2%
neg-mul-183.2%
Simplified83.2%
if 1.9000000000000002e22 < u Initial program 74.9%
associate-/l*75.5%
distribute-lft-neg-out75.5%
distribute-rgt-neg-in75.5%
associate-/r*85.7%
distribute-neg-frac285.7%
Simplified85.7%
Taylor expanded in t1 around 0 81.9%
Final simplification84.6%
(FPCore (u v t1) :precision binary64 (if (<= u -1.3e-35) (* (/ v (+ t1 u)) (/ t1 (- u))) (if (<= u 1.46e+22) (/ v (- t1)) (/ (* t1 (/ v (- t1 u))) u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.3e-35) {
tmp = (v / (t1 + u)) * (t1 / -u);
} else if (u <= 1.46e+22) {
tmp = v / -t1;
} else {
tmp = (t1 * (v / (t1 - u))) / u;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-1.3d-35)) then
tmp = (v / (t1 + u)) * (t1 / -u)
else if (u <= 1.46d+22) then
tmp = v / -t1
else
tmp = (t1 * (v / (t1 - u))) / u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -1.3e-35) {
tmp = (v / (t1 + u)) * (t1 / -u);
} else if (u <= 1.46e+22) {
tmp = v / -t1;
} else {
tmp = (t1 * (v / (t1 - u))) / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.3e-35: tmp = (v / (t1 + u)) * (t1 / -u) elif u <= 1.46e+22: tmp = v / -t1 else: tmp = (t1 * (v / (t1 - u))) / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.3e-35) tmp = Float64(Float64(v / Float64(t1 + u)) * Float64(t1 / Float64(-u))); elseif (u <= 1.46e+22) tmp = Float64(v / Float64(-t1)); else tmp = Float64(Float64(t1 * Float64(v / Float64(t1 - u))) / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -1.3e-35) tmp = (v / (t1 + u)) * (t1 / -u); elseif (u <= 1.46e+22) tmp = v / -t1; else tmp = (t1 * (v / (t1 - u))) / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.3e-35], N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(t1 / (-u)), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 1.46e+22], N[(v / (-t1)), $MachinePrecision], N[(N[(t1 * N[(v / N[(t1 - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.3 \cdot 10^{-35}:\\
\;\;\;\;\frac{v}{t1 + u} \cdot \frac{t1}{-u}\\
\mathbf{elif}\;u \leq 1.46 \cdot 10^{+22}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{t1 - u}}{u}\\
\end{array}
\end{array}
if u < -1.30000000000000002e-35Initial program 68.6%
times-frac99.8%
distribute-frac-neg99.8%
distribute-neg-frac299.8%
+-commutative99.8%
distribute-neg-in99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in t1 around 0 90.0%
mul-1-neg90.0%
distribute-neg-frac290.0%
Simplified90.0%
if -1.30000000000000002e-35 < u < 1.46e22Initial program 64.8%
associate-/l*68.4%
distribute-lft-neg-out68.4%
distribute-rgt-neg-in68.4%
associate-/r*80.7%
distribute-neg-frac280.7%
Simplified80.7%
Taylor expanded in t1 around inf 83.2%
associate-*r/83.2%
neg-mul-183.2%
Simplified83.2%
if 1.46e22 < u Initial program 74.9%
times-frac96.6%
distribute-frac-neg96.6%
distribute-neg-frac296.6%
+-commutative96.6%
distribute-neg-in96.6%
unsub-neg96.6%
Simplified96.6%
Taylor expanded in t1 around 0 80.2%
mul-1-neg80.2%
distribute-neg-frac280.2%
Simplified80.2%
distribute-frac-neg280.2%
distribute-frac-neg80.2%
associate-*l/83.4%
frac-2neg83.4%
add-sqr-sqrt43.5%
sqrt-unprod57.7%
sqr-neg57.7%
sqrt-unprod29.6%
add-sqr-sqrt59.7%
+-commutative59.7%
distribute-neg-in59.7%
sub-neg59.7%
add-sqr-sqrt0.0%
sqrt-unprod73.2%
sqr-neg73.2%
sqrt-unprod83.2%
add-sqr-sqrt83.2%
Applied egg-rr83.2%
Final simplification84.9%
(FPCore (u v t1) :precision binary64 (if (<= u -2100000000000.0) (/ (* v (/ t1 u)) (- (- u) t1)) (if (<= u 5.2e+21) (/ v (- t1)) (/ (* t1 (/ v (- u))) u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -2100000000000.0) {
tmp = (v * (t1 / u)) / (-u - t1);
} else if (u <= 5.2e+21) {
tmp = v / -t1;
} else {
tmp = (t1 * (v / -u)) / u;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-2100000000000.0d0)) then
tmp = (v * (t1 / u)) / (-u - t1)
else if (u <= 5.2d+21) then
tmp = v / -t1
else
tmp = (t1 * (v / -u)) / u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -2100000000000.0) {
tmp = (v * (t1 / u)) / (-u - t1);
} else if (u <= 5.2e+21) {
tmp = v / -t1;
} else {
tmp = (t1 * (v / -u)) / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -2100000000000.0: tmp = (v * (t1 / u)) / (-u - t1) elif u <= 5.2e+21: tmp = v / -t1 else: tmp = (t1 * (v / -u)) / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -2100000000000.0) tmp = Float64(Float64(v * Float64(t1 / u)) / Float64(Float64(-u) - t1)); elseif (u <= 5.2e+21) tmp = Float64(v / Float64(-t1)); else tmp = Float64(Float64(t1 * Float64(v / Float64(-u))) / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -2100000000000.0) tmp = (v * (t1 / u)) / (-u - t1); elseif (u <= 5.2e+21) tmp = v / -t1; else tmp = (t1 * (v / -u)) / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -2100000000000.0], N[(N[(v * N[(t1 / u), $MachinePrecision]), $MachinePrecision] / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 5.2e+21], N[(v / (-t1)), $MachinePrecision], N[(N[(t1 * N[(v / (-u)), $MachinePrecision]), $MachinePrecision] / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2100000000000:\\
\;\;\;\;\frac{v \cdot \frac{t1}{u}}{\left(-u\right) - t1}\\
\mathbf{elif}\;u \leq 5.2 \cdot 10^{+21}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{-u}}{u}\\
\end{array}
\end{array}
if u < -2.1e12Initial program 67.1%
times-frac99.8%
distribute-frac-neg99.8%
distribute-neg-frac299.8%
+-commutative99.8%
distribute-neg-in99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in t1 around 0 89.5%
mul-1-neg89.5%
distribute-neg-frac289.5%
Simplified89.5%
Taylor expanded in v around 0 65.1%
mul-1-neg65.1%
associate-/r*75.1%
*-commutative75.1%
associate-*r/86.5%
Simplified86.5%
if -2.1e12 < u < 5.2e21Initial program 65.6%
associate-/l*68.3%
distribute-lft-neg-out68.3%
distribute-rgt-neg-in68.3%
associate-/r*80.5%
distribute-neg-frac280.5%
Simplified80.5%
Taylor expanded in t1 around inf 82.9%
associate-*r/82.9%
neg-mul-182.9%
Simplified82.9%
if 5.2e21 < u Initial program 74.9%
times-frac96.6%
distribute-frac-neg96.6%
distribute-neg-frac296.6%
+-commutative96.6%
distribute-neg-in96.6%
unsub-neg96.6%
Simplified96.6%
Taylor expanded in t1 around 0 80.2%
mul-1-neg80.2%
distribute-neg-frac280.2%
Simplified80.2%
distribute-frac-neg280.2%
distribute-frac-neg80.2%
associate-*l/83.4%
frac-2neg83.4%
add-sqr-sqrt43.5%
sqrt-unprod57.7%
sqr-neg57.7%
sqrt-unprod29.6%
add-sqr-sqrt59.7%
+-commutative59.7%
distribute-neg-in59.7%
sub-neg59.7%
add-sqr-sqrt0.0%
sqrt-unprod73.2%
sqr-neg73.2%
sqrt-unprod83.2%
add-sqr-sqrt83.2%
Applied egg-rr83.2%
Taylor expanded in t1 around 0 74.8%
mul-1-neg74.8%
associate-*r/80.0%
distribute-rgt-neg-in80.0%
distribute-neg-frac280.0%
Simplified80.0%
Final simplification83.1%
(FPCore (u v t1) :precision binary64 (if (or (<= u -6.4e+81) (not (<= u 2.2e+100))) (/ t1 (* u (/ u v))) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -6.4e+81) || !(u <= 2.2e+100)) {
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 <= (-6.4d+81)) .or. (.not. (u <= 2.2d+100))) 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 <= -6.4e+81) || !(u <= 2.2e+100)) {
tmp = t1 / (u * (u / v));
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -6.4e+81) or not (u <= 2.2e+100): tmp = t1 / (u * (u / v)) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -6.4e+81) || !(u <= 2.2e+100)) tmp = Float64(t1 / Float64(u * Float64(u / v))); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -6.4e+81) || ~((u <= 2.2e+100))) tmp = t1 / (u * (u / v)); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -6.4e+81], N[Not[LessEqual[u, 2.2e+100]], $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 -6.4 \cdot 10^{+81} \lor \neg \left(u \leq 2.2 \cdot 10^{+100}\right):\\
\;\;\;\;\frac{t1}{u \cdot \frac{u}{v}}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -6.4e81 or 2.2000000000000001e100 < u Initial program 69.8%
times-frac98.8%
distribute-frac-neg98.8%
distribute-neg-frac298.8%
+-commutative98.8%
distribute-neg-in98.8%
unsub-neg98.8%
Simplified98.8%
Taylor expanded in t1 around 0 90.4%
mul-1-neg90.4%
distribute-neg-frac290.4%
Simplified90.4%
Taylor expanded in t1 around 0 87.2%
*-commutative87.2%
clear-num89.2%
frac-times85.8%
*-un-lft-identity85.8%
add-sqr-sqrt46.9%
sqrt-unprod69.1%
sqr-neg69.1%
sqrt-unprod32.5%
add-sqr-sqrt67.7%
Applied egg-rr67.7%
if -6.4e81 < u < 2.2000000000000001e100Initial program 67.1%
associate-/l*69.5%
distribute-lft-neg-out69.5%
distribute-rgt-neg-in69.5%
associate-/r*80.8%
distribute-neg-frac280.8%
Simplified80.8%
Taylor expanded in t1 around inf 75.8%
associate-*r/75.8%
neg-mul-175.8%
Simplified75.8%
Final simplification72.9%
(FPCore (u v t1) :precision binary64 (if (or (<= u -2.15e+130) (not (<= u 1.16e+131))) (* (/ v u) -0.5) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.15e+130) || !(u <= 1.16e+131)) {
tmp = (v / u) * -0.5;
} else {
tmp = v / -t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-2.15d+130)) .or. (.not. (u <= 1.16d+131))) then
tmp = (v / u) * (-0.5d0)
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.15e+130) || !(u <= 1.16e+131)) {
tmp = (v / u) * -0.5;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -2.15e+130) or not (u <= 1.16e+131): tmp = (v / u) * -0.5 else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -2.15e+130) || !(u <= 1.16e+131)) tmp = Float64(Float64(v / u) * -0.5); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -2.15e+130) || ~((u <= 1.16e+131))) tmp = (v / u) * -0.5; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2.15e+130], N[Not[LessEqual[u, 1.16e+131]], $MachinePrecision]], N[(N[(v / u), $MachinePrecision] * -0.5), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.15 \cdot 10^{+130} \lor \neg \left(u \leq 1.16 \cdot 10^{+131}\right):\\
\;\;\;\;\frac{v}{u} \cdot -0.5\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -2.14999999999999992e130 or 1.16e131 < u Initial program 68.5%
associate-/l*69.2%
distribute-lft-neg-out69.2%
distribute-rgt-neg-in69.2%
associate-/r*88.1%
distribute-neg-frac288.1%
Simplified88.1%
associate-*r/99.7%
+-commutative99.7%
distribute-neg-in99.7%
sub-neg99.7%
associate-*l/98.7%
clear-num98.7%
frac-2neg98.7%
frac-times84.4%
*-un-lft-identity84.4%
+-commutative84.4%
distribute-neg-in84.4%
sub-neg84.4%
Applied egg-rr84.4%
Taylor expanded in t1 around inf 41.2%
*-commutative41.2%
Simplified41.2%
Taylor expanded in t1 around 0 35.5%
if -2.14999999999999992e130 < u < 1.16e131Initial program 67.8%
associate-/l*70.0%
distribute-lft-neg-out70.0%
distribute-rgt-neg-in70.0%
associate-/r*80.7%
distribute-neg-frac280.7%
Simplified80.7%
Taylor expanded in t1 around inf 74.5%
associate-*r/74.5%
neg-mul-174.5%
Simplified74.5%
Final simplification62.1%
(FPCore (u v t1) :precision binary64 (if (or (<= u -9e+81) (not (<= u 4.4e+133))) (/ -0.5 (/ u v)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -9e+81) || !(u <= 4.4e+133)) {
tmp = -0.5 / (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 <= (-9d+81)) .or. (.not. (u <= 4.4d+133))) then
tmp = (-0.5d0) / (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 <= -9e+81) || !(u <= 4.4e+133)) {
tmp = -0.5 / (u / v);
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -9e+81) or not (u <= 4.4e+133): tmp = -0.5 / (u / v) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -9e+81) || !(u <= 4.4e+133)) tmp = Float64(-0.5 / 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 <= -9e+81) || ~((u <= 4.4e+133))) tmp = -0.5 / (u / v); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -9e+81], N[Not[LessEqual[u, 4.4e+133]], $MachinePrecision]], N[(-0.5 / N[(u / v), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -9 \cdot 10^{+81} \lor \neg \left(u \leq 4.4 \cdot 10^{+133}\right):\\
\;\;\;\;\frac{-0.5}{\frac{u}{v}}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -9.00000000000000034e81 or 4.4e133 < u Initial program 69.5%
associate-/l*69.9%
distribute-lft-neg-out69.9%
distribute-rgt-neg-in69.9%
associate-/r*87.6%
distribute-neg-frac287.6%
Simplified87.6%
associate-*r/99.7%
+-commutative99.7%
distribute-neg-in99.7%
sub-neg99.7%
associate-*l/98.7%
clear-num98.8%
frac-2neg98.8%
frac-times85.5%
*-un-lft-identity85.5%
+-commutative85.5%
distribute-neg-in85.5%
sub-neg85.5%
Applied egg-rr85.5%
Taylor expanded in t1 around inf 43.2%
*-commutative43.2%
Simplified43.2%
Taylor expanded in t1 around 0 35.8%
clear-num37.1%
un-div-inv37.1%
Applied egg-rr37.1%
if -9.00000000000000034e81 < u < 4.4e133Initial program 67.3%
associate-/l*69.7%
distribute-lft-neg-out69.7%
distribute-rgt-neg-in69.7%
associate-/r*80.7%
distribute-neg-frac280.7%
Simplified80.7%
Taylor expanded in t1 around inf 75.2%
associate-*r/75.2%
neg-mul-175.2%
Simplified75.2%
Final simplification62.3%
(FPCore (u v t1) :precision binary64 (if (or (<= u -3.4e+126) (not (<= u 4.3e+133))) (/ v (- u)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.4e+126) || !(u <= 4.3e+133)) {
tmp = v / -u;
} else {
tmp = v / -t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-3.4d+126)) .or. (.not. (u <= 4.3d+133))) then
tmp = v / -u
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.4e+126) || !(u <= 4.3e+133)) {
tmp = v / -u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -3.4e+126) or not (u <= 4.3e+133): tmp = v / -u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -3.4e+126) || !(u <= 4.3e+133)) tmp = Float64(v / Float64(-u)); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -3.4e+126) || ~((u <= 4.3e+133))) tmp = v / -u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -3.4e+126], N[Not[LessEqual[u, 4.3e+133]], $MachinePrecision]], N[(v / (-u)), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.4 \cdot 10^{+126} \lor \neg \left(u \leq 4.3 \cdot 10^{+133}\right):\\
\;\;\;\;\frac{v}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -3.39999999999999989e126 or 4.29999999999999994e133 < u Initial program 68.5%
times-frac98.7%
distribute-frac-neg98.7%
distribute-neg-frac298.7%
+-commutative98.7%
distribute-neg-in98.7%
unsub-neg98.7%
Simplified98.7%
Taylor expanded in t1 around 0 91.6%
mul-1-neg91.6%
distribute-neg-frac291.6%
Simplified91.6%
Taylor expanded in t1 around inf 35.5%
mul-1-neg35.5%
distribute-neg-frac235.5%
Simplified35.5%
if -3.39999999999999989e126 < u < 4.29999999999999994e133Initial program 67.8%
associate-/l*70.0%
distribute-lft-neg-out70.0%
distribute-rgt-neg-in70.0%
associate-/r*80.7%
distribute-neg-frac280.7%
Simplified80.7%
Taylor expanded in t1 around inf 74.5%
associate-*r/74.5%
neg-mul-174.5%
Simplified74.5%
Final simplification62.1%
(FPCore (u v t1) :precision binary64 (/ v (- (- u) t1)))
double code(double u, double v, double t1) {
return v / (-u - t1);
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = v / (-u - t1)
end function
public static double code(double u, double v, double t1) {
return v / (-u - t1);
}
def code(u, v, t1): return v / (-u - t1)
function code(u, v, t1) return Float64(v / Float64(Float64(-u) - t1)) end
function tmp = code(u, v, t1) tmp = v / (-u - t1); end
code[u_, v_, t1_] := N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{\left(-u\right) - t1}
\end{array}
Initial program 68.1%
times-frac98.4%
distribute-frac-neg98.4%
distribute-neg-frac298.4%
+-commutative98.4%
distribute-neg-in98.4%
unsub-neg98.4%
Simplified98.4%
Taylor expanded in t1 around inf 63.0%
Final simplification63.0%
(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 68.1%
times-frac98.4%
distribute-frac-neg98.4%
distribute-neg-frac298.4%
+-commutative98.4%
distribute-neg-in98.4%
unsub-neg98.4%
Simplified98.4%
Taylor expanded in t1 around 0 52.4%
mul-1-neg52.4%
distribute-neg-frac252.4%
Simplified52.4%
distribute-frac-neg252.4%
distribute-frac-neg52.4%
associate-*l/55.0%
frac-2neg55.0%
add-sqr-sqrt28.4%
sqrt-unprod37.6%
sqr-neg37.6%
sqrt-unprod18.2%
add-sqr-sqrt36.5%
+-commutative36.5%
distribute-neg-in36.5%
sub-neg36.5%
add-sqr-sqrt17.0%
sqrt-unprod43.3%
sqr-neg43.3%
sqrt-unprod29.0%
add-sqr-sqrt56.1%
Applied egg-rr56.1%
Taylor expanded in t1 around inf 17.9%
Final simplification17.9%
herbie shell --seed 2024039
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))