
(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 (* (/ (- t1) (+ t1 u)) (/ v (+ t1 u))))
double code(double u, double v, double t1) {
return (-t1 / (t1 + u)) * (v / (t1 + u));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-t1 / (t1 + u)) * (v / (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (-t1 / (t1 + u)) * (v / (t1 + u));
}
def code(u, v, t1): return (-t1 / (t1 + u)) * (v / (t1 + u))
function code(u, v, t1) return Float64(Float64(Float64(-t1) / Float64(t1 + u)) * Float64(v / Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (-t1 / (t1 + u)) * (v / (t1 + u)); end
code[u_, v_, t1_] := N[(N[((-t1) / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{-t1}{t1 + u} \cdot \frac{v}{t1 + u}
\end{array}
Initial program 75.7%
times-frac98.6%
distribute-frac-neg98.6%
distribute-neg-frac298.6%
+-commutative98.6%
distribute-neg-in98.6%
unsub-neg98.6%
Simplified98.6%
Final simplification98.6%
(FPCore (u v t1) :precision binary64 (if (<= u -12200.0) (/ (/ v (- t1 u)) (/ u t1)) (if (<= u 7.5e-5) (/ (- v) t1) (* (/ v (+ t1 u)) (/ t1 (- u))))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -12200.0) {
tmp = (v / (t1 - u)) / (u / t1);
} else if (u <= 7.5e-5) {
tmp = -v / t1;
} else {
tmp = (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 (u <= (-12200.0d0)) then
tmp = (v / (t1 - u)) / (u / t1)
else if (u <= 7.5d-5) then
tmp = -v / t1
else
tmp = (v / (t1 + u)) * (t1 / -u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -12200.0) {
tmp = (v / (t1 - u)) / (u / t1);
} else if (u <= 7.5e-5) {
tmp = -v / t1;
} else {
tmp = (v / (t1 + u)) * (t1 / -u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -12200.0: tmp = (v / (t1 - u)) / (u / t1) elif u <= 7.5e-5: tmp = -v / t1 else: tmp = (v / (t1 + u)) * (t1 / -u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -12200.0) tmp = Float64(Float64(v / Float64(t1 - u)) / Float64(u / t1)); elseif (u <= 7.5e-5) tmp = Float64(Float64(-v) / t1); else tmp = Float64(Float64(v / Float64(t1 + u)) * Float64(t1 / Float64(-u))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -12200.0) tmp = (v / (t1 - u)) / (u / t1); elseif (u <= 7.5e-5) tmp = -v / t1; else tmp = (v / (t1 + u)) * (t1 / -u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -12200.0], N[(N[(v / N[(t1 - u), $MachinePrecision]), $MachinePrecision] / N[(u / t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 7.5e-5], N[((-v) / t1), $MachinePrecision], N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(t1 / (-u)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -12200:\\
\;\;\;\;\frac{\frac{v}{t1 - u}}{\frac{u}{t1}}\\
\mathbf{elif}\;u \leq 7.5 \cdot 10^{-5}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{t1 + u} \cdot \frac{t1}{-u}\\
\end{array}
\end{array}
if u < -12200Initial program 87.0%
times-frac98.6%
distribute-frac-neg98.6%
distribute-neg-frac298.6%
+-commutative98.6%
distribute-neg-in98.6%
unsub-neg98.6%
Simplified98.6%
Taylor expanded in t1 around 0 91.5%
associate-*r/91.5%
mul-1-neg91.5%
Simplified91.5%
*-commutative91.5%
clear-num91.5%
un-div-inv91.5%
frac-2neg91.5%
add-sqr-sqrt50.0%
sqrt-unprod69.7%
sqr-neg69.7%
sqrt-unprod31.7%
add-sqr-sqrt67.2%
distribute-neg-in67.2%
add-sqr-sqrt34.5%
sqrt-unprod67.2%
sqr-neg67.2%
sqrt-unprod32.5%
add-sqr-sqrt67.1%
sub-neg67.1%
add-sqr-sqrt34.6%
sqrt-unprod68.2%
sqr-neg68.2%
sqrt-unprod39.9%
add-sqr-sqrt91.6%
Applied egg-rr91.6%
if -12200 < u < 7.49999999999999934e-5Initial program 66.6%
associate-*l/76.5%
*-commutative76.5%
Simplified76.5%
Taylor expanded in t1 around inf 77.4%
associate-*r/77.4%
neg-mul-177.4%
Simplified77.4%
if 7.49999999999999934e-5 < u Initial program 82.6%
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 92.6%
associate-*r/92.6%
mul-1-neg92.6%
Simplified92.6%
Final simplification84.7%
(FPCore (u v t1) :precision binary64 (if (or (<= u -2750.0) (not (<= u 6e-6))) (/ (/ v (- t1 u)) (/ u t1)) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -2750.0) || !(u <= 6e-6)) {
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 <= (-2750.0d0)) .or. (.not. (u <= 6d-6))) 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 <= -2750.0) || !(u <= 6e-6)) {
tmp = (v / (t1 - u)) / (u / t1);
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -2750.0) or not (u <= 6e-6): tmp = (v / (t1 - u)) / (u / t1) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -2750.0) || !(u <= 6e-6)) tmp = Float64(Float64(v / Float64(t1 - u)) / 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 <= -2750.0) || ~((u <= 6e-6))) tmp = (v / (t1 - u)) / (u / t1); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2750.0], N[Not[LessEqual[u, 6e-6]], $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 -2750 \lor \neg \left(u \leq 6 \cdot 10^{-6}\right):\\
\;\;\;\;\frac{\frac{v}{t1 - u}}{\frac{u}{t1}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -2750 or 6.0000000000000002e-6 < u Initial program 84.9%
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 92.0%
associate-*r/92.0%
mul-1-neg92.0%
Simplified92.0%
*-commutative92.0%
clear-num91.5%
un-div-inv91.5%
frac-2neg91.5%
add-sqr-sqrt47.5%
sqrt-unprod65.0%
sqr-neg65.0%
sqrt-unprod30.6%
add-sqr-sqrt63.5%
distribute-neg-in63.5%
add-sqr-sqrt30.6%
sqrt-unprod63.7%
sqr-neg63.7%
sqrt-unprod32.9%
add-sqr-sqrt63.5%
sub-neg63.5%
add-sqr-sqrt30.7%
sqrt-unprod65.1%
sqr-neg65.1%
sqrt-unprod45.5%
add-sqr-sqrt91.4%
Applied egg-rr91.4%
if -2750 < u < 6.0000000000000002e-6Initial program 66.6%
associate-*l/76.5%
*-commutative76.5%
Simplified76.5%
Taylor expanded in t1 around inf 77.4%
associate-*r/77.4%
neg-mul-177.4%
Simplified77.4%
Final simplification84.4%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.1e-5) (not (<= u 0.0205))) (/ t1 (* u (/ (- t1 u) v))) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.1e-5) || !(u <= 0.0205)) {
tmp = t1 / (u * ((t1 - 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 <= (-1.1d-5)) .or. (.not. (u <= 0.0205d0))) then
tmp = t1 / (u * ((t1 - 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 <= -1.1e-5) || !(u <= 0.0205)) {
tmp = t1 / (u * ((t1 - u) / v));
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.1e-5) or not (u <= 0.0205): tmp = t1 / (u * ((t1 - u) / v)) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.1e-5) || !(u <= 0.0205)) tmp = Float64(t1 / Float64(u * Float64(Float64(t1 - u) / v))); else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -1.1e-5) || ~((u <= 0.0205))) tmp = t1 / (u * ((t1 - u) / v)); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.1e-5], N[Not[LessEqual[u, 0.0205]], $MachinePrecision]], N[(t1 / N[(u * N[(N[(t1 - u), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.1 \cdot 10^{-5} \lor \neg \left(u \leq 0.0205\right):\\
\;\;\;\;\frac{t1}{u \cdot \frac{t1 - u}{v}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -1.1e-5 or 0.0205000000000000009 < u Initial program 84.9%
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 92.0%
associate-*r/92.0%
mul-1-neg92.0%
Simplified92.0%
*-commutative92.0%
clear-num91.9%
frac-times90.3%
*-un-lft-identity90.3%
add-sqr-sqrt44.9%
sqrt-unprod68.5%
sqr-neg68.5%
sqrt-unprod32.9%
add-sqr-sqrt63.6%
frac-2neg63.6%
distribute-neg-in63.6%
add-sqr-sqrt30.7%
sqrt-unprod63.7%
sqr-neg63.7%
sqrt-unprod33.0%
add-sqr-sqrt63.7%
sub-neg63.7%
add-sqr-sqrt33.0%
sqrt-unprod60.7%
sqr-neg60.7%
sqrt-unprod42.9%
add-sqr-sqrt90.2%
Applied egg-rr90.2%
if -1.1e-5 < u < 0.0205000000000000009Initial program 66.6%
associate-*l/76.5%
*-commutative76.5%
Simplified76.5%
Taylor expanded in t1 around inf 77.4%
associate-*r/77.4%
neg-mul-177.4%
Simplified77.4%
Final simplification83.7%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.7) (not (<= u 4800000000000.0))) (* (/ t1 (- u)) (/ v u)) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.7) || !(u <= 4800000000000.0)) {
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 <= (-1.7d0)) .or. (.not. (u <= 4800000000000.0d0))) 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 <= -1.7) || !(u <= 4800000000000.0)) {
tmp = (t1 / -u) * (v / u);
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.7) or not (u <= 4800000000000.0): tmp = (t1 / -u) * (v / u) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.7) || !(u <= 4800000000000.0)) 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 <= -1.7) || ~((u <= 4800000000000.0))) tmp = (t1 / -u) * (v / u); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.7], N[Not[LessEqual[u, 4800000000000.0]], $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 -1.7 \lor \neg \left(u \leq 4800000000000\right):\\
\;\;\;\;\frac{t1}{-u} \cdot \frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -1.69999999999999996 or 4.8e12 < u Initial program 84.5%
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 91.8%
associate-*r/91.8%
mul-1-neg91.8%
Simplified91.8%
Taylor expanded in t1 around 0 90.2%
if -1.69999999999999996 < u < 4.8e12Initial program 67.6%
associate-*l/77.2%
*-commutative77.2%
Simplified77.2%
Taylor expanded in t1 around inf 76.6%
associate-*r/76.6%
neg-mul-176.6%
Simplified76.6%
Final simplification83.1%
(FPCore (u v t1) :precision binary64 (if (or (<= u -4.9e+30) (not (<= u 8200000000000.0))) (/ v (* u (/ u t1))) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -4.9e+30) || !(u <= 8200000000000.0)) {
tmp = v / (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 <= (-4.9d+30)) .or. (.not. (u <= 8200000000000.0d0))) then
tmp = v / (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 <= -4.9e+30) || !(u <= 8200000000000.0)) {
tmp = v / (u * (u / t1));
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -4.9e+30) or not (u <= 8200000000000.0): tmp = v / (u * (u / t1)) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -4.9e+30) || !(u <= 8200000000000.0)) tmp = Float64(v / Float64(u * 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 <= -4.9e+30) || ~((u <= 8200000000000.0))) tmp = v / (u * (u / t1)); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -4.9e+30], N[Not[LessEqual[u, 8200000000000.0]], $MachinePrecision]], N[(v / N[(u * N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -4.9 \cdot 10^{+30} \lor \neg \left(u \leq 8200000000000\right):\\
\;\;\;\;\frac{v}{u \cdot \frac{u}{t1}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -4.89999999999999984e30 or 8.2e12 < u Initial program 83.8%
times-frac98.6%
distribute-frac-neg98.6%
distribute-neg-frac298.6%
+-commutative98.6%
distribute-neg-in98.6%
unsub-neg98.6%
Simplified98.6%
Taylor expanded in t1 around 0 92.3%
associate-*r/92.3%
mul-1-neg92.3%
Simplified92.3%
Taylor expanded in t1 around 0 91.4%
clear-num90.8%
frac-times81.5%
*-un-lft-identity81.5%
add-sqr-sqrt41.0%
sqrt-unprod67.3%
sqr-neg67.3%
sqrt-unprod33.7%
add-sqr-sqrt63.2%
Applied egg-rr63.2%
if -4.89999999999999984e30 < u < 8.2e12Initial program 68.7%
associate-*l/78.0%
*-commutative78.0%
Simplified78.0%
Taylor expanded in t1 around inf 75.3%
associate-*r/75.3%
neg-mul-175.3%
Simplified75.3%
Final simplification69.8%
(FPCore (u v t1) :precision binary64 (if (<= v 3.9e+180) (/ v (* (+ t1 u) (- -1.0 (/ u t1)))) (* (- t1) (/ (/ v (+ t1 u)) (+ t1 u)))))
double code(double u, double v, double t1) {
double tmp;
if (v <= 3.9e+180) {
tmp = v / ((t1 + u) * (-1.0 - (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 (v <= 3.9d+180) then
tmp = v / ((t1 + u) * ((-1.0d0) - (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 (v <= 3.9e+180) {
tmp = v / ((t1 + u) * (-1.0 - (u / t1)));
} else {
tmp = -t1 * ((v / (t1 + u)) / (t1 + u));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if v <= 3.9e+180: tmp = v / ((t1 + u) * (-1.0 - (u / t1))) else: tmp = -t1 * ((v / (t1 + u)) / (t1 + u)) return tmp
function code(u, v, t1) tmp = 0.0 if (v <= 3.9e+180) tmp = Float64(v / Float64(Float64(t1 + u) * Float64(-1.0 - Float64(u / t1)))); else tmp = Float64(Float64(-t1) * Float64(Float64(v / Float64(t1 + u)) / Float64(t1 + u))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (v <= 3.9e+180) tmp = v / ((t1 + u) * (-1.0 - (u / t1))); else tmp = -t1 * ((v / (t1 + u)) / (t1 + u)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[v, 3.9e+180], N[(v / N[(N[(t1 + u), $MachinePrecision] * N[(-1.0 - N[(u / t1), $MachinePrecision]), $MachinePrecision]), $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}\;v \leq 3.9 \cdot 10^{+180}:\\
\;\;\;\;\frac{v}{\left(t1 + u\right) \cdot \left(-1 - \frac{u}{t1}\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(-t1\right) \cdot \frac{\frac{v}{t1 + u}}{t1 + u}\\
\end{array}
\end{array}
if v < 3.9000000000000001e180Initial program 77.3%
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 -inf 98.6%
associate-*r*98.6%
mul-1-neg98.6%
Simplified98.6%
Taylor expanded in v around 0 97.1%
associate-*r/97.1%
mul-1-neg97.1%
Simplified97.1%
Taylor expanded in v around 0 97.1%
mul-1-neg97.1%
associate-/r*97.6%
+-commutative97.6%
associate-/r*97.1%
distribute-neg-frac297.1%
*-commutative97.1%
distribute-rgt-neg-in97.1%
distribute-neg-in97.1%
metadata-eval97.1%
unsub-neg97.1%
Simplified97.1%
if 3.9000000000000001e180 < v Initial program 63.1%
associate-/l*67.0%
Simplified67.0%
associate-/r*92.2%
div-inv92.1%
Applied egg-rr92.1%
associate-*r/92.2%
*-rgt-identity92.2%
Simplified92.2%
Final simplification96.6%
(FPCore (u v t1) :precision binary64 (if (<= u 0.125) (/ v (* (+ t1 u) (- -1.0 (/ u t1)))) (* (/ v (+ t1 u)) (/ t1 (- u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= 0.125) {
tmp = v / ((t1 + u) * (-1.0 - (u / t1)));
} else {
tmp = (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 (u <= 0.125d0) then
tmp = v / ((t1 + u) * ((-1.0d0) - (u / t1)))
else
tmp = (v / (t1 + u)) * (t1 / -u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= 0.125) {
tmp = v / ((t1 + u) * (-1.0 - (u / t1)));
} else {
tmp = (v / (t1 + u)) * (t1 / -u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= 0.125: tmp = v / ((t1 + u) * (-1.0 - (u / t1))) else: tmp = (v / (t1 + u)) * (t1 / -u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= 0.125) tmp = Float64(v / Float64(Float64(t1 + u) * Float64(-1.0 - Float64(u / t1)))); else tmp = Float64(Float64(v / Float64(t1 + u)) * Float64(t1 / Float64(-u))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= 0.125) tmp = v / ((t1 + u) * (-1.0 - (u / t1))); else tmp = (v / (t1 + u)) * (t1 / -u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, 0.125], N[(v / N[(N[(t1 + u), $MachinePrecision] * N[(-1.0 - N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(t1 / (-u)), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq 0.125:\\
\;\;\;\;\frac{v}{\left(t1 + u\right) \cdot \left(-1 - \frac{u}{t1}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{t1 + u} \cdot \frac{t1}{-u}\\
\end{array}
\end{array}
if u < 0.125Initial program 73.6%
times-frac98.5%
distribute-frac-neg98.5%
distribute-neg-frac298.5%
+-commutative98.5%
distribute-neg-in98.5%
unsub-neg98.5%
Simplified98.5%
Taylor expanded in t1 around -inf 98.4%
associate-*r*98.4%
mul-1-neg98.4%
Simplified98.4%
Taylor expanded in v around 0 97.5%
associate-*r/97.5%
mul-1-neg97.5%
Simplified97.5%
Taylor expanded in v around 0 97.5%
mul-1-neg97.5%
associate-/r*97.8%
+-commutative97.8%
associate-/r*97.5%
distribute-neg-frac297.5%
*-commutative97.5%
distribute-rgt-neg-in97.5%
distribute-neg-in97.5%
metadata-eval97.5%
unsub-neg97.5%
Simplified97.5%
if 0.125 < u Initial program 82.6%
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 92.6%
associate-*r/92.6%
mul-1-neg92.6%
Simplified92.6%
Final simplification96.4%
(FPCore (u v t1) :precision binary64 (if (<= u -2.1e+65) (/ 1.0 (/ u v)) (if (<= u 2.05e+75) (/ (- v) t1) (/ v (+ t1 u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -2.1e+65) {
tmp = 1.0 / (u / v);
} else if (u <= 2.05e+75) {
tmp = -v / t1;
} 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 <= (-2.1d+65)) then
tmp = 1.0d0 / (u / v)
else if (u <= 2.05d+75) then
tmp = -v / t1
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 <= -2.1e+65) {
tmp = 1.0 / (u / v);
} else if (u <= 2.05e+75) {
tmp = -v / t1;
} else {
tmp = v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -2.1e+65: tmp = 1.0 / (u / v) elif u <= 2.05e+75: tmp = -v / t1 else: tmp = v / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -2.1e+65) tmp = Float64(1.0 / Float64(u / v)); elseif (u <= 2.05e+75) tmp = Float64(Float64(-v) / t1); else tmp = Float64(v / Float64(t1 + u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -2.1e+65) tmp = 1.0 / (u / v); elseif (u <= 2.05e+75) tmp = -v / t1; else tmp = v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -2.1e+65], N[(1.0 / N[(u / v), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 2.05e+75], N[((-v) / t1), $MachinePrecision], N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.1 \cdot 10^{+65}:\\
\;\;\;\;\frac{1}{\frac{u}{v}}\\
\mathbf{elif}\;u \leq 2.05 \cdot 10^{+75}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{t1 + u}\\
\end{array}
\end{array}
if u < -2.09999999999999991e65Initial program 87.6%
times-frac98.3%
distribute-frac-neg98.3%
distribute-neg-frac298.3%
+-commutative98.3%
distribute-neg-in98.3%
unsub-neg98.3%
Simplified98.3%
Taylor expanded in t1 around inf 37.5%
mul-1-neg37.5%
neg-sub037.5%
frac-2neg37.5%
add-sqr-sqrt22.9%
sqrt-unprod35.2%
sqr-neg35.2%
sqrt-unprod12.8%
add-sqr-sqrt33.4%
distribute-neg-in33.4%
add-sqr-sqrt18.1%
sqrt-unprod35.2%
sqr-neg35.2%
sqrt-unprod17.1%
add-sqr-sqrt37.0%
sub-neg37.0%
Applied egg-rr37.0%
neg-sub037.0%
distribute-frac-neg237.0%
Simplified37.0%
Taylor expanded in t1 around 0 33.5%
clear-num34.2%
inv-pow34.2%
Applied egg-rr34.2%
unpow-134.2%
Simplified34.2%
if -2.09999999999999991e65 < u < 2.0499999999999999e75Initial program 70.0%
associate-*l/77.3%
*-commutative77.3%
Simplified77.3%
Taylor expanded in t1 around inf 70.5%
associate-*r/70.5%
neg-mul-170.5%
Simplified70.5%
if 2.0499999999999999e75 < u Initial program 80.4%
times-frac98.6%
distribute-frac-neg98.6%
distribute-neg-frac298.6%
+-commutative98.6%
distribute-neg-in98.6%
unsub-neg98.6%
Simplified98.6%
Taylor expanded in t1 around inf 27.5%
add-sqr-sqrt25.9%
sqrt-unprod32.1%
mul-1-neg32.1%
mul-1-neg32.1%
sqr-neg32.1%
sqrt-unprod23.1%
add-sqr-sqrt24.9%
Applied egg-rr24.9%
(FPCore (u v t1) :precision binary64 (if (or (<= u -3.7e+64) (not (<= u 1.1e+79))) (/ v u) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.7e+64) || !(u <= 1.1e+79)) {
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.7d+64)) .or. (.not. (u <= 1.1d+79))) 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.7e+64) || !(u <= 1.1e+79)) {
tmp = v / u;
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -3.7e+64) or not (u <= 1.1e+79): tmp = v / u else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -3.7e+64) || !(u <= 1.1e+79)) tmp = 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 <= -3.7e+64) || ~((u <= 1.1e+79))) tmp = v / u; else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -3.7e+64], N[Not[LessEqual[u, 1.1e+79]], $MachinePrecision]], N[(v / u), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.7 \cdot 10^{+64} \lor \neg \left(u \leq 1.1 \cdot 10^{+79}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -3.69999999999999983e64 or 1.0999999999999999e79 < u Initial program 84.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 32.9%
mul-1-neg32.9%
neg-sub032.9%
frac-2neg32.9%
add-sqr-sqrt21.3%
sqrt-unprod33.2%
sqr-neg33.2%
sqrt-unprod10.6%
add-sqr-sqrt29.5%
distribute-neg-in29.5%
add-sqr-sqrt15.5%
sqrt-unprod30.9%
sqr-neg30.9%
sqrt-unprod16.2%
add-sqr-sqrt32.7%
sub-neg32.7%
Applied egg-rr32.7%
neg-sub032.7%
distribute-frac-neg232.7%
Simplified32.7%
Taylor expanded in t1 around 0 29.5%
if -3.69999999999999983e64 < u < 1.0999999999999999e79Initial program 70.0%
associate-*l/77.3%
*-commutative77.3%
Simplified77.3%
Taylor expanded in t1 around inf 70.5%
associate-*r/70.5%
neg-mul-170.5%
Simplified70.5%
Final simplification54.2%
(FPCore (u v t1) :precision binary64 (if (<= u -2.1e+65) (/ 1.0 (/ u v)) (if (<= u 2.2e+78) (/ (- v) t1) (/ v u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -2.1e+65) {
tmp = 1.0 / (u / v);
} else if (u <= 2.2e+78) {
tmp = -v / t1;
} else {
tmp = v / u;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-2.1d+65)) then
tmp = 1.0d0 / (u / v)
else if (u <= 2.2d+78) then
tmp = -v / t1
else
tmp = v / u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -2.1e+65) {
tmp = 1.0 / (u / v);
} else if (u <= 2.2e+78) {
tmp = -v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -2.1e+65: tmp = 1.0 / (u / v) elif u <= 2.2e+78: tmp = -v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -2.1e+65) tmp = Float64(1.0 / Float64(u / v)); elseif (u <= 2.2e+78) tmp = Float64(Float64(-v) / t1); else tmp = Float64(v / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -2.1e+65) tmp = 1.0 / (u / v); elseif (u <= 2.2e+78) tmp = -v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -2.1e+65], N[(1.0 / N[(u / v), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 2.2e+78], N[((-v) / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.1 \cdot 10^{+65}:\\
\;\;\;\;\frac{1}{\frac{u}{v}}\\
\mathbf{elif}\;u \leq 2.2 \cdot 10^{+78}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if u < -2.09999999999999991e65Initial program 87.6%
times-frac98.3%
distribute-frac-neg98.3%
distribute-neg-frac298.3%
+-commutative98.3%
distribute-neg-in98.3%
unsub-neg98.3%
Simplified98.3%
Taylor expanded in t1 around inf 37.5%
mul-1-neg37.5%
neg-sub037.5%
frac-2neg37.5%
add-sqr-sqrt22.9%
sqrt-unprod35.2%
sqr-neg35.2%
sqrt-unprod12.8%
add-sqr-sqrt33.4%
distribute-neg-in33.4%
add-sqr-sqrt18.1%
sqrt-unprod35.2%
sqr-neg35.2%
sqrt-unprod17.1%
add-sqr-sqrt37.0%
sub-neg37.0%
Applied egg-rr37.0%
neg-sub037.0%
distribute-frac-neg237.0%
Simplified37.0%
Taylor expanded in t1 around 0 33.5%
clear-num34.2%
inv-pow34.2%
Applied egg-rr34.2%
unpow-134.2%
Simplified34.2%
if -2.09999999999999991e65 < u < 2.20000000000000014e78Initial program 70.0%
associate-*l/77.3%
*-commutative77.3%
Simplified77.3%
Taylor expanded in t1 around inf 70.5%
associate-*r/70.5%
neg-mul-170.5%
Simplified70.5%
if 2.20000000000000014e78 < u Initial program 80.4%
times-frac98.6%
distribute-frac-neg98.6%
distribute-neg-frac298.6%
+-commutative98.6%
distribute-neg-in98.6%
unsub-neg98.6%
Simplified98.6%
Taylor expanded in t1 around inf 27.5%
mul-1-neg27.5%
neg-sub027.5%
frac-2neg27.5%
add-sqr-sqrt19.5%
sqrt-unprod30.9%
sqr-neg30.9%
sqrt-unprod8.2%
add-sqr-sqrt24.9%
distribute-neg-in24.9%
add-sqr-sqrt12.6%
sqrt-unprod25.8%
sqr-neg25.8%
sqrt-unprod15.2%
add-sqr-sqrt27.8%
sub-neg27.8%
Applied egg-rr27.8%
neg-sub027.8%
distribute-frac-neg227.8%
Simplified27.8%
Taylor expanded in t1 around 0 24.8%
(FPCore (u v t1) :precision binary64 (if (<= u -2.05e+65) (/ v (- u)) (if (<= u 1e+68) (/ (- v) t1) (/ v u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -2.05e+65) {
tmp = v / -u;
} else if (u <= 1e+68) {
tmp = -v / t1;
} else {
tmp = v / u;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-2.05d+65)) then
tmp = v / -u
else if (u <= 1d+68) then
tmp = -v / t1
else
tmp = v / u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -2.05e+65) {
tmp = v / -u;
} else if (u <= 1e+68) {
tmp = -v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -2.05e+65: tmp = v / -u elif u <= 1e+68: tmp = -v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -2.05e+65) tmp = Float64(v / Float64(-u)); elseif (u <= 1e+68) tmp = Float64(Float64(-v) / t1); else tmp = Float64(v / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -2.05e+65) tmp = v / -u; elseif (u <= 1e+68) tmp = -v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -2.05e+65], N[(v / (-u)), $MachinePrecision], If[LessEqual[u, 1e+68], N[((-v) / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.05 \cdot 10^{+65}:\\
\;\;\;\;\frac{v}{-u}\\
\mathbf{elif}\;u \leq 10^{+68}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if u < -2.0500000000000001e65Initial program 87.6%
times-frac98.3%
distribute-frac-neg98.3%
distribute-neg-frac298.3%
+-commutative98.3%
distribute-neg-in98.3%
unsub-neg98.3%
Simplified98.3%
Taylor expanded in t1 around inf 37.5%
Taylor expanded in t1 around 0 34.1%
associate-*r/34.1%
mul-1-neg34.1%
Simplified34.1%
if -2.0500000000000001e65 < u < 9.99999999999999953e67Initial program 70.0%
associate-*l/77.3%
*-commutative77.3%
Simplified77.3%
Taylor expanded in t1 around inf 70.5%
associate-*r/70.5%
neg-mul-170.5%
Simplified70.5%
if 9.99999999999999953e67 < u Initial program 80.4%
times-frac98.6%
distribute-frac-neg98.6%
distribute-neg-frac298.6%
+-commutative98.6%
distribute-neg-in98.6%
unsub-neg98.6%
Simplified98.6%
Taylor expanded in t1 around inf 27.5%
mul-1-neg27.5%
neg-sub027.5%
frac-2neg27.5%
add-sqr-sqrt19.5%
sqrt-unprod30.9%
sqr-neg30.9%
sqrt-unprod8.2%
add-sqr-sqrt24.9%
distribute-neg-in24.9%
add-sqr-sqrt12.6%
sqrt-unprod25.8%
sqr-neg25.8%
sqrt-unprod15.2%
add-sqr-sqrt27.8%
sub-neg27.8%
Applied egg-rr27.8%
neg-sub027.8%
distribute-frac-neg227.8%
Simplified27.8%
Taylor expanded in t1 around 0 24.8%
Final simplification54.3%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -4.5e+144) (not (<= t1 3.95e+102))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -4.5e+144) || !(t1 <= 3.95e+102)) {
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.5d+144)) .or. (.not. (t1 <= 3.95d+102))) 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.5e+144) || !(t1 <= 3.95e+102)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -4.5e+144) or not (t1 <= 3.95e+102): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -4.5e+144) || !(t1 <= 3.95e+102)) 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 <= -4.5e+144) || ~((t1 <= 3.95e+102))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -4.5e+144], N[Not[LessEqual[t1, 3.95e+102]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -4.5 \cdot 10^{+144} \lor \neg \left(t1 \leq 3.95 \cdot 10^{+102}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -4.49999999999999967e144 or 3.9500000000000001e102 < t1 Initial program 51.4%
associate-*l/55.3%
*-commutative55.3%
Simplified55.3%
Taylor expanded in t1 around inf 85.7%
associate-*r/85.7%
neg-mul-185.7%
Simplified85.7%
add-sqr-sqrt44.7%
sqrt-unprod53.1%
sqr-neg53.1%
sqrt-unprod14.6%
add-sqr-sqrt33.6%
*-un-lft-identity33.6%
Applied egg-rr33.6%
*-lft-identity33.6%
Simplified33.6%
if -4.49999999999999967e144 < t1 < 3.9500000000000001e102Initial program 84.3%
times-frac98.1%
distribute-frac-neg98.1%
distribute-neg-frac298.1%
+-commutative98.1%
distribute-neg-in98.1%
unsub-neg98.1%
Simplified98.1%
Taylor expanded in t1 around inf 43.4%
mul-1-neg43.4%
neg-sub043.4%
frac-2neg43.4%
add-sqr-sqrt24.7%
sqrt-unprod26.7%
sqr-neg26.7%
sqrt-unprod5.6%
add-sqr-sqrt15.1%
distribute-neg-in15.1%
add-sqr-sqrt8.8%
sqrt-unprod26.7%
sqr-neg26.7%
sqrt-unprod17.7%
add-sqr-sqrt43.6%
sub-neg43.6%
Applied egg-rr43.6%
neg-sub043.6%
distribute-frac-neg243.6%
Simplified43.6%
Taylor expanded in t1 around 0 17.1%
Final simplification21.4%
(FPCore (u v t1) :precision binary64 (/ -1.0 (/ (- t1 u) v)))
double code(double u, double v, double t1) {
return -1.0 / ((t1 - u) / v);
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-1.0d0) / ((t1 - u) / v)
end function
public static double code(double u, double v, double t1) {
return -1.0 / ((t1 - u) / v);
}
def code(u, v, t1): return -1.0 / ((t1 - u) / v)
function code(u, v, t1) return Float64(-1.0 / Float64(Float64(t1 - u) / v)) end
function tmp = code(u, v, t1) tmp = -1.0 / ((t1 - u) / v); end
code[u_, v_, t1_] := N[(-1.0 / N[(N[(t1 - u), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1}{\frac{t1 - u}{v}}
\end{array}
Initial program 75.7%
times-frac98.6%
distribute-frac-neg98.6%
distribute-neg-frac298.6%
+-commutative98.6%
distribute-neg-in98.6%
unsub-neg98.6%
Simplified98.6%
Taylor expanded in t1 around inf 55.1%
clear-num55.2%
un-div-inv55.2%
frac-2neg55.2%
distribute-neg-in55.2%
add-sqr-sqrt28.2%
sqrt-unprod33.1%
sqr-neg33.1%
sqrt-unprod11.5%
add-sqr-sqrt20.9%
sub-neg20.9%
add-sqr-sqrt12.5%
sqrt-unprod32.4%
sqr-neg32.4%
sqrt-unprod24.8%
add-sqr-sqrt55.3%
Applied egg-rr55.3%
(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.7%
times-frac98.6%
distribute-frac-neg98.6%
distribute-neg-frac298.6%
+-commutative98.6%
distribute-neg-in98.6%
unsub-neg98.6%
Simplified98.6%
Taylor expanded in t1 around inf 55.1%
mul-1-neg55.1%
neg-sub055.1%
frac-2neg55.1%
add-sqr-sqrt30.2%
sqrt-unprod34.0%
sqr-neg34.0%
sqrt-unprod8.3%
add-sqr-sqrt20.6%
distribute-neg-in20.6%
add-sqr-sqrt10.0%
sqrt-unprod32.2%
sqr-neg32.2%
sqrt-unprod26.2%
add-sqr-sqrt55.2%
sub-neg55.2%
Applied egg-rr55.2%
neg-sub055.2%
distribute-frac-neg255.2%
Simplified55.2%
Taylor expanded in v around 0 55.2%
(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.7%
associate-*l/77.9%
*-commutative77.9%
Simplified77.9%
Taylor expanded in t1 around inf 48.1%
associate-*r/48.1%
neg-mul-148.1%
Simplified48.1%
add-sqr-sqrt25.1%
sqrt-unprod30.9%
sqr-neg30.9%
sqrt-unprod5.2%
add-sqr-sqrt11.4%
*-un-lft-identity11.4%
Applied egg-rr11.4%
*-lft-identity11.4%
Simplified11.4%
herbie shell --seed 2024165
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))