
(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 16 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.8%
associate-/r*83.9%
associate-/l*98.6%
Simplified98.6%
Final simplification98.6%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (* v (/ (- t1) (* (+ t1 u) (+ t1 u))))))
(if (<= t1 -1.4e+154)
(/ (- (/ u (/ t1 v)) v) (+ t1 u))
(if (<= t1 -3.6e-147)
t_1
(if (<= t1 2.4e-162)
(* (/ (- v) u) (/ t1 u))
(if (<= t1 1.5e+126) t_1 (/ (- v) (+ t1 u))))))))
double code(double u, double v, double t1) {
double t_1 = v * (-t1 / ((t1 + u) * (t1 + u)));
double tmp;
if (t1 <= -1.4e+154) {
tmp = ((u / (t1 / v)) - v) / (t1 + u);
} else if (t1 <= -3.6e-147) {
tmp = t_1;
} else if (t1 <= 2.4e-162) {
tmp = (-v / u) * (t1 / u);
} else if (t1 <= 1.5e+126) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = v * (-t1 / ((t1 + u) * (t1 + u)))
if (t1 <= (-1.4d+154)) then
tmp = ((u / (t1 / v)) - v) / (t1 + u)
else if (t1 <= (-3.6d-147)) then
tmp = t_1
else if (t1 <= 2.4d-162) then
tmp = (-v / u) * (t1 / u)
else if (t1 <= 1.5d+126) then
tmp = t_1
else
tmp = -v / (t1 + u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = v * (-t1 / ((t1 + u) * (t1 + u)));
double tmp;
if (t1 <= -1.4e+154) {
tmp = ((u / (t1 / v)) - v) / (t1 + u);
} else if (t1 <= -3.6e-147) {
tmp = t_1;
} else if (t1 <= 2.4e-162) {
tmp = (-v / u) * (t1 / u);
} else if (t1 <= 1.5e+126) {
tmp = t_1;
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): t_1 = v * (-t1 / ((t1 + u) * (t1 + u))) tmp = 0 if t1 <= -1.4e+154: tmp = ((u / (t1 / v)) - v) / (t1 + u) elif t1 <= -3.6e-147: tmp = t_1 elif t1 <= 2.4e-162: tmp = (-v / u) * (t1 / u) elif t1 <= 1.5e+126: tmp = t_1 else: tmp = -v / (t1 + u) return tmp
function code(u, v, t1) t_1 = Float64(v * Float64(Float64(-t1) / Float64(Float64(t1 + u) * Float64(t1 + u)))) tmp = 0.0 if (t1 <= -1.4e+154) tmp = Float64(Float64(Float64(u / Float64(t1 / v)) - v) / Float64(t1 + u)); elseif (t1 <= -3.6e-147) tmp = t_1; elseif (t1 <= 2.4e-162) tmp = Float64(Float64(Float64(-v) / u) * Float64(t1 / u)); elseif (t1 <= 1.5e+126) tmp = t_1; else tmp = Float64(Float64(-v) / Float64(t1 + u)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = v * (-t1 / ((t1 + u) * (t1 + u))); tmp = 0.0; if (t1 <= -1.4e+154) tmp = ((u / (t1 / v)) - v) / (t1 + u); elseif (t1 <= -3.6e-147) tmp = t_1; elseif (t1 <= 2.4e-162) tmp = (-v / u) * (t1 / u); elseif (t1 <= 1.5e+126) tmp = t_1; else tmp = -v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(v * N[((-t1) / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -1.4e+154], N[(N[(N[(u / N[(t1 / v), $MachinePrecision]), $MachinePrecision] - v), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, -3.6e-147], t$95$1, If[LessEqual[t1, 2.4e-162], N[(N[((-v) / u), $MachinePrecision] * N[(t1 / u), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 1.5e+126], t$95$1, N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := v \cdot \frac{-t1}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\
\mathbf{if}\;t1 \leq -1.4 \cdot 10^{+154}:\\
\;\;\;\;\frac{\frac{u}{\frac{t1}{v}} - v}{t1 + u}\\
\mathbf{elif}\;t1 \leq -3.6 \cdot 10^{-147}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t1 \leq 2.4 \cdot 10^{-162}:\\
\;\;\;\;\frac{-v}{u} \cdot \frac{t1}{u}\\
\mathbf{elif}\;t1 \leq 1.5 \cdot 10^{+126}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\end{array}
\end{array}
if t1 < -1.4e154Initial program 39.6%
associate-/r*74.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in t1 around inf 78.3%
neg-mul-178.3%
+-commutative78.3%
unsub-neg78.3%
associate-/l*89.3%
Simplified89.3%
if -1.4e154 < t1 < -3.60000000000000012e-147 or 2.4000000000000002e-162 < t1 < 1.5000000000000001e126Initial program 87.1%
associate-*l/95.0%
*-commutative95.0%
Simplified95.0%
if -3.60000000000000012e-147 < t1 < 2.4000000000000002e-162Initial program 73.4%
associate-*l/71.9%
*-commutative71.9%
Simplified71.9%
Taylor expanded in t1 around 0 71.9%
associate-*r/71.9%
neg-mul-171.9%
unpow271.9%
Simplified71.9%
Taylor expanded in v around 0 73.4%
unpow273.4%
*-commutative73.4%
times-frac85.0%
associate-*r*85.0%
associate-*r/85.0%
neg-mul-185.0%
Simplified85.0%
if 1.5000000000000001e126 < t1 Initial program 48.5%
associate-/r*68.5%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in t1 around inf 91.7%
neg-mul-191.7%
Simplified91.7%
Final simplification91.6%
(FPCore (u v t1) :precision binary64 (if (<= u -1.05e-56) (/ (* t1 (/ v u)) (- t1 u)) (if (<= u 2.25e-60) (/ (- v) t1) (* (/ t1 u) (/ (- v) (+ t1 u))))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.05e-56) {
tmp = (t1 * (v / u)) / (t1 - u);
} else if (u <= 2.25e-60) {
tmp = -v / t1;
} else {
tmp = (t1 / u) * (-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.05d-56)) then
tmp = (t1 * (v / u)) / (t1 - u)
else if (u <= 2.25d-60) then
tmp = -v / t1
else
tmp = (t1 / u) * (-v / (t1 + u))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -1.05e-56) {
tmp = (t1 * (v / u)) / (t1 - u);
} else if (u <= 2.25e-60) {
tmp = -v / t1;
} else {
tmp = (t1 / u) * (-v / (t1 + u));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.05e-56: tmp = (t1 * (v / u)) / (t1 - u) elif u <= 2.25e-60: tmp = -v / t1 else: tmp = (t1 / u) * (-v / (t1 + u)) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.05e-56) tmp = Float64(Float64(t1 * Float64(v / u)) / Float64(t1 - u)); elseif (u <= 2.25e-60) tmp = Float64(Float64(-v) / t1); else tmp = Float64(Float64(t1 / u) * Float64(Float64(-v) / Float64(t1 + u))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -1.05e-56) tmp = (t1 * (v / u)) / (t1 - u); elseif (u <= 2.25e-60) tmp = -v / t1; else tmp = (t1 / u) * (-v / (t1 + u)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.05e-56], N[(N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision] / N[(t1 - u), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 2.25e-60], N[((-v) / t1), $MachinePrecision], N[(N[(t1 / u), $MachinePrecision] * N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.05 \cdot 10^{-56}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{u}}{t1 - u}\\
\mathbf{elif}\;u \leq 2.25 \cdot 10^{-60}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{u} \cdot \frac{-v}{t1 + u}\\
\end{array}
\end{array}
if u < -1.05000000000000003e-56Initial program 75.6%
associate-/r*88.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in t1 around 0 74.2%
mul-1-neg74.2%
associate-/l*77.7%
distribute-neg-frac77.7%
Simplified77.7%
frac-2neg77.7%
div-inv77.6%
distribute-neg-frac77.6%
remove-double-neg77.6%
div-inv77.6%
clear-num77.1%
distribute-neg-in77.1%
add-sqr-sqrt41.1%
sqrt-unprod74.4%
sqr-neg74.4%
sqrt-unprod36.4%
add-sqr-sqrt77.1%
sub-neg77.1%
Applied egg-rr77.1%
associate-*r/77.1%
*-rgt-identity77.1%
Simplified77.1%
if -1.05000000000000003e-56 < u < 2.25e-60Initial program 65.5%
associate-*l/75.8%
*-commutative75.8%
Simplified75.8%
Taylor expanded in t1 around inf 87.5%
associate-*r/87.5%
neg-mul-187.5%
Simplified87.5%
if 2.25e-60 < u Initial program 82.5%
associate-/r*87.8%
associate-/l*98.6%
Simplified98.6%
Taylor expanded in t1 around 0 74.3%
mul-1-neg74.3%
associate-/l*75.9%
distribute-neg-frac75.9%
Simplified75.9%
Taylor expanded in v around 0 73.1%
mul-1-neg73.1%
times-frac83.3%
distribute-rgt-neg-in83.3%
distribute-neg-frac83.3%
Simplified83.3%
Final simplification82.7%
(FPCore (u v t1) :precision binary64 (if (<= u -1.7e-56) (/ (/ (- t1) (/ u v)) (+ t1 u)) (if (<= u 4.6e-63) (/ (- v) t1) (* (/ t1 u) (/ (- v) (+ t1 u))))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.7e-56) {
tmp = (-t1 / (u / v)) / (t1 + u);
} else if (u <= 4.6e-63) {
tmp = -v / t1;
} else {
tmp = (t1 / u) * (-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.7d-56)) then
tmp = (-t1 / (u / v)) / (t1 + u)
else if (u <= 4.6d-63) then
tmp = -v / t1
else
tmp = (t1 / u) * (-v / (t1 + u))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -1.7e-56) {
tmp = (-t1 / (u / v)) / (t1 + u);
} else if (u <= 4.6e-63) {
tmp = -v / t1;
} else {
tmp = (t1 / u) * (-v / (t1 + u));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.7e-56: tmp = (-t1 / (u / v)) / (t1 + u) elif u <= 4.6e-63: tmp = -v / t1 else: tmp = (t1 / u) * (-v / (t1 + u)) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.7e-56) tmp = Float64(Float64(Float64(-t1) / Float64(u / v)) / Float64(t1 + u)); elseif (u <= 4.6e-63) tmp = Float64(Float64(-v) / t1); else tmp = Float64(Float64(t1 / u) * Float64(Float64(-v) / Float64(t1 + u))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -1.7e-56) tmp = (-t1 / (u / v)) / (t1 + u); elseif (u <= 4.6e-63) tmp = -v / t1; else tmp = (t1 / u) * (-v / (t1 + u)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.7e-56], N[(N[((-t1) / N[(u / v), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 4.6e-63], N[((-v) / t1), $MachinePrecision], N[(N[(t1 / u), $MachinePrecision] * N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.7 \cdot 10^{-56}:\\
\;\;\;\;\frac{\frac{-t1}{\frac{u}{v}}}{t1 + u}\\
\mathbf{elif}\;u \leq 4.6 \cdot 10^{-63}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{u} \cdot \frac{-v}{t1 + u}\\
\end{array}
\end{array}
if u < -1.69999999999999991e-56Initial program 75.6%
associate-/r*88.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in t1 around 0 74.2%
mul-1-neg74.2%
associate-/l*77.7%
distribute-neg-frac77.7%
Simplified77.7%
if -1.69999999999999991e-56 < u < 4.6e-63Initial program 65.5%
associate-*l/75.8%
*-commutative75.8%
Simplified75.8%
Taylor expanded in t1 around inf 87.5%
associate-*r/87.5%
neg-mul-187.5%
Simplified87.5%
if 4.6e-63 < u Initial program 82.5%
associate-/r*87.8%
associate-/l*98.6%
Simplified98.6%
Taylor expanded in t1 around 0 74.3%
mul-1-neg74.3%
associate-/l*75.9%
distribute-neg-frac75.9%
Simplified75.9%
Taylor expanded in v around 0 73.1%
mul-1-neg73.1%
times-frac83.3%
distribute-rgt-neg-in83.3%
distribute-neg-frac83.3%
Simplified83.3%
Final simplification82.9%
(FPCore (u v t1) :precision binary64 (if (<= t1 -1.05e+17) (/ (- v) (+ t1 u)) (if (<= t1 4.6e-16) (* t1 (/ (/ (- v) u) u)) (/ v (- u t1)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1.05e+17) {
tmp = -v / (t1 + u);
} else if (t1 <= 4.6e-16) {
tmp = t1 * ((-v / u) / u);
} else {
tmp = v / (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 <= (-1.05d+17)) then
tmp = -v / (t1 + u)
else if (t1 <= 4.6d-16) then
tmp = t1 * ((-v / u) / u)
else
tmp = v / (u - t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1.05e+17) {
tmp = -v / (t1 + u);
} else if (t1 <= 4.6e-16) {
tmp = t1 * ((-v / u) / u);
} else {
tmp = v / (u - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -1.05e+17: tmp = -v / (t1 + u) elif t1 <= 4.6e-16: tmp = t1 * ((-v / u) / u) else: tmp = v / (u - t1) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -1.05e+17) tmp = Float64(Float64(-v) / Float64(t1 + u)); elseif (t1 <= 4.6e-16) tmp = Float64(t1 * Float64(Float64(Float64(-v) / u) / u)); else tmp = Float64(v / Float64(u - t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -1.05e+17) tmp = -v / (t1 + u); elseif (t1 <= 4.6e-16) tmp = t1 * ((-v / u) / u); else tmp = v / (u - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -1.05e+17], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 4.6e-16], N[(t1 * N[(N[((-v) / u), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.05 \cdot 10^{+17}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\mathbf{elif}\;t1 \leq 4.6 \cdot 10^{-16}:\\
\;\;\;\;t1 \cdot \frac{\frac{-v}{u}}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u - t1}\\
\end{array}
\end{array}
if t1 < -1.05e17Initial program 51.0%
associate-/r*73.6%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in t1 around inf 83.3%
neg-mul-183.3%
Simplified83.3%
if -1.05e17 < t1 < 4.5999999999999998e-16Initial program 83.6%
associate-*l/85.8%
*-commutative85.8%
Simplified85.8%
neg-mul-185.8%
times-frac94.6%
Applied egg-rr94.6%
associate-*l/94.7%
mul-1-neg94.7%
Simplified94.7%
Taylor expanded in t1 around 0 73.5%
associate-*r/75.4%
unpow275.4%
associate-/l/77.5%
neg-mul-177.5%
distribute-rgt-neg-in77.5%
distribute-neg-frac77.5%
distribute-neg-frac77.5%
Simplified77.5%
if 4.5999999999999998e-16 < t1 Initial program 70.8%
associate-*l/77.0%
*-commutative77.0%
Simplified77.0%
neg-mul-177.0%
times-frac98.2%
Applied egg-rr98.2%
associate-*l/98.2%
mul-1-neg98.2%
Simplified98.2%
Taylor expanded in t1 around inf 83.7%
*-commutative83.7%
associate-*l/84.0%
metadata-eval84.0%
neg-mul-184.0%
frac-2neg84.0%
frac-2neg84.0%
remove-double-neg84.0%
add-sqr-sqrt39.1%
sqrt-unprod42.1%
sqr-neg42.1%
sqrt-unprod11.1%
add-sqr-sqrt25.4%
distribute-neg-in25.4%
add-sqr-sqrt0.0%
sqrt-unprod65.7%
sqr-neg65.7%
sqrt-unprod83.6%
add-sqr-sqrt84.1%
sub-neg84.1%
Applied egg-rr84.1%
neg-sub084.1%
associate--r-84.1%
neg-sub084.1%
Simplified84.1%
Final simplification80.4%
(FPCore (u v t1) :precision binary64 (if (<= t1 -6.9e+16) (/ (- v) (+ t1 u)) (if (<= t1 2.7e-15) (* (/ (- v) u) (/ t1 u)) (/ v (- u t1)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -6.9e+16) {
tmp = -v / (t1 + u);
} else if (t1 <= 2.7e-15) {
tmp = (-v / u) * (t1 / u);
} else {
tmp = v / (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 <= (-6.9d+16)) then
tmp = -v / (t1 + u)
else if (t1 <= 2.7d-15) then
tmp = (-v / u) * (t1 / u)
else
tmp = v / (u - t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -6.9e+16) {
tmp = -v / (t1 + u);
} else if (t1 <= 2.7e-15) {
tmp = (-v / u) * (t1 / u);
} else {
tmp = v / (u - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -6.9e+16: tmp = -v / (t1 + u) elif t1 <= 2.7e-15: tmp = (-v / u) * (t1 / u) else: tmp = v / (u - t1) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -6.9e+16) tmp = Float64(Float64(-v) / Float64(t1 + u)); elseif (t1 <= 2.7e-15) tmp = Float64(Float64(Float64(-v) / u) * Float64(t1 / u)); else tmp = Float64(v / Float64(u - t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -6.9e+16) tmp = -v / (t1 + u); elseif (t1 <= 2.7e-15) tmp = (-v / u) * (t1 / u); else tmp = v / (u - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -6.9e+16], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 2.7e-15], N[(N[((-v) / u), $MachinePrecision] * N[(t1 / u), $MachinePrecision]), $MachinePrecision], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -6.9 \cdot 10^{+16}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\mathbf{elif}\;t1 \leq 2.7 \cdot 10^{-15}:\\
\;\;\;\;\frac{-v}{u} \cdot \frac{t1}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u - t1}\\
\end{array}
\end{array}
if t1 < -6.9e16Initial program 51.0%
associate-/r*73.6%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in t1 around inf 83.3%
neg-mul-183.3%
Simplified83.3%
if -6.9e16 < t1 < 2.70000000000000009e-15Initial program 83.6%
associate-*l/85.8%
*-commutative85.8%
Simplified85.8%
Taylor expanded in t1 around 0 72.3%
associate-*r/72.3%
neg-mul-172.3%
unpow272.3%
Simplified72.3%
Taylor expanded in v around 0 73.5%
unpow273.5%
*-commutative73.5%
times-frac79.8%
associate-*r*79.8%
associate-*r/79.8%
neg-mul-179.8%
Simplified79.8%
if 2.70000000000000009e-15 < t1 Initial program 70.8%
associate-*l/77.0%
*-commutative77.0%
Simplified77.0%
neg-mul-177.0%
times-frac98.2%
Applied egg-rr98.2%
associate-*l/98.2%
mul-1-neg98.2%
Simplified98.2%
Taylor expanded in t1 around inf 83.7%
*-commutative83.7%
associate-*l/84.0%
metadata-eval84.0%
neg-mul-184.0%
frac-2neg84.0%
frac-2neg84.0%
remove-double-neg84.0%
add-sqr-sqrt39.1%
sqrt-unprod42.1%
sqr-neg42.1%
sqrt-unprod11.1%
add-sqr-sqrt25.4%
distribute-neg-in25.4%
add-sqr-sqrt0.0%
sqrt-unprod65.7%
sqr-neg65.7%
sqrt-unprod83.6%
add-sqr-sqrt84.1%
sub-neg84.1%
Applied egg-rr84.1%
neg-sub084.1%
associate--r-84.1%
neg-sub084.1%
Simplified84.1%
Final simplification81.7%
(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.8%
associate-*l/78.5%
*-commutative78.5%
Simplified78.5%
neg-mul-178.5%
times-frac95.8%
Applied egg-rr95.8%
associate-*l/95.9%
mul-1-neg95.9%
Simplified95.9%
Final simplification95.9%
(FPCore (u v t1) :precision binary64 (if (or (<= u -5.6e+32) (not (<= u 4.8e+48))) (* t1 (/ v (* u u))) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -5.6e+32) || !(u <= 4.8e+48)) {
tmp = t1 * (v / (u * 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 <= (-5.6d+32)) .or. (.not. (u <= 4.8d+48))) then
tmp = t1 * (v / (u * 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 <= -5.6e+32) || !(u <= 4.8e+48)) {
tmp = t1 * (v / (u * u));
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -5.6e+32) or not (u <= 4.8e+48): tmp = t1 * (v / (u * u)) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -5.6e+32) || !(u <= 4.8e+48)) tmp = Float64(t1 * Float64(v / Float64(u * u))); else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -5.6e+32) || ~((u <= 4.8e+48))) tmp = t1 * (v / (u * u)); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -5.6e+32], N[Not[LessEqual[u, 4.8e+48]], $MachinePrecision]], N[(t1 * N[(v / N[(u * u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -5.6 \cdot 10^{+32} \lor \neg \left(u \leq 4.8 \cdot 10^{+48}\right):\\
\;\;\;\;t1 \cdot \frac{v}{u \cdot u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -5.6e32 or 4.8000000000000002e48 < u Initial program 79.3%
associate-*l/78.1%
*-commutative78.1%
Simplified78.1%
Taylor expanded in t1 around 0 75.5%
mul-1-neg75.5%
associate-/l*80.0%
distribute-neg-frac80.0%
unpow280.0%
Simplified80.0%
expm1-log1p-u79.8%
expm1-udef68.2%
div-inv68.2%
add-sqr-sqrt27.4%
sqrt-unprod57.0%
sqr-neg57.0%
sqrt-unprod39.9%
add-sqr-sqrt67.3%
clear-num67.3%
associate-/r*67.2%
Applied egg-rr67.2%
expm1-def66.9%
expm1-log1p67.0%
associate-/l/67.1%
Simplified67.1%
if -5.6e32 < u < 4.8000000000000002e48Initial program 69.5%
associate-*l/78.9%
*-commutative78.9%
Simplified78.9%
Taylor expanded in t1 around inf 72.4%
associate-*r/72.4%
neg-mul-172.4%
Simplified72.4%
Final simplification70.1%
(FPCore (u v t1) :precision binary64 (if (<= u -6.5e+136) (/ -1.0 (/ u v)) (if (<= u 1.7e+119) (/ (- v) t1) (/ v (+ t1 u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -6.5e+136) {
tmp = -1.0 / (u / v);
} else if (u <= 1.7e+119) {
tmp = -v / 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 <= (-6.5d+136)) then
tmp = (-1.0d0) / (u / v)
else if (u <= 1.7d+119) then
tmp = -v / 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 <= -6.5e+136) {
tmp = -1.0 / (u / v);
} else if (u <= 1.7e+119) {
tmp = -v / t1;
} else {
tmp = v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -6.5e+136: tmp = -1.0 / (u / v) elif u <= 1.7e+119: tmp = -v / t1 else: tmp = v / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -6.5e+136) tmp = Float64(-1.0 / Float64(u / v)); elseif (u <= 1.7e+119) tmp = Float64(Float64(-v) / t1); else tmp = Float64(v / Float64(t1 + u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -6.5e+136) tmp = -1.0 / (u / v); elseif (u <= 1.7e+119) tmp = -v / t1; else tmp = v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -6.5e+136], N[(-1.0 / N[(u / v), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 1.7e+119], N[((-v) / t1), $MachinePrecision], N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -6.5 \cdot 10^{+136}:\\
\;\;\;\;\frac{-1}{\frac{u}{v}}\\
\mathbf{elif}\;u \leq 1.7 \cdot 10^{+119}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{t1 + u}\\
\end{array}
\end{array}
if u < -6.4999999999999998e136Initial program 74.2%
associate-*l/76.8%
*-commutative76.8%
Simplified76.8%
neg-mul-176.8%
times-frac95.7%
Applied egg-rr95.7%
associate-*l/95.7%
mul-1-neg95.7%
Simplified95.7%
Taylor expanded in t1 around inf 51.1%
Taylor expanded in t1 around 0 41.5%
*-commutative41.5%
associate-*l/41.5%
associate-/l*45.3%
Applied egg-rr45.3%
if -6.4999999999999998e136 < u < 1.70000000000000007e119Initial program 71.0%
associate-*l/78.8%
*-commutative78.8%
Simplified78.8%
Taylor expanded in t1 around inf 64.9%
associate-*r/64.9%
neg-mul-164.9%
Simplified64.9%
if 1.70000000000000007e119 < u Initial program 86.5%
associate-/r*91.7%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t1 around inf 52.5%
neg-mul-152.5%
Simplified52.5%
expm1-log1p-u49.6%
expm1-udef76.3%
add-sqr-sqrt42.5%
sqrt-unprod76.0%
sqr-neg76.0%
sqrt-unprod33.8%
add-sqr-sqrt76.3%
Applied egg-rr76.3%
expm1-def47.2%
expm1-log1p47.3%
Simplified47.3%
Final simplification59.0%
(FPCore (u v t1) :precision binary64 (if (<= u -9.5e+224) (/ v u) (if (<= u 1.2e+119) (/ (- v) t1) (/ v u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -9.5e+224) {
tmp = v / u;
} else if (u <= 1.2e+119) {
tmp = -v / t1;
} else {
tmp = 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 (u <= (-9.5d+224)) then
tmp = v / u
else if (u <= 1.2d+119) then
tmp = -v / t1
else
tmp = v / u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -9.5e+224) {
tmp = v / u;
} else if (u <= 1.2e+119) {
tmp = -v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -9.5e+224: tmp = v / u elif u <= 1.2e+119: tmp = -v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -9.5e+224) tmp = Float64(v / u); elseif (u <= 1.2e+119) tmp = Float64(Float64(-v) / t1); else tmp = Float64(v / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -9.5e+224) tmp = v / u; elseif (u <= 1.2e+119) tmp = -v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -9.5e+224], N[(v / u), $MachinePrecision], If[LessEqual[u, 1.2e+119], N[((-v) / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -9.5 \cdot 10^{+224}:\\
\;\;\;\;\frac{v}{u}\\
\mathbf{elif}\;u \leq 1.2 \cdot 10^{+119}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if u < -9.5000000000000002e224 or 1.2e119 < u Initial program 87.0%
associate-*l/82.8%
*-commutative82.8%
Simplified82.8%
neg-mul-182.8%
times-frac89.2%
Applied egg-rr89.2%
associate-*l/89.3%
mul-1-neg89.3%
Simplified89.3%
Taylor expanded in t1 around inf 52.2%
associate-*r/52.2%
*-commutative52.2%
metadata-eval52.2%
neg-mul-152.2%
add-sqr-sqrt28.8%
sqrt-unprod49.1%
sqr-neg49.1%
sqrt-unprod23.4%
add-sqr-sqrt49.0%
clear-num50.2%
Applied egg-rr50.2%
Taylor expanded in t1 around 0 47.6%
if -9.5000000000000002e224 < u < 1.2e119Initial program 69.8%
associate-*l/77.3%
*-commutative77.3%
Simplified77.3%
Taylor expanded in t1 around inf 61.6%
associate-*r/61.6%
neg-mul-161.6%
Simplified61.6%
Final simplification58.4%
(FPCore (u v t1) :precision binary64 (if (<= u -7.5e+216) (/ (- v) u) (if (<= u 2.6e+116) (/ (- v) t1) (/ v u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -7.5e+216) {
tmp = -v / u;
} else if (u <= 2.6e+116) {
tmp = -v / t1;
} else {
tmp = 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 (u <= (-7.5d+216)) then
tmp = -v / u
else if (u <= 2.6d+116) then
tmp = -v / t1
else
tmp = v / u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -7.5e+216) {
tmp = -v / u;
} else if (u <= 2.6e+116) {
tmp = -v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -7.5e+216: tmp = -v / u elif u <= 2.6e+116: tmp = -v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -7.5e+216) tmp = Float64(Float64(-v) / u); elseif (u <= 2.6e+116) tmp = Float64(Float64(-v) / t1); else tmp = Float64(v / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -7.5e+216) tmp = -v / u; elseif (u <= 2.6e+116) tmp = -v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -7.5e+216], N[((-v) / u), $MachinePrecision], If[LessEqual[u, 2.6e+116], N[((-v) / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -7.5 \cdot 10^{+216}:\\
\;\;\;\;\frac{-v}{u}\\
\mathbf{elif}\;u \leq 2.6 \cdot 10^{+116}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if u < -7.4999999999999994e216Initial program 84.4%
associate-/r*99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t1 around inf 50.0%
neg-mul-150.0%
Simplified50.0%
Taylor expanded in t1 around 0 50.0%
neg-mul-150.0%
distribute-neg-frac50.0%
Simplified50.0%
if -7.4999999999999994e216 < u < 2.59999999999999987e116Initial program 70.1%
associate-*l/77.6%
*-commutative77.6%
Simplified77.6%
Taylor expanded in t1 around inf 61.9%
associate-*r/61.9%
neg-mul-161.9%
Simplified61.9%
if 2.59999999999999987e116 < u Initial program 86.5%
associate-*l/79.7%
*-commutative79.7%
Simplified79.7%
neg-mul-179.7%
times-frac87.6%
Applied egg-rr87.6%
associate-*l/87.7%
mul-1-neg87.7%
Simplified87.7%
Taylor expanded in t1 around inf 52.5%
associate-*r/52.5%
*-commutative52.5%
metadata-eval52.5%
neg-mul-152.5%
add-sqr-sqrt34.3%
sqrt-unprod47.5%
sqr-neg47.5%
sqrt-unprod18.2%
add-sqr-sqrt47.3%
clear-num47.3%
Applied egg-rr47.3%
Taylor expanded in t1 around 0 45.1%
Final simplification58.4%
(FPCore (u v t1) :precision binary64 (if (<= u -9e+136) (/ -1.0 (/ u v)) (if (<= u 2.3e+118) (/ (- v) t1) (/ v u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -9e+136) {
tmp = -1.0 / (u / v);
} else if (u <= 2.3e+118) {
tmp = -v / t1;
} else {
tmp = 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 (u <= (-9d+136)) then
tmp = (-1.0d0) / (u / v)
else if (u <= 2.3d+118) then
tmp = -v / t1
else
tmp = v / u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -9e+136) {
tmp = -1.0 / (u / v);
} else if (u <= 2.3e+118) {
tmp = -v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -9e+136: tmp = -1.0 / (u / v) elif u <= 2.3e+118: tmp = -v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -9e+136) tmp = Float64(-1.0 / Float64(u / v)); elseif (u <= 2.3e+118) tmp = Float64(Float64(-v) / t1); else tmp = Float64(v / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -9e+136) tmp = -1.0 / (u / v); elseif (u <= 2.3e+118) tmp = -v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -9e+136], N[(-1.0 / N[(u / v), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 2.3e+118], N[((-v) / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -9 \cdot 10^{+136}:\\
\;\;\;\;\frac{-1}{\frac{u}{v}}\\
\mathbf{elif}\;u \leq 2.3 \cdot 10^{+118}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if u < -8.9999999999999999e136Initial program 74.2%
associate-*l/76.8%
*-commutative76.8%
Simplified76.8%
neg-mul-176.8%
times-frac95.7%
Applied egg-rr95.7%
associate-*l/95.7%
mul-1-neg95.7%
Simplified95.7%
Taylor expanded in t1 around inf 51.1%
Taylor expanded in t1 around 0 41.5%
*-commutative41.5%
associate-*l/41.5%
associate-/l*45.3%
Applied egg-rr45.3%
if -8.9999999999999999e136 < u < 2.30000000000000016e118Initial program 71.0%
associate-*l/78.8%
*-commutative78.8%
Simplified78.8%
Taylor expanded in t1 around inf 64.9%
associate-*r/64.9%
neg-mul-164.9%
Simplified64.9%
if 2.30000000000000016e118 < u Initial program 86.5%
associate-*l/79.7%
*-commutative79.7%
Simplified79.7%
neg-mul-179.7%
times-frac87.6%
Applied egg-rr87.6%
associate-*l/87.7%
mul-1-neg87.7%
Simplified87.7%
Taylor expanded in t1 around inf 52.5%
associate-*r/52.5%
*-commutative52.5%
metadata-eval52.5%
neg-mul-152.5%
add-sqr-sqrt34.3%
sqrt-unprod47.5%
sqr-neg47.5%
sqrt-unprod18.2%
add-sqr-sqrt47.3%
clear-num47.3%
Applied egg-rr47.3%
Taylor expanded in t1 around 0 45.1%
Final simplification58.7%
(FPCore (u v t1) :precision binary64 (if (<= t1 -2.5e+142) (/ v t1) (if (<= t1 9e+175) (/ v u) (/ v t1))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -2.5e+142) {
tmp = v / t1;
} else if (t1 <= 9e+175) {
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 (t1 <= (-2.5d+142)) then
tmp = v / t1
else if (t1 <= 9d+175) 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 (t1 <= -2.5e+142) {
tmp = v / t1;
} else if (t1 <= 9e+175) {
tmp = v / u;
} else {
tmp = v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -2.5e+142: tmp = v / t1 elif t1 <= 9e+175: tmp = v / u else: tmp = v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -2.5e+142) tmp = Float64(v / t1); elseif (t1 <= 9e+175) tmp = Float64(v / u); else tmp = Float64(v / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -2.5e+142) tmp = v / t1; elseif (t1 <= 9e+175) tmp = v / u; else tmp = v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -2.5e+142], N[(v / t1), $MachinePrecision], If[LessEqual[t1, 9e+175], N[(v / u), $MachinePrecision], N[(v / t1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2.5 \cdot 10^{+142}:\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{elif}\;t1 \leq 9 \cdot 10^{+175}:\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{t1}\\
\end{array}
\end{array}
if t1 < -2.5000000000000001e142 or 8.99999999999999979e175 < t1 Initial program 44.2%
associate-*l/45.3%
*-commutative45.3%
Simplified45.3%
neg-mul-145.3%
times-frac97.9%
Applied egg-rr97.9%
associate-*l/97.9%
mul-1-neg97.9%
Simplified97.9%
Taylor expanded in t1 around inf 92.3%
associate-*r/92.6%
*-commutative92.6%
metadata-eval92.6%
neg-mul-192.6%
add-sqr-sqrt47.9%
sqrt-unprod59.1%
sqr-neg59.1%
sqrt-unprod22.0%
add-sqr-sqrt42.6%
clear-num42.6%
Applied egg-rr42.6%
Taylor expanded in t1 around inf 42.5%
if -2.5000000000000001e142 < t1 < 8.99999999999999979e175Initial program 81.3%
associate-*l/87.0%
*-commutative87.0%
Simplified87.0%
neg-mul-187.0%
times-frac95.3%
Applied egg-rr95.3%
associate-*l/95.3%
mul-1-neg95.3%
Simplified95.3%
Taylor expanded in t1 around inf 52.6%
associate-*r/52.8%
*-commutative52.8%
metadata-eval52.8%
neg-mul-152.8%
add-sqr-sqrt23.7%
sqrt-unprod29.8%
sqr-neg29.8%
sqrt-unprod8.6%
add-sqr-sqrt18.4%
clear-num19.0%
Applied egg-rr19.0%
Taylor expanded in t1 around 0 20.5%
Final simplification25.0%
(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.8%
associate-/r*83.9%
associate-/l*98.6%
Simplified98.6%
Taylor expanded in t1 around inf 60.9%
neg-mul-160.9%
Simplified60.9%
Final simplification60.9%
(FPCore (u v t1) :precision binary64 (/ v (- u t1)))
double code(double u, double v, double t1) {
return v / (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 / (u - t1)
end function
public static double code(double u, double v, double t1) {
return v / (u - t1);
}
def code(u, v, t1): return v / (u - t1)
function code(u, v, t1) return Float64(v / Float64(u - t1)) end
function tmp = code(u, v, t1) tmp = v / (u - t1); end
code[u_, v_, t1_] := N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{u - t1}
\end{array}
Initial program 73.8%
associate-*l/78.5%
*-commutative78.5%
Simplified78.5%
neg-mul-178.5%
times-frac95.8%
Applied egg-rr95.8%
associate-*l/95.9%
mul-1-neg95.9%
Simplified95.9%
Taylor expanded in t1 around inf 60.7%
*-commutative60.7%
associate-*l/60.9%
metadata-eval60.9%
neg-mul-160.9%
frac-2neg60.9%
frac-2neg60.9%
remove-double-neg60.9%
add-sqr-sqrt28.6%
sqrt-unprod35.8%
sqr-neg35.8%
sqrt-unprod11.3%
add-sqr-sqrt23.3%
distribute-neg-in23.3%
add-sqr-sqrt11.7%
sqrt-unprod38.6%
sqr-neg38.6%
sqrt-unprod32.4%
add-sqr-sqrt60.6%
sub-neg60.6%
Applied egg-rr60.6%
neg-sub060.6%
associate--r-60.6%
neg-sub060.6%
Simplified60.6%
Final simplification60.6%
(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.8%
associate-*l/78.5%
*-commutative78.5%
Simplified78.5%
neg-mul-178.5%
times-frac95.8%
Applied egg-rr95.8%
associate-*l/95.9%
mul-1-neg95.9%
Simplified95.9%
Taylor expanded in t1 around inf 60.7%
associate-*r/60.9%
*-commutative60.9%
metadata-eval60.9%
neg-mul-160.9%
add-sqr-sqrt28.6%
sqrt-unprod35.8%
sqr-neg35.8%
sqrt-unprod11.3%
add-sqr-sqrt23.3%
clear-num23.8%
Applied egg-rr23.8%
Taylor expanded in t1 around inf 12.0%
Final simplification12.0%
herbie shell --seed 2023293
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))