
(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 (* (/ (- 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 67.9%
times-frac98.4%
Simplified98.4%
Final simplification98.4%
(FPCore (u v t1)
:precision binary64
(if (<= u -1e-11)
(/ (* t1 (/ v u)) (- t1 u))
(if (<= u 3.6e-23)
(/ (- v) t1)
(if (<= u 5e+43)
(* (/ v (- t1 u)) (/ t1 u))
(if (<= u 9e+120)
(/ v (- (* u -2.0) t1))
(/ (/ v (+ t1 u)) (/ (- t1 u) t1)))))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1e-11) {
tmp = (t1 * (v / u)) / (t1 - u);
} else if (u <= 3.6e-23) {
tmp = -v / t1;
} else if (u <= 5e+43) {
tmp = (v / (t1 - u)) * (t1 / u);
} else if (u <= 9e+120) {
tmp = v / ((u * -2.0) - t1);
} else {
tmp = (v / (t1 + u)) / ((t1 - 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 (u <= (-1d-11)) then
tmp = (t1 * (v / u)) / (t1 - u)
else if (u <= 3.6d-23) then
tmp = -v / t1
else if (u <= 5d+43) then
tmp = (v / (t1 - u)) * (t1 / u)
else if (u <= 9d+120) then
tmp = v / ((u * (-2.0d0)) - t1)
else
tmp = (v / (t1 + u)) / ((t1 - u) / t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -1e-11) {
tmp = (t1 * (v / u)) / (t1 - u);
} else if (u <= 3.6e-23) {
tmp = -v / t1;
} else if (u <= 5e+43) {
tmp = (v / (t1 - u)) * (t1 / u);
} else if (u <= 9e+120) {
tmp = v / ((u * -2.0) - t1);
} else {
tmp = (v / (t1 + u)) / ((t1 - u) / t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1e-11: tmp = (t1 * (v / u)) / (t1 - u) elif u <= 3.6e-23: tmp = -v / t1 elif u <= 5e+43: tmp = (v / (t1 - u)) * (t1 / u) elif u <= 9e+120: tmp = v / ((u * -2.0) - t1) else: tmp = (v / (t1 + u)) / ((t1 - u) / t1) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1e-11) tmp = Float64(Float64(t1 * Float64(v / u)) / Float64(t1 - u)); elseif (u <= 3.6e-23) tmp = Float64(Float64(-v) / t1); elseif (u <= 5e+43) tmp = Float64(Float64(v / Float64(t1 - u)) * Float64(t1 / u)); elseif (u <= 9e+120) tmp = Float64(v / Float64(Float64(u * -2.0) - t1)); else tmp = Float64(Float64(v / Float64(t1 + u)) / Float64(Float64(t1 - u) / t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -1e-11) tmp = (t1 * (v / u)) / (t1 - u); elseif (u <= 3.6e-23) tmp = -v / t1; elseif (u <= 5e+43) tmp = (v / (t1 - u)) * (t1 / u); elseif (u <= 9e+120) tmp = v / ((u * -2.0) - t1); else tmp = (v / (t1 + u)) / ((t1 - u) / t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1e-11], N[(N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision] / N[(t1 - u), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 3.6e-23], N[((-v) / t1), $MachinePrecision], If[LessEqual[u, 5e+43], N[(N[(v / N[(t1 - u), $MachinePrecision]), $MachinePrecision] * N[(t1 / u), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 9e+120], N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision], N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[(N[(t1 - u), $MachinePrecision] / t1), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1 \cdot 10^{-11}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{u}}{t1 - u}\\
\mathbf{elif}\;u \leq 3.6 \cdot 10^{-23}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{elif}\;u \leq 5 \cdot 10^{+43}:\\
\;\;\;\;\frac{v}{t1 - u} \cdot \frac{t1}{u}\\
\mathbf{elif}\;u \leq 9 \cdot 10^{+120}:\\
\;\;\;\;\frac{v}{u \cdot -2 - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{v}{t1 + u}}{\frac{t1 - u}{t1}}\\
\end{array}
\end{array}
if u < -9.99999999999999939e-12Initial program 81.0%
times-frac95.5%
Simplified95.5%
Taylor expanded in t1 around 0 81.6%
frac-2neg81.6%
remove-double-neg81.6%
associate-*l/85.7%
distribute-neg-in85.7%
add-sqr-sqrt55.4%
sqrt-unprod81.8%
sqr-neg81.8%
sqrt-unprod30.5%
add-sqr-sqrt85.6%
sub-neg85.6%
Applied egg-rr85.6%
if -9.99999999999999939e-12 < u < 3.5999999999999998e-23Initial program 59.8%
times-frac99.1%
Simplified99.1%
Taylor expanded in t1 around inf 86.5%
associate-*r/86.5%
neg-mul-186.5%
Simplified86.5%
if 3.5999999999999998e-23 < u < 5.0000000000000004e43Initial program 78.5%
times-frac99.9%
Simplified99.9%
Taylor expanded in t1 around 0 62.1%
frac-2neg62.1%
clear-num62.1%
frac-times66.0%
remove-double-neg66.0%
*-commutative66.0%
*-un-lft-identity66.0%
distribute-neg-in66.0%
add-sqr-sqrt26.5%
sqrt-unprod66.1%
sqr-neg66.1%
sqrt-unprod39.0%
add-sqr-sqrt67.0%
sub-neg67.0%
Applied egg-rr67.0%
associate-*r/66.9%
associate-/l*62.8%
*-commutative62.8%
times-frac67.0%
Simplified67.0%
if 5.0000000000000004e43 < u < 8.99999999999999953e120Initial program 60.5%
associate-/r*65.9%
*-commutative65.9%
associate-/l*99.9%
associate-/l/99.9%
+-commutative99.9%
remove-double-neg99.9%
unsub-neg99.9%
div-sub100.0%
sub-neg100.0%
*-inverses100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in t1 around inf 71.6%
mul-1-neg71.6%
unsub-neg71.6%
*-commutative71.6%
Simplified71.6%
if 8.99999999999999953e120 < u Initial program 66.0%
times-frac99.8%
Simplified99.8%
clear-num99.8%
frac-times83.5%
*-un-lft-identity83.5%
frac-2neg83.5%
distribute-neg-in83.5%
add-sqr-sqrt47.7%
sqrt-unprod71.7%
sqr-neg71.7%
sqrt-unprod30.9%
add-sqr-sqrt73.9%
sub-neg73.9%
remove-double-neg73.9%
Applied egg-rr73.9%
associate-/l/90.2%
Simplified90.2%
Final simplification83.9%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (* (/ v u) (/ t1 (- t1 u)))))
(if (<= u -8.2e-13)
t_1
(if (<= u 2.8e-25)
(/ (- v) t1)
(if (or (<= u 1.05e+44) (not (<= u 9e+120)))
t_1
(/ v (- (* u -2.0) t1)))))))
double code(double u, double v, double t1) {
double t_1 = (v / u) * (t1 / (t1 - u));
double tmp;
if (u <= -8.2e-13) {
tmp = t_1;
} else if (u <= 2.8e-25) {
tmp = -v / t1;
} else if ((u <= 1.05e+44) || !(u <= 9e+120)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (v / u) * (t1 / (t1 - u))
if (u <= (-8.2d-13)) then
tmp = t_1
else if (u <= 2.8d-25) then
tmp = -v / t1
else if ((u <= 1.05d+44) .or. (.not. (u <= 9d+120))) then
tmp = t_1
else
tmp = v / ((u * (-2.0d0)) - t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = (v / u) * (t1 / (t1 - u));
double tmp;
if (u <= -8.2e-13) {
tmp = t_1;
} else if (u <= 2.8e-25) {
tmp = -v / t1;
} else if ((u <= 1.05e+44) || !(u <= 9e+120)) {
tmp = t_1;
} else {
tmp = v / ((u * -2.0) - t1);
}
return tmp;
}
def code(u, v, t1): t_1 = (v / u) * (t1 / (t1 - u)) tmp = 0 if u <= -8.2e-13: tmp = t_1 elif u <= 2.8e-25: tmp = -v / t1 elif (u <= 1.05e+44) or not (u <= 9e+120): tmp = t_1 else: tmp = v / ((u * -2.0) - t1) return tmp
function code(u, v, t1) t_1 = Float64(Float64(v / u) * Float64(t1 / Float64(t1 - u))) tmp = 0.0 if (u <= -8.2e-13) tmp = t_1; elseif (u <= 2.8e-25) tmp = Float64(Float64(-v) / t1); elseif ((u <= 1.05e+44) || !(u <= 9e+120)) tmp = t_1; else tmp = Float64(v / Float64(Float64(u * -2.0) - t1)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = (v / u) * (t1 / (t1 - u)); tmp = 0.0; if (u <= -8.2e-13) tmp = t_1; elseif (u <= 2.8e-25) tmp = -v / t1; elseif ((u <= 1.05e+44) || ~((u <= 9e+120))) tmp = t_1; else tmp = v / ((u * -2.0) - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(N[(v / u), $MachinePrecision] * N[(t1 / N[(t1 - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[u, -8.2e-13], t$95$1, If[LessEqual[u, 2.8e-25], N[((-v) / t1), $MachinePrecision], If[Or[LessEqual[u, 1.05e+44], N[Not[LessEqual[u, 9e+120]], $MachinePrecision]], t$95$1, N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{v}{u} \cdot \frac{t1}{t1 - u}\\
\mathbf{if}\;u \leq -8.2 \cdot 10^{-13}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;u \leq 2.8 \cdot 10^{-25}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{elif}\;u \leq 1.05 \cdot 10^{+44} \lor \neg \left(u \leq 9 \cdot 10^{+120}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u \cdot -2 - t1}\\
\end{array}
\end{array}
if u < -8.2000000000000004e-13 or 2.79999999999999988e-25 < u < 1.04999999999999993e44 or 8.99999999999999953e120 < u Initial program 75.9%
times-frac97.7%
Simplified97.7%
Taylor expanded in t1 around 0 80.4%
*-commutative80.4%
clear-num81.0%
frac-2neg81.0%
frac-times79.2%
*-un-lft-identity79.2%
remove-double-neg79.2%
distribute-neg-in79.2%
add-sqr-sqrt43.7%
sqrt-unprod78.5%
sqr-neg78.5%
sqrt-unprod35.4%
add-sqr-sqrt79.2%
sub-neg79.2%
Applied egg-rr79.2%
*-un-lft-identity79.2%
times-frac81.1%
clear-num80.5%
Applied egg-rr80.5%
if -8.2000000000000004e-13 < u < 2.79999999999999988e-25Initial program 59.8%
times-frac99.1%
Simplified99.1%
Taylor expanded in t1 around inf 86.5%
associate-*r/86.5%
neg-mul-186.5%
Simplified86.5%
if 1.04999999999999993e44 < u < 8.99999999999999953e120Initial program 60.5%
associate-/r*65.9%
*-commutative65.9%
associate-/l*99.9%
associate-/l/99.9%
+-commutative99.9%
remove-double-neg99.9%
unsub-neg99.9%
div-sub100.0%
sub-neg100.0%
*-inverses100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in t1 around inf 71.6%
mul-1-neg71.6%
unsub-neg71.6%
*-commutative71.6%
Simplified71.6%
Final simplification82.3%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (* (/ v (- t1 u)) (/ t1 u))))
(if (<= u -2.9e-12)
t_1
(if (<= u 1.4e-22)
(/ (- v) t1)
(if (or (<= u 2.5e+43) (not (<= u 1.55e+121)))
t_1
(/ v (- (* u -2.0) t1)))))))
double code(double u, double v, double t1) {
double t_1 = (v / (t1 - u)) * (t1 / u);
double tmp;
if (u <= -2.9e-12) {
tmp = t_1;
} else if (u <= 1.4e-22) {
tmp = -v / t1;
} else if ((u <= 2.5e+43) || !(u <= 1.55e+121)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (v / (t1 - u)) * (t1 / u)
if (u <= (-2.9d-12)) then
tmp = t_1
else if (u <= 1.4d-22) then
tmp = -v / t1
else if ((u <= 2.5d+43) .or. (.not. (u <= 1.55d+121))) then
tmp = t_1
else
tmp = v / ((u * (-2.0d0)) - t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = (v / (t1 - u)) * (t1 / u);
double tmp;
if (u <= -2.9e-12) {
tmp = t_1;
} else if (u <= 1.4e-22) {
tmp = -v / t1;
} else if ((u <= 2.5e+43) || !(u <= 1.55e+121)) {
tmp = t_1;
} else {
tmp = v / ((u * -2.0) - t1);
}
return tmp;
}
def code(u, v, t1): t_1 = (v / (t1 - u)) * (t1 / u) tmp = 0 if u <= -2.9e-12: tmp = t_1 elif u <= 1.4e-22: tmp = -v / t1 elif (u <= 2.5e+43) or not (u <= 1.55e+121): tmp = t_1 else: tmp = v / ((u * -2.0) - t1) return tmp
function code(u, v, t1) t_1 = Float64(Float64(v / Float64(t1 - u)) * Float64(t1 / u)) tmp = 0.0 if (u <= -2.9e-12) tmp = t_1; elseif (u <= 1.4e-22) tmp = Float64(Float64(-v) / t1); elseif ((u <= 2.5e+43) || !(u <= 1.55e+121)) tmp = t_1; else tmp = Float64(v / Float64(Float64(u * -2.0) - t1)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = (v / (t1 - u)) * (t1 / u); tmp = 0.0; if (u <= -2.9e-12) tmp = t_1; elseif (u <= 1.4e-22) tmp = -v / t1; elseif ((u <= 2.5e+43) || ~((u <= 1.55e+121))) tmp = t_1; else tmp = v / ((u * -2.0) - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(N[(v / N[(t1 - u), $MachinePrecision]), $MachinePrecision] * N[(t1 / u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[u, -2.9e-12], t$95$1, If[LessEqual[u, 1.4e-22], N[((-v) / t1), $MachinePrecision], If[Or[LessEqual[u, 2.5e+43], N[Not[LessEqual[u, 1.55e+121]], $MachinePrecision]], t$95$1, N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{v}{t1 - u} \cdot \frac{t1}{u}\\
\mathbf{if}\;u \leq -2.9 \cdot 10^{-12}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;u \leq 1.4 \cdot 10^{-22}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{elif}\;u \leq 2.5 \cdot 10^{+43} \lor \neg \left(u \leq 1.55 \cdot 10^{+121}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u \cdot -2 - t1}\\
\end{array}
\end{array}
if u < -2.9000000000000002e-12 or 1.39999999999999997e-22 < u < 2.5000000000000002e43 or 1.55000000000000004e121 < u Initial program 75.9%
times-frac97.7%
Simplified97.7%
Taylor expanded in t1 around 0 80.4%
frac-2neg80.4%
clear-num81.0%
frac-times79.2%
remove-double-neg79.2%
*-commutative79.2%
*-un-lft-identity79.2%
distribute-neg-in79.2%
add-sqr-sqrt43.7%
sqrt-unprod78.5%
sqr-neg78.5%
sqrt-unprod35.4%
add-sqr-sqrt79.2%
sub-neg79.2%
Applied egg-rr79.2%
associate-*r/71.9%
associate-/l*71.3%
*-commutative71.3%
times-frac82.6%
Simplified82.6%
if -2.9000000000000002e-12 < u < 1.39999999999999997e-22Initial program 59.8%
times-frac99.1%
Simplified99.1%
Taylor expanded in t1 around inf 86.5%
associate-*r/86.5%
neg-mul-186.5%
Simplified86.5%
if 2.5000000000000002e43 < u < 1.55000000000000004e121Initial program 60.5%
associate-/r*65.9%
*-commutative65.9%
associate-/l*99.9%
associate-/l/99.9%
+-commutative99.9%
remove-double-neg99.9%
unsub-neg99.9%
div-sub100.0%
sub-neg100.0%
*-inverses100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in t1 around inf 71.6%
mul-1-neg71.6%
unsub-neg71.6%
*-commutative71.6%
Simplified71.6%
Final simplification83.4%
(FPCore (u v t1)
:precision binary64
(if (<= u -4.4e-12)
(/ (* t1 (/ v u)) (- t1 u))
(if (<= u 8.8e-27)
(/ (- v) t1)
(if (or (<= u 3.8e+43) (not (<= u 9e+120)))
(* (/ v (- t1 u)) (/ t1 u))
(/ v (- (* u -2.0) t1))))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -4.4e-12) {
tmp = (t1 * (v / u)) / (t1 - u);
} else if (u <= 8.8e-27) {
tmp = -v / t1;
} else if ((u <= 3.8e+43) || !(u <= 9e+120)) {
tmp = (v / (t1 - u)) * (t1 / 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 <= (-4.4d-12)) then
tmp = (t1 * (v / u)) / (t1 - u)
else if (u <= 8.8d-27) then
tmp = -v / t1
else if ((u <= 3.8d+43) .or. (.not. (u <= 9d+120))) then
tmp = (v / (t1 - u)) * (t1 / 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 <= -4.4e-12) {
tmp = (t1 * (v / u)) / (t1 - u);
} else if (u <= 8.8e-27) {
tmp = -v / t1;
} else if ((u <= 3.8e+43) || !(u <= 9e+120)) {
tmp = (v / (t1 - u)) * (t1 / u);
} else {
tmp = v / ((u * -2.0) - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -4.4e-12: tmp = (t1 * (v / u)) / (t1 - u) elif u <= 8.8e-27: tmp = -v / t1 elif (u <= 3.8e+43) or not (u <= 9e+120): tmp = (v / (t1 - u)) * (t1 / u) else: tmp = v / ((u * -2.0) - t1) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -4.4e-12) tmp = Float64(Float64(t1 * Float64(v / u)) / Float64(t1 - u)); elseif (u <= 8.8e-27) tmp = Float64(Float64(-v) / t1); elseif ((u <= 3.8e+43) || !(u <= 9e+120)) tmp = Float64(Float64(v / Float64(t1 - u)) * Float64(t1 / 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 <= -4.4e-12) tmp = (t1 * (v / u)) / (t1 - u); elseif (u <= 8.8e-27) tmp = -v / t1; elseif ((u <= 3.8e+43) || ~((u <= 9e+120))) tmp = (v / (t1 - u)) * (t1 / u); else tmp = v / ((u * -2.0) - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -4.4e-12], N[(N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision] / N[(t1 - u), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 8.8e-27], N[((-v) / t1), $MachinePrecision], If[Or[LessEqual[u, 3.8e+43], N[Not[LessEqual[u, 9e+120]], $MachinePrecision]], N[(N[(v / N[(t1 - u), $MachinePrecision]), $MachinePrecision] * N[(t1 / u), $MachinePrecision]), $MachinePrecision], N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -4.4 \cdot 10^{-12}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{u}}{t1 - u}\\
\mathbf{elif}\;u \leq 8.8 \cdot 10^{-27}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{elif}\;u \leq 3.8 \cdot 10^{+43} \lor \neg \left(u \leq 9 \cdot 10^{+120}\right):\\
\;\;\;\;\frac{v}{t1 - u} \cdot \frac{t1}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u \cdot -2 - t1}\\
\end{array}
\end{array}
if u < -4.39999999999999983e-12Initial program 81.0%
times-frac95.5%
Simplified95.5%
Taylor expanded in t1 around 0 81.6%
frac-2neg81.6%
remove-double-neg81.6%
associate-*l/85.7%
distribute-neg-in85.7%
add-sqr-sqrt55.4%
sqrt-unprod81.8%
sqr-neg81.8%
sqrt-unprod30.5%
add-sqr-sqrt85.6%
sub-neg85.6%
Applied egg-rr85.6%
if -4.39999999999999983e-12 < u < 8.79999999999999948e-27Initial program 59.8%
times-frac99.1%
Simplified99.1%
Taylor expanded in t1 around inf 86.5%
associate-*r/86.5%
neg-mul-186.5%
Simplified86.5%
if 8.79999999999999948e-27 < u < 3.80000000000000008e43 or 8.99999999999999953e120 < u Initial program 70.6%
times-frac99.9%
Simplified99.9%
Taylor expanded in t1 around 0 79.2%
frac-2neg79.2%
clear-num79.9%
frac-times78.3%
remove-double-neg78.3%
*-commutative78.3%
*-un-lft-identity78.3%
distribute-neg-in78.3%
add-sqr-sqrt39.7%
sqrt-unprod78.3%
sqr-neg78.3%
sqrt-unprod38.4%
add-sqr-sqrt78.6%
sub-neg78.6%
Applied egg-rr78.6%
associate-*r/66.5%
associate-/l*64.8%
*-commutative64.8%
times-frac81.8%
Simplified81.8%
if 3.80000000000000008e43 < u < 8.99999999999999953e120Initial program 60.5%
associate-/r*65.9%
*-commutative65.9%
associate-/l*99.9%
associate-/l/99.9%
+-commutative99.9%
remove-double-neg99.9%
unsub-neg99.9%
div-sub100.0%
sub-neg100.0%
*-inverses100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in t1 around inf 71.6%
mul-1-neg71.6%
unsub-neg71.6%
*-commutative71.6%
Simplified71.6%
Final simplification83.9%
(FPCore (u v t1) :precision binary64 (if (<= u -1.3e+142) (* (/ v u) -0.5) (if (<= u 1.72e+168) (/ (- v) t1) (/ v (+ t1 u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.3e+142) {
tmp = (v / u) * -0.5;
} else if (u <= 1.72e+168) {
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 <= (-1.3d+142)) then
tmp = (v / u) * (-0.5d0)
else if (u <= 1.72d+168) 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 <= -1.3e+142) {
tmp = (v / u) * -0.5;
} else if (u <= 1.72e+168) {
tmp = -v / t1;
} else {
tmp = v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.3e+142: tmp = (v / u) * -0.5 elif u <= 1.72e+168: tmp = -v / t1 else: tmp = v / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.3e+142) tmp = Float64(Float64(v / u) * -0.5); elseif (u <= 1.72e+168) 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 <= -1.3e+142) tmp = (v / u) * -0.5; elseif (u <= 1.72e+168) tmp = -v / t1; else tmp = v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.3e+142], N[(N[(v / u), $MachinePrecision] * -0.5), $MachinePrecision], If[LessEqual[u, 1.72e+168], N[((-v) / t1), $MachinePrecision], N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.3 \cdot 10^{+142}:\\
\;\;\;\;\frac{v}{u} \cdot -0.5\\
\mathbf{elif}\;u \leq 1.72 \cdot 10^{+168}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{t1 + u}\\
\end{array}
\end{array}
if u < -1.30000000000000011e142Initial program 76.9%
associate-/r*89.0%
*-commutative89.0%
associate-/l*99.8%
associate-/l/85.5%
+-commutative85.5%
remove-double-neg85.5%
unsub-neg85.5%
div-sub85.5%
sub-neg85.5%
*-inverses85.5%
metadata-eval85.5%
Simplified85.5%
Taylor expanded in t1 around inf 52.1%
mul-1-neg52.1%
unsub-neg52.1%
*-commutative52.1%
Simplified52.1%
Taylor expanded in u around inf 46.8%
if -1.30000000000000011e142 < u < 1.7200000000000001e168Initial program 65.8%
times-frac97.9%
Simplified97.9%
Taylor expanded in t1 around inf 68.7%
associate-*r/68.7%
neg-mul-168.7%
Simplified68.7%
if 1.7200000000000001e168 < u Initial program 69.8%
times-frac99.8%
Simplified99.8%
Taylor expanded in t1 around inf 52.2%
clear-num52.2%
frac-times40.3%
*-commutative40.3%
*-un-lft-identity40.3%
add-sqr-sqrt26.1%
sqrt-unprod38.9%
sqr-neg38.9%
sqrt-unprod13.9%
add-sqr-sqrt40.3%
Applied egg-rr40.3%
*-commutative40.3%
associate-*l/49.6%
associate-/l*48.8%
times-frac34.9%
*-inverses34.9%
associate-*r/34.9%
*-lft-identity34.9%
+-commutative34.9%
Simplified34.9%
Final simplification61.4%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.45e+142) (not (<= u 2.2e+191))) (/ v u) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.45e+142) || !(u <= 2.2e+191)) {
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.45d+142)) .or. (.not. (u <= 2.2d+191))) 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.45e+142) || !(u <= 2.2e+191)) {
tmp = v / u;
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.45e+142) or not (u <= 2.2e+191): tmp = v / u else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.45e+142) || !(u <= 2.2e+191)) 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 <= -1.45e+142) || ~((u <= 2.2e+191))) tmp = v / u; else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.45e+142], N[Not[LessEqual[u, 2.2e+191]], $MachinePrecision]], N[(v / u), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.45 \cdot 10^{+142} \lor \neg \left(u \leq 2.2 \cdot 10^{+191}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -1.45000000000000007e142 or 2.2e191 < u Initial program 74.5%
times-frac99.8%
Simplified99.8%
Taylor expanded in t1 around 0 96.6%
*-commutative96.6%
clear-num96.5%
frac-2neg96.5%
frac-times87.1%
*-un-lft-identity87.1%
remove-double-neg87.1%
distribute-neg-in87.1%
add-sqr-sqrt45.6%
sqrt-unprod85.8%
sqr-neg85.8%
sqrt-unprod41.5%
add-sqr-sqrt87.0%
sub-neg87.0%
Applied egg-rr87.0%
Taylor expanded in t1 around inf 40.7%
if -1.45000000000000007e142 < u < 2.2e191Initial program 65.7%
times-frac98.0%
Simplified98.0%
Taylor expanded in t1 around inf 68.0%
associate-*r/68.0%
neg-mul-168.0%
Simplified68.0%
Final simplification61.3%
(FPCore (u v t1) :precision binary64 (if (<= u -1.4e+142) (/ (- v) u) (if (<= u 2.8e+191) (/ (- v) t1) (/ v u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.4e+142) {
tmp = -v / u;
} else if (u <= 2.8e+191) {
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 <= (-1.4d+142)) then
tmp = -v / u
else if (u <= 2.8d+191) 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 <= -1.4e+142) {
tmp = -v / u;
} else if (u <= 2.8e+191) {
tmp = -v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.4e+142: tmp = -v / u elif u <= 2.8e+191: tmp = -v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.4e+142) tmp = Float64(Float64(-v) / u); elseif (u <= 2.8e+191) 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 <= -1.4e+142) tmp = -v / u; elseif (u <= 2.8e+191) tmp = -v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.4e+142], N[((-v) / u), $MachinePrecision], If[LessEqual[u, 2.8e+191], N[((-v) / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.4 \cdot 10^{+142}:\\
\;\;\;\;\frac{-v}{u}\\
\mathbf{elif}\;u \leq 2.8 \cdot 10^{+191}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if u < -1.4e142Initial program 76.9%
times-frac99.9%
Simplified99.9%
Taylor expanded in t1 around inf 54.4%
Taylor expanded in t1 around 0 46.8%
associate-*r/46.8%
neg-mul-146.8%
Simplified46.8%
if -1.4e142 < u < 2.7999999999999999e191Initial program 65.7%
times-frac98.0%
Simplified98.0%
Taylor expanded in t1 around inf 68.0%
associate-*r/68.0%
neg-mul-168.0%
Simplified68.0%
if 2.7999999999999999e191 < u Initial program 71.2%
times-frac99.8%
Simplified99.8%
Taylor expanded in t1 around 0 99.8%
*-commutative99.8%
clear-num99.7%
frac-2neg99.7%
frac-times93.2%
*-un-lft-identity93.2%
remove-double-neg93.2%
distribute-neg-in93.2%
add-sqr-sqrt48.3%
sqrt-unprod93.2%
sqr-neg93.2%
sqrt-unprod44.9%
add-sqr-sqrt93.2%
sub-neg93.2%
Applied egg-rr93.2%
Taylor expanded in t1 around inf 33.4%
Final simplification61.4%
(FPCore (u v t1) :precision binary64 (if (<= u -2.7e+141) (* (/ v u) -0.5) (if (<= u 2.4e+191) (/ (- v) t1) (/ v u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -2.7e+141) {
tmp = (v / u) * -0.5;
} else if (u <= 2.4e+191) {
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.7d+141)) then
tmp = (v / u) * (-0.5d0)
else if (u <= 2.4d+191) 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.7e+141) {
tmp = (v / u) * -0.5;
} else if (u <= 2.4e+191) {
tmp = -v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -2.7e+141: tmp = (v / u) * -0.5 elif u <= 2.4e+191: tmp = -v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -2.7e+141) tmp = Float64(Float64(v / u) * -0.5); elseif (u <= 2.4e+191) 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.7e+141) tmp = (v / u) * -0.5; elseif (u <= 2.4e+191) tmp = -v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -2.7e+141], N[(N[(v / u), $MachinePrecision] * -0.5), $MachinePrecision], If[LessEqual[u, 2.4e+191], N[((-v) / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.7 \cdot 10^{+141}:\\
\;\;\;\;\frac{v}{u} \cdot -0.5\\
\mathbf{elif}\;u \leq 2.4 \cdot 10^{+191}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if u < -2.7000000000000001e141Initial program 76.9%
associate-/r*89.0%
*-commutative89.0%
associate-/l*99.8%
associate-/l/85.5%
+-commutative85.5%
remove-double-neg85.5%
unsub-neg85.5%
div-sub85.5%
sub-neg85.5%
*-inverses85.5%
metadata-eval85.5%
Simplified85.5%
Taylor expanded in t1 around inf 52.1%
mul-1-neg52.1%
unsub-neg52.1%
*-commutative52.1%
Simplified52.1%
Taylor expanded in u around inf 46.8%
if -2.7000000000000001e141 < u < 2.39999999999999986e191Initial program 65.7%
times-frac98.0%
Simplified98.0%
Taylor expanded in t1 around inf 68.0%
associate-*r/68.0%
neg-mul-168.0%
Simplified68.0%
if 2.39999999999999986e191 < u Initial program 71.2%
times-frac99.8%
Simplified99.8%
Taylor expanded in t1 around 0 99.8%
*-commutative99.8%
clear-num99.7%
frac-2neg99.7%
frac-times93.2%
*-un-lft-identity93.2%
remove-double-neg93.2%
distribute-neg-in93.2%
add-sqr-sqrt48.3%
sqrt-unprod93.2%
sqr-neg93.2%
sqrt-unprod44.9%
add-sqr-sqrt93.2%
sub-neg93.2%
Applied egg-rr93.2%
Taylor expanded in t1 around inf 33.4%
Final simplification61.4%
(FPCore (u v t1) :precision binary64 (if (<= u 3.4e+196) (/ (- v) (+ t1 u)) (* v (/ t1 (* t1 u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= 3.4e+196) {
tmp = -v / (t1 + u);
} else {
tmp = v * (t1 / (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 <= 3.4d+196) then
tmp = -v / (t1 + u)
else
tmp = v * (t1 / (t1 * u))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= 3.4e+196) {
tmp = -v / (t1 + u);
} else {
tmp = v * (t1 / (t1 * u));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= 3.4e+196: tmp = -v / (t1 + u) else: tmp = v * (t1 / (t1 * u)) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= 3.4e+196) tmp = Float64(Float64(-v) / Float64(t1 + u)); else tmp = Float64(v * Float64(t1 / Float64(t1 * u))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= 3.4e+196) tmp = -v / (t1 + u); else tmp = v * (t1 / (t1 * u)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, 3.4e+196], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision], N[(v * N[(t1 / N[(t1 * u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq 3.4 \cdot 10^{+196}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\mathbf{else}:\\
\;\;\;\;v \cdot \frac{t1}{t1 \cdot u}\\
\end{array}
\end{array}
if u < 3.4e196Initial program 67.2%
times-frac98.3%
Simplified98.3%
Taylor expanded in t1 around inf 67.7%
Taylor expanded in v around 0 66.2%
associate-*r/66.2%
neg-mul-166.2%
+-commutative66.2%
Simplified66.2%
if 3.4e196 < u Initial program 73.5%
times-frac99.8%
Simplified99.8%
Taylor expanded in t1 around 0 99.8%
*-commutative99.8%
clear-num99.8%
frac-2neg99.8%
frac-times96.3%
*-un-lft-identity96.3%
remove-double-neg96.3%
distribute-neg-in96.3%
add-sqr-sqrt50.2%
sqrt-unprod96.3%
sqr-neg96.3%
sqrt-unprod46.2%
add-sqr-sqrt96.3%
sub-neg96.3%
Applied egg-rr96.3%
Taylor expanded in u around 0 52.6%
associate-/r/52.6%
*-commutative52.6%
Applied egg-rr52.6%
Final simplification64.8%
(FPCore (u v t1) :precision binary64 (if (<= u 3.4e+196) (/ v (- (* u -2.0) t1)) (* v (/ t1 (* t1 u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= 3.4e+196) {
tmp = v / ((u * -2.0) - t1);
} else {
tmp = v * (t1 / (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 <= 3.4d+196) then
tmp = v / ((u * (-2.0d0)) - t1)
else
tmp = v * (t1 / (t1 * u))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= 3.4e+196) {
tmp = v / ((u * -2.0) - t1);
} else {
tmp = v * (t1 / (t1 * u));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= 3.4e+196: tmp = v / ((u * -2.0) - t1) else: tmp = v * (t1 / (t1 * u)) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= 3.4e+196) tmp = Float64(v / Float64(Float64(u * -2.0) - t1)); else tmp = Float64(v * Float64(t1 / Float64(t1 * u))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= 3.4e+196) tmp = v / ((u * -2.0) - t1); else tmp = v * (t1 / (t1 * u)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, 3.4e+196], N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision], N[(v * N[(t1 / N[(t1 * u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq 3.4 \cdot 10^{+196}:\\
\;\;\;\;\frac{v}{u \cdot -2 - t1}\\
\mathbf{else}:\\
\;\;\;\;v \cdot \frac{t1}{t1 \cdot u}\\
\end{array}
\end{array}
if u < 3.4e196Initial program 67.2%
associate-/r*79.8%
*-commutative79.8%
associate-/l*98.6%
associate-/l/95.2%
+-commutative95.2%
remove-double-neg95.2%
unsub-neg95.2%
div-sub95.2%
sub-neg95.2%
*-inverses95.2%
metadata-eval95.2%
Simplified95.2%
Taylor expanded in t1 around inf 66.3%
mul-1-neg66.3%
unsub-neg66.3%
*-commutative66.3%
Simplified66.3%
if 3.4e196 < u Initial program 73.5%
times-frac99.8%
Simplified99.8%
Taylor expanded in t1 around 0 99.8%
*-commutative99.8%
clear-num99.8%
frac-2neg99.8%
frac-times96.3%
*-un-lft-identity96.3%
remove-double-neg96.3%
distribute-neg-in96.3%
add-sqr-sqrt50.2%
sqrt-unprod96.3%
sqr-neg96.3%
sqrt-unprod46.2%
add-sqr-sqrt96.3%
sub-neg96.3%
Applied egg-rr96.3%
Taylor expanded in u around 0 52.6%
associate-/r/52.6%
*-commutative52.6%
Applied egg-rr52.6%
Final simplification64.9%
(FPCore (u v t1) :precision binary64 (if (<= t1 -9.8e+131) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -9.8e+131) {
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 <= (-9.8d+131)) 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 <= -9.8e+131) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -9.8e+131: tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -9.8e+131) 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 <= -9.8e+131) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -9.8e+131], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -9.8 \cdot 10^{+131}:\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -9.80000000000000064e131Initial program 32.4%
times-frac100.0%
Simplified100.0%
clear-num99.9%
frac-times92.5%
*-un-lft-identity92.5%
frac-2neg92.5%
distribute-neg-in92.5%
add-sqr-sqrt91.8%
sqrt-unprod36.5%
sqr-neg36.5%
sqrt-unprod0.0%
add-sqr-sqrt30.5%
sub-neg30.5%
remove-double-neg30.5%
Applied egg-rr30.5%
associate-/l/37.9%
Simplified37.9%
Taylor expanded in t1 around inf 21.0%
if -9.80000000000000064e131 < t1 Initial program 75.2%
times-frac98.1%
Simplified98.1%
Taylor expanded in t1 around 0 53.8%
*-commutative53.8%
clear-num54.0%
frac-2neg54.0%
frac-times53.5%
*-un-lft-identity53.5%
remove-double-neg53.5%
distribute-neg-in53.5%
add-sqr-sqrt25.4%
sqrt-unprod54.9%
sqr-neg54.9%
sqrt-unprod28.2%
add-sqr-sqrt54.8%
sub-neg54.8%
Applied egg-rr54.8%
Taylor expanded in t1 around inf 16.4%
Final simplification17.2%
(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(Float64(-v) / 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}{t1 + u}
\end{array}
Initial program 67.9%
times-frac98.4%
Simplified98.4%
Taylor expanded in t1 around inf 65.8%
Taylor expanded in v around 0 63.0%
associate-*r/63.0%
neg-mul-163.0%
+-commutative63.0%
Simplified63.0%
Final simplification63.0%
(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 67.9%
times-frac98.4%
Simplified98.4%
clear-num98.4%
frac-times93.8%
*-un-lft-identity93.8%
frac-2neg93.8%
distribute-neg-in93.8%
add-sqr-sqrt47.0%
sqrt-unprod59.2%
sqr-neg59.2%
sqrt-unprod22.6%
add-sqr-sqrt48.1%
sub-neg48.1%
remove-double-neg48.1%
Applied egg-rr48.1%
associate-/l/52.7%
Simplified52.7%
Taylor expanded in t1 around inf 8.4%
Final simplification8.4%
herbie shell --seed 2024041
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))