
(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 13 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 69.5%
associate-/r*81.4%
associate-/l*99.3%
Simplified99.3%
Final simplification99.3%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (* v (/ (- t1) (* (+ t1 u) (+ t1 u))))))
(if (<= t1 -1.24e+141)
(/ (- v) (+ t1 u))
(if (<= t1 -7.6e-132)
t_1
(if (<= t1 5.6e-212)
(/ (* t1 (/ v u)) (- u))
(if (<= t1 1.35e+154) t_1 (/ (* v (+ (/ u t1) -1.0)) (+ t1 u))))))))
double code(double u, double v, double t1) {
double t_1 = v * (-t1 / ((t1 + u) * (t1 + u)));
double tmp;
if (t1 <= -1.24e+141) {
tmp = -v / (t1 + u);
} else if (t1 <= -7.6e-132) {
tmp = t_1;
} else if (t1 <= 5.6e-212) {
tmp = (t1 * (v / u)) / -u;
} else if (t1 <= 1.35e+154) {
tmp = t_1;
} else {
tmp = (v * ((u / t1) + -1.0)) / (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.24d+141)) then
tmp = -v / (t1 + u)
else if (t1 <= (-7.6d-132)) then
tmp = t_1
else if (t1 <= 5.6d-212) then
tmp = (t1 * (v / u)) / -u
else if (t1 <= 1.35d+154) then
tmp = t_1
else
tmp = (v * ((u / t1) + (-1.0d0))) / (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.24e+141) {
tmp = -v / (t1 + u);
} else if (t1 <= -7.6e-132) {
tmp = t_1;
} else if (t1 <= 5.6e-212) {
tmp = (t1 * (v / u)) / -u;
} else if (t1 <= 1.35e+154) {
tmp = t_1;
} else {
tmp = (v * ((u / t1) + -1.0)) / (t1 + u);
}
return tmp;
}
def code(u, v, t1): t_1 = v * (-t1 / ((t1 + u) * (t1 + u))) tmp = 0 if t1 <= -1.24e+141: tmp = -v / (t1 + u) elif t1 <= -7.6e-132: tmp = t_1 elif t1 <= 5.6e-212: tmp = (t1 * (v / u)) / -u elif t1 <= 1.35e+154: tmp = t_1 else: tmp = (v * ((u / t1) + -1.0)) / (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.24e+141) tmp = Float64(Float64(-v) / Float64(t1 + u)); elseif (t1 <= -7.6e-132) tmp = t_1; elseif (t1 <= 5.6e-212) tmp = Float64(Float64(t1 * Float64(v / u)) / Float64(-u)); elseif (t1 <= 1.35e+154) tmp = t_1; else tmp = Float64(Float64(v * Float64(Float64(u / t1) + -1.0)) / 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.24e+141) tmp = -v / (t1 + u); elseif (t1 <= -7.6e-132) tmp = t_1; elseif (t1 <= 5.6e-212) tmp = (t1 * (v / u)) / -u; elseif (t1 <= 1.35e+154) tmp = t_1; else tmp = (v * ((u / t1) + -1.0)) / (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.24e+141], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, -7.6e-132], t$95$1, If[LessEqual[t1, 5.6e-212], N[(N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision], If[LessEqual[t1, 1.35e+154], t$95$1, N[(N[(v * N[(N[(u / t1), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] / 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.24 \cdot 10^{+141}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\mathbf{elif}\;t1 \leq -7.6 \cdot 10^{-132}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t1 \leq 5.6 \cdot 10^{-212}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{u}}{-u}\\
\mathbf{elif}\;t1 \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{v \cdot \left(\frac{u}{t1} + -1\right)}{t1 + u}\\
\end{array}
\end{array}
if t1 < -1.24e141Initial program 47.0%
associate-/r*70.5%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in t1 around inf 97.2%
neg-mul-197.2%
Simplified97.2%
if -1.24e141 < t1 < -7.5999999999999994e-132 or 5.60000000000000027e-212 < t1 < 1.35000000000000003e154Initial program 85.3%
associate-*l/91.4%
*-commutative91.4%
Simplified91.4%
if -7.5999999999999994e-132 < t1 < 5.60000000000000027e-212Initial program 74.6%
associate-*l/74.2%
*-commutative74.2%
Simplified74.2%
Taylor expanded in t1 around 0 74.2%
associate-*r/74.2%
neg-mul-174.2%
unpow274.2%
Simplified74.2%
add-log-exp56.7%
exp-prod55.8%
add-sqr-sqrt47.7%
sqrt-unprod51.6%
sqr-neg51.6%
sqrt-unprod35.4%
add-sqr-sqrt49.3%
Applied egg-rr49.3%
log-pow27.4%
rem-log-exp49.0%
Simplified49.0%
associate-*l/48.9%
associate-/l*48.9%
add-sqr-sqrt17.5%
sqrt-unprod53.8%
sqr-neg53.8%
sqrt-unprod47.8%
add-sqr-sqrt75.1%
associate-/l*74.6%
associate-/r*82.1%
frac-2neg82.1%
Applied egg-rr91.6%
if 1.35000000000000003e154 < t1 Initial program 33.8%
associate-/r*59.2%
associate-/l*99.1%
Simplified99.1%
Taylor expanded in t1 around inf 74.9%
neg-mul-174.9%
+-commutative74.9%
unsub-neg74.9%
associate-/l*84.1%
Simplified84.1%
Taylor expanded in v around 0 84.1%
Final simplification91.0%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ (- v) (+ t1 u))) (t_2 (* (/ v u) (/ t1 (- u)))))
(if (<= t1 -3.85e+55)
t_1
(if (<= t1 -1.05e-37)
t_2
(if (<= t1 -4.3e-109) (/ v (- u t1)) (if (<= t1 2.3e-54) t_2 t_1))))))
double code(double u, double v, double t1) {
double t_1 = -v / (t1 + u);
double t_2 = (v / u) * (t1 / -u);
double tmp;
if (t1 <= -3.85e+55) {
tmp = t_1;
} else if (t1 <= -1.05e-37) {
tmp = t_2;
} else if (t1 <= -4.3e-109) {
tmp = v / (u - t1);
} else if (t1 <= 2.3e-54) {
tmp = t_2;
} else {
tmp = t_1;
}
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)
t_2 = (v / u) * (t1 / -u)
if (t1 <= (-3.85d+55)) then
tmp = t_1
else if (t1 <= (-1.05d-37)) then
tmp = t_2
else if (t1 <= (-4.3d-109)) then
tmp = v / (u - t1)
else if (t1 <= 2.3d-54) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = -v / (t1 + u);
double t_2 = (v / u) * (t1 / -u);
double tmp;
if (t1 <= -3.85e+55) {
tmp = t_1;
} else if (t1 <= -1.05e-37) {
tmp = t_2;
} else if (t1 <= -4.3e-109) {
tmp = v / (u - t1);
} else if (t1 <= 2.3e-54) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(u, v, t1): t_1 = -v / (t1 + u) t_2 = (v / u) * (t1 / -u) tmp = 0 if t1 <= -3.85e+55: tmp = t_1 elif t1 <= -1.05e-37: tmp = t_2 elif t1 <= -4.3e-109: tmp = v / (u - t1) elif t1 <= 2.3e-54: tmp = t_2 else: tmp = t_1 return tmp
function code(u, v, t1) t_1 = Float64(Float64(-v) / Float64(t1 + u)) t_2 = Float64(Float64(v / u) * Float64(t1 / Float64(-u))) tmp = 0.0 if (t1 <= -3.85e+55) tmp = t_1; elseif (t1 <= -1.05e-37) tmp = t_2; elseif (t1 <= -4.3e-109) tmp = Float64(v / Float64(u - t1)); elseif (t1 <= 2.3e-54) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(u, v, t1) t_1 = -v / (t1 + u); t_2 = (v / u) * (t1 / -u); tmp = 0.0; if (t1 <= -3.85e+55) tmp = t_1; elseif (t1 <= -1.05e-37) tmp = t_2; elseif (t1 <= -4.3e-109) tmp = v / (u - t1); elseif (t1 <= 2.3e-54) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(v / u), $MachinePrecision] * N[(t1 / (-u)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -3.85e+55], t$95$1, If[LessEqual[t1, -1.05e-37], t$95$2, If[LessEqual[t1, -4.3e-109], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 2.3e-54], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-v}{t1 + u}\\
t_2 := \frac{v}{u} \cdot \frac{t1}{-u}\\
\mathbf{if}\;t1 \leq -3.85 \cdot 10^{+55}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t1 \leq -1.05 \cdot 10^{-37}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t1 \leq -4.3 \cdot 10^{-109}:\\
\;\;\;\;\frac{v}{u - t1}\\
\mathbf{elif}\;t1 \leq 2.3 \cdot 10^{-54}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t1 < -3.84999999999999984e55 or 2.2999999999999999e-54 < t1 Initial program 60.0%
associate-/r*75.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in t1 around inf 85.0%
neg-mul-185.0%
Simplified85.0%
if -3.84999999999999984e55 < t1 < -1.05e-37 or -4.2999999999999997e-109 < t1 < 2.2999999999999999e-54Initial program 80.2%
associate-/l*81.9%
neg-mul-181.9%
associate-*r/91.5%
times-frac98.7%
div-inv98.6%
clear-num98.7%
Applied egg-rr98.7%
Taylor expanded in t1 around 0 72.1%
metadata-eval72.1%
*-commutative72.1%
unpow272.1%
associate-/r*79.1%
*-commutative79.1%
associate-*l/85.5%
times-frac85.5%
*-lft-identity85.5%
associate-*l/79.1%
*-commutative79.1%
neg-mul-179.1%
associate-/r*72.1%
times-frac84.5%
Simplified84.5%
if -1.05e-37 < t1 < -4.2999999999999997e-109Initial program 92.8%
associate-/l*92.8%
neg-mul-192.8%
associate-*r/93.1%
times-frac99.4%
div-inv99.4%
clear-num99.6%
Applied egg-rr99.6%
Taylor expanded in t1 around inf 82.4%
*-commutative82.4%
frac-2neg82.4%
metadata-eval82.4%
un-div-inv82.6%
+-commutative82.6%
distribute-neg-in82.6%
add-sqr-sqrt53.8%
sqrt-unprod84.2%
sqr-neg84.2%
sqrt-unprod30.4%
add-sqr-sqrt83.9%
Applied egg-rr83.9%
unsub-neg83.9%
Simplified83.9%
Final simplification84.7%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ (- v) (+ t1 u))))
(if (<= t1 -7e+54)
t_1
(if (<= t1 -5.6e-49)
(/ (- t1) (/ u (/ v u)))
(if (<= t1 -5e-109)
(/ v (- u t1))
(if (<= t1 2.2e-54) (* (/ v u) (/ t1 (- u))) t_1))))))
double code(double u, double v, double t1) {
double t_1 = -v / (t1 + u);
double tmp;
if (t1 <= -7e+54) {
tmp = t_1;
} else if (t1 <= -5.6e-49) {
tmp = -t1 / (u / (v / u));
} else if (t1 <= -5e-109) {
tmp = v / (u - t1);
} else if (t1 <= 2.2e-54) {
tmp = (v / u) * (t1 / -u);
} else {
tmp = t_1;
}
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)
if (t1 <= (-7d+54)) then
tmp = t_1
else if (t1 <= (-5.6d-49)) then
tmp = -t1 / (u / (v / u))
else if (t1 <= (-5d-109)) then
tmp = v / (u - t1)
else if (t1 <= 2.2d-54) then
tmp = (v / u) * (t1 / -u)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = -v / (t1 + u);
double tmp;
if (t1 <= -7e+54) {
tmp = t_1;
} else if (t1 <= -5.6e-49) {
tmp = -t1 / (u / (v / u));
} else if (t1 <= -5e-109) {
tmp = v / (u - t1);
} else if (t1 <= 2.2e-54) {
tmp = (v / u) * (t1 / -u);
} else {
tmp = t_1;
}
return tmp;
}
def code(u, v, t1): t_1 = -v / (t1 + u) tmp = 0 if t1 <= -7e+54: tmp = t_1 elif t1 <= -5.6e-49: tmp = -t1 / (u / (v / u)) elif t1 <= -5e-109: tmp = v / (u - t1) elif t1 <= 2.2e-54: tmp = (v / u) * (t1 / -u) else: tmp = t_1 return tmp
function code(u, v, t1) t_1 = Float64(Float64(-v) / Float64(t1 + u)) tmp = 0.0 if (t1 <= -7e+54) tmp = t_1; elseif (t1 <= -5.6e-49) tmp = Float64(Float64(-t1) / Float64(u / Float64(v / u))); elseif (t1 <= -5e-109) tmp = Float64(v / Float64(u - t1)); elseif (t1 <= 2.2e-54) tmp = Float64(Float64(v / u) * Float64(t1 / Float64(-u))); else tmp = t_1; end return tmp end
function tmp_2 = code(u, v, t1) t_1 = -v / (t1 + u); tmp = 0.0; if (t1 <= -7e+54) tmp = t_1; elseif (t1 <= -5.6e-49) tmp = -t1 / (u / (v / u)); elseif (t1 <= -5e-109) tmp = v / (u - t1); elseif (t1 <= 2.2e-54) tmp = (v / u) * (t1 / -u); else tmp = t_1; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -7e+54], t$95$1, If[LessEqual[t1, -5.6e-49], N[((-t1) / N[(u / N[(v / u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, -5e-109], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 2.2e-54], N[(N[(v / u), $MachinePrecision] * N[(t1 / (-u)), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-v}{t1 + u}\\
\mathbf{if}\;t1 \leq -7 \cdot 10^{+54}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t1 \leq -5.6 \cdot 10^{-49}:\\
\;\;\;\;\frac{-t1}{\frac{u}{\frac{v}{u}}}\\
\mathbf{elif}\;t1 \leq -5 \cdot 10^{-109}:\\
\;\;\;\;\frac{v}{u - t1}\\
\mathbf{elif}\;t1 \leq 2.2 \cdot 10^{-54}:\\
\;\;\;\;\frac{v}{u} \cdot \frac{t1}{-u}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t1 < -7.0000000000000002e54 or 2.2e-54 < t1 Initial program 60.0%
associate-/r*75.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in t1 around inf 85.0%
neg-mul-185.0%
Simplified85.0%
if -7.0000000000000002e54 < t1 < -5.59999999999999995e-49Initial program 78.5%
associate-/r*94.3%
associate-/l*99.7%
Simplified99.7%
clear-num99.6%
inv-pow99.6%
Applied egg-rr99.6%
unpow-199.6%
Simplified99.6%
Taylor expanded in t1 around 0 52.1%
mul-1-neg52.1%
unpow252.1%
times-frac73.1%
associate-/r/73.3%
distribute-neg-frac73.3%
Simplified73.3%
if -5.59999999999999995e-49 < t1 < -5.0000000000000002e-109Initial program 92.8%
associate-/l*92.8%
neg-mul-192.8%
associate-*r/93.1%
times-frac99.4%
div-inv99.4%
clear-num99.6%
Applied egg-rr99.6%
Taylor expanded in t1 around inf 82.4%
*-commutative82.4%
frac-2neg82.4%
metadata-eval82.4%
un-div-inv82.6%
+-commutative82.6%
distribute-neg-in82.6%
add-sqr-sqrt53.8%
sqrt-unprod84.2%
sqr-neg84.2%
sqrt-unprod30.4%
add-sqr-sqrt83.9%
Applied egg-rr83.9%
unsub-neg83.9%
Simplified83.9%
if -5.0000000000000002e-109 < t1 < 2.2e-54Initial program 80.6%
associate-/l*83.7%
neg-mul-183.7%
associate-*r/90.9%
times-frac98.5%
div-inv98.4%
clear-num98.5%
Applied egg-rr98.5%
Taylor expanded in t1 around 0 76.7%
metadata-eval76.7%
*-commutative76.7%
unpow276.7%
associate-/r*81.6%
*-commutative81.6%
associate-*l/88.3%
times-frac88.3%
*-lft-identity88.3%
associate-*l/81.6%
*-commutative81.6%
neg-mul-181.6%
associate-/r*76.7%
times-frac87.0%
Simplified87.0%
Final simplification84.7%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ (- v) (+ t1 u))))
(if (<= t1 -3.25e+56)
t_1
(if (<= t1 -3.7e-41)
(/ (- t1) (/ u (/ v u)))
(if (<= t1 -2.05e-109)
(/ v (- u t1))
(if (<= t1 2.35e-48) (/ (* t1 (/ v u)) (- u)) t_1))))))
double code(double u, double v, double t1) {
double t_1 = -v / (t1 + u);
double tmp;
if (t1 <= -3.25e+56) {
tmp = t_1;
} else if (t1 <= -3.7e-41) {
tmp = -t1 / (u / (v / u));
} else if (t1 <= -2.05e-109) {
tmp = v / (u - t1);
} else if (t1 <= 2.35e-48) {
tmp = (t1 * (v / u)) / -u;
} else {
tmp = t_1;
}
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)
if (t1 <= (-3.25d+56)) then
tmp = t_1
else if (t1 <= (-3.7d-41)) then
tmp = -t1 / (u / (v / u))
else if (t1 <= (-2.05d-109)) then
tmp = v / (u - t1)
else if (t1 <= 2.35d-48) then
tmp = (t1 * (v / u)) / -u
else
tmp = t_1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = -v / (t1 + u);
double tmp;
if (t1 <= -3.25e+56) {
tmp = t_1;
} else if (t1 <= -3.7e-41) {
tmp = -t1 / (u / (v / u));
} else if (t1 <= -2.05e-109) {
tmp = v / (u - t1);
} else if (t1 <= 2.35e-48) {
tmp = (t1 * (v / u)) / -u;
} else {
tmp = t_1;
}
return tmp;
}
def code(u, v, t1): t_1 = -v / (t1 + u) tmp = 0 if t1 <= -3.25e+56: tmp = t_1 elif t1 <= -3.7e-41: tmp = -t1 / (u / (v / u)) elif t1 <= -2.05e-109: tmp = v / (u - t1) elif t1 <= 2.35e-48: tmp = (t1 * (v / u)) / -u else: tmp = t_1 return tmp
function code(u, v, t1) t_1 = Float64(Float64(-v) / Float64(t1 + u)) tmp = 0.0 if (t1 <= -3.25e+56) tmp = t_1; elseif (t1 <= -3.7e-41) tmp = Float64(Float64(-t1) / Float64(u / Float64(v / u))); elseif (t1 <= -2.05e-109) tmp = Float64(v / Float64(u - t1)); elseif (t1 <= 2.35e-48) tmp = Float64(Float64(t1 * Float64(v / u)) / Float64(-u)); else tmp = t_1; end return tmp end
function tmp_2 = code(u, v, t1) t_1 = -v / (t1 + u); tmp = 0.0; if (t1 <= -3.25e+56) tmp = t_1; elseif (t1 <= -3.7e-41) tmp = -t1 / (u / (v / u)); elseif (t1 <= -2.05e-109) tmp = v / (u - t1); elseif (t1 <= 2.35e-48) tmp = (t1 * (v / u)) / -u; else tmp = t_1; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -3.25e+56], t$95$1, If[LessEqual[t1, -3.7e-41], N[((-t1) / N[(u / N[(v / u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, -2.05e-109], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 2.35e-48], N[(N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-v}{t1 + u}\\
\mathbf{if}\;t1 \leq -3.25 \cdot 10^{+56}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t1 \leq -3.7 \cdot 10^{-41}:\\
\;\;\;\;\frac{-t1}{\frac{u}{\frac{v}{u}}}\\
\mathbf{elif}\;t1 \leq -2.05 \cdot 10^{-109}:\\
\;\;\;\;\frac{v}{u - t1}\\
\mathbf{elif}\;t1 \leq 2.35 \cdot 10^{-48}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{u}}{-u}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t1 < -3.25e56 or 2.3499999999999999e-48 < t1 Initial program 60.0%
associate-/r*75.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in t1 around inf 85.0%
neg-mul-185.0%
Simplified85.0%
if -3.25e56 < t1 < -3.7000000000000002e-41Initial program 78.5%
associate-/r*94.3%
associate-/l*99.7%
Simplified99.7%
clear-num99.6%
inv-pow99.6%
Applied egg-rr99.6%
unpow-199.6%
Simplified99.6%
Taylor expanded in t1 around 0 52.1%
mul-1-neg52.1%
unpow252.1%
times-frac73.1%
associate-/r/73.3%
distribute-neg-frac73.3%
Simplified73.3%
if -3.7000000000000002e-41 < t1 < -2.0500000000000001e-109Initial program 92.8%
associate-/l*92.8%
neg-mul-192.8%
associate-*r/93.1%
times-frac99.4%
div-inv99.4%
clear-num99.6%
Applied egg-rr99.6%
Taylor expanded in t1 around inf 82.4%
*-commutative82.4%
frac-2neg82.4%
metadata-eval82.4%
un-div-inv82.6%
+-commutative82.6%
distribute-neg-in82.6%
add-sqr-sqrt53.8%
sqrt-unprod84.2%
sqr-neg84.2%
sqrt-unprod30.4%
add-sqr-sqrt83.9%
Applied egg-rr83.9%
unsub-neg83.9%
Simplified83.9%
if -2.0500000000000001e-109 < t1 < 2.3499999999999999e-48Initial program 80.6%
associate-*l/79.6%
*-commutative79.6%
Simplified79.6%
Taylor expanded in t1 around 0 74.5%
associate-*r/74.5%
neg-mul-174.5%
unpow274.5%
Simplified74.5%
add-log-exp51.7%
exp-prod51.0%
add-sqr-sqrt39.0%
sqrt-unprod46.8%
sqr-neg46.8%
sqrt-unprod34.9%
add-sqr-sqrt45.2%
Applied egg-rr45.2%
log-pow25.6%
rem-log-exp45.0%
Simplified45.0%
associate-*l/44.9%
associate-/l*44.9%
add-sqr-sqrt23.2%
sqrt-unprod50.6%
sqr-neg50.6%
sqrt-unprod34.9%
add-sqr-sqrt78.7%
associate-/l*76.7%
associate-/r*81.6%
frac-2neg81.6%
Applied egg-rr89.4%
Final simplification85.5%
(FPCore (u v t1) :precision binary64 (if (<= t1 -1.2e-108) (/ v (- u t1)) (if (<= t1 1.8e-72) (* (- v) (/ t1 (* u u))) (/ (- v) (+ t1 u)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1.2e-108) {
tmp = v / (u - t1);
} else if (t1 <= 1.8e-72) {
tmp = -v * (t1 / (u * u));
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (t1 <= (-1.2d-108)) then
tmp = v / (u - t1)
else if (t1 <= 1.8d-72) then
tmp = -v * (t1 / (u * u))
else
tmp = -v / (t1 + u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1.2e-108) {
tmp = v / (u - t1);
} else if (t1 <= 1.8e-72) {
tmp = -v * (t1 / (u * u));
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -1.2e-108: tmp = v / (u - t1) elif t1 <= 1.8e-72: tmp = -v * (t1 / (u * u)) else: tmp = -v / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -1.2e-108) tmp = Float64(v / Float64(u - t1)); elseif (t1 <= 1.8e-72) tmp = Float64(Float64(-v) * Float64(t1 / Float64(u * u))); 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.2e-108) tmp = v / (u - t1); elseif (t1 <= 1.8e-72) tmp = -v * (t1 / (u * u)); else tmp = -v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -1.2e-108], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 1.8e-72], N[((-v) * N[(t1 / N[(u * u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.2 \cdot 10^{-108}:\\
\;\;\;\;\frac{v}{u - t1}\\
\mathbf{elif}\;t1 \leq 1.8 \cdot 10^{-72}:\\
\;\;\;\;\left(-v\right) \cdot \frac{t1}{u \cdot u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\end{array}
\end{array}
if t1 < -1.20000000000000009e-108Initial program 71.1%
associate-/l*67.6%
neg-mul-167.6%
associate-*r/80.2%
times-frac99.6%
div-inv99.6%
clear-num99.7%
Applied egg-rr99.7%
Taylor expanded in t1 around inf 81.1%
*-commutative81.1%
frac-2neg81.1%
metadata-eval81.1%
un-div-inv81.3%
+-commutative81.3%
distribute-neg-in81.3%
add-sqr-sqrt39.1%
sqrt-unprod84.0%
sqr-neg84.0%
sqrt-unprod42.9%
add-sqr-sqrt81.8%
Applied egg-rr81.8%
unsub-neg81.8%
Simplified81.8%
if -1.20000000000000009e-108 < t1 < 1.8e-72Initial program 80.6%
associate-*l/79.6%
*-commutative79.6%
Simplified79.6%
Taylor expanded in t1 around 0 74.5%
associate-*r/74.5%
neg-mul-174.5%
unpow274.5%
Simplified74.5%
if 1.8e-72 < t1 Initial program 57.4%
associate-/r*73.7%
associate-/l*99.4%
Simplified99.4%
Taylor expanded in t1 around inf 79.2%
neg-mul-179.2%
Simplified79.2%
Final simplification78.7%
(FPCore (u v t1) :precision binary64 (/ (* v (/ (- t1) (+ t1 u))) (+ t1 u)))
double code(double u, double v, double t1) {
return (v * (-t1 / (t1 + u))) / (t1 + u);
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (v * (-t1 / (t1 + u))) / (t1 + u)
end function
public static double code(double u, double v, double t1) {
return (v * (-t1 / (t1 + u))) / (t1 + u);
}
def code(u, v, t1): return (v * (-t1 / (t1 + u))) / (t1 + u)
function code(u, v, t1) return Float64(Float64(v * Float64(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[(N[(v * N[((-t1) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{v \cdot \frac{-t1}{t1 + u}}{t1 + u}
\end{array}
Initial program 69.5%
associate-/r*81.4%
associate-/l*99.3%
Simplified99.3%
Taylor expanded in v around 0 81.4%
mul-1-neg81.4%
associate-*l/99.1%
distribute-rgt-neg-out99.1%
Simplified99.1%
Final simplification99.1%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.2e+124) (not (<= u 2.5e+141))) (* t1 (/ (/ v u) u)) (/ v (- u t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.2e+124) || !(u <= 2.5e+141)) {
tmp = t1 * ((v / u) / u);
} else {
tmp = v / (u - t1);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-1.2d+124)) .or. (.not. (u <= 2.5d+141))) then
tmp = t1 * ((v / u) / u)
else
tmp = v / (u - t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.2e+124) || !(u <= 2.5e+141)) {
tmp = t1 * ((v / u) / u);
} else {
tmp = v / (u - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.2e+124) or not (u <= 2.5e+141): tmp = t1 * ((v / u) / u) else: tmp = v / (u - t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.2e+124) || !(u <= 2.5e+141)) tmp = Float64(t1 * Float64(Float64(v / u) / u)); else tmp = Float64(v / Float64(u - t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -1.2e+124) || ~((u <= 2.5e+141))) tmp = t1 * ((v / u) / u); else tmp = v / (u - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.2e+124], N[Not[LessEqual[u, 2.5e+141]], $MachinePrecision]], N[(t1 * N[(N[(v / u), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.2 \cdot 10^{+124} \lor \neg \left(u \leq 2.5 \cdot 10^{+141}\right):\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u - t1}\\
\end{array}
\end{array}
if u < -1.20000000000000003e124 or 2.50000000000000013e141 < u Initial program 70.7%
associate-*l/72.3%
*-commutative72.3%
Simplified72.3%
Taylor expanded in t1 around 0 72.0%
associate-*r/72.0%
neg-mul-172.0%
unpow272.0%
Simplified72.0%
add-log-exp68.6%
exp-prod68.6%
add-sqr-sqrt58.8%
sqrt-unprod67.8%
sqr-neg67.8%
sqrt-unprod55.3%
add-sqr-sqrt68.5%
Applied egg-rr68.5%
log-pow48.2%
rem-log-exp68.5%
Simplified68.5%
Taylor expanded in t1 around 0 68.1%
unpow268.1%
associate-*r/68.5%
associate-/r*68.2%
Simplified68.2%
if -1.20000000000000003e124 < u < 2.50000000000000013e141Initial program 69.0%
associate-/l*68.3%
neg-mul-168.3%
associate-*r/78.7%
times-frac98.8%
div-inv98.7%
clear-num99.0%
Applied egg-rr99.0%
Taylor expanded in t1 around inf 70.2%
*-commutative70.2%
frac-2neg70.2%
metadata-eval70.2%
un-div-inv70.5%
+-commutative70.5%
distribute-neg-in70.5%
add-sqr-sqrt35.7%
sqrt-unprod71.9%
sqr-neg71.9%
sqrt-unprod36.1%
add-sqr-sqrt71.8%
Applied egg-rr71.8%
unsub-neg71.8%
Simplified71.8%
Final simplification70.7%
(FPCore (u v t1) :precision binary64 (if (or (<= u -2.9e+130) (not (<= u 8.8e+141))) (* v (/ t1 (* u u))) (/ v (- u t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.9e+130) || !(u <= 8.8e+141)) {
tmp = v * (t1 / (u * u));
} else {
tmp = v / (u - t1);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-2.9d+130)) .or. (.not. (u <= 8.8d+141))) then
tmp = v * (t1 / (u * u))
else
tmp = v / (u - t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.9e+130) || !(u <= 8.8e+141)) {
tmp = v * (t1 / (u * u));
} else {
tmp = v / (u - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -2.9e+130) or not (u <= 8.8e+141): tmp = v * (t1 / (u * u)) else: tmp = v / (u - t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -2.9e+130) || !(u <= 8.8e+141)) tmp = Float64(v * Float64(t1 / Float64(u * u))); else tmp = Float64(v / Float64(u - t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -2.9e+130) || ~((u <= 8.8e+141))) tmp = v * (t1 / (u * u)); else tmp = v / (u - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2.9e+130], N[Not[LessEqual[u, 8.8e+141]], $MachinePrecision]], N[(v * N[(t1 / N[(u * u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.9 \cdot 10^{+130} \lor \neg \left(u \leq 8.8 \cdot 10^{+141}\right):\\
\;\;\;\;v \cdot \frac{t1}{u \cdot u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u - t1}\\
\end{array}
\end{array}
if u < -2.8999999999999999e130 or 8.8e141 < u Initial program 70.7%
associate-*l/72.3%
*-commutative72.3%
Simplified72.3%
Taylor expanded in t1 around 0 72.0%
associate-*r/72.0%
neg-mul-172.0%
unpow272.0%
Simplified72.0%
add-log-exp68.6%
exp-prod68.6%
add-sqr-sqrt58.8%
sqrt-unprod67.8%
sqr-neg67.8%
sqrt-unprod55.3%
add-sqr-sqrt68.5%
Applied egg-rr68.5%
log-pow48.2%
rem-log-exp68.5%
Simplified68.5%
if -2.8999999999999999e130 < u < 8.8e141Initial program 69.0%
associate-/l*68.3%
neg-mul-168.3%
associate-*r/78.7%
times-frac98.8%
div-inv98.7%
clear-num99.0%
Applied egg-rr99.0%
Taylor expanded in t1 around inf 70.2%
*-commutative70.2%
frac-2neg70.2%
metadata-eval70.2%
un-div-inv70.5%
+-commutative70.5%
distribute-neg-in70.5%
add-sqr-sqrt35.7%
sqrt-unprod71.9%
sqr-neg71.9%
sqrt-unprod36.1%
add-sqr-sqrt71.8%
Applied egg-rr71.8%
unsub-neg71.8%
Simplified71.8%
Final simplification70.8%
(FPCore (u v t1) :precision binary64 (if (or (<= u -2e+202) (not (<= u 1.8e+143))) (/ (- v) u) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -2e+202) || !(u <= 1.8e+143)) {
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 <= (-2d+202)) .or. (.not. (u <= 1.8d+143))) 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 <= -2e+202) || !(u <= 1.8e+143)) {
tmp = -v / u;
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -2e+202) or not (u <= 1.8e+143): tmp = -v / u else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -2e+202) || !(u <= 1.8e+143)) 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 <= -2e+202) || ~((u <= 1.8e+143))) tmp = -v / u; else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2e+202], N[Not[LessEqual[u, 1.8e+143]], $MachinePrecision]], N[((-v) / u), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2 \cdot 10^{+202} \lor \neg \left(u \leq 1.8 \cdot 10^{+143}\right):\\
\;\;\;\;\frac{-v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -1.9999999999999998e202 or 1.8e143 < u Initial program 78.2%
associate-/r*91.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in t1 around 0 89.7%
mul-1-neg89.7%
associate-/l*95.2%
distribute-neg-frac95.2%
Simplified95.2%
Taylor expanded in t1 around inf 50.6%
neg-mul-150.6%
distribute-neg-frac50.6%
Simplified50.6%
if -1.9999999999999998e202 < u < 1.8e143Initial program 67.0%
associate-*l/71.3%
*-commutative71.3%
Simplified71.3%
Taylor expanded in t1 around inf 66.3%
associate-*r/66.3%
neg-mul-166.3%
Simplified66.3%
Final simplification62.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 69.5%
associate-/l*69.6%
neg-mul-169.6%
associate-*r/81.5%
times-frac99.1%
div-inv99.0%
clear-num99.2%
Applied egg-rr99.2%
Taylor expanded in t1 around inf 63.3%
*-commutative63.3%
frac-2neg63.3%
metadata-eval63.3%
un-div-inv63.5%
+-commutative63.5%
distribute-neg-in63.5%
add-sqr-sqrt32.4%
sqrt-unprod70.1%
sqr-neg70.1%
sqrt-unprod31.8%
add-sqr-sqrt64.3%
Applied egg-rr64.3%
unsub-neg64.3%
Simplified64.3%
Final simplification64.3%
(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(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 69.5%
associate-*l/73.3%
*-commutative73.3%
Simplified73.3%
Taylor expanded in t1 around inf 56.7%
associate-*r/56.7%
neg-mul-156.7%
Simplified56.7%
Final simplification56.7%
(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 69.5%
associate-*l/73.3%
*-commutative73.3%
Simplified73.3%
Taylor expanded in t1 around inf 56.6%
expm1-log1p-u46.0%
expm1-udef30.7%
*-commutative30.7%
associate-*l/30.7%
neg-mul-130.7%
add-sqr-sqrt15.4%
sqrt-unprod27.2%
sqr-neg27.2%
sqrt-unprod11.4%
add-sqr-sqrt22.6%
Applied egg-rr22.6%
expm1-def15.4%
expm1-log1p15.8%
Simplified15.8%
Final simplification15.8%
herbie shell --seed 2023278
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))