
(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 14 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 73.3%
associate-/r*83.5%
associate-/l*97.2%
Simplified97.2%
Final simplification97.2%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ (- v) (+ t1 u))) (t_2 (* v (/ (- t1) (* (+ t1 u) (+ t1 u))))))
(if (<= t1 -3.3e+80)
t_1
(if (<= t1 -3.2e-201)
t_2
(if (<= t1 2.2e-149)
(/ (/ (- t1) (/ u v)) (+ t1 u))
(if (<= t1 2.3e+86) t_2 t_1))))))
double code(double u, double v, double t1) {
double t_1 = -v / (t1 + u);
double t_2 = v * (-t1 / ((t1 + u) * (t1 + u)));
double tmp;
if (t1 <= -3.3e+80) {
tmp = t_1;
} else if (t1 <= -3.2e-201) {
tmp = t_2;
} else if (t1 <= 2.2e-149) {
tmp = (-t1 / (u / v)) / (t1 + u);
} else if (t1 <= 2.3e+86) {
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 * (-t1 / ((t1 + u) * (t1 + u)))
if (t1 <= (-3.3d+80)) then
tmp = t_1
else if (t1 <= (-3.2d-201)) then
tmp = t_2
else if (t1 <= 2.2d-149) then
tmp = (-t1 / (u / v)) / (t1 + u)
else if (t1 <= 2.3d+86) 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 * (-t1 / ((t1 + u) * (t1 + u)));
double tmp;
if (t1 <= -3.3e+80) {
tmp = t_1;
} else if (t1 <= -3.2e-201) {
tmp = t_2;
} else if (t1 <= 2.2e-149) {
tmp = (-t1 / (u / v)) / (t1 + u);
} else if (t1 <= 2.3e+86) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(u, v, t1): t_1 = -v / (t1 + u) t_2 = v * (-t1 / ((t1 + u) * (t1 + u))) tmp = 0 if t1 <= -3.3e+80: tmp = t_1 elif t1 <= -3.2e-201: tmp = t_2 elif t1 <= 2.2e-149: tmp = (-t1 / (u / v)) / (t1 + u) elif t1 <= 2.3e+86: 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(v * Float64(Float64(-t1) / Float64(Float64(t1 + u) * Float64(t1 + u)))) tmp = 0.0 if (t1 <= -3.3e+80) tmp = t_1; elseif (t1 <= -3.2e-201) tmp = t_2; elseif (t1 <= 2.2e-149) tmp = Float64(Float64(Float64(-t1) / Float64(u / v)) / Float64(t1 + u)); elseif (t1 <= 2.3e+86) 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 * (-t1 / ((t1 + u) * (t1 + u))); tmp = 0.0; if (t1 <= -3.3e+80) tmp = t_1; elseif (t1 <= -3.2e-201) tmp = t_2; elseif (t1 <= 2.2e-149) tmp = (-t1 / (u / v)) / (t1 + u); elseif (t1 <= 2.3e+86) 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[(v * N[((-t1) / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -3.3e+80], t$95$1, If[LessEqual[t1, -3.2e-201], t$95$2, If[LessEqual[t1, 2.2e-149], N[(N[((-t1) / N[(u / v), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 2.3e+86], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-v}{t1 + u}\\
t_2 := v \cdot \frac{-t1}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\
\mathbf{if}\;t1 \leq -3.3 \cdot 10^{+80}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t1 \leq -3.2 \cdot 10^{-201}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t1 \leq 2.2 \cdot 10^{-149}:\\
\;\;\;\;\frac{\frac{-t1}{\frac{u}{v}}}{t1 + u}\\
\mathbf{elif}\;t1 \leq 2.3 \cdot 10^{+86}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t1 < -3.29999999999999991e80 or 2.2999999999999999e86 < t1 Initial program 60.0%
associate-/r*77.1%
associate-/l*99.2%
Simplified99.2%
Taylor expanded in t1 around inf 92.2%
neg-mul-192.2%
Simplified92.2%
if -3.29999999999999991e80 < t1 < -3.2000000000000001e-201 or 2.1999999999999998e-149 < t1 < 2.2999999999999999e86Initial program 89.2%
associate-*l/94.5%
*-commutative94.5%
Simplified94.5%
if -3.2000000000000001e-201 < t1 < 2.1999999999999998e-149Initial program 72.8%
associate-/r*79.6%
associate-/l*89.5%
Simplified89.5%
Taylor expanded in t1 around 0 78.1%
mul-1-neg78.1%
associate-/l*83.4%
distribute-neg-frac83.4%
Simplified83.4%
Final simplification91.0%
(FPCore (u v t1)
:precision binary64
(if (or (<= t1 -1.22e+37)
(not (or (<= t1 2.5e-86) (and (not (<= t1 1.3e-9)) (<= t1 29.5)))))
(/ (- v) (+ t1 u))
(* v (/ (- t1) (* u u)))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.22e+37) || !((t1 <= 2.5e-86) || (!(t1 <= 1.3e-9) && (t1 <= 29.5)))) {
tmp = -v / (t1 + u);
} else {
tmp = v * (-t1 / (u * 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.22d+37)) .or. (.not. (t1 <= 2.5d-86) .or. (.not. (t1 <= 1.3d-9)) .and. (t1 <= 29.5d0))) then
tmp = -v / (t1 + u)
else
tmp = v * (-t1 / (u * u))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.22e+37) || !((t1 <= 2.5e-86) || (!(t1 <= 1.3e-9) && (t1 <= 29.5)))) {
tmp = -v / (t1 + u);
} else {
tmp = v * (-t1 / (u * u));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.22e+37) or not ((t1 <= 2.5e-86) or (not (t1 <= 1.3e-9) and (t1 <= 29.5))): tmp = -v / (t1 + u) else: tmp = v * (-t1 / (u * u)) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.22e+37) || !((t1 <= 2.5e-86) || (!(t1 <= 1.3e-9) && (t1 <= 29.5)))) tmp = Float64(Float64(-v) / Float64(t1 + u)); else tmp = Float64(v * Float64(Float64(-t1) / Float64(u * u))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -1.22e+37) || ~(((t1 <= 2.5e-86) || (~((t1 <= 1.3e-9)) && (t1 <= 29.5))))) tmp = -v / (t1 + u); else tmp = v * (-t1 / (u * u)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.22e+37], N[Not[Or[LessEqual[t1, 2.5e-86], And[N[Not[LessEqual[t1, 1.3e-9]], $MachinePrecision], LessEqual[t1, 29.5]]]], $MachinePrecision]], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision], N[(v * N[((-t1) / N[(u * u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.22 \cdot 10^{+37} \lor \neg \left(t1 \leq 2.5 \cdot 10^{-86} \lor \neg \left(t1 \leq 1.3 \cdot 10^{-9}\right) \land t1 \leq 29.5\right):\\
\;\;\;\;\frac{-v}{t1 + u}\\
\mathbf{else}:\\
\;\;\;\;v \cdot \frac{-t1}{u \cdot u}\\
\end{array}
\end{array}
if t1 < -1.22e37 or 2.4999999999999999e-86 < t1 < 1.3000000000000001e-9 or 29.5 < t1 Initial program 67.5%
associate-/r*80.9%
associate-/l*99.4%
Simplified99.4%
Taylor expanded in t1 around inf 87.9%
neg-mul-187.9%
Simplified87.9%
if -1.22e37 < t1 < 2.4999999999999999e-86 or 1.3000000000000001e-9 < t1 < 29.5Initial program 80.7%
associate-*l/82.2%
*-commutative82.2%
Simplified82.2%
Taylor expanded in t1 around 0 76.3%
associate-*r/76.3%
neg-mul-176.3%
unpow276.3%
Simplified76.3%
Final simplification82.8%
(FPCore (u v t1)
:precision binary64
(if (or (<= t1 -1.22e+37)
(not (or (<= t1 1.8e-87) (and (not (<= t1 1.6e-8)) (<= t1 7.2e+71)))))
(/ (- v) (+ t1 u))
(* (- v) (/ (/ t1 u) u))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.22e+37) || !((t1 <= 1.8e-87) || (!(t1 <= 1.6e-8) && (t1 <= 7.2e+71)))) {
tmp = -v / (t1 + u);
} else {
tmp = -v * ((t1 / u) / 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.22d+37)) .or. (.not. (t1 <= 1.8d-87) .or. (.not. (t1 <= 1.6d-8)) .and. (t1 <= 7.2d+71))) then
tmp = -v / (t1 + u)
else
tmp = -v * ((t1 / u) / u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.22e+37) || !((t1 <= 1.8e-87) || (!(t1 <= 1.6e-8) && (t1 <= 7.2e+71)))) {
tmp = -v / (t1 + u);
} else {
tmp = -v * ((t1 / u) / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.22e+37) or not ((t1 <= 1.8e-87) or (not (t1 <= 1.6e-8) and (t1 <= 7.2e+71))): tmp = -v / (t1 + u) else: tmp = -v * ((t1 / u) / u) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.22e+37) || !((t1 <= 1.8e-87) || (!(t1 <= 1.6e-8) && (t1 <= 7.2e+71)))) tmp = Float64(Float64(-v) / Float64(t1 + u)); else tmp = Float64(Float64(-v) * Float64(Float64(t1 / u) / u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -1.22e+37) || ~(((t1 <= 1.8e-87) || (~((t1 <= 1.6e-8)) && (t1 <= 7.2e+71))))) tmp = -v / (t1 + u); else tmp = -v * ((t1 / u) / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.22e+37], N[Not[Or[LessEqual[t1, 1.8e-87], And[N[Not[LessEqual[t1, 1.6e-8]], $MachinePrecision], LessEqual[t1, 7.2e+71]]]], $MachinePrecision]], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision], N[((-v) * N[(N[(t1 / u), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.22 \cdot 10^{+37} \lor \neg \left(t1 \leq 1.8 \cdot 10^{-87} \lor \neg \left(t1 \leq 1.6 \cdot 10^{-8}\right) \land t1 \leq 7.2 \cdot 10^{+71}\right):\\
\;\;\;\;\frac{-v}{t1 + u}\\
\mathbf{else}:\\
\;\;\;\;\left(-v\right) \cdot \frac{\frac{t1}{u}}{u}\\
\end{array}
\end{array}
if t1 < -1.22e37 or 1.79999999999999996e-87 < t1 < 1.6000000000000001e-8 or 7.1999999999999999e71 < t1 Initial program 66.8%
associate-/r*80.6%
associate-/l*99.4%
Simplified99.4%
Taylor expanded in t1 around inf 91.3%
neg-mul-191.3%
Simplified91.3%
if -1.22e37 < t1 < 1.79999999999999996e-87 or 1.6000000000000001e-8 < t1 < 7.1999999999999999e71Initial program 80.2%
associate-*l/82.3%
*-commutative82.3%
Simplified82.3%
Taylor expanded in t1 around 0 73.1%
associate-*r/73.1%
neg-mul-173.1%
unpow273.1%
Simplified73.1%
neg-mul-173.1%
times-frac79.5%
Applied egg-rr79.5%
associate-*l/79.5%
mul-1-neg79.5%
Simplified79.5%
Final simplification85.6%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ (- v) (+ t1 u))))
(if (<= t1 -1.22e+37)
t_1
(if (<= t1 3.4e-85)
(* (- v) (/ (/ t1 u) u))
(if (or (<= t1 4.6e-9) (not (<= t1 4.2e+86)))
t_1
(/ t1 (/ (- u) (/ v u))))))))
double code(double u, double v, double t1) {
double t_1 = -v / (t1 + u);
double tmp;
if (t1 <= -1.22e+37) {
tmp = t_1;
} else if (t1 <= 3.4e-85) {
tmp = -v * ((t1 / u) / u);
} else if ((t1 <= 4.6e-9) || !(t1 <= 4.2e+86)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = -v / (t1 + u)
if (t1 <= (-1.22d+37)) then
tmp = t_1
else if (t1 <= 3.4d-85) then
tmp = -v * ((t1 / u) / u)
else if ((t1 <= 4.6d-9) .or. (.not. (t1 <= 4.2d+86))) then
tmp = t_1
else
tmp = t1 / (-u / (v / u))
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.22e+37) {
tmp = t_1;
} else if (t1 <= 3.4e-85) {
tmp = -v * ((t1 / u) / u);
} else if ((t1 <= 4.6e-9) || !(t1 <= 4.2e+86)) {
tmp = t_1;
} else {
tmp = t1 / (-u / (v / u));
}
return tmp;
}
def code(u, v, t1): t_1 = -v / (t1 + u) tmp = 0 if t1 <= -1.22e+37: tmp = t_1 elif t1 <= 3.4e-85: tmp = -v * ((t1 / u) / u) elif (t1 <= 4.6e-9) or not (t1 <= 4.2e+86): tmp = t_1 else: tmp = t1 / (-u / (v / u)) return tmp
function code(u, v, t1) t_1 = Float64(Float64(-v) / Float64(t1 + u)) tmp = 0.0 if (t1 <= -1.22e+37) tmp = t_1; elseif (t1 <= 3.4e-85) tmp = Float64(Float64(-v) * Float64(Float64(t1 / u) / u)); elseif ((t1 <= 4.6e-9) || !(t1 <= 4.2e+86)) tmp = t_1; else tmp = Float64(t1 / Float64(Float64(-u) / Float64(v / u))); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = -v / (t1 + u); tmp = 0.0; if (t1 <= -1.22e+37) tmp = t_1; elseif (t1 <= 3.4e-85) tmp = -v * ((t1 / u) / u); elseif ((t1 <= 4.6e-9) || ~((t1 <= 4.2e+86))) tmp = t_1; else tmp = t1 / (-u / (v / u)); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -1.22e+37], t$95$1, If[LessEqual[t1, 3.4e-85], N[((-v) * N[(N[(t1 / u), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t1, 4.6e-9], N[Not[LessEqual[t1, 4.2e+86]], $MachinePrecision]], t$95$1, N[(t1 / N[((-u) / N[(v / u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-v}{t1 + u}\\
\mathbf{if}\;t1 \leq -1.22 \cdot 10^{+37}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t1 \leq 3.4 \cdot 10^{-85}:\\
\;\;\;\;\left(-v\right) \cdot \frac{\frac{t1}{u}}{u}\\
\mathbf{elif}\;t1 \leq 4.6 \cdot 10^{-9} \lor \neg \left(t1 \leq 4.2 \cdot 10^{+86}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{\frac{-u}{\frac{v}{u}}}\\
\end{array}
\end{array}
if t1 < -1.22e37 or 3.4e-85 < t1 < 4.5999999999999998e-9 or 4.1999999999999998e86 < t1 Initial program 67.3%
associate-/r*81.2%
associate-/l*99.4%
Simplified99.4%
Taylor expanded in t1 around inf 92.0%
neg-mul-192.0%
Simplified92.0%
if -1.22e37 < t1 < 3.4e-85Initial program 79.8%
associate-*l/81.4%
*-commutative81.4%
Simplified81.4%
Taylor expanded in t1 around 0 75.2%
associate-*r/75.2%
neg-mul-175.2%
unpow275.2%
Simplified75.2%
neg-mul-175.2%
times-frac81.7%
Applied egg-rr81.7%
associate-*l/81.7%
mul-1-neg81.7%
Simplified81.7%
if 4.5999999999999998e-9 < t1 < 4.1999999999999998e86Initial program 77.9%
associate-*l/83.7%
*-commutative83.7%
Simplified83.7%
associate-/r*89.1%
associate-*r/99.7%
*-commutative99.7%
associate-/r/99.3%
div-inv99.5%
frac-2neg99.5%
frac-times99.3%
remove-double-neg99.3%
*-commutative99.3%
*-un-lft-identity99.3%
distribute-neg-frac99.3%
distribute-neg-in99.3%
add-sqr-sqrt0.0%
sqrt-unprod72.1%
sqr-neg72.1%
sqrt-unprod72.1%
add-sqr-sqrt72.1%
sub-neg72.1%
Applied egg-rr72.1%
Taylor expanded in t1 around 0 56.5%
unpow256.5%
neg-mul-156.5%
associate-/l*72.4%
distribute-neg-frac72.4%
Simplified72.4%
Final simplification86.3%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ (- v) (+ t1 u))))
(if (<= t1 -7.8e+39)
t_1
(if (<= t1 5.2e-88)
(/ (/ v (/ u t1)) (- u))
(if (or (<= t1 3.5e-9) (not (<= t1 4.2e+86)))
t_1
(/ t1 (/ (- u) (/ v u))))))))
double code(double u, double v, double t1) {
double t_1 = -v / (t1 + u);
double tmp;
if (t1 <= -7.8e+39) {
tmp = t_1;
} else if (t1 <= 5.2e-88) {
tmp = (v / (u / t1)) / -u;
} else if ((t1 <= 3.5e-9) || !(t1 <= 4.2e+86)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = -v / (t1 + u)
if (t1 <= (-7.8d+39)) then
tmp = t_1
else if (t1 <= 5.2d-88) then
tmp = (v / (u / t1)) / -u
else if ((t1 <= 3.5d-9) .or. (.not. (t1 <= 4.2d+86))) then
tmp = t_1
else
tmp = t1 / (-u / (v / u))
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 <= -7.8e+39) {
tmp = t_1;
} else if (t1 <= 5.2e-88) {
tmp = (v / (u / t1)) / -u;
} else if ((t1 <= 3.5e-9) || !(t1 <= 4.2e+86)) {
tmp = t_1;
} else {
tmp = t1 / (-u / (v / u));
}
return tmp;
}
def code(u, v, t1): t_1 = -v / (t1 + u) tmp = 0 if t1 <= -7.8e+39: tmp = t_1 elif t1 <= 5.2e-88: tmp = (v / (u / t1)) / -u elif (t1 <= 3.5e-9) or not (t1 <= 4.2e+86): tmp = t_1 else: tmp = t1 / (-u / (v / u)) return tmp
function code(u, v, t1) t_1 = Float64(Float64(-v) / Float64(t1 + u)) tmp = 0.0 if (t1 <= -7.8e+39) tmp = t_1; elseif (t1 <= 5.2e-88) tmp = Float64(Float64(v / Float64(u / t1)) / Float64(-u)); elseif ((t1 <= 3.5e-9) || !(t1 <= 4.2e+86)) tmp = t_1; else tmp = Float64(t1 / Float64(Float64(-u) / Float64(v / u))); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = -v / (t1 + u); tmp = 0.0; if (t1 <= -7.8e+39) tmp = t_1; elseif (t1 <= 5.2e-88) tmp = (v / (u / t1)) / -u; elseif ((t1 <= 3.5e-9) || ~((t1 <= 4.2e+86))) tmp = t_1; else tmp = t1 / (-u / (v / u)); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -7.8e+39], t$95$1, If[LessEqual[t1, 5.2e-88], N[(N[(v / N[(u / t1), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision], If[Or[LessEqual[t1, 3.5e-9], N[Not[LessEqual[t1, 4.2e+86]], $MachinePrecision]], t$95$1, N[(t1 / N[((-u) / N[(v / u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-v}{t1 + u}\\
\mathbf{if}\;t1 \leq -7.8 \cdot 10^{+39}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t1 \leq 5.2 \cdot 10^{-88}:\\
\;\;\;\;\frac{\frac{v}{\frac{u}{t1}}}{-u}\\
\mathbf{elif}\;t1 \leq 3.5 \cdot 10^{-9} \lor \neg \left(t1 \leq 4.2 \cdot 10^{+86}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{\frac{-u}{\frac{v}{u}}}\\
\end{array}
\end{array}
if t1 < -7.8000000000000002e39 or 5.20000000000000027e-88 < t1 < 3.4999999999999999e-9 or 4.1999999999999998e86 < t1 Initial program 67.3%
associate-/r*81.2%
associate-/l*99.4%
Simplified99.4%
Taylor expanded in t1 around inf 92.0%
neg-mul-192.0%
Simplified92.0%
if -7.8000000000000002e39 < t1 < 5.20000000000000027e-88Initial program 79.8%
associate-*l/81.4%
*-commutative81.4%
Simplified81.4%
Taylor expanded in t1 around 0 75.2%
associate-*r/75.2%
neg-mul-175.2%
unpow275.2%
Simplified75.2%
associate-*r/75.4%
*-commutative75.4%
associate-/r*80.1%
frac-2neg80.1%
Applied egg-rr83.1%
if 3.4999999999999999e-9 < t1 < 4.1999999999999998e86Initial program 77.9%
associate-*l/83.7%
*-commutative83.7%
Simplified83.7%
associate-/r*89.1%
associate-*r/99.7%
*-commutative99.7%
associate-/r/99.3%
div-inv99.5%
frac-2neg99.5%
frac-times99.3%
remove-double-neg99.3%
*-commutative99.3%
*-un-lft-identity99.3%
distribute-neg-frac99.3%
distribute-neg-in99.3%
add-sqr-sqrt0.0%
sqrt-unprod72.1%
sqr-neg72.1%
sqrt-unprod72.1%
add-sqr-sqrt72.1%
sub-neg72.1%
Applied egg-rr72.1%
Taylor expanded in t1 around 0 56.5%
unpow256.5%
neg-mul-156.5%
associate-/l*72.4%
distribute-neg-frac72.4%
Simplified72.4%
Final simplification86.9%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ (- v) (+ t1 u))))
(if (<= t1 -3.15e+38)
t_1
(if (<= t1 6e-85)
(/ (/ (- t1) (/ u v)) (+ t1 u))
(if (or (<= t1 1.5e-8) (not (<= t1 4.2e+86)))
t_1
(/ t1 (/ (- u) (/ v u))))))))
double code(double u, double v, double t1) {
double t_1 = -v / (t1 + u);
double tmp;
if (t1 <= -3.15e+38) {
tmp = t_1;
} else if (t1 <= 6e-85) {
tmp = (-t1 / (u / v)) / (t1 + u);
} else if ((t1 <= 1.5e-8) || !(t1 <= 4.2e+86)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = -v / (t1 + u)
if (t1 <= (-3.15d+38)) then
tmp = t_1
else if (t1 <= 6d-85) then
tmp = (-t1 / (u / v)) / (t1 + u)
else if ((t1 <= 1.5d-8) .or. (.not. (t1 <= 4.2d+86))) then
tmp = t_1
else
tmp = t1 / (-u / (v / u))
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.15e+38) {
tmp = t_1;
} else if (t1 <= 6e-85) {
tmp = (-t1 / (u / v)) / (t1 + u);
} else if ((t1 <= 1.5e-8) || !(t1 <= 4.2e+86)) {
tmp = t_1;
} else {
tmp = t1 / (-u / (v / u));
}
return tmp;
}
def code(u, v, t1): t_1 = -v / (t1 + u) tmp = 0 if t1 <= -3.15e+38: tmp = t_1 elif t1 <= 6e-85: tmp = (-t1 / (u / v)) / (t1 + u) elif (t1 <= 1.5e-8) or not (t1 <= 4.2e+86): tmp = t_1 else: tmp = t1 / (-u / (v / u)) return tmp
function code(u, v, t1) t_1 = Float64(Float64(-v) / Float64(t1 + u)) tmp = 0.0 if (t1 <= -3.15e+38) tmp = t_1; elseif (t1 <= 6e-85) tmp = Float64(Float64(Float64(-t1) / Float64(u / v)) / Float64(t1 + u)); elseif ((t1 <= 1.5e-8) || !(t1 <= 4.2e+86)) tmp = t_1; else tmp = Float64(t1 / Float64(Float64(-u) / Float64(v / u))); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = -v / (t1 + u); tmp = 0.0; if (t1 <= -3.15e+38) tmp = t_1; elseif (t1 <= 6e-85) tmp = (-t1 / (u / v)) / (t1 + u); elseif ((t1 <= 1.5e-8) || ~((t1 <= 4.2e+86))) tmp = t_1; else tmp = t1 / (-u / (v / u)); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -3.15e+38], t$95$1, If[LessEqual[t1, 6e-85], N[(N[((-t1) / N[(u / v), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t1, 1.5e-8], N[Not[LessEqual[t1, 4.2e+86]], $MachinePrecision]], t$95$1, N[(t1 / N[((-u) / N[(v / u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-v}{t1 + u}\\
\mathbf{if}\;t1 \leq -3.15 \cdot 10^{+38}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t1 \leq 6 \cdot 10^{-85}:\\
\;\;\;\;\frac{\frac{-t1}{\frac{u}{v}}}{t1 + u}\\
\mathbf{elif}\;t1 \leq 1.5 \cdot 10^{-8} \lor \neg \left(t1 \leq 4.2 \cdot 10^{+86}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{\frac{-u}{\frac{v}{u}}}\\
\end{array}
\end{array}
if t1 < -3.15000000000000001e38 or 6.00000000000000044e-85 < t1 < 1.49999999999999987e-8 or 4.1999999999999998e86 < t1 Initial program 67.3%
associate-/r*81.2%
associate-/l*99.4%
Simplified99.4%
Taylor expanded in t1 around inf 92.0%
neg-mul-192.0%
Simplified92.0%
if -3.15000000000000001e38 < t1 < 6.00000000000000044e-85Initial program 79.8%
associate-/r*86.2%
associate-/l*94.2%
Simplified94.2%
Taylor expanded in t1 around 0 80.1%
mul-1-neg80.1%
associate-/l*83.9%
distribute-neg-frac83.9%
Simplified83.9%
if 1.49999999999999987e-8 < t1 < 4.1999999999999998e86Initial program 77.9%
associate-*l/83.7%
*-commutative83.7%
Simplified83.7%
associate-/r*89.1%
associate-*r/99.7%
*-commutative99.7%
associate-/r/99.3%
div-inv99.5%
frac-2neg99.5%
frac-times99.3%
remove-double-neg99.3%
*-commutative99.3%
*-un-lft-identity99.3%
distribute-neg-frac99.3%
distribute-neg-in99.3%
add-sqr-sqrt0.0%
sqrt-unprod72.1%
sqr-neg72.1%
sqrt-unprod72.1%
add-sqr-sqrt72.1%
sub-neg72.1%
Applied egg-rr72.1%
Taylor expanded in t1 around 0 56.5%
unpow256.5%
neg-mul-156.5%
associate-/l*72.4%
distribute-neg-frac72.4%
Simplified72.4%
Final simplification87.2%
(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(v * Float64(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[(v * N[(N[((-t1) / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
v \cdot \frac{\frac{-t1}{t1 + u}}{t1 + u}
\end{array}
Initial program 73.3%
associate-*l/76.3%
*-commutative76.3%
Simplified76.3%
neg-mul-176.3%
times-frac95.0%
Applied egg-rr95.0%
associate-*l/95.0%
mul-1-neg95.0%
Simplified95.0%
Final simplification95.0%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.02e+127) (not (<= u 7.2e+170))) (/ v (/ (* u u) t1)) (/ (- v) (+ t1 u))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.02e+127) || !(u <= 7.2e+170)) {
tmp = v / ((u * u) / t1);
} 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 ((u <= (-1.02d+127)) .or. (.not. (u <= 7.2d+170))) then
tmp = v / ((u * u) / t1)
else
tmp = -v / (t1 + u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.02e+127) || !(u <= 7.2e+170)) {
tmp = v / ((u * u) / t1);
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.02e+127) or not (u <= 7.2e+170): tmp = v / ((u * u) / t1) else: tmp = -v / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.02e+127) || !(u <= 7.2e+170)) tmp = Float64(v / Float64(Float64(u * u) / t1)); else tmp = Float64(Float64(-v) / Float64(t1 + u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -1.02e+127) || ~((u <= 7.2e+170))) tmp = v / ((u * u) / t1); else tmp = -v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.02e+127], N[Not[LessEqual[u, 7.2e+170]], $MachinePrecision]], N[(v / N[(N[(u * u), $MachinePrecision] / t1), $MachinePrecision]), $MachinePrecision], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.02 \cdot 10^{+127} \lor \neg \left(u \leq 7.2 \cdot 10^{+170}\right):\\
\;\;\;\;\frac{v}{\frac{u \cdot u}{t1}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\end{array}
\end{array}
if u < -1.02e127 or 7.1999999999999999e170 < u Initial program 78.2%
associate-*l/74.5%
*-commutative74.5%
Simplified74.5%
Taylor expanded in t1 around 0 74.5%
associate-*r/74.5%
neg-mul-174.5%
unpow274.5%
Simplified74.5%
clear-num74.5%
un-div-inv74.5%
add-sqr-sqrt45.5%
sqrt-unprod56.1%
sqr-neg56.1%
sqrt-unprod29.0%
add-sqr-sqrt74.5%
Applied egg-rr74.5%
if -1.02e127 < u < 7.1999999999999999e170Initial program 71.6%
associate-/r*82.2%
associate-/l*96.3%
Simplified96.3%
Taylor expanded in t1 around inf 65.9%
neg-mul-165.9%
Simplified65.9%
Final simplification68.2%
(FPCore (u v t1) :precision binary64 (if (or (<= u -6.5e+83) (not (<= u 3.25e+84))) (/ v (+ t1 u)) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -6.5e+83) || !(u <= 3.25e+84)) {
tmp = v / (t1 + 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 <= (-6.5d+83)) .or. (.not. (u <= 3.25d+84))) then
tmp = v / (t1 + 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 <= -6.5e+83) || !(u <= 3.25e+84)) {
tmp = v / (t1 + u);
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -6.5e+83) or not (u <= 3.25e+84): tmp = v / (t1 + u) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -6.5e+83) || !(u <= 3.25e+84)) tmp = Float64(v / Float64(t1 + u)); else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -6.5e+83) || ~((u <= 3.25e+84))) tmp = v / (t1 + u); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -6.5e+83], N[Not[LessEqual[u, 3.25e+84]], $MachinePrecision]], N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -6.5 \cdot 10^{+83} \lor \neg \left(u \leq 3.25 \cdot 10^{+84}\right):\\
\;\;\;\;\frac{v}{t1 + u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -6.5000000000000003e83 or 3.25000000000000013e84 < u Initial program 79.5%
associate-*l/74.0%
*-commutative74.0%
Simplified74.0%
neg-mul-174.0%
times-frac87.5%
Applied egg-rr87.5%
associate-*l/87.5%
mul-1-neg87.5%
Simplified87.5%
Taylor expanded in t1 around inf 57.3%
expm1-log1p-u56.8%
expm1-udef73.0%
Applied egg-rr69.1%
expm1-def47.5%
expm1-log1p47.8%
Simplified47.8%
if -6.5000000000000003e83 < u < 3.25000000000000013e84Initial program 69.9%
associate-*l/77.5%
*-commutative77.5%
Simplified77.5%
Taylor expanded in t1 around inf 68.3%
associate-*r/68.3%
neg-mul-168.3%
Simplified68.3%
Final simplification61.0%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.2e+158) (not (<= u 5.8e+221))) (/ (- v) u) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.2e+158) || !(u <= 5.8e+221)) {
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.2d+158)) .or. (.not. (u <= 5.8d+221))) 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.2e+158) || !(u <= 5.8e+221)) {
tmp = -v / u;
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.2e+158) or not (u <= 5.8e+221): tmp = -v / u else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.2e+158) || !(u <= 5.8e+221)) 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.2e+158) || ~((u <= 5.8e+221))) tmp = -v / u; else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.2e+158], N[Not[LessEqual[u, 5.8e+221]], $MachinePrecision]], N[((-v) / u), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.2 \cdot 10^{+158} \lor \neg \left(u \leq 5.8 \cdot 10^{+221}\right):\\
\;\;\;\;\frac{-v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -1.20000000000000004e158 or 5.7999999999999996e221 < u Initial program 83.0%
associate-*l/83.4%
*-commutative83.4%
Simplified83.4%
neg-mul-183.4%
times-frac91.7%
Applied egg-rr91.7%
associate-*l/91.7%
mul-1-neg91.7%
Simplified91.7%
Taylor expanded in t1 around inf 57.7%
Taylor expanded in t1 around 0 51.6%
neg-mul-151.6%
distribute-neg-frac51.6%
Simplified51.6%
if -1.20000000000000004e158 < u < 5.7999999999999996e221Initial program 71.2%
associate-*l/74.7%
*-commutative74.7%
Simplified74.7%
Taylor expanded in t1 around inf 62.0%
associate-*r/62.0%
neg-mul-162.0%
Simplified62.0%
Final simplification60.2%
(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 73.3%
associate-/r*83.5%
associate-/l*97.2%
Simplified97.2%
Taylor expanded in t1 around inf 63.1%
neg-mul-163.1%
Simplified63.1%
Final simplification63.1%
(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 73.3%
associate-*l/76.3%
*-commutative76.3%
Simplified76.3%
Taylor expanded in t1 around inf 55.4%
associate-*r/55.4%
neg-mul-155.4%
Simplified55.4%
Final simplification55.4%
(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 73.3%
associate-*l/76.3%
*-commutative76.3%
Simplified76.3%
associate-/r*95.0%
associate-*r/97.2%
*-commutative97.2%
associate-/r/97.2%
div-inv97.1%
frac-2neg97.1%
frac-times80.8%
remove-double-neg80.8%
*-commutative80.8%
*-un-lft-identity80.8%
distribute-neg-frac80.8%
distribute-neg-in80.8%
add-sqr-sqrt42.8%
sqrt-unprod66.3%
sqr-neg66.3%
sqrt-unprod25.6%
add-sqr-sqrt60.0%
sub-neg60.0%
Applied egg-rr60.0%
Taylor expanded in t1 around inf 19.6%
Final simplification19.6%
herbie shell --seed 2023297
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))