
(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[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * (-v)), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{t1 + u}
\end{array}
Initial program 70.2%
associate-/l*70.0%
distribute-lft-neg-out70.0%
distribute-rgt-neg-in70.0%
associate-/r*80.3%
distribute-neg-frac280.3%
Simplified80.3%
distribute-frac-neg280.3%
associate-/r*70.0%
distribute-rgt-neg-in70.0%
distribute-lft-neg-out70.0%
associate-*r/70.2%
times-frac97.3%
frac-2neg97.3%
associate-*r/98.7%
add-sqr-sqrt43.8%
sqrt-unprod43.9%
sqr-neg43.9%
sqrt-unprod22.8%
add-sqr-sqrt37.2%
add-sqr-sqrt21.0%
sqrt-unprod56.1%
sqr-neg56.1%
sqrt-prod47.6%
add-sqr-sqrt98.7%
Applied egg-rr98.7%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ v (+ t1 u))))
(if (or (<= t1 -1.45e+120) (not (<= t1 1.22e+146)))
(* t_1 (+ (/ u t1) -1.0))
(* t1 (/ t_1 (- (- u) t1))))))
double code(double u, double v, double t1) {
double t_1 = v / (t1 + u);
double tmp;
if ((t1 <= -1.45e+120) || !(t1 <= 1.22e+146)) {
tmp = t_1 * ((u / t1) + -1.0);
} else {
tmp = t1 * (t_1 / (-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 = v / (t1 + u)
if ((t1 <= (-1.45d+120)) .or. (.not. (t1 <= 1.22d+146))) then
tmp = t_1 * ((u / t1) + (-1.0d0))
else
tmp = t1 * (t_1 / (-u - t1))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = v / (t1 + u);
double tmp;
if ((t1 <= -1.45e+120) || !(t1 <= 1.22e+146)) {
tmp = t_1 * ((u / t1) + -1.0);
} else {
tmp = t1 * (t_1 / (-u - t1));
}
return tmp;
}
def code(u, v, t1): t_1 = v / (t1 + u) tmp = 0 if (t1 <= -1.45e+120) or not (t1 <= 1.22e+146): tmp = t_1 * ((u / t1) + -1.0) else: tmp = t1 * (t_1 / (-u - t1)) return tmp
function code(u, v, t1) t_1 = Float64(v / Float64(t1 + u)) tmp = 0.0 if ((t1 <= -1.45e+120) || !(t1 <= 1.22e+146)) tmp = Float64(t_1 * Float64(Float64(u / t1) + -1.0)); else tmp = Float64(t1 * Float64(t_1 / Float64(Float64(-u) - t1))); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = v / (t1 + u); tmp = 0.0; if ((t1 <= -1.45e+120) || ~((t1 <= 1.22e+146))) tmp = t_1 * ((u / t1) + -1.0); else tmp = t1 * (t_1 / (-u - t1)); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t1, -1.45e+120], N[Not[LessEqual[t1, 1.22e+146]], $MachinePrecision]], N[(t$95$1 * N[(N[(u / t1), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], N[(t1 * N[(t$95$1 / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{v}{t1 + u}\\
\mathbf{if}\;t1 \leq -1.45 \cdot 10^{+120} \lor \neg \left(t1 \leq 1.22 \cdot 10^{+146}\right):\\
\;\;\;\;t\_1 \cdot \left(\frac{u}{t1} + -1\right)\\
\mathbf{else}:\\
\;\;\;\;t1 \cdot \frac{t\_1}{\left(-u\right) - t1}\\
\end{array}
\end{array}
if t1 < -1.4500000000000001e120 or 1.21999999999999991e146 < t1 Initial program 46.8%
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 91.5%
if -1.4500000000000001e120 < t1 < 1.21999999999999991e146Initial program 80.1%
associate-/l*78.8%
distribute-lft-neg-out78.8%
distribute-rgt-neg-in78.8%
associate-/r*88.7%
distribute-neg-frac288.7%
Simplified88.7%
Final simplification89.5%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (+ (/ u t1) -1.0)))
(if (<= t1 -1.75e+18)
(* (/ v (+ t1 u)) t_1)
(if (<= t1 7.8e-7)
(/ (/ v (/ (+ t1 u) t1)) (- u))
(/ t_1 (/ (+ t1 u) v))))))
double code(double u, double v, double t1) {
double t_1 = (u / t1) + -1.0;
double tmp;
if (t1 <= -1.75e+18) {
tmp = (v / (t1 + u)) * t_1;
} else if (t1 <= 7.8e-7) {
tmp = (v / ((t1 + u) / t1)) / -u;
} else {
tmp = t_1 / ((t1 + 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) :: t_1
real(8) :: tmp
t_1 = (u / t1) + (-1.0d0)
if (t1 <= (-1.75d+18)) then
tmp = (v / (t1 + u)) * t_1
else if (t1 <= 7.8d-7) then
tmp = (v / ((t1 + u) / t1)) / -u
else
tmp = t_1 / ((t1 + u) / v)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = (u / t1) + -1.0;
double tmp;
if (t1 <= -1.75e+18) {
tmp = (v / (t1 + u)) * t_1;
} else if (t1 <= 7.8e-7) {
tmp = (v / ((t1 + u) / t1)) / -u;
} else {
tmp = t_1 / ((t1 + u) / v);
}
return tmp;
}
def code(u, v, t1): t_1 = (u / t1) + -1.0 tmp = 0 if t1 <= -1.75e+18: tmp = (v / (t1 + u)) * t_1 elif t1 <= 7.8e-7: tmp = (v / ((t1 + u) / t1)) / -u else: tmp = t_1 / ((t1 + u) / v) return tmp
function code(u, v, t1) t_1 = Float64(Float64(u / t1) + -1.0) tmp = 0.0 if (t1 <= -1.75e+18) tmp = Float64(Float64(v / Float64(t1 + u)) * t_1); elseif (t1 <= 7.8e-7) tmp = Float64(Float64(v / Float64(Float64(t1 + u) / t1)) / Float64(-u)); else tmp = Float64(t_1 / Float64(Float64(t1 + u) / v)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = (u / t1) + -1.0; tmp = 0.0; if (t1 <= -1.75e+18) tmp = (v / (t1 + u)) * t_1; elseif (t1 <= 7.8e-7) tmp = (v / ((t1 + u) / t1)) / -u; else tmp = t_1 / ((t1 + u) / v); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(N[(u / t1), $MachinePrecision] + -1.0), $MachinePrecision]}, If[LessEqual[t1, -1.75e+18], N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[t1, 7.8e-7], N[(N[(v / N[(N[(t1 + u), $MachinePrecision] / t1), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision], N[(t$95$1 / N[(N[(t1 + u), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{u}{t1} + -1\\
\mathbf{if}\;t1 \leq -1.75 \cdot 10^{+18}:\\
\;\;\;\;\frac{v}{t1 + u} \cdot t\_1\\
\mathbf{elif}\;t1 \leq 7.8 \cdot 10^{-7}:\\
\;\;\;\;\frac{\frac{v}{\frac{t1 + u}{t1}}}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{\frac{t1 + u}{v}}\\
\end{array}
\end{array}
if t1 < -1.75e18Initial program 56.6%
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.1%
if -1.75e18 < t1 < 7.80000000000000049e-7Initial program 79.8%
associate-/l*77.7%
distribute-lft-neg-out77.7%
distribute-rgt-neg-in77.7%
associate-/r*86.6%
distribute-neg-frac286.6%
Simplified86.6%
distribute-frac-neg286.6%
associate-/r*77.7%
distribute-rgt-neg-in77.7%
distribute-lft-neg-out77.7%
associate-*r/79.8%
times-frac94.9%
frac-2neg94.9%
associate-*r/97.6%
add-sqr-sqrt45.5%
sqrt-unprod57.1%
sqr-neg57.1%
sqrt-unprod21.0%
add-sqr-sqrt36.2%
add-sqr-sqrt24.5%
sqrt-unprod59.5%
sqr-neg59.5%
sqrt-prod40.9%
add-sqr-sqrt97.6%
Applied egg-rr97.6%
Taylor expanded in t1 around 0 75.9%
associate-*r/75.9%
associate-*r*75.9%
mul-1-neg75.9%
Simplified75.9%
Taylor expanded in v around 0 67.5%
mul-1-neg67.5%
*-commutative67.5%
times-frac77.6%
distribute-lft-neg-in77.6%
distribute-neg-frac277.6%
Simplified77.6%
associate-*l/80.3%
frac-2neg80.3%
clear-num80.3%
un-div-inv80.4%
remove-double-neg80.4%
Applied egg-rr80.4%
if 7.80000000000000049e-7 < t1 Initial program 61.5%
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 84.5%
clear-num85.9%
un-div-inv85.9%
sub-neg85.9%
metadata-eval85.9%
Applied egg-rr85.9%
Final simplification83.5%
(FPCore (u v t1)
:precision binary64
(if (<= t1 -1.7e+17)
(* (/ v (+ t1 u)) (+ (/ u t1) -1.0))
(if (<= t1 2.2e-7)
(/ (/ v (/ (+ t1 u) t1)) (- u))
(/ -1.0 (/ (+ t1 u) v)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1.7e+17) {
tmp = (v / (t1 + u)) * ((u / t1) + -1.0);
} else if (t1 <= 2.2e-7) {
tmp = (v / ((t1 + u) / t1)) / -u;
} else {
tmp = -1.0 / ((t1 + 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 <= (-1.7d+17)) then
tmp = (v / (t1 + u)) * ((u / t1) + (-1.0d0))
else if (t1 <= 2.2d-7) then
tmp = (v / ((t1 + u) / t1)) / -u
else
tmp = (-1.0d0) / ((t1 + u) / v)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1.7e+17) {
tmp = (v / (t1 + u)) * ((u / t1) + -1.0);
} else if (t1 <= 2.2e-7) {
tmp = (v / ((t1 + u) / t1)) / -u;
} else {
tmp = -1.0 / ((t1 + u) / v);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -1.7e+17: tmp = (v / (t1 + u)) * ((u / t1) + -1.0) elif t1 <= 2.2e-7: tmp = (v / ((t1 + u) / t1)) / -u else: tmp = -1.0 / ((t1 + u) / v) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -1.7e+17) tmp = Float64(Float64(v / Float64(t1 + u)) * Float64(Float64(u / t1) + -1.0)); elseif (t1 <= 2.2e-7) tmp = Float64(Float64(v / Float64(Float64(t1 + u) / t1)) / Float64(-u)); else tmp = Float64(-1.0 / Float64(Float64(t1 + u) / v)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -1.7e+17) tmp = (v / (t1 + u)) * ((u / t1) + -1.0); elseif (t1 <= 2.2e-7) tmp = (v / ((t1 + u) / t1)) / -u; else tmp = -1.0 / ((t1 + u) / v); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -1.7e+17], N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(N[(u / t1), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 2.2e-7], N[(N[(v / N[(N[(t1 + u), $MachinePrecision] / t1), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision], N[(-1.0 / N[(N[(t1 + u), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.7 \cdot 10^{+17}:\\
\;\;\;\;\frac{v}{t1 + u} \cdot \left(\frac{u}{t1} + -1\right)\\
\mathbf{elif}\;t1 \leq 2.2 \cdot 10^{-7}:\\
\;\;\;\;\frac{\frac{v}{\frac{t1 + u}{t1}}}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\frac{t1 + u}{v}}\\
\end{array}
\end{array}
if t1 < -1.7e17Initial program 56.6%
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.1%
if -1.7e17 < t1 < 2.2000000000000001e-7Initial program 79.8%
associate-/l*77.7%
distribute-lft-neg-out77.7%
distribute-rgt-neg-in77.7%
associate-/r*86.6%
distribute-neg-frac286.6%
Simplified86.6%
distribute-frac-neg286.6%
associate-/r*77.7%
distribute-rgt-neg-in77.7%
distribute-lft-neg-out77.7%
associate-*r/79.8%
times-frac94.9%
frac-2neg94.9%
associate-*r/97.6%
add-sqr-sqrt45.5%
sqrt-unprod57.1%
sqr-neg57.1%
sqrt-unprod21.0%
add-sqr-sqrt36.2%
add-sqr-sqrt24.5%
sqrt-unprod59.5%
sqr-neg59.5%
sqrt-prod40.9%
add-sqr-sqrt97.6%
Applied egg-rr97.6%
Taylor expanded in t1 around 0 75.9%
associate-*r/75.9%
associate-*r*75.9%
mul-1-neg75.9%
Simplified75.9%
Taylor expanded in v around 0 67.5%
mul-1-neg67.5%
*-commutative67.5%
times-frac77.6%
distribute-lft-neg-in77.6%
distribute-neg-frac277.6%
Simplified77.6%
associate-*l/80.3%
frac-2neg80.3%
clear-num80.3%
un-div-inv80.4%
remove-double-neg80.4%
Applied egg-rr80.4%
if 2.2000000000000001e-7 < t1 Initial program 61.5%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
clear-num99.0%
inv-pow99.0%
Applied egg-rr99.0%
unpow-199.0%
Simplified99.0%
frac-2neg99.0%
metadata-eval99.0%
associate-*r/99.0%
sub-neg99.0%
add-sqr-sqrt52.7%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
sqrt-unprod43.2%
sqr-neg43.2%
sqrt-unprod42.8%
add-sqr-sqrt42.8%
+-commutative42.8%
distribute-frac-neg242.8%
add-sqr-sqrt21.9%
sqrt-unprod56.5%
Applied egg-rr99.0%
Taylor expanded in t1 around inf 85.7%
Final simplification83.4%
(FPCore (u v t1)
:precision binary64
(if (<= t1 -8.5e+18)
(/ v (- t1))
(if (<= t1 2.7e-5)
(/ (/ v (/ (+ t1 u) t1)) (- u))
(/ -1.0 (/ (+ t1 u) v)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -8.5e+18) {
tmp = v / -t1;
} else if (t1 <= 2.7e-5) {
tmp = (v / ((t1 + u) / t1)) / -u;
} else {
tmp = -1.0 / ((t1 + 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 <= (-8.5d+18)) then
tmp = v / -t1
else if (t1 <= 2.7d-5) then
tmp = (v / ((t1 + u) / t1)) / -u
else
tmp = (-1.0d0) / ((t1 + u) / v)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -8.5e+18) {
tmp = v / -t1;
} else if (t1 <= 2.7e-5) {
tmp = (v / ((t1 + u) / t1)) / -u;
} else {
tmp = -1.0 / ((t1 + u) / v);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -8.5e+18: tmp = v / -t1 elif t1 <= 2.7e-5: tmp = (v / ((t1 + u) / t1)) / -u else: tmp = -1.0 / ((t1 + u) / v) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -8.5e+18) tmp = Float64(v / Float64(-t1)); elseif (t1 <= 2.7e-5) tmp = Float64(Float64(v / Float64(Float64(t1 + u) / t1)) / Float64(-u)); else tmp = Float64(-1.0 / Float64(Float64(t1 + u) / v)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -8.5e+18) tmp = v / -t1; elseif (t1 <= 2.7e-5) tmp = (v / ((t1 + u) / t1)) / -u; else tmp = -1.0 / ((t1 + u) / v); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -8.5e+18], N[(v / (-t1)), $MachinePrecision], If[LessEqual[t1, 2.7e-5], N[(N[(v / N[(N[(t1 + u), $MachinePrecision] / t1), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision], N[(-1.0 / N[(N[(t1 + u), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -8.5 \cdot 10^{+18}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{elif}\;t1 \leq 2.7 \cdot 10^{-5}:\\
\;\;\;\;\frac{\frac{v}{\frac{t1 + u}{t1}}}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\frac{t1 + u}{v}}\\
\end{array}
\end{array}
if t1 < -8.5e18Initial program 56.6%
associate-/l*59.6%
distribute-lft-neg-out59.6%
distribute-rgt-neg-in59.6%
associate-/r*69.2%
distribute-neg-frac269.2%
Simplified69.2%
Taylor expanded in t1 around inf 88.0%
associate-*r/88.0%
neg-mul-188.0%
Simplified88.0%
if -8.5e18 < t1 < 2.6999999999999999e-5Initial program 79.8%
associate-/l*77.7%
distribute-lft-neg-out77.7%
distribute-rgt-neg-in77.7%
associate-/r*86.6%
distribute-neg-frac286.6%
Simplified86.6%
distribute-frac-neg286.6%
associate-/r*77.7%
distribute-rgt-neg-in77.7%
distribute-lft-neg-out77.7%
associate-*r/79.8%
times-frac94.9%
frac-2neg94.9%
associate-*r/97.6%
add-sqr-sqrt45.5%
sqrt-unprod57.1%
sqr-neg57.1%
sqrt-unprod21.0%
add-sqr-sqrt36.2%
add-sqr-sqrt24.5%
sqrt-unprod59.5%
sqr-neg59.5%
sqrt-prod40.9%
add-sqr-sqrt97.6%
Applied egg-rr97.6%
Taylor expanded in t1 around 0 75.9%
associate-*r/75.9%
associate-*r*75.9%
mul-1-neg75.9%
Simplified75.9%
Taylor expanded in v around 0 67.5%
mul-1-neg67.5%
*-commutative67.5%
times-frac77.6%
distribute-lft-neg-in77.6%
distribute-neg-frac277.6%
Simplified77.6%
associate-*l/80.3%
frac-2neg80.3%
clear-num80.3%
un-div-inv80.4%
remove-double-neg80.4%
Applied egg-rr80.4%
if 2.6999999999999999e-5 < t1 Initial program 61.5%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
clear-num99.0%
inv-pow99.0%
Applied egg-rr99.0%
unpow-199.0%
Simplified99.0%
frac-2neg99.0%
metadata-eval99.0%
associate-*r/99.0%
sub-neg99.0%
add-sqr-sqrt52.7%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
sqrt-unprod43.2%
sqr-neg43.2%
sqrt-unprod42.8%
add-sqr-sqrt42.8%
+-commutative42.8%
distribute-frac-neg242.8%
add-sqr-sqrt21.9%
sqrt-unprod56.5%
Applied egg-rr99.0%
Taylor expanded in t1 around inf 85.7%
Final simplification83.4%
(FPCore (u v t1) :precision binary64 (if (<= t1 -7.4e+19) (/ v (- t1)) (if (<= t1 0.000106) (* (/ v (- u)) (/ t1 u)) (/ -1.0 (/ (+ t1 u) v)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -7.4e+19) {
tmp = v / -t1;
} else if (t1 <= 0.000106) {
tmp = (v / -u) * (t1 / u);
} else {
tmp = -1.0 / ((t1 + 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 <= (-7.4d+19)) then
tmp = v / -t1
else if (t1 <= 0.000106d0) then
tmp = (v / -u) * (t1 / u)
else
tmp = (-1.0d0) / ((t1 + u) / v)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -7.4e+19) {
tmp = v / -t1;
} else if (t1 <= 0.000106) {
tmp = (v / -u) * (t1 / u);
} else {
tmp = -1.0 / ((t1 + u) / v);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -7.4e+19: tmp = v / -t1 elif t1 <= 0.000106: tmp = (v / -u) * (t1 / u) else: tmp = -1.0 / ((t1 + u) / v) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -7.4e+19) tmp = Float64(v / Float64(-t1)); elseif (t1 <= 0.000106) tmp = Float64(Float64(v / Float64(-u)) * Float64(t1 / u)); else tmp = Float64(-1.0 / Float64(Float64(t1 + u) / v)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -7.4e+19) tmp = v / -t1; elseif (t1 <= 0.000106) tmp = (v / -u) * (t1 / u); else tmp = -1.0 / ((t1 + u) / v); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -7.4e+19], N[(v / (-t1)), $MachinePrecision], If[LessEqual[t1, 0.000106], N[(N[(v / (-u)), $MachinePrecision] * N[(t1 / u), $MachinePrecision]), $MachinePrecision], N[(-1.0 / N[(N[(t1 + u), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -7.4 \cdot 10^{+19}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{elif}\;t1 \leq 0.000106:\\
\;\;\;\;\frac{v}{-u} \cdot \frac{t1}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\frac{t1 + u}{v}}\\
\end{array}
\end{array}
if t1 < -7.4e19Initial program 56.6%
associate-/l*59.6%
distribute-lft-neg-out59.6%
distribute-rgt-neg-in59.6%
associate-/r*69.2%
distribute-neg-frac269.2%
Simplified69.2%
Taylor expanded in t1 around inf 88.0%
associate-*r/88.0%
neg-mul-188.0%
Simplified88.0%
if -7.4e19 < t1 < 1.06e-4Initial program 79.8%
associate-/l*77.7%
distribute-lft-neg-out77.7%
distribute-rgt-neg-in77.7%
associate-/r*86.6%
distribute-neg-frac286.6%
Simplified86.6%
distribute-frac-neg286.6%
associate-/r*77.7%
distribute-rgt-neg-in77.7%
distribute-lft-neg-out77.7%
associate-*r/79.8%
times-frac94.9%
frac-2neg94.9%
associate-*r/97.6%
add-sqr-sqrt45.5%
sqrt-unprod57.1%
sqr-neg57.1%
sqrt-unprod21.0%
add-sqr-sqrt36.2%
add-sqr-sqrt24.5%
sqrt-unprod59.5%
sqr-neg59.5%
sqrt-prod40.9%
add-sqr-sqrt97.6%
Applied egg-rr97.6%
Taylor expanded in t1 around 0 75.9%
associate-*r/75.9%
associate-*r*75.9%
mul-1-neg75.9%
Simplified75.9%
Taylor expanded in v around 0 67.5%
mul-1-neg67.5%
*-commutative67.5%
times-frac77.6%
distribute-lft-neg-in77.6%
distribute-neg-frac277.6%
Simplified77.6%
Taylor expanded in t1 around 0 79.2%
if 1.06e-4 < t1 Initial program 61.5%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
clear-num99.0%
inv-pow99.0%
Applied egg-rr99.0%
unpow-199.0%
Simplified99.0%
frac-2neg99.0%
metadata-eval99.0%
associate-*r/99.0%
sub-neg99.0%
add-sqr-sqrt52.7%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
sqrt-unprod43.2%
sqr-neg43.2%
sqrt-unprod42.8%
add-sqr-sqrt42.8%
+-commutative42.8%
distribute-frac-neg242.8%
add-sqr-sqrt21.9%
sqrt-unprod56.5%
Applied egg-rr99.0%
Taylor expanded in t1 around inf 85.7%
Final simplification82.8%
(FPCore (u v t1) :precision binary64 (if (<= t1 -2.2e+17) (/ v (- t1)) (if (<= t1 4.4e-7) (* t1 (/ (/ v u) (- u))) (/ -1.0 (/ (+ t1 u) v)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -2.2e+17) {
tmp = v / -t1;
} else if (t1 <= 4.4e-7) {
tmp = t1 * ((v / u) / -u);
} else {
tmp = -1.0 / ((t1 + 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.2d+17)) then
tmp = v / -t1
else if (t1 <= 4.4d-7) then
tmp = t1 * ((v / u) / -u)
else
tmp = (-1.0d0) / ((t1 + u) / v)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -2.2e+17) {
tmp = v / -t1;
} else if (t1 <= 4.4e-7) {
tmp = t1 * ((v / u) / -u);
} else {
tmp = -1.0 / ((t1 + u) / v);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -2.2e+17: tmp = v / -t1 elif t1 <= 4.4e-7: tmp = t1 * ((v / u) / -u) else: tmp = -1.0 / ((t1 + u) / v) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -2.2e+17) tmp = Float64(v / Float64(-t1)); elseif (t1 <= 4.4e-7) tmp = Float64(t1 * Float64(Float64(v / u) / Float64(-u))); else tmp = Float64(-1.0 / Float64(Float64(t1 + u) / v)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -2.2e+17) tmp = v / -t1; elseif (t1 <= 4.4e-7) tmp = t1 * ((v / u) / -u); else tmp = -1.0 / ((t1 + u) / v); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -2.2e+17], N[(v / (-t1)), $MachinePrecision], If[LessEqual[t1, 4.4e-7], N[(t1 * N[(N[(v / u), $MachinePrecision] / (-u)), $MachinePrecision]), $MachinePrecision], N[(-1.0 / N[(N[(t1 + u), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2.2 \cdot 10^{+17}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{elif}\;t1 \leq 4.4 \cdot 10^{-7}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\frac{t1 + u}{v}}\\
\end{array}
\end{array}
if t1 < -2.2e17Initial program 56.6%
associate-/l*59.6%
distribute-lft-neg-out59.6%
distribute-rgt-neg-in59.6%
associate-/r*69.2%
distribute-neg-frac269.2%
Simplified69.2%
Taylor expanded in t1 around inf 88.0%
associate-*r/88.0%
neg-mul-188.0%
Simplified88.0%
if -2.2e17 < t1 < 4.4000000000000002e-7Initial program 79.8%
associate-/l*77.7%
distribute-lft-neg-out77.7%
distribute-rgt-neg-in77.7%
associate-/r*86.6%
distribute-neg-frac286.6%
Simplified86.6%
Taylor expanded in t1 around 0 73.3%
mul-1-neg73.3%
Simplified73.3%
Taylor expanded in t1 around 0 75.0%
if 4.4000000000000002e-7 < t1 Initial program 61.5%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
clear-num99.0%
inv-pow99.0%
Applied egg-rr99.0%
unpow-199.0%
Simplified99.0%
frac-2neg99.0%
metadata-eval99.0%
associate-*r/99.0%
sub-neg99.0%
add-sqr-sqrt52.7%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
sqrt-unprod43.2%
sqr-neg43.2%
sqrt-unprod42.8%
add-sqr-sqrt42.8%
+-commutative42.8%
distribute-frac-neg242.8%
add-sqr-sqrt21.9%
sqrt-unprod56.5%
Applied egg-rr99.0%
Taylor expanded in t1 around inf 85.7%
Final simplification80.5%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1.5e+165) (not (<= t1 3.55e+109))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.5e+165) || !(t1 <= 3.55e+109)) {
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.5d+165)) .or. (.not. (t1 <= 3.55d+109))) 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.5e+165) || !(t1 <= 3.55e+109)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.5e+165) or not (t1 <= 3.55e+109): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.5e+165) || !(t1 <= 3.55e+109)) 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.5e+165) || ~((t1 <= 3.55e+109))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.5e+165], N[Not[LessEqual[t1, 3.55e+109]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.5 \cdot 10^{+165} \lor \neg \left(t1 \leq 3.55 \cdot 10^{+109}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -1.49999999999999995e165 or 3.5500000000000001e109 < t1 Initial program 45.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 90.2%
Taylor expanded in u around inf 41.8%
if -1.49999999999999995e165 < t1 < 3.5500000000000001e109Initial program 80.5%
associate-/l*79.3%
distribute-lft-neg-out79.3%
distribute-rgt-neg-in79.3%
associate-/r*88.1%
distribute-neg-frac288.1%
Simplified88.1%
Taylor expanded in t1 around 0 64.9%
mul-1-neg64.9%
Simplified64.9%
Taylor expanded in t1 around inf 20.4%
associate-*r/20.4%
mul-1-neg20.4%
Simplified20.4%
distribute-frac-neg20.4%
distribute-frac-neg220.4%
*-un-lft-identity20.4%
*-commutative20.4%
add-sqr-sqrt13.6%
sqrt-unprod32.2%
sqr-neg32.2%
sqrt-unprod6.8%
add-sqr-sqrt21.3%
Applied egg-rr21.3%
*-rgt-identity21.3%
Simplified21.3%
Final simplification27.4%
(FPCore (u v t1) :precision binary64 (* (/ t1 (+ t1 u)) (/ v (- (- u) t1))))
double code(double u, double v, double t1) {
return (t1 / (t1 + u)) * (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 = (t1 / (t1 + u)) * (v / (-u - t1))
end function
public static double code(double u, double v, double t1) {
return (t1 / (t1 + u)) * (v / (-u - t1));
}
def code(u, v, t1): return (t1 / (t1 + u)) * (v / (-u - t1))
function code(u, v, t1) return Float64(Float64(t1 / Float64(t1 + u)) * Float64(v / Float64(Float64(-u) - t1))) end
function tmp = code(u, v, t1) tmp = (t1 / (t1 + u)) * (v / (-u - t1)); end
code[u_, v_, t1_] := N[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{t1}{t1 + u} \cdot \frac{v}{\left(-u\right) - t1}
\end{array}
Initial program 70.2%
times-frac97.3%
distribute-frac-neg97.3%
distribute-neg-frac297.3%
+-commutative97.3%
distribute-neg-in97.3%
unsub-neg97.3%
Simplified97.3%
Final simplification97.3%
(FPCore (u v t1) :precision binary64 (if (<= v 1.6e+153) (/ v (- (- u) t1)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if (v <= 1.6e+153) {
tmp = v / (-u - t1);
} else {
tmp = v / -t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (v <= 1.6d+153) then
tmp = v / (-u - t1)
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (v <= 1.6e+153) {
tmp = v / (-u - t1);
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if v <= 1.6e+153: tmp = v / (-u - t1) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if (v <= 1.6e+153) tmp = Float64(v / Float64(Float64(-u) - t1)); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (v <= 1.6e+153) tmp = v / (-u - t1); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[v, 1.6e+153], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;v \leq 1.6 \cdot 10^{+153}:\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if v < 1.6000000000000001e153Initial program 72.3%
associate-/l*72.5%
distribute-lft-neg-out72.5%
distribute-rgt-neg-in72.5%
associate-/r*80.8%
distribute-neg-frac280.8%
Simplified80.8%
distribute-frac-neg280.8%
associate-/r*72.5%
distribute-rgt-neg-in72.5%
distribute-lft-neg-out72.5%
associate-*r/72.3%
times-frac98.2%
frac-2neg98.2%
associate-*r/99.0%
add-sqr-sqrt44.4%
sqrt-unprod45.6%
sqr-neg45.6%
sqrt-unprod24.8%
add-sqr-sqrt40.7%
add-sqr-sqrt23.2%
sqrt-unprod58.3%
sqr-neg58.3%
sqrt-prod47.0%
add-sqr-sqrt99.0%
Applied egg-rr99.0%
Taylor expanded in t1 around inf 62.0%
mul-1-neg62.0%
Simplified62.0%
if 1.6000000000000001e153 < v Initial program 51.3%
associate-/l*48.7%
distribute-lft-neg-out48.7%
distribute-rgt-neg-in48.7%
associate-/r*75.7%
distribute-neg-frac275.7%
Simplified75.7%
Taylor expanded in t1 around inf 48.3%
associate-*r/48.3%
neg-mul-148.3%
Simplified48.3%
Final simplification60.6%
(FPCore (u v t1) :precision binary64 (if (<= u -8.6e+48) (/ v (+ t1 u)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -8.6e+48) {
tmp = v / (t1 + u);
} else {
tmp = v / -t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-8.6d+48)) then
tmp = v / (t1 + u)
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -8.6e+48) {
tmp = v / (t1 + u);
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -8.6e+48: tmp = v / (t1 + u) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -8.6e+48) tmp = Float64(v / Float64(t1 + u)); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -8.6e+48) tmp = v / (t1 + u); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -8.6e+48], N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -8.6 \cdot 10^{+48}:\\
\;\;\;\;\frac{v}{t1 + u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -8.59999999999999957e48Initial program 80.5%
Taylor expanded in t1 around inf 47.3%
associate-/l*47.4%
add-sqr-sqrt18.5%
sqrt-unprod43.5%
sqr-neg43.5%
sqrt-unprod29.0%
add-sqr-sqrt47.4%
*-commutative47.4%
associate-/r*46.9%
Applied egg-rr46.9%
associate-*r/45.5%
associate-*l/54.3%
times-frac47.4%
*-commutative47.4%
times-frac45.7%
*-inverses45.7%
*-rgt-identity45.7%
Simplified45.7%
if -8.59999999999999957e48 < u Initial program 66.8%
associate-/l*66.5%
distribute-lft-neg-out66.5%
distribute-rgt-neg-in66.5%
associate-/r*75.7%
distribute-neg-frac275.7%
Simplified75.7%
Taylor expanded in t1 around inf 60.3%
associate-*r/60.3%
neg-mul-160.3%
Simplified60.3%
Final simplification56.7%
(FPCore (u v t1) :precision binary64 (if (<= u -5.2e+69) (/ v u) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -5.2e+69) {
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 <= (-5.2d+69)) 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 <= -5.2e+69) {
tmp = v / u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -5.2e+69: tmp = v / u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -5.2e+69) 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 <= -5.2e+69) tmp = v / u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -5.2e+69], N[(v / u), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -5.2 \cdot 10^{+69}:\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -5.2000000000000004e69Initial program 79.6%
associate-/l*79.8%
distribute-lft-neg-out79.8%
distribute-rgt-neg-in79.8%
associate-/r*94.0%
distribute-neg-frac294.0%
Simplified94.0%
Taylor expanded in t1 around 0 89.9%
mul-1-neg89.9%
Simplified89.9%
Taylor expanded in t1 around inf 43.3%
associate-*r/43.3%
mul-1-neg43.3%
Simplified43.3%
distribute-frac-neg43.3%
distribute-frac-neg243.3%
*-un-lft-identity43.3%
*-commutative43.3%
add-sqr-sqrt43.3%
sqrt-unprod67.4%
sqr-neg67.4%
sqrt-unprod0.0%
add-sqr-sqrt43.4%
Applied egg-rr43.4%
*-rgt-identity43.4%
Simplified43.4%
if -5.2000000000000004e69 < u Initial program 67.3%
associate-/l*67.1%
distribute-lft-neg-out67.1%
distribute-rgt-neg-in67.1%
associate-/r*76.1%
distribute-neg-frac276.1%
Simplified76.1%
Taylor expanded in t1 around inf 60.0%
associate-*r/60.0%
neg-mul-160.0%
Simplified60.0%
Final simplification56.1%
(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.2%
times-frac97.3%
distribute-frac-neg97.3%
distribute-neg-frac297.3%
+-commutative97.3%
distribute-neg-in97.3%
unsub-neg97.3%
Simplified97.3%
Taylor expanded in t1 around inf 54.1%
Taylor expanded in u around inf 15.6%
herbie shell --seed 2024137
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))