
(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 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (u v t1) :precision binary64 (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))
double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-t1 * v) / ((t1 + u) * (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
def code(u, v, t1): return (-t1 * v) / ((t1 + u) * (t1 + u))
function code(u, v, t1) return Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (-t1 * v) / ((t1 + u) * (t1 + u)); end
code[u_, v_, t1_] := N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}
\end{array}
(FPCore (u v t1) :precision binary64 (/ (/ (* t1 (/ v (+ t1 u))) -1.0) (+ t1 u)))
double code(double u, double v, double t1) {
return ((t1 * (v / (t1 + u))) / -1.0) / (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))) / (-1.0d0)) / (t1 + u)
end function
public static double code(double u, double v, double t1) {
return ((t1 * (v / (t1 + u))) / -1.0) / (t1 + u);
}
def code(u, v, t1): return ((t1 * (v / (t1 + u))) / -1.0) / (t1 + u)
function code(u, v, t1) return Float64(Float64(Float64(t1 * Float64(v / Float64(t1 + u))) / -1.0) / Float64(t1 + u)) end
function tmp = code(u, v, t1) tmp = ((t1 * (v / (t1 + u))) / -1.0) / (t1 + u); end
code[u_, v_, t1_] := N[(N[(N[(t1 * N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / -1.0), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{t1 \cdot \frac{v}{t1 + u}}{-1}}{t1 + u}
\end{array}
Initial program 71.1%
associate-/l*71.8%
distribute-lft-neg-out71.8%
distribute-rgt-neg-in71.8%
associate-/r*83.2%
distribute-neg-frac283.2%
Simplified83.2%
associate-*r/99.1%
neg-mul-199.1%
associate-/r*99.1%
Applied egg-rr99.1%
Final simplification99.1%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (* t1 (/ (/ v (+ t1 u)) (- (- u) t1)))))
(if (<= t1 -2.1e+214)
(/ v (- t1))
(if (<= t1 -3.2e-227)
t_1
(if (<= t1 2.8e-121)
(/ (* v (- (/ t1 u))) (+ t1 u))
(if (<= t1 9.2e+134) t_1 (/ v (- (* u (- 2.0)) t1))))))))
double code(double u, double v, double t1) {
double t_1 = t1 * ((v / (t1 + u)) / (-u - t1));
double tmp;
if (t1 <= -2.1e+214) {
tmp = v / -t1;
} else if (t1 <= -3.2e-227) {
tmp = t_1;
} else if (t1 <= 2.8e-121) {
tmp = (v * -(t1 / u)) / (t1 + u);
} else if (t1 <= 9.2e+134) {
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 = t1 * ((v / (t1 + u)) / (-u - t1))
if (t1 <= (-2.1d+214)) then
tmp = v / -t1
else if (t1 <= (-3.2d-227)) then
tmp = t_1
else if (t1 <= 2.8d-121) then
tmp = (v * -(t1 / u)) / (t1 + u)
else if (t1 <= 9.2d+134) 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 = t1 * ((v / (t1 + u)) / (-u - t1));
double tmp;
if (t1 <= -2.1e+214) {
tmp = v / -t1;
} else if (t1 <= -3.2e-227) {
tmp = t_1;
} else if (t1 <= 2.8e-121) {
tmp = (v * -(t1 / u)) / (t1 + u);
} else if (t1 <= 9.2e+134) {
tmp = t_1;
} else {
tmp = v / ((u * -2.0) - t1);
}
return tmp;
}
def code(u, v, t1): t_1 = t1 * ((v / (t1 + u)) / (-u - t1)) tmp = 0 if t1 <= -2.1e+214: tmp = v / -t1 elif t1 <= -3.2e-227: tmp = t_1 elif t1 <= 2.8e-121: tmp = (v * -(t1 / u)) / (t1 + u) elif t1 <= 9.2e+134: tmp = t_1 else: tmp = v / ((u * -2.0) - t1) return tmp
function code(u, v, t1) t_1 = Float64(t1 * Float64(Float64(v / Float64(t1 + u)) / Float64(Float64(-u) - t1))) tmp = 0.0 if (t1 <= -2.1e+214) tmp = Float64(v / Float64(-t1)); elseif (t1 <= -3.2e-227) tmp = t_1; elseif (t1 <= 2.8e-121) tmp = Float64(Float64(v * Float64(-Float64(t1 / u))) / Float64(t1 + u)); elseif (t1 <= 9.2e+134) 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 = t1 * ((v / (t1 + u)) / (-u - t1)); tmp = 0.0; if (t1 <= -2.1e+214) tmp = v / -t1; elseif (t1 <= -3.2e-227) tmp = t_1; elseif (t1 <= 2.8e-121) tmp = (v * -(t1 / u)) / (t1 + u); elseif (t1 <= 9.2e+134) tmp = t_1; else tmp = v / ((u * -2.0) - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(t1 * N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -2.1e+214], N[(v / (-t1)), $MachinePrecision], If[LessEqual[t1, -3.2e-227], t$95$1, If[LessEqual[t1, 2.8e-121], N[(N[(v * (-N[(t1 / u), $MachinePrecision])), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 9.2e+134], t$95$1, N[(v / N[(N[(u * (-2.0)), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t1 \cdot \frac{\frac{v}{t1 + u}}{\left(-u\right) - t1}\\
\mathbf{if}\;t1 \leq -2.1 \cdot 10^{+214}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{elif}\;t1 \leq -3.2 \cdot 10^{-227}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t1 \leq 2.8 \cdot 10^{-121}:\\
\;\;\;\;\frac{v \cdot \left(-\frac{t1}{u}\right)}{t1 + u}\\
\mathbf{elif}\;t1 \leq 9.2 \cdot 10^{+134}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\
\end{array}
\end{array}
if t1 < -2.1000000000000001e214Initial program 53.3%
associate-/l*54.7%
distribute-lft-neg-out54.7%
distribute-rgt-neg-in54.7%
associate-/r*73.1%
distribute-neg-frac273.1%
Simplified73.1%
Taylor expanded in t1 around inf 95.7%
associate-*r/95.7%
neg-mul-195.7%
Simplified95.7%
if -2.1000000000000001e214 < t1 < -3.2000000000000001e-227 or 2.8000000000000001e-121 < t1 < 9.1999999999999992e134Initial program 80.6%
associate-/l*82.6%
distribute-lft-neg-out82.6%
distribute-rgt-neg-in82.6%
associate-/r*93.8%
distribute-neg-frac293.8%
Simplified93.8%
if -3.2000000000000001e-227 < t1 < 2.8000000000000001e-121Initial program 77.7%
associate-/l*73.1%
distribute-lft-neg-out73.1%
distribute-rgt-neg-in73.1%
associate-/r*75.0%
distribute-neg-frac275.0%
Simplified75.0%
Taylor expanded in t1 around 0 74.9%
*-commutative74.9%
distribute-frac-neg274.9%
distribute-frac-neg74.9%
associate-*l/88.8%
distribute-neg-frac288.8%
add-sqr-sqrt32.9%
sqrt-unprod58.0%
sqr-neg58.0%
sqrt-unprod28.6%
add-sqr-sqrt42.7%
Applied egg-rr42.7%
add-sqr-sqrt36.5%
sqrt-unprod62.3%
sqr-neg62.3%
*-commutative62.3%
*-commutative62.3%
sqrt-unprod60.3%
add-sqr-sqrt88.8%
neg-sub088.8%
*-commutative88.8%
associate-*l/82.8%
associate-/l*89.7%
Applied egg-rr89.7%
neg-sub089.7%
distribute-rgt-neg-in89.7%
distribute-frac-neg289.7%
Simplified89.7%
if 9.1999999999999992e134 < t1 Initial program 34.7%
associate-/l*36.8%
distribute-lft-neg-out36.8%
distribute-rgt-neg-in36.8%
associate-/r*58.6%
distribute-neg-frac258.6%
Simplified58.6%
associate-*r/99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*l/99.8%
frac-2neg99.8%
clear-num99.8%
frac-times99.9%
*-un-lft-identity99.9%
add-sqr-sqrt0.0%
sqrt-unprod34.1%
sqr-neg34.1%
sqrt-prod33.1%
add-sqr-sqrt33.1%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 91.1%
*-commutative91.1%
Simplified91.1%
Final simplification92.7%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.35e-11) (not (<= u 2.2e+77))) (* t1 (/ v (* (+ t1 u) (- u)))) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.35e-11) || !(u <= 2.2e+77)) {
tmp = t1 * (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 <= (-1.35d-11)) .or. (.not. (u <= 2.2d+77))) then
tmp = t1 * (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 <= -1.35e-11) || !(u <= 2.2e+77)) {
tmp = t1 * (v / ((t1 + u) * -u));
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.35e-11) or not (u <= 2.2e+77): tmp = t1 * (v / ((t1 + u) * -u)) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.35e-11) || !(u <= 2.2e+77)) tmp = Float64(t1 * Float64(v / Float64(Float64(t1 + u) * Float64(-u)))); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -1.35e-11) || ~((u <= 2.2e+77))) tmp = t1 * (v / ((t1 + u) * -u)); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.35e-11], N[Not[LessEqual[u, 2.2e+77]], $MachinePrecision]], N[(t1 * N[(v / N[(N[(t1 + u), $MachinePrecision] * (-u)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.35 \cdot 10^{-11} \lor \neg \left(u \leq 2.2 \cdot 10^{+77}\right):\\
\;\;\;\;t1 \cdot \frac{v}{\left(t1 + u\right) \cdot \left(-u\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -1.35000000000000002e-11 or 2.2e77 < u Initial program 74.0%
associate-/l*76.9%
distribute-lft-neg-out76.9%
distribute-rgt-neg-in76.9%
associate-/r*90.8%
distribute-neg-frac290.8%
Simplified90.8%
Taylor expanded in t1 around 0 84.9%
Taylor expanded in v around 0 74.9%
associate-*r/74.9%
neg-mul-174.9%
*-commutative74.9%
distribute-neg-frac74.9%
distribute-neg-frac274.9%
*-commutative74.9%
Simplified74.9%
if -1.35000000000000002e-11 < u < 2.2e77Initial program 68.5%
associate-/l*67.0%
distribute-lft-neg-out67.0%
distribute-rgt-neg-in67.0%
associate-/r*76.1%
distribute-neg-frac276.1%
Simplified76.1%
Taylor expanded in t1 around inf 79.7%
associate-*r/79.7%
neg-mul-179.7%
Simplified79.7%
Final simplification77.4%
(FPCore (u v t1) :precision binary64 (if (or (<= u -3.1e-12) (not (<= u 2.2e+77))) (* t1 (/ (/ v u) (- (- u) t1))) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.1e-12) || !(u <= 2.2e+77)) {
tmp = t1 * ((v / u) / (-u - t1));
} 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.1d-12)) .or. (.not. (u <= 2.2d+77))) then
tmp = t1 * ((v / u) / (-u - t1))
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.1e-12) || !(u <= 2.2e+77)) {
tmp = t1 * ((v / u) / (-u - t1));
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -3.1e-12) or not (u <= 2.2e+77): tmp = t1 * ((v / u) / (-u - t1)) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -3.1e-12) || !(u <= 2.2e+77)) tmp = Float64(t1 * Float64(Float64(v / u) / Float64(Float64(-u) - t1))); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -3.1e-12) || ~((u <= 2.2e+77))) tmp = t1 * ((v / u) / (-u - t1)); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -3.1e-12], N[Not[LessEqual[u, 2.2e+77]], $MachinePrecision]], N[(t1 * N[(N[(v / u), $MachinePrecision] / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.1 \cdot 10^{-12} \lor \neg \left(u \leq 2.2 \cdot 10^{+77}\right):\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -3.1000000000000001e-12 or 2.2e77 < u Initial program 74.0%
associate-/l*76.9%
distribute-lft-neg-out76.9%
distribute-rgt-neg-in76.9%
associate-/r*90.8%
distribute-neg-frac290.8%
Simplified90.8%
Taylor expanded in t1 around 0 84.9%
if -3.1000000000000001e-12 < u < 2.2e77Initial program 68.5%
associate-/l*67.0%
distribute-lft-neg-out67.0%
distribute-rgt-neg-in67.0%
associate-/r*76.1%
distribute-neg-frac276.1%
Simplified76.1%
Taylor expanded in t1 around inf 79.7%
associate-*r/79.7%
neg-mul-179.7%
Simplified79.7%
Final simplification82.2%
(FPCore (u v t1) :precision binary64 (if (or (<= u -7.6e-13) (not (<= u 3.45e+77))) (* (/ v (+ t1 u)) (- (/ t1 u))) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -7.6e-13) || !(u <= 3.45e+77)) {
tmp = (v / (t1 + u)) * -(t1 / u);
} else {
tmp = v / -t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-7.6d-13)) .or. (.not. (u <= 3.45d+77))) then
tmp = (v / (t1 + u)) * -(t1 / u)
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -7.6e-13) || !(u <= 3.45e+77)) {
tmp = (v / (t1 + u)) * -(t1 / u);
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -7.6e-13) or not (u <= 3.45e+77): tmp = (v / (t1 + u)) * -(t1 / u) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -7.6e-13) || !(u <= 3.45e+77)) tmp = Float64(Float64(v / Float64(t1 + u)) * Float64(-Float64(t1 / u))); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -7.6e-13) || ~((u <= 3.45e+77))) tmp = (v / (t1 + u)) * -(t1 / u); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -7.6e-13], N[Not[LessEqual[u, 3.45e+77]], $MachinePrecision]], N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * (-N[(t1 / u), $MachinePrecision])), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -7.6 \cdot 10^{-13} \lor \neg \left(u \leq 3.45 \cdot 10^{+77}\right):\\
\;\;\;\;\frac{v}{t1 + u} \cdot \left(-\frac{t1}{u}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -7.5999999999999999e-13 or 3.44999999999999979e77 < u Initial program 74.0%
times-frac97.9%
distribute-frac-neg97.9%
distribute-neg-frac297.9%
+-commutative97.9%
distribute-neg-in97.9%
unsub-neg97.9%
Simplified97.9%
Taylor expanded in t1 around 0 87.6%
mul-1-neg87.6%
distribute-neg-frac87.6%
Simplified87.6%
if -7.5999999999999999e-13 < u < 3.44999999999999979e77Initial program 68.5%
associate-/l*67.0%
distribute-lft-neg-out67.0%
distribute-rgt-neg-in67.0%
associate-/r*76.1%
distribute-neg-frac276.1%
Simplified76.1%
Taylor expanded in t1 around inf 79.7%
associate-*r/79.7%
neg-mul-179.7%
Simplified79.7%
Final simplification83.5%
(FPCore (u v t1) :precision binary64 (if (<= u -4.4e-12) (* t1 (/ (/ v u) (- (- u) t1))) (if (<= u 4.6e+77) (/ v (- t1)) (* (/ t1 (+ t1 u)) (/ v (- u))))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -4.4e-12) {
tmp = t1 * ((v / u) / (-u - t1));
} else if (u <= 4.6e+77) {
tmp = v / -t1;
} else {
tmp = (t1 / (t1 + u)) * (v / -u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-4.4d-12)) then
tmp = t1 * ((v / u) / (-u - t1))
else if (u <= 4.6d+77) then
tmp = v / -t1
else
tmp = (t1 / (t1 + u)) * (v / -u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -4.4e-12) {
tmp = t1 * ((v / u) / (-u - t1));
} else if (u <= 4.6e+77) {
tmp = v / -t1;
} else {
tmp = (t1 / (t1 + u)) * (v / -u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -4.4e-12: tmp = t1 * ((v / u) / (-u - t1)) elif u <= 4.6e+77: tmp = v / -t1 else: tmp = (t1 / (t1 + u)) * (v / -u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -4.4e-12) tmp = Float64(t1 * Float64(Float64(v / u) / Float64(Float64(-u) - t1))); elseif (u <= 4.6e+77) tmp = Float64(v / Float64(-t1)); else tmp = Float64(Float64(t1 / Float64(t1 + u)) * Float64(v / Float64(-u))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -4.4e-12) tmp = t1 * ((v / u) / (-u - t1)); elseif (u <= 4.6e+77) tmp = v / -t1; else tmp = (t1 / (t1 + u)) * (v / -u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -4.4e-12], N[(t1 * N[(N[(v / u), $MachinePrecision] / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 4.6e+77], N[(v / (-t1)), $MachinePrecision], N[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(v / (-u)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -4.4 \cdot 10^{-12}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{\left(-u\right) - t1}\\
\mathbf{elif}\;u \leq 4.6 \cdot 10^{+77}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{t1 + u} \cdot \frac{v}{-u}\\
\end{array}
\end{array}
if u < -4.39999999999999983e-12Initial program 77.7%
associate-/l*82.8%
distribute-lft-neg-out82.8%
distribute-rgt-neg-in82.8%
associate-/r*95.3%
distribute-neg-frac295.3%
Simplified95.3%
Taylor expanded in t1 around 0 88.1%
if -4.39999999999999983e-12 < u < 4.5999999999999999e77Initial program 68.7%
associate-/l*67.2%
distribute-lft-neg-out67.2%
distribute-rgt-neg-in67.2%
associate-/r*76.3%
distribute-neg-frac276.3%
Simplified76.3%
Taylor expanded in t1 around inf 79.8%
associate-*r/79.8%
neg-mul-179.8%
Simplified79.8%
if 4.5999999999999999e77 < u Initial program 69.8%
times-frac97.4%
distribute-frac-neg97.4%
distribute-neg-frac297.4%
+-commutative97.4%
distribute-neg-in97.4%
unsub-neg97.4%
Simplified97.4%
Taylor expanded in t1 around 0 84.0%
Final simplification82.8%
(FPCore (u v t1) :precision binary64 (if (<= u -1.38e-12) (* (/ v (+ t1 u)) (- (/ t1 u))) (if (<= u 4.6e+77) (/ v (- t1)) (/ (* t1 (/ v u)) (- (- u) t1)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.38e-12) {
tmp = (v / (t1 + u)) * -(t1 / u);
} else if (u <= 4.6e+77) {
tmp = v / -t1;
} else {
tmp = (t1 * (v / u)) / (-u - t1);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-1.38d-12)) then
tmp = (v / (t1 + u)) * -(t1 / u)
else if (u <= 4.6d+77) then
tmp = v / -t1
else
tmp = (t1 * (v / u)) / (-u - t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -1.38e-12) {
tmp = (v / (t1 + u)) * -(t1 / u);
} else if (u <= 4.6e+77) {
tmp = v / -t1;
} else {
tmp = (t1 * (v / u)) / (-u - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.38e-12: tmp = (v / (t1 + u)) * -(t1 / u) elif u <= 4.6e+77: tmp = v / -t1 else: tmp = (t1 * (v / u)) / (-u - t1) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.38e-12) tmp = Float64(Float64(v / Float64(t1 + u)) * Float64(-Float64(t1 / u))); elseif (u <= 4.6e+77) tmp = Float64(v / Float64(-t1)); else tmp = Float64(Float64(t1 * Float64(v / u)) / Float64(Float64(-u) - t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -1.38e-12) tmp = (v / (t1 + u)) * -(t1 / u); elseif (u <= 4.6e+77) tmp = v / -t1; else tmp = (t1 * (v / u)) / (-u - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.38e-12], N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * (-N[(t1 / u), $MachinePrecision])), $MachinePrecision], If[LessEqual[u, 4.6e+77], N[(v / (-t1)), $MachinePrecision], N[(N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision] / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.38 \cdot 10^{-12}:\\
\;\;\;\;\frac{v}{t1 + u} \cdot \left(-\frac{t1}{u}\right)\\
\mathbf{elif}\;u \leq 4.6 \cdot 10^{+77}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{u}}{\left(-u\right) - t1}\\
\end{array}
\end{array}
if u < -1.37999999999999998e-12Initial program 77.7%
times-frac98.4%
distribute-frac-neg98.4%
distribute-neg-frac298.4%
+-commutative98.4%
distribute-neg-in98.4%
unsub-neg98.4%
Simplified98.4%
Taylor expanded in t1 around 0 89.5%
mul-1-neg89.5%
distribute-neg-frac89.5%
Simplified89.5%
if -1.37999999999999998e-12 < u < 4.5999999999999999e77Initial program 68.7%
associate-/l*67.2%
distribute-lft-neg-out67.2%
distribute-rgt-neg-in67.2%
associate-/r*76.3%
distribute-neg-frac276.3%
Simplified76.3%
Taylor expanded in t1 around inf 79.8%
associate-*r/79.8%
neg-mul-179.8%
Simplified79.8%
if 4.5999999999999999e77 < u Initial program 69.8%
associate-/l*70.7%
distribute-lft-neg-out70.7%
distribute-rgt-neg-in70.7%
associate-/r*86.1%
distribute-neg-frac286.1%
Simplified86.1%
Taylor expanded in t1 around 0 81.5%
associate-*r/86.4%
frac-2neg86.4%
remove-double-neg86.4%
Applied egg-rr86.4%
Final simplification83.7%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.8e+65) (not (<= u 2.35e+77))) (* t1 (/ v (* u (+ t1 u)))) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.8e+65) || !(u <= 2.35e+77)) {
tmp = t1 * (v / (u * (t1 + u)));
} else {
tmp = v / -t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-1.8d+65)) .or. (.not. (u <= 2.35d+77))) then
tmp = t1 * (v / (u * (t1 + u)))
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.8e+65) || !(u <= 2.35e+77)) {
tmp = t1 * (v / (u * (t1 + u)));
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.8e+65) or not (u <= 2.35e+77): tmp = t1 * (v / (u * (t1 + u))) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.8e+65) || !(u <= 2.35e+77)) tmp = Float64(t1 * Float64(v / Float64(u * Float64(t1 + u)))); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -1.8e+65) || ~((u <= 2.35e+77))) tmp = t1 * (v / (u * (t1 + u))); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.8e+65], N[Not[LessEqual[u, 2.35e+77]], $MachinePrecision]], N[(t1 * N[(v / N[(u * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.8 \cdot 10^{+65} \lor \neg \left(u \leq 2.35 \cdot 10^{+77}\right):\\
\;\;\;\;t1 \cdot \frac{v}{u \cdot \left(t1 + u\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -1.79999999999999989e65 or 2.35e77 < u Initial program 73.8%
associate-/l*75.4%
distribute-lft-neg-out75.4%
distribute-rgt-neg-in75.4%
associate-/r*90.2%
distribute-neg-frac290.2%
Simplified90.2%
Taylor expanded in t1 around 0 86.1%
associate-/l/75.4%
div-inv75.4%
add-sqr-sqrt37.0%
sqrt-unprod68.8%
sqr-neg68.8%
sqrt-unprod31.8%
add-sqr-sqrt61.3%
Applied egg-rr61.3%
associate-*r/61.3%
*-commutative61.3%
*-rgt-identity61.3%
Simplified61.3%
if -1.79999999999999989e65 < u < 2.35e77Initial program 68.9%
associate-/l*68.8%
distribute-lft-neg-out68.8%
distribute-rgt-neg-in68.8%
associate-/r*77.4%
distribute-neg-frac277.4%
Simplified77.4%
Taylor expanded in t1 around inf 77.4%
associate-*r/77.4%
neg-mul-177.4%
Simplified77.4%
Final simplification70.1%
(FPCore (u v t1) :precision binary64 (if (or (<= u -6.5e+168) (not (<= u 1.4e+212))) (/ v u) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -6.5e+168) || !(u <= 1.4e+212)) {
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 <= (-6.5d+168)) .or. (.not. (u <= 1.4d+212))) 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 <= -6.5e+168) || !(u <= 1.4e+212)) {
tmp = v / u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -6.5e+168) or not (u <= 1.4e+212): tmp = v / u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -6.5e+168) || !(u <= 1.4e+212)) 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 <= -6.5e+168) || ~((u <= 1.4e+212))) tmp = v / u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -6.5e+168], N[Not[LessEqual[u, 1.4e+212]], $MachinePrecision]], N[(v / u), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -6.5 \cdot 10^{+168} \lor \neg \left(u \leq 1.4 \cdot 10^{+212}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -6.49999999999999999e168 or 1.39999999999999999e212 < u Initial program 70.9%
associate-/l*71.7%
distribute-lft-neg-out71.7%
distribute-rgt-neg-in71.7%
associate-/r*86.0%
distribute-neg-frac286.0%
Simplified86.0%
Taylor expanded in t1 around 0 84.5%
*-commutative84.5%
distribute-frac-neg284.5%
distribute-frac-neg84.5%
associate-*l/93.9%
distribute-neg-frac293.9%
add-sqr-sqrt54.9%
sqrt-unprod71.7%
sqr-neg71.7%
sqrt-unprod27.3%
add-sqr-sqrt71.3%
Applied egg-rr71.3%
Taylor expanded in u around 0 39.9%
if -6.49999999999999999e168 < u < 1.39999999999999999e212Initial program 71.2%
associate-/l*71.8%
distribute-lft-neg-out71.8%
distribute-rgt-neg-in71.8%
associate-/r*82.3%
distribute-neg-frac282.3%
Simplified82.3%
Taylor expanded in t1 around inf 63.1%
associate-*r/63.1%
neg-mul-163.1%
Simplified63.1%
Final simplification57.6%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.05e+100) (not (<= u 4.5e+218))) (/ v (- u)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.05e+100) || !(u <= 4.5e+218)) {
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.05d+100)) .or. (.not. (u <= 4.5d+218))) 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.05e+100) || !(u <= 4.5e+218)) {
tmp = v / -u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.05e+100) or not (u <= 4.5e+218): tmp = v / -u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.05e+100) || !(u <= 4.5e+218)) tmp = Float64(v / Float64(-u)); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -1.05e+100) || ~((u <= 4.5e+218))) tmp = v / -u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.05e+100], N[Not[LessEqual[u, 4.5e+218]], $MachinePrecision]], N[(v / (-u)), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.05 \cdot 10^{+100} \lor \neg \left(u \leq 4.5 \cdot 10^{+218}\right):\\
\;\;\;\;\frac{v}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -1.0499999999999999e100 or 4.50000000000000008e218 < u Initial program 72.7%
associate-/l*74.8%
distribute-lft-neg-out74.8%
distribute-rgt-neg-in74.8%
associate-/r*88.2%
distribute-neg-frac288.2%
Simplified88.2%
Taylor expanded in t1 around 0 85.6%
Taylor expanded in t1 around inf 38.7%
associate-*r/38.7%
neg-mul-138.7%
Simplified38.7%
if -1.0499999999999999e100 < u < 4.50000000000000008e218Initial program 70.5%
associate-/l*70.6%
distribute-lft-neg-out70.6%
distribute-rgt-neg-in70.6%
associate-/r*81.2%
distribute-neg-frac281.2%
Simplified81.2%
Taylor expanded in t1 around inf 65.1%
associate-*r/65.1%
neg-mul-165.1%
Simplified65.1%
Final simplification57.8%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -3.1e+64) (not (<= t1 2.7e+70))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -3.1e+64) || !(t1 <= 2.7e+70)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-3.1d+64)) .or. (.not. (t1 <= 2.7d+70))) then
tmp = v / t1
else
tmp = v / u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -3.1e+64) || !(t1 <= 2.7e+70)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -3.1e+64) or not (t1 <= 2.7e+70): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -3.1e+64) || !(t1 <= 2.7e+70)) tmp = Float64(v / t1); else tmp = Float64(v / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -3.1e+64) || ~((t1 <= 2.7e+70))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -3.1e+64], N[Not[LessEqual[t1, 2.7e+70]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -3.1 \cdot 10^{+64} \lor \neg \left(t1 \leq 2.7 \cdot 10^{+70}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -3.0999999999999999e64 or 2.7e70 < t1 Initial program 50.6%
times-frac99.8%
distribute-frac-neg99.8%
distribute-neg-frac299.8%
+-commutative99.8%
distribute-neg-in99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in t1 around inf 82.6%
Taylor expanded in u around inf 34.8%
if -3.0999999999999999e64 < t1 < 2.7e70Initial program 85.2%
associate-/l*84.2%
distribute-lft-neg-out84.2%
distribute-rgt-neg-in84.2%
associate-/r*89.8%
distribute-neg-frac289.8%
Simplified89.8%
Taylor expanded in t1 around 0 66.4%
*-commutative66.4%
distribute-frac-neg266.4%
distribute-frac-neg66.4%
associate-*l/71.2%
distribute-neg-frac271.2%
add-sqr-sqrt32.2%
sqrt-unprod50.3%
sqr-neg50.3%
sqrt-unprod21.3%
add-sqr-sqrt37.9%
Applied egg-rr37.9%
Taylor expanded in u around 0 18.4%
Final simplification25.1%
(FPCore (u v t1) :precision binary64 (* (/ v (+ t1 u)) (/ t1 (- (- u) t1))))
double code(double u, double v, double t1) {
return (v / (t1 + u)) * (t1 / (-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 / (t1 + u)) * (t1 / (-u - t1))
end function
public static double code(double u, double v, double t1) {
return (v / (t1 + u)) * (t1 / (-u - t1));
}
def code(u, v, t1): return (v / (t1 + u)) * (t1 / (-u - t1))
function code(u, v, t1) return Float64(Float64(v / Float64(t1 + u)) * Float64(t1 / Float64(Float64(-u) - t1))) end
function tmp = code(u, v, t1) tmp = (v / (t1 + u)) * (t1 / (-u - t1)); end
code[u_, v_, t1_] := N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(t1 / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{t1 + u} \cdot \frac{t1}{\left(-u\right) - t1}
\end{array}
Initial program 71.1%
times-frac98.2%
distribute-frac-neg98.2%
distribute-neg-frac298.2%
+-commutative98.2%
distribute-neg-in98.2%
unsub-neg98.2%
Simplified98.2%
Final simplification98.2%
(FPCore (u v t1) :precision binary64 (/ (* v (/ t1 (- (- u) t1))) (+ t1 u)))
double code(double u, double v, double t1) {
return (v * (t1 / (-u - t1))) / (t1 + u);
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (v * (t1 / (-u - t1))) / (t1 + u)
end function
public static double code(double u, double v, double t1) {
return (v * (t1 / (-u - t1))) / (t1 + u);
}
def code(u, v, t1): return (v * (t1 / (-u - t1))) / (t1 + u)
function code(u, v, t1) return Float64(Float64(v * Float64(t1 / Float64(Float64(-u) - t1))) / Float64(t1 + u)) end
function tmp = code(u, v, t1) tmp = (v * (t1 / (-u - t1))) / (t1 + u); end
code[u_, v_, t1_] := N[(N[(v * N[(t1 / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{v \cdot \frac{t1}{\left(-u\right) - t1}}{t1 + u}
\end{array}
Initial program 71.1%
associate-/l*71.8%
distribute-lft-neg-out71.8%
distribute-rgt-neg-in71.8%
associate-/r*83.2%
distribute-neg-frac283.2%
Simplified83.2%
distribute-frac-neg283.2%
associate-/r*71.8%
distribute-rgt-neg-in71.8%
distribute-lft-neg-out71.8%
associate-*r/71.1%
times-frac98.2%
frac-2neg98.2%
associate-*r/98.9%
add-sqr-sqrt52.9%
sqrt-unprod47.3%
sqr-neg47.3%
sqrt-unprod14.7%
add-sqr-sqrt38.3%
add-sqr-sqrt19.6%
sqrt-unprod55.3%
sqr-neg55.3%
sqrt-prod50.7%
add-sqr-sqrt98.9%
Applied egg-rr98.9%
Final simplification98.9%
(FPCore (u v t1) :precision binary64 (/ v (- (* u (- 2.0)) t1)))
double code(double u, double v, double t1) {
return v / ((u * -2.0) - 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 * -2.0d0) - t1)
end function
public static double code(double u, double v, double t1) {
return v / ((u * -2.0) - t1);
}
def code(u, v, t1): return v / ((u * -2.0) - t1)
function code(u, v, t1) return Float64(v / Float64(Float64(u * Float64(-2.0)) - t1)) end
function tmp = code(u, v, t1) tmp = v / ((u * -2.0) - t1); end
code[u_, v_, t1_] := N[(v / N[(N[(u * (-2.0)), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{u \cdot \left(-2\right) - t1}
\end{array}
Initial program 71.1%
associate-/l*71.8%
distribute-lft-neg-out71.8%
distribute-rgt-neg-in71.8%
associate-/r*83.2%
distribute-neg-frac283.2%
Simplified83.2%
associate-*r/99.1%
+-commutative99.1%
distribute-neg-in99.1%
sub-neg99.1%
associate-*l/98.2%
frac-2neg98.2%
clear-num98.0%
frac-times92.2%
*-un-lft-identity92.2%
add-sqr-sqrt45.3%
sqrt-unprod57.3%
sqr-neg57.3%
sqrt-prod18.8%
add-sqr-sqrt38.4%
Applied egg-rr92.2%
Taylor expanded in t1 around inf 59.2%
*-commutative59.2%
Simplified59.2%
Final simplification59.2%
(FPCore (u v t1) :precision binary64 (/ (- v) (+ t1 u)))
double code(double u, double v, double t1) {
return -v / (t1 + u);
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = -v / (t1 + u)
end function
public static double code(double u, double v, double t1) {
return -v / (t1 + u);
}
def code(u, v, t1): return -v / (t1 + u)
function code(u, v, t1) return Float64(Float64(-v) / Float64(t1 + u)) end
function tmp = code(u, v, t1) tmp = -v / (t1 + u); end
code[u_, v_, t1_] := N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{-v}{t1 + u}
\end{array}
Initial program 71.1%
associate-/l*71.8%
distribute-lft-neg-out71.8%
distribute-rgt-neg-in71.8%
associate-/r*83.2%
distribute-neg-frac283.2%
Simplified83.2%
associate-*r/99.1%
neg-mul-199.1%
associate-/r*99.1%
Applied egg-rr99.1%
Taylor expanded in t1 around inf 58.9%
Taylor expanded in v around 0 58.9%
mul-1-neg58.9%
+-commutative58.9%
distribute-neg-frac258.9%
neg-sub058.9%
+-commutative58.9%
associate--r+58.9%
neg-sub058.9%
Simplified58.9%
Final simplification58.9%
(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 71.1%
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 inf 53.2%
Taylor expanded in u around inf 15.5%
Final simplification15.5%
herbie shell --seed 2024040
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))