
(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 14 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 (- (- t1) u))) (+ t1 u)))
double code(double u, double v, double t1) {
return (v * (t1 / (-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 = (v * (t1 / (-t1 - u))) / (t1 + u)
end function
public static double code(double u, double v, double t1) {
return (v * (t1 / (-t1 - u))) / (t1 + u);
}
def code(u, v, t1): return (v * (t1 / (-t1 - u))) / (t1 + u)
function code(u, v, t1) return Float64(Float64(v * Float64(t1 / Float64(Float64(-t1) - u))) / Float64(t1 + u)) end
function tmp = code(u, v, t1) tmp = (v * (t1 / (-t1 - u))) / (t1 + u); end
code[u_, v_, t1_] := N[(N[(v * N[(t1 / N[((-t1) - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{v \cdot \frac{t1}{\left(-t1\right) - u}}{t1 + u}
\end{array}
Initial program 74.1%
associate-/l*73.7%
distribute-lft-neg-out73.7%
distribute-rgt-neg-in73.7%
associate-/r*85.7%
distribute-neg-frac285.7%
Simplified85.7%
distribute-frac-neg285.7%
distribute-rgt-neg-out85.7%
associate-/r*73.7%
distribute-lft-neg-out73.7%
associate-/l*74.1%
times-frac98.4%
frac-2neg98.4%
associate-*r/98.4%
add-sqr-sqrt52.8%
sqrt-unprod51.1%
sqr-neg51.1%
sqrt-unprod19.5%
add-sqr-sqrt38.4%
add-sqr-sqrt20.6%
sqrt-unprod54.1%
sqr-neg54.1%
sqrt-prod43.2%
add-sqr-sqrt98.4%
Applied egg-rr98.4%
Final simplification98.4%
(FPCore (u v t1)
:precision binary64
(if (<= t1 -6.8e-35)
(/ v (- (* u -2.0) t1))
(if (<= t1 8.5e-105)
(* (/ t1 (- u)) (/ v u))
(* (/ t1 (- (- t1) u)) (/ v t1)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -6.8e-35) {
tmp = v / ((u * -2.0) - t1);
} else if (t1 <= 8.5e-105) {
tmp = (t1 / -u) * (v / u);
} else {
tmp = (t1 / (-t1 - u)) * (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 (t1 <= (-6.8d-35)) then
tmp = v / ((u * (-2.0d0)) - t1)
else if (t1 <= 8.5d-105) then
tmp = (t1 / -u) * (v / u)
else
tmp = (t1 / (-t1 - u)) * (v / t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -6.8e-35) {
tmp = v / ((u * -2.0) - t1);
} else if (t1 <= 8.5e-105) {
tmp = (t1 / -u) * (v / u);
} else {
tmp = (t1 / (-t1 - u)) * (v / t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -6.8e-35: tmp = v / ((u * -2.0) - t1) elif t1 <= 8.5e-105: tmp = (t1 / -u) * (v / u) else: tmp = (t1 / (-t1 - u)) * (v / t1) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -6.8e-35) tmp = Float64(v / Float64(Float64(u * -2.0) - t1)); elseif (t1 <= 8.5e-105) tmp = Float64(Float64(t1 / Float64(-u)) * Float64(v / u)); else tmp = Float64(Float64(t1 / Float64(Float64(-t1) - u)) * Float64(v / t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -6.8e-35) tmp = v / ((u * -2.0) - t1); elseif (t1 <= 8.5e-105) tmp = (t1 / -u) * (v / u); else tmp = (t1 / (-t1 - u)) * (v / t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -6.8e-35], N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 8.5e-105], N[(N[(t1 / (-u)), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision], N[(N[(t1 / N[((-t1) - u), $MachinePrecision]), $MachinePrecision] * N[(v / t1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -6.8 \cdot 10^{-35}:\\
\;\;\;\;\frac{v}{u \cdot -2 - t1}\\
\mathbf{elif}\;t1 \leq 8.5 \cdot 10^{-105}:\\
\;\;\;\;\frac{t1}{-u} \cdot \frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{\left(-t1\right) - u} \cdot \frac{v}{t1}\\
\end{array}
\end{array}
if t1 < -6.8000000000000005e-35Initial program 60.3%
associate-/l*59.3%
distribute-lft-neg-out59.3%
distribute-rgt-neg-in59.3%
associate-/r*79.8%
distribute-neg-frac279.8%
Simplified79.8%
associate-*r/98.8%
+-commutative98.8%
distribute-neg-in98.8%
sub-neg98.8%
associate-*l/98.8%
clear-num98.8%
frac-2neg98.8%
frac-times93.0%
*-un-lft-identity93.0%
frac-2neg93.0%
sub-neg93.0%
distribute-neg-in93.0%
+-commutative93.0%
remove-double-neg93.0%
add-sqr-sqrt92.5%
sqrt-unprod54.3%
sqr-neg54.3%
sqrt-unprod0.0%
add-sqr-sqrt28.3%
add-sqr-sqrt25.5%
sqrt-unprod30.1%
Applied egg-rr93.0%
Taylor expanded in u around 0 81.1%
*-commutative81.1%
Simplified81.1%
Taylor expanded in v around 0 81.1%
mul-1-neg81.1%
+-commutative81.1%
*-commutative81.1%
fma-undefine81.1%
distribute-neg-frac281.1%
neg-sub081.1%
fma-undefine81.1%
associate--r+81.1%
neg-sub081.1%
distribute-rgt-neg-in81.1%
metadata-eval81.1%
Simplified81.1%
if -6.8000000000000005e-35 < t1 < 8.50000000000000038e-105Initial program 87.3%
times-frac97.0%
distribute-frac-neg97.0%
distribute-neg-frac297.0%
+-commutative97.0%
distribute-neg-in97.0%
unsub-neg97.0%
Simplified97.0%
Taylor expanded in t1 around 0 87.3%
Taylor expanded in t1 around 0 89.4%
associate-*r/89.4%
mul-1-neg89.4%
Simplified89.4%
if 8.50000000000000038e-105 < t1 Initial program 71.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 78.4%
Final simplification83.6%
(FPCore (u v t1) :precision binary64 (if (<= t1 -2.7e-42) (/ v (- (* u -2.0) t1)) (if (<= t1 1.5e-101) (* (/ t1 (- u)) (/ v u)) (/ v (- u t1)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -2.7e-42) {
tmp = v / ((u * -2.0) - t1);
} else if (t1 <= 1.5e-101) {
tmp = (t1 / -u) * (v / u);
} else {
tmp = v / (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) :: tmp
if (t1 <= (-2.7d-42)) then
tmp = v / ((u * (-2.0d0)) - t1)
else if (t1 <= 1.5d-101) then
tmp = (t1 / -u) * (v / u)
else
tmp = v / (u - t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -2.7e-42) {
tmp = v / ((u * -2.0) - t1);
} else if (t1 <= 1.5e-101) {
tmp = (t1 / -u) * (v / u);
} else {
tmp = v / (u - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -2.7e-42: tmp = v / ((u * -2.0) - t1) elif t1 <= 1.5e-101: tmp = (t1 / -u) * (v / u) else: tmp = v / (u - t1) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -2.7e-42) tmp = Float64(v / Float64(Float64(u * -2.0) - t1)); elseif (t1 <= 1.5e-101) tmp = Float64(Float64(t1 / Float64(-u)) * Float64(v / u)); else tmp = Float64(v / Float64(u - t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -2.7e-42) tmp = v / ((u * -2.0) - t1); elseif (t1 <= 1.5e-101) tmp = (t1 / -u) * (v / u); else tmp = v / (u - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -2.7e-42], N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 1.5e-101], N[(N[(t1 / (-u)), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2.7 \cdot 10^{-42}:\\
\;\;\;\;\frac{v}{u \cdot -2 - t1}\\
\mathbf{elif}\;t1 \leq 1.5 \cdot 10^{-101}:\\
\;\;\;\;\frac{t1}{-u} \cdot \frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u - t1}\\
\end{array}
\end{array}
if t1 < -2.69999999999999999e-42Initial program 60.3%
associate-/l*59.3%
distribute-lft-neg-out59.3%
distribute-rgt-neg-in59.3%
associate-/r*79.8%
distribute-neg-frac279.8%
Simplified79.8%
associate-*r/98.8%
+-commutative98.8%
distribute-neg-in98.8%
sub-neg98.8%
associate-*l/98.8%
clear-num98.8%
frac-2neg98.8%
frac-times93.0%
*-un-lft-identity93.0%
frac-2neg93.0%
sub-neg93.0%
distribute-neg-in93.0%
+-commutative93.0%
remove-double-neg93.0%
add-sqr-sqrt92.5%
sqrt-unprod54.3%
sqr-neg54.3%
sqrt-unprod0.0%
add-sqr-sqrt28.3%
add-sqr-sqrt25.5%
sqrt-unprod30.1%
Applied egg-rr93.0%
Taylor expanded in u around 0 81.1%
*-commutative81.1%
Simplified81.1%
Taylor expanded in v around 0 81.1%
mul-1-neg81.1%
+-commutative81.1%
*-commutative81.1%
fma-undefine81.1%
distribute-neg-frac281.1%
neg-sub081.1%
fma-undefine81.1%
associate--r+81.1%
neg-sub081.1%
distribute-rgt-neg-in81.1%
metadata-eval81.1%
Simplified81.1%
if -2.69999999999999999e-42 < t1 < 1.5000000000000002e-101Initial program 87.5%
times-frac97.1%
distribute-frac-neg97.1%
distribute-neg-frac297.1%
+-commutative97.1%
distribute-neg-in97.1%
unsub-neg97.1%
Simplified97.1%
Taylor expanded in t1 around 0 86.6%
Taylor expanded in t1 around 0 88.7%
associate-*r/88.7%
mul-1-neg88.7%
Simplified88.7%
if 1.5000000000000002e-101 < t1 Initial program 70.7%
associate-/l*72.5%
distribute-lft-neg-out72.5%
distribute-rgt-neg-in72.5%
associate-/r*86.9%
distribute-neg-frac286.9%
Simplified86.9%
distribute-frac-neg286.9%
distribute-rgt-neg-out86.9%
associate-/r*72.5%
distribute-lft-neg-out72.5%
associate-/l*70.7%
times-frac99.9%
frac-2neg99.9%
associate-*r/99.9%
add-sqr-sqrt0.0%
sqrt-unprod21.9%
sqr-neg21.9%
sqrt-unprod37.2%
add-sqr-sqrt37.2%
add-sqr-sqrt7.2%
sqrt-unprod69.8%
sqr-neg69.8%
sqrt-prod83.1%
add-sqr-sqrt99.9%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 77.8%
mul-1-neg77.8%
Simplified77.8%
add-sqr-sqrt37.7%
sqrt-unprod84.4%
sqr-neg84.4%
sqrt-unprod40.7%
add-sqr-sqrt78.0%
sub-neg78.0%
Applied egg-rr78.0%
Final simplification83.3%
(FPCore (u v t1) :precision binary64 (if (<= t1 -3.4e-38) (/ v (- (* u -2.0) t1)) (if (<= t1 3.6e-101) (* t1 (/ (/ v u) (- u))) (/ v (- u t1)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -3.4e-38) {
tmp = v / ((u * -2.0) - t1);
} else if (t1 <= 3.6e-101) {
tmp = t1 * ((v / u) / -u);
} else {
tmp = v / (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) :: tmp
if (t1 <= (-3.4d-38)) then
tmp = v / ((u * (-2.0d0)) - t1)
else if (t1 <= 3.6d-101) then
tmp = t1 * ((v / u) / -u)
else
tmp = v / (u - t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -3.4e-38) {
tmp = v / ((u * -2.0) - t1);
} else if (t1 <= 3.6e-101) {
tmp = t1 * ((v / u) / -u);
} else {
tmp = v / (u - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -3.4e-38: tmp = v / ((u * -2.0) - t1) elif t1 <= 3.6e-101: tmp = t1 * ((v / u) / -u) else: tmp = v / (u - t1) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -3.4e-38) tmp = Float64(v / Float64(Float64(u * -2.0) - t1)); elseif (t1 <= 3.6e-101) tmp = Float64(t1 * Float64(Float64(v / u) / Float64(-u))); else tmp = Float64(v / Float64(u - t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -3.4e-38) tmp = v / ((u * -2.0) - t1); elseif (t1 <= 3.6e-101) tmp = t1 * ((v / u) / -u); else tmp = v / (u - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -3.4e-38], N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 3.6e-101], N[(t1 * N[(N[(v / u), $MachinePrecision] / (-u)), $MachinePrecision]), $MachinePrecision], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -3.4 \cdot 10^{-38}:\\
\;\;\;\;\frac{v}{u \cdot -2 - t1}\\
\mathbf{elif}\;t1 \leq 3.6 \cdot 10^{-101}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u - t1}\\
\end{array}
\end{array}
if t1 < -3.4000000000000002e-38Initial program 60.3%
associate-/l*59.3%
distribute-lft-neg-out59.3%
distribute-rgt-neg-in59.3%
associate-/r*79.8%
distribute-neg-frac279.8%
Simplified79.8%
associate-*r/98.8%
+-commutative98.8%
distribute-neg-in98.8%
sub-neg98.8%
associate-*l/98.8%
clear-num98.8%
frac-2neg98.8%
frac-times93.0%
*-un-lft-identity93.0%
frac-2neg93.0%
sub-neg93.0%
distribute-neg-in93.0%
+-commutative93.0%
remove-double-neg93.0%
add-sqr-sqrt92.5%
sqrt-unprod54.3%
sqr-neg54.3%
sqrt-unprod0.0%
add-sqr-sqrt28.3%
add-sqr-sqrt25.5%
sqrt-unprod30.1%
Applied egg-rr93.0%
Taylor expanded in u around 0 81.1%
*-commutative81.1%
Simplified81.1%
Taylor expanded in v around 0 81.1%
mul-1-neg81.1%
+-commutative81.1%
*-commutative81.1%
fma-undefine81.1%
distribute-neg-frac281.1%
neg-sub081.1%
fma-undefine81.1%
associate--r+81.1%
neg-sub081.1%
distribute-rgt-neg-in81.1%
metadata-eval81.1%
Simplified81.1%
if -3.4000000000000002e-38 < t1 < 3.6e-101Initial program 87.5%
associate-/l*86.0%
distribute-lft-neg-out86.0%
distribute-rgt-neg-in86.0%
associate-/r*89.6%
distribute-neg-frac289.6%
Simplified89.6%
Taylor expanded in t1 around 0 81.8%
Taylor expanded in t1 around 0 83.9%
if 3.6e-101 < t1 Initial program 70.7%
associate-/l*72.5%
distribute-lft-neg-out72.5%
distribute-rgt-neg-in72.5%
associate-/r*86.9%
distribute-neg-frac286.9%
Simplified86.9%
distribute-frac-neg286.9%
distribute-rgt-neg-out86.9%
associate-/r*72.5%
distribute-lft-neg-out72.5%
associate-/l*70.7%
times-frac99.9%
frac-2neg99.9%
associate-*r/99.9%
add-sqr-sqrt0.0%
sqrt-unprod21.9%
sqr-neg21.9%
sqrt-unprod37.2%
add-sqr-sqrt37.2%
add-sqr-sqrt7.2%
sqrt-unprod69.8%
sqr-neg69.8%
sqrt-prod83.1%
add-sqr-sqrt99.9%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 77.8%
mul-1-neg77.8%
Simplified77.8%
add-sqr-sqrt37.7%
sqrt-unprod84.4%
sqr-neg84.4%
sqrt-unprod40.7%
add-sqr-sqrt78.0%
sub-neg78.0%
Applied egg-rr78.0%
Final simplification81.4%
(FPCore (u v t1) :precision binary64 (if (or (<= u -9.5e+16) (not (<= u 7.8e+190))) (* v (/ (/ t1 u) u)) (/ v (- (* u -2.0) t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -9.5e+16) || !(u <= 7.8e+190)) {
tmp = v * ((t1 / u) / u);
} else {
tmp = v / ((u * -2.0) - 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.5d+16)) .or. (.not. (u <= 7.8d+190))) then
tmp = v * ((t1 / u) / u)
else
tmp = v / ((u * (-2.0d0)) - t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -9.5e+16) || !(u <= 7.8e+190)) {
tmp = v * ((t1 / u) / u);
} else {
tmp = v / ((u * -2.0) - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -9.5e+16) or not (u <= 7.8e+190): tmp = v * ((t1 / u) / u) else: tmp = v / ((u * -2.0) - t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -9.5e+16) || !(u <= 7.8e+190)) tmp = Float64(v * Float64(Float64(t1 / u) / u)); else tmp = Float64(v / Float64(Float64(u * -2.0) - t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -9.5e+16) || ~((u <= 7.8e+190))) tmp = v * ((t1 / u) / u); else tmp = v / ((u * -2.0) - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -9.5e+16], N[Not[LessEqual[u, 7.8e+190]], $MachinePrecision]], N[(v * N[(N[(t1 / u), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision], N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -9.5 \cdot 10^{+16} \lor \neg \left(u \leq 7.8 \cdot 10^{+190}\right):\\
\;\;\;\;v \cdot \frac{\frac{t1}{u}}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u \cdot -2 - t1}\\
\end{array}
\end{array}
if u < -9.5e16 or 7.8000000000000007e190 < u Initial program 81.7%
associate-/l*83.2%
distribute-lft-neg-out83.2%
distribute-rgt-neg-in83.2%
associate-/r*90.6%
distribute-neg-frac290.6%
Simplified90.6%
distribute-frac-neg290.6%
distribute-rgt-neg-out90.6%
associate-/r*83.2%
distribute-lft-neg-out83.2%
associate-/l*81.7%
times-frac99.9%
frac-2neg99.9%
associate-*r/99.9%
add-sqr-sqrt53.2%
sqrt-unprod70.8%
sqr-neg70.8%
sqrt-unprod30.6%
add-sqr-sqrt65.8%
add-sqr-sqrt41.0%
sqrt-unprod68.2%
sqr-neg68.2%
sqrt-prod34.3%
add-sqr-sqrt99.9%
Applied egg-rr99.9%
Taylor expanded in t1 around 0 91.4%
Taylor expanded in t1 around 0 89.9%
*-commutative89.9%
associate-/l*80.6%
add-sqr-sqrt34.3%
sqrt-unprod60.1%
sqr-neg60.1%
sqrt-unprod32.3%
add-sqr-sqrt62.2%
Applied egg-rr62.2%
if -9.5e16 < u < 7.8000000000000007e190Initial program 70.0%
associate-/l*68.6%
distribute-lft-neg-out68.6%
distribute-rgt-neg-in68.6%
associate-/r*83.1%
distribute-neg-frac283.1%
Simplified83.1%
associate-*r/96.5%
+-commutative96.5%
distribute-neg-in96.5%
sub-neg96.5%
associate-*l/97.6%
clear-num97.6%
frac-2neg97.6%
frac-times98.2%
*-un-lft-identity98.2%
frac-2neg98.2%
sub-neg98.2%
distribute-neg-in98.2%
+-commutative98.2%
remove-double-neg98.2%
add-sqr-sqrt52.1%
sqrt-unprod39.9%
sqr-neg39.9%
sqrt-unprod13.4%
add-sqr-sqrt23.6%
add-sqr-sqrt9.5%
sqrt-unprod46.4%
Applied egg-rr98.2%
Taylor expanded in u around 0 72.2%
*-commutative72.2%
Simplified72.2%
Taylor expanded in v around 0 72.2%
mul-1-neg72.2%
+-commutative72.2%
*-commutative72.2%
fma-undefine72.2%
distribute-neg-frac272.2%
neg-sub072.2%
fma-undefine72.2%
associate--r+72.2%
neg-sub072.2%
distribute-rgt-neg-in72.2%
metadata-eval72.2%
Simplified72.2%
Final simplification68.7%
(FPCore (u v t1) :precision binary64 (if (or (<= u -9.5e+16) (not (<= u 2e+192))) (* v (/ (/ t1 u) u)) (/ v (- (- t1) u))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -9.5e+16) || !(u <= 2e+192)) {
tmp = v * ((t1 / u) / u);
} else {
tmp = v / (-t1 - u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-9.5d+16)) .or. (.not. (u <= 2d+192))) then
tmp = v * ((t1 / u) / u)
else
tmp = v / (-t1 - u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -9.5e+16) || !(u <= 2e+192)) {
tmp = v * ((t1 / u) / u);
} else {
tmp = v / (-t1 - u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -9.5e+16) or not (u <= 2e+192): tmp = v * ((t1 / u) / u) else: tmp = v / (-t1 - u) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -9.5e+16) || !(u <= 2e+192)) tmp = Float64(v * Float64(Float64(t1 / u) / u)); else tmp = Float64(v / Float64(Float64(-t1) - u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -9.5e+16) || ~((u <= 2e+192))) tmp = v * ((t1 / u) / u); else tmp = v / (-t1 - u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -9.5e+16], N[Not[LessEqual[u, 2e+192]], $MachinePrecision]], N[(v * N[(N[(t1 / u), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision], N[(v / N[((-t1) - u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -9.5 \cdot 10^{+16} \lor \neg \left(u \leq 2 \cdot 10^{+192}\right):\\
\;\;\;\;v \cdot \frac{\frac{t1}{u}}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{\left(-t1\right) - u}\\
\end{array}
\end{array}
if u < -9.5e16 or 2.00000000000000008e192 < u Initial program 81.7%
associate-/l*83.2%
distribute-lft-neg-out83.2%
distribute-rgt-neg-in83.2%
associate-/r*90.6%
distribute-neg-frac290.6%
Simplified90.6%
distribute-frac-neg290.6%
distribute-rgt-neg-out90.6%
associate-/r*83.2%
distribute-lft-neg-out83.2%
associate-/l*81.7%
times-frac99.9%
frac-2neg99.9%
associate-*r/99.9%
add-sqr-sqrt53.2%
sqrt-unprod70.8%
sqr-neg70.8%
sqrt-unprod30.6%
add-sqr-sqrt65.8%
add-sqr-sqrt41.0%
sqrt-unprod68.2%
sqr-neg68.2%
sqrt-prod34.3%
add-sqr-sqrt99.9%
Applied egg-rr99.9%
Taylor expanded in t1 around 0 91.4%
Taylor expanded in t1 around 0 89.9%
*-commutative89.9%
associate-/l*80.6%
add-sqr-sqrt34.3%
sqrt-unprod60.1%
sqr-neg60.1%
sqrt-unprod32.3%
add-sqr-sqrt62.2%
Applied egg-rr62.2%
if -9.5e16 < u < 2.00000000000000008e192Initial program 70.0%
associate-/l*68.6%
distribute-lft-neg-out68.6%
distribute-rgt-neg-in68.6%
associate-/r*83.1%
distribute-neg-frac283.1%
Simplified83.1%
distribute-frac-neg283.1%
distribute-rgt-neg-out83.1%
associate-/r*68.6%
distribute-lft-neg-out68.6%
associate-/l*70.0%
times-frac97.6%
frac-2neg97.6%
associate-*r/97.6%
add-sqr-sqrt52.7%
sqrt-unprod40.5%
sqr-neg40.5%
sqrt-unprod13.5%
add-sqr-sqrt23.6%
add-sqr-sqrt9.6%
sqrt-unprod46.4%
sqr-neg46.4%
sqrt-prod48.0%
add-sqr-sqrt97.6%
Applied egg-rr97.6%
Taylor expanded in t1 around inf 72.1%
mul-1-neg72.1%
Simplified72.1%
Final simplification68.6%
(FPCore (u v t1) :precision binary64 (if (<= t1 -2.75e+146) (/ v (- u t1)) (* t1 (/ (/ v (- (- t1) u)) (+ t1 u)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -2.75e+146) {
tmp = v / (u - t1);
} else {
tmp = t1 * ((v / (-t1 - u)) / (t1 + u));
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (t1 <= (-2.75d+146)) then
tmp = v / (u - t1)
else
tmp = t1 * ((v / (-t1 - u)) / (t1 + u))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -2.75e+146) {
tmp = v / (u - t1);
} else {
tmp = t1 * ((v / (-t1 - u)) / (t1 + u));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -2.75e+146: tmp = v / (u - t1) else: tmp = t1 * ((v / (-t1 - u)) / (t1 + u)) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -2.75e+146) tmp = Float64(v / Float64(u - t1)); else tmp = Float64(t1 * Float64(Float64(v / Float64(Float64(-t1) - u)) / Float64(t1 + u))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -2.75e+146) tmp = v / (u - t1); else tmp = t1 * ((v / (-t1 - u)) / (t1 + u)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -2.75e+146], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision], N[(t1 * N[(N[(v / N[((-t1) - u), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2.75 \cdot 10^{+146}:\\
\;\;\;\;\frac{v}{u - t1}\\
\mathbf{else}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{\left(-t1\right) - u}}{t1 + u}\\
\end{array}
\end{array}
if t1 < -2.7500000000000002e146Initial program 41.7%
associate-/l*41.1%
distribute-lft-neg-out41.1%
distribute-rgt-neg-in41.1%
associate-/r*68.7%
distribute-neg-frac268.7%
Simplified68.7%
distribute-frac-neg268.7%
distribute-rgt-neg-out68.7%
associate-/r*41.1%
distribute-lft-neg-out41.1%
associate-/l*41.7%
times-frac100.0%
frac-2neg100.0%
associate-*r/100.0%
add-sqr-sqrt99.6%
sqrt-unprod10.6%
sqr-neg10.6%
sqrt-unprod0.0%
add-sqr-sqrt39.4%
add-sqr-sqrt36.5%
sqrt-unprod40.4%
sqr-neg40.4%
sqrt-prod5.7%
add-sqr-sqrt100.0%
Applied egg-rr100.0%
Taylor expanded in t1 around inf 97.2%
mul-1-neg97.2%
Simplified97.2%
add-sqr-sqrt42.9%
sqrt-unprod89.6%
sqr-neg89.6%
sqrt-unprod54.3%
add-sqr-sqrt97.3%
sub-neg97.3%
Applied egg-rr97.3%
if -2.7500000000000002e146 < t1 Initial program 79.3%
associate-/l*78.9%
distribute-lft-neg-out78.9%
distribute-rgt-neg-in78.9%
associate-/r*88.4%
distribute-neg-frac288.4%
Simplified88.4%
Final simplification89.6%
(FPCore (u v t1) :precision binary64 (if (or (<= u -3.6e+158) (not (<= u 1.3e+221))) (/ 1.0 (/ u v)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.6e+158) || !(u <= 1.3e+221)) {
tmp = 1.0 / (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 <= (-3.6d+158)) .or. (.not. (u <= 1.3d+221))) then
tmp = 1.0d0 / (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 <= -3.6e+158) || !(u <= 1.3e+221)) {
tmp = 1.0 / (u / v);
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -3.6e+158) or not (u <= 1.3e+221): tmp = 1.0 / (u / v) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -3.6e+158) || !(u <= 1.3e+221)) tmp = Float64(1.0 / 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 <= -3.6e+158) || ~((u <= 1.3e+221))) tmp = 1.0 / (u / v); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -3.6e+158], N[Not[LessEqual[u, 1.3e+221]], $MachinePrecision]], N[(1.0 / N[(u / v), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.6 \cdot 10^{+158} \lor \neg \left(u \leq 1.3 \cdot 10^{+221}\right):\\
\;\;\;\;\frac{1}{\frac{u}{v}}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -3.59999999999999988e158 or 1.30000000000000002e221 < u Initial program 81.3%
associate-/l*81.9%
distribute-lft-neg-out81.9%
distribute-rgt-neg-in81.9%
associate-/r*89.4%
distribute-neg-frac289.4%
Simplified89.4%
distribute-frac-neg289.4%
distribute-rgt-neg-out89.4%
associate-/r*81.9%
distribute-lft-neg-out81.9%
associate-/l*81.3%
times-frac99.9%
frac-2neg99.9%
associate-*r/99.9%
add-sqr-sqrt49.8%
sqrt-unprod82.9%
sqr-neg82.9%
sqrt-unprod42.6%
add-sqr-sqrt81.6%
add-sqr-sqrt46.5%
sqrt-unprod81.9%
sqr-neg81.9%
sqrt-prod44.1%
add-sqr-sqrt99.9%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 45.9%
mul-1-neg45.9%
Simplified45.9%
clear-num47.3%
inv-pow47.3%
add-sqr-sqrt26.0%
sqrt-unprod45.2%
sqr-neg45.2%
sqrt-unprod21.6%
add-sqr-sqrt45.7%
Applied egg-rr45.7%
unpow-145.7%
Simplified45.7%
Taylor expanded in t1 around 0 45.7%
if -3.59999999999999988e158 < u < 1.30000000000000002e221Initial program 72.3%
associate-/l*71.6%
distribute-lft-neg-out71.6%
distribute-rgt-neg-in71.6%
associate-/r*84.8%
distribute-neg-frac284.8%
Simplified84.8%
Taylor expanded in t1 around inf 63.3%
associate-*r/63.3%
neg-mul-163.3%
Simplified63.3%
Final simplification59.7%
(FPCore (u v t1) :precision binary64 (if (or (<= u -3.3e+158) (not (<= u 4.8e+213))) (/ v u) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.3e+158) || !(u <= 4.8e+213)) {
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 <= (-3.3d+158)) .or. (.not. (u <= 4.8d+213))) 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 <= -3.3e+158) || !(u <= 4.8e+213)) {
tmp = v / u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -3.3e+158) or not (u <= 4.8e+213): tmp = v / u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -3.3e+158) || !(u <= 4.8e+213)) 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 <= -3.3e+158) || ~((u <= 4.8e+213))) tmp = v / u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -3.3e+158], N[Not[LessEqual[u, 4.8e+213]], $MachinePrecision]], N[(v / u), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.3 \cdot 10^{+158} \lor \neg \left(u \leq 4.8 \cdot 10^{+213}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -3.30000000000000017e158 or 4.8e213 < u Initial program 81.3%
associate-/l*81.9%
distribute-lft-neg-out81.9%
distribute-rgt-neg-in81.9%
associate-/r*89.4%
distribute-neg-frac289.4%
Simplified89.4%
distribute-frac-neg289.4%
distribute-rgt-neg-out89.4%
associate-/r*81.9%
distribute-lft-neg-out81.9%
associate-/l*81.3%
times-frac99.9%
frac-2neg99.9%
associate-*r/99.9%
add-sqr-sqrt49.8%
sqrt-unprod82.9%
sqr-neg82.9%
sqrt-unprod42.6%
add-sqr-sqrt81.6%
add-sqr-sqrt46.5%
sqrt-unprod81.9%
sqr-neg81.9%
sqrt-prod44.1%
add-sqr-sqrt99.9%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 45.9%
mul-1-neg45.9%
Simplified45.9%
clear-num47.3%
inv-pow47.3%
add-sqr-sqrt26.0%
sqrt-unprod45.2%
sqr-neg45.2%
sqrt-unprod21.6%
add-sqr-sqrt45.7%
Applied egg-rr45.7%
unpow-145.7%
Simplified45.7%
Taylor expanded in t1 around 0 44.3%
if -3.30000000000000017e158 < u < 4.8e213Initial program 72.3%
associate-/l*71.6%
distribute-lft-neg-out71.6%
distribute-rgt-neg-in71.6%
associate-/r*84.8%
distribute-neg-frac284.8%
Simplified84.8%
Taylor expanded in t1 around inf 63.3%
associate-*r/63.3%
neg-mul-163.3%
Simplified63.3%
Final simplification59.5%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -4.3e+82) (not (<= t1 1.4e+91))) (/ v t1) (/ v (- u))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -4.3e+82) || !(t1 <= 1.4e+91)) {
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 <= (-4.3d+82)) .or. (.not. (t1 <= 1.4d+91))) 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 <= -4.3e+82) || !(t1 <= 1.4e+91)) {
tmp = v / t1;
} else {
tmp = v / -u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -4.3e+82) or not (t1 <= 1.4e+91): tmp = v / t1 else: tmp = v / -u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -4.3e+82) || !(t1 <= 1.4e+91)) tmp = Float64(v / t1); else tmp = Float64(v / Float64(-u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -4.3e+82) || ~((t1 <= 1.4e+91))) tmp = v / t1; else tmp = v / -u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -4.3e+82], N[Not[LessEqual[t1, 1.4e+91]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / (-u)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -4.3 \cdot 10^{+82} \lor \neg \left(t1 \leq 1.4 \cdot 10^{+91}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-u}\\
\end{array}
\end{array}
if t1 < -4.30000000000000015e82 or 1.3999999999999999e91 < t1 Initial program 48.5%
associate-/l*49.9%
distribute-lft-neg-out49.9%
distribute-rgt-neg-in49.9%
associate-/r*75.6%
distribute-neg-frac275.6%
Simplified75.6%
Taylor expanded in t1 around inf 87.1%
associate-*r/87.1%
neg-mul-187.1%
Simplified87.1%
add-sqr-sqrt41.5%
sqrt-unprod47.3%
sqr-neg47.3%
sqrt-unprod13.7%
add-sqr-sqrt35.3%
div-inv35.3%
Applied egg-rr35.3%
associate-*r/35.3%
*-rgt-identity35.3%
Simplified35.3%
if -4.30000000000000015e82 < t1 < 1.3999999999999999e91Initial program 87.3%
associate-/l*85.9%
distribute-lft-neg-out85.9%
distribute-rgt-neg-in85.9%
associate-/r*90.9%
distribute-neg-frac290.9%
Simplified90.9%
Taylor expanded in t1 around 0 67.3%
Taylor expanded in t1 around inf 19.9%
neg-mul-119.9%
distribute-neg-frac219.9%
Simplified19.9%
Final simplification25.2%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -2.2e+82) (not (<= t1 6.2e+91))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -2.2e+82) || !(t1 <= 6.2e+91)) {
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 <= (-2.2d+82)) .or. (.not. (t1 <= 6.2d+91))) 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 <= -2.2e+82) || !(t1 <= 6.2e+91)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -2.2e+82) or not (t1 <= 6.2e+91): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -2.2e+82) || !(t1 <= 6.2e+91)) 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 <= -2.2e+82) || ~((t1 <= 6.2e+91))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -2.2e+82], N[Not[LessEqual[t1, 6.2e+91]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2.2 \cdot 10^{+82} \lor \neg \left(t1 \leq 6.2 \cdot 10^{+91}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -2.2000000000000001e82 or 6.19999999999999995e91 < t1 Initial program 47.9%
associate-/l*49.4%
distribute-lft-neg-out49.4%
distribute-rgt-neg-in49.4%
associate-/r*75.3%
distribute-neg-frac275.3%
Simplified75.3%
Taylor expanded in t1 around inf 86.9%
associate-*r/86.9%
neg-mul-186.9%
Simplified86.9%
add-sqr-sqrt40.8%
sqrt-unprod46.7%
sqr-neg46.7%
sqrt-unprod13.9%
add-sqr-sqrt35.7%
div-inv35.7%
Applied egg-rr35.7%
associate-*r/35.7%
*-rgt-identity35.7%
Simplified35.7%
if -2.2000000000000001e82 < t1 < 6.19999999999999995e91Initial program 87.4%
associate-/l*86.0%
distribute-lft-neg-out86.0%
distribute-rgt-neg-in86.0%
associate-/r*91.0%
distribute-neg-frac291.0%
Simplified91.0%
distribute-frac-neg291.0%
distribute-rgt-neg-out91.0%
associate-/r*86.0%
distribute-lft-neg-out86.0%
associate-/l*87.4%
times-frac97.7%
frac-2neg97.7%
associate-*r/97.7%
add-sqr-sqrt51.5%
sqrt-unprod64.6%
sqr-neg64.6%
sqrt-unprod20.1%
add-sqr-sqrt38.6%
add-sqr-sqrt21.6%
sqrt-unprod58.9%
sqr-neg58.9%
sqrt-prod41.6%
add-sqr-sqrt97.7%
Applied egg-rr97.7%
Taylor expanded in t1 around inf 47.1%
mul-1-neg47.1%
Simplified47.1%
clear-num47.6%
inv-pow47.6%
add-sqr-sqrt24.3%
sqrt-unprod35.6%
sqr-neg35.6%
sqrt-unprod10.2%
add-sqr-sqrt18.4%
Applied egg-rr18.4%
unpow-118.4%
Simplified18.4%
Taylor expanded in t1 around 0 18.9%
Final simplification24.5%
(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(t1 / Float64(t1 + u)) * Float64(v / Float64(Float64(-t1) - u))) end
function tmp = code(u, v, t1) tmp = (t1 / (t1 + u)) * (v / (-t1 - u)); end
code[u_, v_, t1_] := N[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(v / N[((-t1) - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{t1}{t1 + u} \cdot \frac{v}{\left(-t1\right) - u}
\end{array}
Initial program 74.1%
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 (- (- t1) u)))
double code(double u, double v, double t1) {
return v / (-t1 - u);
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = v / (-t1 - u)
end function
public static double code(double u, double v, double t1) {
return v / (-t1 - u);
}
def code(u, v, t1): return v / (-t1 - u)
function code(u, v, t1) return Float64(v / Float64(Float64(-t1) - u)) end
function tmp = code(u, v, t1) tmp = v / (-t1 - u); end
code[u_, v_, t1_] := N[(v / N[((-t1) - u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{\left(-t1\right) - u}
\end{array}
Initial program 74.1%
associate-/l*73.7%
distribute-lft-neg-out73.7%
distribute-rgt-neg-in73.7%
associate-/r*85.7%
distribute-neg-frac285.7%
Simplified85.7%
distribute-frac-neg285.7%
distribute-rgt-neg-out85.7%
associate-/r*73.7%
distribute-lft-neg-out73.7%
associate-/l*74.1%
times-frac98.4%
frac-2neg98.4%
associate-*r/98.4%
add-sqr-sqrt52.8%
sqrt-unprod51.1%
sqr-neg51.1%
sqrt-unprod19.5%
add-sqr-sqrt38.4%
add-sqr-sqrt20.6%
sqrt-unprod54.1%
sqr-neg54.1%
sqrt-prod43.2%
add-sqr-sqrt98.4%
Applied egg-rr98.4%
Taylor expanded in t1 around inf 60.8%
mul-1-neg60.8%
Simplified60.8%
Final simplification60.8%
(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 74.1%
associate-/l*73.7%
distribute-lft-neg-out73.7%
distribute-rgt-neg-in73.7%
associate-/r*85.7%
distribute-neg-frac285.7%
Simplified85.7%
Taylor expanded in t1 around inf 53.0%
associate-*r/53.0%
neg-mul-153.0%
Simplified53.0%
add-sqr-sqrt26.4%
sqrt-unprod35.4%
sqr-neg35.4%
sqrt-unprod5.9%
add-sqr-sqrt14.9%
div-inv14.9%
Applied egg-rr14.9%
associate-*r/14.9%
*-rgt-identity14.9%
Simplified14.9%
herbie shell --seed 2024144
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))