
(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 15 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(t1 / Float64(-u))) / Float64(t1 + 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[(t1 / (-u)), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $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{v \cdot \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 80.3%
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.4%
(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(t1 / 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 <= -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[(t1 / (-u)), $MachinePrecision]), $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 -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{v \cdot \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 80.3%
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(t1 / 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 <= -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[(t1 / (-u)), $MachinePrecision]), $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 -8.5 \cdot 10^{+18}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{elif}\;t1 \leq 2.7 \cdot 10^{-5}:\\
\;\;\;\;\frac{v \cdot \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 80.3%
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.3%
(FPCore (u v t1)
:precision binary64
(if (<= t1 -7.4e+19)
(/ v (- t1))
(if (<= t1 0.000106)
(* (/ t1 (+ t1 u)) (/ v (- 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 = (t1 / (t1 + u)) * (v / -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 = (t1 / (t1 + u)) * (v / -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 = (t1 / (t1 + u)) * (v / -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 = (t1 / (t1 + u)) * (v / -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(t1 / Float64(t1 + u)) * Float64(v / 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 <= -7.4e+19) tmp = v / -t1; elseif (t1 <= 0.000106) tmp = (t1 / (t1 + u)) * (v / -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[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(v / (-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{t1}{t1 + u} \cdot \frac{v}{-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%
times-frac94.9%
distribute-frac-neg94.9%
distribute-neg-frac294.9%
+-commutative94.9%
distribute-neg-in94.9%
unsub-neg94.9%
Simplified94.9%
Taylor expanded in t1 around 0 77.6%
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 simplification81.9%
(FPCore (u v t1) :precision binary64 (if (<= t1 -1.7e+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 <= -1.7e+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 <= (-1.7d+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 <= -1.7e+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 <= -1.7e+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 <= -1.7e+17) tmp = Float64(v / Float64(-t1)); elseif (t1 <= 4.4e-7) tmp = Float64(Float64(Float64(t1 * Float64(-v)) / u) / 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; 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, -1.7e+17], N[(v / (-t1)), $MachinePrecision], If[LessEqual[t1, 4.4e-7], N[(N[(N[(t1 * (-v)), $MachinePrecision] / u), $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}\\
\mathbf{elif}\;t1 \leq 4.4 \cdot 10^{-7}:\\
\;\;\;\;\frac{\frac{t1 \cdot \left(-v\right)}{u}}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\frac{t1 + u}{v}}\\
\end{array}
\end{array}
if t1 < -1.7e17Initial 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 -1.7e17 < 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%
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 t1 around 0 77.6%
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 simplification81.9%
(FPCore (u v t1) :precision binary64 (if (<= t1 -1.2e+18) (/ v (- t1)) (if (<= t1 1.5e-7) (* t1 (/ (/ v u) (- u))) (/ -1.0 (/ (+ t1 u) v)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1.2e+18) {
tmp = v / -t1;
} else if (t1 <= 1.5e-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 <= (-1.2d+18)) then
tmp = v / -t1
else if (t1 <= 1.5d-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 <= -1.2e+18) {
tmp = v / -t1;
} else if (t1 <= 1.5e-7) {
tmp = t1 * ((v / u) / -u);
} else {
tmp = -1.0 / ((t1 + u) / v);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -1.2e+18: tmp = v / -t1 elif t1 <= 1.5e-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 <= -1.2e+18) tmp = Float64(v / Float64(-t1)); elseif (t1 <= 1.5e-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 <= -1.2e+18) tmp = v / -t1; elseif (t1 <= 1.5e-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, -1.2e+18], N[(v / (-t1)), $MachinePrecision], If[LessEqual[t1, 1.5e-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 -1.2 \cdot 10^{+18}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{elif}\;t1 \leq 1.5 \cdot 10^{-7}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\frac{t1 + u}{v}}\\
\end{array}
\end{array}
if t1 < -1.2e18Initial 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 -1.2e18 < t1 < 1.4999999999999999e-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%
Taylor expanded in t1 around 0 75.0%
if 1.4999999999999999e-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 -8e+162) (not (<= t1 8.5e+108))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -8e+162) || !(t1 <= 8.5e+108)) {
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 <= (-8d+162)) .or. (.not. (t1 <= 8.5d+108))) 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 <= -8e+162) || !(t1 <= 8.5e+108)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -8e+162) or not (t1 <= 8.5e+108): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -8e+162) || !(t1 <= 8.5e+108)) 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 <= -8e+162) || ~((t1 <= 8.5e+108))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -8e+162], N[Not[LessEqual[t1, 8.5e+108]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -8 \cdot 10^{+162} \lor \neg \left(t1 \leq 8.5 \cdot 10^{+108}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -7.9999999999999995e162 or 8.50000000000000016e108 < 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 -7.9999999999999995e162 < t1 < 8.50000000000000016e108Initial program 80.5%
Taylor expanded in t1 around inf 44.2%
associate-/l*42.2%
add-sqr-sqrt20.5%
sqrt-unprod38.3%
sqr-neg38.3%
sqrt-unprod11.8%
add-sqr-sqrt21.1%
*-commutative21.1%
associate-/r*20.6%
Applied egg-rr20.6%
associate-*r/19.9%
associate-*l/25.5%
*-commutative25.5%
times-frac22.2%
associate-*r/20.3%
associate-/r*20.0%
*-inverses20.0%
Simplified20.0%
Taylor expanded in t1 around 0 21.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.8e+153) (/ v (- (- u) t1)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if (v <= 1.8e+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.8d+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.8e+153) {
tmp = v / (-u - t1);
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if v <= 1.8e+153: tmp = v / (-u - t1) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if (v <= 1.8e+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.8e+153) tmp = v / (-u - t1); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[v, 1.8e+153], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;v \leq 1.8 \cdot 10^{+153}:\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if v < 1.8e153Initial 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.8e153 < 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 -2.8e+49) (/ v (+ t1 u)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -2.8e+49) {
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 <= (-2.8d+49)) 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 <= -2.8e+49) {
tmp = v / (t1 + u);
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -2.8e+49: tmp = v / (t1 + u) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -2.8e+49) 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 <= -2.8e+49) tmp = v / (t1 + u); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -2.8e+49], N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.8 \cdot 10^{+49}:\\
\;\;\;\;\frac{v}{t1 + u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -2.7999999999999998e49Initial 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 -2.7999999999999998e49 < 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 -1.02e+74) (/ v u) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.02e+74) {
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.02d+74)) 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.02e+74) {
tmp = v / u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.02e+74: tmp = v / u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.02e+74) 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.02e+74) tmp = v / u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.02e+74], N[(v / u), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.02 \cdot 10^{+74}:\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -1.02000000000000005e74Initial program 79.6%
Taylor expanded in t1 around inf 47.9%
associate-/l*48.0%
add-sqr-sqrt19.5%
sqrt-unprod45.5%
sqr-neg45.5%
sqrt-unprod28.6%
add-sqr-sqrt48.0%
*-commutative48.0%
associate-/r*47.4%
Applied egg-rr47.4%
associate-*r/46.0%
associate-*l/55.2%
*-commutative55.2%
times-frac48.0%
associate-*r/46.7%
associate-/r*46.2%
*-inverses46.2%
Simplified46.2%
Taylor expanded in t1 around 0 43.4%
if -1.02000000000000005e74 < 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 (- 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.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%
Taylor expanded in t1 around inf 59.4%
mul-1-neg59.4%
Simplified59.4%
add-sqr-sqrt25.7%
sqrt-unprod66.6%
sqr-neg66.6%
sqrt-unprod34.5%
add-sqr-sqrt60.5%
sub-neg60.5%
Applied egg-rr60.5%
Final simplification60.5%
(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))))