
(FPCore (u v t1) :precision binary64 (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))
double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-t1 * v) / ((t1 + u) * (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
def code(u, v, t1): return (-t1 * v) / ((t1 + u) * (t1 + u))
function code(u, v, t1) return Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (-t1 * v) / ((t1 + u) * (t1 + u)); end
code[u_, v_, t1_] := N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (u v t1) :precision binary64 (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))
double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-t1 * v) / ((t1 + u) * (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
def code(u, v, t1): return (-t1 * v) / ((t1 + u) * (t1 + u))
function code(u, v, t1) return Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (-t1 * v) / ((t1 + u) * (t1 + u)); end
code[u_, v_, t1_] := N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}
\end{array}
(FPCore (u v t1) :precision binary64 (/ (/ (- t1) (/ (+ t1 u) v)) (+ t1 u)))
double code(double u, double v, double t1) {
return (-t1 / ((t1 + u) / v)) / (t1 + u);
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-t1 / ((t1 + u) / v)) / (t1 + u)
end function
public static double code(double u, double v, double t1) {
return (-t1 / ((t1 + u) / v)) / (t1 + u);
}
def code(u, v, t1): return (-t1 / ((t1 + u) / v)) / (t1 + u)
function code(u, v, t1) return Float64(Float64(Float64(-t1) / Float64(Float64(t1 + u) / 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[(N[(t1 + u), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{-t1}{\frac{t1 + u}{v}}}{t1 + u}
\end{array}
Initial program 73.6%
associate-/r*83.2%
associate-/l*97.6%
Simplified97.6%
Final simplification97.6%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (* v (/ (- t1) (* (+ t1 u) (+ t1 u))))))
(if (<= t1 -1.15e+126)
(/ (- v) t1)
(if (<= t1 -1.28e-213)
t_1
(if (<= t1 9.2e-267)
(/ (/ (- t1) (/ u v)) (+ t1 u))
(if (<= t1 5.2e+148) t_1 (/ (- v) (+ t1 u))))))))
double code(double u, double v, double t1) {
double t_1 = v * (-t1 / ((t1 + u) * (t1 + u)));
double tmp;
if (t1 <= -1.15e+126) {
tmp = -v / t1;
} else if (t1 <= -1.28e-213) {
tmp = t_1;
} else if (t1 <= 9.2e-267) {
tmp = (-t1 / (u / v)) / (t1 + u);
} else if (t1 <= 5.2e+148) {
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 = v * (-t1 / ((t1 + u) * (t1 + u)))
if (t1 <= (-1.15d+126)) then
tmp = -v / t1
else if (t1 <= (-1.28d-213)) then
tmp = t_1
else if (t1 <= 9.2d-267) then
tmp = (-t1 / (u / v)) / (t1 + u)
else if (t1 <= 5.2d+148) 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 = v * (-t1 / ((t1 + u) * (t1 + u)));
double tmp;
if (t1 <= -1.15e+126) {
tmp = -v / t1;
} else if (t1 <= -1.28e-213) {
tmp = t_1;
} else if (t1 <= 9.2e-267) {
tmp = (-t1 / (u / v)) / (t1 + u);
} else if (t1 <= 5.2e+148) {
tmp = t_1;
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): t_1 = v * (-t1 / ((t1 + u) * (t1 + u))) tmp = 0 if t1 <= -1.15e+126: tmp = -v / t1 elif t1 <= -1.28e-213: tmp = t_1 elif t1 <= 9.2e-267: tmp = (-t1 / (u / v)) / (t1 + u) elif t1 <= 5.2e+148: tmp = t_1 else: tmp = -v / (t1 + u) return tmp
function code(u, v, t1) t_1 = Float64(v * Float64(Float64(-t1) / Float64(Float64(t1 + u) * Float64(t1 + u)))) tmp = 0.0 if (t1 <= -1.15e+126) tmp = Float64(Float64(-v) / t1); elseif (t1 <= -1.28e-213) tmp = t_1; elseif (t1 <= 9.2e-267) tmp = Float64(Float64(Float64(-t1) / Float64(u / v)) / Float64(t1 + u)); elseif (t1 <= 5.2e+148) tmp = t_1; else tmp = Float64(Float64(-v) / Float64(t1 + u)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = v * (-t1 / ((t1 + u) * (t1 + u))); tmp = 0.0; if (t1 <= -1.15e+126) tmp = -v / t1; elseif (t1 <= -1.28e-213) tmp = t_1; elseif (t1 <= 9.2e-267) tmp = (-t1 / (u / v)) / (t1 + u); elseif (t1 <= 5.2e+148) tmp = t_1; else tmp = -v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(v * N[((-t1) / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -1.15e+126], N[((-v) / t1), $MachinePrecision], If[LessEqual[t1, -1.28e-213], t$95$1, If[LessEqual[t1, 9.2e-267], N[(N[((-t1) / N[(u / v), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 5.2e+148], t$95$1, N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := v \cdot \frac{-t1}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\
\mathbf{if}\;t1 \leq -1.15 \cdot 10^{+126}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{elif}\;t1 \leq -1.28 \cdot 10^{-213}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t1 \leq 9.2 \cdot 10^{-267}:\\
\;\;\;\;\frac{\frac{-t1}{\frac{u}{v}}}{t1 + u}\\
\mathbf{elif}\;t1 \leq 5.2 \cdot 10^{+148}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\end{array}
\end{array}
if t1 < -1.15e126Initial program 49.5%
associate-*l/53.6%
*-commutative53.6%
Simplified53.6%
Taylor expanded in t1 around inf 100.0%
associate-*r/100.0%
neg-mul-1100.0%
Simplified100.0%
if -1.15e126 < t1 < -1.28000000000000005e-213 or 9.2000000000000002e-267 < t1 < 5.2e148Initial program 85.6%
associate-*l/92.1%
*-commutative92.1%
Simplified92.1%
if -1.28000000000000005e-213 < t1 < 9.2000000000000002e-267Initial program 75.7%
associate-/r*82.8%
associate-/l*96.5%
Simplified96.5%
Taylor expanded in t1 around 0 82.8%
mul-1-neg82.8%
associate-/l*96.5%
distribute-neg-frac96.5%
Simplified96.5%
if 5.2e148 < t1 Initial program 41.8%
associate-/r*64.1%
associate-/l*98.1%
Simplified98.1%
Taylor expanded in t1 around inf 95.0%
neg-mul-195.0%
Simplified95.0%
Final simplification94.0%
(FPCore (u v t1)
:precision binary64
(if (<= t1 -2.65e-17)
(/ v (- u t1))
(if (<= t1 -1.25e-94)
(/ (/ (* t1 v) u) (- t1 u))
(if (<= t1 -2.05e-119)
(/ v (/ (+ t1 u) (+ (/ u t1) -1.0)))
(if (<= t1 4.8e-25) (/ t1 (* u (/ (- u) v))) (/ (- v) (+ t1 u)))))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -2.65e-17) {
tmp = v / (u - t1);
} else if (t1 <= -1.25e-94) {
tmp = ((t1 * v) / u) / (t1 - u);
} else if (t1 <= -2.05e-119) {
tmp = v / ((t1 + u) / ((u / t1) + -1.0));
} else if (t1 <= 4.8e-25) {
tmp = t1 / (u * (-u / v));
} 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 (t1 <= (-2.65d-17)) then
tmp = v / (u - t1)
else if (t1 <= (-1.25d-94)) then
tmp = ((t1 * v) / u) / (t1 - u)
else if (t1 <= (-2.05d-119)) then
tmp = v / ((t1 + u) / ((u / t1) + (-1.0d0)))
else if (t1 <= 4.8d-25) then
tmp = t1 / (u * (-u / v))
else
tmp = -v / (t1 + u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -2.65e-17) {
tmp = v / (u - t1);
} else if (t1 <= -1.25e-94) {
tmp = ((t1 * v) / u) / (t1 - u);
} else if (t1 <= -2.05e-119) {
tmp = v / ((t1 + u) / ((u / t1) + -1.0));
} else if (t1 <= 4.8e-25) {
tmp = t1 / (u * (-u / v));
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -2.65e-17: tmp = v / (u - t1) elif t1 <= -1.25e-94: tmp = ((t1 * v) / u) / (t1 - u) elif t1 <= -2.05e-119: tmp = v / ((t1 + u) / ((u / t1) + -1.0)) elif t1 <= 4.8e-25: tmp = t1 / (u * (-u / v)) else: tmp = -v / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -2.65e-17) tmp = Float64(v / Float64(u - t1)); elseif (t1 <= -1.25e-94) tmp = Float64(Float64(Float64(t1 * v) / u) / Float64(t1 - u)); elseif (t1 <= -2.05e-119) tmp = Float64(v / Float64(Float64(t1 + u) / Float64(Float64(u / t1) + -1.0))); elseif (t1 <= 4.8e-25) tmp = Float64(t1 / Float64(u * Float64(Float64(-u) / v))); else tmp = Float64(Float64(-v) / Float64(t1 + u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -2.65e-17) tmp = v / (u - t1); elseif (t1 <= -1.25e-94) tmp = ((t1 * v) / u) / (t1 - u); elseif (t1 <= -2.05e-119) tmp = v / ((t1 + u) / ((u / t1) + -1.0)); elseif (t1 <= 4.8e-25) tmp = t1 / (u * (-u / v)); else tmp = -v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -2.65e-17], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, -1.25e-94], N[(N[(N[(t1 * v), $MachinePrecision] / u), $MachinePrecision] / N[(t1 - u), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, -2.05e-119], N[(v / N[(N[(t1 + u), $MachinePrecision] / N[(N[(u / t1), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 4.8e-25], N[(t1 / N[(u * N[((-u) / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2.65 \cdot 10^{-17}:\\
\;\;\;\;\frac{v}{u - t1}\\
\mathbf{elif}\;t1 \leq -1.25 \cdot 10^{-94}:\\
\;\;\;\;\frac{\frac{t1 \cdot v}{u}}{t1 - u}\\
\mathbf{elif}\;t1 \leq -2.05 \cdot 10^{-119}:\\
\;\;\;\;\frac{v}{\frac{t1 + u}{\frac{u}{t1} + -1}}\\
\mathbf{elif}\;t1 \leq 4.8 \cdot 10^{-25}:\\
\;\;\;\;\frac{t1}{u \cdot \frac{-u}{v}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\end{array}
\end{array}
if t1 < -2.6499999999999999e-17Initial program 68.4%
associate-*l/74.2%
*-commutative74.2%
Simplified74.2%
neg-mul-174.2%
times-frac96.8%
Applied egg-rr96.8%
associate-*l/96.8%
mul-1-neg96.8%
Simplified96.8%
Taylor expanded in t1 around inf 80.6%
frac-2neg80.6%
metadata-eval80.6%
metadata-eval80.6%
un-div-inv80.9%
+-commutative80.9%
distribute-neg-in80.9%
add-sqr-sqrt44.9%
sqrt-unprod80.4%
sqr-neg80.4%
sqrt-unprod36.5%
add-sqr-sqrt81.0%
Applied egg-rr81.0%
sub-neg81.0%
Simplified81.0%
if -2.6499999999999999e-17 < t1 < -1.2499999999999999e-94Initial program 99.5%
associate-/r*100.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in t1 around 0 92.4%
mul-1-neg92.4%
associate-/l*92.1%
distribute-neg-frac92.1%
Simplified92.1%
expm1-log1p-u84.5%
expm1-udef54.6%
Applied egg-rr55.2%
expm1-def85.2%
expm1-log1p92.9%
associate-*l/92.9%
Simplified92.9%
if -1.2499999999999999e-94 < t1 < -2.0500000000000001e-119Initial program 86.0%
associate-/r*86.2%
associate-/l*99.0%
Simplified99.0%
Taylor expanded in t1 around inf 79.6%
neg-mul-179.6%
+-commutative79.6%
unsub-neg79.6%
associate-/l*79.6%
Simplified79.6%
Taylor expanded in v around 0 79.6%
associate-/l*79.6%
sub-neg79.6%
metadata-eval79.6%
Simplified79.6%
if -2.0500000000000001e-119 < t1 < 4.80000000000000018e-25Initial program 83.8%
associate-/r*89.1%
associate-/l*94.7%
Simplified94.7%
clear-num94.6%
associate-/r/94.6%
Applied egg-rr94.6%
Taylor expanded in t1 around 0 78.6%
mul-1-neg78.6%
*-commutative78.6%
unpow278.6%
times-frac84.3%
distribute-rgt-neg-in84.3%
distribute-neg-frac84.3%
Simplified84.3%
clear-num84.3%
frac-2neg84.3%
frac-times86.0%
*-un-lft-identity86.0%
remove-double-neg86.0%
Applied egg-rr86.0%
if 4.80000000000000018e-25 < t1 Initial program 60.8%
associate-/r*75.6%
associate-/l*98.9%
Simplified98.9%
Taylor expanded in t1 around inf 85.4%
neg-mul-185.4%
Simplified85.4%
Final simplification84.6%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (* v (/ (- t1) (* u u)))))
(if (<= t1 -1.62e-17)
(/ v (- u t1))
(if (<= t1 -5.4e-91)
t_1
(if (<= t1 -1.65e-125)
(/ (- v) t1)
(if (<= t1 7.2e-27) t_1 (/ (- v) (+ t1 u))))))))
double code(double u, double v, double t1) {
double t_1 = v * (-t1 / (u * u));
double tmp;
if (t1 <= -1.62e-17) {
tmp = v / (u - t1);
} else if (t1 <= -5.4e-91) {
tmp = t_1;
} else if (t1 <= -1.65e-125) {
tmp = -v / t1;
} else if (t1 <= 7.2e-27) {
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 = v * (-t1 / (u * u))
if (t1 <= (-1.62d-17)) then
tmp = v / (u - t1)
else if (t1 <= (-5.4d-91)) then
tmp = t_1
else if (t1 <= (-1.65d-125)) then
tmp = -v / t1
else if (t1 <= 7.2d-27) 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 = v * (-t1 / (u * u));
double tmp;
if (t1 <= -1.62e-17) {
tmp = v / (u - t1);
} else if (t1 <= -5.4e-91) {
tmp = t_1;
} else if (t1 <= -1.65e-125) {
tmp = -v / t1;
} else if (t1 <= 7.2e-27) {
tmp = t_1;
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): t_1 = v * (-t1 / (u * u)) tmp = 0 if t1 <= -1.62e-17: tmp = v / (u - t1) elif t1 <= -5.4e-91: tmp = t_1 elif t1 <= -1.65e-125: tmp = -v / t1 elif t1 <= 7.2e-27: tmp = t_1 else: tmp = -v / (t1 + u) return tmp
function code(u, v, t1) t_1 = Float64(v * Float64(Float64(-t1) / Float64(u * u))) tmp = 0.0 if (t1 <= -1.62e-17) tmp = Float64(v / Float64(u - t1)); elseif (t1 <= -5.4e-91) tmp = t_1; elseif (t1 <= -1.65e-125) tmp = Float64(Float64(-v) / t1); elseif (t1 <= 7.2e-27) tmp = t_1; else tmp = Float64(Float64(-v) / Float64(t1 + u)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = v * (-t1 / (u * u)); tmp = 0.0; if (t1 <= -1.62e-17) tmp = v / (u - t1); elseif (t1 <= -5.4e-91) tmp = t_1; elseif (t1 <= -1.65e-125) tmp = -v / t1; elseif (t1 <= 7.2e-27) tmp = t_1; else tmp = -v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(v * N[((-t1) / N[(u * u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -1.62e-17], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, -5.4e-91], t$95$1, If[LessEqual[t1, -1.65e-125], N[((-v) / t1), $MachinePrecision], If[LessEqual[t1, 7.2e-27], t$95$1, N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := v \cdot \frac{-t1}{u \cdot u}\\
\mathbf{if}\;t1 \leq -1.62 \cdot 10^{-17}:\\
\;\;\;\;\frac{v}{u - t1}\\
\mathbf{elif}\;t1 \leq -5.4 \cdot 10^{-91}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t1 \leq -1.65 \cdot 10^{-125}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{elif}\;t1 \leq 7.2 \cdot 10^{-27}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\end{array}
\end{array}
if t1 < -1.62000000000000001e-17Initial program 68.4%
associate-*l/74.2%
*-commutative74.2%
Simplified74.2%
neg-mul-174.2%
times-frac96.8%
Applied egg-rr96.8%
associate-*l/96.8%
mul-1-neg96.8%
Simplified96.8%
Taylor expanded in t1 around inf 80.6%
frac-2neg80.6%
metadata-eval80.6%
metadata-eval80.6%
un-div-inv80.9%
+-commutative80.9%
distribute-neg-in80.9%
add-sqr-sqrt44.9%
sqrt-unprod80.4%
sqr-neg80.4%
sqrt-unprod36.5%
add-sqr-sqrt81.0%
Applied egg-rr81.0%
sub-neg81.0%
Simplified81.0%
if -1.62000000000000001e-17 < t1 < -5.3999999999999995e-91 or -1.65e-125 < t1 < 7.1999999999999997e-27Initial program 86.4%
associate-*l/86.6%
*-commutative86.6%
Simplified86.6%
Taylor expanded in t1 around 0 80.3%
associate-*r/80.3%
neg-mul-180.3%
unpow280.3%
Simplified80.3%
if -5.3999999999999995e-91 < t1 < -1.65e-125Initial program 78.6%
associate-*l/99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in t1 around inf 72.0%
associate-*r/72.0%
neg-mul-172.0%
Simplified72.0%
if 7.1999999999999997e-27 < t1 Initial program 60.8%
associate-/r*75.6%
associate-/l*98.9%
Simplified98.9%
Taylor expanded in t1 around inf 85.4%
neg-mul-185.4%
Simplified85.4%
Final simplification81.7%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (* (/ t1 u) (/ (- v) u))))
(if (<= t1 -1.4e-18)
(/ v (- u t1))
(if (<= t1 -1.25e-94)
t_1
(if (<= t1 -1.65e-125)
(/ (- v) t1)
(if (<= t1 3.8e-27) t_1 (/ (- v) (+ t1 u))))))))
double code(double u, double v, double t1) {
double t_1 = (t1 / u) * (-v / u);
double tmp;
if (t1 <= -1.4e-18) {
tmp = v / (u - t1);
} else if (t1 <= -1.25e-94) {
tmp = t_1;
} else if (t1 <= -1.65e-125) {
tmp = -v / t1;
} else if (t1 <= 3.8e-27) {
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 (t1 <= (-1.4d-18)) then
tmp = v / (u - t1)
else if (t1 <= (-1.25d-94)) then
tmp = t_1
else if (t1 <= (-1.65d-125)) then
tmp = -v / t1
else if (t1 <= 3.8d-27) 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 (t1 <= -1.4e-18) {
tmp = v / (u - t1);
} else if (t1 <= -1.25e-94) {
tmp = t_1;
} else if (t1 <= -1.65e-125) {
tmp = -v / t1;
} else if (t1 <= 3.8e-27) {
tmp = t_1;
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): t_1 = (t1 / u) * (-v / u) tmp = 0 if t1 <= -1.4e-18: tmp = v / (u - t1) elif t1 <= -1.25e-94: tmp = t_1 elif t1 <= -1.65e-125: tmp = -v / t1 elif t1 <= 3.8e-27: 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 (t1 <= -1.4e-18) tmp = Float64(v / Float64(u - t1)); elseif (t1 <= -1.25e-94) tmp = t_1; elseif (t1 <= -1.65e-125) tmp = Float64(Float64(-v) / t1); elseif (t1 <= 3.8e-27) 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 (t1 <= -1.4e-18) tmp = v / (u - t1); elseif (t1 <= -1.25e-94) tmp = t_1; elseif (t1 <= -1.65e-125) tmp = -v / t1; elseif (t1 <= 3.8e-27) 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[t1, -1.4e-18], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, -1.25e-94], t$95$1, If[LessEqual[t1, -1.65e-125], N[((-v) / t1), $MachinePrecision], If[LessEqual[t1, 3.8e-27], 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}\;t1 \leq -1.4 \cdot 10^{-18}:\\
\;\;\;\;\frac{v}{u - t1}\\
\mathbf{elif}\;t1 \leq -1.25 \cdot 10^{-94}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t1 \leq -1.65 \cdot 10^{-125}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{elif}\;t1 \leq 3.8 \cdot 10^{-27}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\end{array}
\end{array}
if t1 < -1.40000000000000006e-18Initial program 68.4%
associate-*l/74.2%
*-commutative74.2%
Simplified74.2%
neg-mul-174.2%
times-frac96.8%
Applied egg-rr96.8%
associate-*l/96.8%
mul-1-neg96.8%
Simplified96.8%
Taylor expanded in t1 around inf 80.6%
frac-2neg80.6%
metadata-eval80.6%
metadata-eval80.6%
un-div-inv80.9%
+-commutative80.9%
distribute-neg-in80.9%
add-sqr-sqrt44.9%
sqrt-unprod80.4%
sqr-neg80.4%
sqrt-unprod36.5%
add-sqr-sqrt81.0%
Applied egg-rr81.0%
sub-neg81.0%
Simplified81.0%
if -1.40000000000000006e-18 < t1 < -1.2499999999999999e-94 or -1.65e-125 < t1 < 3.8e-27Initial program 86.4%
associate-/r*91.2%
associate-/l*95.3%
Simplified95.3%
clear-num95.2%
associate-/r/95.2%
Applied egg-rr95.2%
Taylor expanded in t1 around 0 80.9%
mul-1-neg80.9%
*-commutative80.9%
unpow280.9%
times-frac86.0%
distribute-rgt-neg-in86.0%
distribute-neg-frac86.0%
Simplified86.0%
if -1.2499999999999999e-94 < t1 < -1.65e-125Initial program 78.6%
associate-*l/99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in t1 around inf 72.0%
associate-*r/72.0%
neg-mul-172.0%
Simplified72.0%
if 3.8e-27 < t1 Initial program 60.8%
associate-/r*75.6%
associate-/l*98.9%
Simplified98.9%
Taylor expanded in t1 around inf 85.4%
neg-mul-185.4%
Simplified85.4%
Final simplification84.0%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ t1 (* u (/ (- u) v)))))
(if (<= t1 -2.5e-17)
(/ v (- u t1))
(if (<= t1 -1.3e-94)
t_1
(if (<= t1 -1.65e-125)
(/ (- v) t1)
(if (<= t1 7.2e-27) t_1 (/ (- v) (+ t1 u))))))))
double code(double u, double v, double t1) {
double t_1 = t1 / (u * (-u / v));
double tmp;
if (t1 <= -2.5e-17) {
tmp = v / (u - t1);
} else if (t1 <= -1.3e-94) {
tmp = t_1;
} else if (t1 <= -1.65e-125) {
tmp = -v / t1;
} else if (t1 <= 7.2e-27) {
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 * (-u / v))
if (t1 <= (-2.5d-17)) then
tmp = v / (u - t1)
else if (t1 <= (-1.3d-94)) then
tmp = t_1
else if (t1 <= (-1.65d-125)) then
tmp = -v / t1
else if (t1 <= 7.2d-27) 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 * (-u / v));
double tmp;
if (t1 <= -2.5e-17) {
tmp = v / (u - t1);
} else if (t1 <= -1.3e-94) {
tmp = t_1;
} else if (t1 <= -1.65e-125) {
tmp = -v / t1;
} else if (t1 <= 7.2e-27) {
tmp = t_1;
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): t_1 = t1 / (u * (-u / v)) tmp = 0 if t1 <= -2.5e-17: tmp = v / (u - t1) elif t1 <= -1.3e-94: tmp = t_1 elif t1 <= -1.65e-125: tmp = -v / t1 elif t1 <= 7.2e-27: tmp = t_1 else: tmp = -v / (t1 + u) return tmp
function code(u, v, t1) t_1 = Float64(t1 / Float64(u * Float64(Float64(-u) / v))) tmp = 0.0 if (t1 <= -2.5e-17) tmp = Float64(v / Float64(u - t1)); elseif (t1 <= -1.3e-94) tmp = t_1; elseif (t1 <= -1.65e-125) tmp = Float64(Float64(-v) / t1); elseif (t1 <= 7.2e-27) 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 * (-u / v)); tmp = 0.0; if (t1 <= -2.5e-17) tmp = v / (u - t1); elseif (t1 <= -1.3e-94) tmp = t_1; elseif (t1 <= -1.65e-125) tmp = -v / t1; elseif (t1 <= 7.2e-27) tmp = t_1; else tmp = -v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(t1 / N[(u * N[((-u) / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -2.5e-17], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, -1.3e-94], t$95$1, If[LessEqual[t1, -1.65e-125], N[((-v) / t1), $MachinePrecision], If[LessEqual[t1, 7.2e-27], t$95$1, N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t1}{u \cdot \frac{-u}{v}}\\
\mathbf{if}\;t1 \leq -2.5 \cdot 10^{-17}:\\
\;\;\;\;\frac{v}{u - t1}\\
\mathbf{elif}\;t1 \leq -1.3 \cdot 10^{-94}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t1 \leq -1.65 \cdot 10^{-125}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{elif}\;t1 \leq 7.2 \cdot 10^{-27}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\end{array}
\end{array}
if t1 < -2.4999999999999999e-17Initial program 68.4%
associate-*l/74.2%
*-commutative74.2%
Simplified74.2%
neg-mul-174.2%
times-frac96.8%
Applied egg-rr96.8%
associate-*l/96.8%
mul-1-neg96.8%
Simplified96.8%
Taylor expanded in t1 around inf 80.6%
frac-2neg80.6%
metadata-eval80.6%
metadata-eval80.6%
un-div-inv80.9%
+-commutative80.9%
distribute-neg-in80.9%
add-sqr-sqrt44.9%
sqrt-unprod80.4%
sqr-neg80.4%
sqrt-unprod36.5%
add-sqr-sqrt81.0%
Applied egg-rr81.0%
sub-neg81.0%
Simplified81.0%
if -2.4999999999999999e-17 < t1 < -1.29999999999999997e-94 or -1.65e-125 < t1 < 7.1999999999999997e-27Initial program 86.4%
associate-/r*91.2%
associate-/l*95.3%
Simplified95.3%
clear-num95.2%
associate-/r/95.2%
Applied egg-rr95.2%
Taylor expanded in t1 around 0 80.9%
mul-1-neg80.9%
*-commutative80.9%
unpow280.9%
times-frac86.0%
distribute-rgt-neg-in86.0%
distribute-neg-frac86.0%
Simplified86.0%
clear-num86.0%
frac-2neg86.0%
frac-times87.5%
*-un-lft-identity87.5%
remove-double-neg87.5%
Applied egg-rr87.5%
if -1.29999999999999997e-94 < t1 < -1.65e-125Initial program 78.6%
associate-*l/99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in t1 around inf 72.0%
associate-*r/72.0%
neg-mul-172.0%
Simplified72.0%
if 7.1999999999999997e-27 < t1 Initial program 60.8%
associate-/r*75.6%
associate-/l*98.9%
Simplified98.9%
Taylor expanded in t1 around inf 85.4%
neg-mul-185.4%
Simplified85.4%
Final simplification84.6%
(FPCore (u v t1)
:precision binary64
(if (<= t1 -1.62e-18)
(/ v (- u t1))
(if (<= t1 -1.25e-94)
(/ (* v (/ t1 u)) (- u))
(if (<= t1 -1.4e-126)
(/ (- v) t1)
(if (<= t1 9.5e-26) (/ t1 (* u (/ (- u) v))) (/ (- v) (+ t1 u)))))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1.62e-18) {
tmp = v / (u - t1);
} else if (t1 <= -1.25e-94) {
tmp = (v * (t1 / u)) / -u;
} else if (t1 <= -1.4e-126) {
tmp = -v / t1;
} else if (t1 <= 9.5e-26) {
tmp = t1 / (u * (-u / v));
} 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 (t1 <= (-1.62d-18)) then
tmp = v / (u - t1)
else if (t1 <= (-1.25d-94)) then
tmp = (v * (t1 / u)) / -u
else if (t1 <= (-1.4d-126)) then
tmp = -v / t1
else if (t1 <= 9.5d-26) then
tmp = t1 / (u * (-u / v))
else
tmp = -v / (t1 + u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1.62e-18) {
tmp = v / (u - t1);
} else if (t1 <= -1.25e-94) {
tmp = (v * (t1 / u)) / -u;
} else if (t1 <= -1.4e-126) {
tmp = -v / t1;
} else if (t1 <= 9.5e-26) {
tmp = t1 / (u * (-u / v));
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -1.62e-18: tmp = v / (u - t1) elif t1 <= -1.25e-94: tmp = (v * (t1 / u)) / -u elif t1 <= -1.4e-126: tmp = -v / t1 elif t1 <= 9.5e-26: tmp = t1 / (u * (-u / v)) else: tmp = -v / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -1.62e-18) tmp = Float64(v / Float64(u - t1)); elseif (t1 <= -1.25e-94) tmp = Float64(Float64(v * Float64(t1 / u)) / Float64(-u)); elseif (t1 <= -1.4e-126) tmp = Float64(Float64(-v) / t1); elseif (t1 <= 9.5e-26) tmp = Float64(t1 / Float64(u * Float64(Float64(-u) / v))); else tmp = Float64(Float64(-v) / Float64(t1 + u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -1.62e-18) tmp = v / (u - t1); elseif (t1 <= -1.25e-94) tmp = (v * (t1 / u)) / -u; elseif (t1 <= -1.4e-126) tmp = -v / t1; elseif (t1 <= 9.5e-26) tmp = t1 / (u * (-u / v)); else tmp = -v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -1.62e-18], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, -1.25e-94], N[(N[(v * N[(t1 / u), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision], If[LessEqual[t1, -1.4e-126], N[((-v) / t1), $MachinePrecision], If[LessEqual[t1, 9.5e-26], N[(t1 / N[(u * N[((-u) / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.62 \cdot 10^{-18}:\\
\;\;\;\;\frac{v}{u - t1}\\
\mathbf{elif}\;t1 \leq -1.25 \cdot 10^{-94}:\\
\;\;\;\;\frac{v \cdot \frac{t1}{u}}{-u}\\
\mathbf{elif}\;t1 \leq -1.4 \cdot 10^{-126}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{elif}\;t1 \leq 9.5 \cdot 10^{-26}:\\
\;\;\;\;\frac{t1}{u \cdot \frac{-u}{v}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\end{array}
\end{array}
if t1 < -1.62000000000000005e-18Initial program 68.4%
associate-*l/74.2%
*-commutative74.2%
Simplified74.2%
neg-mul-174.2%
times-frac96.8%
Applied egg-rr96.8%
associate-*l/96.8%
mul-1-neg96.8%
Simplified96.8%
Taylor expanded in t1 around inf 80.6%
frac-2neg80.6%
metadata-eval80.6%
metadata-eval80.6%
un-div-inv80.9%
+-commutative80.9%
distribute-neg-in80.9%
add-sqr-sqrt44.9%
sqrt-unprod80.4%
sqr-neg80.4%
sqrt-unprod36.5%
add-sqr-sqrt81.0%
Applied egg-rr81.0%
sub-neg81.0%
Simplified81.0%
if -1.62000000000000005e-18 < t1 < -1.2499999999999999e-94Initial program 99.5%
associate-/r*100.0%
associate-/l*99.8%
Simplified99.8%
clear-num99.6%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in t1 around 0 92.4%
mul-1-neg92.4%
*-commutative92.4%
unpow292.4%
times-frac92.5%
distribute-rgt-neg-in92.5%
distribute-neg-frac92.5%
Simplified92.5%
frac-2neg92.5%
associate-*l/92.8%
add-sqr-sqrt69.1%
sqrt-unprod70.0%
sqr-neg70.0%
sqrt-unprod15.7%
add-sqr-sqrt47.2%
add-sqr-sqrt47.2%
sqrt-unprod47.2%
sqr-neg47.2%
sqrt-unprod0.0%
add-sqr-sqrt92.8%
Applied egg-rr92.8%
if -1.2499999999999999e-94 < t1 < -1.39999999999999996e-126Initial program 78.6%
associate-*l/99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in t1 around inf 72.0%
associate-*r/72.0%
neg-mul-172.0%
Simplified72.0%
if -1.39999999999999996e-126 < t1 < 9.4999999999999995e-26Initial program 84.5%
associate-/r*89.9%
associate-/l*94.6%
Simplified94.6%
clear-num94.5%
associate-/r/94.5%
Applied egg-rr94.5%
Taylor expanded in t1 around 0 79.2%
mul-1-neg79.2%
*-commutative79.2%
unpow279.2%
times-frac85.1%
distribute-rgt-neg-in85.1%
distribute-neg-frac85.1%
Simplified85.1%
clear-num85.1%
frac-2neg85.1%
frac-times86.8%
*-un-lft-identity86.8%
remove-double-neg86.8%
Applied egg-rr86.8%
if 9.4999999999999995e-26 < t1 Initial program 60.8%
associate-/r*75.6%
associate-/l*98.9%
Simplified98.9%
Taylor expanded in t1 around inf 85.4%
neg-mul-185.4%
Simplified85.4%
Final simplification84.6%
(FPCore (u v t1)
:precision binary64
(if (<= t1 -1.35e-18)
(/ v (- u t1))
(if (<= t1 -1.5e-94)
(/ (/ (* t1 v) u) (- t1 u))
(if (<= t1 -1.65e-125)
(/ (- v) t1)
(if (<= t1 7.8e-25) (/ t1 (* u (/ (- u) v))) (/ (- v) (+ t1 u)))))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1.35e-18) {
tmp = v / (u - t1);
} else if (t1 <= -1.5e-94) {
tmp = ((t1 * v) / u) / (t1 - u);
} else if (t1 <= -1.65e-125) {
tmp = -v / t1;
} else if (t1 <= 7.8e-25) {
tmp = t1 / (u * (-u / v));
} 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 (t1 <= (-1.35d-18)) then
tmp = v / (u - t1)
else if (t1 <= (-1.5d-94)) then
tmp = ((t1 * v) / u) / (t1 - u)
else if (t1 <= (-1.65d-125)) then
tmp = -v / t1
else if (t1 <= 7.8d-25) then
tmp = t1 / (u * (-u / v))
else
tmp = -v / (t1 + u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1.35e-18) {
tmp = v / (u - t1);
} else if (t1 <= -1.5e-94) {
tmp = ((t1 * v) / u) / (t1 - u);
} else if (t1 <= -1.65e-125) {
tmp = -v / t1;
} else if (t1 <= 7.8e-25) {
tmp = t1 / (u * (-u / v));
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -1.35e-18: tmp = v / (u - t1) elif t1 <= -1.5e-94: tmp = ((t1 * v) / u) / (t1 - u) elif t1 <= -1.65e-125: tmp = -v / t1 elif t1 <= 7.8e-25: tmp = t1 / (u * (-u / v)) else: tmp = -v / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -1.35e-18) tmp = Float64(v / Float64(u - t1)); elseif (t1 <= -1.5e-94) tmp = Float64(Float64(Float64(t1 * v) / u) / Float64(t1 - u)); elseif (t1 <= -1.65e-125) tmp = Float64(Float64(-v) / t1); elseif (t1 <= 7.8e-25) tmp = Float64(t1 / Float64(u * Float64(Float64(-u) / v))); else tmp = Float64(Float64(-v) / Float64(t1 + u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -1.35e-18) tmp = v / (u - t1); elseif (t1 <= -1.5e-94) tmp = ((t1 * v) / u) / (t1 - u); elseif (t1 <= -1.65e-125) tmp = -v / t1; elseif (t1 <= 7.8e-25) tmp = t1 / (u * (-u / v)); else tmp = -v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -1.35e-18], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, -1.5e-94], N[(N[(N[(t1 * v), $MachinePrecision] / u), $MachinePrecision] / N[(t1 - u), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, -1.65e-125], N[((-v) / t1), $MachinePrecision], If[LessEqual[t1, 7.8e-25], N[(t1 / N[(u * N[((-u) / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.35 \cdot 10^{-18}:\\
\;\;\;\;\frac{v}{u - t1}\\
\mathbf{elif}\;t1 \leq -1.5 \cdot 10^{-94}:\\
\;\;\;\;\frac{\frac{t1 \cdot v}{u}}{t1 - u}\\
\mathbf{elif}\;t1 \leq -1.65 \cdot 10^{-125}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{elif}\;t1 \leq 7.8 \cdot 10^{-25}:\\
\;\;\;\;\frac{t1}{u \cdot \frac{-u}{v}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\end{array}
\end{array}
if t1 < -1.34999999999999994e-18Initial program 68.4%
associate-*l/74.2%
*-commutative74.2%
Simplified74.2%
neg-mul-174.2%
times-frac96.8%
Applied egg-rr96.8%
associate-*l/96.8%
mul-1-neg96.8%
Simplified96.8%
Taylor expanded in t1 around inf 80.6%
frac-2neg80.6%
metadata-eval80.6%
metadata-eval80.6%
un-div-inv80.9%
+-commutative80.9%
distribute-neg-in80.9%
add-sqr-sqrt44.9%
sqrt-unprod80.4%
sqr-neg80.4%
sqrt-unprod36.5%
add-sqr-sqrt81.0%
Applied egg-rr81.0%
sub-neg81.0%
Simplified81.0%
if -1.34999999999999994e-18 < t1 < -1.5000000000000001e-94Initial program 99.5%
associate-/r*100.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in t1 around 0 92.4%
mul-1-neg92.4%
associate-/l*92.1%
distribute-neg-frac92.1%
Simplified92.1%
expm1-log1p-u84.5%
expm1-udef54.6%
Applied egg-rr55.2%
expm1-def85.2%
expm1-log1p92.9%
associate-*l/92.9%
Simplified92.9%
if -1.5000000000000001e-94 < t1 < -1.65e-125Initial program 78.6%
associate-*l/99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in t1 around inf 72.0%
associate-*r/72.0%
neg-mul-172.0%
Simplified72.0%
if -1.65e-125 < t1 < 7.8e-25Initial program 84.5%
associate-/r*89.9%
associate-/l*94.6%
Simplified94.6%
clear-num94.5%
associate-/r/94.5%
Applied egg-rr94.5%
Taylor expanded in t1 around 0 79.2%
mul-1-neg79.2%
*-commutative79.2%
unpow279.2%
times-frac85.1%
distribute-rgt-neg-in85.1%
distribute-neg-frac85.1%
Simplified85.1%
clear-num85.1%
frac-2neg85.1%
frac-times86.8%
*-un-lft-identity86.8%
remove-double-neg86.8%
Applied egg-rr86.8%
if 7.8e-25 < t1 Initial program 60.8%
associate-/r*75.6%
associate-/l*98.9%
Simplified98.9%
Taylor expanded in t1 around inf 85.4%
neg-mul-185.4%
Simplified85.4%
Final simplification84.6%
(FPCore (u v t1) :precision binary64 (* v (/ (/ (- t1) (+ t1 u)) (+ t1 u))))
double code(double u, double v, double t1) {
return v * ((-t1 / (t1 + u)) / (t1 + u));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = v * ((-t1 / (t1 + u)) / (t1 + u))
end function
public static double code(double u, double v, double t1) {
return v * ((-t1 / (t1 + u)) / (t1 + u));
}
def code(u, v, t1): return v * ((-t1 / (t1 + u)) / (t1 + u))
function code(u, v, t1) return Float64(v * Float64(Float64(Float64(-t1) / Float64(t1 + u)) / Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = v * ((-t1 / (t1 + u)) / (t1 + u)); end
code[u_, v_, t1_] := N[(v * N[(N[((-t1) / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
v \cdot \frac{\frac{-t1}{t1 + u}}{t1 + u}
\end{array}
Initial program 73.6%
associate-*l/77.7%
*-commutative77.7%
Simplified77.7%
neg-mul-177.7%
times-frac95.3%
Applied egg-rr95.3%
associate-*l/95.3%
mul-1-neg95.3%
Simplified95.3%
Final simplification95.3%
(FPCore (u v t1) :precision binary64 (if (or (<= u -2.2e+68) (not (<= u 2.9e+137))) (/ t1 (* u (/ u v))) (/ (- v) (+ t1 u))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.2e+68) || !(u <= 2.9e+137)) {
tmp = t1 / (u * (u / v));
} 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.2d+68)) .or. (.not. (u <= 2.9d+137))) then
tmp = t1 / (u * (u / v))
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.2e+68) || !(u <= 2.9e+137)) {
tmp = t1 / (u * (u / v));
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -2.2e+68) or not (u <= 2.9e+137): tmp = t1 / (u * (u / v)) else: tmp = -v / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -2.2e+68) || !(u <= 2.9e+137)) tmp = Float64(t1 / Float64(u * Float64(u / v))); 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.2e+68) || ~((u <= 2.9e+137))) tmp = t1 / (u * (u / v)); else tmp = -v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2.2e+68], N[Not[LessEqual[u, 2.9e+137]], $MachinePrecision]], N[(t1 / N[(u * N[(u / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.2 \cdot 10^{+68} \lor \neg \left(u \leq 2.9 \cdot 10^{+137}\right):\\
\;\;\;\;\frac{t1}{u \cdot \frac{u}{v}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\end{array}
\end{array}
if u < -2.19999999999999987e68 or 2.89999999999999985e137 < u Initial program 78.0%
associate-/r*88.0%
associate-/l*99.7%
Simplified99.7%
clear-num99.7%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in t1 around 0 74.6%
mul-1-neg74.6%
*-commutative74.6%
unpow274.6%
times-frac87.3%
distribute-rgt-neg-in87.3%
distribute-neg-frac87.3%
Simplified87.3%
clear-num88.5%
frac-times84.5%
*-un-lft-identity84.5%
add-sqr-sqrt41.0%
sqrt-unprod66.0%
sqr-neg66.0%
sqrt-unprod35.1%
add-sqr-sqrt66.5%
Applied egg-rr66.5%
if -2.19999999999999987e68 < u < 2.89999999999999985e137Initial program 71.6%
associate-/r*81.0%
associate-/l*96.7%
Simplified96.7%
Taylor expanded in t1 around inf 69.3%
neg-mul-169.3%
Simplified69.3%
Final simplification68.4%
(FPCore (u v t1) :precision binary64 (if (or (<= u -2.3e+68) (not (<= u 2e+200))) (/ (- v) u) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.3e+68) || !(u <= 2e+200)) {
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 <= (-2.3d+68)) .or. (.not. (u <= 2d+200))) 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 <= -2.3e+68) || !(u <= 2e+200)) {
tmp = -v / u;
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -2.3e+68) or not (u <= 2e+200): tmp = -v / u else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -2.3e+68) || !(u <= 2e+200)) tmp = Float64(Float64(-v) / u); else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -2.3e+68) || ~((u <= 2e+200))) tmp = -v / u; else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2.3e+68], N[Not[LessEqual[u, 2e+200]], $MachinePrecision]], N[((-v) / u), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.3 \cdot 10^{+68} \lor \neg \left(u \leq 2 \cdot 10^{+200}\right):\\
\;\;\;\;\frac{-v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -2.3e68 or 1.9999999999999999e200 < u Initial program 80.8%
associate-/r*89.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in t1 around 0 89.5%
mul-1-neg89.5%
associate-/l*94.7%
distribute-neg-frac94.7%
Simplified94.7%
Taylor expanded in t1 around inf 42.4%
neg-mul-142.4%
distribute-neg-frac42.4%
Simplified42.4%
if -2.3e68 < u < 1.9999999999999999e200Initial program 71.5%
associate-*l/77.2%
*-commutative77.2%
Simplified77.2%
Taylor expanded in t1 around inf 64.2%
associate-*r/64.2%
neg-mul-164.2%
Simplified64.2%
Final simplification59.2%
(FPCore (u v t1) :precision binary64 (if (<= u -2.3e+68) (/ v u) (if (<= u 1.55e+199) (/ (- v) t1) (/ v u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -2.3e+68) {
tmp = v / u;
} else if (u <= 1.55e+199) {
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.3d+68)) then
tmp = v / u
else if (u <= 1.55d+199) 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.3e+68) {
tmp = v / u;
} else if (u <= 1.55e+199) {
tmp = -v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -2.3e+68: tmp = v / u elif u <= 1.55e+199: tmp = -v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -2.3e+68) tmp = Float64(v / u); elseif (u <= 1.55e+199) 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.3e+68) tmp = v / u; elseif (u <= 1.55e+199) tmp = -v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -2.3e+68], N[(v / u), $MachinePrecision], If[LessEqual[u, 1.55e+199], N[((-v) / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.3 \cdot 10^{+68}:\\
\;\;\;\;\frac{v}{u}\\
\mathbf{elif}\;u \leq 1.55 \cdot 10^{+199}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if u < -2.3e68 or 1.54999999999999993e199 < u Initial program 80.8%
associate-/r*89.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in t1 around 0 89.5%
mul-1-neg89.5%
associate-/l*94.7%
distribute-neg-frac94.7%
Simplified94.7%
expm1-log1p-u92.8%
expm1-udef72.7%
Applied egg-rr72.7%
expm1-def91.0%
expm1-log1p93.0%
associate-/l*93.4%
Simplified93.4%
Taylor expanded in t1 around inf 42.3%
if -2.3e68 < u < 1.54999999999999993e199Initial program 71.5%
associate-*l/77.2%
*-commutative77.2%
Simplified77.2%
Taylor expanded in t1 around inf 64.2%
associate-*r/64.2%
neg-mul-164.2%
Simplified64.2%
Final simplification59.2%
(FPCore (u v t1) :precision binary64 (if (<= t1 -1.6e+120) (/ v t1) (if (<= t1 1.75e+90) (/ v u) (/ v t1))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1.6e+120) {
tmp = v / t1;
} else if (t1 <= 1.75e+90) {
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 (t1 <= (-1.6d+120)) then
tmp = v / t1
else if (t1 <= 1.75d+90) 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 (t1 <= -1.6e+120) {
tmp = v / t1;
} else if (t1 <= 1.75e+90) {
tmp = v / u;
} else {
tmp = v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -1.6e+120: tmp = v / t1 elif t1 <= 1.75e+90: tmp = v / u else: tmp = v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -1.6e+120) tmp = Float64(v / t1); elseif (t1 <= 1.75e+90) tmp = Float64(v / u); else tmp = Float64(v / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -1.6e+120) tmp = v / t1; elseif (t1 <= 1.75e+90) tmp = v / u; else tmp = v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -1.6e+120], N[(v / t1), $MachinePrecision], If[LessEqual[t1, 1.75e+90], N[(v / u), $MachinePrecision], N[(v / t1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.6 \cdot 10^{+120}:\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{elif}\;t1 \leq 1.75 \cdot 10^{+90}:\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{t1}\\
\end{array}
\end{array}
if t1 < -1.59999999999999991e120 or 1.7499999999999999e90 < t1 Initial program 46.6%
associate-/r*66.8%
associate-/l*99.1%
Simplified99.1%
Taylor expanded in t1 around inf 83.6%
neg-mul-183.6%
+-commutative83.6%
unsub-neg83.6%
associate-/l*90.6%
Simplified90.6%
Taylor expanded in u around inf 35.2%
if -1.59999999999999991e120 < t1 < 1.7499999999999999e90Initial program 87.1%
associate-/r*91.4%
associate-/l*96.9%
Simplified96.9%
Taylor expanded in t1 around 0 63.9%
mul-1-neg63.9%
associate-/l*67.5%
distribute-neg-frac67.5%
Simplified67.5%
expm1-log1p-u59.5%
expm1-udef38.8%
Applied egg-rr38.1%
expm1-def56.6%
expm1-log1p64.6%
associate-/l*64.4%
Simplified64.4%
Taylor expanded in t1 around inf 15.6%
Final simplification22.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.6%
associate-/r*83.2%
associate-/l*97.6%
Simplified97.6%
Taylor expanded in t1 around inf 61.8%
neg-mul-161.8%
Simplified61.8%
Final simplification61.8%
(FPCore (u v t1) :precision binary64 (/ v (- u t1)))
double code(double u, double v, double t1) {
return v / (u - t1);
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = v / (u - t1)
end function
public static double code(double u, double v, double t1) {
return v / (u - t1);
}
def code(u, v, t1): return v / (u - t1)
function code(u, v, t1) return Float64(v / Float64(u - t1)) end
function tmp = code(u, v, t1) tmp = v / (u - t1); end
code[u_, v_, t1_] := N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{u - t1}
\end{array}
Initial program 73.6%
associate-*l/77.7%
*-commutative77.7%
Simplified77.7%
neg-mul-177.7%
times-frac95.3%
Applied egg-rr95.3%
associate-*l/95.3%
mul-1-neg95.3%
Simplified95.3%
Taylor expanded in t1 around inf 61.7%
frac-2neg61.7%
metadata-eval61.7%
metadata-eval61.7%
un-div-inv61.8%
+-commutative61.8%
distribute-neg-in61.8%
add-sqr-sqrt29.2%
sqrt-unprod66.2%
sqr-neg66.2%
sqrt-unprod32.0%
add-sqr-sqrt61.0%
Applied egg-rr61.0%
sub-neg61.0%
Simplified61.0%
Final simplification61.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 73.6%
associate-/r*83.2%
associate-/l*97.6%
Simplified97.6%
Taylor expanded in t1 around inf 51.0%
neg-mul-151.0%
+-commutative51.0%
unsub-neg51.0%
associate-/l*51.4%
Simplified51.4%
Taylor expanded in u around inf 13.9%
Final simplification13.9%
herbie shell --seed 2023271
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))