
(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 10 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)) (- 0.0 (/ v (+ t1 u)))))
double code(double u, double v, double t1) {
return (t1 / (t1 + u)) * (0.0 - (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)) * (0.0d0 - (v / (t1 + u)))
end function
public static double code(double u, double v, double t1) {
return (t1 / (t1 + u)) * (0.0 - (v / (t1 + u)));
}
def code(u, v, t1): return (t1 / (t1 + u)) * (0.0 - (v / (t1 + u)))
function code(u, v, t1) return Float64(Float64(t1 / Float64(t1 + u)) * Float64(0.0 - Float64(v / Float64(t1 + u)))) end
function tmp = code(u, v, t1) tmp = (t1 / (t1 + u)) * (0.0 - (v / (t1 + u))); end
code[u_, v_, t1_] := N[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(0.0 - N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{t1}{t1 + u} \cdot \left(0 - \frac{v}{t1 + u}\right)
\end{array}
Initial program 70.5%
*-commutativeN/A
neg-mul-1N/A
associate-*r*N/A
times-fracN/A
*-commutativeN/A
neg-mul-1N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f6498.3%
Applied egg-rr98.3%
Final simplification98.3%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (- 0.0 (/ v (+ t1 u)))))
(if (<= t1 -2.45e-49)
t_1
(if (<= t1 3e-129) (/ v (- 0.0 (/ u (/ t1 u)))) t_1))))
double code(double u, double v, double t1) {
double t_1 = 0.0 - (v / (t1 + u));
double tmp;
if (t1 <= -2.45e-49) {
tmp = t_1;
} else if (t1 <= 3e-129) {
tmp = v / (0.0 - (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 = 0.0d0 - (v / (t1 + u))
if (t1 <= (-2.45d-49)) then
tmp = t_1
else if (t1 <= 3d-129) then
tmp = v / (0.0d0 - (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 = 0.0 - (v / (t1 + u));
double tmp;
if (t1 <= -2.45e-49) {
tmp = t_1;
} else if (t1 <= 3e-129) {
tmp = v / (0.0 - (u / (t1 / u)));
} else {
tmp = t_1;
}
return tmp;
}
def code(u, v, t1): t_1 = 0.0 - (v / (t1 + u)) tmp = 0 if t1 <= -2.45e-49: tmp = t_1 elif t1 <= 3e-129: tmp = v / (0.0 - (u / (t1 / u))) else: tmp = t_1 return tmp
function code(u, v, t1) t_1 = Float64(0.0 - Float64(v / Float64(t1 + u))) tmp = 0.0 if (t1 <= -2.45e-49) tmp = t_1; elseif (t1 <= 3e-129) tmp = Float64(v / Float64(0.0 - Float64(u / Float64(t1 / u)))); else tmp = t_1; end return tmp end
function tmp_2 = code(u, v, t1) t_1 = 0.0 - (v / (t1 + u)); tmp = 0.0; if (t1 <= -2.45e-49) tmp = t_1; elseif (t1 <= 3e-129) tmp = v / (0.0 - (u / (t1 / u))); else tmp = t_1; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(0.0 - N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -2.45e-49], t$95$1, If[LessEqual[t1, 3e-129], N[(v / N[(0.0 - N[(u / N[(t1 / u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0 - \frac{v}{t1 + u}\\
\mathbf{if}\;t1 \leq -2.45 \cdot 10^{-49}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t1 \leq 3 \cdot 10^{-129}:\\
\;\;\;\;\frac{v}{0 - \frac{u}{\frac{t1}{u}}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t1 < -2.4500000000000001e-49 or 2.9999999999999998e-129 < t1 Initial program 67.8%
*-commutativeN/A
neg-mul-1N/A
associate-*r*N/A
times-fracN/A
*-commutativeN/A
neg-mul-1N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f6499.9%
Applied egg-rr99.9%
clear-numN/A
un-div-invN/A
sub0-negN/A
distribute-frac-negN/A
frac-2negN/A
distribute-frac-neg2N/A
distribute-frac-negN/A
frac-2negN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f6499.9%
Applied egg-rr99.9%
Taylor expanded in t1 around inf
Simplified83.9%
frac-2negN/A
metadata-evalN/A
/-rgt-identityN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f6483.9%
Applied egg-rr83.9%
if -2.4500000000000001e-49 < t1 < 2.9999999999999998e-129Initial program 75.2%
Taylor expanded in t1 around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6477.8%
Simplified77.8%
cancel-sign-sub-invN/A
+-lft-identityN/A
sub0-negN/A
clear-numN/A
un-div-invN/A
frac-2negN/A
sub0-negN/A
remove-double-negN/A
/-lowering-/.f64N/A
neg-lowering-neg.f64N/A
clear-numN/A
associate-/r*N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f6491.4%
Applied egg-rr91.4%
Final simplification85.8%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (- 0.0 (/ v (+ t1 u)))))
(if (<= t1 -1.8e-47)
t_1
(if (<= t1 3.9e-128) (/ v (* u (/ u (- 0.0 t1)))) t_1))))
double code(double u, double v, double t1) {
double t_1 = 0.0 - (v / (t1 + u));
double tmp;
if (t1 <= -1.8e-47) {
tmp = t_1;
} else if (t1 <= 3.9e-128) {
tmp = v / (u * (u / (0.0 - t1)));
} 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 = 0.0d0 - (v / (t1 + u))
if (t1 <= (-1.8d-47)) then
tmp = t_1
else if (t1 <= 3.9d-128) then
tmp = v / (u * (u / (0.0d0 - t1)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = 0.0 - (v / (t1 + u));
double tmp;
if (t1 <= -1.8e-47) {
tmp = t_1;
} else if (t1 <= 3.9e-128) {
tmp = v / (u * (u / (0.0 - t1)));
} else {
tmp = t_1;
}
return tmp;
}
def code(u, v, t1): t_1 = 0.0 - (v / (t1 + u)) tmp = 0 if t1 <= -1.8e-47: tmp = t_1 elif t1 <= 3.9e-128: tmp = v / (u * (u / (0.0 - t1))) else: tmp = t_1 return tmp
function code(u, v, t1) t_1 = Float64(0.0 - Float64(v / Float64(t1 + u))) tmp = 0.0 if (t1 <= -1.8e-47) tmp = t_1; elseif (t1 <= 3.9e-128) tmp = Float64(v / Float64(u * Float64(u / Float64(0.0 - t1)))); else tmp = t_1; end return tmp end
function tmp_2 = code(u, v, t1) t_1 = 0.0 - (v / (t1 + u)); tmp = 0.0; if (t1 <= -1.8e-47) tmp = t_1; elseif (t1 <= 3.9e-128) tmp = v / (u * (u / (0.0 - t1))); else tmp = t_1; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(0.0 - N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -1.8e-47], t$95$1, If[LessEqual[t1, 3.9e-128], N[(v / N[(u * N[(u / N[(0.0 - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0 - \frac{v}{t1 + u}\\
\mathbf{if}\;t1 \leq -1.8 \cdot 10^{-47}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t1 \leq 3.9 \cdot 10^{-128}:\\
\;\;\;\;\frac{v}{u \cdot \frac{u}{0 - t1}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t1 < -1.79999999999999995e-47 or 3.89999999999999997e-128 < t1 Initial program 67.8%
*-commutativeN/A
neg-mul-1N/A
associate-*r*N/A
times-fracN/A
*-commutativeN/A
neg-mul-1N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f6499.9%
Applied egg-rr99.9%
clear-numN/A
un-div-invN/A
sub0-negN/A
distribute-frac-negN/A
frac-2negN/A
distribute-frac-neg2N/A
distribute-frac-negN/A
frac-2negN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f6499.9%
Applied egg-rr99.9%
Taylor expanded in t1 around inf
Simplified83.9%
frac-2negN/A
metadata-evalN/A
/-rgt-identityN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f6483.9%
Applied egg-rr83.9%
if -1.79999999999999995e-47 < t1 < 3.89999999999999997e-128Initial program 75.2%
Taylor expanded in t1 around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6477.8%
Simplified77.8%
cancel-sign-sub-invN/A
+-lft-identityN/A
sub0-negN/A
clear-numN/A
un-div-invN/A
frac-2negN/A
sub0-negN/A
remove-double-negN/A
/-lowering-/.f64N/A
neg-lowering-neg.f64N/A
clear-numN/A
associate-/r*N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f6491.4%
Applied egg-rr91.4%
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f6491.2%
Applied egg-rr91.2%
Final simplification86.6%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (- 0.0 (/ v (+ t1 u)))))
(if (<= t1 -7.5e-50)
t_1
(if (<= t1 4.5e-129) (* (/ t1 u) (/ v (- 0.0 u))) t_1))))
double code(double u, double v, double t1) {
double t_1 = 0.0 - (v / (t1 + u));
double tmp;
if (t1 <= -7.5e-50) {
tmp = t_1;
} else if (t1 <= 4.5e-129) {
tmp = (t1 / u) * (v / (0.0 - 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 = 0.0d0 - (v / (t1 + u))
if (t1 <= (-7.5d-50)) then
tmp = t_1
else if (t1 <= 4.5d-129) then
tmp = (t1 / u) * (v / (0.0d0 - u))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = 0.0 - (v / (t1 + u));
double tmp;
if (t1 <= -7.5e-50) {
tmp = t_1;
} else if (t1 <= 4.5e-129) {
tmp = (t1 / u) * (v / (0.0 - u));
} else {
tmp = t_1;
}
return tmp;
}
def code(u, v, t1): t_1 = 0.0 - (v / (t1 + u)) tmp = 0 if t1 <= -7.5e-50: tmp = t_1 elif t1 <= 4.5e-129: tmp = (t1 / u) * (v / (0.0 - u)) else: tmp = t_1 return tmp
function code(u, v, t1) t_1 = Float64(0.0 - Float64(v / Float64(t1 + u))) tmp = 0.0 if (t1 <= -7.5e-50) tmp = t_1; elseif (t1 <= 4.5e-129) tmp = Float64(Float64(t1 / u) * Float64(v / Float64(0.0 - u))); else tmp = t_1; end return tmp end
function tmp_2 = code(u, v, t1) t_1 = 0.0 - (v / (t1 + u)); tmp = 0.0; if (t1 <= -7.5e-50) tmp = t_1; elseif (t1 <= 4.5e-129) tmp = (t1 / u) * (v / (0.0 - u)); else tmp = t_1; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(0.0 - N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -7.5e-50], t$95$1, If[LessEqual[t1, 4.5e-129], N[(N[(t1 / u), $MachinePrecision] * N[(v / N[(0.0 - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0 - \frac{v}{t1 + u}\\
\mathbf{if}\;t1 \leq -7.5 \cdot 10^{-50}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t1 \leq 4.5 \cdot 10^{-129}:\\
\;\;\;\;\frac{t1}{u} \cdot \frac{v}{0 - u}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t1 < -7.5e-50 or 4.50000000000000031e-129 < t1 Initial program 67.8%
*-commutativeN/A
neg-mul-1N/A
associate-*r*N/A
times-fracN/A
*-commutativeN/A
neg-mul-1N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f6499.9%
Applied egg-rr99.9%
clear-numN/A
un-div-invN/A
sub0-negN/A
distribute-frac-negN/A
frac-2negN/A
distribute-frac-neg2N/A
distribute-frac-negN/A
frac-2negN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f6499.9%
Applied egg-rr99.9%
Taylor expanded in t1 around inf
Simplified83.9%
frac-2negN/A
metadata-evalN/A
/-rgt-identityN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f6483.9%
Applied egg-rr83.9%
if -7.5e-50 < t1 < 4.50000000000000031e-129Initial program 75.2%
Taylor expanded in t1 around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6477.8%
Simplified77.8%
sub0-negN/A
associate-*r/N/A
distribute-neg-frac2N/A
distribute-lft-neg-inN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
neg-lowering-neg.f64N/A
/-lowering-/.f6489.4%
Applied egg-rr89.4%
Final simplification85.9%
(FPCore (u v t1) :precision binary64 (let* ((t_1 (/ (/ v u) -1.0))) (if (<= u -3.1e+209) t_1 (if (<= u 1.8e+127) (- 0.0 (/ v t1)) t_1))))
double code(double u, double v, double t1) {
double t_1 = (v / u) / -1.0;
double tmp;
if (u <= -3.1e+209) {
tmp = t_1;
} else if (u <= 1.8e+127) {
tmp = 0.0 - (v / t1);
} 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 / u) / (-1.0d0)
if (u <= (-3.1d+209)) then
tmp = t_1
else if (u <= 1.8d+127) then
tmp = 0.0d0 - (v / t1)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = (v / u) / -1.0;
double tmp;
if (u <= -3.1e+209) {
tmp = t_1;
} else if (u <= 1.8e+127) {
tmp = 0.0 - (v / t1);
} else {
tmp = t_1;
}
return tmp;
}
def code(u, v, t1): t_1 = (v / u) / -1.0 tmp = 0 if u <= -3.1e+209: tmp = t_1 elif u <= 1.8e+127: tmp = 0.0 - (v / t1) else: tmp = t_1 return tmp
function code(u, v, t1) t_1 = Float64(Float64(v / u) / -1.0) tmp = 0.0 if (u <= -3.1e+209) tmp = t_1; elseif (u <= 1.8e+127) tmp = Float64(0.0 - Float64(v / t1)); else tmp = t_1; end return tmp end
function tmp_2 = code(u, v, t1) t_1 = (v / u) / -1.0; tmp = 0.0; if (u <= -3.1e+209) tmp = t_1; elseif (u <= 1.8e+127) tmp = 0.0 - (v / t1); else tmp = t_1; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(N[(v / u), $MachinePrecision] / -1.0), $MachinePrecision]}, If[LessEqual[u, -3.1e+209], t$95$1, If[LessEqual[u, 1.8e+127], N[(0.0 - N[(v / t1), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{v}{u}}{-1}\\
\mathbf{if}\;u \leq -3.1 \cdot 10^{+209}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;u \leq 1.8 \cdot 10^{+127}:\\
\;\;\;\;0 - \frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if u < -3.1000000000000001e209 or 1.79999999999999989e127 < u Initial program 79.0%
*-commutativeN/A
neg-mul-1N/A
associate-*r*N/A
times-fracN/A
*-commutativeN/A
neg-mul-1N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f6499.0%
Applied egg-rr99.0%
clear-numN/A
un-div-invN/A
sub0-negN/A
distribute-frac-negN/A
frac-2negN/A
distribute-frac-neg2N/A
distribute-frac-negN/A
frac-2negN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f6499.0%
Applied egg-rr99.0%
Taylor expanded in t1 around inf
Simplified51.4%
Taylor expanded in t1 around 0
/-lowering-/.f6448.7%
Simplified48.7%
if -3.1000000000000001e209 < u < 1.79999999999999989e127Initial program 68.5%
Taylor expanded in t1 around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
/-lowering-/.f6466.0%
Simplified66.0%
sub0-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f6466.0%
Applied egg-rr66.0%
Final simplification62.8%
(FPCore (u v t1) :precision binary64 (/ (/ v (+ t1 u)) (- -1.0 (/ u t1))))
double code(double u, double v, double t1) {
return (v / (t1 + u)) / (-1.0 - (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 / (t1 + u)) / ((-1.0d0) - (u / t1))
end function
public static double code(double u, double v, double t1) {
return (v / (t1 + u)) / (-1.0 - (u / t1));
}
def code(u, v, t1): return (v / (t1 + u)) / (-1.0 - (u / t1))
function code(u, v, t1) return Float64(Float64(v / Float64(t1 + u)) / Float64(-1.0 - Float64(u / t1))) end
function tmp = code(u, v, t1) tmp = (v / (t1 + u)) / (-1.0 - (u / t1)); end
code[u_, v_, t1_] := N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{v}{t1 + u}}{-1 - \frac{u}{t1}}
\end{array}
Initial program 70.5%
*-commutativeN/A
neg-mul-1N/A
associate-*r*N/A
times-fracN/A
*-commutativeN/A
neg-mul-1N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f6498.3%
Applied egg-rr98.3%
clear-numN/A
un-div-invN/A
sub0-negN/A
distribute-frac-negN/A
frac-2negN/A
distribute-frac-neg2N/A
distribute-frac-negN/A
frac-2negN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f6498.3%
Applied egg-rr98.3%
Taylor expanded in t1 around 0
div-subN/A
associate-/l*N/A
*-inversesN/A
metadata-evalN/A
--lowering--.f64N/A
/-lowering-/.f6498.3%
Simplified98.3%
(FPCore (u v t1) :precision binary64 (/ -1.0 (/ (+ t1 u) v)))
double code(double u, double v, double t1) {
return -1.0 / ((t1 + u) / v);
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-1.0d0) / ((t1 + u) / v)
end function
public static double code(double u, double v, double t1) {
return -1.0 / ((t1 + u) / v);
}
def code(u, v, t1): return -1.0 / ((t1 + u) / v)
function code(u, v, t1) return Float64(-1.0 / Float64(Float64(t1 + u) / v)) end
function tmp = code(u, v, t1) tmp = -1.0 / ((t1 + u) / v); end
code[u_, v_, t1_] := N[(-1.0 / N[(N[(t1 + u), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1}{\frac{t1 + u}{v}}
\end{array}
Initial program 70.5%
*-commutativeN/A
neg-mul-1N/A
associate-*r*N/A
times-fracN/A
*-commutativeN/A
neg-mul-1N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f6498.3%
Applied egg-rr98.3%
clear-numN/A
un-div-invN/A
sub0-negN/A
distribute-frac-negN/A
frac-2negN/A
distribute-frac-neg2N/A
distribute-frac-negN/A
frac-2negN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f6498.3%
Applied egg-rr98.3%
Taylor expanded in t1 around inf
Simplified64.5%
div-invN/A
metadata-evalN/A
*-commutativeN/A
clear-numN/A
div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f6464.7%
Applied egg-rr64.7%
(FPCore (u v t1) :precision binary64 (- 0.0 (/ v (+ t1 u))))
double code(double u, double v, double t1) {
return 0.0 - (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 = 0.0d0 - (v / (t1 + u))
end function
public static double code(double u, double v, double t1) {
return 0.0 - (v / (t1 + u));
}
def code(u, v, t1): return 0.0 - (v / (t1 + u))
function code(u, v, t1) return Float64(0.0 - Float64(v / Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = 0.0 - (v / (t1 + u)); end
code[u_, v_, t1_] := N[(0.0 - N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
0 - \frac{v}{t1 + u}
\end{array}
Initial program 70.5%
*-commutativeN/A
neg-mul-1N/A
associate-*r*N/A
times-fracN/A
*-commutativeN/A
neg-mul-1N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f6498.3%
Applied egg-rr98.3%
clear-numN/A
un-div-invN/A
sub0-negN/A
distribute-frac-negN/A
frac-2negN/A
distribute-frac-neg2N/A
distribute-frac-negN/A
frac-2negN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f6498.3%
Applied egg-rr98.3%
Taylor expanded in t1 around inf
Simplified64.5%
frac-2negN/A
metadata-evalN/A
/-rgt-identityN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f6464.5%
Applied egg-rr64.5%
Final simplification64.5%
(FPCore (u v t1) :precision binary64 (/ -1.0 (/ t1 v)))
double code(double u, double v, double t1) {
return -1.0 / (t1 / v);
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-1.0d0) / (t1 / v)
end function
public static double code(double u, double v, double t1) {
return -1.0 / (t1 / v);
}
def code(u, v, t1): return -1.0 / (t1 / v)
function code(u, v, t1) return Float64(-1.0 / Float64(t1 / v)) end
function tmp = code(u, v, t1) tmp = -1.0 / (t1 / v); end
code[u_, v_, t1_] := N[(-1.0 / N[(t1 / v), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1}{\frac{t1}{v}}
\end{array}
Initial program 70.5%
Taylor expanded in t1 around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
/-lowering-/.f6457.2%
Simplified57.2%
sub0-negN/A
clear-numN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
/-lowering-/.f6457.3%
Applied egg-rr57.3%
(FPCore (u v t1) :precision binary64 (- 0.0 (/ v t1)))
double code(double u, double v, double t1) {
return 0.0 - (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 = 0.0d0 - (v / t1)
end function
public static double code(double u, double v, double t1) {
return 0.0 - (v / t1);
}
def code(u, v, t1): return 0.0 - (v / t1)
function code(u, v, t1) return Float64(0.0 - Float64(v / t1)) end
function tmp = code(u, v, t1) tmp = 0.0 - (v / t1); end
code[u_, v_, t1_] := N[(0.0 - N[(v / t1), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
0 - \frac{v}{t1}
\end{array}
Initial program 70.5%
Taylor expanded in t1 around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
/-lowering-/.f6457.2%
Simplified57.2%
sub0-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f6457.2%
Applied egg-rr57.2%
Final simplification57.2%
herbie shell --seed 2024191
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))