
(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 16 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 (/ (* v (/ t1 (- (- u) t1))) (+ t1 u)))
double code(double u, double v, double t1) {
return (v * (t1 / (-u - t1))) / (t1 + u);
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (v * (t1 / (-u - t1))) / (t1 + u)
end function
public static double code(double u, double v, double t1) {
return (v * (t1 / (-u - t1))) / (t1 + u);
}
def code(u, v, t1): return (v * (t1 / (-u - t1))) / (t1 + u)
function code(u, v, t1) return Float64(Float64(v * Float64(t1 / Float64(Float64(-u) - t1))) / Float64(t1 + u)) end
function tmp = code(u, v, t1) tmp = (v * (t1 / (-u - t1))) / (t1 + u); end
code[u_, v_, t1_] := N[(N[(v * N[(t1 / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{v \cdot \frac{t1}{\left(-u\right) - t1}}{t1 + u}
\end{array}
Initial program 75.3%
associate-/l*75.6%
distribute-lft-neg-out75.6%
distribute-rgt-neg-in75.6%
associate-/r*88.0%
distribute-neg-frac288.0%
Simplified88.0%
distribute-frac-neg288.0%
distribute-rgt-neg-out88.0%
associate-/r*75.6%
distribute-lft-neg-out75.6%
associate-/l*75.3%
times-frac98.4%
frac-2neg98.4%
associate-*r/99.2%
add-sqr-sqrt51.7%
sqrt-unprod45.0%
sqr-neg45.0%
sqrt-unprod18.1%
add-sqr-sqrt35.8%
add-sqr-sqrt17.3%
sqrt-unprod57.0%
sqr-neg57.0%
sqrt-prod48.6%
add-sqr-sqrt99.2%
Applied egg-rr99.2%
Final simplification99.2%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ v (- (- u) t1))))
(if (<= t1 -54000.0)
t_1
(if (<= t1 7.5e-68)
(/ (* v (/ t1 (- u))) u)
(if (or (<= t1 1.35e-34) (not (<= t1 2.1e+22)))
t_1
(/ t1 (* u (/ u (- v)))))))))
double code(double u, double v, double t1) {
double t_1 = v / (-u - t1);
double tmp;
if (t1 <= -54000.0) {
tmp = t_1;
} else if (t1 <= 7.5e-68) {
tmp = (v * (t1 / -u)) / u;
} else if ((t1 <= 1.35e-34) || !(t1 <= 2.1e+22)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = v / (-u - t1)
if (t1 <= (-54000.0d0)) then
tmp = t_1
else if (t1 <= 7.5d-68) then
tmp = (v * (t1 / -u)) / u
else if ((t1 <= 1.35d-34) .or. (.not. (t1 <= 2.1d+22))) then
tmp = t_1
else
tmp = t1 / (u * (u / -v))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = v / (-u - t1);
double tmp;
if (t1 <= -54000.0) {
tmp = t_1;
} else if (t1 <= 7.5e-68) {
tmp = (v * (t1 / -u)) / u;
} else if ((t1 <= 1.35e-34) || !(t1 <= 2.1e+22)) {
tmp = t_1;
} else {
tmp = t1 / (u * (u / -v));
}
return tmp;
}
def code(u, v, t1): t_1 = v / (-u - t1) tmp = 0 if t1 <= -54000.0: tmp = t_1 elif t1 <= 7.5e-68: tmp = (v * (t1 / -u)) / u elif (t1 <= 1.35e-34) or not (t1 <= 2.1e+22): tmp = t_1 else: tmp = t1 / (u * (u / -v)) return tmp
function code(u, v, t1) t_1 = Float64(v / Float64(Float64(-u) - t1)) tmp = 0.0 if (t1 <= -54000.0) tmp = t_1; elseif (t1 <= 7.5e-68) tmp = Float64(Float64(v * Float64(t1 / Float64(-u))) / u); elseif ((t1 <= 1.35e-34) || !(t1 <= 2.1e+22)) tmp = t_1; else tmp = Float64(t1 / Float64(u * Float64(u / Float64(-v)))); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = v / (-u - t1); tmp = 0.0; if (t1 <= -54000.0) tmp = t_1; elseif (t1 <= 7.5e-68) tmp = (v * (t1 / -u)) / u; elseif ((t1 <= 1.35e-34) || ~((t1 <= 2.1e+22))) tmp = t_1; else tmp = t1 / (u * (u / -v)); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -54000.0], t$95$1, If[LessEqual[t1, 7.5e-68], N[(N[(v * N[(t1 / (-u)), $MachinePrecision]), $MachinePrecision] / u), $MachinePrecision], If[Or[LessEqual[t1, 1.35e-34], N[Not[LessEqual[t1, 2.1e+22]], $MachinePrecision]], t$95$1, N[(t1 / N[(u * N[(u / (-v)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{v}{\left(-u\right) - t1}\\
\mathbf{if}\;t1 \leq -54000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t1 \leq 7.5 \cdot 10^{-68}:\\
\;\;\;\;\frac{v \cdot \frac{t1}{-u}}{u}\\
\mathbf{elif}\;t1 \leq 1.35 \cdot 10^{-34} \lor \neg \left(t1 \leq 2.1 \cdot 10^{+22}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{u \cdot \frac{u}{-v}}\\
\end{array}
\end{array}
if t1 < -54000 or 7.50000000000000081e-68 < t1 < 1.35000000000000008e-34 or 2.0999999999999998e22 < t1 Initial program 66.9%
associate-/l*66.2%
distribute-lft-neg-out66.2%
distribute-rgt-neg-in66.2%
associate-/r*85.0%
distribute-neg-frac285.0%
Simplified85.0%
distribute-frac-neg285.0%
distribute-rgt-neg-out85.0%
associate-/r*66.2%
distribute-lft-neg-out66.2%
associate-/l*66.9%
times-frac99.9%
frac-2neg99.9%
associate-*r/99.9%
add-sqr-sqrt54.1%
sqrt-unprod31.6%
sqr-neg31.6%
sqrt-unprod13.7%
add-sqr-sqrt34.4%
add-sqr-sqrt17.7%
sqrt-unprod54.9%
sqr-neg54.9%
sqrt-prod49.3%
add-sqr-sqrt99.9%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 84.2%
mul-1-neg84.2%
Simplified84.2%
if -54000 < t1 < 7.50000000000000081e-68Initial program 82.5%
times-frac96.6%
distribute-frac-neg96.6%
distribute-neg-frac296.6%
+-commutative96.6%
distribute-neg-in96.6%
unsub-neg96.6%
Simplified96.6%
Taylor expanded in t1 around 0 76.5%
associate-*r/76.5%
mul-1-neg76.5%
Simplified76.5%
clear-num76.4%
frac-times75.3%
*-commutative75.3%
*-un-lft-identity75.3%
add-sqr-sqrt38.9%
sqrt-unprod47.4%
sqr-neg47.4%
sqrt-unprod22.4%
add-sqr-sqrt41.5%
frac-2neg41.5%
distribute-neg-in41.5%
add-sqr-sqrt19.1%
sqrt-unprod39.6%
sqr-neg39.6%
sqrt-unprod21.5%
add-sqr-sqrt39.7%
sub-neg39.7%
add-sqr-sqrt16.4%
sqrt-unprod48.9%
sqr-neg48.9%
sqrt-unprod44.9%
add-sqr-sqrt77.1%
Applied egg-rr77.1%
*-commutative77.1%
associate-/r*78.9%
associate-/r/79.9%
associate-*l/73.6%
associate-*r/78.2%
*-commutative78.2%
associate-/r/79.8%
div-sub79.8%
*-inverses79.8%
Simplified79.8%
Taylor expanded in u around inf 76.4%
mul-1-neg76.4%
*-commutative76.4%
associate-*r/82.8%
distribute-lft-neg-out82.8%
Simplified82.8%
if 1.35000000000000008e-34 < t1 < 2.0999999999999998e22Initial program 92.8%
times-frac99.6%
distribute-frac-neg99.6%
distribute-neg-frac299.6%
+-commutative99.6%
distribute-neg-in99.6%
unsub-neg99.6%
Simplified99.6%
Taylor expanded in t1 around 0 73.2%
associate-*r/73.2%
mul-1-neg73.2%
Simplified73.2%
Taylor expanded in t1 around 0 73.2%
*-commutative73.2%
clear-num73.2%
frac-2neg73.2%
frac-times73.4%
*-un-lft-identity73.4%
remove-double-neg73.4%
Applied egg-rr73.4%
Final simplification83.0%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ t1 (* u (/ u (- v))))))
(if (<= u -5.5e-8)
t_1
(if (<= u 2.8e+14)
(/ (- v) t1)
(if (<= u 6.6e+72)
t_1
(if (<= u 3.5e+81) (/ v (- (- u) t1)) (* (/ t1 (- u)) (/ v u))))))))
double code(double u, double v, double t1) {
double t_1 = t1 / (u * (u / -v));
double tmp;
if (u <= -5.5e-8) {
tmp = t_1;
} else if (u <= 2.8e+14) {
tmp = -v / t1;
} else if (u <= 6.6e+72) {
tmp = t_1;
} else if (u <= 3.5e+81) {
tmp = v / (-u - t1);
} else {
tmp = (t1 / -u) * (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) :: t_1
real(8) :: tmp
t_1 = t1 / (u * (u / -v))
if (u <= (-5.5d-8)) then
tmp = t_1
else if (u <= 2.8d+14) then
tmp = -v / t1
else if (u <= 6.6d+72) then
tmp = t_1
else if (u <= 3.5d+81) then
tmp = v / (-u - t1)
else
tmp = (t1 / -u) * (v / u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = t1 / (u * (u / -v));
double tmp;
if (u <= -5.5e-8) {
tmp = t_1;
} else if (u <= 2.8e+14) {
tmp = -v / t1;
} else if (u <= 6.6e+72) {
tmp = t_1;
} else if (u <= 3.5e+81) {
tmp = v / (-u - t1);
} else {
tmp = (t1 / -u) * (v / u);
}
return tmp;
}
def code(u, v, t1): t_1 = t1 / (u * (u / -v)) tmp = 0 if u <= -5.5e-8: tmp = t_1 elif u <= 2.8e+14: tmp = -v / t1 elif u <= 6.6e+72: tmp = t_1 elif u <= 3.5e+81: tmp = v / (-u - t1) else: tmp = (t1 / -u) * (v / u) return tmp
function code(u, v, t1) t_1 = Float64(t1 / Float64(u * Float64(u / Float64(-v)))) tmp = 0.0 if (u <= -5.5e-8) tmp = t_1; elseif (u <= 2.8e+14) tmp = Float64(Float64(-v) / t1); elseif (u <= 6.6e+72) tmp = t_1; elseif (u <= 3.5e+81) tmp = Float64(v / Float64(Float64(-u) - t1)); else tmp = Float64(Float64(t1 / Float64(-u)) * Float64(v / u)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = t1 / (u * (u / -v)); tmp = 0.0; if (u <= -5.5e-8) tmp = t_1; elseif (u <= 2.8e+14) tmp = -v / t1; elseif (u <= 6.6e+72) tmp = t_1; elseif (u <= 3.5e+81) tmp = v / (-u - t1); else tmp = (t1 / -u) * (v / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(t1 / N[(u * N[(u / (-v)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[u, -5.5e-8], t$95$1, If[LessEqual[u, 2.8e+14], N[((-v) / t1), $MachinePrecision], If[LessEqual[u, 6.6e+72], t$95$1, If[LessEqual[u, 3.5e+81], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], N[(N[(t1 / (-u)), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t1}{u \cdot \frac{u}{-v}}\\
\mathbf{if}\;u \leq -5.5 \cdot 10^{-8}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;u \leq 2.8 \cdot 10^{+14}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{elif}\;u \leq 6.6 \cdot 10^{+72}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;u \leq 3.5 \cdot 10^{+81}:\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{-u} \cdot \frac{v}{u}\\
\end{array}
\end{array}
if u < -5.5000000000000003e-8 or 2.8e14 < u < 6.6e72Initial program 86.2%
times-frac98.7%
distribute-frac-neg98.7%
distribute-neg-frac298.7%
+-commutative98.7%
distribute-neg-in98.7%
unsub-neg98.7%
Simplified98.7%
Taylor expanded in t1 around 0 84.5%
associate-*r/84.5%
mul-1-neg84.5%
Simplified84.5%
Taylor expanded in t1 around 0 77.2%
*-commutative77.2%
clear-num78.3%
frac-2neg78.3%
frac-times82.1%
*-un-lft-identity82.1%
remove-double-neg82.1%
Applied egg-rr82.1%
if -5.5000000000000003e-8 < u < 2.8e14Initial program 67.5%
associate-/l*68.0%
distribute-lft-neg-out68.0%
distribute-rgt-neg-in68.0%
associate-/r*83.0%
distribute-neg-frac283.0%
Simplified83.0%
Taylor expanded in t1 around inf 79.2%
associate-*r/79.2%
neg-mul-179.2%
Simplified79.2%
if 6.6e72 < u < 3.5e81Initial program 44.4%
associate-/l*59.3%
distribute-lft-neg-out59.3%
distribute-rgt-neg-in59.3%
associate-/r*73.2%
distribute-neg-frac273.2%
Simplified73.2%
distribute-frac-neg273.2%
distribute-rgt-neg-out73.2%
associate-/r*59.3%
distribute-lft-neg-out59.3%
associate-/l*44.4%
times-frac100.0%
frac-2neg100.0%
associate-*r/100.0%
add-sqr-sqrt27.8%
sqrt-unprod29.9%
sqr-neg29.9%
sqrt-unprod29.8%
add-sqr-sqrt30.5%
add-sqr-sqrt0.7%
sqrt-unprod59.3%
sqr-neg59.3%
sqrt-prod71.4%
add-sqr-sqrt100.0%
Applied egg-rr100.0%
Taylor expanded in t1 around inf 87.2%
mul-1-neg87.2%
Simplified87.2%
if 3.5e81 < u Initial program 84.2%
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 96.8%
associate-*r/96.8%
mul-1-neg96.8%
Simplified96.8%
Taylor expanded in t1 around 0 94.5%
Final simplification82.8%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (- (- u) t1)) (t_2 (/ v t_1)))
(if (<= t1 -2.3e+130)
t_2
(if (<= t1 -1.7e-108)
(* v (/ t1 (* (+ t1 u) t_1)))
(if (<= t1 3.4e+163) (* t1 (/ (/ v (+ t1 u)) t_1)) t_2)))))
double code(double u, double v, double t1) {
double t_1 = -u - t1;
double t_2 = v / t_1;
double tmp;
if (t1 <= -2.3e+130) {
tmp = t_2;
} else if (t1 <= -1.7e-108) {
tmp = v * (t1 / ((t1 + u) * t_1));
} else if (t1 <= 3.4e+163) {
tmp = t1 * ((v / (t1 + u)) / t_1);
} else {
tmp = t_2;
}
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 = -u - t1
t_2 = v / t_1
if (t1 <= (-2.3d+130)) then
tmp = t_2
else if (t1 <= (-1.7d-108)) then
tmp = v * (t1 / ((t1 + u) * t_1))
else if (t1 <= 3.4d+163) then
tmp = t1 * ((v / (t1 + u)) / t_1)
else
tmp = t_2
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = -u - t1;
double t_2 = v / t_1;
double tmp;
if (t1 <= -2.3e+130) {
tmp = t_2;
} else if (t1 <= -1.7e-108) {
tmp = v * (t1 / ((t1 + u) * t_1));
} else if (t1 <= 3.4e+163) {
tmp = t1 * ((v / (t1 + u)) / t_1);
} else {
tmp = t_2;
}
return tmp;
}
def code(u, v, t1): t_1 = -u - t1 t_2 = v / t_1 tmp = 0 if t1 <= -2.3e+130: tmp = t_2 elif t1 <= -1.7e-108: tmp = v * (t1 / ((t1 + u) * t_1)) elif t1 <= 3.4e+163: tmp = t1 * ((v / (t1 + u)) / t_1) else: tmp = t_2 return tmp
function code(u, v, t1) t_1 = Float64(Float64(-u) - t1) t_2 = Float64(v / t_1) tmp = 0.0 if (t1 <= -2.3e+130) tmp = t_2; elseif (t1 <= -1.7e-108) tmp = Float64(v * Float64(t1 / Float64(Float64(t1 + u) * t_1))); elseif (t1 <= 3.4e+163) tmp = Float64(t1 * Float64(Float64(v / Float64(t1 + u)) / t_1)); else tmp = t_2; end return tmp end
function tmp_2 = code(u, v, t1) t_1 = -u - t1; t_2 = v / t_1; tmp = 0.0; if (t1 <= -2.3e+130) tmp = t_2; elseif (t1 <= -1.7e-108) tmp = v * (t1 / ((t1 + u) * t_1)); elseif (t1 <= 3.4e+163) tmp = t1 * ((v / (t1 + u)) / t_1); else tmp = t_2; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-u) - t1), $MachinePrecision]}, Block[{t$95$2 = N[(v / t$95$1), $MachinePrecision]}, If[LessEqual[t1, -2.3e+130], t$95$2, If[LessEqual[t1, -1.7e-108], N[(v * N[(t1 / N[(N[(t1 + u), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 3.4e+163], N[(t1 * N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-u\right) - t1\\
t_2 := \frac{v}{t\_1}\\
\mathbf{if}\;t1 \leq -2.3 \cdot 10^{+130}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t1 \leq -1.7 \cdot 10^{-108}:\\
\;\;\;\;v \cdot \frac{t1}{\left(t1 + u\right) \cdot t\_1}\\
\mathbf{elif}\;t1 \leq 3.4 \cdot 10^{+163}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{t1 + u}}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t1 < -2.30000000000000021e130 or 3.4000000000000001e163 < t1 Initial program 46.1%
associate-/l*47.5%
distribute-lft-neg-out47.5%
distribute-rgt-neg-in47.5%
associate-/r*81.1%
distribute-neg-frac281.1%
Simplified81.1%
distribute-frac-neg281.1%
distribute-rgt-neg-out81.1%
associate-/r*47.5%
distribute-lft-neg-out47.5%
associate-/l*46.1%
times-frac100.0%
frac-2neg100.0%
associate-*r/99.9%
add-sqr-sqrt65.8%
sqrt-unprod9.9%
sqr-neg9.9%
sqrt-unprod16.7%
add-sqr-sqrt43.4%
add-sqr-sqrt20.2%
sqrt-unprod44.2%
sqr-neg44.2%
sqrt-prod41.7%
add-sqr-sqrt99.9%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 92.6%
mul-1-neg92.6%
Simplified92.6%
if -2.30000000000000021e130 < t1 < -1.70000000000000001e-108Initial program 97.9%
associate-*l/97.8%
*-commutative97.8%
Simplified97.8%
if -1.70000000000000001e-108 < t1 < 3.4000000000000001e163Initial program 80.1%
associate-/l*85.0%
distribute-lft-neg-out85.0%
distribute-rgt-neg-in85.0%
associate-/r*92.5%
distribute-neg-frac292.5%
Simplified92.5%
Final simplification93.6%
(FPCore (u v t1) :precision binary64 (if (or (<= u -3.2e-74) (not (<= u 1.8e-159))) (* t1 (/ (/ v (+ t1 u)) (- (- u) t1))) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.2e-74) || !(u <= 1.8e-159)) {
tmp = t1 * ((v / (t1 + u)) / (-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 ((u <= (-3.2d-74)) .or. (.not. (u <= 1.8d-159))) then
tmp = t1 * ((v / (t1 + u)) / (-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 ((u <= -3.2e-74) || !(u <= 1.8e-159)) {
tmp = t1 * ((v / (t1 + u)) / (-u - t1));
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -3.2e-74) or not (u <= 1.8e-159): tmp = t1 * ((v / (t1 + u)) / (-u - t1)) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -3.2e-74) || !(u <= 1.8e-159)) tmp = Float64(t1 * Float64(Float64(v / Float64(t1 + u)) / Float64(Float64(-u) - t1))); else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -3.2e-74) || ~((u <= 1.8e-159))) tmp = t1 * ((v / (t1 + u)) / (-u - t1)); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -3.2e-74], N[Not[LessEqual[u, 1.8e-159]], $MachinePrecision]], N[(t1 * N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.2 \cdot 10^{-74} \lor \neg \left(u \leq 1.8 \cdot 10^{-159}\right):\\
\;\;\;\;t1 \cdot \frac{\frac{v}{t1 + u}}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -3.1999999999999999e-74 or 1.80000000000000011e-159 < u Initial program 77.9%
associate-/l*79.9%
distribute-lft-neg-out79.9%
distribute-rgt-neg-in79.9%
associate-/r*92.1%
distribute-neg-frac292.1%
Simplified92.1%
if -3.1999999999999999e-74 < u < 1.80000000000000011e-159Initial program 69.7%
associate-/l*66.4%
distribute-lft-neg-out66.4%
distribute-rgt-neg-in66.4%
associate-/r*79.3%
distribute-neg-frac279.3%
Simplified79.3%
Taylor expanded in t1 around inf 91.1%
associate-*r/91.1%
neg-mul-191.1%
Simplified91.1%
Final simplification91.8%
(FPCore (u v t1) :precision binary64 (if (or (<= u -3.7e-9) (not (<= u 1.75e+14))) (* (/ v (+ t1 u)) (/ t1 (- u))) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.7e-9) || !(u <= 1.75e+14)) {
tmp = (v / (t1 + u)) * (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 <= (-3.7d-9)) .or. (.not. (u <= 1.75d+14))) then
tmp = (v / (t1 + u)) * (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 <= -3.7e-9) || !(u <= 1.75e+14)) {
tmp = (v / (t1 + u)) * (t1 / -u);
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -3.7e-9) or not (u <= 1.75e+14): tmp = (v / (t1 + u)) * (t1 / -u) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -3.7e-9) || !(u <= 1.75e+14)) tmp = Float64(Float64(v / Float64(t1 + u)) * Float64(t1 / Float64(-u))); else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -3.7e-9) || ~((u <= 1.75e+14))) tmp = (v / (t1 + u)) * (t1 / -u); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -3.7e-9], N[Not[LessEqual[u, 1.75e+14]], $MachinePrecision]], N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(t1 / (-u)), $MachinePrecision]), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.7 \cdot 10^{-9} \lor \neg \left(u \leq 1.75 \cdot 10^{+14}\right):\\
\;\;\;\;\frac{v}{t1 + u} \cdot \frac{t1}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -3.7e-9 or 1.75e14 < u Initial program 83.2%
times-frac99.2%
distribute-frac-neg99.2%
distribute-neg-frac299.2%
+-commutative99.2%
distribute-neg-in99.2%
unsub-neg99.2%
Simplified99.2%
Taylor expanded in t1 around 0 85.7%
associate-*r/85.7%
mul-1-neg85.7%
Simplified85.7%
if -3.7e-9 < u < 1.75e14Initial program 67.5%
associate-/l*68.0%
distribute-lft-neg-out68.0%
distribute-rgt-neg-in68.0%
associate-/r*83.0%
distribute-neg-frac283.0%
Simplified83.0%
Taylor expanded in t1 around inf 79.2%
associate-*r/79.2%
neg-mul-179.2%
Simplified79.2%
Final simplification82.4%
(FPCore (u v t1) :precision binary64 (if (or (<= u -5.8e-9) (not (<= u 65000000000000.0))) (/ (/ v (- t1 u)) (/ u t1)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -5.8e-9) || !(u <= 65000000000000.0)) {
tmp = (v / (t1 - u)) / (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 ((u <= (-5.8d-9)) .or. (.not. (u <= 65000000000000.0d0))) then
tmp = (v / (t1 - u)) / (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 ((u <= -5.8e-9) || !(u <= 65000000000000.0)) {
tmp = (v / (t1 - u)) / (u / t1);
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -5.8e-9) or not (u <= 65000000000000.0): tmp = (v / (t1 - u)) / (u / t1) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -5.8e-9) || !(u <= 65000000000000.0)) tmp = Float64(Float64(v / Float64(t1 - u)) / Float64(u / t1)); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -5.8e-9) || ~((u <= 65000000000000.0))) tmp = (v / (t1 - u)) / (u / t1); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -5.8e-9], N[Not[LessEqual[u, 65000000000000.0]], $MachinePrecision]], N[(N[(v / N[(t1 - u), $MachinePrecision]), $MachinePrecision] / N[(u / t1), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -5.8 \cdot 10^{-9} \lor \neg \left(u \leq 65000000000000\right):\\
\;\;\;\;\frac{\frac{v}{t1 - u}}{\frac{u}{t1}}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -5.79999999999999982e-9 or 6.5e13 < u Initial program 83.2%
times-frac99.2%
distribute-frac-neg99.2%
distribute-neg-frac299.2%
+-commutative99.2%
distribute-neg-in99.2%
unsub-neg99.2%
Simplified99.2%
Taylor expanded in t1 around 0 85.7%
associate-*r/85.7%
mul-1-neg85.7%
Simplified85.7%
*-commutative85.7%
clear-num85.6%
un-div-inv85.6%
frac-2neg85.6%
add-sqr-sqrt41.5%
sqrt-unprod58.3%
sqr-neg58.3%
sqrt-unprod31.5%
add-sqr-sqrt57.8%
distribute-neg-in57.8%
add-sqr-sqrt28.3%
sqrt-unprod57.9%
sqr-neg57.9%
sqrt-unprod29.4%
add-sqr-sqrt57.9%
sub-neg57.9%
add-sqr-sqrt28.5%
sqrt-unprod57.3%
sqr-neg57.3%
sqrt-unprod42.6%
add-sqr-sqrt85.4%
Applied egg-rr85.4%
if -5.79999999999999982e-9 < u < 6.5e13Initial program 67.5%
associate-/l*68.0%
distribute-lft-neg-out68.0%
distribute-rgt-neg-in68.0%
associate-/r*83.0%
distribute-neg-frac283.0%
Simplified83.0%
Taylor expanded in t1 around inf 79.2%
associate-*r/79.2%
neg-mul-179.2%
Simplified79.2%
Final simplification82.3%
(FPCore (u v t1) :precision binary64 (if (or (<= u -2.7e-7) (not (<= u 2e+14))) (* (/ t1 (- u)) (/ v u)) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.7e-7) || !(u <= 2e+14)) {
tmp = (t1 / -u) * (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 <= (-2.7d-7)) .or. (.not. (u <= 2d+14))) then
tmp = (t1 / -u) * (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 <= -2.7e-7) || !(u <= 2e+14)) {
tmp = (t1 / -u) * (v / u);
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -2.7e-7) or not (u <= 2e+14): tmp = (t1 / -u) * (v / u) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -2.7e-7) || !(u <= 2e+14)) tmp = Float64(Float64(t1 / Float64(-u)) * Float64(v / u)); else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -2.7e-7) || ~((u <= 2e+14))) tmp = (t1 / -u) * (v / u); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2.7e-7], N[Not[LessEqual[u, 2e+14]], $MachinePrecision]], N[(N[(t1 / (-u)), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.7 \cdot 10^{-7} \lor \neg \left(u \leq 2 \cdot 10^{+14}\right):\\
\;\;\;\;\frac{t1}{-u} \cdot \frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -2.70000000000000009e-7 or 2e14 < u Initial program 83.2%
times-frac99.2%
distribute-frac-neg99.2%
distribute-neg-frac299.2%
+-commutative99.2%
distribute-neg-in99.2%
unsub-neg99.2%
Simplified99.2%
Taylor expanded in t1 around 0 85.7%
associate-*r/85.7%
mul-1-neg85.7%
Simplified85.7%
Taylor expanded in t1 around 0 80.4%
if -2.70000000000000009e-7 < u < 2e14Initial program 67.5%
associate-/l*68.0%
distribute-lft-neg-out68.0%
distribute-rgt-neg-in68.0%
associate-/r*83.0%
distribute-neg-frac283.0%
Simplified83.0%
Taylor expanded in t1 around inf 79.2%
associate-*r/79.2%
neg-mul-179.2%
Simplified79.2%
Final simplification79.8%
(FPCore (u v t1) :precision binary64 (if (or (<= u -9.4e+58) (not (<= u 6.8e+84))) (/ t1 (* u (/ u v))) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -9.4e+58) || !(u <= 6.8e+84)) {
tmp = t1 / (u * (u / v));
} 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 <= (-9.4d+58)) .or. (.not. (u <= 6.8d+84))) then
tmp = t1 / (u * (u / v))
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -9.4e+58) || !(u <= 6.8e+84)) {
tmp = t1 / (u * (u / v));
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -9.4e+58) or not (u <= 6.8e+84): tmp = t1 / (u * (u / v)) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -9.4e+58) || !(u <= 6.8e+84)) tmp = Float64(t1 / Float64(u * Float64(u / v))); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -9.4e+58) || ~((u <= 6.8e+84))) tmp = t1 / (u * (u / v)); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -9.4e+58], N[Not[LessEqual[u, 6.8e+84]], $MachinePrecision]], N[(t1 / N[(u * N[(u / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -9.4 \cdot 10^{+58} \lor \neg \left(u \leq 6.8 \cdot 10^{+84}\right):\\
\;\;\;\;\frac{t1}{u \cdot \frac{u}{v}}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -9.39999999999999944e58 or 6.7999999999999996e84 < u Initial program 83.7%
times-frac98.9%
distribute-frac-neg98.9%
distribute-neg-frac298.9%
+-commutative98.9%
distribute-neg-in98.9%
unsub-neg98.9%
Simplified98.9%
Taylor expanded in t1 around 0 93.4%
associate-*r/93.4%
mul-1-neg93.4%
Simplified93.4%
Taylor expanded in t1 around 0 88.0%
*-commutative88.0%
clear-num88.0%
frac-times89.8%
*-un-lft-identity89.8%
add-sqr-sqrt43.8%
sqrt-unprod62.0%
sqr-neg62.0%
sqrt-unprod37.2%
add-sqr-sqrt71.9%
Applied egg-rr71.9%
if -9.39999999999999944e58 < u < 6.7999999999999996e84Initial program 70.9%
associate-/l*71.8%
distribute-lft-neg-out71.8%
distribute-rgt-neg-in71.8%
associate-/r*85.0%
distribute-neg-frac285.0%
Simplified85.0%
Taylor expanded in t1 around inf 70.6%
associate-*r/70.6%
neg-mul-170.6%
Simplified70.6%
Final simplification71.1%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.35e+146) (not (<= u 9.5e+150))) (/ v u) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.35e+146) || !(u <= 9.5e+150)) {
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.35d+146)) .or. (.not. (u <= 9.5d+150))) 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.35e+146) || !(u <= 9.5e+150)) {
tmp = v / u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.35e+146) or not (u <= 9.5e+150): tmp = v / u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.35e+146) || !(u <= 9.5e+150)) 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.35e+146) || ~((u <= 9.5e+150))) tmp = v / u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.35e+146], N[Not[LessEqual[u, 9.5e+150]], $MachinePrecision]], N[(v / u), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.35 \cdot 10^{+146} \lor \neg \left(u \leq 9.5 \cdot 10^{+150}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -1.34999999999999994e146 or 9.5000000000000001e150 < u Initial program 80.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 0 96.5%
associate-*r/96.5%
mul-1-neg96.5%
Simplified96.5%
clear-num96.5%
frac-times89.6%
*-commutative89.6%
*-un-lft-identity89.6%
add-sqr-sqrt49.2%
sqrt-unprod67.7%
sqr-neg67.7%
sqrt-unprod37.2%
add-sqr-sqrt79.5%
frac-2neg79.5%
distribute-neg-in79.5%
add-sqr-sqrt42.3%
sqrt-unprod79.6%
sqr-neg79.6%
sqrt-unprod37.2%
add-sqr-sqrt79.4%
sub-neg79.4%
add-sqr-sqrt32.2%
sqrt-unprod64.3%
sqr-neg64.3%
sqrt-unprod52.1%
add-sqr-sqrt89.6%
Applied egg-rr89.6%
*-commutative89.6%
associate-/r*96.5%
associate-/r/96.5%
associate-*l/88.7%
associate-*r/96.5%
*-commutative96.5%
associate-/r/96.5%
div-sub96.5%
*-inverses96.5%
Simplified96.5%
Taylor expanded in u around 0 39.8%
if -1.34999999999999994e146 < u < 9.5000000000000001e150Initial program 73.6%
associate-/l*74.4%
distribute-lft-neg-out74.4%
distribute-rgt-neg-in74.4%
associate-/r*86.7%
distribute-neg-frac286.7%
Simplified86.7%
Taylor expanded in t1 around inf 64.8%
associate-*r/64.8%
neg-mul-164.8%
Simplified64.8%
Final simplification58.9%
(FPCore (u v t1) :precision binary64 (if (or (<= u -4.5e+146) (not (<= u 2.2e+150))) (/ v (- u)) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -4.5e+146) || !(u <= 2.2e+150)) {
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.5d+146)) .or. (.not. (u <= 2.2d+150))) 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.5e+146) || !(u <= 2.2e+150)) {
tmp = v / -u;
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -4.5e+146) or not (u <= 2.2e+150): tmp = v / -u else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -4.5e+146) || !(u <= 2.2e+150)) tmp = Float64(v / Float64(-u)); else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -4.5e+146) || ~((u <= 2.2e+150))) tmp = v / -u; else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -4.5e+146], N[Not[LessEqual[u, 2.2e+150]], $MachinePrecision]], N[(v / (-u)), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -4.5 \cdot 10^{+146} \lor \neg \left(u \leq 2.2 \cdot 10^{+150}\right):\\
\;\;\;\;\frac{v}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -4.50000000000000026e146 or 2.19999999999999999e150 < u Initial program 80.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 0 96.5%
associate-*r/96.5%
mul-1-neg96.5%
Simplified96.5%
Taylor expanded in t1 around inf 40.2%
associate-*r/40.2%
mul-1-neg40.2%
Simplified40.2%
if -4.50000000000000026e146 < u < 2.19999999999999999e150Initial program 73.6%
associate-/l*74.4%
distribute-lft-neg-out74.4%
distribute-rgt-neg-in74.4%
associate-/r*86.7%
distribute-neg-frac286.7%
Simplified86.7%
Taylor expanded in t1 around inf 64.8%
associate-*r/64.8%
neg-mul-164.8%
Simplified64.8%
Final simplification59.0%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1.05e+160) (not (<= t1 6.2e+73))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.05e+160) || !(t1 <= 6.2e+73)) {
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.05d+160)) .or. (.not. (t1 <= 6.2d+73))) 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.05e+160) || !(t1 <= 6.2e+73)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.05e+160) or not (t1 <= 6.2e+73): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.05e+160) || !(t1 <= 6.2e+73)) 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.05e+160) || ~((t1 <= 6.2e+73))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.05e+160], N[Not[LessEqual[t1, 6.2e+73]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.05 \cdot 10^{+160} \lor \neg \left(t1 \leq 6.2 \cdot 10^{+73}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -1.04999999999999998e160 or 6.1999999999999999e73 < t1 Initial program 49.8%
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 88.1%
Taylor expanded in u around inf 38.1%
if -1.04999999999999998e160 < t1 < 6.1999999999999999e73Initial program 85.7%
times-frac97.8%
distribute-frac-neg97.8%
distribute-neg-frac297.8%
+-commutative97.8%
distribute-neg-in97.8%
unsub-neg97.8%
Simplified97.8%
Taylor expanded in t1 around 0 66.2%
associate-*r/66.2%
mul-1-neg66.2%
Simplified66.2%
clear-num66.2%
frac-times64.5%
*-commutative64.5%
*-un-lft-identity64.5%
add-sqr-sqrt33.6%
sqrt-unprod42.3%
sqr-neg42.3%
sqrt-unprod18.7%
add-sqr-sqrt37.3%
frac-2neg37.3%
distribute-neg-in37.3%
add-sqr-sqrt18.7%
sqrt-unprod36.1%
sqr-neg36.1%
sqrt-unprod18.0%
add-sqr-sqrt36.4%
sub-neg36.4%
add-sqr-sqrt16.6%
sqrt-unprod42.2%
sqr-neg42.2%
sqrt-unprod35.1%
add-sqr-sqrt65.5%
Applied egg-rr65.5%
*-commutative65.5%
associate-/r*67.5%
associate-/r/67.4%
associate-*l/62.8%
associate-*r/67.1%
*-commutative67.1%
associate-/r/67.3%
div-sub67.3%
*-inverses67.3%
Simplified67.3%
Taylor expanded in u around 0 18.1%
Final simplification23.9%
(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 75.3%
times-frac98.4%
distribute-frac-neg98.4%
distribute-neg-frac298.4%
+-commutative98.4%
distribute-neg-in98.4%
unsub-neg98.4%
Simplified98.4%
Final simplification98.4%
(FPCore (u v t1) :precision binary64 (/ v (- (- u) t1)))
double code(double u, double v, double t1) {
return v / (-u - t1);
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = v / (-u - t1)
end function
public static double code(double u, double v, double t1) {
return v / (-u - t1);
}
def code(u, v, t1): return v / (-u - t1)
function code(u, v, t1) return Float64(v / Float64(Float64(-u) - t1)) end
function tmp = code(u, v, t1) tmp = v / (-u - t1); end
code[u_, v_, t1_] := N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{\left(-u\right) - t1}
\end{array}
Initial program 75.3%
associate-/l*75.6%
distribute-lft-neg-out75.6%
distribute-rgt-neg-in75.6%
associate-/r*88.0%
distribute-neg-frac288.0%
Simplified88.0%
distribute-frac-neg288.0%
distribute-rgt-neg-out88.0%
associate-/r*75.6%
distribute-lft-neg-out75.6%
associate-/l*75.3%
times-frac98.4%
frac-2neg98.4%
associate-*r/99.2%
add-sqr-sqrt51.7%
sqrt-unprod45.0%
sqr-neg45.0%
sqrt-unprod18.1%
add-sqr-sqrt35.8%
add-sqr-sqrt17.3%
sqrt-unprod57.0%
sqr-neg57.0%
sqrt-prod48.6%
add-sqr-sqrt99.2%
Applied egg-rr99.2%
Taylor expanded in t1 around inf 59.6%
mul-1-neg59.6%
Simplified59.6%
Final simplification59.6%
(FPCore (u v t1) :precision binary64 (/ v (- u t1)))
double code(double u, double v, double t1) {
return v / (u - t1);
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = v / (u - t1)
end function
public static double code(double u, double v, double t1) {
return v / (u - t1);
}
def code(u, v, t1): return v / (u - t1)
function code(u, v, t1) return Float64(v / Float64(u - t1)) end
function tmp = code(u, v, t1) tmp = v / (u - t1); end
code[u_, v_, t1_] := N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{u - t1}
\end{array}
Initial program 75.3%
associate-/l*75.6%
distribute-lft-neg-out75.6%
distribute-rgt-neg-in75.6%
associate-/r*88.0%
distribute-neg-frac288.0%
Simplified88.0%
distribute-frac-neg288.0%
distribute-rgt-neg-out88.0%
associate-/r*75.6%
distribute-lft-neg-out75.6%
associate-/l*75.3%
times-frac98.4%
frac-2neg98.4%
associate-*r/99.2%
add-sqr-sqrt51.7%
sqrt-unprod45.0%
sqr-neg45.0%
sqrt-unprod18.1%
add-sqr-sqrt35.8%
add-sqr-sqrt17.3%
sqrt-unprod57.0%
sqr-neg57.0%
sqrt-prod48.6%
add-sqr-sqrt99.2%
Applied egg-rr99.2%
Taylor expanded in t1 around inf 59.6%
mul-1-neg59.6%
Simplified59.6%
distribute-frac-neg59.6%
*-un-lft-identity59.6%
associate-*l/59.4%
distribute-lft-neg-in59.4%
Applied egg-rr59.4%
add-sqr-sqrt30.9%
sqrt-unprod43.9%
sqr-neg43.9%
sqrt-unprod11.9%
add-sqr-sqrt22.4%
frac-2neg22.4%
metadata-eval22.4%
associate-*l/22.4%
neg-mul-122.4%
distribute-neg-in22.4%
add-sqr-sqrt11.8%
sqrt-unprod33.8%
sqr-neg33.8%
sqrt-unprod27.5%
add-sqr-sqrt59.6%
sub-neg59.6%
Applied egg-rr59.6%
Final simplification59.6%
(FPCore (u v t1) :precision binary64 (/ v t1))
double code(double u, double v, double t1) {
return v / t1;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = v / t1
end function
public static double code(double u, double v, double t1) {
return v / t1;
}
def code(u, v, t1): return v / t1
function code(u, v, t1) return Float64(v / t1) end
function tmp = code(u, v, t1) tmp = v / t1; end
code[u_, v_, t1_] := N[(v / t1), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{t1}
\end{array}
Initial program 75.3%
times-frac98.4%
distribute-frac-neg98.4%
distribute-neg-frac298.4%
+-commutative98.4%
distribute-neg-in98.4%
unsub-neg98.4%
Simplified98.4%
Taylor expanded in t1 around inf 56.1%
Taylor expanded in u around inf 13.5%
Final simplification13.5%
herbie shell --seed 2024053
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))