
(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)) (/ 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(t1 + u)) * 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 \frac{v}{t1 + u}
\end{array}
Initial program 70.2%
times-frac98.4%
Simplified98.4%
Final simplification98.4%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -2.6e-153) (not (<= t1 3200000000000.0))) (/ v (- (* u -2.0) t1)) (* (/ (- t1) u) (/ v u))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -2.6e-153) || !(t1 <= 3200000000000.0)) {
tmp = v / ((u * -2.0) - t1);
} else {
tmp = (-t1 / u) * (v / u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-2.6d-153)) .or. (.not. (t1 <= 3200000000000.0d0))) then
tmp = v / ((u * (-2.0d0)) - t1)
else
tmp = (-t1 / u) * (v / u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -2.6e-153) || !(t1 <= 3200000000000.0)) {
tmp = v / ((u * -2.0) - t1);
} else {
tmp = (-t1 / u) * (v / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -2.6e-153) or not (t1 <= 3200000000000.0): tmp = v / ((u * -2.0) - t1) else: tmp = (-t1 / u) * (v / u) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -2.6e-153) || !(t1 <= 3200000000000.0)) tmp = Float64(v / Float64(Float64(u * -2.0) - t1)); else tmp = Float64(Float64(Float64(-t1) / u) * Float64(v / u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -2.6e-153) || ~((t1 <= 3200000000000.0))) tmp = v / ((u * -2.0) - t1); else tmp = (-t1 / u) * (v / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -2.6e-153], N[Not[LessEqual[t1, 3200000000000.0]], $MachinePrecision]], N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision], N[(N[((-t1) / u), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2.6 \cdot 10^{-153} \lor \neg \left(t1 \leq 3200000000000\right):\\
\;\;\;\;\frac{v}{u \cdot -2 - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{-t1}{u} \cdot \frac{v}{u}\\
\end{array}
\end{array}
if t1 < -2.6000000000000001e-153 or 3.2e12 < t1 Initial program 63.0%
associate-/r*75.9%
*-commutative75.9%
associate-/l*99.9%
associate-/l/94.0%
+-commutative94.0%
remove-double-neg94.0%
unsub-neg94.0%
div-sub94.1%
sub-neg94.1%
*-inverses94.1%
metadata-eval94.1%
Simplified94.1%
Taylor expanded in t1 around inf 83.1%
mul-1-neg83.1%
unsub-neg83.1%
*-commutative83.1%
Simplified83.1%
if -2.6000000000000001e-153 < t1 < 3.2e12Initial program 82.3%
times-frac97.8%
Simplified97.8%
Taylor expanded in t1 around 0 78.1%
Taylor expanded in t1 around 0 81.5%
associate-*r/81.5%
mul-1-neg81.5%
Simplified81.5%
Final simplification82.5%
(FPCore (u v t1) :precision binary64 (if (<= u -3.1e+140) (/ (/ v (- 1.0 (/ u t1))) u) (/ v (* (+ t1 u) (- -1.0 (/ u t1))))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -3.1e+140) {
tmp = (v / (1.0 - (u / t1))) / u;
} else {
tmp = v / ((t1 + u) * (-1.0 - (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 <= (-3.1d+140)) then
tmp = (v / (1.0d0 - (u / t1))) / u
else
tmp = v / ((t1 + u) * ((-1.0d0) - (u / t1)))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -3.1e+140) {
tmp = (v / (1.0 - (u / t1))) / u;
} else {
tmp = v / ((t1 + u) * (-1.0 - (u / t1)));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -3.1e+140: tmp = (v / (1.0 - (u / t1))) / u else: tmp = v / ((t1 + u) * (-1.0 - (u / t1))) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -3.1e+140) tmp = Float64(Float64(v / Float64(1.0 - Float64(u / t1))) / u); else tmp = Float64(v / Float64(Float64(t1 + u) * Float64(-1.0 - Float64(u / t1)))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -3.1e+140) tmp = (v / (1.0 - (u / t1))) / u; else tmp = v / ((t1 + u) * (-1.0 - (u / t1))); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -3.1e+140], N[(N[(v / N[(1.0 - N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / u), $MachinePrecision], N[(v / N[(N[(t1 + u), $MachinePrecision] * N[(-1.0 - N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.1 \cdot 10^{+140}:\\
\;\;\;\;\frac{\frac{v}{1 - \frac{u}{t1}}}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{\left(t1 + u\right) \cdot \left(-1 - \frac{u}{t1}\right)}\\
\end{array}
\end{array}
if u < -3.1e140Initial program 62.5%
times-frac99.6%
Simplified99.6%
Taylor expanded in t1 around 0 99.6%
associate-*r/99.6%
clear-num99.7%
associate-*l/99.9%
*-un-lft-identity99.9%
add-sqr-sqrt47.4%
sqrt-unprod87.1%
sqr-neg87.1%
sqrt-unprod39.5%
add-sqr-sqrt54.1%
Applied egg-rr99.9%
if -3.1e140 < u Initial program 71.0%
associate-/r*81.0%
*-commutative81.0%
associate-/l*98.7%
associate-/l/97.5%
+-commutative97.5%
remove-double-neg97.5%
unsub-neg97.5%
div-sub97.5%
sub-neg97.5%
*-inverses97.5%
metadata-eval97.5%
Simplified97.5%
Taylor expanded in u around 0 97.5%
sub-neg97.5%
mul-1-neg97.5%
distribute-neg-in97.5%
+-commutative97.5%
distribute-neg-in97.5%
metadata-eval97.5%
sub-neg97.5%
Simplified97.5%
Final simplification97.7%
(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.2%
associate-/r*81.5%
*-commutative81.5%
associate-/l*98.8%
associate-/l/94.0%
+-commutative94.0%
remove-double-neg94.0%
unsub-neg94.0%
div-sub94.0%
sub-neg94.0%
*-inverses94.0%
metadata-eval94.0%
Simplified94.0%
Taylor expanded in v around 0 94.0%
sub-neg94.0%
mul-1-neg94.0%
distribute-neg-in94.0%
associate-/r*98.4%
+-commutative98.4%
distribute-neg-in98.4%
metadata-eval98.4%
sub-neg98.4%
Simplified98.4%
Final simplification98.4%
(FPCore (u v t1) :precision binary64 (if (<= u -9e+130) (/ (* v -0.5) u) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if (u <= -9e+130) {
tmp = (v * -0.5) / 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 <= (-9d+130)) then
tmp = (v * (-0.5d0)) / 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 <= -9e+130) {
tmp = (v * -0.5) / u;
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -9e+130: tmp = (v * -0.5) / u else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -9e+130) tmp = Float64(Float64(v * -0.5) / u); else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -9e+130) tmp = (v * -0.5) / u; else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -9e+130], N[(N[(v * -0.5), $MachinePrecision] / u), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -9 \cdot 10^{+130}:\\
\;\;\;\;\frac{v \cdot -0.5}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -9.00000000000000078e130Initial program 64.1%
associate-/r*87.7%
*-commutative87.7%
associate-/l*99.9%
associate-/l/60.7%
+-commutative60.7%
remove-double-neg60.7%
unsub-neg60.7%
div-sub60.7%
sub-neg60.7%
*-inverses60.7%
metadata-eval60.7%
Simplified60.7%
Taylor expanded in t1 around inf 21.5%
mul-1-neg21.5%
unsub-neg21.5%
*-commutative21.5%
Simplified21.5%
Taylor expanded in u around inf 21.5%
associate-*r/21.5%
Simplified21.5%
if -9.00000000000000078e130 < u Initial program 70.9%
times-frac98.3%
Simplified98.3%
Taylor expanded in t1 around inf 64.8%
associate-*r/64.8%
neg-mul-164.8%
Simplified64.8%
Final simplification60.8%
(FPCore (u v t1) :precision binary64 (if (<= u -1.1e+131) (/ v u) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.1e+131) {
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 <= (-1.1d+131)) 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 <= -1.1e+131) {
tmp = v / u;
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.1e+131: tmp = v / u else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.1e+131) tmp = 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 <= -1.1e+131) tmp = v / u; else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.1e+131], N[(v / u), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.1 \cdot 10^{+131}:\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -1.0999999999999999e131Initial program 64.1%
associate-/r*87.7%
*-commutative87.7%
associate-/l*99.9%
associate-/l/60.7%
+-commutative60.7%
remove-double-neg60.7%
unsub-neg60.7%
div-sub60.7%
sub-neg60.7%
*-inverses60.7%
metadata-eval60.7%
Simplified60.7%
Taylor expanded in u around inf 60.7%
mul-1-neg60.7%
distribute-neg-frac60.7%
Simplified60.7%
clear-num60.7%
un-div-inv60.7%
add-sqr-sqrt60.7%
sqrt-unprod56.8%
sqr-neg56.8%
sqrt-unprod0.0%
add-sqr-sqrt56.7%
Applied egg-rr56.7%
Taylor expanded in t1 around inf 21.3%
if -1.0999999999999999e131 < u Initial program 70.9%
times-frac98.3%
Simplified98.3%
Taylor expanded in t1 around inf 64.8%
associate-*r/64.8%
neg-mul-164.8%
Simplified64.8%
Final simplification60.7%
(FPCore (u v t1) :precision binary64 (if (<= u -1.15e+131) (/ (- v) u) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.15e+131) {
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 <= (-1.15d+131)) 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 <= -1.15e+131) {
tmp = -v / u;
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.15e+131: tmp = -v / u else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.15e+131) 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 <= -1.15e+131) tmp = -v / u; else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.15e+131], N[((-v) / u), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.15 \cdot 10^{+131}:\\
\;\;\;\;\frac{-v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -1.14999999999999996e131Initial program 64.1%
associate-/r*87.7%
*-commutative87.7%
associate-/l*99.9%
associate-/l/60.7%
+-commutative60.7%
remove-double-neg60.7%
unsub-neg60.7%
div-sub60.7%
sub-neg60.7%
*-inverses60.7%
metadata-eval60.7%
Simplified60.7%
Taylor expanded in u around inf 60.7%
mul-1-neg60.7%
distribute-neg-frac60.7%
Simplified60.7%
Taylor expanded in t1 around inf 21.5%
associate-*r/21.5%
neg-mul-121.5%
Simplified21.5%
if -1.14999999999999996e131 < u Initial program 70.9%
times-frac98.3%
Simplified98.3%
Taylor expanded in t1 around inf 64.8%
associate-*r/64.8%
neg-mul-164.8%
Simplified64.8%
Final simplification60.7%
(FPCore (u v t1) :precision binary64 (/ v (- (* u -2.0) t1)))
double code(double u, double v, double t1) {
return v / ((u * -2.0) - 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 * (-2.0d0)) - t1)
end function
public static double code(double u, double v, double t1) {
return v / ((u * -2.0) - t1);
}
def code(u, v, t1): return v / ((u * -2.0) - t1)
function code(u, v, t1) return Float64(v / Float64(Float64(u * -2.0) - t1)) end
function tmp = code(u, v, t1) tmp = v / ((u * -2.0) - t1); end
code[u_, v_, t1_] := N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{u \cdot -2 - t1}
\end{array}
Initial program 70.2%
associate-/r*81.5%
*-commutative81.5%
associate-/l*98.8%
associate-/l/94.0%
+-commutative94.0%
remove-double-neg94.0%
unsub-neg94.0%
div-sub94.0%
sub-neg94.0%
*-inverses94.0%
metadata-eval94.0%
Simplified94.0%
Taylor expanded in t1 around inf 62.6%
mul-1-neg62.6%
unsub-neg62.6%
*-commutative62.6%
Simplified62.6%
Final simplification62.6%
(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 70.2%
frac-times98.4%
associate-*r/98.7%
div-inv98.5%
clear-num98.5%
associate-*l/98.5%
*-un-lft-identity98.5%
frac-2neg98.5%
distribute-neg-in98.5%
add-sqr-sqrt48.9%
sqrt-unprod64.7%
sqr-neg64.7%
sqrt-unprod24.9%
add-sqr-sqrt50.3%
sub-neg50.3%
remove-double-neg50.3%
frac-2neg50.3%
metadata-eval50.3%
distribute-neg-in50.3%
add-sqr-sqrt25.5%
sqrt-unprod64.9%
sqr-neg64.9%
sqrt-unprod48.1%
add-sqr-sqrt96.4%
Applied egg-rr96.4%
Taylor expanded in t1 around inf 62.2%
Taylor expanded in v around 0 62.4%
mul-1-neg62.4%
distribute-frac-neg62.4%
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(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 70.2%
associate-/r*81.5%
*-commutative81.5%
associate-/l*98.8%
associate-/l/94.0%
+-commutative94.0%
remove-double-neg94.0%
unsub-neg94.0%
div-sub94.0%
sub-neg94.0%
*-inverses94.0%
metadata-eval94.0%
Simplified94.0%
Taylor expanded in u around inf 41.6%
mul-1-neg41.6%
distribute-neg-frac41.6%
Simplified41.6%
clear-num41.6%
un-div-inv41.6%
add-sqr-sqrt19.4%
sqrt-unprod33.6%
sqr-neg33.6%
sqrt-unprod15.0%
add-sqr-sqrt24.2%
Applied egg-rr24.2%
Taylor expanded in t1 around inf 12.3%
Final simplification12.3%
herbie shell --seed 2024026
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))