
(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 8 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(t1 / Float64(t1 + u)) * Float64(-Float64(v / Float64(t1 + u)))) end
function tmp = code(u, v, t1) tmp = (t1 / (t1 + u)) * -(v / (t1 + u)); end
code[u_, v_, t1_] := N[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * (-N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision])), $MachinePrecision]
\begin{array}{l}
\\
\frac{t1}{t1 + u} \cdot \left(-\frac{v}{t1 + u}\right)
\end{array}
Initial program 79.4%
*-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-lowering-neg.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f6498.8
Applied egg-rr98.8%
Final simplification98.8%
(FPCore (u v t1)
:precision binary64
(if (<= t1 -5.6e+153)
(/ -1.0 (* (/ 1.0 v) (fma u 2.0 t1)))
(if (<= t1 4.6e+64)
(* v (/ (- t1) (* (+ t1 u) (+ t1 u))))
(- (/ v (+ t1 u))))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -5.6e+153) {
tmp = -1.0 / ((1.0 / v) * fma(u, 2.0, t1));
} else if (t1 <= 4.6e+64) {
tmp = v * (-t1 / ((t1 + u) * (t1 + u)));
} else {
tmp = -(v / (t1 + u));
}
return tmp;
}
function code(u, v, t1) tmp = 0.0 if (t1 <= -5.6e+153) tmp = Float64(-1.0 / Float64(Float64(1.0 / v) * fma(u, 2.0, t1))); elseif (t1 <= 4.6e+64) tmp = Float64(v * Float64(Float64(-t1) / Float64(Float64(t1 + u) * Float64(t1 + u)))); else tmp = Float64(-Float64(v / Float64(t1 + u))); end return tmp end
code[u_, v_, t1_] := If[LessEqual[t1, -5.6e+153], N[(-1.0 / N[(N[(1.0 / v), $MachinePrecision] * N[(u * 2.0 + t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 4.6e+64], N[(v * N[((-t1) / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], (-N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision])]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -5.6 \cdot 10^{+153}:\\
\;\;\;\;\frac{-1}{\frac{1}{v} \cdot \mathsf{fma}\left(u, 2, t1\right)}\\
\mathbf{elif}\;t1 \leq 4.6 \cdot 10^{+64}:\\
\;\;\;\;v \cdot \frac{-t1}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\
\mathbf{else}:\\
\;\;\;\;-\frac{v}{t1 + u}\\
\end{array}
\end{array}
if t1 < -5.5999999999999997e153Initial program 54.6%
*-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-lowering-neg.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f6499.9
Applied egg-rr99.9%
distribute-frac-negN/A
neg-mul-1N/A
associate-*r*N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
div-invN/A
associate-*l/N/A
*-commutativeN/A
clear-numN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6463.5
Applied egg-rr63.5%
Taylor expanded in u around 0
*-lft-identityN/A
associate-*l/N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
*-lft-identityN/A
associate-*l/N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
accelerator-lowering-fma.f6491.7
Simplified91.7%
if -5.5999999999999997e153 < t1 < 4.6e64Initial program 87.2%
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-lowering-+.f6489.9
Applied egg-rr89.9%
if 4.6e64 < t1 Initial program 61.2%
*-commutativeN/A
times-fracN/A
distribute-frac-negN/A
distribute-frac-neg2N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
neg-lowering-neg.f64N/A
+-lowering-+.f64100.0
Applied egg-rr100.0%
Taylor expanded in t1 around inf
Simplified96.5%
Final simplification91.2%
(FPCore (u v t1)
:precision binary64
(if (<= t1 -5.5e+153)
(/ v (- t1))
(if (<= t1 4.6e+64)
(* v (/ (- t1) (* (+ t1 u) (+ t1 u))))
(- (/ v (+ t1 u))))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -5.5e+153) {
tmp = v / -t1;
} else if (t1 <= 4.6e+64) {
tmp = v * (-t1 / ((t1 + u) * (t1 + 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 <= (-5.5d+153)) then
tmp = v / -t1
else if (t1 <= 4.6d+64) then
tmp = v * (-t1 / ((t1 + u) * (t1 + 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 <= -5.5e+153) {
tmp = v / -t1;
} else if (t1 <= 4.6e+64) {
tmp = v * (-t1 / ((t1 + u) * (t1 + u)));
} else {
tmp = -(v / (t1 + u));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -5.5e+153: tmp = v / -t1 elif t1 <= 4.6e+64: tmp = v * (-t1 / ((t1 + u) * (t1 + u))) else: tmp = -(v / (t1 + u)) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -5.5e+153) tmp = Float64(v / Float64(-t1)); elseif (t1 <= 4.6e+64) tmp = Float64(v * Float64(Float64(-t1) / Float64(Float64(t1 + u) * Float64(t1 + 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 <= -5.5e+153) tmp = v / -t1; elseif (t1 <= 4.6e+64) tmp = v * (-t1 / ((t1 + u) * (t1 + u))); else tmp = -(v / (t1 + u)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -5.5e+153], N[(v / (-t1)), $MachinePrecision], If[LessEqual[t1, 4.6e+64], N[(v * N[((-t1) / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], (-N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision])]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -5.5 \cdot 10^{+153}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{elif}\;t1 \leq 4.6 \cdot 10^{+64}:\\
\;\;\;\;v \cdot \frac{-t1}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\
\mathbf{else}:\\
\;\;\;\;-\frac{v}{t1 + u}\\
\end{array}
\end{array}
if t1 < -5.5000000000000003e153Initial program 54.6%
Taylor expanded in t1 around inf
associate-*r/N/A
/-lowering-/.f64N/A
mul-1-negN/A
neg-lowering-neg.f6490.9
Simplified90.9%
if -5.5000000000000003e153 < t1 < 4.6e64Initial program 87.2%
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-lowering-+.f6489.9
Applied egg-rr89.9%
if 4.6e64 < t1 Initial program 61.2%
*-commutativeN/A
times-fracN/A
distribute-frac-negN/A
distribute-frac-neg2N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
neg-lowering-neg.f64N/A
+-lowering-+.f64100.0
Applied egg-rr100.0%
Taylor expanded in t1 around inf
Simplified96.5%
Final simplification91.2%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (- (/ v (+ t1 u)))))
(if (<= t1 -4.6e+62)
t_1
(if (<= t1 4.6e+64) (* t1 (/ (- v) (* (+ t1 u) (+ t1 u)))) t_1))))
double code(double u, double v, double t1) {
double t_1 = -(v / (t1 + u));
double tmp;
if (t1 <= -4.6e+62) {
tmp = t_1;
} else if (t1 <= 4.6e+64) {
tmp = t1 * (-v / ((t1 + 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 <= (-4.6d+62)) then
tmp = t_1
else if (t1 <= 4.6d+64) then
tmp = t1 * (-v / ((t1 + 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 <= -4.6e+62) {
tmp = t_1;
} else if (t1 <= 4.6e+64) {
tmp = t1 * (-v / ((t1 + u) * (t1 + u)));
} else {
tmp = t_1;
}
return tmp;
}
def code(u, v, t1): t_1 = -(v / (t1 + u)) tmp = 0 if t1 <= -4.6e+62: tmp = t_1 elif t1 <= 4.6e+64: tmp = t1 * (-v / ((t1 + 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 <= -4.6e+62) tmp = t_1; elseif (t1 <= 4.6e+64) tmp = Float64(t1 * Float64(Float64(-v) / Float64(Float64(t1 + u) * Float64(t1 + 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 <= -4.6e+62) tmp = t_1; elseif (t1 <= 4.6e+64) tmp = t1 * (-v / ((t1 + 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, -4.6e+62], t$95$1, If[LessEqual[t1, 4.6e+64], N[(t1 * N[((-v) / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -\frac{v}{t1 + u}\\
\mathbf{if}\;t1 \leq -4.6 \cdot 10^{+62}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t1 \leq 4.6 \cdot 10^{+64}:\\
\;\;\;\;t1 \cdot \frac{-v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t1 < -4.59999999999999968e62 or 4.6e64 < t1 Initial program 63.3%
*-commutativeN/A
times-fracN/A
distribute-frac-negN/A
distribute-frac-neg2N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
neg-lowering-neg.f64N/A
+-lowering-+.f64100.0
Applied egg-rr100.0%
Taylor expanded in t1 around inf
Simplified90.5%
if -4.59999999999999968e62 < t1 < 4.6e64Initial program 88.9%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
neg-lowering-neg.f6489.6
Applied egg-rr89.6%
Final simplification89.9%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (- (/ v (+ t1 u)))))
(if (<= t1 -1.3e-14)
t_1
(if (<= t1 4.9e-126) (* (- t1) (/ v (* u u))) t_1))))
double code(double u, double v, double t1) {
double t_1 = -(v / (t1 + u));
double tmp;
if (t1 <= -1.3e-14) {
tmp = t_1;
} else if (t1 <= 4.9e-126) {
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 <= (-1.3d-14)) then
tmp = t_1
else if (t1 <= 4.9d-126) 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 <= -1.3e-14) {
tmp = t_1;
} else if (t1 <= 4.9e-126) {
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 <= -1.3e-14: tmp = t_1 elif t1 <= 4.9e-126: 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 <= -1.3e-14) tmp = t_1; elseif (t1 <= 4.9e-126) tmp = Float64(Float64(-t1) * Float64(v / Float64(u * 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 <= -1.3e-14) tmp = t_1; elseif (t1 <= 4.9e-126) 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, -1.3e-14], t$95$1, If[LessEqual[t1, 4.9e-126], N[((-t1) * N[(v / N[(u * u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -\frac{v}{t1 + u}\\
\mathbf{if}\;t1 \leq -1.3 \cdot 10^{-14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t1 \leq 4.9 \cdot 10^{-126}:\\
\;\;\;\;\left(-t1\right) \cdot \frac{v}{u \cdot u}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t1 < -1.29999999999999998e-14 or 4.9000000000000001e-126 < t1 Initial program 75.0%
*-commutativeN/A
times-fracN/A
distribute-frac-negN/A
distribute-frac-neg2N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
neg-lowering-neg.f64N/A
+-lowering-+.f6499.3
Applied egg-rr99.3%
Taylor expanded in t1 around inf
Simplified80.0%
if -1.29999999999999998e-14 < t1 < 4.9000000000000001e-126Initial program 86.6%
Taylor expanded in t1 around 0
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
/-lowering-/.f64N/A
mul-1-negN/A
unpow2N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
neg-lowering-neg.f6484.1
Simplified84.1%
Final simplification81.6%
(FPCore (u v t1) :precision binary64 (let* ((t_1 (- (/ v u)))) (if (<= u -7e+154) t_1 (if (<= u 5.1e+103) (/ v (- t1)) t_1))))
double code(double u, double v, double t1) {
double t_1 = -(v / u);
double tmp;
if (u <= -7e+154) {
tmp = t_1;
} else if (u <= 5.1e+103) {
tmp = 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)
if (u <= (-7d+154)) then
tmp = t_1
else if (u <= 5.1d+103) then
tmp = 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);
double tmp;
if (u <= -7e+154) {
tmp = t_1;
} else if (u <= 5.1e+103) {
tmp = v / -t1;
} else {
tmp = t_1;
}
return tmp;
}
def code(u, v, t1): t_1 = -(v / u) tmp = 0 if u <= -7e+154: tmp = t_1 elif u <= 5.1e+103: tmp = v / -t1 else: tmp = t_1 return tmp
function code(u, v, t1) t_1 = Float64(-Float64(v / u)) tmp = 0.0 if (u <= -7e+154) tmp = t_1; elseif (u <= 5.1e+103) tmp = Float64(v / Float64(-t1)); else tmp = t_1; end return tmp end
function tmp_2 = code(u, v, t1) t_1 = -(v / u); tmp = 0.0; if (u <= -7e+154) tmp = t_1; elseif (u <= 5.1e+103) tmp = v / -t1; else tmp = t_1; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = (-N[(v / u), $MachinePrecision])}, If[LessEqual[u, -7e+154], t$95$1, If[LessEqual[u, 5.1e+103], N[(v / (-t1)), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -\frac{v}{u}\\
\mathbf{if}\;u \leq -7 \cdot 10^{+154}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;u \leq 5.1 \cdot 10^{+103}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if u < -7.00000000000000041e154 or 5.1000000000000002e103 < u Initial program 85.0%
*-commutativeN/A
times-fracN/A
distribute-frac-negN/A
distribute-frac-neg2N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
neg-lowering-neg.f64N/A
+-lowering-+.f6499.9
Applied egg-rr99.9%
Taylor expanded in t1 around inf
Simplified50.2%
Taylor expanded in t1 around 0
Simplified46.4%
if -7.00000000000000041e154 < u < 5.1000000000000002e103Initial program 77.0%
Taylor expanded in t1 around inf
associate-*r/N/A
/-lowering-/.f64N/A
mul-1-negN/A
neg-lowering-neg.f6467.0
Simplified67.0%
Final simplification60.9%
(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 79.4%
*-commutativeN/A
times-fracN/A
distribute-frac-negN/A
distribute-frac-neg2N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
neg-lowering-neg.f64N/A
+-lowering-+.f6498.0
Applied egg-rr98.0%
Taylor expanded in t1 around inf
Simplified62.4%
Final simplification62.4%
(FPCore (u v t1) :precision binary64 (- (/ v u)))
double code(double u, double v, double t1) {
return -(v / 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 / u)
end function
public static double code(double u, double v, double t1) {
return -(v / u);
}
def code(u, v, t1): return -(v / u)
function code(u, v, t1) return Float64(-Float64(v / u)) end
function tmp = code(u, v, t1) tmp = -(v / u); end
code[u_, v_, t1_] := (-N[(v / u), $MachinePrecision])
\begin{array}{l}
\\
-\frac{v}{u}
\end{array}
Initial program 79.4%
*-commutativeN/A
times-fracN/A
distribute-frac-negN/A
distribute-frac-neg2N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
neg-lowering-neg.f64N/A
+-lowering-+.f6498.0
Applied egg-rr98.0%
Taylor expanded in t1 around inf
Simplified62.4%
Taylor expanded in t1 around 0
Simplified19.8%
Final simplification19.8%
herbie shell --seed 2024204
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))