
(FPCore (u v t1) :precision binary64 (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))
double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-t1 * v) / ((t1 + u) * (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
def code(u, v, t1): return (-t1 * v) / ((t1 + u) * (t1 + u))
function code(u, v, t1) return Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (-t1 * v) / ((t1 + u) * (t1 + u)); end
code[u_, v_, t1_] := N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (u v t1) :precision binary64 (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))
double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-t1 * v) / ((t1 + u) * (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
def code(u, v, t1): return (-t1 * v) / ((t1 + u) * (t1 + u))
function code(u, v, t1) return Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (-t1 * v) / ((t1 + u) * (t1 + u)); end
code[u_, v_, t1_] := N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}
\end{array}
(FPCore (u v t1) :precision binary64 (- (/ (* (/ 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(Float64(t1 / Float64(t1 + u)) * 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[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * v), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision])
\begin{array}{l}
\\
-\frac{\frac{t1}{t1 + u} \cdot v}{t1 + u}
\end{array}
Initial program 77.0%
associate-*l/80.2%
*-commutative80.2%
Simplified80.2%
associate-*r/77.0%
times-frac97.2%
*-commutative97.2%
frac-2neg97.2%
+-commutative97.2%
distribute-neg-in97.2%
sub-neg97.2%
associate-*r/99.0%
add-sqr-sqrt50.4%
sqrt-unprod51.7%
sqr-neg51.7%
sqrt-unprod19.9%
add-sqr-sqrt39.2%
sub-neg39.2%
+-commutative39.2%
add-sqr-sqrt19.3%
sqrt-unprod51.2%
sqr-neg51.2%
sqrt-unprod38.5%
add-sqr-sqrt19.1%
sqrt-unprod43.0%
sqr-neg43.0%
sqrt-unprod26.1%
Applied egg-rr99.0%
Final simplification99.0%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (* v (/ t1 (* (+ t1 u) (- (- u) t1))))))
(if (<= t1 -2.7e+164)
(/ v (- t1))
(if (<= t1 -5.6e-192)
t_1
(if (<= t1 1.18e-169)
(/ (* t1 (/ v (- u))) (+ t1 u))
(if (<= t1 4.8e+131) t_1 (/ v (- (* u (- 2.0)) t1))))))))
double code(double u, double v, double t1) {
double t_1 = v * (t1 / ((t1 + u) * (-u - t1)));
double tmp;
if (t1 <= -2.7e+164) {
tmp = v / -t1;
} else if (t1 <= -5.6e-192) {
tmp = t_1;
} else if (t1 <= 1.18e-169) {
tmp = (t1 * (v / -u)) / (t1 + u);
} else if (t1 <= 4.8e+131) {
tmp = t_1;
} else {
tmp = v / ((u * -2.0) - t1);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: t_1
real(8) :: tmp
t_1 = v * (t1 / ((t1 + u) * (-u - t1)))
if (t1 <= (-2.7d+164)) then
tmp = v / -t1
else if (t1 <= (-5.6d-192)) then
tmp = t_1
else if (t1 <= 1.18d-169) then
tmp = (t1 * (v / -u)) / (t1 + u)
else if (t1 <= 4.8d+131) then
tmp = t_1
else
tmp = v / ((u * -2.0d0) - t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = v * (t1 / ((t1 + u) * (-u - t1)));
double tmp;
if (t1 <= -2.7e+164) {
tmp = v / -t1;
} else if (t1 <= -5.6e-192) {
tmp = t_1;
} else if (t1 <= 1.18e-169) {
tmp = (t1 * (v / -u)) / (t1 + u);
} else if (t1 <= 4.8e+131) {
tmp = t_1;
} else {
tmp = v / ((u * -2.0) - t1);
}
return tmp;
}
def code(u, v, t1): t_1 = v * (t1 / ((t1 + u) * (-u - t1))) tmp = 0 if t1 <= -2.7e+164: tmp = v / -t1 elif t1 <= -5.6e-192: tmp = t_1 elif t1 <= 1.18e-169: tmp = (t1 * (v / -u)) / (t1 + u) elif t1 <= 4.8e+131: tmp = t_1 else: tmp = v / ((u * -2.0) - t1) return tmp
function code(u, v, t1) t_1 = Float64(v * Float64(t1 / Float64(Float64(t1 + u) * Float64(Float64(-u) - t1)))) tmp = 0.0 if (t1 <= -2.7e+164) tmp = Float64(v / Float64(-t1)); elseif (t1 <= -5.6e-192) tmp = t_1; elseif (t1 <= 1.18e-169) tmp = Float64(Float64(t1 * Float64(v / Float64(-u))) / Float64(t1 + u)); elseif (t1 <= 4.8e+131) tmp = t_1; else tmp = Float64(v / Float64(Float64(u * Float64(-2.0)) - t1)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = v * (t1 / ((t1 + u) * (-u - t1))); tmp = 0.0; if (t1 <= -2.7e+164) tmp = v / -t1; elseif (t1 <= -5.6e-192) tmp = t_1; elseif (t1 <= 1.18e-169) tmp = (t1 * (v / -u)) / (t1 + u); elseif (t1 <= 4.8e+131) tmp = t_1; else tmp = v / ((u * -2.0) - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(v * N[(t1 / N[(N[(t1 + u), $MachinePrecision] * N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -2.7e+164], N[(v / (-t1)), $MachinePrecision], If[LessEqual[t1, -5.6e-192], t$95$1, If[LessEqual[t1, 1.18e-169], N[(N[(t1 * N[(v / (-u)), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 4.8e+131], t$95$1, N[(v / N[(N[(u * (-2.0)), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := v \cdot \frac{t1}{\left(t1 + u\right) \cdot \left(\left(-u\right) - t1\right)}\\
\mathbf{if}\;t1 \leq -2.7 \cdot 10^{+164}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{elif}\;t1 \leq -5.6 \cdot 10^{-192}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t1 \leq 1.18 \cdot 10^{-169}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{-u}}{t1 + u}\\
\mathbf{elif}\;t1 \leq 4.8 \cdot 10^{+131}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\
\end{array}
\end{array}
if t1 < -2.70000000000000006e164Initial program 38.1%
associate-*l/40.6%
*-commutative40.6%
Simplified40.6%
Taylor expanded in t1 around inf 100.0%
associate-*r/100.0%
neg-mul-1100.0%
Simplified100.0%
if -2.70000000000000006e164 < t1 < -5.60000000000000007e-192 or 1.18e-169 < t1 < 4.7999999999999999e131Initial program 89.7%
associate-*l/96.3%
*-commutative96.3%
Simplified96.3%
if -5.60000000000000007e-192 < t1 < 1.18e-169Initial program 87.8%
associate-*l/80.0%
*-commutative80.0%
Simplified80.0%
associate-*r/87.8%
times-frac94.2%
*-commutative94.2%
frac-2neg94.2%
+-commutative94.2%
distribute-neg-in94.2%
sub-neg94.2%
associate-*r/96.1%
add-sqr-sqrt32.8%
sqrt-unprod53.6%
sqr-neg53.6%
sqrt-unprod38.1%
add-sqr-sqrt52.9%
sub-neg52.9%
+-commutative52.9%
add-sqr-sqrt14.7%
sqrt-unprod53.2%
sqr-neg53.2%
sqrt-unprod43.0%
add-sqr-sqrt19.3%
sqrt-unprod56.3%
sqr-neg56.3%
sqrt-unprod38.8%
Applied egg-rr96.1%
Taylor expanded in t1 around 0 90.0%
mul-1-neg90.0%
associate-/l*93.9%
distribute-rgt-neg-in93.9%
distribute-neg-frac293.9%
Simplified93.9%
if 4.7999999999999999e131 < t1 Initial program 30.2%
associate-*l/35.2%
*-commutative35.2%
Simplified35.2%
associate-*r/30.2%
times-frac99.9%
*-commutative99.9%
frac-2neg99.9%
remove-double-neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
clear-num99.9%
frac-2neg99.9%
frac-times90.1%
*-un-lft-identity90.1%
+-commutative90.1%
distribute-neg-in90.1%
sub-neg90.1%
Applied egg-rr90.1%
Taylor expanded in u around 0 89.8%
*-commutative89.8%
Simplified89.8%
Final simplification95.5%
(FPCore (u v t1)
:precision binary64
(if (<= t1 -5.9e+38)
(/ v (- u t1))
(if (<= t1 4.1e-125)
(* (/ t1 (- u)) (/ v u))
(if (or (<= t1 8.4e-91) (not (<= t1 3.6e-46)))
(/ v (- (* u (- 2.0)) t1))
(* t1 (/ (/ v (- u)) (+ t1 u)))))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -5.9e+38) {
tmp = v / (u - t1);
} else if (t1 <= 4.1e-125) {
tmp = (t1 / -u) * (v / u);
} else if ((t1 <= 8.4e-91) || !(t1 <= 3.6e-46)) {
tmp = v / ((u * -2.0) - t1);
} else {
tmp = t1 * ((v / -u) / (t1 + u));
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (t1 <= (-5.9d+38)) then
tmp = v / (u - t1)
else if (t1 <= 4.1d-125) then
tmp = (t1 / -u) * (v / u)
else if ((t1 <= 8.4d-91) .or. (.not. (t1 <= 3.6d-46))) then
tmp = v / ((u * -2.0d0) - t1)
else
tmp = t1 * ((v / -u) / (t1 + u))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -5.9e+38) {
tmp = v / (u - t1);
} else if (t1 <= 4.1e-125) {
tmp = (t1 / -u) * (v / u);
} else if ((t1 <= 8.4e-91) || !(t1 <= 3.6e-46)) {
tmp = v / ((u * -2.0) - t1);
} else {
tmp = t1 * ((v / -u) / (t1 + u));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -5.9e+38: tmp = v / (u - t1) elif t1 <= 4.1e-125: tmp = (t1 / -u) * (v / u) elif (t1 <= 8.4e-91) or not (t1 <= 3.6e-46): tmp = v / ((u * -2.0) - t1) else: tmp = t1 * ((v / -u) / (t1 + u)) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -5.9e+38) tmp = Float64(v / Float64(u - t1)); elseif (t1 <= 4.1e-125) tmp = Float64(Float64(t1 / Float64(-u)) * Float64(v / u)); elseif ((t1 <= 8.4e-91) || !(t1 <= 3.6e-46)) tmp = Float64(v / Float64(Float64(u * Float64(-2.0)) - t1)); else tmp = Float64(t1 * Float64(Float64(v / Float64(-u)) / Float64(t1 + u))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -5.9e+38) tmp = v / (u - t1); elseif (t1 <= 4.1e-125) tmp = (t1 / -u) * (v / u); elseif ((t1 <= 8.4e-91) || ~((t1 <= 3.6e-46))) tmp = v / ((u * -2.0) - t1); else tmp = t1 * ((v / -u) / (t1 + u)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -5.9e+38], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 4.1e-125], N[(N[(t1 / (-u)), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t1, 8.4e-91], N[Not[LessEqual[t1, 3.6e-46]], $MachinePrecision]], N[(v / N[(N[(u * (-2.0)), $MachinePrecision] - t1), $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 -5.9 \cdot 10^{+38}:\\
\;\;\;\;\frac{v}{u - t1}\\
\mathbf{elif}\;t1 \leq 4.1 \cdot 10^{-125}:\\
\;\;\;\;\frac{t1}{-u} \cdot \frac{v}{u}\\
\mathbf{elif}\;t1 \leq 8.4 \cdot 10^{-91} \lor \neg \left(t1 \leq 3.6 \cdot 10^{-46}\right):\\
\;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{-u}}{t1 + u}\\
\end{array}
\end{array}
if t1 < -5.89999999999999981e38Initial program 55.2%
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 88.6%
*-commutative88.6%
clear-num88.1%
frac-times70.5%
*-un-lft-identity70.5%
sub-neg70.5%
add-sqr-sqrt40.5%
add-sqr-sqrt40.5%
sqrt-unprod68.3%
sqr-neg68.3%
sqrt-unprod30.1%
add-sqr-sqrt70.6%
sqrt-unprod55.8%
sqr-neg55.8%
sqrt-unprod0.0%
add-sqr-sqrt38.6%
+-commutative38.6%
Applied egg-rr38.6%
associate-/l/35.0%
associate-/r/35.0%
/-rgt-identity35.0%
times-frac35.0%
*-rgt-identity35.0%
associate-*r/35.0%
associate-*l/35.0%
associate-/l*38.6%
Simplified38.6%
frac-2neg38.6%
associate-*r/35.0%
distribute-neg-frac35.0%
add-sqr-sqrt12.9%
sqrt-unprod47.7%
sqr-neg47.7%
sqrt-unprod50.2%
add-sqr-sqrt88.6%
associate-*r/51.8%
+-commutative51.8%
distribute-neg-in51.8%
add-sqr-sqrt33.7%
sqrt-unprod56.0%
sqr-neg56.0%
sqrt-unprod18.3%
add-sqr-sqrt51.9%
Applied egg-rr51.9%
*-lft-identity51.9%
*-commutative51.9%
times-frac88.7%
/-rgt-identity88.7%
*-inverses88.7%
*-rgt-identity88.7%
sub-neg88.7%
Simplified88.7%
if -5.89999999999999981e38 < t1 < 4.0999999999999997e-125Initial program 91.0%
times-frac94.7%
distribute-frac-neg94.7%
distribute-neg-frac294.7%
+-commutative94.7%
distribute-neg-in94.7%
unsub-neg94.7%
Simplified94.7%
Taylor expanded in t1 around 0 79.3%
associate-*r/79.3%
mul-1-neg79.3%
Simplified79.3%
Taylor expanded in t1 around 0 80.4%
if 4.0999999999999997e-125 < t1 < 8.3999999999999997e-91 or 3.6e-46 < t1 Initial program 68.2%
associate-*l/74.1%
*-commutative74.1%
Simplified74.1%
associate-*r/68.2%
times-frac98.6%
*-commutative98.6%
frac-2neg98.6%
remove-double-neg98.6%
+-commutative98.6%
distribute-neg-in98.6%
sub-neg98.6%
clear-num98.6%
frac-2neg98.6%
frac-times96.1%
*-un-lft-identity96.1%
+-commutative96.1%
distribute-neg-in96.1%
sub-neg96.1%
Applied egg-rr96.1%
Taylor expanded in u around 0 86.7%
*-commutative86.7%
Simplified86.7%
if 8.3999999999999997e-91 < t1 < 3.6e-46Initial program 99.7%
associate-*l/100.0%
*-commutative100.0%
Simplified100.0%
associate-*r/99.7%
times-frac99.9%
*-commutative99.9%
frac-2neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*r/99.7%
add-sqr-sqrt0.0%
sqrt-unprod59.8%
sqr-neg59.8%
sqrt-unprod59.8%
add-sqr-sqrt59.8%
sub-neg59.8%
+-commutative59.8%
add-sqr-sqrt0.0%
sqrt-unprod67.9%
sqr-neg67.9%
sqrt-unprod67.9%
add-sqr-sqrt25.4%
sqrt-unprod91.9%
sqr-neg91.9%
sqrt-unprod66.4%
Applied egg-rr99.7%
Taylor expanded in t1 around 0 91.8%
mul-1-neg91.8%
associate-/l*91.9%
distribute-rgt-neg-in91.9%
distribute-neg-frac291.9%
Simplified91.9%
Taylor expanded in v around 0 91.8%
mul-1-neg91.8%
associate-/r*91.8%
associate-*r/91.9%
associate-*r/91.8%
distribute-rgt-neg-in91.8%
distribute-neg-frac91.8%
distribute-neg-frac291.8%
Simplified91.8%
Final simplification84.6%
(FPCore (u v t1)
:precision binary64
(if (<= t1 -5.9e+38)
(/ v (- u t1))
(if (<= t1 3.95e-125)
(* (/ t1 (- u)) (/ v u))
(if (or (<= t1 1e-90) (not (<= t1 2.7e-46)))
(/ v (- (* u (- 2.0)) t1))
(* (/ t1 (- (- u) t1)) (/ v u))))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -5.9e+38) {
tmp = v / (u - t1);
} else if (t1 <= 3.95e-125) {
tmp = (t1 / -u) * (v / u);
} else if ((t1 <= 1e-90) || !(t1 <= 2.7e-46)) {
tmp = v / ((u * -2.0) - t1);
} else {
tmp = (t1 / (-u - t1)) * (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 <= (-5.9d+38)) then
tmp = v / (u - t1)
else if (t1 <= 3.95d-125) then
tmp = (t1 / -u) * (v / u)
else if ((t1 <= 1d-90) .or. (.not. (t1 <= 2.7d-46))) then
tmp = v / ((u * -2.0d0) - t1)
else
tmp = (t1 / (-u - t1)) * (v / u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -5.9e+38) {
tmp = v / (u - t1);
} else if (t1 <= 3.95e-125) {
tmp = (t1 / -u) * (v / u);
} else if ((t1 <= 1e-90) || !(t1 <= 2.7e-46)) {
tmp = v / ((u * -2.0) - t1);
} else {
tmp = (t1 / (-u - t1)) * (v / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -5.9e+38: tmp = v / (u - t1) elif t1 <= 3.95e-125: tmp = (t1 / -u) * (v / u) elif (t1 <= 1e-90) or not (t1 <= 2.7e-46): tmp = v / ((u * -2.0) - t1) else: tmp = (t1 / (-u - t1)) * (v / u) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -5.9e+38) tmp = Float64(v / Float64(u - t1)); elseif (t1 <= 3.95e-125) tmp = Float64(Float64(t1 / Float64(-u)) * Float64(v / u)); elseif ((t1 <= 1e-90) || !(t1 <= 2.7e-46)) tmp = Float64(v / Float64(Float64(u * Float64(-2.0)) - t1)); else tmp = Float64(Float64(t1 / Float64(Float64(-u) - t1)) * Float64(v / u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -5.9e+38) tmp = v / (u - t1); elseif (t1 <= 3.95e-125) tmp = (t1 / -u) * (v / u); elseif ((t1 <= 1e-90) || ~((t1 <= 2.7e-46))) tmp = v / ((u * -2.0) - t1); else tmp = (t1 / (-u - t1)) * (v / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -5.9e+38], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 3.95e-125], N[(N[(t1 / (-u)), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t1, 1e-90], N[Not[LessEqual[t1, 2.7e-46]], $MachinePrecision]], N[(v / N[(N[(u * (-2.0)), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision], N[(N[(t1 / N[((-u) - t1), $MachinePrecision]), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -5.9 \cdot 10^{+38}:\\
\;\;\;\;\frac{v}{u - t1}\\
\mathbf{elif}\;t1 \leq 3.95 \cdot 10^{-125}:\\
\;\;\;\;\frac{t1}{-u} \cdot \frac{v}{u}\\
\mathbf{elif}\;t1 \leq 10^{-90} \lor \neg \left(t1 \leq 2.7 \cdot 10^{-46}\right):\\
\;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{\left(-u\right) - t1} \cdot \frac{v}{u}\\
\end{array}
\end{array}
if t1 < -5.89999999999999981e38Initial program 55.2%
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 88.6%
*-commutative88.6%
clear-num88.1%
frac-times70.5%
*-un-lft-identity70.5%
sub-neg70.5%
add-sqr-sqrt40.5%
add-sqr-sqrt40.5%
sqrt-unprod68.3%
sqr-neg68.3%
sqrt-unprod30.1%
add-sqr-sqrt70.6%
sqrt-unprod55.8%
sqr-neg55.8%
sqrt-unprod0.0%
add-sqr-sqrt38.6%
+-commutative38.6%
Applied egg-rr38.6%
associate-/l/35.0%
associate-/r/35.0%
/-rgt-identity35.0%
times-frac35.0%
*-rgt-identity35.0%
associate-*r/35.0%
associate-*l/35.0%
associate-/l*38.6%
Simplified38.6%
frac-2neg38.6%
associate-*r/35.0%
distribute-neg-frac35.0%
add-sqr-sqrt12.9%
sqrt-unprod47.7%
sqr-neg47.7%
sqrt-unprod50.2%
add-sqr-sqrt88.6%
associate-*r/51.8%
+-commutative51.8%
distribute-neg-in51.8%
add-sqr-sqrt33.7%
sqrt-unprod56.0%
sqr-neg56.0%
sqrt-unprod18.3%
add-sqr-sqrt51.9%
Applied egg-rr51.9%
*-lft-identity51.9%
*-commutative51.9%
times-frac88.7%
/-rgt-identity88.7%
*-inverses88.7%
*-rgt-identity88.7%
sub-neg88.7%
Simplified88.7%
if -5.89999999999999981e38 < t1 < 3.94999999999999994e-125Initial program 91.0%
times-frac94.7%
distribute-frac-neg94.7%
distribute-neg-frac294.7%
+-commutative94.7%
distribute-neg-in94.7%
unsub-neg94.7%
Simplified94.7%
Taylor expanded in t1 around 0 79.3%
associate-*r/79.3%
mul-1-neg79.3%
Simplified79.3%
Taylor expanded in t1 around 0 80.4%
if 3.94999999999999994e-125 < t1 < 9.99999999999999995e-91 or 2.7e-46 < t1 Initial program 68.2%
associate-*l/74.1%
*-commutative74.1%
Simplified74.1%
associate-*r/68.2%
times-frac98.6%
*-commutative98.6%
frac-2neg98.6%
remove-double-neg98.6%
+-commutative98.6%
distribute-neg-in98.6%
sub-neg98.6%
clear-num98.6%
frac-2neg98.6%
frac-times96.1%
*-un-lft-identity96.1%
+-commutative96.1%
distribute-neg-in96.1%
sub-neg96.1%
Applied egg-rr96.1%
Taylor expanded in u around 0 86.7%
*-commutative86.7%
Simplified86.7%
if 9.99999999999999995e-91 < t1 < 2.7e-46Initial program 99.7%
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 0 91.9%
Final simplification84.6%
(FPCore (u v t1)
:precision binary64
(if (<= t1 -5.9e+38)
(/ v (- u t1))
(if (<= t1 -7.4e-41)
(/ (* t1 v) (* u (- t1 u)))
(if (or (<= t1 -6e-94) (not (<= t1 5e-46)))
(/ v (- (* u (- 2.0)) t1))
(/ (/ (* t1 v) (- u)) (+ t1 u))))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -5.9e+38) {
tmp = v / (u - t1);
} else if (t1 <= -7.4e-41) {
tmp = (t1 * v) / (u * (t1 - u));
} else if ((t1 <= -6e-94) || !(t1 <= 5e-46)) {
tmp = v / ((u * -2.0) - t1);
} else {
tmp = ((t1 * v) / -u) / (t1 + u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (t1 <= (-5.9d+38)) then
tmp = v / (u - t1)
else if (t1 <= (-7.4d-41)) then
tmp = (t1 * v) / (u * (t1 - u))
else if ((t1 <= (-6d-94)) .or. (.not. (t1 <= 5d-46))) then
tmp = v / ((u * -2.0d0) - t1)
else
tmp = ((t1 * v) / -u) / (t1 + u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -5.9e+38) {
tmp = v / (u - t1);
} else if (t1 <= -7.4e-41) {
tmp = (t1 * v) / (u * (t1 - u));
} else if ((t1 <= -6e-94) || !(t1 <= 5e-46)) {
tmp = v / ((u * -2.0) - t1);
} else {
tmp = ((t1 * v) / -u) / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -5.9e+38: tmp = v / (u - t1) elif t1 <= -7.4e-41: tmp = (t1 * v) / (u * (t1 - u)) elif (t1 <= -6e-94) or not (t1 <= 5e-46): tmp = v / ((u * -2.0) - t1) else: tmp = ((t1 * v) / -u) / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -5.9e+38) tmp = Float64(v / Float64(u - t1)); elseif (t1 <= -7.4e-41) tmp = Float64(Float64(t1 * v) / Float64(u * Float64(t1 - u))); elseif ((t1 <= -6e-94) || !(t1 <= 5e-46)) tmp = Float64(v / Float64(Float64(u * Float64(-2.0)) - t1)); else tmp = Float64(Float64(Float64(t1 * v) / Float64(-u)) / Float64(t1 + u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -5.9e+38) tmp = v / (u - t1); elseif (t1 <= -7.4e-41) tmp = (t1 * v) / (u * (t1 - u)); elseif ((t1 <= -6e-94) || ~((t1 <= 5e-46))) tmp = v / ((u * -2.0) - t1); else tmp = ((t1 * v) / -u) / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -5.9e+38], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, -7.4e-41], N[(N[(t1 * v), $MachinePrecision] / N[(u * N[(t1 - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t1, -6e-94], N[Not[LessEqual[t1, 5e-46]], $MachinePrecision]], N[(v / N[(N[(u * (-2.0)), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t1 * v), $MachinePrecision] / (-u)), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -5.9 \cdot 10^{+38}:\\
\;\;\;\;\frac{v}{u - t1}\\
\mathbf{elif}\;t1 \leq -7.4 \cdot 10^{-41}:\\
\;\;\;\;\frac{t1 \cdot v}{u \cdot \left(t1 - u\right)}\\
\mathbf{elif}\;t1 \leq -6 \cdot 10^{-94} \lor \neg \left(t1 \leq 5 \cdot 10^{-46}\right):\\
\;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t1 \cdot v}{-u}}{t1 + u}\\
\end{array}
\end{array}
if t1 < -5.89999999999999981e38Initial program 55.2%
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 88.6%
*-commutative88.6%
clear-num88.1%
frac-times70.5%
*-un-lft-identity70.5%
sub-neg70.5%
add-sqr-sqrt40.5%
add-sqr-sqrt40.5%
sqrt-unprod68.3%
sqr-neg68.3%
sqrt-unprod30.1%
add-sqr-sqrt70.6%
sqrt-unprod55.8%
sqr-neg55.8%
sqrt-unprod0.0%
add-sqr-sqrt38.6%
+-commutative38.6%
Applied egg-rr38.6%
associate-/l/35.0%
associate-/r/35.0%
/-rgt-identity35.0%
times-frac35.0%
*-rgt-identity35.0%
associate-*r/35.0%
associate-*l/35.0%
associate-/l*38.6%
Simplified38.6%
frac-2neg38.6%
associate-*r/35.0%
distribute-neg-frac35.0%
add-sqr-sqrt12.9%
sqrt-unprod47.7%
sqr-neg47.7%
sqrt-unprod50.2%
add-sqr-sqrt88.6%
associate-*r/51.8%
+-commutative51.8%
distribute-neg-in51.8%
add-sqr-sqrt33.7%
sqrt-unprod56.0%
sqr-neg56.0%
sqrt-unprod18.3%
add-sqr-sqrt51.9%
Applied egg-rr51.9%
*-lft-identity51.9%
*-commutative51.9%
times-frac88.7%
/-rgt-identity88.7%
*-inverses88.7%
*-rgt-identity88.7%
sub-neg88.7%
Simplified88.7%
if -5.89999999999999981e38 < t1 < -7.4000000000000004e-41Initial program 99.7%
times-frac99.7%
distribute-frac-neg99.7%
distribute-neg-frac299.7%
+-commutative99.7%
distribute-neg-in99.7%
unsub-neg99.7%
Simplified99.7%
Taylor expanded in t1 around 0 67.4%
associate-*r/67.4%
mul-1-neg67.4%
Simplified67.4%
*-commutative67.4%
frac-2neg67.4%
frac-times67.6%
add-sqr-sqrt67.5%
sqrt-unprod67.6%
sqr-neg67.6%
sqrt-unprod0.0%
add-sqr-sqrt52.1%
add-sqr-sqrt31.9%
sqrt-unprod55.1%
sqr-neg55.1%
sqrt-unprod23.2%
add-sqr-sqrt67.6%
distribute-neg-in67.6%
add-sqr-sqrt67.6%
sqrt-unprod67.6%
sqr-neg67.6%
sqrt-unprod0.0%
add-sqr-sqrt74.6%
sub-neg74.6%
Applied egg-rr74.6%
if -7.4000000000000004e-41 < t1 < -6.0000000000000003e-94 or 4.99999999999999992e-46 < t1 Initial program 68.5%
associate-*l/73.6%
*-commutative73.6%
Simplified73.6%
associate-*r/68.5%
times-frac99.5%
*-commutative99.5%
frac-2neg99.5%
remove-double-neg99.5%
+-commutative99.5%
distribute-neg-in99.5%
sub-neg99.5%
clear-num98.6%
frac-2neg98.6%
frac-times94.9%
*-un-lft-identity94.9%
+-commutative94.9%
distribute-neg-in94.9%
sub-neg94.9%
Applied egg-rr94.9%
Taylor expanded in u around 0 85.7%
*-commutative85.7%
Simplified85.7%
if -6.0000000000000003e-94 < t1 < 4.99999999999999992e-46Initial program 90.9%
associate-*l/90.0%
*-commutative90.0%
Simplified90.0%
associate-*r/90.9%
times-frac93.9%
*-commutative93.9%
frac-2neg93.9%
+-commutative93.9%
distribute-neg-in93.9%
sub-neg93.9%
associate-*r/98.1%
add-sqr-sqrt41.2%
sqrt-unprod60.8%
sqr-neg60.8%
sqrt-unprod30.3%
add-sqr-sqrt47.3%
sub-neg47.3%
+-commutative47.3%
add-sqr-sqrt17.0%
sqrt-unprod54.7%
sqr-neg54.7%
sqrt-unprod39.7%
add-sqr-sqrt20.6%
sqrt-unprod51.9%
sqr-neg51.9%
sqrt-unprod32.1%
Applied egg-rr98.1%
Taylor expanded in t1 around 0 85.0%
associate-*r/85.0%
mul-1-neg85.0%
distribute-rgt-neg-in85.0%
Simplified85.0%
Final simplification85.4%
(FPCore (u v t1)
:precision binary64
(if (<= u -1.25e-32)
(* (/ v (+ t1 u)) (/ t1 (- u)))
(if (<= u -2.8e-92)
(/ v (- (* u (- 2.0)) t1))
(if (<= u -1.15e-102)
(/ (- v) (* (+ t1 u) (/ u t1)))
(if (<= u 1.3e-13) (/ v (- t1)) (/ (* t1 (/ v (- u))) (+ t1 u)))))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.25e-32) {
tmp = (v / (t1 + u)) * (t1 / -u);
} else if (u <= -2.8e-92) {
tmp = v / ((u * -2.0) - t1);
} else if (u <= -1.15e-102) {
tmp = -v / ((t1 + u) * (u / t1));
} else if (u <= 1.3e-13) {
tmp = v / -t1;
} else {
tmp = (t1 * (v / -u)) / (t1 + u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-1.25d-32)) then
tmp = (v / (t1 + u)) * (t1 / -u)
else if (u <= (-2.8d-92)) then
tmp = v / ((u * -2.0d0) - t1)
else if (u <= (-1.15d-102)) then
tmp = -v / ((t1 + u) * (u / t1))
else if (u <= 1.3d-13) then
tmp = v / -t1
else
tmp = (t1 * (v / -u)) / (t1 + u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -1.25e-32) {
tmp = (v / (t1 + u)) * (t1 / -u);
} else if (u <= -2.8e-92) {
tmp = v / ((u * -2.0) - t1);
} else if (u <= -1.15e-102) {
tmp = -v / ((t1 + u) * (u / t1));
} else if (u <= 1.3e-13) {
tmp = v / -t1;
} else {
tmp = (t1 * (v / -u)) / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.25e-32: tmp = (v / (t1 + u)) * (t1 / -u) elif u <= -2.8e-92: tmp = v / ((u * -2.0) - t1) elif u <= -1.15e-102: tmp = -v / ((t1 + u) * (u / t1)) elif u <= 1.3e-13: tmp = v / -t1 else: tmp = (t1 * (v / -u)) / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.25e-32) tmp = Float64(Float64(v / Float64(t1 + u)) * Float64(t1 / Float64(-u))); elseif (u <= -2.8e-92) tmp = Float64(v / Float64(Float64(u * Float64(-2.0)) - t1)); elseif (u <= -1.15e-102) tmp = Float64(Float64(-v) / Float64(Float64(t1 + u) * Float64(u / t1))); elseif (u <= 1.3e-13) tmp = Float64(v / Float64(-t1)); else tmp = Float64(Float64(t1 * Float64(v / Float64(-u))) / Float64(t1 + u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -1.25e-32) tmp = (v / (t1 + u)) * (t1 / -u); elseif (u <= -2.8e-92) tmp = v / ((u * -2.0) - t1); elseif (u <= -1.15e-102) tmp = -v / ((t1 + u) * (u / t1)); elseif (u <= 1.3e-13) tmp = v / -t1; else tmp = (t1 * (v / -u)) / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.25e-32], N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(t1 / (-u)), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, -2.8e-92], N[(v / N[(N[(u * (-2.0)), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, -1.15e-102], N[((-v) / N[(N[(t1 + u), $MachinePrecision] * N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 1.3e-13], N[(v / (-t1)), $MachinePrecision], N[(N[(t1 * N[(v / (-u)), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.25 \cdot 10^{-32}:\\
\;\;\;\;\frac{v}{t1 + u} \cdot \frac{t1}{-u}\\
\mathbf{elif}\;u \leq -2.8 \cdot 10^{-92}:\\
\;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\
\mathbf{elif}\;u \leq -1.15 \cdot 10^{-102}:\\
\;\;\;\;\frac{-v}{\left(t1 + u\right) \cdot \frac{u}{t1}}\\
\mathbf{elif}\;u \leq 1.3 \cdot 10^{-13}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{-u}}{t1 + u}\\
\end{array}
\end{array}
if u < -1.25e-32Initial program 86.2%
times-frac98.5%
distribute-frac-neg98.5%
distribute-neg-frac298.5%
+-commutative98.5%
distribute-neg-in98.5%
unsub-neg98.5%
Simplified98.5%
Taylor expanded in t1 around 0 84.3%
associate-*r/84.3%
mul-1-neg84.3%
Simplified84.3%
if -1.25e-32 < u < -2.8e-92Initial program 64.2%
associate-*l/65.2%
*-commutative65.2%
Simplified65.2%
associate-*r/64.2%
times-frac99.7%
*-commutative99.7%
frac-2neg99.7%
remove-double-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
sub-neg99.7%
clear-num99.7%
frac-2neg99.7%
frac-times99.7%
*-un-lft-identity99.7%
+-commutative99.7%
distribute-neg-in99.7%
sub-neg99.7%
Applied egg-rr99.7%
Taylor expanded in u around 0 84.6%
*-commutative84.6%
Simplified84.6%
if -2.8e-92 < u < -1.14999999999999993e-102Initial program 99.6%
associate-*l/99.6%
*-commutative99.6%
Simplified99.6%
associate-*r/99.6%
times-frac77.1%
*-commutative77.1%
frac-2neg77.1%
remove-double-neg77.1%
+-commutative77.1%
distribute-neg-in77.1%
sub-neg77.1%
clear-num76.3%
frac-2neg76.3%
frac-times99.6%
*-un-lft-identity99.6%
+-commutative99.6%
distribute-neg-in99.6%
sub-neg99.6%
Applied egg-rr99.6%
Taylor expanded in t1 around 0 99.6%
if -1.14999999999999993e-102 < u < 1.3e-13Initial program 69.9%
associate-*l/80.1%
*-commutative80.1%
Simplified80.1%
Taylor expanded in t1 around inf 84.2%
associate-*r/84.2%
neg-mul-184.2%
Simplified84.2%
if 1.3e-13 < u Initial program 80.1%
associate-*l/77.3%
*-commutative77.3%
Simplified77.3%
associate-*r/80.1%
times-frac98.1%
*-commutative98.1%
frac-2neg98.1%
+-commutative98.1%
distribute-neg-in98.1%
sub-neg98.1%
associate-*r/98.1%
add-sqr-sqrt43.6%
sqrt-unprod64.0%
sqr-neg64.0%
sqrt-unprod31.4%
add-sqr-sqrt53.0%
sub-neg53.0%
+-commutative53.0%
add-sqr-sqrt21.5%
sqrt-unprod55.8%
sqr-neg55.8%
sqrt-unprod39.7%
add-sqr-sqrt0.0%
sqrt-unprod48.9%
sqr-neg48.9%
sqrt-unprod54.2%
Applied egg-rr98.1%
Taylor expanded in t1 around 0 80.5%
mul-1-neg80.5%
associate-/l*82.7%
distribute-rgt-neg-in82.7%
distribute-neg-frac282.7%
Simplified82.7%
Final simplification84.1%
(FPCore (u v t1)
:precision binary64
(if (<= t1 -5.9e+38)
(/ v (- u t1))
(if (or (<= t1 1.8e-125) (and (not (<= t1 8.4e-91)) (<= t1 3.2e-46)))
(* (/ t1 (- u)) (/ v u))
(/ v (- (* u (- 2.0)) t1)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -5.9e+38) {
tmp = v / (u - t1);
} else if ((t1 <= 1.8e-125) || (!(t1 <= 8.4e-91) && (t1 <= 3.2e-46))) {
tmp = (t1 / -u) * (v / u);
} else {
tmp = v / ((u * -2.0) - t1);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (t1 <= (-5.9d+38)) then
tmp = v / (u - t1)
else if ((t1 <= 1.8d-125) .or. (.not. (t1 <= 8.4d-91)) .and. (t1 <= 3.2d-46)) then
tmp = (t1 / -u) * (v / u)
else
tmp = v / ((u * -2.0d0) - t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -5.9e+38) {
tmp = v / (u - t1);
} else if ((t1 <= 1.8e-125) || (!(t1 <= 8.4e-91) && (t1 <= 3.2e-46))) {
tmp = (t1 / -u) * (v / u);
} else {
tmp = v / ((u * -2.0) - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -5.9e+38: tmp = v / (u - t1) elif (t1 <= 1.8e-125) or (not (t1 <= 8.4e-91) and (t1 <= 3.2e-46)): tmp = (t1 / -u) * (v / u) else: tmp = v / ((u * -2.0) - t1) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -5.9e+38) tmp = Float64(v / Float64(u - t1)); elseif ((t1 <= 1.8e-125) || (!(t1 <= 8.4e-91) && (t1 <= 3.2e-46))) tmp = Float64(Float64(t1 / Float64(-u)) * Float64(v / u)); else tmp = Float64(v / Float64(Float64(u * Float64(-2.0)) - t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -5.9e+38) tmp = v / (u - t1); elseif ((t1 <= 1.8e-125) || (~((t1 <= 8.4e-91)) && (t1 <= 3.2e-46))) tmp = (t1 / -u) * (v / u); else tmp = v / ((u * -2.0) - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -5.9e+38], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t1, 1.8e-125], And[N[Not[LessEqual[t1, 8.4e-91]], $MachinePrecision], LessEqual[t1, 3.2e-46]]], N[(N[(t1 / (-u)), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision], N[(v / N[(N[(u * (-2.0)), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -5.9 \cdot 10^{+38}:\\
\;\;\;\;\frac{v}{u - t1}\\
\mathbf{elif}\;t1 \leq 1.8 \cdot 10^{-125} \lor \neg \left(t1 \leq 8.4 \cdot 10^{-91}\right) \land t1 \leq 3.2 \cdot 10^{-46}:\\
\;\;\;\;\frac{t1}{-u} \cdot \frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\
\end{array}
\end{array}
if t1 < -5.89999999999999981e38Initial program 55.2%
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 88.6%
*-commutative88.6%
clear-num88.1%
frac-times70.5%
*-un-lft-identity70.5%
sub-neg70.5%
add-sqr-sqrt40.5%
add-sqr-sqrt40.5%
sqrt-unprod68.3%
sqr-neg68.3%
sqrt-unprod30.1%
add-sqr-sqrt70.6%
sqrt-unprod55.8%
sqr-neg55.8%
sqrt-unprod0.0%
add-sqr-sqrt38.6%
+-commutative38.6%
Applied egg-rr38.6%
associate-/l/35.0%
associate-/r/35.0%
/-rgt-identity35.0%
times-frac35.0%
*-rgt-identity35.0%
associate-*r/35.0%
associate-*l/35.0%
associate-/l*38.6%
Simplified38.6%
frac-2neg38.6%
associate-*r/35.0%
distribute-neg-frac35.0%
add-sqr-sqrt12.9%
sqrt-unprod47.7%
sqr-neg47.7%
sqrt-unprod50.2%
add-sqr-sqrt88.6%
associate-*r/51.8%
+-commutative51.8%
distribute-neg-in51.8%
add-sqr-sqrt33.7%
sqrt-unprod56.0%
sqr-neg56.0%
sqrt-unprod18.3%
add-sqr-sqrt51.9%
Applied egg-rr51.9%
*-lft-identity51.9%
*-commutative51.9%
times-frac88.7%
/-rgt-identity88.7%
*-inverses88.7%
*-rgt-identity88.7%
sub-neg88.7%
Simplified88.7%
if -5.89999999999999981e38 < t1 < 1.8000000000000001e-125 or 8.3999999999999997e-91 < t1 < 3.1999999999999999e-46Initial program 91.8%
times-frac95.2%
distribute-frac-neg95.2%
distribute-neg-frac295.2%
+-commutative95.2%
distribute-neg-in95.2%
unsub-neg95.2%
Simplified95.2%
Taylor expanded in t1 around 0 80.5%
associate-*r/80.5%
mul-1-neg80.5%
Simplified80.5%
Taylor expanded in t1 around 0 81.5%
if 1.8000000000000001e-125 < t1 < 8.3999999999999997e-91 or 3.1999999999999999e-46 < t1 Initial program 68.2%
associate-*l/74.1%
*-commutative74.1%
Simplified74.1%
associate-*r/68.2%
times-frac98.6%
*-commutative98.6%
frac-2neg98.6%
remove-double-neg98.6%
+-commutative98.6%
distribute-neg-in98.6%
sub-neg98.6%
clear-num98.6%
frac-2neg98.6%
frac-times96.1%
*-un-lft-identity96.1%
+-commutative96.1%
distribute-neg-in96.1%
sub-neg96.1%
Applied egg-rr96.1%
Taylor expanded in u around 0 86.7%
*-commutative86.7%
Simplified86.7%
Final simplification84.6%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ v (- u t1))) (t_2 (* (/ t1 (- u)) (/ v u))))
(if (<= t1 -7.4e+38)
t_1
(if (<= t1 4.1e-125)
t_2
(if (<= t1 8.8e-91) (/ v (- (- u) t1)) (if (<= t1 3.6e-46) t_2 t_1))))))
double code(double u, double v, double t1) {
double t_1 = v / (u - t1);
double t_2 = (t1 / -u) * (v / u);
double tmp;
if (t1 <= -7.4e+38) {
tmp = t_1;
} else if (t1 <= 4.1e-125) {
tmp = t_2;
} else if (t1 <= 8.8e-91) {
tmp = v / (-u - t1);
} else if (t1 <= 3.6e-46) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = v / (u - t1)
t_2 = (t1 / -u) * (v / u)
if (t1 <= (-7.4d+38)) then
tmp = t_1
else if (t1 <= 4.1d-125) then
tmp = t_2
else if (t1 <= 8.8d-91) then
tmp = v / (-u - t1)
else if (t1 <= 3.6d-46) then
tmp = t_2
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 - t1);
double t_2 = (t1 / -u) * (v / u);
double tmp;
if (t1 <= -7.4e+38) {
tmp = t_1;
} else if (t1 <= 4.1e-125) {
tmp = t_2;
} else if (t1 <= 8.8e-91) {
tmp = v / (-u - t1);
} else if (t1 <= 3.6e-46) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(u, v, t1): t_1 = v / (u - t1) t_2 = (t1 / -u) * (v / u) tmp = 0 if t1 <= -7.4e+38: tmp = t_1 elif t1 <= 4.1e-125: tmp = t_2 elif t1 <= 8.8e-91: tmp = v / (-u - t1) elif t1 <= 3.6e-46: tmp = t_2 else: tmp = t_1 return tmp
function code(u, v, t1) t_1 = Float64(v / Float64(u - t1)) t_2 = Float64(Float64(t1 / Float64(-u)) * Float64(v / u)) tmp = 0.0 if (t1 <= -7.4e+38) tmp = t_1; elseif (t1 <= 4.1e-125) tmp = t_2; elseif (t1 <= 8.8e-91) tmp = Float64(v / Float64(Float64(-u) - t1)); elseif (t1 <= 3.6e-46) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(u, v, t1) t_1 = v / (u - t1); t_2 = (t1 / -u) * (v / u); tmp = 0.0; if (t1 <= -7.4e+38) tmp = t_1; elseif (t1 <= 4.1e-125) tmp = t_2; elseif (t1 <= 8.8e-91) tmp = v / (-u - t1); elseif (t1 <= 3.6e-46) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t1 / (-u)), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -7.4e+38], t$95$1, If[LessEqual[t1, 4.1e-125], t$95$2, If[LessEqual[t1, 8.8e-91], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 3.6e-46], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{v}{u - t1}\\
t_2 := \frac{t1}{-u} \cdot \frac{v}{u}\\
\mathbf{if}\;t1 \leq -7.4 \cdot 10^{+38}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t1 \leq 4.1 \cdot 10^{-125}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t1 \leq 8.8 \cdot 10^{-91}:\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{elif}\;t1 \leq 3.6 \cdot 10^{-46}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t1 < -7.4000000000000002e38 or 3.6e-46 < t1 Initial program 60.4%
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 87.9%
*-commutative87.9%
clear-num87.4%
frac-times71.6%
*-un-lft-identity71.6%
sub-neg71.6%
add-sqr-sqrt37.6%
add-sqr-sqrt19.6%
sqrt-unprod33.0%
sqr-neg33.0%
sqrt-unprod14.5%
add-sqr-sqrt34.1%
sqrt-unprod41.5%
sqr-neg41.5%
sqrt-unprod14.5%
add-sqr-sqrt33.1%
+-commutative33.1%
Applied egg-rr33.1%
associate-/l/30.7%
associate-/r/30.7%
/-rgt-identity30.7%
times-frac30.7%
*-rgt-identity30.7%
associate-*r/30.7%
associate-*l/30.7%
associate-/l*33.1%
Simplified33.1%
frac-2neg33.1%
associate-*r/30.7%
distribute-neg-frac30.7%
add-sqr-sqrt14.5%
sqrt-unprod47.8%
sqr-neg47.8%
sqrt-unprod47.2%
add-sqr-sqrt87.9%
associate-*r/58.0%
+-commutative58.0%
distribute-neg-in58.0%
add-sqr-sqrt31.1%
sqrt-unprod59.7%
sqr-neg59.7%
sqrt-unprod26.9%
add-sqr-sqrt58.1%
Applied egg-rr58.1%
*-lft-identity58.1%
*-commutative58.1%
times-frac88.0%
/-rgt-identity88.0%
*-inverses88.0%
*-rgt-identity88.0%
sub-neg88.0%
Simplified88.0%
if -7.4000000000000002e38 < t1 < 4.0999999999999997e-125 or 8.8000000000000003e-91 < t1 < 3.6e-46Initial program 91.8%
times-frac95.2%
distribute-frac-neg95.2%
distribute-neg-frac295.2%
+-commutative95.2%
distribute-neg-in95.2%
unsub-neg95.2%
Simplified95.2%
Taylor expanded in t1 around 0 80.5%
associate-*r/80.5%
mul-1-neg80.5%
Simplified80.5%
Taylor expanded in t1 around 0 81.5%
if 4.0999999999999997e-125 < t1 < 8.8000000000000003e-91Initial program 88.8%
associate-*l/99.3%
*-commutative99.3%
Simplified99.3%
associate-*r/88.8%
times-frac89.8%
*-commutative89.8%
frac-2neg89.8%
+-commutative89.8%
distribute-neg-in89.8%
sub-neg89.8%
associate-*r/99.8%
add-sqr-sqrt0.0%
sqrt-unprod11.9%
sqr-neg11.9%
sqrt-unprod11.9%
add-sqr-sqrt11.9%
sub-neg11.9%
+-commutative11.9%
add-sqr-sqrt0.0%
sqrt-unprod88.9%
sqr-neg88.9%
sqrt-unprod88.6%
add-sqr-sqrt55.4%
sqrt-unprod99.5%
sqr-neg99.5%
sqrt-unprod44.3%
Applied egg-rr99.8%
Taylor expanded in t1 around inf 79.5%
mul-1-neg79.5%
Simplified79.5%
Final simplification84.5%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ t1 (- u))))
(if (<= u -6.3e-32)
(* (/ v (+ t1 u)) t_1)
(if (<= u -2e-91)
(/ v (- (* u (- 2.0)) t1))
(if (<= u -1.15e-102)
(/ (- v) (* (+ t1 u) (/ u t1)))
(if (<= u 3.8e-14) (/ v (- t1)) (* t_1 (/ v u))))))))
double code(double u, double v, double t1) {
double t_1 = t1 / -u;
double tmp;
if (u <= -6.3e-32) {
tmp = (v / (t1 + u)) * t_1;
} else if (u <= -2e-91) {
tmp = v / ((u * -2.0) - t1);
} else if (u <= -1.15e-102) {
tmp = -v / ((t1 + u) * (u / t1));
} else if (u <= 3.8e-14) {
tmp = v / -t1;
} else {
tmp = t_1 * (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) :: t_1
real(8) :: tmp
t_1 = t1 / -u
if (u <= (-6.3d-32)) then
tmp = (v / (t1 + u)) * t_1
else if (u <= (-2d-91)) then
tmp = v / ((u * -2.0d0) - t1)
else if (u <= (-1.15d-102)) then
tmp = -v / ((t1 + u) * (u / t1))
else if (u <= 3.8d-14) then
tmp = v / -t1
else
tmp = t_1 * (v / u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = t1 / -u;
double tmp;
if (u <= -6.3e-32) {
tmp = (v / (t1 + u)) * t_1;
} else if (u <= -2e-91) {
tmp = v / ((u * -2.0) - t1);
} else if (u <= -1.15e-102) {
tmp = -v / ((t1 + u) * (u / t1));
} else if (u <= 3.8e-14) {
tmp = v / -t1;
} else {
tmp = t_1 * (v / u);
}
return tmp;
}
def code(u, v, t1): t_1 = t1 / -u tmp = 0 if u <= -6.3e-32: tmp = (v / (t1 + u)) * t_1 elif u <= -2e-91: tmp = v / ((u * -2.0) - t1) elif u <= -1.15e-102: tmp = -v / ((t1 + u) * (u / t1)) elif u <= 3.8e-14: tmp = v / -t1 else: tmp = t_1 * (v / u) return tmp
function code(u, v, t1) t_1 = Float64(t1 / Float64(-u)) tmp = 0.0 if (u <= -6.3e-32) tmp = Float64(Float64(v / Float64(t1 + u)) * t_1); elseif (u <= -2e-91) tmp = Float64(v / Float64(Float64(u * Float64(-2.0)) - t1)); elseif (u <= -1.15e-102) tmp = Float64(Float64(-v) / Float64(Float64(t1 + u) * Float64(u / t1))); elseif (u <= 3.8e-14) tmp = Float64(v / Float64(-t1)); else tmp = Float64(t_1 * Float64(v / u)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = t1 / -u; tmp = 0.0; if (u <= -6.3e-32) tmp = (v / (t1 + u)) * t_1; elseif (u <= -2e-91) tmp = v / ((u * -2.0) - t1); elseif (u <= -1.15e-102) tmp = -v / ((t1 + u) * (u / t1)); elseif (u <= 3.8e-14) tmp = v / -t1; else tmp = t_1 * (v / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(t1 / (-u)), $MachinePrecision]}, If[LessEqual[u, -6.3e-32], N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[u, -2e-91], N[(v / N[(N[(u * (-2.0)), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, -1.15e-102], N[((-v) / N[(N[(t1 + u), $MachinePrecision] * N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 3.8e-14], N[(v / (-t1)), $MachinePrecision], N[(t$95$1 * N[(v / u), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t1}{-u}\\
\mathbf{if}\;u \leq -6.3 \cdot 10^{-32}:\\
\;\;\;\;\frac{v}{t1 + u} \cdot t\_1\\
\mathbf{elif}\;u \leq -2 \cdot 10^{-91}:\\
\;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\
\mathbf{elif}\;u \leq -1.15 \cdot 10^{-102}:\\
\;\;\;\;\frac{-v}{\left(t1 + u\right) \cdot \frac{u}{t1}}\\
\mathbf{elif}\;u \leq 3.8 \cdot 10^{-14}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \frac{v}{u}\\
\end{array}
\end{array}
if u < -6.2999999999999997e-32Initial program 86.2%
times-frac98.5%
distribute-frac-neg98.5%
distribute-neg-frac298.5%
+-commutative98.5%
distribute-neg-in98.5%
unsub-neg98.5%
Simplified98.5%
Taylor expanded in t1 around 0 84.3%
associate-*r/84.3%
mul-1-neg84.3%
Simplified84.3%
if -6.2999999999999997e-32 < u < -2.00000000000000004e-91Initial program 64.2%
associate-*l/65.2%
*-commutative65.2%
Simplified65.2%
associate-*r/64.2%
times-frac99.7%
*-commutative99.7%
frac-2neg99.7%
remove-double-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
sub-neg99.7%
clear-num99.7%
frac-2neg99.7%
frac-times99.7%
*-un-lft-identity99.7%
+-commutative99.7%
distribute-neg-in99.7%
sub-neg99.7%
Applied egg-rr99.7%
Taylor expanded in u around 0 84.6%
*-commutative84.6%
Simplified84.6%
if -2.00000000000000004e-91 < u < -1.14999999999999993e-102Initial program 99.6%
associate-*l/99.6%
*-commutative99.6%
Simplified99.6%
associate-*r/99.6%
times-frac77.1%
*-commutative77.1%
frac-2neg77.1%
remove-double-neg77.1%
+-commutative77.1%
distribute-neg-in77.1%
sub-neg77.1%
clear-num76.3%
frac-2neg76.3%
frac-times99.6%
*-un-lft-identity99.6%
+-commutative99.6%
distribute-neg-in99.6%
sub-neg99.6%
Applied egg-rr99.6%
Taylor expanded in t1 around 0 99.6%
if -1.14999999999999993e-102 < u < 3.8000000000000002e-14Initial program 69.9%
associate-*l/80.1%
*-commutative80.1%
Simplified80.1%
Taylor expanded in t1 around inf 84.2%
associate-*r/84.2%
neg-mul-184.2%
Simplified84.2%
if 3.8000000000000002e-14 < u Initial program 80.1%
times-frac98.1%
distribute-frac-neg98.1%
distribute-neg-frac298.1%
+-commutative98.1%
distribute-neg-in98.1%
unsub-neg98.1%
Simplified98.1%
Taylor expanded in t1 around 0 81.0%
associate-*r/81.0%
mul-1-neg81.0%
Simplified81.0%
Taylor expanded in t1 around 0 81.2%
Final simplification83.7%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -7.4e-155) (not (<= t1 3.2e-149))) (/ v (- (- u) t1)) (/ v (* t1 (/ u t1)))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -7.4e-155) || !(t1 <= 3.2e-149)) {
tmp = v / (-u - t1);
} 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 <= (-7.4d-155)) .or. (.not. (t1 <= 3.2d-149))) then
tmp = v / (-u - t1)
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 <= -7.4e-155) || !(t1 <= 3.2e-149)) {
tmp = v / (-u - t1);
} else {
tmp = v / (t1 * (u / t1));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -7.4e-155) or not (t1 <= 3.2e-149): tmp = v / (-u - t1) else: tmp = v / (t1 * (u / t1)) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -7.4e-155) || !(t1 <= 3.2e-149)) tmp = Float64(v / Float64(Float64(-u) - t1)); else tmp = Float64(v / Float64(t1 * Float64(u / t1))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -7.4e-155) || ~((t1 <= 3.2e-149))) tmp = v / (-u - t1); else tmp = v / (t1 * (u / t1)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -7.4e-155], N[Not[LessEqual[t1, 3.2e-149]], $MachinePrecision]], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], N[(v / N[(t1 * N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -7.4 \cdot 10^{-155} \lor \neg \left(t1 \leq 3.2 \cdot 10^{-149}\right):\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{t1 \cdot \frac{u}{t1}}\\
\end{array}
\end{array}
if t1 < -7.4000000000000001e-155 or 3.20000000000000002e-149 < t1 Initial program 72.5%
associate-*l/78.8%
*-commutative78.8%
Simplified78.8%
associate-*r/72.5%
times-frac98.8%
*-commutative98.8%
frac-2neg98.8%
+-commutative98.8%
distribute-neg-in98.8%
sub-neg98.8%
associate-*r/99.7%
add-sqr-sqrt53.9%
sqrt-unprod50.3%
sqr-neg50.3%
sqrt-unprod15.1%
add-sqr-sqrt34.4%
sub-neg34.4%
+-commutative34.4%
add-sqr-sqrt19.2%
sqrt-unprod50.2%
sqr-neg50.2%
sqrt-unprod38.6%
add-sqr-sqrt18.9%
sqrt-unprod40.1%
sqr-neg40.1%
sqrt-unprod23.7%
Applied egg-rr99.7%
Taylor expanded in t1 around inf 74.2%
mul-1-neg74.2%
Simplified74.2%
if -7.4000000000000001e-155 < t1 < 3.20000000000000002e-149Initial program 90.5%
times-frac92.5%
distribute-frac-neg92.5%
distribute-neg-frac292.5%
+-commutative92.5%
distribute-neg-in92.5%
unsub-neg92.5%
Simplified92.5%
Taylor expanded in t1 around inf 30.0%
clear-num32.9%
frac-times46.5%
*-un-lft-identity46.5%
sub-neg46.5%
distribute-neg-in46.5%
+-commutative46.5%
add-sqr-sqrt29.6%
sqrt-unprod53.2%
sqr-neg53.2%
sqrt-unprod17.1%
add-sqr-sqrt42.6%
frac-2neg42.6%
Applied egg-rr42.6%
Taylor expanded in t1 around 0 42.9%
Final simplification66.5%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1.6e-155) (not (<= t1 1.55e-144))) (/ v (- (- u) t1)) (/ (* v (/ t1 u)) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.6e-155) || !(t1 <= 1.55e-144)) {
tmp = v / (-u - t1);
} 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.6d-155)) .or. (.not. (t1 <= 1.55d-144))) then
tmp = v / (-u - t1)
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.6e-155) || !(t1 <= 1.55e-144)) {
tmp = v / (-u - t1);
} else {
tmp = (v * (t1 / u)) / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.6e-155) or not (t1 <= 1.55e-144): tmp = v / (-u - t1) else: tmp = (v * (t1 / u)) / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.6e-155) || !(t1 <= 1.55e-144)) tmp = Float64(v / Float64(Float64(-u) - t1)); 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.6e-155) || ~((t1 <= 1.55e-144))) tmp = v / (-u - t1); else tmp = (v * (t1 / u)) / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.6e-155], N[Not[LessEqual[t1, 1.55e-144]], $MachinePrecision]], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], N[(N[(v * N[(t1 / u), $MachinePrecision]), $MachinePrecision] / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.6 \cdot 10^{-155} \lor \neg \left(t1 \leq 1.55 \cdot 10^{-144}\right):\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v \cdot \frac{t1}{u}}{t1}\\
\end{array}
\end{array}
if t1 < -1.60000000000000006e-155 or 1.55e-144 < t1 Initial program 72.4%
associate-*l/78.7%
*-commutative78.7%
Simplified78.7%
associate-*r/72.4%
times-frac98.8%
*-commutative98.8%
frac-2neg98.8%
+-commutative98.8%
distribute-neg-in98.8%
sub-neg98.8%
associate-*r/99.7%
add-sqr-sqrt54.1%
sqrt-unprod50.1%
sqr-neg50.1%
sqrt-unprod14.7%
add-sqr-sqrt34.0%
sub-neg34.0%
+-commutative34.0%
add-sqr-sqrt19.3%
sqrt-unprod49.9%
sqr-neg49.9%
sqrt-unprod38.2%
add-sqr-sqrt18.4%
sqrt-unprod39.8%
sqr-neg39.8%
sqrt-unprod23.8%
Applied egg-rr99.7%
Taylor expanded in t1 around inf 74.6%
mul-1-neg74.6%
Simplified74.6%
if -1.60000000000000006e-155 < t1 < 1.55e-144Initial program 90.7%
times-frac92.7%
distribute-frac-neg92.7%
distribute-neg-frac292.7%
+-commutative92.7%
distribute-neg-in92.7%
unsub-neg92.7%
Simplified92.7%
Taylor expanded in t1 around inf 29.6%
associate-*r/57.5%
add-sqr-sqrt36.6%
sqrt-unprod53.9%
sqr-neg53.9%
sqrt-unprod21.1%
add-sqr-sqrt53.6%
sub-neg53.6%
distribute-neg-in53.6%
+-commutative53.6%
frac-2neg53.6%
Applied egg-rr53.6%
Taylor expanded in t1 around 0 42.3%
*-rgt-identity42.3%
times-frac53.9%
/-rgt-identity53.9%
Simplified53.9%
Final simplification69.4%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1.45e+46) (not (<= t1 2.05e+95))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.45e+46) || !(t1 <= 2.05e+95)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-1.45d+46)) .or. (.not. (t1 <= 2.05d+95))) then
tmp = v / t1
else
tmp = v / u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.45e+46) || !(t1 <= 2.05e+95)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.45e+46) or not (t1 <= 2.05e+95): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.45e+46) || !(t1 <= 2.05e+95)) tmp = Float64(v / t1); else tmp = Float64(v / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -1.45e+46) || ~((t1 <= 2.05e+95))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.45e+46], N[Not[LessEqual[t1, 2.05e+95]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.45 \cdot 10^{+46} \lor \neg \left(t1 \leq 2.05 \cdot 10^{+95}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -1.4500000000000001e46 or 2.04999999999999993e95 < t1 Initial program 48.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 88.6%
*-commutative88.6%
clear-num88.0%
frac-times67.5%
*-un-lft-identity67.5%
sub-neg67.5%
add-sqr-sqrt39.4%
add-sqr-sqrt26.7%
sqrt-unprod43.9%
sqr-neg43.9%
sqrt-unprod18.7%
add-sqr-sqrt45.4%
sqrt-unprod47.9%
sqr-neg47.9%
sqrt-unprod12.2%
add-sqr-sqrt37.5%
+-commutative37.5%
Applied egg-rr37.5%
associate-/l/34.2%
associate-/r/34.2%
/-rgt-identity34.2%
times-frac34.2%
*-rgt-identity34.2%
associate-*r/34.2%
associate-*l/34.2%
associate-/l*37.5%
Simplified37.5%
Taylor expanded in t1 around inf 33.5%
if -1.4500000000000001e46 < t1 < 2.04999999999999993e95Initial program 92.0%
times-frac95.8%
distribute-frac-neg95.8%
distribute-neg-frac295.8%
+-commutative95.8%
distribute-neg-in95.8%
unsub-neg95.8%
Simplified95.8%
Taylor expanded in t1 around inf 50.1%
*-commutative50.1%
clear-num49.9%
frac-times42.4%
*-un-lft-identity42.4%
sub-neg42.4%
add-sqr-sqrt18.9%
add-sqr-sqrt8.4%
sqrt-unprod21.7%
sqr-neg21.7%
sqrt-unprod9.4%
add-sqr-sqrt16.9%
sqrt-unprod25.0%
sqr-neg25.0%
sqrt-unprod8.6%
add-sqr-sqrt15.0%
+-commutative15.0%
Applied egg-rr15.0%
associate-/l/20.6%
associate-/r/26.9%
/-rgt-identity26.9%
times-frac36.0%
*-rgt-identity36.0%
associate-*r/20.6%
associate-*l/15.0%
associate-/l*15.0%
Simplified15.0%
Taylor expanded in t1 around 0 15.8%
Final simplification21.9%
(FPCore (u v t1) :precision binary64 (* (/ t1 (+ t1 u)) (/ v (- (- u) t1))))
double code(double u, double v, double t1) {
return (t1 / (t1 + u)) * (v / (-u - t1));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (t1 / (t1 + u)) * (v / (-u - t1))
end function
public static double code(double u, double v, double t1) {
return (t1 / (t1 + u)) * (v / (-u - t1));
}
def code(u, v, t1): return (t1 / (t1 + u)) * (v / (-u - t1))
function code(u, v, t1) return Float64(Float64(t1 / Float64(t1 + u)) * Float64(v / Float64(Float64(-u) - t1))) end
function tmp = code(u, v, t1) tmp = (t1 / (t1 + u)) * (v / (-u - t1)); end
code[u_, v_, t1_] := N[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{t1}{t1 + u} \cdot \frac{v}{\left(-u\right) - t1}
\end{array}
Initial program 77.0%
times-frac97.2%
distribute-frac-neg97.2%
distribute-neg-frac297.2%
+-commutative97.2%
distribute-neg-in97.2%
unsub-neg97.2%
Simplified97.2%
Final simplification97.2%
(FPCore (u v t1) :precision binary64 (if (<= u 1.6e+160) (/ v (- t1)) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if (u <= 1.6e+160) {
tmp = v / -t1;
} else {
tmp = v / u;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= 1.6d+160) then
tmp = v / -t1
else
tmp = v / u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= 1.6e+160) {
tmp = v / -t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= 1.6e+160: tmp = v / -t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= 1.6e+160) tmp = Float64(v / Float64(-t1)); else tmp = Float64(v / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= 1.6e+160) tmp = v / -t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, 1.6e+160], N[(v / (-t1)), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq 1.6 \cdot 10^{+160}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if u < 1.5999999999999999e160Initial program 76.8%
associate-*l/80.4%
*-commutative80.4%
Simplified80.4%
Taylor expanded in t1 around inf 57.5%
associate-*r/57.5%
neg-mul-157.5%
Simplified57.5%
if 1.5999999999999999e160 < u Initial program 78.2%
times-frac98.9%
distribute-frac-neg98.9%
distribute-neg-frac298.9%
+-commutative98.9%
distribute-neg-in98.9%
unsub-neg98.9%
Simplified98.9%
Taylor expanded in t1 around inf 63.4%
*-commutative63.4%
clear-num63.3%
frac-times52.4%
*-un-lft-identity52.4%
sub-neg52.4%
add-sqr-sqrt0.0%
add-sqr-sqrt0.0%
sqrt-unprod31.1%
sqr-neg31.1%
sqrt-unprod22.6%
add-sqr-sqrt22.6%
sqrt-unprod45.4%
sqr-neg45.4%
sqrt-unprod26.2%
add-sqr-sqrt45.3%
+-commutative45.3%
Applied egg-rr45.3%
associate-/l/56.3%
associate-/r/67.0%
/-rgt-identity67.0%
times-frac67.0%
*-rgt-identity67.0%
associate-*r/56.3%
associate-*l/42.8%
associate-/l*45.3%
Simplified45.3%
Taylor expanded in t1 around 0 43.3%
Final simplification56.0%
(FPCore (u v t1) :precision binary64 (if (<= u 8e+158) (/ v (- t1)) (/ v (- u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= 8e+158) {
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 <= 8d+158) 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 <= 8e+158) {
tmp = v / -t1;
} else {
tmp = v / -u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= 8e+158: tmp = v / -t1 else: tmp = v / -u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= 8e+158) tmp = Float64(v / Float64(-t1)); else tmp = Float64(v / Float64(-u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= 8e+158) tmp = v / -t1; else tmp = v / -u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, 8e+158], N[(v / (-t1)), $MachinePrecision], N[(v / (-u)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq 8 \cdot 10^{+158}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-u}\\
\end{array}
\end{array}
if u < 7.99999999999999962e158Initial program 76.8%
associate-*l/80.4%
*-commutative80.4%
Simplified80.4%
Taylor expanded in t1 around inf 57.5%
associate-*r/57.5%
neg-mul-157.5%
Simplified57.5%
if 7.99999999999999962e158 < u Initial program 78.2%
times-frac98.9%
distribute-frac-neg98.9%
distribute-neg-frac298.9%
+-commutative98.9%
distribute-neg-in98.9%
unsub-neg98.9%
Simplified98.9%
Taylor expanded in t1 around inf 63.4%
Taylor expanded in t1 around 0 43.5%
associate-*r/43.5%
mul-1-neg43.5%
Simplified43.5%
Final simplification56.0%
(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 77.0%
associate-*l/80.2%
*-commutative80.2%
Simplified80.2%
associate-*r/77.0%
times-frac97.2%
*-commutative97.2%
frac-2neg97.2%
+-commutative97.2%
distribute-neg-in97.2%
sub-neg97.2%
associate-*r/99.0%
add-sqr-sqrt50.4%
sqrt-unprod51.7%
sqr-neg51.7%
sqrt-unprod19.9%
add-sqr-sqrt39.2%
sub-neg39.2%
+-commutative39.2%
add-sqr-sqrt19.3%
sqrt-unprod51.2%
sqr-neg51.2%
sqrt-unprod38.5%
add-sqr-sqrt19.1%
sqrt-unprod43.0%
sqr-neg43.0%
sqrt-unprod26.1%
Applied egg-rr99.0%
Taylor expanded in t1 around inf 59.8%
mul-1-neg59.8%
Simplified59.8%
Final simplification59.8%
(FPCore (u v t1) :precision binary64 (/ v (- u t1)))
double code(double u, double v, double t1) {
return v / (u - t1);
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = v / (u - t1)
end function
public static double code(double u, double v, double t1) {
return v / (u - t1);
}
def code(u, v, t1): return v / (u - t1)
function code(u, v, t1) return Float64(v / Float64(u - t1)) end
function tmp = code(u, v, t1) tmp = v / (u - t1); end
code[u_, v_, t1_] := N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{u - t1}
\end{array}
Initial program 77.0%
times-frac97.2%
distribute-frac-neg97.2%
distribute-neg-frac297.2%
+-commutative97.2%
distribute-neg-in97.2%
unsub-neg97.2%
Simplified97.2%
Taylor expanded in t1 around inf 63.3%
*-commutative63.3%
clear-num63.0%
frac-times51.1%
*-un-lft-identity51.1%
sub-neg51.1%
add-sqr-sqrt26.0%
add-sqr-sqrt14.7%
sqrt-unprod29.3%
sqr-neg29.3%
sqrt-unprod12.6%
add-sqr-sqrt26.7%
sqrt-unprod32.9%
sqr-neg32.9%
sqrt-unprod9.8%
add-sqr-sqrt22.8%
+-commutative22.8%
Applied egg-rr22.8%
associate-/l/25.3%
associate-/r/29.4%
/-rgt-identity29.4%
times-frac35.4%
*-rgt-identity35.4%
associate-*r/25.3%
associate-*l/21.6%
associate-/l*22.8%
Simplified22.8%
frac-2neg22.8%
associate-*r/21.6%
distribute-neg-frac21.6%
add-sqr-sqrt12.0%
sqrt-unprod37.1%
sqr-neg37.1%
sqrt-unprod30.2%
add-sqr-sqrt59.7%
associate-*r/47.0%
+-commutative47.0%
distribute-neg-in47.0%
add-sqr-sqrt24.0%
sqrt-unprod56.1%
sqr-neg56.1%
sqrt-unprod23.1%
add-sqr-sqrt46.6%
Applied egg-rr46.6%
*-lft-identity46.6%
*-commutative46.6%
times-frac59.3%
/-rgt-identity59.3%
*-inverses59.3%
*-rgt-identity59.3%
sub-neg59.3%
Simplified59.3%
Final simplification59.3%
(FPCore (u v t1) :precision binary64 (/ v t1))
double code(double u, double v, double t1) {
return v / t1;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = v / t1
end function
public static double code(double u, double v, double t1) {
return v / t1;
}
def code(u, v, t1): return v / t1
function code(u, v, t1) return Float64(v / t1) end
function tmp = code(u, v, t1) tmp = v / t1; end
code[u_, v_, t1_] := N[(v / t1), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{t1}
\end{array}
Initial program 77.0%
times-frac97.2%
distribute-frac-neg97.2%
distribute-neg-frac297.2%
+-commutative97.2%
distribute-neg-in97.2%
unsub-neg97.2%
Simplified97.2%
Taylor expanded in t1 around inf 63.3%
*-commutative63.3%
clear-num63.0%
frac-times51.1%
*-un-lft-identity51.1%
sub-neg51.1%
add-sqr-sqrt26.0%
add-sqr-sqrt14.7%
sqrt-unprod29.3%
sqr-neg29.3%
sqrt-unprod12.6%
add-sqr-sqrt26.7%
sqrt-unprod32.9%
sqr-neg32.9%
sqrt-unprod9.8%
add-sqr-sqrt22.8%
+-commutative22.8%
Applied egg-rr22.8%
associate-/l/25.3%
associate-/r/29.4%
/-rgt-identity29.4%
times-frac35.4%
*-rgt-identity35.4%
associate-*r/25.3%
associate-*l/21.6%
associate-/l*22.8%
Simplified22.8%
Taylor expanded in t1 around inf 13.8%
Final simplification13.8%
herbie shell --seed 2024089
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))