
(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 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (u v t1) :precision binary64 (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))
double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-t1 * v) / ((t1 + u) * (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
def code(u, v, t1): return (-t1 * v) / ((t1 + u) * (t1 + u))
function code(u, v, t1) return Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (-t1 * v) / ((t1 + u) * (t1 + u)); end
code[u_, v_, t1_] := N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}
\end{array}
(FPCore (u v t1) :precision binary64 (/ (/ (- v) (+ t1 u)) (+ (/ u t1) 1.0)))
double code(double u, double v, double t1) {
return (-v / (t1 + u)) / ((u / t1) + 1.0);
}
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)) / ((u / t1) + 1.0d0)
end function
public static double code(double u, double v, double t1) {
return (-v / (t1 + u)) / ((u / t1) + 1.0);
}
def code(u, v, t1): return (-v / (t1 + u)) / ((u / t1) + 1.0)
function code(u, v, t1) return Float64(Float64(Float64(-v) / Float64(t1 + u)) / Float64(Float64(u / t1) + 1.0)) end
function tmp = code(u, v, t1) tmp = (-v / (t1 + u)) / ((u / t1) + 1.0); end
code[u_, v_, t1_] := N[(N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[(N[(u / t1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{-v}{t1 + u}}{\frac{u}{t1} + 1}
\end{array}
Initial program 73.2%
times-frac97.6%
neg-mul-197.6%
associate-/l*97.6%
associate-*l/97.7%
neg-mul-197.7%
distribute-frac-neg97.7%
+-commutative97.7%
remove-double-neg97.7%
unsub-neg97.7%
div-sub97.7%
sub-neg97.7%
distribute-frac-neg97.7%
remove-double-neg97.7%
*-inverses97.7%
Simplified97.7%
Final simplification97.7%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ (- v) (+ t1 (* u 2.0)))) (t_2 (/ t1 (* u (/ (- t1 u) v)))))
(if (<= u -8.6e-34)
t_2
(if (<= u 4.5e-73)
t_1
(if (<= u 2.45e-48)
(* v (/ (/ t1 u) (- t1 u)))
(if (<= u 68000000000000.0)
t_1
(if (<= u 5.6e+152) t_2 (/ (* t1 (/ v u)) (- u)))))))))
double code(double u, double v, double t1) {
double t_1 = -v / (t1 + (u * 2.0));
double t_2 = t1 / (u * ((t1 - u) / v));
double tmp;
if (u <= -8.6e-34) {
tmp = t_2;
} else if (u <= 4.5e-73) {
tmp = t_1;
} else if (u <= 2.45e-48) {
tmp = v * ((t1 / u) / (t1 - u));
} else if (u <= 68000000000000.0) {
tmp = t_1;
} else if (u <= 5.6e+152) {
tmp = t_2;
} else {
tmp = (t1 * (v / u)) / -u;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = -v / (t1 + (u * 2.0d0))
t_2 = t1 / (u * ((t1 - u) / v))
if (u <= (-8.6d-34)) then
tmp = t_2
else if (u <= 4.5d-73) then
tmp = t_1
else if (u <= 2.45d-48) then
tmp = v * ((t1 / u) / (t1 - u))
else if (u <= 68000000000000.0d0) then
tmp = t_1
else if (u <= 5.6d+152) then
tmp = t_2
else
tmp = (t1 * (v / u)) / -u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = -v / (t1 + (u * 2.0));
double t_2 = t1 / (u * ((t1 - u) / v));
double tmp;
if (u <= -8.6e-34) {
tmp = t_2;
} else if (u <= 4.5e-73) {
tmp = t_1;
} else if (u <= 2.45e-48) {
tmp = v * ((t1 / u) / (t1 - u));
} else if (u <= 68000000000000.0) {
tmp = t_1;
} else if (u <= 5.6e+152) {
tmp = t_2;
} else {
tmp = (t1 * (v / u)) / -u;
}
return tmp;
}
def code(u, v, t1): t_1 = -v / (t1 + (u * 2.0)) t_2 = t1 / (u * ((t1 - u) / v)) tmp = 0 if u <= -8.6e-34: tmp = t_2 elif u <= 4.5e-73: tmp = t_1 elif u <= 2.45e-48: tmp = v * ((t1 / u) / (t1 - u)) elif u <= 68000000000000.0: tmp = t_1 elif u <= 5.6e+152: tmp = t_2 else: tmp = (t1 * (v / u)) / -u return tmp
function code(u, v, t1) t_1 = Float64(Float64(-v) / Float64(t1 + Float64(u * 2.0))) t_2 = Float64(t1 / Float64(u * Float64(Float64(t1 - u) / v))) tmp = 0.0 if (u <= -8.6e-34) tmp = t_2; elseif (u <= 4.5e-73) tmp = t_1; elseif (u <= 2.45e-48) tmp = Float64(v * Float64(Float64(t1 / u) / Float64(t1 - u))); elseif (u <= 68000000000000.0) tmp = t_1; elseif (u <= 5.6e+152) tmp = t_2; else tmp = Float64(Float64(t1 * Float64(v / u)) / Float64(-u)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = -v / (t1 + (u * 2.0)); t_2 = t1 / (u * ((t1 - u) / v)); tmp = 0.0; if (u <= -8.6e-34) tmp = t_2; elseif (u <= 4.5e-73) tmp = t_1; elseif (u <= 2.45e-48) tmp = v * ((t1 / u) / (t1 - u)); elseif (u <= 68000000000000.0) tmp = t_1; elseif (u <= 5.6e+152) tmp = t_2; else tmp = (t1 * (v / u)) / -u; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-v) / N[(t1 + N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t1 / N[(u * N[(N[(t1 - u), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[u, -8.6e-34], t$95$2, If[LessEqual[u, 4.5e-73], t$95$1, If[LessEqual[u, 2.45e-48], N[(v * N[(N[(t1 / u), $MachinePrecision] / N[(t1 - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 68000000000000.0], t$95$1, If[LessEqual[u, 5.6e+152], t$95$2, N[(N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-v}{t1 + u \cdot 2}\\
t_2 := \frac{t1}{u \cdot \frac{t1 - u}{v}}\\
\mathbf{if}\;u \leq -8.6 \cdot 10^{-34}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;u \leq 4.5 \cdot 10^{-73}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;u \leq 2.45 \cdot 10^{-48}:\\
\;\;\;\;v \cdot \frac{\frac{t1}{u}}{t1 - u}\\
\mathbf{elif}\;u \leq 68000000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;u \leq 5.6 \cdot 10^{+152}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{u}}{-u}\\
\end{array}
\end{array}
if u < -8.5999999999999999e-34 or 6.8e13 < u < 5.6000000000000004e152Initial program 83.0%
times-frac98.7%
Simplified98.7%
Taylor expanded in t1 around 0 87.9%
mul-1-neg87.9%
distribute-neg-frac87.9%
Simplified87.9%
*-commutative87.9%
clear-num88.5%
frac-times87.6%
*-un-lft-identity87.6%
add-sqr-sqrt52.2%
sqrt-unprod59.8%
sqr-neg59.8%
sqrt-unprod22.2%
add-sqr-sqrt55.6%
frac-2neg55.6%
add-sqr-sqrt26.9%
sqrt-unprod65.5%
sqr-neg65.5%
sqrt-unprod49.3%
add-sqr-sqrt87.6%
distribute-neg-in87.6%
add-sqr-sqrt52.3%
sqrt-unprod86.5%
sqr-neg86.5%
sqrt-unprod35.3%
add-sqr-sqrt87.4%
sub-neg87.4%
Applied egg-rr87.4%
if -8.5999999999999999e-34 < u < 4.5e-73 or 2.4500000000000001e-48 < u < 6.8e13Initial program 65.5%
times-frac97.5%
neg-mul-197.5%
associate-/l*97.5%
associate-*l/97.6%
neg-mul-197.6%
distribute-frac-neg97.6%
+-commutative97.6%
remove-double-neg97.6%
unsub-neg97.6%
div-sub97.6%
sub-neg97.6%
distribute-frac-neg97.6%
remove-double-neg97.6%
*-inverses97.6%
Simplified97.6%
Taylor expanded in v around 0 100.0%
mul-1-neg100.0%
+-commutative100.0%
*-commutative100.0%
distribute-neg-frac100.0%
Simplified100.0%
Taylor expanded in t1 around inf 82.9%
*-commutative82.9%
Simplified82.9%
if 4.5e-73 < u < 2.4500000000000001e-48Initial program 78.8%
times-frac89.2%
Simplified89.2%
Taylor expanded in t1 around 0 86.5%
mul-1-neg86.5%
distribute-neg-frac86.5%
Simplified86.5%
clear-num86.5%
frac-times86.3%
*-commutative86.3%
*-un-lft-identity86.3%
add-sqr-sqrt54.7%
sqrt-unprod30.2%
sqr-neg30.2%
sqrt-unprod1.1%
add-sqr-sqrt13.3%
frac-2neg13.3%
add-sqr-sqrt1.2%
sqrt-unprod43.5%
sqr-neg43.5%
sqrt-unprod42.0%
add-sqr-sqrt86.3%
distribute-neg-in86.3%
add-sqr-sqrt55.2%
sqrt-unprod86.0%
sqr-neg86.0%
sqrt-unprod30.8%
add-sqr-sqrt86.0%
sub-neg86.0%
Applied egg-rr86.0%
associate-/r*85.9%
associate-/r/96.5%
Simplified96.5%
if 5.6000000000000004e152 < u Initial program 71.6%
times-frac97.1%
Simplified97.1%
Taylor expanded in t1 around 0 96.4%
mul-1-neg96.4%
distribute-neg-frac96.4%
Simplified96.4%
Taylor expanded in t1 around 0 96.4%
frac-2neg96.4%
remove-double-neg96.4%
associate-*l/99.1%
Applied egg-rr99.1%
Final simplification87.1%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ (- v) (+ t1 (* u 2.0)))) (t_2 (/ t1 (* u (/ (- t1 u) v)))))
(if (<= u -1e-33)
t_2
(if (<= u 8.2e-72)
t_1
(if (<= u 1.8e-48)
(/ v (* (/ u t1) (- t1 u)))
(if (<= u 1.2e+29)
t_1
(if (<= u 5.6e+152) t_2 (/ (* t1 (/ v u)) (- u)))))))))
double code(double u, double v, double t1) {
double t_1 = -v / (t1 + (u * 2.0));
double t_2 = t1 / (u * ((t1 - u) / v));
double tmp;
if (u <= -1e-33) {
tmp = t_2;
} else if (u <= 8.2e-72) {
tmp = t_1;
} else if (u <= 1.8e-48) {
tmp = v / ((u / t1) * (t1 - u));
} else if (u <= 1.2e+29) {
tmp = t_1;
} else if (u <= 5.6e+152) {
tmp = t_2;
} else {
tmp = (t1 * (v / u)) / -u;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = -v / (t1 + (u * 2.0d0))
t_2 = t1 / (u * ((t1 - u) / v))
if (u <= (-1d-33)) then
tmp = t_2
else if (u <= 8.2d-72) then
tmp = t_1
else if (u <= 1.8d-48) then
tmp = v / ((u / t1) * (t1 - u))
else if (u <= 1.2d+29) then
tmp = t_1
else if (u <= 5.6d+152) then
tmp = t_2
else
tmp = (t1 * (v / u)) / -u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = -v / (t1 + (u * 2.0));
double t_2 = t1 / (u * ((t1 - u) / v));
double tmp;
if (u <= -1e-33) {
tmp = t_2;
} else if (u <= 8.2e-72) {
tmp = t_1;
} else if (u <= 1.8e-48) {
tmp = v / ((u / t1) * (t1 - u));
} else if (u <= 1.2e+29) {
tmp = t_1;
} else if (u <= 5.6e+152) {
tmp = t_2;
} else {
tmp = (t1 * (v / u)) / -u;
}
return tmp;
}
def code(u, v, t1): t_1 = -v / (t1 + (u * 2.0)) t_2 = t1 / (u * ((t1 - u) / v)) tmp = 0 if u <= -1e-33: tmp = t_2 elif u <= 8.2e-72: tmp = t_1 elif u <= 1.8e-48: tmp = v / ((u / t1) * (t1 - u)) elif u <= 1.2e+29: tmp = t_1 elif u <= 5.6e+152: tmp = t_2 else: tmp = (t1 * (v / u)) / -u return tmp
function code(u, v, t1) t_1 = Float64(Float64(-v) / Float64(t1 + Float64(u * 2.0))) t_2 = Float64(t1 / Float64(u * Float64(Float64(t1 - u) / v))) tmp = 0.0 if (u <= -1e-33) tmp = t_2; elseif (u <= 8.2e-72) tmp = t_1; elseif (u <= 1.8e-48) tmp = Float64(v / Float64(Float64(u / t1) * Float64(t1 - u))); elseif (u <= 1.2e+29) tmp = t_1; elseif (u <= 5.6e+152) tmp = t_2; else tmp = Float64(Float64(t1 * Float64(v / u)) / Float64(-u)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = -v / (t1 + (u * 2.0)); t_2 = t1 / (u * ((t1 - u) / v)); tmp = 0.0; if (u <= -1e-33) tmp = t_2; elseif (u <= 8.2e-72) tmp = t_1; elseif (u <= 1.8e-48) tmp = v / ((u / t1) * (t1 - u)); elseif (u <= 1.2e+29) tmp = t_1; elseif (u <= 5.6e+152) tmp = t_2; else tmp = (t1 * (v / u)) / -u; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-v) / N[(t1 + N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t1 / N[(u * N[(N[(t1 - u), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[u, -1e-33], t$95$2, If[LessEqual[u, 8.2e-72], t$95$1, If[LessEqual[u, 1.8e-48], N[(v / N[(N[(u / t1), $MachinePrecision] * N[(t1 - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 1.2e+29], t$95$1, If[LessEqual[u, 5.6e+152], t$95$2, N[(N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-v}{t1 + u \cdot 2}\\
t_2 := \frac{t1}{u \cdot \frac{t1 - u}{v}}\\
\mathbf{if}\;u \leq -1 \cdot 10^{-33}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;u \leq 8.2 \cdot 10^{-72}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;u \leq 1.8 \cdot 10^{-48}:\\
\;\;\;\;\frac{v}{\frac{u}{t1} \cdot \left(t1 - u\right)}\\
\mathbf{elif}\;u \leq 1.2 \cdot 10^{+29}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;u \leq 5.6 \cdot 10^{+152}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{u}}{-u}\\
\end{array}
\end{array}
if u < -1.0000000000000001e-33 or 1.2e29 < u < 5.6000000000000004e152Initial program 83.0%
times-frac98.7%
Simplified98.7%
Taylor expanded in t1 around 0 87.9%
mul-1-neg87.9%
distribute-neg-frac87.9%
Simplified87.9%
*-commutative87.9%
clear-num88.5%
frac-times87.6%
*-un-lft-identity87.6%
add-sqr-sqrt52.2%
sqrt-unprod59.8%
sqr-neg59.8%
sqrt-unprod22.2%
add-sqr-sqrt55.6%
frac-2neg55.6%
add-sqr-sqrt26.9%
sqrt-unprod65.5%
sqr-neg65.5%
sqrt-unprod49.3%
add-sqr-sqrt87.6%
distribute-neg-in87.6%
add-sqr-sqrt52.3%
sqrt-unprod86.5%
sqr-neg86.5%
sqrt-unprod35.3%
add-sqr-sqrt87.4%
sub-neg87.4%
Applied egg-rr87.4%
if -1.0000000000000001e-33 < u < 8.20000000000000007e-72 or 1.8000000000000001e-48 < u < 1.2e29Initial program 65.5%
times-frac97.5%
neg-mul-197.5%
associate-/l*97.5%
associate-*l/97.6%
neg-mul-197.6%
distribute-frac-neg97.6%
+-commutative97.6%
remove-double-neg97.6%
unsub-neg97.6%
div-sub97.6%
sub-neg97.6%
distribute-frac-neg97.6%
remove-double-neg97.6%
*-inverses97.6%
Simplified97.6%
Taylor expanded in v around 0 100.0%
mul-1-neg100.0%
+-commutative100.0%
*-commutative100.0%
distribute-neg-frac100.0%
Simplified100.0%
Taylor expanded in t1 around inf 82.9%
*-commutative82.9%
Simplified82.9%
if 8.20000000000000007e-72 < u < 1.8000000000000001e-48Initial program 78.8%
times-frac89.2%
Simplified89.2%
Taylor expanded in t1 around 0 86.5%
mul-1-neg86.5%
distribute-neg-frac86.5%
Simplified86.5%
expm1-log1p-u55.6%
expm1-udef13.5%
Applied egg-rr13.5%
expm1-def55.4%
expm1-log1p96.6%
Simplified96.6%
if 5.6000000000000004e152 < u Initial program 71.6%
times-frac97.1%
Simplified97.1%
Taylor expanded in t1 around 0 96.4%
mul-1-neg96.4%
distribute-neg-frac96.4%
Simplified96.4%
Taylor expanded in t1 around 0 96.4%
frac-2neg96.4%
remove-double-neg96.4%
associate-*l/99.1%
Applied egg-rr99.1%
Final simplification87.1%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ (- v) (+ t1 (* u 2.0))))
(t_2 (/ (* t1 (/ v (+ t1 u))) (- t1 u))))
(if (<= u -2.2e-34)
t_2
(if (<= u 8.2e-72)
t_1
(if (<= u 2.8e-48)
(/ v (* (/ u t1) (- t1 u)))
(if (<= u 75000000000000.0) t_1 t_2))))))
double code(double u, double v, double t1) {
double t_1 = -v / (t1 + (u * 2.0));
double t_2 = (t1 * (v / (t1 + u))) / (t1 - u);
double tmp;
if (u <= -2.2e-34) {
tmp = t_2;
} else if (u <= 8.2e-72) {
tmp = t_1;
} else if (u <= 2.8e-48) {
tmp = v / ((u / t1) * (t1 - u));
} else if (u <= 75000000000000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = -v / (t1 + (u * 2.0d0))
t_2 = (t1 * (v / (t1 + u))) / (t1 - u)
if (u <= (-2.2d-34)) then
tmp = t_2
else if (u <= 8.2d-72) then
tmp = t_1
else if (u <= 2.8d-48) then
tmp = v / ((u / t1) * (t1 - u))
else if (u <= 75000000000000.0d0) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = -v / (t1 + (u * 2.0));
double t_2 = (t1 * (v / (t1 + u))) / (t1 - u);
double tmp;
if (u <= -2.2e-34) {
tmp = t_2;
} else if (u <= 8.2e-72) {
tmp = t_1;
} else if (u <= 2.8e-48) {
tmp = v / ((u / t1) * (t1 - u));
} else if (u <= 75000000000000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(u, v, t1): t_1 = -v / (t1 + (u * 2.0)) t_2 = (t1 * (v / (t1 + u))) / (t1 - u) tmp = 0 if u <= -2.2e-34: tmp = t_2 elif u <= 8.2e-72: tmp = t_1 elif u <= 2.8e-48: tmp = v / ((u / t1) * (t1 - u)) elif u <= 75000000000000.0: tmp = t_1 else: tmp = t_2 return tmp
function code(u, v, t1) t_1 = Float64(Float64(-v) / Float64(t1 + Float64(u * 2.0))) t_2 = Float64(Float64(t1 * Float64(v / Float64(t1 + u))) / Float64(t1 - u)) tmp = 0.0 if (u <= -2.2e-34) tmp = t_2; elseif (u <= 8.2e-72) tmp = t_1; elseif (u <= 2.8e-48) tmp = Float64(v / Float64(Float64(u / t1) * Float64(t1 - u))); elseif (u <= 75000000000000.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(u, v, t1) t_1 = -v / (t1 + (u * 2.0)); t_2 = (t1 * (v / (t1 + u))) / (t1 - u); tmp = 0.0; if (u <= -2.2e-34) tmp = t_2; elseif (u <= 8.2e-72) tmp = t_1; elseif (u <= 2.8e-48) tmp = v / ((u / t1) * (t1 - u)); elseif (u <= 75000000000000.0) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-v) / N[(t1 + N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t1 * N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t1 - u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[u, -2.2e-34], t$95$2, If[LessEqual[u, 8.2e-72], t$95$1, If[LessEqual[u, 2.8e-48], N[(v / N[(N[(u / t1), $MachinePrecision] * N[(t1 - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 75000000000000.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-v}{t1 + u \cdot 2}\\
t_2 := \frac{t1 \cdot \frac{v}{t1 + u}}{t1 - u}\\
\mathbf{if}\;u \leq -2.2 \cdot 10^{-34}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;u \leq 8.2 \cdot 10^{-72}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;u \leq 2.8 \cdot 10^{-48}:\\
\;\;\;\;\frac{v}{\frac{u}{t1} \cdot \left(t1 - u\right)}\\
\mathbf{elif}\;u \leq 75000000000000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if u < -2.1999999999999999e-34 or 7.5e13 < u Initial program 80.0%
times-frac98.3%
Simplified98.3%
frac-2neg98.3%
remove-double-neg98.3%
associate-*l/99.8%
distribute-neg-in99.8%
add-sqr-sqrt57.7%
sqrt-unprod90.2%
sqr-neg90.2%
sqrt-unprod40.2%
add-sqr-sqrt91.8%
sub-neg91.8%
Applied egg-rr91.8%
if -2.1999999999999999e-34 < u < 8.20000000000000007e-72 or 2.80000000000000005e-48 < u < 7.5e13Initial program 65.5%
times-frac97.5%
neg-mul-197.5%
associate-/l*97.5%
associate-*l/97.6%
neg-mul-197.6%
distribute-frac-neg97.6%
+-commutative97.6%
remove-double-neg97.6%
unsub-neg97.6%
div-sub97.6%
sub-neg97.6%
distribute-frac-neg97.6%
remove-double-neg97.6%
*-inverses97.6%
Simplified97.6%
Taylor expanded in v around 0 100.0%
mul-1-neg100.0%
+-commutative100.0%
*-commutative100.0%
distribute-neg-frac100.0%
Simplified100.0%
Taylor expanded in t1 around inf 82.9%
*-commutative82.9%
Simplified82.9%
if 8.20000000000000007e-72 < u < 2.80000000000000005e-48Initial program 78.8%
times-frac89.2%
Simplified89.2%
Taylor expanded in t1 around 0 86.5%
mul-1-neg86.5%
distribute-neg-frac86.5%
Simplified86.5%
expm1-log1p-u55.6%
expm1-udef13.5%
Applied egg-rr13.5%
expm1-def55.4%
expm1-log1p96.6%
Simplified96.6%
Final simplification87.8%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ (- v) (+ t1 (* u 2.0)))) (t_2 (/ (* t1 (/ v u)) (- u))))
(if (<= u -1.9e-32)
t_2
(if (<= u 7e-72)
t_1
(if (<= u 2.45e-48)
(* (/ t1 u) (/ (- v) u))
(if (<= u 6.5e+19)
t_1
(if (<= u 5.6e+152) (/ t1 (* (- u) (/ u v))) t_2)))))))
double code(double u, double v, double t1) {
double t_1 = -v / (t1 + (u * 2.0));
double t_2 = (t1 * (v / u)) / -u;
double tmp;
if (u <= -1.9e-32) {
tmp = t_2;
} else if (u <= 7e-72) {
tmp = t_1;
} else if (u <= 2.45e-48) {
tmp = (t1 / u) * (-v / u);
} else if (u <= 6.5e+19) {
tmp = t_1;
} else if (u <= 5.6e+152) {
tmp = t1 / (-u * (u / v));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = -v / (t1 + (u * 2.0d0))
t_2 = (t1 * (v / u)) / -u
if (u <= (-1.9d-32)) then
tmp = t_2
else if (u <= 7d-72) then
tmp = t_1
else if (u <= 2.45d-48) then
tmp = (t1 / u) * (-v / u)
else if (u <= 6.5d+19) then
tmp = t_1
else if (u <= 5.6d+152) then
tmp = t1 / (-u * (u / v))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = -v / (t1 + (u * 2.0));
double t_2 = (t1 * (v / u)) / -u;
double tmp;
if (u <= -1.9e-32) {
tmp = t_2;
} else if (u <= 7e-72) {
tmp = t_1;
} else if (u <= 2.45e-48) {
tmp = (t1 / u) * (-v / u);
} else if (u <= 6.5e+19) {
tmp = t_1;
} else if (u <= 5.6e+152) {
tmp = t1 / (-u * (u / v));
} else {
tmp = t_2;
}
return tmp;
}
def code(u, v, t1): t_1 = -v / (t1 + (u * 2.0)) t_2 = (t1 * (v / u)) / -u tmp = 0 if u <= -1.9e-32: tmp = t_2 elif u <= 7e-72: tmp = t_1 elif u <= 2.45e-48: tmp = (t1 / u) * (-v / u) elif u <= 6.5e+19: tmp = t_1 elif u <= 5.6e+152: tmp = t1 / (-u * (u / v)) else: tmp = t_2 return tmp
function code(u, v, t1) t_1 = Float64(Float64(-v) / Float64(t1 + Float64(u * 2.0))) t_2 = Float64(Float64(t1 * Float64(v / u)) / Float64(-u)) tmp = 0.0 if (u <= -1.9e-32) tmp = t_2; elseif (u <= 7e-72) tmp = t_1; elseif (u <= 2.45e-48) tmp = Float64(Float64(t1 / u) * Float64(Float64(-v) / u)); elseif (u <= 6.5e+19) tmp = t_1; elseif (u <= 5.6e+152) tmp = Float64(t1 / Float64(Float64(-u) * Float64(u / v))); else tmp = t_2; end return tmp end
function tmp_2 = code(u, v, t1) t_1 = -v / (t1 + (u * 2.0)); t_2 = (t1 * (v / u)) / -u; tmp = 0.0; if (u <= -1.9e-32) tmp = t_2; elseif (u <= 7e-72) tmp = t_1; elseif (u <= 2.45e-48) tmp = (t1 / u) * (-v / u); elseif (u <= 6.5e+19) tmp = t_1; elseif (u <= 5.6e+152) tmp = t1 / (-u * (u / v)); else tmp = t_2; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-v) / N[(t1 + N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision]}, If[LessEqual[u, -1.9e-32], t$95$2, If[LessEqual[u, 7e-72], t$95$1, If[LessEqual[u, 2.45e-48], N[(N[(t1 / u), $MachinePrecision] * N[((-v) / u), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 6.5e+19], t$95$1, If[LessEqual[u, 5.6e+152], N[(t1 / N[((-u) * N[(u / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-v}{t1 + u \cdot 2}\\
t_2 := \frac{t1 \cdot \frac{v}{u}}{-u}\\
\mathbf{if}\;u \leq -1.9 \cdot 10^{-32}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;u \leq 7 \cdot 10^{-72}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;u \leq 2.45 \cdot 10^{-48}:\\
\;\;\;\;\frac{t1}{u} \cdot \frac{-v}{u}\\
\mathbf{elif}\;u \leq 6.5 \cdot 10^{+19}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;u \leq 5.6 \cdot 10^{+152}:\\
\;\;\;\;\frac{t1}{\left(-u\right) \cdot \frac{u}{v}}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if u < -1.90000000000000004e-32 or 5.6000000000000004e152 < u Initial program 75.4%
times-frac98.8%
Simplified98.8%
Taylor expanded in t1 around 0 88.7%
mul-1-neg88.7%
distribute-neg-frac88.7%
Simplified88.7%
Taylor expanded in t1 around 0 86.7%
frac-2neg86.7%
remove-double-neg86.7%
associate-*l/87.7%
Applied egg-rr87.7%
if -1.90000000000000004e-32 < u < 7.00000000000000001e-72 or 2.4500000000000001e-48 < u < 6.5e19Initial program 65.5%
times-frac97.5%
neg-mul-197.5%
associate-/l*97.5%
associate-*l/97.6%
neg-mul-197.6%
distribute-frac-neg97.6%
+-commutative97.6%
remove-double-neg97.6%
unsub-neg97.6%
div-sub97.6%
sub-neg97.6%
distribute-frac-neg97.6%
remove-double-neg97.6%
*-inverses97.6%
Simplified97.6%
Taylor expanded in v around 0 100.0%
mul-1-neg100.0%
+-commutative100.0%
*-commutative100.0%
distribute-neg-frac100.0%
Simplified100.0%
Taylor expanded in t1 around inf 82.9%
*-commutative82.9%
Simplified82.9%
if 7.00000000000000001e-72 < u < 2.4500000000000001e-48Initial program 78.8%
times-frac89.2%
Simplified89.2%
Taylor expanded in t1 around 0 86.5%
mul-1-neg86.5%
distribute-neg-frac86.5%
Simplified86.5%
Taylor expanded in t1 around 0 86.3%
if 6.5e19 < u < 5.6000000000000004e152Initial program 99.9%
times-frac96.2%
Simplified96.2%
Taylor expanded in t1 around 0 96.2%
mul-1-neg96.2%
distribute-neg-frac96.2%
Simplified96.2%
Taylor expanded in t1 around 0 76.2%
*-commutative76.2%
clear-num76.2%
frac-2neg76.2%
frac-times92.0%
*-un-lft-identity92.0%
remove-double-neg92.0%
Applied egg-rr92.0%
Final simplification85.8%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ (- v) (+ t1 (* u 2.0)))) (t_2 (/ (* t1 (/ v u)) (- u))))
(if (<= u -3.7e-32)
t_2
(if (<= u 5.2e-73)
t_1
(if (<= u 1.8e-48)
(* v (/ (/ t1 u) (- t1 u)))
(if (<= u 2.6e+18)
t_1
(if (<= u 5.6e+152) (/ t1 (* (- u) (/ u v))) t_2)))))))
double code(double u, double v, double t1) {
double t_1 = -v / (t1 + (u * 2.0));
double t_2 = (t1 * (v / u)) / -u;
double tmp;
if (u <= -3.7e-32) {
tmp = t_2;
} else if (u <= 5.2e-73) {
tmp = t_1;
} else if (u <= 1.8e-48) {
tmp = v * ((t1 / u) / (t1 - u));
} else if (u <= 2.6e+18) {
tmp = t_1;
} else if (u <= 5.6e+152) {
tmp = t1 / (-u * (u / v));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = -v / (t1 + (u * 2.0d0))
t_2 = (t1 * (v / u)) / -u
if (u <= (-3.7d-32)) then
tmp = t_2
else if (u <= 5.2d-73) then
tmp = t_1
else if (u <= 1.8d-48) then
tmp = v * ((t1 / u) / (t1 - u))
else if (u <= 2.6d+18) then
tmp = t_1
else if (u <= 5.6d+152) then
tmp = t1 / (-u * (u / v))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = -v / (t1 + (u * 2.0));
double t_2 = (t1 * (v / u)) / -u;
double tmp;
if (u <= -3.7e-32) {
tmp = t_2;
} else if (u <= 5.2e-73) {
tmp = t_1;
} else if (u <= 1.8e-48) {
tmp = v * ((t1 / u) / (t1 - u));
} else if (u <= 2.6e+18) {
tmp = t_1;
} else if (u <= 5.6e+152) {
tmp = t1 / (-u * (u / v));
} else {
tmp = t_2;
}
return tmp;
}
def code(u, v, t1): t_1 = -v / (t1 + (u * 2.0)) t_2 = (t1 * (v / u)) / -u tmp = 0 if u <= -3.7e-32: tmp = t_2 elif u <= 5.2e-73: tmp = t_1 elif u <= 1.8e-48: tmp = v * ((t1 / u) / (t1 - u)) elif u <= 2.6e+18: tmp = t_1 elif u <= 5.6e+152: tmp = t1 / (-u * (u / v)) else: tmp = t_2 return tmp
function code(u, v, t1) t_1 = Float64(Float64(-v) / Float64(t1 + Float64(u * 2.0))) t_2 = Float64(Float64(t1 * Float64(v / u)) / Float64(-u)) tmp = 0.0 if (u <= -3.7e-32) tmp = t_2; elseif (u <= 5.2e-73) tmp = t_1; elseif (u <= 1.8e-48) tmp = Float64(v * Float64(Float64(t1 / u) / Float64(t1 - u))); elseif (u <= 2.6e+18) tmp = t_1; elseif (u <= 5.6e+152) tmp = Float64(t1 / Float64(Float64(-u) * Float64(u / v))); else tmp = t_2; end return tmp end
function tmp_2 = code(u, v, t1) t_1 = -v / (t1 + (u * 2.0)); t_2 = (t1 * (v / u)) / -u; tmp = 0.0; if (u <= -3.7e-32) tmp = t_2; elseif (u <= 5.2e-73) tmp = t_1; elseif (u <= 1.8e-48) tmp = v * ((t1 / u) / (t1 - u)); elseif (u <= 2.6e+18) tmp = t_1; elseif (u <= 5.6e+152) tmp = t1 / (-u * (u / v)); else tmp = t_2; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-v) / N[(t1 + N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision]}, If[LessEqual[u, -3.7e-32], t$95$2, If[LessEqual[u, 5.2e-73], t$95$1, If[LessEqual[u, 1.8e-48], N[(v * N[(N[(t1 / u), $MachinePrecision] / N[(t1 - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 2.6e+18], t$95$1, If[LessEqual[u, 5.6e+152], N[(t1 / N[((-u) * N[(u / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-v}{t1 + u \cdot 2}\\
t_2 := \frac{t1 \cdot \frac{v}{u}}{-u}\\
\mathbf{if}\;u \leq -3.7 \cdot 10^{-32}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;u \leq 5.2 \cdot 10^{-73}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;u \leq 1.8 \cdot 10^{-48}:\\
\;\;\;\;v \cdot \frac{\frac{t1}{u}}{t1 - u}\\
\mathbf{elif}\;u \leq 2.6 \cdot 10^{+18}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;u \leq 5.6 \cdot 10^{+152}:\\
\;\;\;\;\frac{t1}{\left(-u\right) \cdot \frac{u}{v}}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if u < -3.7e-32 or 5.6000000000000004e152 < u Initial program 75.4%
times-frac98.8%
Simplified98.8%
Taylor expanded in t1 around 0 88.7%
mul-1-neg88.7%
distribute-neg-frac88.7%
Simplified88.7%
Taylor expanded in t1 around 0 86.7%
frac-2neg86.7%
remove-double-neg86.7%
associate-*l/87.7%
Applied egg-rr87.7%
if -3.7e-32 < u < 5.2000000000000002e-73 or 1.8000000000000001e-48 < u < 2.6e18Initial program 65.5%
times-frac97.5%
neg-mul-197.5%
associate-/l*97.5%
associate-*l/97.6%
neg-mul-197.6%
distribute-frac-neg97.6%
+-commutative97.6%
remove-double-neg97.6%
unsub-neg97.6%
div-sub97.6%
sub-neg97.6%
distribute-frac-neg97.6%
remove-double-neg97.6%
*-inverses97.6%
Simplified97.6%
Taylor expanded in v around 0 100.0%
mul-1-neg100.0%
+-commutative100.0%
*-commutative100.0%
distribute-neg-frac100.0%
Simplified100.0%
Taylor expanded in t1 around inf 82.9%
*-commutative82.9%
Simplified82.9%
if 5.2000000000000002e-73 < u < 1.8000000000000001e-48Initial program 78.8%
times-frac89.2%
Simplified89.2%
Taylor expanded in t1 around 0 86.5%
mul-1-neg86.5%
distribute-neg-frac86.5%
Simplified86.5%
clear-num86.5%
frac-times86.3%
*-commutative86.3%
*-un-lft-identity86.3%
add-sqr-sqrt54.7%
sqrt-unprod30.2%
sqr-neg30.2%
sqrt-unprod1.1%
add-sqr-sqrt13.3%
frac-2neg13.3%
add-sqr-sqrt1.2%
sqrt-unprod43.5%
sqr-neg43.5%
sqrt-unprod42.0%
add-sqr-sqrt86.3%
distribute-neg-in86.3%
add-sqr-sqrt55.2%
sqrt-unprod86.0%
sqr-neg86.0%
sqrt-unprod30.8%
add-sqr-sqrt86.0%
sub-neg86.0%
Applied egg-rr86.0%
associate-/r*85.9%
associate-/r/96.5%
Simplified96.5%
if 2.6e18 < u < 5.6000000000000004e152Initial program 99.9%
times-frac96.2%
Simplified96.2%
Taylor expanded in t1 around 0 96.2%
mul-1-neg96.2%
distribute-neg-frac96.2%
Simplified96.2%
Taylor expanded in t1 around 0 76.2%
*-commutative76.2%
clear-num76.2%
frac-2neg76.2%
frac-times92.0%
*-un-lft-identity92.0%
remove-double-neg92.0%
Applied egg-rr92.0%
Final simplification86.2%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ (- v) (+ t1 (* u 2.0)))))
(if (<= u -1.15e-32)
(/ (/ t1 u) (/ (- t1 u) v))
(if (<= u 8.2e-72)
t_1
(if (<= u 1.75e-48)
(/ v (* (/ u t1) (- t1 u)))
(if (<= u 1e+14) t_1 (* (/ v (+ t1 u)) (- (/ t1 u)))))))))
double code(double u, double v, double t1) {
double t_1 = -v / (t1 + (u * 2.0));
double tmp;
if (u <= -1.15e-32) {
tmp = (t1 / u) / ((t1 - u) / v);
} else if (u <= 8.2e-72) {
tmp = t_1;
} else if (u <= 1.75e-48) {
tmp = v / ((u / t1) * (t1 - u));
} else if (u <= 1e+14) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = -v / (t1 + (u * 2.0d0))
if (u <= (-1.15d-32)) then
tmp = (t1 / u) / ((t1 - u) / v)
else if (u <= 8.2d-72) then
tmp = t_1
else if (u <= 1.75d-48) then
tmp = v / ((u / t1) * (t1 - u))
else if (u <= 1d+14) then
tmp = t_1
else
tmp = (v / (t1 + u)) * -(t1 / u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = -v / (t1 + (u * 2.0));
double tmp;
if (u <= -1.15e-32) {
tmp = (t1 / u) / ((t1 - u) / v);
} else if (u <= 8.2e-72) {
tmp = t_1;
} else if (u <= 1.75e-48) {
tmp = v / ((u / t1) * (t1 - u));
} else if (u <= 1e+14) {
tmp = t_1;
} else {
tmp = (v / (t1 + u)) * -(t1 / u);
}
return tmp;
}
def code(u, v, t1): t_1 = -v / (t1 + (u * 2.0)) tmp = 0 if u <= -1.15e-32: tmp = (t1 / u) / ((t1 - u) / v) elif u <= 8.2e-72: tmp = t_1 elif u <= 1.75e-48: tmp = v / ((u / t1) * (t1 - u)) elif u <= 1e+14: tmp = t_1 else: tmp = (v / (t1 + u)) * -(t1 / u) return tmp
function code(u, v, t1) t_1 = Float64(Float64(-v) / Float64(t1 + Float64(u * 2.0))) tmp = 0.0 if (u <= -1.15e-32) tmp = Float64(Float64(t1 / u) / Float64(Float64(t1 - u) / v)); elseif (u <= 8.2e-72) tmp = t_1; elseif (u <= 1.75e-48) tmp = Float64(v / Float64(Float64(u / t1) * Float64(t1 - u))); elseif (u <= 1e+14) tmp = t_1; else tmp = Float64(Float64(v / Float64(t1 + u)) * Float64(-Float64(t1 / u))); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = -v / (t1 + (u * 2.0)); tmp = 0.0; if (u <= -1.15e-32) tmp = (t1 / u) / ((t1 - u) / v); elseif (u <= 8.2e-72) tmp = t_1; elseif (u <= 1.75e-48) tmp = v / ((u / t1) * (t1 - u)); elseif (u <= 1e+14) tmp = t_1; else tmp = (v / (t1 + u)) * -(t1 / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-v) / N[(t1 + N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[u, -1.15e-32], N[(N[(t1 / u), $MachinePrecision] / N[(N[(t1 - u), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 8.2e-72], t$95$1, If[LessEqual[u, 1.75e-48], N[(v / N[(N[(u / t1), $MachinePrecision] * N[(t1 - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 1e+14], t$95$1, N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * (-N[(t1 / u), $MachinePrecision])), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-v}{t1 + u \cdot 2}\\
\mathbf{if}\;u \leq -1.15 \cdot 10^{-32}:\\
\;\;\;\;\frac{\frac{t1}{u}}{\frac{t1 - u}{v}}\\
\mathbf{elif}\;u \leq 8.2 \cdot 10^{-72}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;u \leq 1.75 \cdot 10^{-48}:\\
\;\;\;\;\frac{v}{\frac{u}{t1} \cdot \left(t1 - u\right)}\\
\mathbf{elif}\;u \leq 10^{+14}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{t1 + u} \cdot \left(-\frac{t1}{u}\right)\\
\end{array}
\end{array}
if u < -1.15e-32Initial program 77.2%
times-frac99.6%
Simplified99.6%
Taylor expanded in t1 around 0 85.1%
mul-1-neg85.1%
distribute-neg-frac85.1%
Simplified85.1%
clear-num85.9%
un-div-inv86.0%
add-sqr-sqrt55.6%
sqrt-unprod60.9%
sqr-neg60.9%
sqrt-unprod17.5%
add-sqr-sqrt48.0%
frac-2neg48.0%
add-sqr-sqrt25.4%
sqrt-unprod57.3%
sqr-neg57.3%
sqrt-unprod44.7%
add-sqr-sqrt86.0%
distribute-neg-in86.0%
add-sqr-sqrt55.7%
sqrt-unprod81.8%
sqr-neg81.8%
sqrt-unprod30.3%
add-sqr-sqrt85.6%
sub-neg85.6%
Applied egg-rr85.6%
if -1.15e-32 < u < 8.20000000000000007e-72 or 1.74999999999999996e-48 < u < 1e14Initial program 65.5%
times-frac97.5%
neg-mul-197.5%
associate-/l*97.5%
associate-*l/97.6%
neg-mul-197.6%
distribute-frac-neg97.6%
+-commutative97.6%
remove-double-neg97.6%
unsub-neg97.6%
div-sub97.6%
sub-neg97.6%
distribute-frac-neg97.6%
remove-double-neg97.6%
*-inverses97.6%
Simplified97.6%
Taylor expanded in v around 0 100.0%
mul-1-neg100.0%
+-commutative100.0%
*-commutative100.0%
distribute-neg-frac100.0%
Simplified100.0%
Taylor expanded in t1 around inf 82.9%
*-commutative82.9%
Simplified82.9%
if 8.20000000000000007e-72 < u < 1.74999999999999996e-48Initial program 78.8%
times-frac89.2%
Simplified89.2%
Taylor expanded in t1 around 0 86.5%
mul-1-neg86.5%
distribute-neg-frac86.5%
Simplified86.5%
expm1-log1p-u55.6%
expm1-udef13.5%
Applied egg-rr13.5%
expm1-def55.4%
expm1-log1p96.6%
Simplified96.6%
if 1e14 < u Initial program 83.5%
times-frac96.7%
Simplified96.7%
Taylor expanded in t1 around 0 96.3%
mul-1-neg96.3%
distribute-neg-frac96.3%
Simplified96.3%
Final simplification87.1%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ (- v) (+ t1 (* u 2.0)))) (t_2 (/ (/ t1 u) (/ (- t1 u) v))))
(if (<= u -7.4e-35)
t_2
(if (<= u 8.2e-72)
t_1
(if (<= u 3.5e-48)
(/ v (* (/ u t1) (- t1 u)))
(if (<= u 2.15e+14) t_1 t_2))))))
double code(double u, double v, double t1) {
double t_1 = -v / (t1 + (u * 2.0));
double t_2 = (t1 / u) / ((t1 - u) / v);
double tmp;
if (u <= -7.4e-35) {
tmp = t_2;
} else if (u <= 8.2e-72) {
tmp = t_1;
} else if (u <= 3.5e-48) {
tmp = v / ((u / t1) * (t1 - u));
} else if (u <= 2.15e+14) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = -v / (t1 + (u * 2.0d0))
t_2 = (t1 / u) / ((t1 - u) / v)
if (u <= (-7.4d-35)) then
tmp = t_2
else if (u <= 8.2d-72) then
tmp = t_1
else if (u <= 3.5d-48) then
tmp = v / ((u / t1) * (t1 - u))
else if (u <= 2.15d+14) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = -v / (t1 + (u * 2.0));
double t_2 = (t1 / u) / ((t1 - u) / v);
double tmp;
if (u <= -7.4e-35) {
tmp = t_2;
} else if (u <= 8.2e-72) {
tmp = t_1;
} else if (u <= 3.5e-48) {
tmp = v / ((u / t1) * (t1 - u));
} else if (u <= 2.15e+14) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(u, v, t1): t_1 = -v / (t1 + (u * 2.0)) t_2 = (t1 / u) / ((t1 - u) / v) tmp = 0 if u <= -7.4e-35: tmp = t_2 elif u <= 8.2e-72: tmp = t_1 elif u <= 3.5e-48: tmp = v / ((u / t1) * (t1 - u)) elif u <= 2.15e+14: tmp = t_1 else: tmp = t_2 return tmp
function code(u, v, t1) t_1 = Float64(Float64(-v) / Float64(t1 + Float64(u * 2.0))) t_2 = Float64(Float64(t1 / u) / Float64(Float64(t1 - u) / v)) tmp = 0.0 if (u <= -7.4e-35) tmp = t_2; elseif (u <= 8.2e-72) tmp = t_1; elseif (u <= 3.5e-48) tmp = Float64(v / Float64(Float64(u / t1) * Float64(t1 - u))); elseif (u <= 2.15e+14) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(u, v, t1) t_1 = -v / (t1 + (u * 2.0)); t_2 = (t1 / u) / ((t1 - u) / v); tmp = 0.0; if (u <= -7.4e-35) tmp = t_2; elseif (u <= 8.2e-72) tmp = t_1; elseif (u <= 3.5e-48) tmp = v / ((u / t1) * (t1 - u)); elseif (u <= 2.15e+14) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-v) / N[(t1 + N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t1 / u), $MachinePrecision] / N[(N[(t1 - u), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[u, -7.4e-35], t$95$2, If[LessEqual[u, 8.2e-72], t$95$1, If[LessEqual[u, 3.5e-48], N[(v / N[(N[(u / t1), $MachinePrecision] * N[(t1 - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 2.15e+14], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-v}{t1 + u \cdot 2}\\
t_2 := \frac{\frac{t1}{u}}{\frac{t1 - u}{v}}\\
\mathbf{if}\;u \leq -7.4 \cdot 10^{-35}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;u \leq 8.2 \cdot 10^{-72}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;u \leq 3.5 \cdot 10^{-48}:\\
\;\;\;\;\frac{v}{\frac{u}{t1} \cdot \left(t1 - u\right)}\\
\mathbf{elif}\;u \leq 2.15 \cdot 10^{+14}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if u < -7.3999999999999998e-35 or 2.15e14 < u Initial program 80.0%
times-frac98.3%
Simplified98.3%
Taylor expanded in t1 around 0 90.1%
mul-1-neg90.1%
distribute-neg-frac90.1%
Simplified90.1%
clear-num90.6%
un-div-inv90.6%
add-sqr-sqrt51.0%
sqrt-unprod61.3%
sqr-neg61.3%
sqrt-unprod26.9%
add-sqr-sqrt59.6%
frac-2neg59.6%
add-sqr-sqrt28.1%
sqrt-unprod66.0%
sqr-neg66.0%
sqrt-unprod48.2%
add-sqr-sqrt90.6%
distribute-neg-in90.6%
add-sqr-sqrt51.1%
sqrt-unprod86.2%
sqr-neg86.2%
sqrt-unprod39.5%
add-sqr-sqrt90.4%
sub-neg90.4%
Applied egg-rr90.4%
if -7.3999999999999998e-35 < u < 8.20000000000000007e-72 or 3.49999999999999991e-48 < u < 2.15e14Initial program 65.5%
times-frac97.5%
neg-mul-197.5%
associate-/l*97.5%
associate-*l/97.6%
neg-mul-197.6%
distribute-frac-neg97.6%
+-commutative97.6%
remove-double-neg97.6%
unsub-neg97.6%
div-sub97.6%
sub-neg97.6%
distribute-frac-neg97.6%
remove-double-neg97.6%
*-inverses97.6%
Simplified97.6%
Taylor expanded in v around 0 100.0%
mul-1-neg100.0%
+-commutative100.0%
*-commutative100.0%
distribute-neg-frac100.0%
Simplified100.0%
Taylor expanded in t1 around inf 82.9%
*-commutative82.9%
Simplified82.9%
if 8.20000000000000007e-72 < u < 3.49999999999999991e-48Initial program 78.8%
times-frac89.2%
Simplified89.2%
Taylor expanded in t1 around 0 86.5%
mul-1-neg86.5%
distribute-neg-frac86.5%
Simplified86.5%
expm1-log1p-u55.6%
expm1-udef13.5%
Applied egg-rr13.5%
expm1-def55.4%
expm1-log1p96.6%
Simplified96.6%
Final simplification87.1%
(FPCore (u v t1)
:precision binary64
(if (or (<= u -8.6e-34)
(not (or (<= u 5.4e-73) (and (not (<= u 2.7e-48)) (<= u 1.12e+55)))))
(* (/ t1 u) (/ (- v) u))
(/ (- v) (+ t1 (* u 2.0)))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -8.6e-34) || !((u <= 5.4e-73) || (!(u <= 2.7e-48) && (u <= 1.12e+55)))) {
tmp = (t1 / u) * (-v / u);
} else {
tmp = -v / (t1 + (u * 2.0));
}
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 <= (-8.6d-34)) .or. (.not. (u <= 5.4d-73) .or. (.not. (u <= 2.7d-48)) .and. (u <= 1.12d+55))) then
tmp = (t1 / u) * (-v / u)
else
tmp = -v / (t1 + (u * 2.0d0))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -8.6e-34) || !((u <= 5.4e-73) || (!(u <= 2.7e-48) && (u <= 1.12e+55)))) {
tmp = (t1 / u) * (-v / u);
} else {
tmp = -v / (t1 + (u * 2.0));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -8.6e-34) or not ((u <= 5.4e-73) or (not (u <= 2.7e-48) and (u <= 1.12e+55))): tmp = (t1 / u) * (-v / u) else: tmp = -v / (t1 + (u * 2.0)) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -8.6e-34) || !((u <= 5.4e-73) || (!(u <= 2.7e-48) && (u <= 1.12e+55)))) tmp = Float64(Float64(t1 / u) * Float64(Float64(-v) / u)); else tmp = Float64(Float64(-v) / Float64(t1 + Float64(u * 2.0))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -8.6e-34) || ~(((u <= 5.4e-73) || (~((u <= 2.7e-48)) && (u <= 1.12e+55))))) tmp = (t1 / u) * (-v / u); else tmp = -v / (t1 + (u * 2.0)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -8.6e-34], N[Not[Or[LessEqual[u, 5.4e-73], And[N[Not[LessEqual[u, 2.7e-48]], $MachinePrecision], LessEqual[u, 1.12e+55]]]], $MachinePrecision]], N[(N[(t1 / u), $MachinePrecision] * N[((-v) / u), $MachinePrecision]), $MachinePrecision], N[((-v) / N[(t1 + N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -8.6 \cdot 10^{-34} \lor \neg \left(u \leq 5.4 \cdot 10^{-73} \lor \neg \left(u \leq 2.7 \cdot 10^{-48}\right) \land u \leq 1.12 \cdot 10^{+55}\right):\\
\;\;\;\;\frac{t1}{u} \cdot \frac{-v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u \cdot 2}\\
\end{array}
\end{array}
if u < -8.5999999999999999e-34 or 5.39999999999999989e-73 < u < 2.70000000000000011e-48 or 1.12000000000000006e55 < u Initial program 78.9%
times-frac98.3%
Simplified98.3%
Taylor expanded in t1 around 0 90.0%
mul-1-neg90.0%
distribute-neg-frac90.0%
Simplified90.0%
Taylor expanded in t1 around 0 86.9%
if -8.5999999999999999e-34 < u < 5.39999999999999989e-73 or 2.70000000000000011e-48 < u < 1.12000000000000006e55Initial program 67.4%
times-frac96.9%
neg-mul-196.9%
associate-/l*96.9%
associate-*l/97.0%
neg-mul-197.0%
distribute-frac-neg97.0%
+-commutative97.0%
remove-double-neg97.0%
unsub-neg97.0%
div-sub97.0%
sub-neg97.0%
distribute-frac-neg97.0%
remove-double-neg97.0%
*-inverses97.0%
Simplified97.0%
Taylor expanded in v around 0 99.2%
mul-1-neg99.2%
+-commutative99.2%
*-commutative99.2%
distribute-neg-frac99.2%
Simplified99.2%
Taylor expanded in t1 around inf 81.5%
*-commutative81.5%
Simplified81.5%
Final simplification84.3%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (* (/ t1 u) (/ (- v) u))))
(if (<= u -3.5e-32)
t_1
(if (<= u 8.2e-72)
(/ (- v) t1)
(if (or (<= u 3.5e-48) (not (<= u 1.4e+60))) t_1 (/ (- v) (+ t1 u)))))))
double code(double u, double v, double t1) {
double t_1 = (t1 / u) * (-v / u);
double tmp;
if (u <= -3.5e-32) {
tmp = t_1;
} else if (u <= 8.2e-72) {
tmp = -v / t1;
} else if ((u <= 3.5e-48) || !(u <= 1.4e+60)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (t1 / u) * (-v / u)
if (u <= (-3.5d-32)) then
tmp = t_1
else if (u <= 8.2d-72) then
tmp = -v / t1
else if ((u <= 3.5d-48) .or. (.not. (u <= 1.4d+60))) then
tmp = t_1
else
tmp = -v / (t1 + u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = (t1 / u) * (-v / u);
double tmp;
if (u <= -3.5e-32) {
tmp = t_1;
} else if (u <= 8.2e-72) {
tmp = -v / t1;
} else if ((u <= 3.5e-48) || !(u <= 1.4e+60)) {
tmp = t_1;
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): t_1 = (t1 / u) * (-v / u) tmp = 0 if u <= -3.5e-32: tmp = t_1 elif u <= 8.2e-72: tmp = -v / t1 elif (u <= 3.5e-48) or not (u <= 1.4e+60): tmp = t_1 else: tmp = -v / (t1 + u) return tmp
function code(u, v, t1) t_1 = Float64(Float64(t1 / u) * Float64(Float64(-v) / u)) tmp = 0.0 if (u <= -3.5e-32) tmp = t_1; elseif (u <= 8.2e-72) tmp = Float64(Float64(-v) / t1); elseif ((u <= 3.5e-48) || !(u <= 1.4e+60)) tmp = t_1; else tmp = Float64(Float64(-v) / Float64(t1 + u)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = (t1 / u) * (-v / u); tmp = 0.0; if (u <= -3.5e-32) tmp = t_1; elseif (u <= 8.2e-72) tmp = -v / t1; elseif ((u <= 3.5e-48) || ~((u <= 1.4e+60))) tmp = t_1; else tmp = -v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(N[(t1 / u), $MachinePrecision] * N[((-v) / u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[u, -3.5e-32], t$95$1, If[LessEqual[u, 8.2e-72], N[((-v) / t1), $MachinePrecision], If[Or[LessEqual[u, 3.5e-48], N[Not[LessEqual[u, 1.4e+60]], $MachinePrecision]], t$95$1, N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t1}{u} \cdot \frac{-v}{u}\\
\mathbf{if}\;u \leq -3.5 \cdot 10^{-32}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;u \leq 8.2 \cdot 10^{-72}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{elif}\;u \leq 3.5 \cdot 10^{-48} \lor \neg \left(u \leq 1.4 \cdot 10^{+60}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\end{array}
\end{array}
if u < -3.4999999999999999e-32 or 8.20000000000000007e-72 < u < 3.49999999999999991e-48 or 1.4e60 < u Initial program 78.9%
times-frac98.3%
Simplified98.3%
Taylor expanded in t1 around 0 90.0%
mul-1-neg90.0%
distribute-neg-frac90.0%
Simplified90.0%
Taylor expanded in t1 around 0 86.9%
if -3.4999999999999999e-32 < u < 8.20000000000000007e-72Initial program 64.4%
times-frac97.2%
Simplified97.2%
Taylor expanded in t1 around inf 83.7%
associate-*r/83.7%
neg-mul-183.7%
Simplified83.7%
if 3.49999999999999991e-48 < u < 1.4e60Initial program 84.3%
times-frac95.2%
Simplified95.2%
Taylor expanded in t1 around inf 67.6%
Final simplification84.1%
(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 73.2%
times-frac97.6%
Simplified97.6%
Final simplification97.6%
(FPCore (u v t1) :precision binary64 (if (or (<= u -2.7e+141) (not (<= u 5.5e+92))) (/ v (* u (/ u t1))) (/ (- v) (+ t1 u))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.7e+141) || !(u <= 5.5e+92)) {
tmp = v / (u * (u / 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.7d+141)) .or. (.not. (u <= 5.5d+92))) then
tmp = v / (u * (u / 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.7e+141) || !(u <= 5.5e+92)) {
tmp = v / (u * (u / t1));
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -2.7e+141) or not (u <= 5.5e+92): tmp = v / (u * (u / t1)) else: tmp = -v / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -2.7e+141) || !(u <= 5.5e+92)) tmp = Float64(v / Float64(u * Float64(u / t1))); else tmp = Float64(Float64(-v) / Float64(t1 + u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -2.7e+141) || ~((u <= 5.5e+92))) tmp = v / (u * (u / t1)); else tmp = -v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2.7e+141], N[Not[LessEqual[u, 5.5e+92]], $MachinePrecision]], N[(v / N[(u * N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.7 \cdot 10^{+141} \lor \neg \left(u \leq 5.5 \cdot 10^{+92}\right):\\
\;\;\;\;\frac{v}{u \cdot \frac{u}{t1}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\end{array}
\end{array}
if u < -2.7000000000000001e141 or 5.50000000000000053e92 < u Initial program 74.4%
times-frac98.6%
Simplified98.6%
Taylor expanded in t1 around 0 94.7%
mul-1-neg94.7%
distribute-neg-frac94.7%
Simplified94.7%
Taylor expanded in t1 around 0 93.5%
clear-num93.4%
frac-times79.8%
*-un-lft-identity79.8%
add-sqr-sqrt48.0%
sqrt-unprod63.8%
sqr-neg63.8%
sqrt-unprod26.8%
add-sqr-sqrt66.4%
Applied egg-rr66.4%
if -2.7000000000000001e141 < u < 5.50000000000000053e92Initial program 72.7%
times-frac97.2%
Simplified97.2%
Taylor expanded in t1 around inf 67.9%
Final simplification67.5%
(FPCore (u v t1) :precision binary64 (if (<= u -1e+139) (/ v (* u (/ u t1))) (if (<= u 7.2e+60) (/ (- v) (+ t1 u)) (/ (* t1 (/ v u)) u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1e+139) {
tmp = v / (u * (u / t1));
} else if (u <= 7.2e+60) {
tmp = -v / (t1 + u);
} else {
tmp = (t1 * (v / u)) / 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 <= (-1d+139)) then
tmp = v / (u * (u / t1))
else if (u <= 7.2d+60) then
tmp = -v / (t1 + u)
else
tmp = (t1 * (v / u)) / u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -1e+139) {
tmp = v / (u * (u / t1));
} else if (u <= 7.2e+60) {
tmp = -v / (t1 + u);
} else {
tmp = (t1 * (v / u)) / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1e+139: tmp = v / (u * (u / t1)) elif u <= 7.2e+60: tmp = -v / (t1 + u) else: tmp = (t1 * (v / u)) / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1e+139) tmp = Float64(v / Float64(u * Float64(u / t1))); elseif (u <= 7.2e+60) tmp = Float64(Float64(-v) / Float64(t1 + u)); else tmp = Float64(Float64(t1 * Float64(v / u)) / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -1e+139) tmp = v / (u * (u / t1)); elseif (u <= 7.2e+60) tmp = -v / (t1 + u); else tmp = (t1 * (v / u)) / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1e+139], N[(v / N[(u * N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 7.2e+60], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision], N[(N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision] / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1 \cdot 10^{+139}:\\
\;\;\;\;\frac{v}{u \cdot \frac{u}{t1}}\\
\mathbf{elif}\;u \leq 7.2 \cdot 10^{+60}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{u}}{u}\\
\end{array}
\end{array}
if u < -1.00000000000000003e139Initial program 67.2%
times-frac99.5%
Simplified99.5%
Taylor expanded in t1 around 0 90.9%
mul-1-neg90.9%
distribute-neg-frac90.9%
Simplified90.9%
Taylor expanded in t1 around 0 90.9%
clear-num90.8%
frac-times73.9%
*-un-lft-identity73.9%
add-sqr-sqrt54.8%
sqrt-unprod64.5%
sqr-neg64.5%
sqrt-unprod18.9%
add-sqr-sqrt61.7%
Applied egg-rr61.7%
if -1.00000000000000003e139 < u < 7.19999999999999935e60Initial program 72.1%
times-frac97.1%
Simplified97.1%
Taylor expanded in t1 around inf 67.8%
if 7.19999999999999935e60 < u Initial program 81.2%
times-frac98.1%
Simplified98.1%
Taylor expanded in t1 around 0 97.6%
mul-1-neg97.6%
distribute-neg-frac97.6%
Simplified97.6%
Taylor expanded in t1 around 0 93.7%
associate-*l/95.5%
add-sqr-sqrt49.5%
sqrt-unprod64.1%
sqr-neg64.1%
sqrt-unprod33.8%
add-sqr-sqrt72.3%
Applied egg-rr72.3%
Final simplification67.9%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.32e+67) (not (<= u 1.8e+61))) (/ -0.5 (/ u v)) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.32e+67) || !(u <= 1.8e+61)) {
tmp = -0.5 / (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.32d+67)) .or. (.not. (u <= 1.8d+61))) then
tmp = (-0.5d0) / (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.32e+67) || !(u <= 1.8e+61)) {
tmp = -0.5 / (u / v);
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.32e+67) or not (u <= 1.8e+61): tmp = -0.5 / (u / v) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.32e+67) || !(u <= 1.8e+61)) tmp = Float64(-0.5 / Float64(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.32e+67) || ~((u <= 1.8e+61))) tmp = -0.5 / (u / v); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.32e+67], N[Not[LessEqual[u, 1.8e+61]], $MachinePrecision]], N[(-0.5 / N[(u / v), $MachinePrecision]), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.32 \cdot 10^{+67} \lor \neg \left(u \leq 1.8 \cdot 10^{+61}\right):\\
\;\;\;\;\frac{-0.5}{\frac{u}{v}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -1.3200000000000001e67 or 1.80000000000000005e61 < u Initial program 75.3%
times-frac98.8%
neg-mul-198.8%
associate-/l*98.7%
associate-*l/98.8%
neg-mul-198.8%
distribute-frac-neg98.8%
+-commutative98.8%
remove-double-neg98.8%
unsub-neg98.8%
div-sub98.8%
sub-neg98.8%
distribute-frac-neg98.8%
remove-double-neg98.8%
*-inverses98.8%
Simplified98.8%
Taylor expanded in v around 0 88.0%
mul-1-neg88.0%
+-commutative88.0%
*-commutative88.0%
distribute-neg-frac88.0%
Simplified88.0%
Taylor expanded in t1 around inf 45.0%
*-commutative45.0%
Simplified45.0%
Taylor expanded in t1 around 0 36.4%
associate-*r/36.4%
associate-/l*37.0%
Simplified37.0%
if -1.3200000000000001e67 < u < 1.80000000000000005e61Initial program 71.9%
times-frac96.9%
Simplified96.9%
Taylor expanded in t1 around inf 68.7%
associate-*r/68.7%
neg-mul-168.7%
Simplified68.7%
Final simplification56.6%
(FPCore (u v t1) :precision binary64 (if (or (<= u -6.4e+133) (not (<= u 4.8e+99))) (/ v u) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -6.4e+133) || !(u <= 4.8e+99)) {
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 <= (-6.4d+133)) .or. (.not. (u <= 4.8d+99))) 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 <= -6.4e+133) || !(u <= 4.8e+99)) {
tmp = v / u;
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -6.4e+133) or not (u <= 4.8e+99): tmp = v / u else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -6.4e+133) || !(u <= 4.8e+99)) 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 <= -6.4e+133) || ~((u <= 4.8e+99))) tmp = v / u; else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -6.4e+133], N[Not[LessEqual[u, 4.8e+99]], $MachinePrecision]], N[(v / u), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -6.4 \cdot 10^{+133} \lor \neg \left(u \leq 4.8 \cdot 10^{+99}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -6.39999999999999994e133 or 4.8000000000000002e99 < u Initial program 73.8%
times-frac98.6%
Simplified98.6%
Taylor expanded in t1 around 0 94.6%
mul-1-neg94.6%
distribute-neg-frac94.6%
Simplified94.6%
*-commutative94.6%
clear-num94.5%
frac-times87.5%
*-un-lft-identity87.5%
add-sqr-sqrt50.6%
sqrt-unprod65.2%
sqr-neg65.2%
sqrt-unprod30.0%
add-sqr-sqrt69.5%
frac-2neg69.5%
add-sqr-sqrt34.0%
sqrt-unprod70.3%
sqr-neg70.3%
sqrt-unprod49.1%
add-sqr-sqrt87.5%
distribute-neg-in87.5%
add-sqr-sqrt50.6%
sqrt-unprod84.1%
sqr-neg84.1%
sqrt-unprod37.0%
add-sqr-sqrt87.6%
sub-neg87.6%
Applied egg-rr87.6%
Taylor expanded in t1 around inf 37.6%
if -6.39999999999999994e133 < u < 4.8000000000000002e99Initial program 73.0%
times-frac97.2%
Simplified97.2%
Taylor expanded in t1 around inf 64.3%
associate-*r/64.3%
neg-mul-164.3%
Simplified64.3%
Final simplification56.3%
(FPCore (u v t1) :precision binary64 (if (<= u -2.15e+87) (/ (- v) u) (if (<= u 5e+99) (/ (- v) t1) (/ v u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -2.15e+87) {
tmp = -v / u;
} else if (u <= 5e+99) {
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.15d+87)) then
tmp = -v / u
else if (u <= 5d+99) 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.15e+87) {
tmp = -v / u;
} else if (u <= 5e+99) {
tmp = -v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -2.15e+87: tmp = -v / u elif u <= 5e+99: tmp = -v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -2.15e+87) tmp = Float64(Float64(-v) / u); elseif (u <= 5e+99) 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.15e+87) tmp = -v / u; elseif (u <= 5e+99) tmp = -v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -2.15e+87], N[((-v) / u), $MachinePrecision], If[LessEqual[u, 5e+99], N[((-v) / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.15 \cdot 10^{+87}:\\
\;\;\;\;\frac{-v}{u}\\
\mathbf{elif}\;u \leq 5 \cdot 10^{+99}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if u < -2.15e87Initial program 69.4%
times-frac99.6%
Simplified99.6%
Taylor expanded in t1 around 0 88.3%
mul-1-neg88.3%
distribute-neg-frac88.3%
Simplified88.3%
Taylor expanded in t1 around inf 37.0%
associate-*r/37.0%
neg-mul-137.0%
Simplified37.0%
if -2.15e87 < u < 5.00000000000000008e99Initial program 73.0%
times-frac97.0%
Simplified97.0%
Taylor expanded in t1 around inf 66.5%
associate-*r/66.5%
neg-mul-166.5%
Simplified66.5%
if 5.00000000000000008e99 < u Initial program 78.2%
times-frac97.8%
Simplified97.8%
Taylor expanded in t1 around 0 97.3%
mul-1-neg97.3%
distribute-neg-frac97.3%
Simplified97.3%
*-commutative97.3%
clear-num97.2%
frac-times88.9%
*-un-lft-identity88.9%
add-sqr-sqrt46.2%
sqrt-unprod63.1%
sqr-neg63.1%
sqrt-unprod36.9%
add-sqr-sqrt74.7%
frac-2neg74.7%
add-sqr-sqrt34.8%
sqrt-unprod74.0%
sqr-neg74.0%
sqrt-unprod48.3%
add-sqr-sqrt88.9%
distribute-neg-in88.9%
add-sqr-sqrt46.2%
sqrt-unprod85.0%
sqr-neg85.0%
sqrt-unprod42.7%
add-sqr-sqrt88.9%
sub-neg88.9%
Applied egg-rr88.9%
Taylor expanded in t1 around inf 37.3%
Final simplification56.4%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -9.5e+124) (not (<= t1 1.08e+36))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -9.5e+124) || !(t1 <= 1.08e+36)) {
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.5d+124)) .or. (.not. (t1 <= 1.08d+36))) 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.5e+124) || !(t1 <= 1.08e+36)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -9.5e+124) or not (t1 <= 1.08e+36): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -9.5e+124) || !(t1 <= 1.08e+36)) 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.5e+124) || ~((t1 <= 1.08e+36))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -9.5e+124], N[Not[LessEqual[t1, 1.08e+36]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -9.5 \cdot 10^{+124} \lor \neg \left(t1 \leq 1.08 \cdot 10^{+36}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -9.50000000000000004e124 or 1.08000000000000001e36 < t1 Initial program 56.4%
times-frac99.9%
Simplified99.9%
frac-2neg99.9%
clear-num99.1%
frac-times76.6%
remove-double-neg76.6%
*-commutative76.6%
*-un-lft-identity76.6%
distribute-neg-in76.6%
add-sqr-sqrt30.6%
sqrt-unprod52.9%
sqr-neg52.9%
sqrt-unprod32.3%
add-sqr-sqrt52.4%
sub-neg52.4%
Applied egg-rr52.4%
*-commutative52.4%
Simplified52.4%
Taylor expanded in t1 around inf 38.3%
if -9.50000000000000004e124 < t1 < 1.08000000000000001e36Initial program 83.1%
times-frac96.3%
Simplified96.3%
Taylor expanded in t1 around 0 68.6%
mul-1-neg68.6%
distribute-neg-frac68.6%
Simplified68.6%
*-commutative68.6%
clear-num68.6%
frac-times69.1%
*-un-lft-identity69.1%
add-sqr-sqrt40.9%
sqrt-unprod48.2%
sqr-neg48.2%
sqrt-unprod15.6%
add-sqr-sqrt36.6%
frac-2neg36.6%
add-sqr-sqrt18.9%
sqrt-unprod44.5%
sqr-neg44.5%
sqrt-unprod35.0%
add-sqr-sqrt69.1%
distribute-neg-in69.1%
add-sqr-sqrt41.0%
sqrt-unprod68.5%
sqr-neg68.5%
sqrt-unprod27.4%
add-sqr-sqrt68.2%
sub-neg68.2%
Applied egg-rr68.2%
Taylor expanded in t1 around inf 17.4%
Final simplification25.1%
(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 73.2%
times-frac97.6%
Simplified97.6%
Taylor expanded in t1 around inf 59.5%
Final simplification59.5%
(FPCore (u v t1) :precision binary64 (/ v t1))
double code(double u, double v, double t1) {
return v / t1;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = v / t1
end function
public static double code(double u, double v, double t1) {
return v / t1;
}
def code(u, v, t1): return v / t1
function code(u, v, t1) return Float64(v / t1) end
function tmp = code(u, v, t1) tmp = v / t1; end
code[u_, v_, t1_] := N[(v / t1), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{t1}
\end{array}
Initial program 73.2%
times-frac97.6%
Simplified97.6%
frac-2neg97.6%
clear-num97.3%
frac-times84.9%
remove-double-neg84.9%
*-commutative84.9%
*-un-lft-identity84.9%
distribute-neg-in84.9%
add-sqr-sqrt43.6%
sqrt-unprod68.1%
sqr-neg68.1%
sqrt-unprod28.7%
add-sqr-sqrt61.8%
sub-neg61.8%
Applied egg-rr61.8%
*-commutative61.8%
Simplified61.8%
Taylor expanded in t1 around inf 17.1%
Final simplification17.1%
herbie shell --seed 2023320
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))