
(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 17 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)) -1.0) (+ t1 u)))
double code(double u, double v, double t1) {
return ((t1 / ((t1 + u) / v)) / -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 / ((t1 + u) / v)) / (-1.0d0)) / (t1 + u)
end function
public static double code(double u, double v, double t1) {
return ((t1 / ((t1 + u) / v)) / -1.0) / (t1 + u);
}
def code(u, v, t1): return ((t1 / ((t1 + u) / v)) / -1.0) / (t1 + u)
function code(u, v, t1) return Float64(Float64(Float64(t1 / Float64(Float64(t1 + u) / v)) / -1.0) / Float64(t1 + u)) end
function tmp = code(u, v, t1) tmp = ((t1 / ((t1 + u) / v)) / -1.0) / (t1 + u); end
code[u_, v_, t1_] := N[(N[(N[(t1 / N[(N[(t1 + u), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision] / -1.0), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{\frac{t1}{\frac{t1 + u}{v}}}{-1}}{t1 + u}
\end{array}
Initial program 75.0%
associate-/l*74.5%
distribute-lft-neg-out74.5%
distribute-rgt-neg-in74.5%
associate-/r*86.2%
distribute-neg-frac286.2%
Simplified86.2%
associate-*r/98.0%
neg-mul-198.0%
associate-/r*98.0%
Applied egg-rr98.0%
clear-num97.8%
un-div-inv98.0%
Applied egg-rr98.0%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (- (- u) t1)))
(if (<= t1 -9.4e+122)
(/ v t_1)
(if (<= t1 4.6e+52) (* t1 (/ (/ v (+ t1 u)) t_1)) (/ v (- u t1))))))
double code(double u, double v, double t1) {
double t_1 = -u - t1;
double tmp;
if (t1 <= -9.4e+122) {
tmp = v / t_1;
} else if (t1 <= 4.6e+52) {
tmp = t1 * ((v / (t1 + u)) / t_1);
} else {
tmp = v / (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) :: t_1
real(8) :: tmp
t_1 = -u - t1
if (t1 <= (-9.4d+122)) then
tmp = v / t_1
else if (t1 <= 4.6d+52) then
tmp = t1 * ((v / (t1 + u)) / t_1)
else
tmp = v / (u - t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = -u - t1;
double tmp;
if (t1 <= -9.4e+122) {
tmp = v / t_1;
} else if (t1 <= 4.6e+52) {
tmp = t1 * ((v / (t1 + u)) / t_1);
} else {
tmp = v / (u - t1);
}
return tmp;
}
def code(u, v, t1): t_1 = -u - t1 tmp = 0 if t1 <= -9.4e+122: tmp = v / t_1 elif t1 <= 4.6e+52: tmp = t1 * ((v / (t1 + u)) / t_1) else: tmp = v / (u - t1) return tmp
function code(u, v, t1) t_1 = Float64(Float64(-u) - t1) tmp = 0.0 if (t1 <= -9.4e+122) tmp = Float64(v / t_1); elseif (t1 <= 4.6e+52) tmp = Float64(t1 * Float64(Float64(v / Float64(t1 + u)) / t_1)); else tmp = Float64(v / Float64(u - t1)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = -u - t1; tmp = 0.0; if (t1 <= -9.4e+122) tmp = v / t_1; elseif (t1 <= 4.6e+52) tmp = t1 * ((v / (t1 + u)) / t_1); else tmp = v / (u - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-u) - t1), $MachinePrecision]}, If[LessEqual[t1, -9.4e+122], N[(v / t$95$1), $MachinePrecision], If[LessEqual[t1, 4.6e+52], N[(t1 * N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-u\right) - t1\\
\mathbf{if}\;t1 \leq -9.4 \cdot 10^{+122}:\\
\;\;\;\;\frac{v}{t\_1}\\
\mathbf{elif}\;t1 \leq 4.6 \cdot 10^{+52}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{t1 + u}}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u - t1}\\
\end{array}
\end{array}
if t1 < -9.40000000000000047e122Initial program 41.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 95.0%
Taylor expanded in v around 0 95.0%
neg-mul-195.0%
distribute-neg-frac295.0%
distribute-neg-in95.0%
sub-neg95.0%
Simplified95.0%
if -9.40000000000000047e122 < t1 < 4.6e52Initial program 87.4%
associate-/l*87.2%
distribute-lft-neg-out87.2%
distribute-rgt-neg-in87.2%
associate-/r*93.3%
distribute-neg-frac293.3%
Simplified93.3%
if 4.6e52 < t1 Initial program 52.9%
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.1%
clear-num87.1%
clear-num87.0%
frac-times87.0%
metadata-eval87.0%
add-sqr-sqrt42.3%
sqrt-unprod85.0%
sqr-neg85.0%
sqrt-unprod44.6%
add-sqr-sqrt87.3%
Applied egg-rr87.3%
*-commutative87.3%
associate-*l/87.3%
associate-*r/57.6%
associate-/r*52.9%
times-frac87.3%
*-inverses87.3%
Simplified87.3%
Taylor expanded in v around 0 87.4%
Final simplification92.5%
(FPCore (u v t1)
:precision binary64
(if (<= t1 -1.9)
(/ v (- (- u) t1))
(if (<= t1 1.25e-31)
(/ (/ (* t1 (- v)) u) u)
(* (/ v (+ t1 u)) (+ -1.0 (/ u t1))))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1.9) {
tmp = v / (-u - t1);
} else if (t1 <= 1.25e-31) {
tmp = ((t1 * -v) / u) / u;
} else {
tmp = (v / (t1 + u)) * (-1.0 + (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.9d0)) then
tmp = v / (-u - t1)
else if (t1 <= 1.25d-31) then
tmp = ((t1 * -v) / u) / u
else
tmp = (v / (t1 + u)) * ((-1.0d0) + (u / t1))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1.9) {
tmp = v / (-u - t1);
} else if (t1 <= 1.25e-31) {
tmp = ((t1 * -v) / u) / u;
} else {
tmp = (v / (t1 + u)) * (-1.0 + (u / t1));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -1.9: tmp = v / (-u - t1) elif t1 <= 1.25e-31: tmp = ((t1 * -v) / u) / u else: tmp = (v / (t1 + u)) * (-1.0 + (u / t1)) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -1.9) tmp = Float64(v / Float64(Float64(-u) - t1)); elseif (t1 <= 1.25e-31) tmp = Float64(Float64(Float64(t1 * Float64(-v)) / u) / u); else tmp = Float64(Float64(v / Float64(t1 + u)) * Float64(-1.0 + Float64(u / t1))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -1.9) tmp = v / (-u - t1); elseif (t1 <= 1.25e-31) tmp = ((t1 * -v) / u) / u; else tmp = (v / (t1 + u)) * (-1.0 + (u / t1)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -1.9], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 1.25e-31], N[(N[(N[(t1 * (-v)), $MachinePrecision] / u), $MachinePrecision] / u), $MachinePrecision], N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(-1.0 + N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.9:\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{elif}\;t1 \leq 1.25 \cdot 10^{-31}:\\
\;\;\;\;\frac{\frac{t1 \cdot \left(-v\right)}{u}}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{t1 + u} \cdot \left(-1 + \frac{u}{t1}\right)\\
\end{array}
\end{array}
if t1 < -1.8999999999999999Initial program 63.1%
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.4%
Taylor expanded in v around 0 88.4%
neg-mul-188.4%
distribute-neg-frac288.4%
distribute-neg-in88.4%
sub-neg88.4%
Simplified88.4%
if -1.8999999999999999 < t1 < 1.25e-31Initial program 85.0%
associate-/l*84.0%
distribute-lft-neg-out84.0%
distribute-rgt-neg-in84.0%
associate-/r*90.8%
distribute-neg-frac290.8%
Simplified90.8%
associate-*r/96.0%
neg-mul-196.0%
associate-/r*96.0%
Applied egg-rr96.0%
Taylor expanded in t1 around 0 79.9%
associate-*r/79.9%
neg-mul-179.9%
distribute-rgt-neg-in79.9%
Simplified79.9%
Taylor expanded in t1 around 0 80.9%
if 1.25e-31 < t1 Initial program 67.7%
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 85.0%
Final simplification83.8%
(FPCore (u v t1) :precision binary64 (if (<= t1 -1e-14) (/ v (- (- u) t1)) (if (<= t1 3e-81) (/ (/ (* t1 (- v)) u) u) (/ v (- u t1)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1e-14) {
tmp = v / (-u - t1);
} else if (t1 <= 3e-81) {
tmp = ((t1 * -v) / u) / u;
} else {
tmp = v / (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-14)) then
tmp = v / (-u - t1)
else if (t1 <= 3d-81) then
tmp = ((t1 * -v) / u) / u
else
tmp = v / (u - t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1e-14) {
tmp = v / (-u - t1);
} else if (t1 <= 3e-81) {
tmp = ((t1 * -v) / u) / u;
} else {
tmp = v / (u - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -1e-14: tmp = v / (-u - t1) elif t1 <= 3e-81: tmp = ((t1 * -v) / u) / u else: tmp = v / (u - t1) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -1e-14) tmp = Float64(v / Float64(Float64(-u) - t1)); elseif (t1 <= 3e-81) tmp = Float64(Float64(Float64(t1 * Float64(-v)) / u) / u); else tmp = Float64(v / Float64(u - t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -1e-14) tmp = v / (-u - t1); elseif (t1 <= 3e-81) tmp = ((t1 * -v) / u) / u; else tmp = v / (u - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -1e-14], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 3e-81], N[(N[(N[(t1 * (-v)), $MachinePrecision] / u), $MachinePrecision] / u), $MachinePrecision], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1 \cdot 10^{-14}:\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{elif}\;t1 \leq 3 \cdot 10^{-81}:\\
\;\;\;\;\frac{\frac{t1 \cdot \left(-v\right)}{u}}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u - t1}\\
\end{array}
\end{array}
if t1 < -9.99999999999999999e-15Initial program 63.1%
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.4%
Taylor expanded in v around 0 88.4%
neg-mul-188.4%
distribute-neg-frac288.4%
distribute-neg-in88.4%
sub-neg88.4%
Simplified88.4%
if -9.99999999999999999e-15 < t1 < 2.9999999999999999e-81Initial program 86.2%
associate-/l*84.4%
distribute-lft-neg-out84.4%
distribute-rgt-neg-in84.4%
associate-/r*90.1%
distribute-neg-frac290.1%
Simplified90.1%
associate-*r/95.7%
neg-mul-195.7%
associate-/r*95.7%
Applied egg-rr95.7%
Taylor expanded in t1 around 0 81.6%
associate-*r/81.6%
neg-mul-181.6%
distribute-rgt-neg-in81.6%
Simplified81.6%
Taylor expanded in t1 around 0 82.6%
if 2.9999999999999999e-81 < t1 Initial program 67.8%
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 80.6%
clear-num80.6%
clear-num80.4%
frac-times80.4%
metadata-eval80.4%
add-sqr-sqrt35.3%
sqrt-unprod82.8%
sqr-neg82.8%
sqrt-unprod44.9%
add-sqr-sqrt80.5%
Applied egg-rr80.5%
*-commutative80.5%
associate-*l/80.5%
associate-*r/62.7%
associate-/r*58.6%
times-frac80.5%
*-inverses80.5%
Simplified80.5%
Taylor expanded in v around 0 80.7%
Final simplification83.5%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -9e-149) (not (<= t1 1.5e-168))) (/ v (- (- u) t1)) (/ (/ (* t1 v) u) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -9e-149) || !(t1 <= 1.5e-168)) {
tmp = v / (-u - t1);
} else {
tmp = ((t1 * v) / 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 <= (-9d-149)) .or. (.not. (t1 <= 1.5d-168))) then
tmp = v / (-u - t1)
else
tmp = ((t1 * v) / u) / t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -9e-149) || !(t1 <= 1.5e-168)) {
tmp = v / (-u - t1);
} else {
tmp = ((t1 * v) / u) / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -9e-149) or not (t1 <= 1.5e-168): tmp = v / (-u - t1) else: tmp = ((t1 * v) / u) / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -9e-149) || !(t1 <= 1.5e-168)) tmp = Float64(v / Float64(Float64(-u) - t1)); else tmp = Float64(Float64(Float64(t1 * v) / u) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -9e-149) || ~((t1 <= 1.5e-168))) tmp = v / (-u - t1); else tmp = ((t1 * v) / u) / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -9e-149], N[Not[LessEqual[t1, 1.5e-168]], $MachinePrecision]], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t1 * v), $MachinePrecision] / u), $MachinePrecision] / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -9 \cdot 10^{-149} \lor \neg \left(t1 \leq 1.5 \cdot 10^{-168}\right):\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t1 \cdot v}{u}}{t1}\\
\end{array}
\end{array}
if t1 < -8.9999999999999996e-149 or 1.49999999999999996e-168 < t1 Initial program 70.4%
times-frac98.8%
distribute-frac-neg98.8%
distribute-neg-frac298.8%
+-commutative98.8%
distribute-neg-in98.8%
unsub-neg98.8%
Simplified98.8%
Taylor expanded in t1 around inf 75.9%
Taylor expanded in v around 0 75.5%
neg-mul-175.5%
distribute-neg-frac275.5%
distribute-neg-in75.5%
sub-neg75.5%
Simplified75.5%
if -8.9999999999999996e-149 < t1 < 1.49999999999999996e-168Initial program 86.3%
times-frac92.0%
distribute-frac-neg92.0%
distribute-neg-frac292.0%
+-commutative92.0%
distribute-neg-in92.0%
unsub-neg92.0%
Simplified92.0%
Taylor expanded in t1 around inf 31.4%
associate-*r/49.9%
associate-*l/40.5%
*-commutative40.5%
add-sqr-sqrt20.8%
sqrt-unprod35.1%
sqr-neg35.1%
sqrt-unprod15.8%
add-sqr-sqrt35.5%
associate-*l/35.4%
sub-neg35.4%
distribute-neg-in35.4%
+-commutative35.4%
clear-num35.4%
frac-2neg35.4%
associate-/r/35.4%
*-commutative35.4%
associate-*l/35.4%
*-un-lft-identity35.4%
Applied egg-rr35.4%
Taylor expanded in t1 around 0 35.6%
Final simplification63.8%
(FPCore (u v t1) :precision binary64 (if (<= u -1.3e+115) (/ v u) (if (<= u 5e+62) (/ v (- t1)) (/ 1.0 (/ u v)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.3e+115) {
tmp = v / u;
} else if (u <= 5e+62) {
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 <= (-1.3d+115)) then
tmp = v / u
else if (u <= 5d+62) 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 <= -1.3e+115) {
tmp = v / u;
} else if (u <= 5e+62) {
tmp = v / -t1;
} else {
tmp = 1.0 / (u / v);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.3e+115: tmp = v / u elif u <= 5e+62: tmp = v / -t1 else: tmp = 1.0 / (u / v) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.3e+115) tmp = Float64(v / u); elseif (u <= 5e+62) 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 <= -1.3e+115) tmp = v / u; elseif (u <= 5e+62) tmp = v / -t1; else tmp = 1.0 / (u / v); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.3e+115], N[(v / u), $MachinePrecision], If[LessEqual[u, 5e+62], N[(v / (-t1)), $MachinePrecision], N[(1.0 / N[(u / v), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.3 \cdot 10^{+115}:\\
\;\;\;\;\frac{v}{u}\\
\mathbf{elif}\;u \leq 5 \cdot 10^{+62}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{u}{v}}\\
\end{array}
\end{array}
if u < -1.3e115Initial program 75.1%
times-frac97.5%
distribute-frac-neg97.5%
distribute-neg-frac297.5%
+-commutative97.5%
distribute-neg-in97.5%
unsub-neg97.5%
Simplified97.5%
Taylor expanded in t1 around inf 53.2%
clear-num53.2%
clear-num53.2%
frac-times55.8%
metadata-eval55.8%
add-sqr-sqrt55.8%
sqrt-unprod62.5%
sqr-neg62.5%
sqrt-unprod0.0%
add-sqr-sqrt56.0%
Applied egg-rr56.0%
*-commutative56.0%
associate-*l/64.0%
associate-*r/43.9%
associate-/r*43.6%
times-frac46.6%
*-inverses46.6%
Simplified46.6%
Taylor expanded in u around inf 42.0%
if -1.3e115 < u < 5.00000000000000029e62Initial program 71.6%
associate-/l*70.8%
distribute-lft-neg-out70.8%
distribute-rgt-neg-in70.8%
associate-/r*82.2%
distribute-neg-frac282.2%
Simplified82.2%
Taylor expanded in t1 around inf 67.4%
associate-*r/67.4%
neg-mul-167.4%
Simplified67.4%
if 5.00000000000000029e62 < u Initial program 87.7%
times-frac93.9%
distribute-frac-neg93.9%
distribute-neg-frac293.9%
+-commutative93.9%
distribute-neg-in93.9%
unsub-neg93.9%
Simplified93.9%
Taylor expanded in t1 around inf 52.5%
clear-num54.6%
clear-num54.6%
frac-times56.1%
metadata-eval56.1%
add-sqr-sqrt0.0%
sqrt-unprod64.1%
sqr-neg64.1%
sqrt-unprod56.0%
add-sqr-sqrt56.0%
Applied egg-rr56.0%
*-commutative56.0%
associate-*l/65.2%
associate-*r/36.1%
associate-/r*39.9%
times-frac36.1%
*-inverses36.1%
Simplified36.1%
Taylor expanded in u around inf 28.6%
clear-num30.0%
inv-pow30.0%
Applied egg-rr30.0%
unpow-130.0%
Simplified30.0%
Final simplification56.8%
(FPCore (u v t1) :precision binary64 (if (or (<= u -4.1e+114) (not (<= u 6.8e+86))) (/ v u) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -4.1e+114) || !(u <= 6.8e+86)) {
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 <= (-4.1d+114)) .or. (.not. (u <= 6.8d+86))) 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 <= -4.1e+114) || !(u <= 6.8e+86)) {
tmp = v / u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -4.1e+114) or not (u <= 6.8e+86): tmp = v / u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -4.1e+114) || !(u <= 6.8e+86)) 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 <= -4.1e+114) || ~((u <= 6.8e+86))) tmp = v / u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -4.1e+114], N[Not[LessEqual[u, 6.8e+86]], $MachinePrecision]], N[(v / u), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -4.1 \cdot 10^{+114} \lor \neg \left(u \leq 6.8 \cdot 10^{+86}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -4.1000000000000001e114 or 6.7999999999999995e86 < u Initial program 80.8%
times-frac95.3%
distribute-frac-neg95.3%
distribute-neg-frac295.3%
+-commutative95.3%
distribute-neg-in95.3%
unsub-neg95.3%
Simplified95.3%
Taylor expanded in t1 around inf 53.1%
clear-num54.3%
clear-num54.3%
frac-times55.5%
metadata-eval55.5%
add-sqr-sqrt27.2%
sqrt-unprod63.5%
sqr-neg63.5%
sqrt-unprod28.3%
add-sqr-sqrt55.6%
Applied egg-rr55.6%
*-commutative55.6%
associate-*l/64.8%
associate-*r/39.4%
associate-/r*40.3%
times-frac40.7%
*-inverses40.7%
Simplified40.7%
Taylor expanded in u around inf 36.1%
if -4.1000000000000001e114 < u < 6.7999999999999995e86Initial program 72.4%
associate-/l*71.6%
distribute-lft-neg-out71.6%
distribute-rgt-neg-in71.6%
associate-/r*82.7%
distribute-neg-frac282.7%
Simplified82.7%
Taylor expanded in t1 around inf 66.1%
associate-*r/66.1%
neg-mul-166.1%
Simplified66.1%
Final simplification56.7%
(FPCore (u v t1) :precision binary64 (if (<= u -2.1e+109) (/ v u) (if (<= u 1.88e+84) (/ v (- t1)) (/ v (- u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -2.1e+109) {
tmp = v / u;
} else if (u <= 1.88e+84) {
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 <= (-2.1d+109)) then
tmp = v / u
else if (u <= 1.88d+84) 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 <= -2.1e+109) {
tmp = v / u;
} else if (u <= 1.88e+84) {
tmp = v / -t1;
} else {
tmp = v / -u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -2.1e+109: tmp = v / u elif u <= 1.88e+84: tmp = v / -t1 else: tmp = v / -u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -2.1e+109) tmp = Float64(v / u); elseif (u <= 1.88e+84) 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 <= -2.1e+109) tmp = v / u; elseif (u <= 1.88e+84) tmp = v / -t1; else tmp = v / -u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -2.1e+109], N[(v / u), $MachinePrecision], If[LessEqual[u, 1.88e+84], N[(v / (-t1)), $MachinePrecision], N[(v / (-u)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.1 \cdot 10^{+109}:\\
\;\;\;\;\frac{v}{u}\\
\mathbf{elif}\;u \leq 1.88 \cdot 10^{+84}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-u}\\
\end{array}
\end{array}
if u < -2.1000000000000001e109Initial program 75.1%
times-frac97.5%
distribute-frac-neg97.5%
distribute-neg-frac297.5%
+-commutative97.5%
distribute-neg-in97.5%
unsub-neg97.5%
Simplified97.5%
Taylor expanded in t1 around inf 53.2%
clear-num53.2%
clear-num53.2%
frac-times55.8%
metadata-eval55.8%
add-sqr-sqrt55.8%
sqrt-unprod62.5%
sqr-neg62.5%
sqrt-unprod0.0%
add-sqr-sqrt56.0%
Applied egg-rr56.0%
*-commutative56.0%
associate-*l/64.0%
associate-*r/43.9%
associate-/r*43.6%
times-frac46.6%
*-inverses46.6%
Simplified46.6%
Taylor expanded in u around inf 42.0%
if -2.1000000000000001e109 < u < 1.8799999999999999e84Initial program 72.4%
associate-/l*71.6%
distribute-lft-neg-out71.6%
distribute-rgt-neg-in71.6%
associate-/r*82.7%
distribute-neg-frac282.7%
Simplified82.7%
Taylor expanded in t1 around inf 66.1%
associate-*r/66.1%
neg-mul-166.1%
Simplified66.1%
if 1.8799999999999999e84 < u Initial program 86.2%
times-frac93.2%
distribute-frac-neg93.2%
distribute-neg-frac293.2%
+-commutative93.2%
distribute-neg-in93.2%
unsub-neg93.2%
Simplified93.2%
Taylor expanded in t1 around inf 53.0%
Taylor expanded in t1 around 0 30.6%
associate-*r/30.6%
mul-1-neg30.6%
Simplified30.6%
Final simplification56.8%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -2.8e+98) (not (<= t1 3.1e+118))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -2.8e+98) || !(t1 <= 3.1e+118)) {
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 <= (-2.8d+98)) .or. (.not. (t1 <= 3.1d+118))) 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 <= -2.8e+98) || !(t1 <= 3.1e+118)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -2.8e+98) or not (t1 <= 3.1e+118): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -2.8e+98) || !(t1 <= 3.1e+118)) 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 <= -2.8e+98) || ~((t1 <= 3.1e+118))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -2.8e+98], N[Not[LessEqual[t1, 3.1e+118]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2.8 \cdot 10^{+98} \lor \neg \left(t1 \leq 3.1 \cdot 10^{+118}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -2.8000000000000001e98 or 3.09999999999999986e118 < t1 Initial program 45.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 90.7%
Taylor expanded in u around inf 33.7%
if -2.8000000000000001e98 < t1 < 3.09999999999999986e118Initial program 86.9%
times-frac95.6%
distribute-frac-neg95.6%
distribute-neg-frac295.6%
+-commutative95.6%
distribute-neg-in95.6%
unsub-neg95.6%
Simplified95.6%
Taylor expanded in t1 around inf 51.6%
clear-num52.1%
clear-num52.0%
frac-times52.9%
metadata-eval52.9%
add-sqr-sqrt22.3%
sqrt-unprod56.4%
sqr-neg56.4%
sqrt-unprod29.4%
add-sqr-sqrt51.0%
Applied egg-rr51.0%
*-commutative51.0%
associate-*l/55.1%
associate-*r/42.9%
associate-/r*43.9%
times-frac44.1%
*-inverses44.1%
Simplified44.1%
Taylor expanded in u around inf 17.9%
Final simplification22.4%
(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 75.0%
associate-/l*74.5%
distribute-lft-neg-out74.5%
distribute-rgt-neg-in74.5%
associate-/r*86.2%
distribute-neg-frac286.2%
Simplified86.2%
associate-*r/98.0%
neg-mul-198.0%
associate-/r*98.0%
Applied egg-rr98.0%
(FPCore (u v t1) :precision binary64 (/ (* t1 (* v (/ -1.0 (+ t1 u)))) (+ t1 u)))
double code(double u, double v, double t1) {
return (t1 * (v * (-1.0 / (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 * ((-1.0d0) / (t1 + u)))) / (t1 + u)
end function
public static double code(double u, double v, double t1) {
return (t1 * (v * (-1.0 / (t1 + u)))) / (t1 + u);
}
def code(u, v, t1): return (t1 * (v * (-1.0 / (t1 + u)))) / (t1 + u)
function code(u, v, t1) return Float64(Float64(t1 * Float64(v * Float64(-1.0 / Float64(t1 + u)))) / Float64(t1 + u)) end
function tmp = code(u, v, t1) tmp = (t1 * (v * (-1.0 / (t1 + u)))) / (t1 + u); end
code[u_, v_, t1_] := N[(N[(t1 * N[(v * N[(-1.0 / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{t1 \cdot \left(v \cdot \frac{-1}{t1 + u}\right)}{t1 + u}
\end{array}
Initial program 75.0%
associate-/l*74.5%
distribute-lft-neg-out74.5%
distribute-rgt-neg-in74.5%
associate-/r*86.2%
distribute-neg-frac286.2%
Simplified86.2%
associate-*r/98.0%
neg-mul-198.0%
associate-/r*98.0%
Applied egg-rr98.0%
associate-*r/85.9%
associate-/l/85.9%
neg-mul-185.9%
+-commutative85.9%
distribute-neg-in85.9%
sub-neg85.9%
associate-*l/97.8%
div-inv97.8%
associate-*l*97.8%
Applied egg-rr97.8%
Final simplification97.8%
(FPCore (u v t1) :precision binary64 (if (<= u 6.5e+86) (/ v (- (- u) t1)) (/ (/ t1 u) (/ t1 v))))
double code(double u, double v, double t1) {
double tmp;
if (u <= 6.5e+86) {
tmp = v / (-u - t1);
} else {
tmp = (t1 / u) / (t1 / 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 <= 6.5d+86) then
tmp = v / (-u - t1)
else
tmp = (t1 / u) / (t1 / v)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= 6.5e+86) {
tmp = v / (-u - t1);
} else {
tmp = (t1 / u) / (t1 / v);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= 6.5e+86: tmp = v / (-u - t1) else: tmp = (t1 / u) / (t1 / v) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= 6.5e+86) tmp = Float64(v / Float64(Float64(-u) - t1)); else tmp = Float64(Float64(t1 / u) / Float64(t1 / v)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= 6.5e+86) tmp = v / (-u - t1); else tmp = (t1 / u) / (t1 / v); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, 6.5e+86], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], N[(N[(t1 / u), $MachinePrecision] / N[(t1 / v), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq 6.5 \cdot 10^{+86}:\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t1}{u}}{\frac{t1}{v}}\\
\end{array}
\end{array}
if u < 6.49999999999999996e86Initial program 72.9%
times-frac97.5%
distribute-frac-neg97.5%
distribute-neg-frac297.5%
+-commutative97.5%
distribute-neg-in97.5%
unsub-neg97.5%
Simplified97.5%
Taylor expanded in t1 around inf 64.7%
Taylor expanded in v around 0 63.2%
neg-mul-163.2%
distribute-neg-frac263.2%
distribute-neg-in63.2%
sub-neg63.2%
Simplified63.2%
if 6.49999999999999996e86 < u Initial program 86.2%
times-frac93.2%
distribute-frac-neg93.2%
distribute-neg-frac293.2%
+-commutative93.2%
distribute-neg-in93.2%
unsub-neg93.2%
Simplified93.2%
Taylor expanded in t1 around inf 53.0%
clear-num53.0%
un-div-inv53.0%
add-sqr-sqrt0.0%
sqrt-unprod64.4%
sqr-neg64.4%
sqrt-unprod52.9%
add-sqr-sqrt52.9%
Applied egg-rr52.9%
Taylor expanded in u around inf 52.9%
Final simplification61.5%
(FPCore (u v t1) :precision binary64 (/ (* v (/ t1 (+ t1 u))) (- (- u) t1)))
double code(double u, double v, double t1) {
return (v * (t1 / (t1 + u))) / (-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 / (t1 + u))) / (-u - t1)
end function
public static double code(double u, double v, double t1) {
return (v * (t1 / (t1 + u))) / (-u - t1);
}
def code(u, v, t1): return (v * (t1 / (t1 + u))) / (-u - t1)
function code(u, v, t1) return Float64(Float64(v * Float64(t1 / Float64(t1 + u))) / Float64(Float64(-u) - t1)) end
function tmp = code(u, v, t1) tmp = (v * (t1 / (t1 + u))) / (-u - t1); end
code[u_, v_, t1_] := N[(N[(v * N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{v \cdot \frac{t1}{t1 + u}}{\left(-u\right) - t1}
\end{array}
Initial program 75.0%
associate-/l*74.5%
distribute-lft-neg-out74.5%
distribute-rgt-neg-in74.5%
associate-/r*86.2%
distribute-neg-frac286.2%
Simplified86.2%
distribute-frac-neg286.2%
distribute-rgt-neg-out86.2%
associate-/r*74.5%
distribute-lft-neg-out74.5%
associate-/l*75.0%
times-frac96.8%
frac-2neg96.8%
associate-*r/97.8%
add-sqr-sqrt49.3%
sqrt-unprod44.8%
sqr-neg44.8%
sqrt-unprod17.7%
add-sqr-sqrt36.4%
add-sqr-sqrt18.7%
sqrt-unprod57.8%
sqr-neg57.8%
sqrt-prod46.9%
add-sqr-sqrt97.8%
Applied egg-rr97.8%
Final simplification97.8%
(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 75.0%
times-frac96.8%
distribute-frac-neg96.8%
distribute-neg-frac296.8%
+-commutative96.8%
distribute-neg-in96.8%
unsub-neg96.8%
Simplified96.8%
Final simplification96.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(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 75.0%
times-frac96.8%
distribute-frac-neg96.8%
distribute-neg-frac296.8%
+-commutative96.8%
distribute-neg-in96.8%
unsub-neg96.8%
Simplified96.8%
Taylor expanded in t1 around inf 62.9%
Taylor expanded in v around 0 58.7%
neg-mul-158.7%
distribute-neg-frac258.7%
distribute-neg-in58.7%
sub-neg58.7%
Simplified58.7%
Final simplification58.7%
(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 75.0%
times-frac96.8%
distribute-frac-neg96.8%
distribute-neg-frac296.8%
+-commutative96.8%
distribute-neg-in96.8%
unsub-neg96.8%
Simplified96.8%
Taylor expanded in t1 around inf 62.9%
clear-num63.2%
clear-num63.1%
frac-times63.8%
metadata-eval63.8%
add-sqr-sqrt28.9%
sqrt-unprod65.8%
sqr-neg65.8%
sqrt-unprod33.9%
add-sqr-sqrt62.4%
Applied egg-rr62.4%
*-commutative62.4%
associate-*l/65.3%
associate-*r/44.7%
associate-/r*44.3%
times-frac57.4%
*-inverses57.4%
Simplified57.4%
Taylor expanded in v around 0 57.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 75.0%
times-frac96.8%
distribute-frac-neg96.8%
distribute-neg-frac296.8%
+-commutative96.8%
distribute-neg-in96.8%
unsub-neg96.8%
Simplified96.8%
Taylor expanded in t1 around inf 53.8%
Taylor expanded in u around inf 12.4%
herbie shell --seed 2024114
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))