
(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 12 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 72.8%
times-frac98.8%
distribute-frac-neg98.8%
distribute-neg-frac298.8%
+-commutative98.8%
distribute-neg-in98.8%
unsub-neg98.8%
Simplified98.8%
Final simplification98.8%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ v (- (- u) t1))) (t_2 (* t1 (/ (- v) (* (+ t1 u) (+ t1 u))))))
(if (<= t1 -6.6e+66)
t_1
(if (<= t1 -1.05e-177)
t_2
(if (<= t1 3.3e-175)
(/ (/ t1 u) (/ (- t1 u) v))
(if (<= t1 2.65e+38) t_2 t_1))))))
double code(double u, double v, double t1) {
double t_1 = v / (-u - t1);
double t_2 = t1 * (-v / ((t1 + u) * (t1 + u)));
double tmp;
if (t1 <= -6.6e+66) {
tmp = t_1;
} else if (t1 <= -1.05e-177) {
tmp = t_2;
} else if (t1 <= 3.3e-175) {
tmp = (t1 / u) / ((t1 - u) / v);
} else if (t1 <= 2.65e+38) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = v / (-u - t1)
t_2 = t1 * (-v / ((t1 + u) * (t1 + u)))
if (t1 <= (-6.6d+66)) then
tmp = t_1
else if (t1 <= (-1.05d-177)) then
tmp = t_2
else if (t1 <= 3.3d-175) then
tmp = (t1 / u) / ((t1 - u) / v)
else if (t1 <= 2.65d+38) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = v / (-u - t1);
double t_2 = t1 * (-v / ((t1 + u) * (t1 + u)));
double tmp;
if (t1 <= -6.6e+66) {
tmp = t_1;
} else if (t1 <= -1.05e-177) {
tmp = t_2;
} else if (t1 <= 3.3e-175) {
tmp = (t1 / u) / ((t1 - u) / v);
} else if (t1 <= 2.65e+38) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(u, v, t1): t_1 = v / (-u - t1) t_2 = t1 * (-v / ((t1 + u) * (t1 + u))) tmp = 0 if t1 <= -6.6e+66: tmp = t_1 elif t1 <= -1.05e-177: tmp = t_2 elif t1 <= 3.3e-175: tmp = (t1 / u) / ((t1 - u) / v) elif t1 <= 2.65e+38: tmp = t_2 else: tmp = t_1 return tmp
function code(u, v, t1) t_1 = Float64(v / Float64(Float64(-u) - t1)) t_2 = Float64(t1 * Float64(Float64(-v) / Float64(Float64(t1 + u) * Float64(t1 + u)))) tmp = 0.0 if (t1 <= -6.6e+66) tmp = t_1; elseif (t1 <= -1.05e-177) tmp = t_2; elseif (t1 <= 3.3e-175) tmp = Float64(Float64(t1 / u) / Float64(Float64(t1 - u) / v)); elseif (t1 <= 2.65e+38) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(u, v, t1) t_1 = v / (-u - t1); t_2 = t1 * (-v / ((t1 + u) * (t1 + u))); tmp = 0.0; if (t1 <= -6.6e+66) tmp = t_1; elseif (t1 <= -1.05e-177) tmp = t_2; elseif (t1 <= 3.3e-175) tmp = (t1 / u) / ((t1 - u) / v); elseif (t1 <= 2.65e+38) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t1 * N[((-v) / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -6.6e+66], t$95$1, If[LessEqual[t1, -1.05e-177], t$95$2, If[LessEqual[t1, 3.3e-175], N[(N[(t1 / u), $MachinePrecision] / N[(N[(t1 - u), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 2.65e+38], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{v}{\left(-u\right) - t1}\\
t_2 := t1 \cdot \frac{-v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\
\mathbf{if}\;t1 \leq -6.6 \cdot 10^{+66}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t1 \leq -1.05 \cdot 10^{-177}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t1 \leq 3.3 \cdot 10^{-175}:\\
\;\;\;\;\frac{\frac{t1}{u}}{\frac{t1 - u}{v}}\\
\mathbf{elif}\;t1 \leq 2.65 \cdot 10^{+38}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t1 < -6.6000000000000003e66 or 2.65000000000000012e38 < t1 Initial program 54.0%
associate-/l*45.8%
Simplified45.8%
associate-*r/54.0%
times-frac100.0%
frac-2neg100.0%
+-commutative100.0%
distribute-neg-in100.0%
sub-neg100.0%
associate-*r/100.0%
add-sqr-sqrt50.7%
sqrt-unprod22.7%
sqr-neg22.7%
sqrt-unprod19.2%
add-sqr-sqrt32.4%
sub-neg32.4%
+-commutative32.4%
add-sqr-sqrt13.2%
sqrt-unprod48.1%
sqr-neg48.1%
sqrt-unprod45.8%
add-sqr-sqrt20.9%
sqrt-unprod43.8%
sqr-neg43.8%
sqrt-unprod24.9%
Applied egg-rr100.0%
Taylor expanded in t1 around inf 92.2%
mul-1-neg92.2%
Simplified92.2%
if -6.6000000000000003e66 < t1 < -1.05e-177 or 3.29999999999999999e-175 < t1 < 2.65000000000000012e38Initial program 91.2%
associate-/l*89.8%
Simplified89.8%
if -1.05e-177 < t1 < 3.29999999999999999e-175Initial program 72.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 0 86.8%
associate-*r/86.8%
mul-1-neg86.8%
Simplified86.8%
clear-num86.8%
un-div-inv86.8%
add-sqr-sqrt35.9%
sqrt-unprod39.9%
sqr-neg39.9%
sqrt-unprod25.5%
add-sqr-sqrt42.7%
frac-2neg42.7%
distribute-neg-in42.7%
add-sqr-sqrt17.2%
sqrt-unprod39.1%
sqr-neg39.1%
sqrt-unprod23.7%
add-sqr-sqrt39.1%
sub-neg39.1%
add-sqr-sqrt27.1%
sqrt-unprod53.5%
sqr-neg53.5%
sqrt-unprod34.5%
add-sqr-sqrt90.4%
Applied egg-rr90.4%
Final simplification90.9%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (* v (/ (/ t1 u) u))))
(if (<= u -7.6e+116)
t_1
(if (<= u -1.2e+71)
(/ v (- (- u) t1))
(if (or (<= u -9.5e-6) (not (<= u 2.36e+42))) t_1 (/ v (- t1)))))))
double code(double u, double v, double t1) {
double t_1 = v * ((t1 / u) / u);
double tmp;
if (u <= -7.6e+116) {
tmp = t_1;
} else if (u <= -1.2e+71) {
tmp = v / (-u - t1);
} else if ((u <= -9.5e-6) || !(u <= 2.36e+42)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = v * ((t1 / u) / u)
if (u <= (-7.6d+116)) then
tmp = t_1
else if (u <= (-1.2d+71)) then
tmp = v / (-u - t1)
else if ((u <= (-9.5d-6)) .or. (.not. (u <= 2.36d+42))) then
tmp = t_1
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = v * ((t1 / u) / u);
double tmp;
if (u <= -7.6e+116) {
tmp = t_1;
} else if (u <= -1.2e+71) {
tmp = v / (-u - t1);
} else if ((u <= -9.5e-6) || !(u <= 2.36e+42)) {
tmp = t_1;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): t_1 = v * ((t1 / u) / u) tmp = 0 if u <= -7.6e+116: tmp = t_1 elif u <= -1.2e+71: tmp = v / (-u - t1) elif (u <= -9.5e-6) or not (u <= 2.36e+42): tmp = t_1 else: tmp = v / -t1 return tmp
function code(u, v, t1) t_1 = Float64(v * Float64(Float64(t1 / u) / u)) tmp = 0.0 if (u <= -7.6e+116) tmp = t_1; elseif (u <= -1.2e+71) tmp = Float64(v / Float64(Float64(-u) - t1)); elseif ((u <= -9.5e-6) || !(u <= 2.36e+42)) tmp = t_1; else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = v * ((t1 / u) / u); tmp = 0.0; if (u <= -7.6e+116) tmp = t_1; elseif (u <= -1.2e+71) tmp = v / (-u - t1); elseif ((u <= -9.5e-6) || ~((u <= 2.36e+42))) tmp = t_1; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(v * N[(N[(t1 / u), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[u, -7.6e+116], t$95$1, If[LessEqual[u, -1.2e+71], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[u, -9.5e-6], N[Not[LessEqual[u, 2.36e+42]], $MachinePrecision]], t$95$1, N[(v / (-t1)), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := v \cdot \frac{\frac{t1}{u}}{u}\\
\mathbf{if}\;u \leq -7.6 \cdot 10^{+116}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;u \leq -1.2 \cdot 10^{+71}:\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{elif}\;u \leq -9.5 \cdot 10^{-6} \lor \neg \left(u \leq 2.36 \cdot 10^{+42}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -7.5999999999999998e116 or -1.1999999999999999e71 < u < -9.5000000000000005e-6 or 2.36e42 < u Initial program 82.0%
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 0 87.2%
associate-*r/87.2%
mul-1-neg87.2%
Simplified87.2%
associate-*l/88.8%
frac-2neg88.8%
associate-*r/84.4%
associate-*l/86.5%
frac-2neg86.5%
Applied egg-rr88.8%
Taylor expanded in t1 around 0 84.4%
mul-1-neg84.4%
*-commutative84.4%
associate-*r/86.4%
distribute-rgt-neg-in86.4%
Simplified86.4%
associate-/l*73.8%
*-commutative73.8%
add-sqr-sqrt48.2%
sqrt-unprod67.8%
sqr-neg67.8%
sqrt-unprod50.2%
add-sqr-sqrt66.0%
Applied egg-rr66.0%
if -7.5999999999999998e116 < u < -1.1999999999999999e71Initial program 54.5%
associate-/l*55.9%
Simplified55.9%
associate-*r/54.5%
times-frac99.7%
frac-2neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
sub-neg99.7%
associate-*r/100.0%
add-sqr-sqrt63.5%
sqrt-unprod29.2%
sqr-neg29.2%
sqrt-unprod9.7%
add-sqr-sqrt19.8%
sub-neg19.8%
+-commutative19.8%
add-sqr-sqrt10.1%
sqrt-unprod20.5%
sqr-neg20.5%
sqrt-unprod18.5%
add-sqr-sqrt18.5%
sqrt-unprod18.5%
sqr-neg18.5%
sqrt-unprod0.0%
Applied egg-rr100.0%
Taylor expanded in t1 around inf 56.6%
mul-1-neg56.6%
Simplified56.6%
if -9.5000000000000005e-6 < u < 2.36e42Initial program 66.6%
associate-/l*59.4%
Simplified59.4%
Taylor expanded in t1 around inf 73.3%
associate-*r/73.3%
neg-mul-173.3%
Simplified73.3%
Final simplification69.4%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (- (- u) t1)))
(if (<= t1 -1.02e+170)
(/ v (- t1))
(if (<= t1 2.65e+38) (* t1 (/ (/ v (+ t1 u)) t_1)) (/ v t_1)))))
double code(double u, double v, double t1) {
double t_1 = -u - t1;
double tmp;
if (t1 <= -1.02e+170) {
tmp = v / -t1;
} else if (t1 <= 2.65e+38) {
tmp = t1 * ((v / (t1 + u)) / t_1);
} else {
tmp = v / t_1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: t_1
real(8) :: tmp
t_1 = -u - t1
if (t1 <= (-1.02d+170)) then
tmp = v / -t1
else if (t1 <= 2.65d+38) then
tmp = t1 * ((v / (t1 + u)) / t_1)
else
tmp = v / t_1
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 <= -1.02e+170) {
tmp = v / -t1;
} else if (t1 <= 2.65e+38) {
tmp = t1 * ((v / (t1 + u)) / t_1);
} else {
tmp = v / t_1;
}
return tmp;
}
def code(u, v, t1): t_1 = -u - t1 tmp = 0 if t1 <= -1.02e+170: tmp = v / -t1 elif t1 <= 2.65e+38: tmp = t1 * ((v / (t1 + u)) / t_1) else: tmp = v / t_1 return tmp
function code(u, v, t1) t_1 = Float64(Float64(-u) - t1) tmp = 0.0 if (t1 <= -1.02e+170) tmp = Float64(v / Float64(-t1)); elseif (t1 <= 2.65e+38) tmp = Float64(t1 * Float64(Float64(v / Float64(t1 + u)) / t_1)); else tmp = Float64(v / t_1); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = -u - t1; tmp = 0.0; if (t1 <= -1.02e+170) tmp = v / -t1; elseif (t1 <= 2.65e+38) tmp = t1 * ((v / (t1 + u)) / t_1); else tmp = v / t_1; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-u) - t1), $MachinePrecision]}, If[LessEqual[t1, -1.02e+170], N[(v / (-t1)), $MachinePrecision], If[LessEqual[t1, 2.65e+38], N[(t1 * N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], N[(v / t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-u\right) - t1\\
\mathbf{if}\;t1 \leq -1.02 \cdot 10^{+170}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{elif}\;t1 \leq 2.65 \cdot 10^{+38}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{t1 + u}}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{t\_1}\\
\end{array}
\end{array}
if t1 < -1.02000000000000002e170Initial program 21.7%
associate-/l*23.1%
Simplified23.1%
Taylor expanded in t1 around inf 100.0%
associate-*r/100.0%
neg-mul-1100.0%
Simplified100.0%
if -1.02000000000000002e170 < t1 < 2.65000000000000012e38Initial program 83.2%
associate-/l*80.4%
Simplified80.4%
associate-/r*91.0%
div-inv90.9%
Applied egg-rr90.9%
associate-*r/91.0%
*-rgt-identity91.0%
Simplified91.0%
if 2.65000000000000012e38 < t1 Initial program 71.2%
associate-/l*56.4%
Simplified56.4%
associate-*r/71.2%
times-frac99.9%
frac-2neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*r/99.9%
add-sqr-sqrt0.0%
sqrt-unprod14.9%
sqr-neg14.9%
sqrt-unprod39.2%
add-sqr-sqrt39.2%
sub-neg39.2%
+-commutative39.2%
add-sqr-sqrt0.0%
sqrt-unprod70.2%
sqr-neg70.2%
sqrt-unprod93.5%
add-sqr-sqrt42.7%
sqrt-unprod89.5%
sqr-neg89.5%
sqrt-unprod50.8%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 90.1%
mul-1-neg90.1%
Simplified90.1%
Final simplification92.0%
(FPCore (u v t1)
:precision binary64
(if (<= t1 -2.5e+40)
(/ v (- (- u) t1))
(if (<= t1 4.6e-57)
(/ (/ (- t1) u) (/ u v))
(* (/ v (+ t1 u)) (+ (/ u t1) -1.0)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -2.5e+40) {
tmp = v / (-u - t1);
} else if (t1 <= 4.6e-57) {
tmp = (-t1 / u) / (u / v);
} else {
tmp = (v / (t1 + u)) * ((u / t1) + -1.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 <= (-2.5d+40)) then
tmp = v / (-u - t1)
else if (t1 <= 4.6d-57) then
tmp = (-t1 / u) / (u / v)
else
tmp = (v / (t1 + u)) * ((u / t1) + (-1.0d0))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -2.5e+40) {
tmp = v / (-u - t1);
} else if (t1 <= 4.6e-57) {
tmp = (-t1 / u) / (u / v);
} else {
tmp = (v / (t1 + u)) * ((u / t1) + -1.0);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -2.5e+40: tmp = v / (-u - t1) elif t1 <= 4.6e-57: tmp = (-t1 / u) / (u / v) else: tmp = (v / (t1 + u)) * ((u / t1) + -1.0) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -2.5e+40) tmp = Float64(v / Float64(Float64(-u) - t1)); elseif (t1 <= 4.6e-57) tmp = Float64(Float64(Float64(-t1) / u) / Float64(u / v)); else tmp = Float64(Float64(v / Float64(t1 + u)) * Float64(Float64(u / t1) + -1.0)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -2.5e+40) tmp = v / (-u - t1); elseif (t1 <= 4.6e-57) tmp = (-t1 / u) / (u / v); else tmp = (v / (t1 + u)) * ((u / t1) + -1.0); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -2.5e+40], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 4.6e-57], N[(N[((-t1) / u), $MachinePrecision] / N[(u / v), $MachinePrecision]), $MachinePrecision], N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(N[(u / t1), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2.5 \cdot 10^{+40}:\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{elif}\;t1 \leq 4.6 \cdot 10^{-57}:\\
\;\;\;\;\frac{\frac{-t1}{u}}{\frac{u}{v}}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{t1 + u} \cdot \left(\frac{u}{t1} + -1\right)\\
\end{array}
\end{array}
if t1 < -2.50000000000000002e40Initial program 42.2%
associate-/l*40.6%
Simplified40.6%
associate-*r/42.2%
times-frac100.0%
frac-2neg100.0%
+-commutative100.0%
distribute-neg-in100.0%
sub-neg100.0%
associate-*r/100.0%
add-sqr-sqrt99.4%
sqrt-unprod35.4%
sqr-neg35.4%
sqrt-unprod0.0%
add-sqr-sqrt27.8%
sub-neg27.8%
+-commutative27.8%
add-sqr-sqrt27.8%
sqrt-unprod28.6%
sqr-neg28.6%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
sqrt-unprod0.0%
Applied egg-rr100.0%
Taylor expanded in t1 around inf 94.7%
mul-1-neg94.7%
Simplified94.7%
if -2.50000000000000002e40 < t1 < 4.6e-57Initial program 82.3%
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 78.8%
associate-*r/78.8%
mul-1-neg78.8%
Simplified78.8%
clear-num78.7%
un-div-inv78.9%
add-sqr-sqrt40.8%
sqrt-unprod50.7%
sqr-neg50.7%
sqrt-unprod22.4%
add-sqr-sqrt43.3%
frac-2neg43.3%
distribute-neg-in43.3%
add-sqr-sqrt20.9%
sqrt-unprod40.4%
sqr-neg40.4%
sqrt-unprod21.7%
add-sqr-sqrt41.7%
sub-neg41.7%
add-sqr-sqrt26.9%
sqrt-unprod53.2%
sqr-neg53.2%
sqrt-unprod35.9%
add-sqr-sqrt80.5%
Applied egg-rr80.5%
Taylor expanded in t1 around 0 82.1%
neg-mul-182.1%
distribute-neg-frac282.1%
Simplified82.1%
if 4.6e-57 < t1 Initial program 77.3%
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 85.0%
Final simplification85.4%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -2.2e+42) (not (<= t1 3.4e-57))) (/ v (- (- u) t1)) (* (/ v u) (/ (- t1) u))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -2.2e+42) || !(t1 <= 3.4e-57)) {
tmp = v / (-u - t1);
} else {
tmp = (v / u) * (-t1 / u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-2.2d+42)) .or. (.not. (t1 <= 3.4d-57))) then
tmp = v / (-u - t1)
else
tmp = (v / u) * (-t1 / u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -2.2e+42) || !(t1 <= 3.4e-57)) {
tmp = v / (-u - t1);
} else {
tmp = (v / u) * (-t1 / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -2.2e+42) or not (t1 <= 3.4e-57): tmp = v / (-u - t1) else: tmp = (v / u) * (-t1 / u) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -2.2e+42) || !(t1 <= 3.4e-57)) tmp = Float64(v / Float64(Float64(-u) - t1)); else tmp = Float64(Float64(v / u) * Float64(Float64(-t1) / u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -2.2e+42) || ~((t1 <= 3.4e-57))) tmp = v / (-u - t1); else tmp = (v / u) * (-t1 / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -2.2e+42], N[Not[LessEqual[t1, 3.4e-57]], $MachinePrecision]], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], N[(N[(v / u), $MachinePrecision] * N[((-t1) / u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2.2 \cdot 10^{+42} \lor \neg \left(t1 \leq 3.4 \cdot 10^{-57}\right):\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u} \cdot \frac{-t1}{u}\\
\end{array}
\end{array}
if t1 < -2.2000000000000001e42 or 3.40000000000000016e-57 < t1 Initial program 60.8%
associate-/l*54.0%
Simplified54.0%
associate-*r/60.8%
times-frac99.9%
frac-2neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*r/100.0%
add-sqr-sqrt46.6%
sqrt-unprod26.5%
sqr-neg26.5%
sqrt-unprod20.0%
add-sqr-sqrt33.0%
sub-neg33.0%
+-commutative33.0%
add-sqr-sqrt13.0%
sqrt-unprod51.9%
sqr-neg51.9%
sqrt-unprod48.1%
add-sqr-sqrt22.2%
sqrt-unprod47.0%
sqr-neg47.0%
sqrt-unprod26.4%
Applied egg-rr100.0%
Taylor expanded in t1 around inf 89.5%
mul-1-neg89.5%
Simplified89.5%
if -2.2000000000000001e42 < t1 < 3.40000000000000016e-57Initial program 82.3%
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 78.8%
associate-*r/78.8%
mul-1-neg78.8%
Simplified78.8%
associate-*l/77.4%
frac-2neg77.4%
associate-*r/71.1%
associate-*l/76.9%
frac-2neg76.9%
Applied egg-rr78.9%
Taylor expanded in t1 around 0 74.3%
mul-1-neg74.3%
*-commutative74.3%
associate-*r/80.1%
distribute-rgt-neg-in80.1%
Simplified80.1%
frac-2neg80.1%
distribute-frac-neg80.1%
add-sqr-sqrt44.8%
sqrt-unprod50.3%
sqr-neg50.3%
sqrt-unprod33.8%
add-sqr-sqrt39.9%
remove-double-neg39.9%
distribute-rgt-neg-out39.9%
frac-2neg39.9%
*-commutative39.9%
associate-/l*39.9%
add-sqr-sqrt30.7%
sqrt-unprod56.1%
sqr-neg56.1%
sqrt-unprod60.4%
add-sqr-sqrt82.0%
Applied egg-rr82.0%
Final simplification85.3%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -2.5e+40) (not (<= t1 4.4e-57))) (/ v (- (- u) t1)) (/ (/ (- t1) u) (/ u v))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -2.5e+40) || !(t1 <= 4.4e-57)) {
tmp = v / (-u - t1);
} else {
tmp = (-t1 / u) / (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 ((t1 <= (-2.5d+40)) .or. (.not. (t1 <= 4.4d-57))) then
tmp = v / (-u - t1)
else
tmp = (-t1 / u) / (u / v)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -2.5e+40) || !(t1 <= 4.4e-57)) {
tmp = v / (-u - t1);
} else {
tmp = (-t1 / u) / (u / v);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -2.5e+40) or not (t1 <= 4.4e-57): tmp = v / (-u - t1) else: tmp = (-t1 / u) / (u / v) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -2.5e+40) || !(t1 <= 4.4e-57)) tmp = Float64(v / Float64(Float64(-u) - t1)); else tmp = Float64(Float64(Float64(-t1) / u) / Float64(u / v)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -2.5e+40) || ~((t1 <= 4.4e-57))) tmp = v / (-u - t1); else tmp = (-t1 / u) / (u / v); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -2.5e+40], N[Not[LessEqual[t1, 4.4e-57]], $MachinePrecision]], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], N[(N[((-t1) / u), $MachinePrecision] / N[(u / v), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2.5 \cdot 10^{+40} \lor \neg \left(t1 \leq 4.4 \cdot 10^{-57}\right):\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{-t1}{u}}{\frac{u}{v}}\\
\end{array}
\end{array}
if t1 < -2.50000000000000002e40 or 4.39999999999999997e-57 < t1 Initial program 60.8%
associate-/l*54.0%
Simplified54.0%
associate-*r/60.8%
times-frac99.9%
frac-2neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*r/100.0%
add-sqr-sqrt46.6%
sqrt-unprod26.5%
sqr-neg26.5%
sqrt-unprod20.0%
add-sqr-sqrt33.0%
sub-neg33.0%
+-commutative33.0%
add-sqr-sqrt13.0%
sqrt-unprod51.9%
sqr-neg51.9%
sqrt-unprod48.1%
add-sqr-sqrt22.2%
sqrt-unprod47.0%
sqr-neg47.0%
sqrt-unprod26.4%
Applied egg-rr100.0%
Taylor expanded in t1 around inf 89.5%
mul-1-neg89.5%
Simplified89.5%
if -2.50000000000000002e40 < t1 < 4.39999999999999997e-57Initial program 82.3%
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 78.8%
associate-*r/78.8%
mul-1-neg78.8%
Simplified78.8%
clear-num78.7%
un-div-inv78.9%
add-sqr-sqrt40.8%
sqrt-unprod50.7%
sqr-neg50.7%
sqrt-unprod22.4%
add-sqr-sqrt43.3%
frac-2neg43.3%
distribute-neg-in43.3%
add-sqr-sqrt20.9%
sqrt-unprod40.4%
sqr-neg40.4%
sqrt-unprod21.7%
add-sqr-sqrt41.7%
sub-neg41.7%
add-sqr-sqrt26.9%
sqrt-unprod53.2%
sqr-neg53.2%
sqrt-unprod35.9%
add-sqr-sqrt80.5%
Applied egg-rr80.5%
Taylor expanded in t1 around 0 82.1%
neg-mul-182.1%
distribute-neg-frac282.1%
Simplified82.1%
Final simplification85.4%
(FPCore (u v t1) :precision binary64 (if (or (<= u -4.9e+117) (not (<= u 4.4e+215))) (/ v u) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -4.9e+117) || !(u <= 4.4e+215)) {
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.9d+117)) .or. (.not. (u <= 4.4d+215))) 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.9e+117) || !(u <= 4.4e+215)) {
tmp = v / u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -4.9e+117) or not (u <= 4.4e+215): tmp = v / u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -4.9e+117) || !(u <= 4.4e+215)) 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.9e+117) || ~((u <= 4.4e+215))) tmp = v / u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -4.9e+117], N[Not[LessEqual[u, 4.4e+215]], $MachinePrecision]], N[(v / u), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -4.9 \cdot 10^{+117} \lor \neg \left(u \leq 4.4 \cdot 10^{+215}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -4.9000000000000001e117 or 4.4000000000000003e215 < u Initial program 84.1%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in t1 around 0 98.2%
associate-*r/98.2%
mul-1-neg98.2%
Simplified98.2%
associate-*l/98.2%
frac-2neg98.2%
associate-*r/91.0%
associate-*l/98.2%
frac-2neg98.2%
Applied egg-rr98.1%
Taylor expanded in t1 around inf 44.8%
if -4.9000000000000001e117 < u < 4.4000000000000003e215Initial program 69.8%
associate-/l*64.5%
Simplified64.5%
Taylor expanded in t1 around inf 60.3%
associate-*r/60.3%
neg-mul-160.3%
Simplified60.3%
Final simplification57.0%
(FPCore (u v t1) :precision binary64 (if (<= u -9.6e+117) (/ v (- u)) (if (<= u 4.1e+215) (/ v (- t1)) (/ v u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -9.6e+117) {
tmp = v / -u;
} else if (u <= 4.1e+215) {
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 <= (-9.6d+117)) then
tmp = v / -u
else if (u <= 4.1d+215) 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 <= -9.6e+117) {
tmp = v / -u;
} else if (u <= 4.1e+215) {
tmp = v / -t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -9.6e+117: tmp = v / -u elif u <= 4.1e+215: tmp = v / -t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -9.6e+117) tmp = Float64(v / Float64(-u)); elseif (u <= 4.1e+215) tmp = Float64(v / Float64(-t1)); else tmp = Float64(v / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -9.6e+117) tmp = v / -u; elseif (u <= 4.1e+215) tmp = v / -t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -9.6e+117], N[(v / (-u)), $MachinePrecision], If[LessEqual[u, 4.1e+215], N[(v / (-t1)), $MachinePrecision], N[(v / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -9.6 \cdot 10^{+117}:\\
\;\;\;\;\frac{v}{-u}\\
\mathbf{elif}\;u \leq 4.1 \cdot 10^{+215}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if u < -9.5999999999999996e117Initial program 82.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 0 97.5%
associate-*r/97.5%
mul-1-neg97.5%
Simplified97.5%
Taylor expanded in t1 around inf 40.7%
associate-*r/40.7%
mul-1-neg40.7%
Simplified40.7%
if -9.5999999999999996e117 < u < 4.1000000000000004e215Initial program 69.8%
associate-/l*64.5%
Simplified64.5%
Taylor expanded in t1 around inf 60.3%
associate-*r/60.3%
neg-mul-160.3%
Simplified60.3%
if 4.1000000000000004e215 < u Initial program 87.6%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in t1 around 0 99.9%
associate-*r/99.9%
mul-1-neg99.9%
Simplified99.9%
associate-*l/100.0%
frac-2neg100.0%
associate-*r/93.5%
associate-*l/99.9%
frac-2neg99.9%
Applied egg-rr100.0%
Taylor expanded in t1 around inf 55.9%
Final simplification57.1%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1.4e+131) (not (<= t1 1.35e+123))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.4e+131) || !(t1 <= 1.35e+123)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-1.4d+131)) .or. (.not. (t1 <= 1.35d+123))) then
tmp = v / t1
else
tmp = v / u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.4e+131) || !(t1 <= 1.35e+123)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.4e+131) or not (t1 <= 1.35e+123): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.4e+131) || !(t1 <= 1.35e+123)) tmp = Float64(v / t1); else tmp = Float64(v / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -1.4e+131) || ~((t1 <= 1.35e+123))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.4e+131], N[Not[LessEqual[t1, 1.35e+123]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.4 \cdot 10^{+131} \lor \neg \left(t1 \leq 1.35 \cdot 10^{+123}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -1.4e131 or 1.35000000000000007e123 < t1 Initial program 41.5%
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 94.6%
Taylor expanded in u around inf 29.4%
if -1.4e131 < t1 < 1.35000000000000007e123Initial program 85.1%
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 0 71.4%
associate-*r/71.4%
mul-1-neg71.4%
Simplified71.4%
associate-*l/70.3%
frac-2neg70.3%
associate-*r/64.4%
associate-*l/69.4%
frac-2neg69.4%
Applied egg-rr71.6%
Taylor expanded in t1 around inf 20.2%
Final simplification22.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 72.8%
associate-/l*68.4%
Simplified68.4%
associate-*r/72.8%
times-frac98.8%
frac-2neg98.8%
+-commutative98.8%
distribute-neg-in98.8%
sub-neg98.8%
associate-*r/97.7%
add-sqr-sqrt50.2%
sqrt-unprod45.2%
sqr-neg45.2%
sqrt-unprod20.9%
add-sqr-sqrt36.9%
sub-neg36.9%
+-commutative36.9%
add-sqr-sqrt16.0%
sqrt-unprod49.0%
sqr-neg49.0%
sqrt-unprod36.4%
add-sqr-sqrt17.3%
sqrt-unprod41.0%
sqr-neg41.0%
sqrt-unprod25.7%
Applied egg-rr97.7%
Taylor expanded in t1 around inf 59.3%
mul-1-neg59.3%
Simplified59.3%
Final simplification59.3%
(FPCore (u v t1) :precision binary64 (/ v t1))
double code(double u, double v, double t1) {
return v / t1;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = v / t1
end function
public static double code(double u, double v, double t1) {
return v / t1;
}
def code(u, v, t1): return v / t1
function code(u, v, t1) return Float64(v / t1) end
function tmp = code(u, v, t1) tmp = v / t1; end
code[u_, v_, t1_] := N[(v / t1), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{t1}
\end{array}
Initial program 72.8%
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 52.0%
Taylor expanded in u around inf 11.0%
Final simplification11.0%
herbie shell --seed 2024095
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))