
(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 14 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[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * (-v)), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{t1 + u}
\end{array}
Initial program 72.1%
associate-*l/75.5%
*-commutative75.5%
Simplified75.5%
associate-*r/72.1%
*-commutative72.1%
times-frac97.4%
frac-2neg97.4%
+-commutative97.4%
distribute-neg-in97.4%
sub-neg97.4%
associate-*r/97.8%
add-sqr-sqrt47.0%
sqrt-unprod43.5%
sqr-neg43.5%
sqrt-unprod19.6%
add-sqr-sqrt33.6%
sub-neg33.6%
+-commutative33.6%
add-sqr-sqrt14.0%
sqrt-unprod44.6%
sqr-neg44.6%
sqrt-unprod39.6%
add-sqr-sqrt18.8%
sqrt-unprod43.1%
sqr-neg43.1%
Applied egg-rr97.8%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (- (- u) t1)) (t_2 (/ v (- (- t1) (* u 2.0)))))
(if (<= t1 -1.95e+148)
t_2
(if (<= t1 -9e-152)
(* v (/ t1 (* (+ t1 u) t_1)))
(if (<= t1 4.8e-230)
(/ v (* (- u) (/ u t1)))
(if (<= t1 6.4e+59) (* t1 (/ (/ v (+ t1 u)) t_1)) t_2))))))
double code(double u, double v, double t1) {
double t_1 = -u - t1;
double t_2 = v / (-t1 - (u * 2.0));
double tmp;
if (t1 <= -1.95e+148) {
tmp = t_2;
} else if (t1 <= -9e-152) {
tmp = v * (t1 / ((t1 + u) * t_1));
} else if (t1 <= 4.8e-230) {
tmp = v / (-u * (u / t1));
} else if (t1 <= 6.4e+59) {
tmp = t1 * ((v / (t1 + u)) / t_1);
} else {
tmp = t_2;
}
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 = -u - t1
t_2 = v / (-t1 - (u * 2.0d0))
if (t1 <= (-1.95d+148)) then
tmp = t_2
else if (t1 <= (-9d-152)) then
tmp = v * (t1 / ((t1 + u) * t_1))
else if (t1 <= 4.8d-230) then
tmp = v / (-u * (u / t1))
else if (t1 <= 6.4d+59) then
tmp = t1 * ((v / (t1 + u)) / t_1)
else
tmp = t_2
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = -u - t1;
double t_2 = v / (-t1 - (u * 2.0));
double tmp;
if (t1 <= -1.95e+148) {
tmp = t_2;
} else if (t1 <= -9e-152) {
tmp = v * (t1 / ((t1 + u) * t_1));
} else if (t1 <= 4.8e-230) {
tmp = v / (-u * (u / t1));
} else if (t1 <= 6.4e+59) {
tmp = t1 * ((v / (t1 + u)) / t_1);
} else {
tmp = t_2;
}
return tmp;
}
def code(u, v, t1): t_1 = -u - t1 t_2 = v / (-t1 - (u * 2.0)) tmp = 0 if t1 <= -1.95e+148: tmp = t_2 elif t1 <= -9e-152: tmp = v * (t1 / ((t1 + u) * t_1)) elif t1 <= 4.8e-230: tmp = v / (-u * (u / t1)) elif t1 <= 6.4e+59: tmp = t1 * ((v / (t1 + u)) / t_1) else: tmp = t_2 return tmp
function code(u, v, t1) t_1 = Float64(Float64(-u) - t1) t_2 = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))) tmp = 0.0 if (t1 <= -1.95e+148) tmp = t_2; elseif (t1 <= -9e-152) tmp = Float64(v * Float64(t1 / Float64(Float64(t1 + u) * t_1))); elseif (t1 <= 4.8e-230) tmp = Float64(v / Float64(Float64(-u) * Float64(u / t1))); elseif (t1 <= 6.4e+59) tmp = Float64(t1 * Float64(Float64(v / Float64(t1 + u)) / t_1)); else tmp = t_2; end return tmp end
function tmp_2 = code(u, v, t1) t_1 = -u - t1; t_2 = v / (-t1 - (u * 2.0)); tmp = 0.0; if (t1 <= -1.95e+148) tmp = t_2; elseif (t1 <= -9e-152) tmp = v * (t1 / ((t1 + u) * t_1)); elseif (t1 <= 4.8e-230) tmp = v / (-u * (u / t1)); elseif (t1 <= 6.4e+59) tmp = t1 * ((v / (t1 + u)) / t_1); else tmp = t_2; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-u) - t1), $MachinePrecision]}, Block[{t$95$2 = N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -1.95e+148], t$95$2, If[LessEqual[t1, -9e-152], N[(v * N[(t1 / N[(N[(t1 + u), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 4.8e-230], N[(v / N[((-u) * N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 6.4e+59], N[(t1 * N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-u\right) - t1\\
t_2 := \frac{v}{\left(-t1\right) - u \cdot 2}\\
\mathbf{if}\;t1 \leq -1.95 \cdot 10^{+148}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t1 \leq -9 \cdot 10^{-152}:\\
\;\;\;\;v \cdot \frac{t1}{\left(t1 + u\right) \cdot t\_1}\\
\mathbf{elif}\;t1 \leq 4.8 \cdot 10^{-230}:\\
\;\;\;\;\frac{v}{\left(-u\right) \cdot \frac{u}{t1}}\\
\mathbf{elif}\;t1 \leq 6.4 \cdot 10^{+59}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{t1 + u}}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t1 < -1.95000000000000001e148 or 6.39999999999999964e59 < t1 Initial program 42.4%
associate-*l/46.1%
*-commutative46.1%
Simplified46.1%
associate-*r/42.4%
times-frac100.0%
*-commutative100.0%
frac-2neg100.0%
remove-double-neg100.0%
+-commutative100.0%
distribute-neg-in100.0%
sub-neg100.0%
clear-num100.0%
frac-2neg100.0%
frac-times97.6%
*-un-lft-identity97.6%
+-commutative97.6%
distribute-neg-in97.6%
sub-neg97.6%
sub-neg97.6%
+-commutative97.6%
add-sqr-sqrt39.3%
sqrt-unprod35.8%
sqr-neg35.8%
sqrt-unprod21.1%
add-sqr-sqrt9.0%
sqrt-unprod21.1%
sqr-neg21.1%
Applied egg-rr97.6%
Taylor expanded in u around 0 96.4%
*-commutative96.4%
Simplified96.4%
if -1.95000000000000001e148 < t1 < -9.0000000000000008e-152Initial program 91.1%
associate-*l/97.6%
*-commutative97.6%
Simplified97.6%
if -9.0000000000000008e-152 < t1 < 4.8000000000000004e-230Initial program 78.8%
times-frac89.4%
distribute-frac-neg89.4%
distribute-neg-frac289.4%
+-commutative89.4%
distribute-neg-in89.4%
unsub-neg89.4%
Simplified89.4%
Taylor expanded in t1 around 0 85.3%
Taylor expanded in t1 around 0 85.4%
associate-*r/85.4%
mul-1-neg85.4%
Simplified85.4%
clear-num85.4%
frac-2neg85.4%
frac-times90.8%
*-un-lft-identity90.8%
add-sqr-sqrt49.0%
sqrt-unprod52.1%
sqr-neg52.1%
sqrt-unprod12.8%
add-sqr-sqrt32.2%
add-sqr-sqrt19.8%
sqrt-unprod33.2%
sqr-neg33.2%
sqrt-unprod37.8%
add-sqr-sqrt90.8%
Applied egg-rr90.8%
if 4.8000000000000004e-230 < t1 < 6.39999999999999964e59Initial program 86.1%
associate-/l*86.5%
Simplified86.5%
associate-/r*94.2%
div-inv94.0%
Applied egg-rr94.0%
associate-*r/94.2%
*-rgt-identity94.2%
Simplified94.2%
Final simplification95.1%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1e+153) (not (<= t1 6.8e+126))) (/ v (- (- t1) (* u 2.0))) (* v (/ t1 (* (+ t1 u) (- (- u) t1))))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1e+153) || !(t1 <= 6.8e+126)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = v * (t1 / ((t1 + u) * (-u - t1)));
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-1d+153)) .or. (.not. (t1 <= 6.8d+126))) then
tmp = v / (-t1 - (u * 2.0d0))
else
tmp = v * (t1 / ((t1 + u) * (-u - t1)))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1e+153) || !(t1 <= 6.8e+126)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = v * (t1 / ((t1 + u) * (-u - t1)));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1e+153) or not (t1 <= 6.8e+126): tmp = v / (-t1 - (u * 2.0)) else: tmp = v * (t1 / ((t1 + u) * (-u - t1))) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1e+153) || !(t1 <= 6.8e+126)) tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); else tmp = Float64(v * Float64(t1 / Float64(Float64(t1 + u) * Float64(Float64(-u) - t1)))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -1e+153) || ~((t1 <= 6.8e+126))) tmp = v / (-t1 - (u * 2.0)); else tmp = v * (t1 / ((t1 + u) * (-u - t1))); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1e+153], N[Not[LessEqual[t1, 6.8e+126]], $MachinePrecision]], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v * N[(t1 / N[(N[(t1 + u), $MachinePrecision] * N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1 \cdot 10^{+153} \lor \neg \left(t1 \leq 6.8 \cdot 10^{+126}\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;v \cdot \frac{t1}{\left(t1 + u\right) \cdot \left(\left(-u\right) - t1\right)}\\
\end{array}
\end{array}
if t1 < -1e153 or 6.79999999999999979e126 < t1 Initial program 38.8%
associate-*l/41.5%
*-commutative41.5%
Simplified41.5%
associate-*r/38.8%
times-frac100.0%
*-commutative100.0%
frac-2neg100.0%
remove-double-neg100.0%
+-commutative100.0%
distribute-neg-in100.0%
sub-neg100.0%
clear-num100.0%
frac-2neg100.0%
frac-times98.7%
*-un-lft-identity98.7%
+-commutative98.7%
distribute-neg-in98.7%
sub-neg98.7%
sub-neg98.7%
+-commutative98.7%
add-sqr-sqrt43.6%
sqrt-unprod37.7%
sqr-neg37.7%
sqrt-unprod21.4%
add-sqr-sqrt8.2%
sqrt-unprod21.4%
sqr-neg21.4%
Applied egg-rr98.7%
Taylor expanded in u around 0 98.7%
*-commutative98.7%
Simplified98.7%
if -1e153 < t1 < 6.79999999999999979e126Initial program 85.3%
associate-*l/89.0%
*-commutative89.0%
Simplified89.0%
Final simplification91.8%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -5.6e-50) (not (<= t1 1.02e-53))) (/ v (- (- t1) (* u 2.0))) (/ (* v (/ t1 u)) (- u))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -5.6e-50) || !(t1 <= 1.02e-53)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = (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 ((t1 <= (-5.6d-50)) .or. (.not. (t1 <= 1.02d-53))) then
tmp = v / (-t1 - (u * 2.0d0))
else
tmp = (v * (t1 / u)) / -u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -5.6e-50) || !(t1 <= 1.02e-53)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = (v * (t1 / u)) / -u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -5.6e-50) or not (t1 <= 1.02e-53): tmp = v / (-t1 - (u * 2.0)) else: tmp = (v * (t1 / u)) / -u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -5.6e-50) || !(t1 <= 1.02e-53)) tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); else tmp = Float64(Float64(v * Float64(t1 / u)) / Float64(-u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -5.6e-50) || ~((t1 <= 1.02e-53))) tmp = v / (-t1 - (u * 2.0)); else tmp = (v * (t1 / u)) / -u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -5.6e-50], N[Not[LessEqual[t1, 1.02e-53]], $MachinePrecision]], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(v * N[(t1 / u), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -5.6 \cdot 10^{-50} \lor \neg \left(t1 \leq 1.02 \cdot 10^{-53}\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{v \cdot \frac{t1}{u}}{-u}\\
\end{array}
\end{array}
if t1 < -5.5999999999999996e-50 or 1.02000000000000002e-53 < t1 Initial program 63.0%
associate-*l/69.0%
*-commutative69.0%
Simplified69.0%
associate-*r/63.0%
times-frac100.0%
*-commutative100.0%
frac-2neg100.0%
remove-double-neg100.0%
+-commutative100.0%
distribute-neg-in100.0%
sub-neg100.0%
clear-num99.9%
frac-2neg99.9%
frac-times97.9%
*-un-lft-identity97.9%
+-commutative97.9%
distribute-neg-in97.9%
sub-neg97.9%
sub-neg97.9%
+-commutative97.9%
add-sqr-sqrt50.1%
sqrt-unprod56.1%
sqr-neg56.1%
sqrt-unprod19.3%
add-sqr-sqrt8.4%
sqrt-unprod18.0%
sqr-neg18.0%
Applied egg-rr97.9%
Taylor expanded in u around 0 88.1%
*-commutative88.1%
Simplified88.1%
if -5.5999999999999996e-50 < t1 < 1.02000000000000002e-53Initial program 84.5%
times-frac93.8%
distribute-frac-neg93.8%
distribute-neg-frac293.8%
+-commutative93.8%
distribute-neg-in93.8%
unsub-neg93.8%
Simplified93.8%
Taylor expanded in t1 around 0 78.2%
Taylor expanded in t1 around 0 80.4%
associate-*r/80.4%
mul-1-neg80.4%
Simplified80.4%
*-commutative80.4%
frac-2neg80.4%
associate-*l/81.4%
add-sqr-sqrt43.8%
sqrt-unprod49.0%
sqr-neg49.0%
sqrt-unprod16.5%
add-sqr-sqrt36.1%
add-sqr-sqrt14.2%
sqrt-unprod44.5%
sqr-neg44.5%
sqrt-unprod44.1%
add-sqr-sqrt81.4%
Applied egg-rr81.4%
Final simplification85.3%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1.22e-54) (not (<= t1 7.8e-54))) (/ v (- (- t1) (* u 2.0))) (* (/ t1 u) (/ v (- u)))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.22e-54) || !(t1 <= 7.8e-54)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = (t1 / u) * (v / -u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-1.22d-54)) .or. (.not. (t1 <= 7.8d-54))) then
tmp = v / (-t1 - (u * 2.0d0))
else
tmp = (t1 / u) * (v / -u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.22e-54) || !(t1 <= 7.8e-54)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = (t1 / u) * (v / -u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.22e-54) or not (t1 <= 7.8e-54): tmp = v / (-t1 - (u * 2.0)) else: tmp = (t1 / u) * (v / -u) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.22e-54) || !(t1 <= 7.8e-54)) tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); else tmp = Float64(Float64(t1 / u) * Float64(v / Float64(-u))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -1.22e-54) || ~((t1 <= 7.8e-54))) tmp = v / (-t1 - (u * 2.0)); else tmp = (t1 / u) * (v / -u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.22e-54], N[Not[LessEqual[t1, 7.8e-54]], $MachinePrecision]], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t1 / u), $MachinePrecision] * N[(v / (-u)), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.22 \cdot 10^{-54} \lor \neg \left(t1 \leq 7.8 \cdot 10^{-54}\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{u} \cdot \frac{v}{-u}\\
\end{array}
\end{array}
if t1 < -1.22e-54 or 7.8e-54 < t1 Initial program 63.0%
associate-*l/69.0%
*-commutative69.0%
Simplified69.0%
associate-*r/63.0%
times-frac100.0%
*-commutative100.0%
frac-2neg100.0%
remove-double-neg100.0%
+-commutative100.0%
distribute-neg-in100.0%
sub-neg100.0%
clear-num99.9%
frac-2neg99.9%
frac-times97.9%
*-un-lft-identity97.9%
+-commutative97.9%
distribute-neg-in97.9%
sub-neg97.9%
sub-neg97.9%
+-commutative97.9%
add-sqr-sqrt50.1%
sqrt-unprod56.1%
sqr-neg56.1%
sqrt-unprod19.3%
add-sqr-sqrt8.4%
sqrt-unprod18.0%
sqr-neg18.0%
Applied egg-rr97.9%
Taylor expanded in u around 0 88.1%
*-commutative88.1%
Simplified88.1%
if -1.22e-54 < t1 < 7.8e-54Initial program 84.5%
times-frac93.8%
distribute-frac-neg93.8%
distribute-neg-frac293.8%
+-commutative93.8%
distribute-neg-in93.8%
unsub-neg93.8%
Simplified93.8%
Taylor expanded in t1 around 0 78.2%
Taylor expanded in t1 around 0 80.4%
associate-*r/80.4%
mul-1-neg80.4%
Simplified80.4%
Final simplification84.8%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1.6e-55) (not (<= t1 1.4e-54))) (/ v (- (- u) t1)) (* (/ t1 u) (/ v (- u)))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.6e-55) || !(t1 <= 1.4e-54)) {
tmp = v / (-u - t1);
} else {
tmp = (t1 / u) * (v / -u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-1.6d-55)) .or. (.not. (t1 <= 1.4d-54))) then
tmp = v / (-u - t1)
else
tmp = (t1 / u) * (v / -u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.6e-55) || !(t1 <= 1.4e-54)) {
tmp = v / (-u - t1);
} else {
tmp = (t1 / u) * (v / -u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.6e-55) or not (t1 <= 1.4e-54): tmp = v / (-u - t1) else: tmp = (t1 / u) * (v / -u) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.6e-55) || !(t1 <= 1.4e-54)) tmp = Float64(v / Float64(Float64(-u) - t1)); else tmp = Float64(Float64(t1 / u) * Float64(v / Float64(-u))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -1.6e-55) || ~((t1 <= 1.4e-54))) tmp = v / (-u - t1); else tmp = (t1 / u) * (v / -u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.6e-55], N[Not[LessEqual[t1, 1.4e-54]], $MachinePrecision]], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], N[(N[(t1 / u), $MachinePrecision] * N[(v / (-u)), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.6 \cdot 10^{-55} \lor \neg \left(t1 \leq 1.4 \cdot 10^{-54}\right):\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{u} \cdot \frac{v}{-u}\\
\end{array}
\end{array}
if t1 < -1.6000000000000001e-55 or 1.4000000000000001e-54 < t1 Initial program 63.0%
associate-*l/69.0%
*-commutative69.0%
Simplified69.0%
associate-*r/63.0%
*-commutative63.0%
times-frac100.0%
frac-2neg100.0%
+-commutative100.0%
distribute-neg-in100.0%
sub-neg100.0%
associate-*r/100.0%
add-sqr-sqrt50.3%
sqrt-unprod37.9%
sqr-neg37.9%
sqrt-unprod17.9%
add-sqr-sqrt31.8%
sub-neg31.8%
+-commutative31.8%
add-sqr-sqrt13.9%
sqrt-unprod45.3%
sqr-neg45.3%
sqrt-unprod45.4%
add-sqr-sqrt20.2%
sqrt-unprod45.4%
sqr-neg45.4%
Applied egg-rr100.0%
Taylor expanded in t1 around inf 87.8%
mul-1-neg87.8%
Simplified87.8%
if -1.6000000000000001e-55 < t1 < 1.4000000000000001e-54Initial program 84.5%
times-frac93.8%
distribute-frac-neg93.8%
distribute-neg-frac293.8%
+-commutative93.8%
distribute-neg-in93.8%
unsub-neg93.8%
Simplified93.8%
Taylor expanded in t1 around 0 78.2%
Taylor expanded in t1 around 0 80.4%
associate-*r/80.4%
mul-1-neg80.4%
Simplified80.4%
Final simplification84.7%
(FPCore (u v t1) :precision binary64 (if (or (<= u -3.5e+108) (not (<= u 4.8e+147))) (* v (/ (/ t1 u) u)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.5e+108) || !(u <= 4.8e+147)) {
tmp = v * ((t1 / u) / 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.5d+108)) .or. (.not. (u <= 4.8d+147))) then
tmp = v * ((t1 / u) / 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.5e+108) || !(u <= 4.8e+147)) {
tmp = v * ((t1 / u) / u);
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -3.5e+108) or not (u <= 4.8e+147): tmp = v * ((t1 / u) / u) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -3.5e+108) || !(u <= 4.8e+147)) tmp = Float64(v * Float64(Float64(t1 / u) / u)); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -3.5e+108) || ~((u <= 4.8e+147))) tmp = v * ((t1 / u) / u); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -3.5e+108], N[Not[LessEqual[u, 4.8e+147]], $MachinePrecision]], N[(v * N[(N[(t1 / u), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.5 \cdot 10^{+108} \lor \neg \left(u \leq 4.8 \cdot 10^{+147}\right):\\
\;\;\;\;v \cdot \frac{\frac{t1}{u}}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -3.5000000000000002e108 or 4.80000000000000004e147 < u Initial program 86.6%
times-frac98.2%
distribute-frac-neg98.2%
distribute-neg-frac298.2%
+-commutative98.2%
distribute-neg-in98.2%
unsub-neg98.2%
Simplified98.2%
Taylor expanded in t1 around 0 91.4%
Taylor expanded in t1 around 0 91.4%
associate-*r/91.4%
mul-1-neg91.4%
Simplified91.4%
clear-num91.4%
un-div-inv91.5%
add-sqr-sqrt33.7%
sqrt-unprod73.4%
sqr-neg73.4%
sqrt-unprod48.6%
add-sqr-sqrt80.3%
Applied egg-rr80.3%
associate-/r/79.1%
Simplified79.1%
if -3.5000000000000002e108 < u < 4.80000000000000004e147Initial program 66.7%
associate-*l/72.3%
*-commutative72.3%
Simplified72.3%
Taylor expanded in t1 around inf 71.6%
associate-*r/71.6%
neg-mul-171.6%
Simplified71.6%
Final simplification73.7%
(FPCore (u v t1) :precision binary64 (if (<= u -2.15e+111) (/ v u) (if (<= u 3e+168) (/ v (- t1)) (/ 1.0 (/ u v)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -2.15e+111) {
tmp = v / u;
} else if (u <= 3e+168) {
tmp = v / -t1;
} else {
tmp = 1.0 / (u / v);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-2.15d+111)) then
tmp = v / u
else if (u <= 3d+168) then
tmp = v / -t1
else
tmp = 1.0d0 / (u / v)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -2.15e+111) {
tmp = v / u;
} else if (u <= 3e+168) {
tmp = v / -t1;
} else {
tmp = 1.0 / (u / v);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -2.15e+111: tmp = v / u elif u <= 3e+168: tmp = v / -t1 else: tmp = 1.0 / (u / v) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -2.15e+111) tmp = Float64(v / u); elseif (u <= 3e+168) tmp = Float64(v / Float64(-t1)); else tmp = Float64(1.0 / Float64(u / v)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -2.15e+111) tmp = v / u; elseif (u <= 3e+168) tmp = v / -t1; else tmp = 1.0 / (u / v); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -2.15e+111], N[(v / u), $MachinePrecision], If[LessEqual[u, 3e+168], N[(v / (-t1)), $MachinePrecision], N[(1.0 / N[(u / v), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.15 \cdot 10^{+111}:\\
\;\;\;\;\frac{v}{u}\\
\mathbf{elif}\;u \leq 3 \cdot 10^{+168}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{u}{v}}\\
\end{array}
\end{array}
if u < -2.14999999999999997e111Initial program 88.2%
times-frac97.1%
distribute-frac-neg97.1%
distribute-neg-frac297.1%
+-commutative97.1%
distribute-neg-in97.1%
unsub-neg97.1%
Simplified97.1%
Taylor expanded in t1 around 0 86.5%
Taylor expanded in t1 around inf 44.6%
associate-*r/44.6%
mul-1-neg44.6%
Simplified44.6%
div-inv44.6%
add-sqr-sqrt13.3%
sqrt-unprod46.4%
sqr-neg46.4%
sqrt-unprod31.2%
add-sqr-sqrt44.7%
Applied egg-rr44.7%
associate-*r/44.7%
*-rgt-identity44.7%
Simplified44.7%
if -2.14999999999999997e111 < u < 2.9999999999999998e168Initial program 66.6%
associate-*l/71.6%
*-commutative71.6%
Simplified71.6%
Taylor expanded in t1 around inf 70.9%
associate-*r/70.9%
neg-mul-170.9%
Simplified70.9%
if 2.9999999999999998e168 < u Initial program 86.4%
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 0 100.0%
Taylor expanded in t1 around inf 43.4%
associate-*r/43.4%
mul-1-neg43.4%
Simplified43.4%
clear-num46.3%
inv-pow46.3%
add-sqr-sqrt23.0%
sqrt-unprod45.6%
sqr-neg45.6%
sqrt-unprod23.2%
add-sqr-sqrt46.1%
Applied egg-rr46.1%
unpow-146.1%
Simplified46.1%
Final simplification64.2%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.3e+112) (not (<= u 2.25e+171))) (/ v u) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.3e+112) || !(u <= 2.25e+171)) {
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 <= (-1.3d+112)) .or. (.not. (u <= 2.25d+171))) 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 <= -1.3e+112) || !(u <= 2.25e+171)) {
tmp = v / u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.3e+112) or not (u <= 2.25e+171): tmp = v / u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.3e+112) || !(u <= 2.25e+171)) tmp = Float64(v / u); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -1.3e+112) || ~((u <= 2.25e+171))) tmp = v / u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.3e+112], N[Not[LessEqual[u, 2.25e+171]], $MachinePrecision]], N[(v / u), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.3 \cdot 10^{+112} \lor \neg \left(u \leq 2.25 \cdot 10^{+171}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -1.3e112 or 2.24999999999999984e171 < u Initial program 87.6%
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 91.1%
Taylor expanded in t1 around inf 44.2%
associate-*r/44.2%
mul-1-neg44.2%
Simplified44.2%
div-inv44.2%
add-sqr-sqrt16.6%
sqrt-unprod45.1%
sqr-neg45.1%
sqrt-unprod27.5%
add-sqr-sqrt44.2%
Applied egg-rr44.2%
associate-*r/44.2%
*-rgt-identity44.2%
Simplified44.2%
if -1.3e112 < u < 2.24999999999999984e171Initial program 66.6%
associate-*l/71.6%
*-commutative71.6%
Simplified71.6%
Taylor expanded in t1 around inf 70.9%
associate-*r/70.9%
neg-mul-170.9%
Simplified70.9%
Final simplification63.9%
(FPCore (u v t1) :precision binary64 (if (<= u -1.36e+112) (/ v u) (if (<= u 6.2e+153) (/ v (- t1)) (/ v (- u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.36e+112) {
tmp = v / u;
} else if (u <= 6.2e+153) {
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.36d+112)) then
tmp = v / u
else if (u <= 6.2d+153) 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.36e+112) {
tmp = v / u;
} else if (u <= 6.2e+153) {
tmp = v / -t1;
} else {
tmp = v / -u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.36e+112: tmp = v / u elif u <= 6.2e+153: tmp = v / -t1 else: tmp = v / -u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.36e+112) tmp = Float64(v / u); elseif (u <= 6.2e+153) 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 <= -1.36e+112) tmp = v / u; elseif (u <= 6.2e+153) tmp = v / -t1; else tmp = v / -u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.36e+112], N[(v / u), $MachinePrecision], If[LessEqual[u, 6.2e+153], N[(v / (-t1)), $MachinePrecision], N[(v / (-u)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.36 \cdot 10^{+112}:\\
\;\;\;\;\frac{v}{u}\\
\mathbf{elif}\;u \leq 6.2 \cdot 10^{+153}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-u}\\
\end{array}
\end{array}
if u < -1.3600000000000001e112Initial program 88.2%
times-frac97.1%
distribute-frac-neg97.1%
distribute-neg-frac297.1%
+-commutative97.1%
distribute-neg-in97.1%
unsub-neg97.1%
Simplified97.1%
Taylor expanded in t1 around 0 86.5%
Taylor expanded in t1 around inf 44.6%
associate-*r/44.6%
mul-1-neg44.6%
Simplified44.6%
div-inv44.6%
add-sqr-sqrt13.3%
sqrt-unprod46.4%
sqr-neg46.4%
sqrt-unprod31.2%
add-sqr-sqrt44.7%
Applied egg-rr44.7%
associate-*r/44.7%
*-rgt-identity44.7%
Simplified44.7%
if -1.3600000000000001e112 < u < 6.2e153Initial program 66.7%
associate-*l/72.3%
*-commutative72.3%
Simplified72.3%
Taylor expanded in t1 around inf 71.6%
associate-*r/71.6%
neg-mul-171.6%
Simplified71.6%
if 6.2e153 < u Initial program 83.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 99.9%
Taylor expanded in t1 around inf 40.3%
associate-*r/40.3%
mul-1-neg40.3%
Simplified40.3%
Final simplification64.0%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1.4e+179) (not (<= t1 1.2e+170))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.4e+179) || !(t1 <= 1.2e+170)) {
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.4d+179)) .or. (.not. (t1 <= 1.2d+170))) 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.4e+179) || !(t1 <= 1.2e+170)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.4e+179) or not (t1 <= 1.2e+170): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.4e+179) || !(t1 <= 1.2e+170)) 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.4e+179) || ~((t1 <= 1.2e+170))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.4e+179], N[Not[LessEqual[t1, 1.2e+170]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.4 \cdot 10^{+179} \lor \neg \left(t1 \leq 1.2 \cdot 10^{+170}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -1.4e179 or 1.2e170 < t1 Initial program 34.8%
associate-*l/36.4%
*-commutative36.4%
Simplified36.4%
Taylor expanded in t1 around inf 99.8%
associate-*r/99.8%
neg-mul-199.8%
Simplified99.8%
neg-sub099.8%
sub-neg99.8%
add-sqr-sqrt57.6%
sqrt-unprod55.1%
sqr-neg55.1%
sqrt-unprod12.6%
add-sqr-sqrt35.3%
Applied egg-rr35.3%
+-lft-identity35.3%
Simplified35.3%
if -1.4e179 < t1 < 1.2e170Initial program 84.5%
times-frac96.5%
distribute-frac-neg96.5%
distribute-neg-frac296.5%
+-commutative96.5%
distribute-neg-in96.5%
unsub-neg96.5%
Simplified96.5%
Taylor expanded in t1 around 0 60.7%
Taylor expanded in t1 around inf 19.8%
associate-*r/19.8%
mul-1-neg19.8%
Simplified19.8%
div-inv19.8%
add-sqr-sqrt8.7%
sqrt-unprod22.5%
sqr-neg22.5%
sqrt-unprod11.3%
add-sqr-sqrt18.2%
Applied egg-rr18.2%
associate-*r/18.2%
*-rgt-identity18.2%
Simplified18.2%
Final simplification22.5%
(FPCore (u v t1) :precision binary64 (* (/ t1 (- (- u) t1)) (/ v (+ t1 u))))
double code(double u, double v, double t1) {
return (t1 / (-u - t1)) * (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 / (-u - t1)) * (v / (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (t1 / (-u - t1)) * (v / (t1 + u));
}
def code(u, v, t1): return (t1 / (-u - t1)) * (v / (t1 + u))
function code(u, v, t1) return Float64(Float64(t1 / Float64(Float64(-u) - t1)) * Float64(v / Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (t1 / (-u - t1)) * (v / (t1 + u)); end
code[u_, v_, t1_] := N[(N[(t1 / N[((-u) - t1), $MachinePrecision]), $MachinePrecision] * N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{t1}{\left(-u\right) - t1} \cdot \frac{v}{t1 + u}
\end{array}
Initial program 72.1%
times-frac97.4%
distribute-frac-neg97.4%
distribute-neg-frac297.4%
+-commutative97.4%
distribute-neg-in97.4%
unsub-neg97.4%
Simplified97.4%
(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 72.1%
associate-*l/75.5%
*-commutative75.5%
Simplified75.5%
associate-*r/72.1%
*-commutative72.1%
times-frac97.4%
frac-2neg97.4%
+-commutative97.4%
distribute-neg-in97.4%
sub-neg97.4%
associate-*r/97.8%
add-sqr-sqrt47.0%
sqrt-unprod43.5%
sqr-neg43.5%
sqrt-unprod19.6%
add-sqr-sqrt33.6%
sub-neg33.6%
+-commutative33.6%
add-sqr-sqrt14.0%
sqrt-unprod44.6%
sqr-neg44.6%
sqrt-unprod39.6%
add-sqr-sqrt18.8%
sqrt-unprod43.1%
sqr-neg43.1%
Applied egg-rr97.8%
Taylor expanded in t1 around inf 65.6%
mul-1-neg65.6%
Simplified65.6%
Final simplification65.6%
(FPCore (u v t1) :precision binary64 (/ v t1))
double code(double u, double v, double t1) {
return v / t1;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = v / t1
end function
public static double code(double u, double v, double t1) {
return v / t1;
}
def code(u, v, t1): return v / t1
function code(u, v, t1) return Float64(v / t1) end
function tmp = code(u, v, t1) tmp = v / t1; end
code[u_, v_, t1_] := N[(v / t1), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{t1}
\end{array}
Initial program 72.1%
associate-*l/75.5%
*-commutative75.5%
Simplified75.5%
Taylor expanded in t1 around inf 56.5%
associate-*r/56.5%
neg-mul-156.5%
Simplified56.5%
neg-sub056.5%
sub-neg56.5%
add-sqr-sqrt29.9%
sqrt-unprod33.9%
sqr-neg33.9%
sqrt-unprod4.8%
add-sqr-sqrt11.6%
Applied egg-rr11.6%
+-lft-identity11.6%
Simplified11.6%
herbie shell --seed 2024182
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))