
(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 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (u v t1) :precision binary64 (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))
double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-t1 * v) / ((t1 + u) * (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
def code(u, v, t1): return (-t1 * v) / ((t1 + u) * (t1 + u))
function code(u, v, t1) return Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (-t1 * v) / ((t1 + u) * (t1 + u)); end
code[u_, v_, t1_] := N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}
\end{array}
(FPCore (u v t1) :precision binary64 (* (/ (- t1) (+ t1 u)) (/ v (+ t1 u))))
double code(double u, double v, double t1) {
return (-t1 / (t1 + u)) * (v / (t1 + u));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-t1 / (t1 + u)) * (v / (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (-t1 / (t1 + u)) * (v / (t1 + u));
}
def code(u, v, t1): return (-t1 / (t1 + u)) * (v / (t1 + u))
function code(u, v, t1) return Float64(Float64(Float64(-t1) / Float64(t1 + u)) * Float64(v / Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (-t1 / (t1 + u)) * (v / (t1 + u)); end
code[u_, v_, t1_] := N[(N[((-t1) / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{-t1}{t1 + u} \cdot \frac{v}{t1 + u}
\end{array}
Initial program 70.5%
times-frac98.3%
distribute-frac-neg98.3%
distribute-neg-frac298.3%
+-commutative98.3%
distribute-neg-in98.3%
unsub-neg98.3%
Simplified98.3%
Final simplification98.3%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (* (- v) (/ t1 (* (+ t1 u) (+ t1 u))))))
(if (<= t1 -1.25e+123)
(/ (- v) (+ t1 u))
(if (<= t1 -4.5e-89)
t_1
(if (<= t1 4.5e-162)
(/ (* t1 (/ (- v) u)) u)
(if (<= t1 3.8e+132) t_1 (/ v (- (- t1) (* u 2.0)))))))))
double code(double u, double v, double t1) {
double t_1 = -v * (t1 / ((t1 + u) * (t1 + u)));
double tmp;
if (t1 <= -1.25e+123) {
tmp = -v / (t1 + u);
} else if (t1 <= -4.5e-89) {
tmp = t_1;
} else if (t1 <= 4.5e-162) {
tmp = (t1 * (-v / u)) / u;
} else if (t1 <= 3.8e+132) {
tmp = t_1;
} else {
tmp = v / (-t1 - (u * 2.0));
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: t_1
real(8) :: tmp
t_1 = -v * (t1 / ((t1 + u) * (t1 + u)))
if (t1 <= (-1.25d+123)) then
tmp = -v / (t1 + u)
else if (t1 <= (-4.5d-89)) then
tmp = t_1
else if (t1 <= 4.5d-162) then
tmp = (t1 * (-v / u)) / u
else if (t1 <= 3.8d+132) then
tmp = t_1
else
tmp = v / (-t1 - (u * 2.0d0))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = -v * (t1 / ((t1 + u) * (t1 + u)));
double tmp;
if (t1 <= -1.25e+123) {
tmp = -v / (t1 + u);
} else if (t1 <= -4.5e-89) {
tmp = t_1;
} else if (t1 <= 4.5e-162) {
tmp = (t1 * (-v / u)) / u;
} else if (t1 <= 3.8e+132) {
tmp = t_1;
} else {
tmp = v / (-t1 - (u * 2.0));
}
return tmp;
}
def code(u, v, t1): t_1 = -v * (t1 / ((t1 + u) * (t1 + u))) tmp = 0 if t1 <= -1.25e+123: tmp = -v / (t1 + u) elif t1 <= -4.5e-89: tmp = t_1 elif t1 <= 4.5e-162: tmp = (t1 * (-v / u)) / u elif t1 <= 3.8e+132: tmp = t_1 else: tmp = v / (-t1 - (u * 2.0)) return tmp
function code(u, v, t1) t_1 = Float64(Float64(-v) * Float64(t1 / Float64(Float64(t1 + u) * Float64(t1 + u)))) tmp = 0.0 if (t1 <= -1.25e+123) tmp = Float64(Float64(-v) / Float64(t1 + u)); elseif (t1 <= -4.5e-89) tmp = t_1; elseif (t1 <= 4.5e-162) tmp = Float64(Float64(t1 * Float64(Float64(-v) / u)) / u); elseif (t1 <= 3.8e+132) tmp = t_1; else tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = -v * (t1 / ((t1 + u) * (t1 + u))); tmp = 0.0; if (t1 <= -1.25e+123) tmp = -v / (t1 + u); elseif (t1 <= -4.5e-89) tmp = t_1; elseif (t1 <= 4.5e-162) tmp = (t1 * (-v / u)) / u; elseif (t1 <= 3.8e+132) tmp = t_1; else tmp = v / (-t1 - (u * 2.0)); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-v) * N[(t1 / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -1.25e+123], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, -4.5e-89], t$95$1, If[LessEqual[t1, 4.5e-162], N[(N[(t1 * N[((-v) / u), $MachinePrecision]), $MachinePrecision] / u), $MachinePrecision], If[LessEqual[t1, 3.8e+132], t$95$1, N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-v\right) \cdot \frac{t1}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\
\mathbf{if}\;t1 \leq -1.25 \cdot 10^{+123}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\mathbf{elif}\;t1 \leq -4.5 \cdot 10^{-89}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t1 \leq 4.5 \cdot 10^{-162}:\\
\;\;\;\;\frac{t1 \cdot \frac{-v}{u}}{u}\\
\mathbf{elif}\;t1 \leq 3.8 \cdot 10^{+132}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\end{array}
\end{array}
if t1 < -1.24999999999999994e123Initial program 55.7%
associate-*l/59.1%
*-commutative59.1%
Simplified59.1%
associate-*r/55.7%
*-commutative55.7%
times-frac100.0%
frac-2neg100.0%
+-commutative100.0%
distribute-neg-in100.0%
sub-neg100.0%
associate-*r/100.0%
add-sqr-sqrt99.7%
sqrt-unprod21.7%
sqr-neg21.7%
sqrt-unprod0.0%
add-sqr-sqrt50.1%
sub-neg50.1%
+-commutative50.1%
add-sqr-sqrt50.1%
sqrt-unprod50.8%
sqr-neg50.8%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
Applied egg-rr100.0%
Taylor expanded in t1 around inf 100.0%
mul-1-neg100.0%
Simplified100.0%
if -1.24999999999999994e123 < t1 < -4.4999999999999999e-89 or 4.50000000000000023e-162 < t1 < 3.80000000000000006e132Initial program 83.9%
associate-*l/92.7%
*-commutative92.7%
Simplified92.7%
if -4.4999999999999999e-89 < t1 < 4.50000000000000023e-162Initial program 74.3%
associate-*l/76.8%
*-commutative76.8%
Simplified76.8%
associate-*r/74.3%
*-commutative74.3%
times-frac94.6%
frac-2neg94.6%
+-commutative94.6%
distribute-neg-in94.6%
sub-neg94.6%
associate-*r/94.4%
add-sqr-sqrt58.6%
sqrt-unprod49.0%
sqr-neg49.0%
sqrt-unprod13.7%
add-sqr-sqrt40.6%
sub-neg40.6%
+-commutative40.6%
add-sqr-sqrt26.9%
sqrt-unprod44.7%
sqr-neg44.7%
sqrt-unprod18.9%
add-sqr-sqrt6.8%
sqrt-unprod21.7%
sqr-neg21.7%
Applied egg-rr94.4%
Taylor expanded in t1 around 0 82.7%
mul-1-neg82.7%
associate-/l*87.0%
distribute-lft-neg-in87.0%
Simplified87.0%
Taylor expanded in t1 around 0 91.1%
if 3.80000000000000006e132 < t1 Initial program 45.6%
associate-*l/47.4%
*-commutative47.4%
Simplified47.4%
associate-*r/45.6%
*-commutative45.6%
associate-/r*58.9%
frac-2neg58.9%
distribute-lft-neg-out58.9%
remove-double-neg58.9%
+-commutative58.9%
distribute-neg-in58.9%
sub-neg58.9%
associate-*l/100.0%
associate-*r/99.9%
clear-num99.9%
frac-2neg99.9%
frac-times95.9%
*-un-lft-identity95.9%
Applied egg-rr95.9%
Taylor expanded in u around 0 92.5%
*-commutative92.5%
Simplified92.5%
Final simplification93.2%
(FPCore (u v t1) :precision binary64 (if (<= t1 -1.32e-48) (/ (* (/ (- t1) (+ t1 u)) v) t1) (if (<= t1 1.3e-129) (* (/ v u) (/ t1 (- u))) (/ v (- (- t1) (* u 2.0))))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1.32e-48) {
tmp = ((-t1 / (t1 + u)) * v) / t1;
} else if (t1 <= 1.3e-129) {
tmp = (v / u) * (t1 / -u);
} else {
tmp = v / (-t1 - (u * 2.0));
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (t1 <= (-1.32d-48)) then
tmp = ((-t1 / (t1 + u)) * v) / t1
else if (t1 <= 1.3d-129) then
tmp = (v / u) * (t1 / -u)
else
tmp = v / (-t1 - (u * 2.0d0))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1.32e-48) {
tmp = ((-t1 / (t1 + u)) * v) / t1;
} else if (t1 <= 1.3e-129) {
tmp = (v / u) * (t1 / -u);
} else {
tmp = v / (-t1 - (u * 2.0));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -1.32e-48: tmp = ((-t1 / (t1 + u)) * v) / t1 elif t1 <= 1.3e-129: tmp = (v / u) * (t1 / -u) else: tmp = v / (-t1 - (u * 2.0)) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -1.32e-48) tmp = Float64(Float64(Float64(Float64(-t1) / Float64(t1 + u)) * v) / t1); elseif (t1 <= 1.3e-129) tmp = Float64(Float64(v / u) * Float64(t1 / Float64(-u))); else tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -1.32e-48) tmp = ((-t1 / (t1 + u)) * v) / t1; elseif (t1 <= 1.3e-129) tmp = (v / u) * (t1 / -u); else tmp = v / (-t1 - (u * 2.0)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -1.32e-48], N[(N[(N[((-t1) / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * v), $MachinePrecision] / t1), $MachinePrecision], If[LessEqual[t1, 1.3e-129], N[(N[(v / u), $MachinePrecision] * N[(t1 / (-u)), $MachinePrecision]), $MachinePrecision], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.32 \cdot 10^{-48}:\\
\;\;\;\;\frac{\frac{-t1}{t1 + u} \cdot v}{t1}\\
\mathbf{elif}\;t1 \leq 1.3 \cdot 10^{-129}:\\
\;\;\;\;\frac{v}{u} \cdot \frac{t1}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\end{array}
\end{array}
if t1 < -1.32e-48Initial program 68.7%
associate-*l/73.4%
*-commutative73.4%
Simplified73.4%
associate-*r/68.7%
*-commutative68.7%
times-frac99.9%
frac-2neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*r/99.9%
add-sqr-sqrt99.6%
sqrt-unprod59.6%
sqr-neg59.6%
sqrt-unprod0.0%
add-sqr-sqrt44.4%
sub-neg44.4%
+-commutative44.4%
add-sqr-sqrt44.4%
sqrt-unprod44.8%
sqr-neg44.8%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 84.4%
if -1.32e-48 < t1 < 1.3e-129Initial program 75.2%
times-frac95.5%
distribute-frac-neg95.5%
distribute-neg-frac295.5%
+-commutative95.5%
distribute-neg-in95.5%
unsub-neg95.5%
Simplified95.5%
Taylor expanded in t1 around 0 84.9%
associate-*r/84.9%
mul-1-neg84.9%
Simplified84.9%
Taylor expanded in t1 around 0 89.4%
if 1.3e-129 < t1 Initial program 67.1%
associate-*l/72.6%
*-commutative72.6%
Simplified72.6%
associate-*r/67.1%
*-commutative67.1%
associate-/r*74.5%
frac-2neg74.5%
distribute-lft-neg-out74.5%
remove-double-neg74.5%
+-commutative74.5%
distribute-neg-in74.5%
sub-neg74.5%
associate-*l/100.0%
associate-*r/99.9%
clear-num99.9%
frac-2neg99.9%
frac-times95.0%
*-un-lft-identity95.0%
Applied egg-rr95.0%
Taylor expanded in u around 0 85.3%
*-commutative85.3%
Simplified85.3%
Final simplification86.5%
(FPCore (u v t1) :precision binary64 (if (<= t1 -5.8e-49) (/ v (- u t1)) (if (<= t1 1.75e-128) (* (/ v u) (/ t1 (- u))) (/ v (- (- t1) (* u 2.0))))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -5.8e-49) {
tmp = v / (u - t1);
} else if (t1 <= 1.75e-128) {
tmp = (v / u) * (t1 / -u);
} else {
tmp = v / (-t1 - (u * 2.0));
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (t1 <= (-5.8d-49)) then
tmp = v / (u - t1)
else if (t1 <= 1.75d-128) then
tmp = (v / u) * (t1 / -u)
else
tmp = v / (-t1 - (u * 2.0d0))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -5.8e-49) {
tmp = v / (u - t1);
} else if (t1 <= 1.75e-128) {
tmp = (v / u) * (t1 / -u);
} else {
tmp = v / (-t1 - (u * 2.0));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -5.8e-49: tmp = v / (u - t1) elif t1 <= 1.75e-128: tmp = (v / u) * (t1 / -u) else: tmp = v / (-t1 - (u * 2.0)) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -5.8e-49) tmp = Float64(v / Float64(u - t1)); elseif (t1 <= 1.75e-128) tmp = Float64(Float64(v / u) * Float64(t1 / Float64(-u))); else tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -5.8e-49) tmp = v / (u - t1); elseif (t1 <= 1.75e-128) tmp = (v / u) * (t1 / -u); else tmp = v / (-t1 - (u * 2.0)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -5.8e-49], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 1.75e-128], N[(N[(v / u), $MachinePrecision] * N[(t1 / (-u)), $MachinePrecision]), $MachinePrecision], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -5.8 \cdot 10^{-49}:\\
\;\;\;\;\frac{v}{u - t1}\\
\mathbf{elif}\;t1 \leq 1.75 \cdot 10^{-128}:\\
\;\;\;\;\frac{v}{u} \cdot \frac{t1}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\end{array}
\end{array}
if t1 < -5.8e-49Initial program 68.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 inf 83.2%
add-sqr-sqrt49.2%
sqrt-unprod86.1%
sqr-neg86.1%
sqrt-unprod34.0%
add-sqr-sqrt83.3%
sub-neg83.3%
Applied egg-rr83.3%
mul-1-neg83.3%
neg-sub083.3%
Applied egg-rr83.3%
neg-sub083.3%
distribute-frac-neg283.3%
sub-neg83.3%
distribute-neg-in83.3%
remove-double-neg83.3%
+-commutative83.3%
sub-neg83.3%
Simplified83.3%
if -5.8e-49 < t1 < 1.75e-128Initial program 75.2%
times-frac95.5%
distribute-frac-neg95.5%
distribute-neg-frac295.5%
+-commutative95.5%
distribute-neg-in95.5%
unsub-neg95.5%
Simplified95.5%
Taylor expanded in t1 around 0 84.9%
associate-*r/84.9%
mul-1-neg84.9%
Simplified84.9%
Taylor expanded in t1 around 0 89.4%
if 1.75e-128 < t1 Initial program 67.1%
associate-*l/72.6%
*-commutative72.6%
Simplified72.6%
associate-*r/67.1%
*-commutative67.1%
associate-/r*74.5%
frac-2neg74.5%
distribute-lft-neg-out74.5%
remove-double-neg74.5%
+-commutative74.5%
distribute-neg-in74.5%
sub-neg74.5%
associate-*l/100.0%
associate-*r/99.9%
clear-num99.9%
frac-2neg99.9%
frac-times95.0%
*-un-lft-identity95.0%
Applied egg-rr95.0%
Taylor expanded in u around 0 85.3%
*-commutative85.3%
Simplified85.3%
Final simplification86.3%
(FPCore (u v t1) :precision binary64 (if (<= t1 -1.3e-48) (/ v (- u t1)) (if (<= t1 2.5e-130) (* (/ v u) (/ t1 (- u))) (/ (- v) (+ t1 u)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1.3e-48) {
tmp = v / (u - t1);
} else if (t1 <= 2.5e-130) {
tmp = (v / u) * (t1 / -u);
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (t1 <= (-1.3d-48)) then
tmp = v / (u - t1)
else if (t1 <= 2.5d-130) then
tmp = (v / u) * (t1 / -u)
else
tmp = -v / (t1 + u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1.3e-48) {
tmp = v / (u - t1);
} else if (t1 <= 2.5e-130) {
tmp = (v / u) * (t1 / -u);
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -1.3e-48: tmp = v / (u - t1) elif t1 <= 2.5e-130: tmp = (v / u) * (t1 / -u) else: tmp = -v / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -1.3e-48) tmp = Float64(v / Float64(u - t1)); elseif (t1 <= 2.5e-130) tmp = Float64(Float64(v / u) * Float64(t1 / Float64(-u))); else tmp = Float64(Float64(-v) / Float64(t1 + u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -1.3e-48) tmp = v / (u - t1); elseif (t1 <= 2.5e-130) tmp = (v / u) * (t1 / -u); else tmp = -v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -1.3e-48], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 2.5e-130], N[(N[(v / u), $MachinePrecision] * N[(t1 / (-u)), $MachinePrecision]), $MachinePrecision], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.3 \cdot 10^{-48}:\\
\;\;\;\;\frac{v}{u - t1}\\
\mathbf{elif}\;t1 \leq 2.5 \cdot 10^{-130}:\\
\;\;\;\;\frac{v}{u} \cdot \frac{t1}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\end{array}
\end{array}
if t1 < -1.29999999999999994e-48Initial program 68.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 inf 83.2%
add-sqr-sqrt49.2%
sqrt-unprod86.1%
sqr-neg86.1%
sqrt-unprod34.0%
add-sqr-sqrt83.3%
sub-neg83.3%
Applied egg-rr83.3%
mul-1-neg83.3%
neg-sub083.3%
Applied egg-rr83.3%
neg-sub083.3%
distribute-frac-neg283.3%
sub-neg83.3%
distribute-neg-in83.3%
remove-double-neg83.3%
+-commutative83.3%
sub-neg83.3%
Simplified83.3%
if -1.29999999999999994e-48 < t1 < 2.4999999999999998e-130Initial program 75.2%
times-frac95.5%
distribute-frac-neg95.5%
distribute-neg-frac295.5%
+-commutative95.5%
distribute-neg-in95.5%
unsub-neg95.5%
Simplified95.5%
Taylor expanded in t1 around 0 84.9%
associate-*r/84.9%
mul-1-neg84.9%
Simplified84.9%
Taylor expanded in t1 around 0 89.4%
if 2.4999999999999998e-130 < t1 Initial program 67.1%
associate-*l/72.6%
*-commutative72.6%
Simplified72.6%
associate-*r/67.1%
*-commutative67.1%
times-frac99.9%
frac-2neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*r/100.0%
add-sqr-sqrt0.0%
sqrt-unprod11.3%
sqr-neg11.3%
sqrt-unprod31.7%
add-sqr-sqrt31.7%
sub-neg31.7%
+-commutative31.7%
add-sqr-sqrt0.0%
sqrt-unprod68.4%
sqr-neg68.4%
sqrt-unprod89.7%
add-sqr-sqrt47.2%
sqrt-unprod90.0%
sqr-neg90.0%
Applied egg-rr100.0%
Taylor expanded in t1 around inf 84.4%
mul-1-neg84.4%
Simplified84.4%
Final simplification85.9%
(FPCore (u v t1) :precision binary64 (if (<= t1 -8.2e-50) (/ v (- u t1)) (if (<= t1 6.2e-129) (* t1 (/ (- v) (* u u))) (/ (- v) (+ t1 u)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -8.2e-50) {
tmp = v / (u - t1);
} else if (t1 <= 6.2e-129) {
tmp = t1 * (-v / (u * u));
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (t1 <= (-8.2d-50)) then
tmp = v / (u - t1)
else if (t1 <= 6.2d-129) then
tmp = t1 * (-v / (u * u))
else
tmp = -v / (t1 + u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -8.2e-50) {
tmp = v / (u - t1);
} else if (t1 <= 6.2e-129) {
tmp = t1 * (-v / (u * u));
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -8.2e-50: tmp = v / (u - t1) elif t1 <= 6.2e-129: tmp = t1 * (-v / (u * u)) else: tmp = -v / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -8.2e-50) tmp = Float64(v / Float64(u - t1)); elseif (t1 <= 6.2e-129) tmp = Float64(t1 * Float64(Float64(-v) / Float64(u * u))); else tmp = Float64(Float64(-v) / Float64(t1 + u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -8.2e-50) tmp = v / (u - t1); elseif (t1 <= 6.2e-129) tmp = t1 * (-v / (u * u)); else tmp = -v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -8.2e-50], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 6.2e-129], N[(t1 * N[((-v) / N[(u * u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -8.2 \cdot 10^{-50}:\\
\;\;\;\;\frac{v}{u - t1}\\
\mathbf{elif}\;t1 \leq 6.2 \cdot 10^{-129}:\\
\;\;\;\;t1 \cdot \frac{-v}{u \cdot u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\end{array}
\end{array}
if t1 < -8.19999999999999971e-50Initial program 68.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 inf 83.2%
add-sqr-sqrt49.2%
sqrt-unprod86.1%
sqr-neg86.1%
sqrt-unprod34.0%
add-sqr-sqrt83.3%
sub-neg83.3%
Applied egg-rr83.3%
mul-1-neg83.3%
neg-sub083.3%
Applied egg-rr83.3%
neg-sub083.3%
distribute-frac-neg283.3%
sub-neg83.3%
distribute-neg-in83.3%
remove-double-neg83.3%
+-commutative83.3%
sub-neg83.3%
Simplified83.3%
if -8.19999999999999971e-50 < t1 < 6.2000000000000001e-129Initial program 75.2%
times-frac95.5%
distribute-frac-neg95.5%
distribute-neg-frac295.5%
+-commutative95.5%
distribute-neg-in95.5%
unsub-neg95.5%
Simplified95.5%
Taylor expanded in t1 around 0 84.9%
associate-*r/84.9%
mul-1-neg84.9%
Simplified84.9%
Taylor expanded in v around 0 69.3%
neg-mul-169.3%
distribute-frac-neg269.3%
associate-/l*69.1%
Simplified69.1%
Taylor expanded in t1 around 0 73.6%
if 6.2000000000000001e-129 < t1 Initial program 67.1%
associate-*l/72.6%
*-commutative72.6%
Simplified72.6%
associate-*r/67.1%
*-commutative67.1%
times-frac99.9%
frac-2neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*r/100.0%
add-sqr-sqrt0.0%
sqrt-unprod11.3%
sqr-neg11.3%
sqrt-unprod31.7%
add-sqr-sqrt31.7%
sub-neg31.7%
+-commutative31.7%
add-sqr-sqrt0.0%
sqrt-unprod68.4%
sqr-neg68.4%
sqrt-unprod89.7%
add-sqr-sqrt47.2%
sqrt-unprod90.0%
sqr-neg90.0%
Applied egg-rr100.0%
Taylor expanded in t1 around inf 84.4%
mul-1-neg84.4%
Simplified84.4%
Final simplification80.2%
(FPCore (u v t1) :precision binary64 (if (or (<= u -5.1e+194) (not (<= u 1e+124))) (* t1 (/ v (* u u))) (/ (- v) (+ t1 u))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -5.1e+194) || !(u <= 1e+124)) {
tmp = t1 * (v / (u * u));
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-5.1d+194)) .or. (.not. (u <= 1d+124))) then
tmp = t1 * (v / (u * u))
else
tmp = -v / (t1 + u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -5.1e+194) || !(u <= 1e+124)) {
tmp = t1 * (v / (u * u));
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -5.1e+194) or not (u <= 1e+124): tmp = t1 * (v / (u * u)) else: tmp = -v / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -5.1e+194) || !(u <= 1e+124)) tmp = Float64(t1 * Float64(v / Float64(u * u))); else tmp = Float64(Float64(-v) / Float64(t1 + u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -5.1e+194) || ~((u <= 1e+124))) tmp = t1 * (v / (u * u)); else tmp = -v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -5.1e+194], N[Not[LessEqual[u, 1e+124]], $MachinePrecision]], N[(t1 * N[(v / N[(u * u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -5.1 \cdot 10^{+194} \lor \neg \left(u \leq 10^{+124}\right):\\
\;\;\;\;t1 \cdot \frac{v}{u \cdot u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\end{array}
\end{array}
if u < -5.1000000000000002e194 or 9.99999999999999948e123 < u Initial program 78.3%
times-frac99.1%
distribute-frac-neg99.1%
distribute-neg-frac299.1%
+-commutative99.1%
distribute-neg-in99.1%
unsub-neg99.1%
Simplified99.1%
Taylor expanded in t1 around 0 93.6%
associate-*r/93.6%
mul-1-neg93.6%
Simplified93.6%
Taylor expanded in v around 0 78.3%
neg-mul-178.3%
distribute-frac-neg278.3%
associate-/l*79.0%
Simplified79.0%
Taylor expanded in t1 around 0 79.0%
add-sqr-sqrt0.0%
sqrt-unprod77.1%
sqr-neg77.1%
sqrt-unprod77.1%
add-sqr-sqrt77.1%
Applied egg-rr77.1%
if -5.1000000000000002e194 < u < 9.99999999999999948e123Initial program 68.5%
associate-*l/74.6%
*-commutative74.6%
Simplified74.6%
associate-*r/68.5%
*-commutative68.5%
times-frac98.1%
frac-2neg98.1%
+-commutative98.1%
distribute-neg-in98.1%
sub-neg98.1%
associate-*r/97.6%
add-sqr-sqrt44.7%
sqrt-unprod31.1%
sqr-neg31.1%
sqrt-unprod13.4%
add-sqr-sqrt26.7%
sub-neg26.7%
+-commutative26.7%
add-sqr-sqrt13.3%
sqrt-unprod46.2%
sqr-neg46.2%
sqrt-unprod43.2%
add-sqr-sqrt21.3%
sqrt-unprod44.8%
sqr-neg44.8%
Applied egg-rr97.6%
Taylor expanded in t1 around inf 67.7%
mul-1-neg67.7%
Simplified67.7%
Final simplification69.6%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.3e+210) (not (<= u 1.9e+127))) (/ v u) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.3e+210) || !(u <= 1.9e+127)) {
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+210)) .or. (.not. (u <= 1.9d+127))) 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+210) || !(u <= 1.9e+127)) {
tmp = v / u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.3e+210) or not (u <= 1.9e+127): tmp = v / u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.3e+210) || !(u <= 1.9e+127)) 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+210) || ~((u <= 1.9e+127))) tmp = v / u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.3e+210], N[Not[LessEqual[u, 1.9e+127]], $MachinePrecision]], N[(v / u), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.3 \cdot 10^{+210} \lor \neg \left(u \leq 1.9 \cdot 10^{+127}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -1.29999999999999995e210 or 1.8999999999999999e127 < u Initial program 79.0%
times-frac99.0%
distribute-frac-neg99.0%
distribute-neg-frac299.0%
+-commutative99.0%
distribute-neg-in99.0%
unsub-neg99.0%
Simplified99.0%
Taylor expanded in t1 around inf 51.4%
add-sqr-sqrt27.7%
sqrt-unprod73.8%
sqr-neg73.8%
sqrt-unprod23.7%
add-sqr-sqrt51.4%
sub-neg51.4%
Applied egg-rr51.4%
Taylor expanded in t1 around 0 48.6%
if -1.29999999999999995e210 < u < 1.8999999999999999e127Initial program 68.5%
associate-*l/74.5%
*-commutative74.5%
Simplified74.5%
Taylor expanded in t1 around inf 66.0%
associate-*r/66.0%
neg-mul-166.0%
Simplified66.0%
Final simplification62.7%
(FPCore (u v t1) :precision binary64 (if (<= u -3.1e+209) (/ v u) (if (<= u 3.7e+127) (/ v (- t1)) (/ (- v) u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -3.1e+209) {
tmp = v / u;
} else if (u <= 3.7e+127) {
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 <= (-3.1d+209)) then
tmp = v / u
else if (u <= 3.7d+127) 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 <= -3.1e+209) {
tmp = v / u;
} else if (u <= 3.7e+127) {
tmp = v / -t1;
} else {
tmp = -v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -3.1e+209: tmp = v / u elif u <= 3.7e+127: tmp = v / -t1 else: tmp = -v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -3.1e+209) tmp = Float64(v / u); elseif (u <= 3.7e+127) tmp = Float64(v / Float64(-t1)); else tmp = Float64(Float64(-v) / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -3.1e+209) tmp = v / u; elseif (u <= 3.7e+127) tmp = v / -t1; else tmp = -v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -3.1e+209], N[(v / u), $MachinePrecision], If[LessEqual[u, 3.7e+127], N[(v / (-t1)), $MachinePrecision], N[((-v) / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.1 \cdot 10^{+209}:\\
\;\;\;\;\frac{v}{u}\\
\mathbf{elif}\;u \leq 3.7 \cdot 10^{+127}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{u}\\
\end{array}
\end{array}
if u < -3.1000000000000001e209Initial program 79.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 inf 59.8%
add-sqr-sqrt0.0%
sqrt-unprod80.4%
sqr-neg80.4%
sqrt-unprod60.0%
add-sqr-sqrt60.0%
sub-neg60.0%
Applied egg-rr60.0%
Taylor expanded in t1 around 0 60.0%
if -3.1000000000000001e209 < u < 3.6999999999999998e127Initial program 68.5%
associate-*l/74.5%
*-commutative74.5%
Simplified74.5%
Taylor expanded in t1 around inf 66.0%
associate-*r/66.0%
neg-mul-166.0%
Simplified66.0%
if 3.6999999999999998e127 < u Initial program 78.6%
times-frac98.5%
distribute-frac-neg98.5%
distribute-neg-frac298.5%
+-commutative98.5%
distribute-neg-in98.5%
unsub-neg98.5%
Simplified98.5%
Taylor expanded in t1 around inf 45.9%
Taylor expanded in t1 around 0 41.5%
associate-*r/41.5%
mul-1-neg41.5%
Simplified41.5%
Final simplification62.8%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -3.1e+54) (not (<= t1 3.2e+79))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -3.1e+54) || !(t1 <= 3.2e+79)) {
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+54)) .or. (.not. (t1 <= 3.2d+79))) 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+54) || !(t1 <= 3.2e+79)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -3.1e+54) or not (t1 <= 3.2e+79): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -3.1e+54) || !(t1 <= 3.2e+79)) 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+54) || ~((t1 <= 3.2e+79))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -3.1e+54], N[Not[LessEqual[t1, 3.2e+79]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -3.1 \cdot 10^{+54} \lor \neg \left(t1 \leq 3.2 \cdot 10^{+79}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -3.0999999999999999e54 or 3.20000000000000003e79 < t1 Initial program 56.0%
associate-*l/60.6%
*-commutative60.6%
Simplified60.6%
Taylor expanded in t1 around inf 89.1%
associate-*r/89.1%
neg-mul-189.1%
Simplified89.1%
neg-sub089.1%
sub-neg89.1%
add-sqr-sqrt46.7%
sqrt-unprod52.9%
sqr-neg52.9%
sqrt-unprod16.5%
add-sqr-sqrt39.2%
Applied egg-rr39.2%
+-lft-identity39.2%
Simplified39.2%
if -3.0999999999999999e54 < t1 < 3.20000000000000003e79Initial program 80.7%
times-frac97.2%
distribute-frac-neg97.2%
distribute-neg-frac297.2%
+-commutative97.2%
distribute-neg-in97.2%
unsub-neg97.2%
Simplified97.2%
Taylor expanded in t1 around inf 46.5%
add-sqr-sqrt20.9%
sqrt-unprod53.4%
sqr-neg53.4%
sqrt-unprod24.2%
add-sqr-sqrt45.2%
sub-neg45.2%
Applied egg-rr45.2%
Taylor expanded in t1 around 0 19.3%
Final simplification27.6%
(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 70.5%
associate-*l/75.4%
*-commutative75.4%
Simplified75.4%
associate-*r/70.5%
*-commutative70.5%
times-frac98.3%
frac-2neg98.3%
+-commutative98.3%
distribute-neg-in98.3%
sub-neg98.3%
associate-*r/97.9%
add-sqr-sqrt46.9%
sqrt-unprod38.5%
sqr-neg38.5%
sqrt-unprod16.7%
add-sqr-sqrt36.7%
sub-neg36.7%
+-commutative36.7%
add-sqr-sqrt20.0%
sqrt-unprod52.3%
sqr-neg52.3%
sqrt-unprod40.9%
add-sqr-sqrt20.4%
sqrt-unprod42.2%
sqr-neg42.2%
Applied egg-rr97.9%
Taylor expanded in t1 around inf 64.5%
mul-1-neg64.5%
Simplified64.5%
(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 70.5%
times-frac98.3%
distribute-frac-neg98.3%
distribute-neg-frac298.3%
+-commutative98.3%
distribute-neg-in98.3%
unsub-neg98.3%
Simplified98.3%
Taylor expanded in t1 around inf 64.5%
add-sqr-sqrt33.1%
sqrt-unprod68.6%
sqr-neg68.6%
sqrt-unprod30.5%
add-sqr-sqrt63.7%
sub-neg63.7%
Applied egg-rr63.7%
mul-1-neg63.7%
neg-sub063.7%
Applied egg-rr63.7%
neg-sub063.7%
distribute-frac-neg263.7%
sub-neg63.7%
distribute-neg-in63.7%
remove-double-neg63.7%
+-commutative63.7%
sub-neg63.7%
Simplified63.7%
(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 70.5%
associate-*l/75.4%
*-commutative75.4%
Simplified75.4%
Taylor expanded in t1 around inf 57.2%
associate-*r/57.2%
neg-mul-157.2%
Simplified57.2%
neg-sub057.2%
sub-neg57.2%
add-sqr-sqrt29.0%
sqrt-unprod40.5%
sqr-neg40.5%
sqrt-unprod7.4%
add-sqr-sqrt17.4%
Applied egg-rr17.4%
+-lft-identity17.4%
Simplified17.4%
herbie shell --seed 2024191
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))