
(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 (/ (/ (- v) (+ t1 u)) (+ (/ u t1) 1.0)))
double code(double u, double v, double t1) {
return (-v / (t1 + u)) / ((u / t1) + 1.0);
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-v / (t1 + u)) / ((u / t1) + 1.0d0)
end function
public static double code(double u, double v, double t1) {
return (-v / (t1 + u)) / ((u / t1) + 1.0);
}
def code(u, v, t1): return (-v / (t1 + u)) / ((u / t1) + 1.0)
function code(u, v, t1) return Float64(Float64(Float64(-v) / Float64(t1 + u)) / Float64(Float64(u / t1) + 1.0)) end
function tmp = code(u, v, t1) tmp = (-v / (t1 + u)) / ((u / t1) + 1.0); end
code[u_, v_, t1_] := N[(N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[(N[(u / t1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{-v}{t1 + u}}{\frac{u}{t1} + 1}
\end{array}
Initial program 75.0%
times-frac98.1%
neg-mul-198.1%
associate-/l*98.0%
associate-*l/98.1%
neg-mul-198.1%
distribute-frac-neg98.1%
+-commutative98.1%
remove-double-neg98.1%
unsub-neg98.1%
div-sub98.1%
sub-neg98.1%
distribute-frac-neg98.1%
remove-double-neg98.1%
*-inverses98.1%
Simplified98.1%
Final simplification98.1%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.7e-5) (not (<= u 1.15e+32))) (/ (* t1 (/ v (+ t1 u))) (- t1 u)) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.7e-5) || !(u <= 1.15e+32)) {
tmp = (t1 * (v / (t1 + u))) / (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 <= (-1.7d-5)) .or. (.not. (u <= 1.15d+32))) then
tmp = (t1 * (v / (t1 + u))) / (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 <= -1.7e-5) || !(u <= 1.15e+32)) {
tmp = (t1 * (v / (t1 + u))) / (t1 - u);
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.7e-5) or not (u <= 1.15e+32): tmp = (t1 * (v / (t1 + u))) / (t1 - u) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.7e-5) || !(u <= 1.15e+32)) tmp = Float64(Float64(t1 * Float64(v / Float64(t1 + u))) / 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 <= -1.7e-5) || ~((u <= 1.15e+32))) tmp = (t1 * (v / (t1 + u))) / (t1 - u); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.7e-5], N[Not[LessEqual[u, 1.15e+32]], $MachinePrecision]], N[(N[(t1 * N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t1 - u), $MachinePrecision]), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.7 \cdot 10^{-5} \lor \neg \left(u \leq 1.15 \cdot 10^{+32}\right):\\
\;\;\;\;\frac{t1 \cdot \frac{v}{t1 + u}}{t1 - u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -1.7e-5 or 1.15e32 < u Initial program 76.5%
times-frac99.1%
Simplified99.1%
frac-2neg99.1%
remove-double-neg99.1%
associate-*l/99.8%
distribute-neg-in99.8%
add-sqr-sqrt42.8%
sqrt-unprod85.0%
sqr-neg85.0%
sqrt-unprod48.4%
add-sqr-sqrt86.3%
sub-neg86.3%
Applied egg-rr86.3%
if -1.7e-5 < u < 1.15e32Initial program 73.8%
times-frac97.2%
Simplified97.2%
Taylor expanded in t1 around inf 78.4%
mul-1-neg78.4%
Simplified78.4%
Final simplification82.1%
(FPCore (u v t1) :precision binary64 (if (<= u -3.8e+68) (/ (/ t1 (/ u v)) (- t1 u)) (if (<= u 1.25e+56) (/ (- v) t1) (* (/ (- t1) (+ t1 u)) (/ v u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -3.8e+68) {
tmp = (t1 / (u / v)) / (t1 - u);
} else if (u <= 1.25e+56) {
tmp = -v / t1;
} else {
tmp = (-t1 / (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 (u <= (-3.8d+68)) then
tmp = (t1 / (u / v)) / (t1 - u)
else if (u <= 1.25d+56) then
tmp = -v / t1
else
tmp = (-t1 / (t1 + u)) * (v / u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -3.8e+68) {
tmp = (t1 / (u / v)) / (t1 - u);
} else if (u <= 1.25e+56) {
tmp = -v / t1;
} else {
tmp = (-t1 / (t1 + u)) * (v / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -3.8e+68: tmp = (t1 / (u / v)) / (t1 - u) elif u <= 1.25e+56: tmp = -v / t1 else: tmp = (-t1 / (t1 + u)) * (v / u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -3.8e+68) tmp = Float64(Float64(t1 / Float64(u / v)) / Float64(t1 - u)); elseif (u <= 1.25e+56) tmp = Float64(Float64(-v) / t1); else tmp = Float64(Float64(Float64(-t1) / Float64(t1 + u)) * Float64(v / u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -3.8e+68) tmp = (t1 / (u / v)) / (t1 - u); elseif (u <= 1.25e+56) tmp = -v / t1; else tmp = (-t1 / (t1 + u)) * (v / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -3.8e+68], N[(N[(t1 / N[(u / v), $MachinePrecision]), $MachinePrecision] / N[(t1 - u), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 1.25e+56], N[((-v) / t1), $MachinePrecision], N[(N[((-t1) / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.8 \cdot 10^{+68}:\\
\;\;\;\;\frac{\frac{t1}{\frac{u}{v}}}{t1 - u}\\
\mathbf{elif}\;u \leq 1.25 \cdot 10^{+56}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{-t1}{t1 + u} \cdot \frac{v}{u}\\
\end{array}
\end{array}
if u < -3.8000000000000001e68Initial program 66.4%
times-frac98.1%
Simplified98.1%
frac-2neg98.1%
remove-double-neg98.1%
associate-*l/99.8%
distribute-neg-in99.8%
add-sqr-sqrt39.2%
sqrt-unprod85.0%
sqr-neg85.0%
sqrt-unprod55.1%
add-sqr-sqrt90.5%
sub-neg90.5%
Applied egg-rr90.5%
Taylor expanded in t1 around 0 81.9%
associate-/l*90.7%
Simplified90.7%
if -3.8000000000000001e68 < u < 1.25000000000000006e56Initial program 75.4%
times-frac97.5%
Simplified97.5%
Taylor expanded in t1 around inf 75.8%
mul-1-neg75.8%
Simplified75.8%
if 1.25000000000000006e56 < u Initial program 82.6%
times-frac99.8%
Simplified99.8%
Taylor expanded in t1 around 0 85.1%
Final simplification80.6%
(FPCore (u v t1) :precision binary64 (if (<= u -3.9e+68) (/ (/ t1 (/ u v)) (- t1 u)) (if (<= u 1.25e+56) (/ (- v) t1) (/ (- (/ v u)) (+ (/ u t1) 1.0)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -3.9e+68) {
tmp = (t1 / (u / v)) / (t1 - u);
} else if (u <= 1.25e+56) {
tmp = -v / t1;
} else {
tmp = -(v / u) / ((u / t1) + 1.0);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-3.9d+68)) then
tmp = (t1 / (u / v)) / (t1 - u)
else if (u <= 1.25d+56) then
tmp = -v / t1
else
tmp = -(v / u) / ((u / t1) + 1.0d0)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -3.9e+68) {
tmp = (t1 / (u / v)) / (t1 - u);
} else if (u <= 1.25e+56) {
tmp = -v / t1;
} else {
tmp = -(v / u) / ((u / t1) + 1.0);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -3.9e+68: tmp = (t1 / (u / v)) / (t1 - u) elif u <= 1.25e+56: tmp = -v / t1 else: tmp = -(v / u) / ((u / t1) + 1.0) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -3.9e+68) tmp = Float64(Float64(t1 / Float64(u / v)) / Float64(t1 - u)); elseif (u <= 1.25e+56) tmp = Float64(Float64(-v) / t1); else tmp = Float64(Float64(-Float64(v / u)) / Float64(Float64(u / t1) + 1.0)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -3.9e+68) tmp = (t1 / (u / v)) / (t1 - u); elseif (u <= 1.25e+56) tmp = -v / t1; else tmp = -(v / u) / ((u / t1) + 1.0); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -3.9e+68], N[(N[(t1 / N[(u / v), $MachinePrecision]), $MachinePrecision] / N[(t1 - u), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 1.25e+56], N[((-v) / t1), $MachinePrecision], N[((-N[(v / u), $MachinePrecision]) / N[(N[(u / t1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.9 \cdot 10^{+68}:\\
\;\;\;\;\frac{\frac{t1}{\frac{u}{v}}}{t1 - u}\\
\mathbf{elif}\;u \leq 1.25 \cdot 10^{+56}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{-\frac{v}{u}}{\frac{u}{t1} + 1}\\
\end{array}
\end{array}
if u < -3.90000000000000019e68Initial program 66.4%
times-frac98.1%
Simplified98.1%
frac-2neg98.1%
remove-double-neg98.1%
associate-*l/99.8%
distribute-neg-in99.8%
add-sqr-sqrt39.2%
sqrt-unprod85.0%
sqr-neg85.0%
sqrt-unprod55.1%
add-sqr-sqrt90.5%
sub-neg90.5%
Applied egg-rr90.5%
Taylor expanded in t1 around 0 81.9%
associate-/l*90.7%
Simplified90.7%
if -3.90000000000000019e68 < u < 1.25000000000000006e56Initial program 75.4%
times-frac97.5%
Simplified97.5%
Taylor expanded in t1 around inf 75.8%
mul-1-neg75.8%
Simplified75.8%
if 1.25000000000000006e56 < u Initial program 82.6%
times-frac99.8%
neg-mul-199.8%
associate-/l*99.8%
associate-*l/99.9%
neg-mul-199.9%
distribute-frac-neg99.9%
+-commutative99.9%
remove-double-neg99.9%
unsub-neg99.9%
div-sub99.9%
sub-neg99.9%
distribute-frac-neg99.9%
remove-double-neg99.9%
*-inverses99.9%
Simplified99.9%
Taylor expanded in t1 around 0 85.2%
associate-*r/85.2%
neg-mul-185.2%
Simplified85.2%
Final simplification80.6%
(FPCore (u v t1) :precision binary64 (if (or (<= u -2.35e+86) (not (<= u 1.25e+56))) (* (- (/ v u)) (/ t1 u)) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.35e+86) || !(u <= 1.25e+56)) {
tmp = -(v / u) * (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 <= (-2.35d+86)) .or. (.not. (u <= 1.25d+56))) then
tmp = -(v / u) * (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 <= -2.35e+86) || !(u <= 1.25e+56)) {
tmp = -(v / u) * (t1 / u);
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -2.35e+86) or not (u <= 1.25e+56): tmp = -(v / u) * (t1 / u) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -2.35e+86) || !(u <= 1.25e+56)) tmp = Float64(Float64(-Float64(v / u)) * 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 <= -2.35e+86) || ~((u <= 1.25e+56))) tmp = -(v / u) * (t1 / u); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2.35e+86], N[Not[LessEqual[u, 1.25e+56]], $MachinePrecision]], N[((-N[(v / u), $MachinePrecision]) * N[(t1 / u), $MachinePrecision]), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.35 \cdot 10^{+86} \lor \neg \left(u \leq 1.25 \cdot 10^{+56}\right):\\
\;\;\;\;\left(-\frac{v}{u}\right) \cdot \frac{t1}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -2.3500000000000001e86 or 1.25000000000000006e56 < u Initial program 73.5%
times-frac98.9%
Simplified98.9%
Taylor expanded in t1 around 0 87.4%
Taylor expanded in t1 around 0 87.2%
mul-1-neg87.2%
distribute-neg-frac87.2%
Simplified87.2%
if -2.3500000000000001e86 < u < 1.25000000000000006e56Initial program 76.0%
times-frac97.5%
Simplified97.5%
Taylor expanded in t1 around inf 75.8%
mul-1-neg75.8%
Simplified75.8%
Final simplification80.2%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.8e-5) (not (<= u 1.25e+56))) (/ (/ (- t1) u) (/ u v)) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.8e-5) || !(u <= 1.25e+56)) {
tmp = (-t1 / u) / (u / v);
} 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.8d-5)) .or. (.not. (u <= 1.25d+56))) then
tmp = (-t1 / u) / (u / v)
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.8e-5) || !(u <= 1.25e+56)) {
tmp = (-t1 / u) / (u / v);
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.8e-5) or not (u <= 1.25e+56): tmp = (-t1 / u) / (u / v) else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.8e-5) || !(u <= 1.25e+56)) tmp = Float64(Float64(Float64(-t1) / u) / Float64(u / v)); else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -1.8e-5) || ~((u <= 1.25e+56))) tmp = (-t1 / u) / (u / v); else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.8e-5], N[Not[LessEqual[u, 1.25e+56]], $MachinePrecision]], N[(N[((-t1) / u), $MachinePrecision] / N[(u / v), $MachinePrecision]), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.8 \cdot 10^{-5} \lor \neg \left(u \leq 1.25 \cdot 10^{+56}\right):\\
\;\;\;\;\frac{\frac{-t1}{u}}{\frac{u}{v}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -1.80000000000000005e-5 or 1.25000000000000006e56 < u Initial program 76.3%
times-frac99.0%
Simplified99.0%
Taylor expanded in t1 around 0 82.8%
frac-2neg82.8%
clear-num83.2%
frac-times80.6%
remove-double-neg80.6%
*-commutative80.6%
*-un-lft-identity80.6%
distribute-neg-in80.6%
add-sqr-sqrt33.9%
sqrt-unprod78.8%
sqr-neg78.8%
sqrt-unprod46.5%
add-sqr-sqrt80.2%
sub-neg80.2%
Applied egg-rr80.2%
associate-/r*83.1%
Simplified83.1%
Taylor expanded in t1 around 0 83.2%
mul-1-neg83.2%
distribute-neg-frac83.2%
Simplified83.2%
if -1.80000000000000005e-5 < u < 1.25000000000000006e56Initial program 74.0%
times-frac97.3%
Simplified97.3%
Taylor expanded in t1 around inf 77.8%
mul-1-neg77.8%
Simplified77.8%
Final simplification80.2%
(FPCore (u v t1) :precision binary64 (if (<= u -3.8e+68) (/ (/ t1 (/ u v)) (- t1 u)) (if (<= u 3.5e+56) (/ (- v) t1) (/ (/ (- t1) u) (/ u v)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -3.8e+68) {
tmp = (t1 / (u / v)) / (t1 - u);
} else if (u <= 3.5e+56) {
tmp = -v / t1;
} else {
tmp = (-t1 / u) / (u / v);
}
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.8d+68)) then
tmp = (t1 / (u / v)) / (t1 - u)
else if (u <= 3.5d+56) then
tmp = -v / t1
else
tmp = (-t1 / u) / (u / v)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -3.8e+68) {
tmp = (t1 / (u / v)) / (t1 - u);
} else if (u <= 3.5e+56) {
tmp = -v / t1;
} else {
tmp = (-t1 / u) / (u / v);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -3.8e+68: tmp = (t1 / (u / v)) / (t1 - u) elif u <= 3.5e+56: tmp = -v / t1 else: tmp = (-t1 / u) / (u / v) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -3.8e+68) tmp = Float64(Float64(t1 / Float64(u / v)) / Float64(t1 - u)); elseif (u <= 3.5e+56) tmp = Float64(Float64(-v) / t1); else tmp = Float64(Float64(Float64(-t1) / u) / Float64(u / v)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -3.8e+68) tmp = (t1 / (u / v)) / (t1 - u); elseif (u <= 3.5e+56) tmp = -v / t1; else tmp = (-t1 / u) / (u / v); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -3.8e+68], N[(N[(t1 / N[(u / v), $MachinePrecision]), $MachinePrecision] / N[(t1 - u), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 3.5e+56], N[((-v) / t1), $MachinePrecision], N[(N[((-t1) / u), $MachinePrecision] / N[(u / v), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.8 \cdot 10^{+68}:\\
\;\;\;\;\frac{\frac{t1}{\frac{u}{v}}}{t1 - u}\\
\mathbf{elif}\;u \leq 3.5 \cdot 10^{+56}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{-t1}{u}}{\frac{u}{v}}\\
\end{array}
\end{array}
if u < -3.8000000000000001e68Initial program 66.4%
times-frac98.1%
Simplified98.1%
frac-2neg98.1%
remove-double-neg98.1%
associate-*l/99.8%
distribute-neg-in99.8%
add-sqr-sqrt39.2%
sqrt-unprod85.0%
sqr-neg85.0%
sqrt-unprod55.1%
add-sqr-sqrt90.5%
sub-neg90.5%
Applied egg-rr90.5%
Taylor expanded in t1 around 0 81.9%
associate-/l*90.7%
Simplified90.7%
if -3.8000000000000001e68 < u < 3.49999999999999999e56Initial program 75.4%
times-frac97.5%
Simplified97.5%
Taylor expanded in t1 around inf 75.8%
mul-1-neg75.8%
Simplified75.8%
if 3.49999999999999999e56 < u Initial program 82.6%
times-frac99.8%
Simplified99.8%
Taylor expanded in t1 around 0 85.1%
frac-2neg85.1%
clear-num85.1%
frac-times82.5%
remove-double-neg82.5%
*-commutative82.5%
*-un-lft-identity82.5%
distribute-neg-in82.5%
add-sqr-sqrt35.7%
sqrt-unprod80.3%
sqr-neg80.3%
sqrt-unprod46.2%
add-sqr-sqrt81.9%
sub-neg81.9%
Applied egg-rr81.9%
associate-/r*84.6%
Simplified84.6%
Taylor expanded in t1 around 0 84.9%
mul-1-neg84.9%
distribute-neg-frac84.9%
Simplified84.9%
Final simplification80.6%
(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 75.0%
times-frac98.1%
Simplified98.1%
Final simplification98.1%
(FPCore (u v t1) :precision binary64 (if (or (<= u -3.3e+87) (not (<= u 8.5e+89))) (/ t1 (/ u (/ v u))) (/ (- v) (+ t1 u))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.3e+87) || !(u <= 8.5e+89)) {
tmp = t1 / (u / (v / u));
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-3.3d+87)) .or. (.not. (u <= 8.5d+89))) then
tmp = t1 / (u / (v / u))
else
tmp = -v / (t1 + u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.3e+87) || !(u <= 8.5e+89)) {
tmp = t1 / (u / (v / u));
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -3.3e+87) or not (u <= 8.5e+89): tmp = t1 / (u / (v / u)) else: tmp = -v / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -3.3e+87) || !(u <= 8.5e+89)) tmp = Float64(t1 / Float64(u / Float64(v / u))); else tmp = Float64(Float64(-v) / Float64(t1 + u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -3.3e+87) || ~((u <= 8.5e+89))) tmp = t1 / (u / (v / u)); else tmp = -v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -3.3e+87], N[Not[LessEqual[u, 8.5e+89]], $MachinePrecision]], N[(t1 / N[(u / N[(v / u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.3 \cdot 10^{+87} \lor \neg \left(u \leq 8.5 \cdot 10^{+89}\right):\\
\;\;\;\;\frac{t1}{\frac{u}{\frac{v}{u}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\end{array}
\end{array}
if u < -3.3000000000000001e87 or 8.50000000000000045e89 < u Initial program 71.2%
times-frac98.8%
Simplified98.8%
Taylor expanded in t1 around 0 89.3%
Taylor expanded in t1 around 0 89.2%
mul-1-neg89.2%
distribute-neg-frac89.2%
Simplified89.2%
associate-*l/90.3%
associate-/l*84.1%
add-sqr-sqrt31.5%
sqrt-unprod61.0%
sqr-neg61.0%
sqrt-unprod41.1%
add-sqr-sqrt62.9%
Applied egg-rr62.9%
if -3.3000000000000001e87 < u < 8.50000000000000045e89Initial program 77.1%
times-frac97.7%
Simplified97.7%
Taylor expanded in t1 around inf 75.1%
Taylor expanded in v around 0 74.5%
associate-*r/74.5%
neg-mul-174.5%
+-commutative74.5%
Simplified74.5%
Final simplification70.4%
(FPCore (u v t1) :precision binary64 (if (<= u -3.2e+145) (/ v u) (if (<= u 8.6e+131) (/ (- v) t1) (/ v (+ t1 u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -3.2e+145) {
tmp = v / u;
} else if (u <= 8.6e+131) {
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 <= (-3.2d+145)) then
tmp = v / u
else if (u <= 8.6d+131) 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 <= -3.2e+145) {
tmp = v / u;
} else if (u <= 8.6e+131) {
tmp = -v / t1;
} else {
tmp = v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -3.2e+145: tmp = v / u elif u <= 8.6e+131: tmp = -v / t1 else: tmp = v / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -3.2e+145) tmp = Float64(v / u); elseif (u <= 8.6e+131) 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 <= -3.2e+145) tmp = v / u; elseif (u <= 8.6e+131) tmp = -v / t1; else tmp = v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -3.2e+145], N[(v / u), $MachinePrecision], If[LessEqual[u, 8.6e+131], N[((-v) / t1), $MachinePrecision], N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.2 \cdot 10^{+145}:\\
\;\;\;\;\frac{v}{u}\\
\mathbf{elif}\;u \leq 8.6 \cdot 10^{+131}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{t1 + u}\\
\end{array}
\end{array}
if u < -3.20000000000000008e145Initial program 60.0%
times-frac97.4%
Simplified97.4%
Taylor expanded in t1 around inf 51.8%
frac-2neg51.8%
frac-2neg51.8%
frac-times41.9%
remove-double-neg41.9%
distribute-neg-in41.9%
add-sqr-sqrt8.9%
sqrt-unprod41.9%
sqr-neg41.9%
sqrt-unprod33.0%
add-sqr-sqrt41.9%
sub-neg41.9%
add-sqr-sqrt8.9%
sqrt-unprod39.3%
sqr-neg39.3%
sqrt-unprod33.2%
add-sqr-sqrt41.8%
Applied egg-rr41.8%
distribute-rgt-neg-out41.8%
*-commutative41.8%
distribute-frac-neg41.8%
times-frac47.3%
*-inverses47.3%
associate-*r/47.3%
metadata-eval47.3%
associate-*r*47.3%
*-commutative47.3%
associate-*r*47.3%
*-commutative47.3%
associate-*l*47.3%
metadata-eval47.3%
*-rgt-identity47.3%
distribute-frac-neg47.3%
Simplified47.3%
Taylor expanded in t1 around 0 42.5%
if -3.20000000000000008e145 < u < 8.6000000000000003e131Initial program 77.5%
times-frac97.9%
Simplified97.9%
Taylor expanded in t1 around inf 70.6%
mul-1-neg70.6%
Simplified70.6%
if 8.6000000000000003e131 < u Initial program 78.6%
times-frac99.9%
Simplified99.9%
Taylor expanded in t1 around inf 58.2%
expm1-log1p-u57.7%
expm1-udef66.8%
frac-times69.6%
associate-/l*70.2%
add-sqr-sqrt28.8%
sqrt-unprod63.5%
sqr-neg63.5%
sqrt-unprod41.5%
add-sqr-sqrt70.3%
*-commutative70.3%
Applied egg-rr70.3%
expm1-def52.4%
expm1-log1p52.4%
associate-/l*51.7%
*-commutative51.7%
*-commutative51.7%
times-frac49.6%
*-inverses49.6%
*-rgt-identity49.6%
+-commutative49.6%
Simplified49.6%
Final simplification63.8%
(FPCore (u v t1) :precision binary64 (if (or (<= u -2.9e+145) (not (<= u 1.4e+162))) (/ v u) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.9e+145) || !(u <= 1.4e+162)) {
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 <= (-2.9d+145)) .or. (.not. (u <= 1.4d+162))) 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 <= -2.9e+145) || !(u <= 1.4e+162)) {
tmp = v / u;
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -2.9e+145) or not (u <= 1.4e+162): tmp = v / u else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -2.9e+145) || !(u <= 1.4e+162)) 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 <= -2.9e+145) || ~((u <= 1.4e+162))) tmp = v / u; else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2.9e+145], N[Not[LessEqual[u, 1.4e+162]], $MachinePrecision]], N[(v / u), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.9 \cdot 10^{+145} \lor \neg \left(u \leq 1.4 \cdot 10^{+162}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -2.9000000000000001e145 or 1.39999999999999995e162 < u Initial program 66.6%
times-frac98.5%
Simplified98.5%
Taylor expanded in t1 around inf 56.3%
frac-2neg56.3%
frac-2neg56.3%
frac-times47.4%
remove-double-neg47.4%
distribute-neg-in47.4%
add-sqr-sqrt14.5%
sqrt-unprod47.4%
sqr-neg47.4%
sqrt-unprod33.0%
add-sqr-sqrt47.4%
sub-neg47.4%
add-sqr-sqrt14.5%
sqrt-unprod36.7%
sqr-neg36.7%
sqrt-unprod33.1%
add-sqr-sqrt47.4%
Applied egg-rr47.4%
distribute-rgt-neg-out47.4%
*-commutative47.4%
distribute-frac-neg47.4%
times-frac51.0%
*-inverses51.0%
associate-*r/51.0%
metadata-eval51.0%
associate-*r*51.0%
*-commutative51.0%
associate-*r*51.0%
*-commutative51.0%
associate-*l*51.0%
metadata-eval51.0%
*-rgt-identity51.0%
distribute-frac-neg51.0%
Simplified51.0%
Taylor expanded in t1 around 0 46.7%
if -2.9000000000000001e145 < u < 1.39999999999999995e162Initial program 78.0%
times-frac97.9%
Simplified97.9%
Taylor expanded in t1 around inf 69.7%
mul-1-neg69.7%
Simplified69.7%
Final simplification63.8%
(FPCore (u v t1) :precision binary64 (if (<= u -6.4e+145) (/ v u) (if (<= u 9e+159) (/ (- v) t1) (- (/ v u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -6.4e+145) {
tmp = v / u;
} else if (u <= 9e+159) {
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 <= (-6.4d+145)) then
tmp = v / u
else if (u <= 9d+159) 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 <= -6.4e+145) {
tmp = v / u;
} else if (u <= 9e+159) {
tmp = -v / t1;
} else {
tmp = -(v / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -6.4e+145: tmp = v / u elif u <= 9e+159: tmp = -v / t1 else: tmp = -(v / u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -6.4e+145) tmp = Float64(v / u); elseif (u <= 9e+159) tmp = Float64(Float64(-v) / t1); else tmp = Float64(-Float64(v / u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -6.4e+145) tmp = v / u; elseif (u <= 9e+159) tmp = -v / t1; else tmp = -(v / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -6.4e+145], N[(v / u), $MachinePrecision], If[LessEqual[u, 9e+159], N[((-v) / t1), $MachinePrecision], (-N[(v / u), $MachinePrecision])]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -6.4 \cdot 10^{+145}:\\
\;\;\;\;\frac{v}{u}\\
\mathbf{elif}\;u \leq 9 \cdot 10^{+159}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;-\frac{v}{u}\\
\end{array}
\end{array}
if u < -6.40000000000000015e145Initial program 60.0%
times-frac97.4%
Simplified97.4%
Taylor expanded in t1 around inf 51.8%
frac-2neg51.8%
frac-2neg51.8%
frac-times41.9%
remove-double-neg41.9%
distribute-neg-in41.9%
add-sqr-sqrt8.9%
sqrt-unprod41.9%
sqr-neg41.9%
sqrt-unprod33.0%
add-sqr-sqrt41.9%
sub-neg41.9%
add-sqr-sqrt8.9%
sqrt-unprod39.3%
sqr-neg39.3%
sqrt-unprod33.2%
add-sqr-sqrt41.8%
Applied egg-rr41.8%
distribute-rgt-neg-out41.8%
*-commutative41.8%
distribute-frac-neg41.8%
times-frac47.3%
*-inverses47.3%
associate-*r/47.3%
metadata-eval47.3%
associate-*r*47.3%
*-commutative47.3%
associate-*r*47.3%
*-commutative47.3%
associate-*l*47.3%
metadata-eval47.3%
*-rgt-identity47.3%
distribute-frac-neg47.3%
Simplified47.3%
Taylor expanded in t1 around 0 42.5%
if -6.40000000000000015e145 < u < 9.00000000000000053e159Initial program 78.0%
times-frac97.9%
Simplified97.9%
Taylor expanded in t1 around inf 69.7%
mul-1-neg69.7%
Simplified69.7%
if 9.00000000000000053e159 < u Initial program 75.5%
times-frac99.8%
Simplified99.8%
Taylor expanded in t1 around inf 62.3%
Taylor expanded in t1 around 0 52.5%
associate-*r/52.5%
neg-mul-152.5%
Simplified52.5%
Final simplification63.8%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -9.2e+23) (not (<= t1 3.5e+69))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -9.2e+23) || !(t1 <= 3.5e+69)) {
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 ((t1 <= (-9.2d+23)) .or. (.not. (t1 <= 3.5d+69))) 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 ((t1 <= -9.2e+23) || !(t1 <= 3.5e+69)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -9.2e+23) or not (t1 <= 3.5e+69): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -9.2e+23) || !(t1 <= 3.5e+69)) tmp = Float64(v / t1); else tmp = Float64(v / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -9.2e+23) || ~((t1 <= 3.5e+69))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -9.2e+23], N[Not[LessEqual[t1, 3.5e+69]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -9.2 \cdot 10^{+23} \lor \neg \left(t1 \leq 3.5 \cdot 10^{+69}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -9.2000000000000002e23 or 3.49999999999999987e69 < t1 Initial program 59.0%
times-frac99.9%
Simplified99.9%
Taylor expanded in t1 around inf 83.3%
Taylor expanded in u around inf 34.7%
if -9.2000000000000002e23 < t1 < 3.49999999999999987e69Initial program 86.1%
times-frac96.8%
Simplified96.8%
Taylor expanded in t1 around inf 55.9%
frac-2neg55.9%
frac-2neg55.9%
frac-times54.7%
remove-double-neg54.7%
distribute-neg-in54.7%
add-sqr-sqrt24.1%
sqrt-unprod40.5%
sqr-neg40.5%
sqrt-unprod16.3%
add-sqr-sqrt23.2%
sub-neg23.2%
add-sqr-sqrt6.8%
sqrt-unprod25.8%
sqr-neg25.8%
sqrt-unprod29.1%
add-sqr-sqrt53.4%
Applied egg-rr53.4%
distribute-rgt-neg-out53.4%
*-commutative53.4%
distribute-frac-neg53.4%
times-frac51.0%
*-inverses51.0%
associate-*r/51.0%
metadata-eval51.0%
associate-*r*51.0%
*-commutative51.0%
associate-*r*51.0%
*-commutative51.0%
associate-*l*51.0%
metadata-eval51.0%
*-rgt-identity51.0%
distribute-frac-neg51.0%
Simplified51.0%
Taylor expanded in t1 around 0 20.6%
Final simplification26.4%
(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 75.0%
times-frac98.1%
Simplified98.1%
Taylor expanded in t1 around inf 67.4%
Taylor expanded in v around 0 65.3%
associate-*r/65.3%
neg-mul-165.3%
+-commutative65.3%
Simplified65.3%
Final simplification65.3%
(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 75.0%
times-frac98.1%
Simplified98.1%
Taylor expanded in t1 around inf 67.4%
frac-2neg67.4%
frac-2neg67.4%
frac-times54.3%
remove-double-neg54.3%
distribute-neg-in54.3%
add-sqr-sqrt25.5%
sqrt-unprod42.4%
sqr-neg42.4%
sqrt-unprod16.7%
add-sqr-sqrt28.3%
sub-neg28.3%
add-sqr-sqrt11.6%
sqrt-unprod33.5%
sqr-neg33.5%
sqrt-unprod27.8%
add-sqr-sqrt53.5%
Applied egg-rr53.5%
distribute-rgt-neg-out53.5%
*-commutative53.5%
distribute-frac-neg53.5%
times-frac64.4%
*-inverses64.4%
associate-*r/64.4%
metadata-eval64.4%
associate-*r*64.4%
*-commutative64.4%
associate-*r*64.4%
*-commutative64.4%
associate-*l*64.4%
metadata-eval64.4%
*-rgt-identity64.4%
distribute-frac-neg64.4%
Simplified64.4%
frac-2neg64.4%
div-inv64.3%
remove-double-neg64.3%
Applied egg-rr64.3%
associate-*r/64.4%
*-rgt-identity64.4%
neg-sub064.4%
associate--r-64.4%
neg-sub064.4%
+-commutative64.4%
sub-neg64.4%
Simplified64.4%
Final simplification64.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 75.0%
times-frac98.1%
Simplified98.1%
Taylor expanded in t1 around inf 59.2%
Taylor expanded in u around inf 15.8%
Final simplification15.8%
herbie shell --seed 2023299
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))