
(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 7 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (u v t1) :precision binary64 (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))
double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-t1 * v) / ((t1 + u) * (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
def code(u, v, t1): return (-t1 * v) / ((t1 + u) * (t1 + u))
function code(u, v, t1) return Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (-t1 * v) / ((t1 + u) * (t1 + u)); end
code[u_, v_, t1_] := N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}
\end{array}
(FPCore (u v t1) :precision binary64 (/ (/ v (+ t1 u)) (- -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.0%
*-commutative70.0%
times-frac99.2%
neg-mul-199.2%
associate-/l*99.2%
associate-*r/99.2%
associate-/l*99.2%
associate-/l/99.2%
neg-mul-199.2%
*-lft-identity99.2%
metadata-eval99.2%
times-frac99.2%
neg-mul-199.2%
remove-double-neg99.2%
neg-mul-199.2%
sub0-neg99.2%
associate--r+99.2%
neg-sub099.2%
div-sub99.2%
distribute-frac-neg99.2%
*-inverses99.2%
metadata-eval99.2%
Simplified99.2%
Final simplification99.2%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1e-54) (not (<= t1 3.05e-46))) (/ (- v) (+ t1 u)) (* (/ v u) (/ (- t1) u))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1e-54) || !(t1 <= 3.05e-46)) {
tmp = -v / (t1 + u);
} else {
tmp = (v / u) * (-t1 / u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-1d-54)) .or. (.not. (t1 <= 3.05d-46))) then
tmp = -v / (t1 + u)
else
tmp = (v / u) * (-t1 / u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1e-54) || !(t1 <= 3.05e-46)) {
tmp = -v / (t1 + u);
} else {
tmp = (v / u) * (-t1 / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1e-54) or not (t1 <= 3.05e-46): tmp = -v / (t1 + u) else: tmp = (v / u) * (-t1 / u) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1e-54) || !(t1 <= 3.05e-46)) tmp = Float64(Float64(-v) / Float64(t1 + u)); else tmp = Float64(Float64(v / u) * Float64(Float64(-t1) / u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -1e-54) || ~((t1 <= 3.05e-46))) tmp = -v / (t1 + u); else tmp = (v / u) * (-t1 / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1e-54], N[Not[LessEqual[t1, 3.05e-46]], $MachinePrecision]], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision], N[(N[(v / u), $MachinePrecision] * N[((-t1) / u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1 \cdot 10^{-54} \lor \neg \left(t1 \leq 3.05 \cdot 10^{-46}\right):\\
\;\;\;\;\frac{-v}{t1 + u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u} \cdot \frac{-t1}{u}\\
\end{array}
\end{array}
if t1 < -1e-54 or 3.05000000000000018e-46 < t1 Initial program 65.7%
times-frac99.9%
Simplified99.9%
Taylor expanded in t1 around inf 85.7%
if -1e-54 < t1 < 3.05000000000000018e-46Initial program 76.6%
times-frac98.1%
Simplified98.1%
Taylor expanded in t1 around 0 82.9%
mul-1-neg82.9%
Simplified82.9%
Taylor expanded in t1 around 0 85.3%
Final simplification85.5%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1.05e-56) (not (<= t1 1.7e-47))) (/ (- v) (+ t1 (* u 2.0))) (* (/ v u) (/ (- t1) u))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.05e-56) || !(t1 <= 1.7e-47)) {
tmp = -v / (t1 + (u * 2.0));
} else {
tmp = (v / u) * (-t1 / u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-1.05d-56)) .or. (.not. (t1 <= 1.7d-47))) then
tmp = -v / (t1 + (u * 2.0d0))
else
tmp = (v / u) * (-t1 / u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.05e-56) || !(t1 <= 1.7e-47)) {
tmp = -v / (t1 + (u * 2.0));
} else {
tmp = (v / u) * (-t1 / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.05e-56) or not (t1 <= 1.7e-47): tmp = -v / (t1 + (u * 2.0)) else: tmp = (v / u) * (-t1 / u) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.05e-56) || !(t1 <= 1.7e-47)) tmp = Float64(Float64(-v) / Float64(t1 + Float64(u * 2.0))); else tmp = Float64(Float64(v / u) * Float64(Float64(-t1) / u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -1.05e-56) || ~((t1 <= 1.7e-47))) tmp = -v / (t1 + (u * 2.0)); else tmp = (v / u) * (-t1 / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.05e-56], N[Not[LessEqual[t1, 1.7e-47]], $MachinePrecision]], N[((-v) / N[(t1 + N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(v / u), $MachinePrecision] * N[((-t1) / u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.05 \cdot 10^{-56} \lor \neg \left(t1 \leq 1.7 \cdot 10^{-47}\right):\\
\;\;\;\;\frac{-v}{t1 + u \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u} \cdot \frac{-t1}{u}\\
\end{array}
\end{array}
if t1 < -1.05000000000000003e-56 or 1.7000000000000001e-47 < t1 Initial program 65.7%
*-commutative65.7%
times-frac99.9%
neg-mul-199.9%
associate-/l*99.9%
associate-*r/99.9%
associate-/l*99.9%
associate-/l/99.9%
neg-mul-199.9%
*-lft-identity99.9%
metadata-eval99.9%
times-frac99.9%
neg-mul-199.9%
remove-double-neg99.9%
neg-mul-199.9%
sub0-neg99.9%
associate--r+99.9%
neg-sub099.9%
div-sub99.9%
distribute-frac-neg99.9%
*-inverses99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in v around 0 95.7%
associate-*r/95.7%
neg-mul-195.7%
Simplified95.7%
Taylor expanded in t1 around inf 86.5%
*-commutative86.5%
Simplified86.5%
if -1.05000000000000003e-56 < t1 < 1.7000000000000001e-47Initial program 76.6%
times-frac98.1%
Simplified98.1%
Taylor expanded in t1 around 0 82.9%
mul-1-neg82.9%
Simplified82.9%
Taylor expanded in t1 around 0 85.3%
Final simplification86.0%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -3.8e-57) (not (<= t1 1.35e-43))) (/ (- v) (+ t1 (* u 2.0))) (/ (/ v u) (/ (- u) t1))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -3.8e-57) || !(t1 <= 1.35e-43)) {
tmp = -v / (t1 + (u * 2.0));
} else {
tmp = (v / u) / (-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 ((t1 <= (-3.8d-57)) .or. (.not. (t1 <= 1.35d-43))) then
tmp = -v / (t1 + (u * 2.0d0))
else
tmp = (v / u) / (-u / t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -3.8e-57) || !(t1 <= 1.35e-43)) {
tmp = -v / (t1 + (u * 2.0));
} else {
tmp = (v / u) / (-u / t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -3.8e-57) or not (t1 <= 1.35e-43): tmp = -v / (t1 + (u * 2.0)) else: tmp = (v / u) / (-u / t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -3.8e-57) || !(t1 <= 1.35e-43)) tmp = Float64(Float64(-v) / Float64(t1 + Float64(u * 2.0))); else tmp = Float64(Float64(v / u) / Float64(Float64(-u) / t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -3.8e-57) || ~((t1 <= 1.35e-43))) tmp = -v / (t1 + (u * 2.0)); else tmp = (v / u) / (-u / t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -3.8e-57], N[Not[LessEqual[t1, 1.35e-43]], $MachinePrecision]], N[((-v) / N[(t1 + N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(v / u), $MachinePrecision] / N[((-u) / t1), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -3.8 \cdot 10^{-57} \lor \neg \left(t1 \leq 1.35 \cdot 10^{-43}\right):\\
\;\;\;\;\frac{-v}{t1 + u \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{v}{u}}{\frac{-u}{t1}}\\
\end{array}
\end{array}
if t1 < -3.7999999999999997e-57 or 1.34999999999999996e-43 < t1 Initial program 65.7%
*-commutative65.7%
times-frac99.9%
neg-mul-199.9%
associate-/l*99.9%
associate-*r/99.9%
associate-/l*99.9%
associate-/l/99.9%
neg-mul-199.9%
*-lft-identity99.9%
metadata-eval99.9%
times-frac99.9%
neg-mul-199.9%
remove-double-neg99.9%
neg-mul-199.9%
sub0-neg99.9%
associate--r+99.9%
neg-sub099.9%
div-sub99.9%
distribute-frac-neg99.9%
*-inverses99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in v around 0 95.7%
associate-*r/95.7%
neg-mul-195.7%
Simplified95.7%
Taylor expanded in t1 around inf 86.5%
*-commutative86.5%
Simplified86.5%
if -3.7999999999999997e-57 < t1 < 1.34999999999999996e-43Initial program 76.6%
times-frac98.1%
Simplified98.1%
Taylor expanded in t1 around 0 82.9%
mul-1-neg82.9%
Simplified82.9%
Taylor expanded in t1 around 0 85.3%
neg-mul-185.3%
clear-num85.2%
un-div-inv85.2%
times-frac80.9%
neg-mul-180.9%
associate-/l/85.3%
frac-2neg85.3%
frac-2neg85.3%
remove-double-neg85.3%
distribute-frac-neg85.3%
frac-2neg85.3%
Applied egg-rr85.3%
Final simplification86.0%
(FPCore (u v t1) :precision binary64 (if (<= u -2.7e+159) (* v 0.0) (if (<= u 1.3e+154) (/ (- v) (+ t1 u)) (* v 0.0))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -2.7e+159) {
tmp = v * 0.0;
} else if (u <= 1.3e+154) {
tmp = -v / (t1 + u);
} else {
tmp = v * 0.0;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-2.7d+159)) then
tmp = v * 0.0d0
else if (u <= 1.3d+154) then
tmp = -v / (t1 + u)
else
tmp = v * 0.0d0
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -2.7e+159) {
tmp = v * 0.0;
} else if (u <= 1.3e+154) {
tmp = -v / (t1 + u);
} else {
tmp = v * 0.0;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -2.7e+159: tmp = v * 0.0 elif u <= 1.3e+154: tmp = -v / (t1 + u) else: tmp = v * 0.0 return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -2.7e+159) tmp = Float64(v * 0.0); elseif (u <= 1.3e+154) tmp = Float64(Float64(-v) / Float64(t1 + u)); else tmp = Float64(v * 0.0); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -2.7e+159) tmp = v * 0.0; elseif (u <= 1.3e+154) tmp = -v / (t1 + u); else tmp = v * 0.0; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -2.7e+159], N[(v * 0.0), $MachinePrecision], If[LessEqual[u, 1.3e+154], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision], N[(v * 0.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.7 \cdot 10^{+159}:\\
\;\;\;\;v \cdot 0\\
\mathbf{elif}\;u \leq 1.3 \cdot 10^{+154}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\mathbf{else}:\\
\;\;\;\;v \cdot 0\\
\end{array}
\end{array}
if u < -2.70000000000000008e159 or 1.29999999999999994e154 < u Initial program 74.7%
*-commutative74.7%
times-frac98.5%
neg-mul-198.5%
associate-/l*98.5%
associate-*r/98.5%
associate-/l*98.5%
associate-/l/98.5%
neg-mul-198.5%
*-lft-identity98.5%
metadata-eval98.5%
times-frac98.5%
neg-mul-198.5%
remove-double-neg98.5%
neg-mul-198.5%
sub0-neg98.5%
associate--r+98.5%
neg-sub098.5%
div-sub98.5%
distribute-frac-neg98.5%
*-inverses98.5%
metadata-eval98.5%
Simplified98.5%
Taylor expanded in v around 0 84.7%
associate-*r/84.7%
neg-mul-184.7%
Simplified84.7%
distribute-rgt-in84.7%
*-un-lft-identity84.7%
associate-+l+84.7%
clear-num84.6%
associate-*l/84.6%
*-un-lft-identity84.6%
Applied egg-rr84.6%
Taylor expanded in u around 0 75.2%
+-commutative75.2%
*-commutative75.2%
unpow275.2%
associate-*r/84.7%
distribute-lft-out84.7%
Simplified84.7%
expm1-log1p-u84.6%
expm1-udef78.4%
add-sqr-sqrt38.5%
sqrt-unprod70.9%
sqr-neg70.9%
sqrt-unprod36.7%
add-sqr-sqrt75.2%
+-commutative75.2%
fma-def75.2%
Applied egg-rr75.2%
Simplified75.2%
if -2.70000000000000008e159 < u < 1.29999999999999994e154Initial program 68.6%
times-frac99.4%
Simplified99.4%
Taylor expanded in t1 around inf 70.8%
Final simplification71.9%
(FPCore (u v t1) :precision binary64 (if (<= u -8e+103) (* v 0.0) (if (<= u 3.9e+154) (/ (- v) t1) (* v 0.0))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -8e+103) {
tmp = v * 0.0;
} else if (u <= 3.9e+154) {
tmp = -v / t1;
} else {
tmp = v * 0.0;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-8d+103)) then
tmp = v * 0.0d0
else if (u <= 3.9d+154) then
tmp = -v / t1
else
tmp = v * 0.0d0
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -8e+103) {
tmp = v * 0.0;
} else if (u <= 3.9e+154) {
tmp = -v / t1;
} else {
tmp = v * 0.0;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -8e+103: tmp = v * 0.0 elif u <= 3.9e+154: tmp = -v / t1 else: tmp = v * 0.0 return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -8e+103) tmp = Float64(v * 0.0); elseif (u <= 3.9e+154) tmp = Float64(Float64(-v) / t1); else tmp = Float64(v * 0.0); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -8e+103) tmp = v * 0.0; elseif (u <= 3.9e+154) tmp = -v / t1; else tmp = v * 0.0; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -8e+103], N[(v * 0.0), $MachinePrecision], If[LessEqual[u, 3.9e+154], N[((-v) / t1), $MachinePrecision], N[(v * 0.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -8 \cdot 10^{+103}:\\
\;\;\;\;v \cdot 0\\
\mathbf{elif}\;u \leq 3.9 \cdot 10^{+154}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;v \cdot 0\\
\end{array}
\end{array}
if u < -8e103 or 3.9000000000000003e154 < u Initial program 75.1%
*-commutative75.1%
times-frac98.7%
neg-mul-198.7%
associate-/l*98.7%
associate-*r/98.7%
associate-/l*98.7%
associate-/l/98.7%
neg-mul-198.7%
*-lft-identity98.7%
metadata-eval98.7%
times-frac98.7%
neg-mul-198.7%
remove-double-neg98.7%
neg-mul-198.7%
sub0-neg98.7%
associate--r+98.7%
neg-sub098.7%
div-sub98.7%
distribute-frac-neg98.7%
*-inverses98.7%
metadata-eval98.7%
Simplified98.7%
Taylor expanded in v around 0 84.7%
associate-*r/84.7%
neg-mul-184.7%
Simplified84.7%
distribute-rgt-in84.7%
*-un-lft-identity84.7%
associate-+l+84.7%
clear-num84.7%
associate-*l/84.7%
*-un-lft-identity84.7%
Applied egg-rr84.7%
Taylor expanded in u around 0 76.6%
+-commutative76.6%
*-commutative76.6%
unpow276.6%
associate-*r/84.7%
distribute-lft-out84.7%
Simplified84.7%
expm1-log1p-u84.6%
expm1-udef76.9%
add-sqr-sqrt38.5%
sqrt-unprod69.2%
sqr-neg69.2%
sqrt-unprod34.4%
add-sqr-sqrt72.9%
+-commutative72.9%
fma-def72.9%
Applied egg-rr72.9%
Simplified73.0%
if -8e103 < u < 3.9000000000000003e154Initial program 68.1%
*-commutative68.1%
times-frac99.4%
neg-mul-199.4%
associate-/l*99.3%
associate-*r/99.4%
associate-/l*99.4%
associate-/l/99.4%
neg-mul-199.4%
*-lft-identity99.4%
metadata-eval99.4%
times-frac99.4%
neg-mul-199.4%
remove-double-neg99.4%
neg-mul-199.4%
sub0-neg99.4%
associate--r+99.4%
neg-sub099.4%
div-sub99.4%
distribute-frac-neg99.4%
*-inverses99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in t1 around inf 69.7%
mul-1-neg69.7%
Simplified69.7%
Final simplification70.6%
(FPCore (u v t1) :precision binary64 (* v 0.0))
double code(double u, double v, double t1) {
return v * 0.0;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = v * 0.0d0
end function
public static double code(double u, double v, double t1) {
return v * 0.0;
}
def code(u, v, t1): return v * 0.0
function code(u, v, t1) return Float64(v * 0.0) end
function tmp = code(u, v, t1) tmp = v * 0.0; end
code[u_, v_, t1_] := N[(v * 0.0), $MachinePrecision]
\begin{array}{l}
\\
v \cdot 0
\end{array}
Initial program 70.0%
*-commutative70.0%
times-frac99.2%
neg-mul-199.2%
associate-/l*99.2%
associate-*r/99.2%
associate-/l*99.2%
associate-/l/99.2%
neg-mul-199.2%
*-lft-identity99.2%
metadata-eval99.2%
times-frac99.2%
neg-mul-199.2%
remove-double-neg99.2%
neg-mul-199.2%
sub0-neg99.2%
associate--r+99.2%
neg-sub099.2%
div-sub99.2%
distribute-frac-neg99.2%
*-inverses99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in v around 0 94.9%
associate-*r/94.9%
neg-mul-194.9%
Simplified94.9%
distribute-rgt-in94.9%
*-un-lft-identity94.9%
associate-+l+94.9%
clear-num94.9%
associate-*l/94.9%
*-un-lft-identity94.9%
Applied egg-rr94.9%
Taylor expanded in u around 0 88.7%
+-commutative88.7%
*-commutative88.7%
unpow288.7%
associate-*r/94.9%
distribute-lft-out94.9%
Simplified94.9%
expm1-log1p-u79.7%
expm1-udef47.3%
add-sqr-sqrt23.4%
sqrt-unprod35.2%
sqr-neg35.2%
sqrt-unprod16.5%
add-sqr-sqrt32.7%
+-commutative32.7%
fma-def32.7%
Applied egg-rr32.7%
Simplified33.3%
Final simplification33.3%
herbie shell --seed 2023229
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))