
(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) (- (- u) t1)))
double code(double u, double v, double t1) {
return ((t1 / (t1 + u)) * 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 = ((t1 / (t1 + u)) * v) / (-u - t1)
end function
public static double code(double u, double v, double t1) {
return ((t1 / (t1 + u)) * v) / (-u - t1);
}
def code(u, v, t1): return ((t1 / (t1 + u)) * v) / (-u - t1)
function code(u, v, t1) return Float64(Float64(Float64(t1 / Float64(t1 + u)) * v) / Float64(Float64(-u) - t1)) end
function tmp = code(u, v, t1) tmp = ((t1 / (t1 + u)) * v) / (-u - t1); end
code[u_, v_, t1_] := N[(N[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * v), $MachinePrecision] / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{t1}{t1 + u} \cdot v}{\left(-u\right) - t1}
\end{array}
Initial program 74.0%
times-frac97.9%
distribute-frac-neg97.9%
distribute-neg-frac297.9%
+-commutative97.9%
distribute-neg-in97.9%
unsub-neg97.9%
Simplified97.9%
frac-2neg97.9%
frac-2neg97.9%
frac-times74.0%
sub-neg74.0%
distribute-neg-in74.0%
+-commutative74.0%
remove-double-neg74.0%
frac-times97.9%
associate-*r/98.5%
add-sqr-sqrt50.3%
sqrt-unprod42.9%
sqr-neg42.9%
sqrt-unprod20.1%
add-sqr-sqrt38.4%
add-sqr-sqrt17.9%
sqrt-unprod58.1%
Applied egg-rr98.5%
Final simplification98.5%
(FPCore (u v t1)
:precision binary64
(if (<= t1 -4.2e+74)
(/ v (- t1))
(if (<= t1 6.5e+104)
(* t1 (/ (/ v (+ t1 u)) (- (- u) t1)))
(/ v (- (- t1) (* u 2.0))))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -4.2e+74) {
tmp = v / -t1;
} else if (t1 <= 6.5e+104) {
tmp = t1 * ((v / (t1 + u)) / (-u - t1));
} else {
tmp = v / (-t1 - (u * 2.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 (t1 <= (-4.2d+74)) then
tmp = v / -t1
else if (t1 <= 6.5d+104) then
tmp = t1 * ((v / (t1 + u)) / (-u - t1))
else
tmp = v / (-t1 - (u * 2.0d0))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -4.2e+74) {
tmp = v / -t1;
} else if (t1 <= 6.5e+104) {
tmp = t1 * ((v / (t1 + u)) / (-u - t1));
} else {
tmp = v / (-t1 - (u * 2.0));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -4.2e+74: tmp = v / -t1 elif t1 <= 6.5e+104: tmp = t1 * ((v / (t1 + u)) / (-u - t1)) else: tmp = v / (-t1 - (u * 2.0)) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -4.2e+74) tmp = Float64(v / Float64(-t1)); elseif (t1 <= 6.5e+104) tmp = Float64(t1 * Float64(Float64(v / Float64(t1 + u)) / Float64(Float64(-u) - t1))); else tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -4.2e+74) tmp = v / -t1; elseif (t1 <= 6.5e+104) tmp = t1 * ((v / (t1 + u)) / (-u - t1)); else tmp = v / (-t1 - (u * 2.0)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -4.2e+74], N[(v / (-t1)), $MachinePrecision], If[LessEqual[t1, 6.5e+104], N[(t1 * N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -4.2 \cdot 10^{+74}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{elif}\;t1 \leq 6.5 \cdot 10^{+104}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{t1 + u}}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\end{array}
\end{array}
if t1 < -4.1999999999999998e74Initial program 43.8%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in t1 around inf 93.6%
associate-*r/93.6%
neg-mul-193.6%
Simplified93.6%
if -4.1999999999999998e74 < t1 < 6.5000000000000005e104Initial program 84.5%
associate-/l*84.7%
distribute-lft-neg-out84.7%
distribute-rgt-neg-in84.7%
associate-/r*90.6%
distribute-neg-frac290.6%
Simplified90.6%
if 6.5000000000000005e104 < t1 Initial program 61.9%
times-frac100.0%
distribute-frac-neg100.0%
distribute-neg-frac2100.0%
+-commutative100.0%
distribute-neg-in100.0%
unsub-neg100.0%
Simplified100.0%
clear-num100.0%
frac-2neg100.0%
frac-times97.7%
*-un-lft-identity97.7%
+-commutative97.7%
distribute-neg-in97.7%
sub-neg97.7%
frac-2neg97.7%
sub-neg97.7%
distribute-neg-in97.7%
+-commutative97.7%
remove-double-neg97.7%
add-sqr-sqrt0.0%
sqrt-unprod6.1%
sqr-neg6.1%
sqrt-unprod52.8%
add-sqr-sqrt52.8%
sub-neg52.8%
distribute-neg-in52.8%
+-commutative52.8%
add-sqr-sqrt2.4%
sqrt-unprod67.3%
Applied egg-rr97.7%
Taylor expanded in u around 0 93.5%
*-commutative93.5%
Simplified93.5%
Final simplification91.6%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -4.8e+43) (not (<= t1 1.8e+38))) (/ v (- (- t1) (* u 2.0))) (/ (/ v (- 1.0 (/ u t1))) u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -4.8e+43) || !(t1 <= 1.8e+38)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = (v / (1.0 - (u / t1))) / u;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-4.8d+43)) .or. (.not. (t1 <= 1.8d+38))) then
tmp = v / (-t1 - (u * 2.0d0))
else
tmp = (v / (1.0d0 - (u / t1))) / u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -4.8e+43) || !(t1 <= 1.8e+38)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = (v / (1.0 - (u / t1))) / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -4.8e+43) or not (t1 <= 1.8e+38): tmp = v / (-t1 - (u * 2.0)) else: tmp = (v / (1.0 - (u / t1))) / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -4.8e+43) || !(t1 <= 1.8e+38)) tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); else tmp = Float64(Float64(v / Float64(1.0 - Float64(u / t1))) / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -4.8e+43) || ~((t1 <= 1.8e+38))) tmp = v / (-t1 - (u * 2.0)); else tmp = (v / (1.0 - (u / t1))) / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -4.8e+43], N[Not[LessEqual[t1, 1.8e+38]], $MachinePrecision]], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(v / N[(1.0 - N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -4.8 \cdot 10^{+43} \lor \neg \left(t1 \leq 1.8 \cdot 10^{+38}\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{v}{1 - \frac{u}{t1}}}{u}\\
\end{array}
\end{array}
if t1 < -4.80000000000000046e43 or 1.79999999999999985e38 < t1 Initial program 58.8%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
clear-num99.9%
frac-2neg99.9%
frac-times98.2%
*-un-lft-identity98.2%
+-commutative98.2%
distribute-neg-in98.2%
sub-neg98.2%
frac-2neg98.2%
sub-neg98.2%
distribute-neg-in98.2%
+-commutative98.2%
remove-double-neg98.2%
add-sqr-sqrt48.4%
sqrt-unprod24.3%
sqr-neg24.3%
sqrt-unprod23.1%
add-sqr-sqrt35.1%
sub-neg35.1%
distribute-neg-in35.1%
+-commutative35.1%
add-sqr-sqrt12.7%
sqrt-unprod49.3%
Applied egg-rr98.2%
Taylor expanded in u around 0 90.2%
*-commutative90.2%
Simplified90.2%
if -4.80000000000000046e43 < t1 < 1.79999999999999985e38Initial program 85.2%
Taylor expanded in t1 around 0 68.7%
*-un-lft-identity68.7%
associate-/l*68.8%
add-sqr-sqrt37.5%
sqrt-unprod48.7%
sqr-neg48.7%
sqrt-unprod19.5%
add-sqr-sqrt42.7%
associate-/r*43.4%
frac-2neg43.4%
add-sqr-sqrt18.7%
sqrt-unprod47.0%
sqr-neg47.0%
sqrt-unprod40.7%
add-sqr-sqrt73.8%
distribute-neg-in73.8%
add-sqr-sqrt40.2%
sqrt-unprod75.3%
sqr-neg75.3%
sqrt-unprod34.4%
add-sqr-sqrt75.4%
sub-neg75.4%
Applied egg-rr75.4%
*-lft-identity75.4%
*-commutative75.4%
associate-*l/78.7%
associate-/r/78.1%
div-sub78.1%
*-inverses78.1%
Simplified78.1%
Final simplification83.3%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -2.8e+43) (not (<= t1 1.4e+38))) (/ v (- (- t1) (* u 2.0))) (* (/ v (- u)) (/ t1 u))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -2.8e+43) || !(t1 <= 1.4e+38)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = (v / -u) * (t1 / u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-2.8d+43)) .or. (.not. (t1 <= 1.4d+38))) then
tmp = v / (-t1 - (u * 2.0d0))
else
tmp = (v / -u) * (t1 / u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -2.8e+43) || !(t1 <= 1.4e+38)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = (v / -u) * (t1 / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -2.8e+43) or not (t1 <= 1.4e+38): tmp = v / (-t1 - (u * 2.0)) else: tmp = (v / -u) * (t1 / u) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -2.8e+43) || !(t1 <= 1.4e+38)) tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); else tmp = Float64(Float64(v / Float64(-u)) * Float64(t1 / u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -2.8e+43) || ~((t1 <= 1.4e+38))) tmp = v / (-t1 - (u * 2.0)); else tmp = (v / -u) * (t1 / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -2.8e+43], N[Not[LessEqual[t1, 1.4e+38]], $MachinePrecision]], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(v / (-u)), $MachinePrecision] * N[(t1 / u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2.8 \cdot 10^{+43} \lor \neg \left(t1 \leq 1.4 \cdot 10^{+38}\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-u} \cdot \frac{t1}{u}\\
\end{array}
\end{array}
if t1 < -2.80000000000000019e43 or 1.4e38 < t1 Initial program 58.8%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
clear-num99.9%
frac-2neg99.9%
frac-times98.2%
*-un-lft-identity98.2%
+-commutative98.2%
distribute-neg-in98.2%
sub-neg98.2%
frac-2neg98.2%
sub-neg98.2%
distribute-neg-in98.2%
+-commutative98.2%
remove-double-neg98.2%
add-sqr-sqrt48.4%
sqrt-unprod24.3%
sqr-neg24.3%
sqrt-unprod23.1%
add-sqr-sqrt35.1%
sub-neg35.1%
distribute-neg-in35.1%
+-commutative35.1%
add-sqr-sqrt12.7%
sqrt-unprod49.3%
Applied egg-rr98.2%
Taylor expanded in u around 0 90.2%
*-commutative90.2%
Simplified90.2%
if -2.80000000000000019e43 < t1 < 1.4e38Initial program 85.2%
Taylor expanded in t1 around 0 68.7%
*-commutative68.7%
times-frac76.2%
frac-2neg76.2%
add-sqr-sqrt35.0%
sqrt-unprod48.3%
sqr-neg48.3%
sqrt-unprod24.8%
add-sqr-sqrt43.5%
distribute-neg-in43.5%
add-sqr-sqrt23.9%
sqrt-unprod41.9%
sqr-neg41.9%
sqrt-unprod18.6%
add-sqr-sqrt41.8%
sub-neg41.8%
add-sqr-sqrt23.2%
sqrt-unprod54.0%
sqr-neg54.0%
sqrt-unprod35.8%
add-sqr-sqrt77.8%
Applied egg-rr77.8%
Taylor expanded in t1 around 0 78.0%
neg-mul-178.0%
distribute-neg-frac278.0%
Simplified78.0%
Final simplification83.2%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -5.5e+43) (not (<= t1 6.6e+37))) (/ v (- (- u) t1)) (* (/ v (- u)) (/ t1 u))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -5.5e+43) || !(t1 <= 6.6e+37)) {
tmp = v / (-u - t1);
} else {
tmp = (v / -u) * (t1 / u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-5.5d+43)) .or. (.not. (t1 <= 6.6d+37))) then
tmp = v / (-u - t1)
else
tmp = (v / -u) * (t1 / u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -5.5e+43) || !(t1 <= 6.6e+37)) {
tmp = v / (-u - t1);
} else {
tmp = (v / -u) * (t1 / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -5.5e+43) or not (t1 <= 6.6e+37): tmp = v / (-u - t1) else: tmp = (v / -u) * (t1 / u) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -5.5e+43) || !(t1 <= 6.6e+37)) tmp = Float64(v / Float64(Float64(-u) - t1)); else tmp = Float64(Float64(v / Float64(-u)) * Float64(t1 / u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -5.5e+43) || ~((t1 <= 6.6e+37))) tmp = v / (-u - t1); else tmp = (v / -u) * (t1 / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -5.5e+43], N[Not[LessEqual[t1, 6.6e+37]], $MachinePrecision]], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], N[(N[(v / (-u)), $MachinePrecision] * N[(t1 / u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -5.5 \cdot 10^{+43} \lor \neg \left(t1 \leq 6.6 \cdot 10^{+37}\right):\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-u} \cdot \frac{t1}{u}\\
\end{array}
\end{array}
if t1 < -5.49999999999999989e43 or 6.6000000000000002e37 < t1 Initial program 58.8%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
frac-2neg99.9%
frac-2neg99.9%
frac-times58.8%
sub-neg58.8%
distribute-neg-in58.8%
+-commutative58.8%
remove-double-neg58.8%
frac-times99.9%
associate-*r/99.9%
add-sqr-sqrt49.2%
sqrt-unprod25.1%
sqr-neg25.1%
sqrt-unprod23.1%
add-sqr-sqrt35.0%
add-sqr-sqrt12.7%
sqrt-unprod49.3%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 89.6%
mul-1-neg89.6%
Simplified89.6%
if -5.49999999999999989e43 < t1 < 6.6000000000000002e37Initial program 85.2%
Taylor expanded in t1 around 0 68.7%
*-commutative68.7%
times-frac76.2%
frac-2neg76.2%
add-sqr-sqrt35.0%
sqrt-unprod48.3%
sqr-neg48.3%
sqrt-unprod24.8%
add-sqr-sqrt43.5%
distribute-neg-in43.5%
add-sqr-sqrt23.9%
sqrt-unprod41.9%
sqr-neg41.9%
sqrt-unprod18.6%
add-sqr-sqrt41.8%
sub-neg41.8%
add-sqr-sqrt23.2%
sqrt-unprod54.0%
sqr-neg54.0%
sqrt-unprod35.8%
add-sqr-sqrt77.8%
Applied egg-rr77.8%
Taylor expanded in t1 around 0 78.0%
neg-mul-178.0%
distribute-neg-frac278.0%
Simplified78.0%
Final simplification83.0%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -3e+43) (not (<= t1 6.5e+39))) (/ v (- (- u) t1)) (* v (/ t1 (* u (- u))))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -3e+43) || !(t1 <= 6.5e+39)) {
tmp = v / (-u - t1);
} 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 <= (-3d+43)) .or. (.not. (t1 <= 6.5d+39))) then
tmp = v / (-u - t1)
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 <= -3e+43) || !(t1 <= 6.5e+39)) {
tmp = v / (-u - t1);
} else {
tmp = v * (t1 / (u * -u));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -3e+43) or not (t1 <= 6.5e+39): tmp = v / (-u - t1) else: tmp = v * (t1 / (u * -u)) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -3e+43) || !(t1 <= 6.5e+39)) tmp = Float64(v / Float64(Float64(-u) - t1)); else tmp = Float64(v * Float64(t1 / Float64(u * Float64(-u)))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -3e+43) || ~((t1 <= 6.5e+39))) tmp = v / (-u - t1); else tmp = v * (t1 / (u * -u)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -3e+43], N[Not[LessEqual[t1, 6.5e+39]], $MachinePrecision]], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], N[(v * N[(t1 / N[(u * (-u)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -3 \cdot 10^{+43} \lor \neg \left(t1 \leq 6.5 \cdot 10^{+39}\right):\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;v \cdot \frac{t1}{u \cdot \left(-u\right)}\\
\end{array}
\end{array}
if t1 < -3.00000000000000017e43 or 6.5000000000000001e39 < t1 Initial program 58.8%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
frac-2neg99.9%
frac-2neg99.9%
frac-times58.8%
sub-neg58.8%
distribute-neg-in58.8%
+-commutative58.8%
remove-double-neg58.8%
frac-times99.9%
associate-*r/99.9%
add-sqr-sqrt49.2%
sqrt-unprod25.1%
sqr-neg25.1%
sqrt-unprod23.1%
add-sqr-sqrt35.0%
add-sqr-sqrt12.7%
sqrt-unprod49.3%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 89.6%
mul-1-neg89.6%
Simplified89.6%
if -3.00000000000000017e43 < t1 < 6.5000000000000001e39Initial program 85.2%
associate-*l/82.8%
*-commutative82.8%
Simplified82.8%
Taylor expanded in t1 around 0 65.7%
Taylor expanded in t1 around 0 68.1%
Final simplification77.2%
(FPCore (u v t1) :precision binary64 (if (<= t1 -1.2e-186) (* v (/ -1.0 (- t1 u))) (if (<= t1 2e-136) (/ (/ v (/ u t1)) t1) (/ v (- (- u) t1)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1.2e-186) {
tmp = v * (-1.0 / (t1 - u));
} else if (t1 <= 2e-136) {
tmp = (v / (u / t1)) / t1;
} 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.2d-186)) then
tmp = v * ((-1.0d0) / (t1 - u))
else if (t1 <= 2d-136) then
tmp = (v / (u / t1)) / t1
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.2e-186) {
tmp = v * (-1.0 / (t1 - u));
} else if (t1 <= 2e-136) {
tmp = (v / (u / t1)) / t1;
} else {
tmp = v / (-u - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -1.2e-186: tmp = v * (-1.0 / (t1 - u)) elif t1 <= 2e-136: tmp = (v / (u / t1)) / t1 else: tmp = v / (-u - t1) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -1.2e-186) tmp = Float64(v * Float64(-1.0 / Float64(t1 - u))); elseif (t1 <= 2e-136) tmp = Float64(Float64(v / Float64(u / t1)) / t1); else tmp = Float64(v / Float64(Float64(-u) - t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -1.2e-186) tmp = v * (-1.0 / (t1 - u)); elseif (t1 <= 2e-136) tmp = (v / (u / t1)) / t1; else tmp = v / (-u - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -1.2e-186], N[(v * N[(-1.0 / N[(t1 - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 2e-136], N[(N[(v / N[(u / t1), $MachinePrecision]), $MachinePrecision] / t1), $MachinePrecision], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.2 \cdot 10^{-186}:\\
\;\;\;\;v \cdot \frac{-1}{t1 - u}\\
\mathbf{elif}\;t1 \leq 2 \cdot 10^{-136}:\\
\;\;\;\;\frac{\frac{v}{\frac{u}{t1}}}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\end{array}
\end{array}
if t1 < -1.20000000000000002e-186Initial program 70.7%
times-frac99.0%
distribute-frac-neg99.0%
distribute-neg-frac299.0%
+-commutative99.0%
distribute-neg-in99.0%
unsub-neg99.0%
Simplified99.0%
frac-2neg99.0%
frac-2neg99.0%
frac-times70.7%
sub-neg70.7%
distribute-neg-in70.7%
+-commutative70.7%
remove-double-neg70.7%
frac-times99.0%
associate-*r/99.8%
add-sqr-sqrt99.4%
sqrt-unprod64.0%
sqr-neg64.0%
sqrt-unprod0.0%
add-sqr-sqrt33.8%
add-sqr-sqrt24.7%
sqrt-unprod39.0%
Applied egg-rr99.8%
Taylor expanded in t1 around inf 68.0%
mul-1-neg68.0%
Simplified68.0%
div-inv67.8%
*-commutative67.8%
frac-2neg67.8%
metadata-eval67.8%
distribute-neg-in67.8%
add-sqr-sqrt67.7%
sqrt-unprod45.6%
sqr-neg45.6%
sqrt-unprod0.0%
add-sqr-sqrt21.4%
sub-neg21.4%
add-sqr-sqrt8.0%
sqrt-unprod33.3%
sqr-neg33.3%
sqrt-unprod31.8%
add-sqr-sqrt68.2%
Applied egg-rr68.2%
if -1.20000000000000002e-186 < t1 < 2e-136Initial program 80.2%
times-frac93.6%
distribute-frac-neg93.6%
distribute-neg-frac293.6%
+-commutative93.6%
distribute-neg-in93.6%
unsub-neg93.6%
Simplified93.6%
Taylor expanded in t1 around inf 37.1%
add-sqr-sqrt21.3%
add-sqr-sqrt18.0%
difference-of-squares18.0%
add-sqr-sqrt18.0%
sqrt-unprod17.2%
sqr-neg17.2%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
add-sqr-sqrt0.0%
sqrt-unprod6.1%
sqr-neg6.1%
sqrt-unprod4.8%
add-sqr-sqrt4.8%
Applied egg-rr4.8%
difference-of-squares4.8%
rem-square-sqrt23.2%
rem-square-sqrt36.3%
Simplified36.3%
Taylor expanded in u around inf 29.5%
associate-*r/50.2%
clear-num50.2%
associate-*l/50.2%
*-un-lft-identity50.2%
Applied egg-rr50.2%
if 2e-136 < t1 Initial program 73.0%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
frac-2neg99.9%
frac-2neg99.9%
frac-times73.0%
sub-neg73.0%
distribute-neg-in73.0%
+-commutative73.0%
remove-double-neg73.0%
frac-times99.9%
associate-*r/98.8%
add-sqr-sqrt0.0%
sqrt-unprod15.5%
sqr-neg15.5%
sqrt-unprod38.1%
add-sqr-sqrt38.1%
add-sqr-sqrt9.7%
sqrt-unprod73.6%
Applied egg-rr98.8%
Taylor expanded in t1 around inf 72.3%
mul-1-neg72.3%
Simplified72.3%
Final simplification64.9%
(FPCore (u v t1) :precision binary64 (if (<= u -1.15e+215) (/ v u) (if (<= u 1.1e+141) (/ v (- t1)) (/ v (- u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.15e+215) {
tmp = v / u;
} else if (u <= 1.1e+141) {
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 <= (-1.15d+215)) then
tmp = v / u
else if (u <= 1.1d+141) 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 <= -1.15e+215) {
tmp = v / u;
} else if (u <= 1.1e+141) {
tmp = v / -t1;
} else {
tmp = v / -u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.15e+215: tmp = v / u elif u <= 1.1e+141: tmp = v / -t1 else: tmp = v / -u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.15e+215) tmp = Float64(v / u); elseif (u <= 1.1e+141) tmp = Float64(v / Float64(-t1)); else tmp = Float64(v / Float64(-u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -1.15e+215) tmp = v / u; elseif (u <= 1.1e+141) tmp = v / -t1; else tmp = v / -u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.15e+215], N[(v / u), $MachinePrecision], If[LessEqual[u, 1.1e+141], N[(v / (-t1)), $MachinePrecision], N[(v / (-u)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.15 \cdot 10^{+215}:\\
\;\;\;\;\frac{v}{u}\\
\mathbf{elif}\;u \leq 1.1 \cdot 10^{+141}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-u}\\
\end{array}
\end{array}
if u < -1.1500000000000001e215Initial program 92.8%
times-frac100.0%
distribute-frac-neg100.0%
distribute-neg-frac2100.0%
+-commutative100.0%
distribute-neg-in100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in t1 around inf 63.0%
add-sqr-sqrt63.0%
add-sqr-sqrt39.9%
difference-of-squares39.9%
add-sqr-sqrt39.9%
sqrt-unprod61.5%
sqr-neg61.5%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
Applied egg-rr0.0%
difference-of-squares0.0%
rem-square-sqrt40.0%
rem-square-sqrt63.0%
Simplified63.0%
Taylor expanded in t1 around 0 41.9%
if -1.1500000000000001e215 < u < 1.1e141Initial program 73.3%
times-frac97.3%
distribute-frac-neg97.3%
distribute-neg-frac297.3%
+-commutative97.3%
distribute-neg-in97.3%
unsub-neg97.3%
Simplified97.3%
Taylor expanded in t1 around inf 61.2%
associate-*r/61.2%
neg-mul-161.2%
Simplified61.2%
if 1.1e141 < u Initial program 71.2%
times-frac99.8%
distribute-frac-neg99.8%
distribute-neg-frac299.8%
+-commutative99.8%
distribute-neg-in99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in t1 around inf 37.7%
Taylor expanded in t1 around 0 30.6%
associate-*r/30.6%
mul-1-neg30.6%
Simplified30.6%
Final simplification55.4%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -7e+31) (not (<= t1 2e+137))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -7e+31) || !(t1 <= 2e+137)) {
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 <= (-7d+31)) .or. (.not. (t1 <= 2d+137))) 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 <= -7e+31) || !(t1 <= 2e+137)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -7e+31) or not (t1 <= 2e+137): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -7e+31) || !(t1 <= 2e+137)) 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 <= -7e+31) || ~((t1 <= 2e+137))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -7e+31], N[Not[LessEqual[t1, 2e+137]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -7 \cdot 10^{+31} \lor \neg \left(t1 \leq 2 \cdot 10^{+137}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -7e31 or 2.0000000000000001e137 < t1 Initial program 56.4%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in t1 around inf 87.3%
associate-*r/87.3%
neg-mul-187.3%
Simplified87.3%
distribute-frac-neg87.3%
div-inv87.1%
distribute-rgt-neg-in87.1%
frac-2neg87.1%
metadata-eval87.1%
add-sqr-sqrt52.8%
sqrt-unprod52.5%
sqr-neg52.5%
sqrt-unprod21.4%
add-sqr-sqrt36.3%
Applied egg-rr36.3%
distribute-rgt-neg-out36.3%
*-commutative36.3%
associate-*l/36.3%
mul-1-neg36.3%
distribute-neg-frac36.3%
remove-double-neg36.3%
Simplified36.3%
if -7e31 < t1 < 2.0000000000000001e137Initial program 84.1%
times-frac96.6%
distribute-frac-neg96.6%
distribute-neg-frac296.6%
+-commutative96.6%
distribute-neg-in96.6%
unsub-neg96.6%
Simplified96.6%
Taylor expanded in t1 around inf 46.8%
add-sqr-sqrt23.5%
add-sqr-sqrt16.0%
difference-of-squares16.0%
add-sqr-sqrt16.0%
sqrt-unprod18.7%
sqr-neg18.7%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
add-sqr-sqrt0.0%
sqrt-unprod13.8%
sqr-neg13.8%
sqrt-unprod12.6%
add-sqr-sqrt12.6%
Applied egg-rr12.6%
difference-of-squares12.6%
rem-square-sqrt28.8%
rem-square-sqrt46.7%
Simplified46.7%
Taylor expanded in t1 around 0 15.2%
Final simplification23.0%
(FPCore (u v t1) :precision binary64 (* (/ t1 (+ t1 u)) (/ v (- (- u) t1))))
double code(double u, double v, double t1) {
return (t1 / (t1 + u)) * (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 = (t1 / (t1 + u)) * (v / (-u - t1))
end function
public static double code(double u, double v, double t1) {
return (t1 / (t1 + u)) * (v / (-u - t1));
}
def code(u, v, t1): return (t1 / (t1 + u)) * (v / (-u - t1))
function code(u, v, t1) return Float64(Float64(t1 / Float64(t1 + u)) * Float64(v / Float64(Float64(-u) - t1))) end
function tmp = code(u, v, t1) tmp = (t1 / (t1 + u)) * (v / (-u - t1)); end
code[u_, v_, t1_] := N[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{t1}{t1 + u} \cdot \frac{v}{\left(-u\right) - t1}
\end{array}
Initial program 74.0%
times-frac97.9%
distribute-frac-neg97.9%
distribute-neg-frac297.9%
+-commutative97.9%
distribute-neg-in97.9%
unsub-neg97.9%
Simplified97.9%
Final simplification97.9%
(FPCore (u v t1) :precision binary64 (if (<= v 1.45e-197) (/ v (+ t1 u)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if (v <= 1.45e-197) {
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 (v <= 1.45d-197) 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 (v <= 1.45e-197) {
tmp = v / (t1 + u);
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if v <= 1.45e-197: tmp = v / (t1 + u) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if (v <= 1.45e-197) tmp = Float64(v / Float64(t1 + u)); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (v <= 1.45e-197) tmp = v / (t1 + u); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[v, 1.45e-197], N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;v \leq 1.45 \cdot 10^{-197}:\\
\;\;\;\;\frac{v}{t1 + u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if v < 1.45000000000000011e-197Initial program 78.2%
times-frac98.7%
distribute-frac-neg98.7%
distribute-neg-frac298.7%
+-commutative98.7%
distribute-neg-in98.7%
unsub-neg98.7%
Simplified98.7%
Taylor expanded in t1 around inf 62.8%
add-sqr-sqrt38.8%
sqrt-unprod50.5%
mul-1-neg50.5%
mul-1-neg50.5%
sqr-neg50.5%
sqrt-unprod26.2%
add-sqr-sqrt28.1%
Applied egg-rr28.1%
if 1.45000000000000011e-197 < v Initial program 67.2%
times-frac96.5%
distribute-frac-neg96.5%
distribute-neg-frac296.5%
+-commutative96.5%
distribute-neg-in96.5%
unsub-neg96.5%
Simplified96.5%
Taylor expanded in t1 around inf 44.6%
associate-*r/44.6%
neg-mul-144.6%
Simplified44.6%
Final simplification34.5%
(FPCore (u v t1) :precision binary64 (if (<= u -1.15e+215) (/ v u) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.15e+215) {
tmp = v / u;
} else {
tmp = v / -t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-1.15d+215)) then
tmp = v / u
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -1.15e+215) {
tmp = v / u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.15e+215: tmp = v / u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.15e+215) tmp = Float64(v / u); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -1.15e+215) tmp = v / u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.15e+215], N[(v / u), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.15 \cdot 10^{+215}:\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -1.1500000000000001e215Initial program 92.8%
times-frac100.0%
distribute-frac-neg100.0%
distribute-neg-frac2100.0%
+-commutative100.0%
distribute-neg-in100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in t1 around inf 63.0%
add-sqr-sqrt63.0%
add-sqr-sqrt39.9%
difference-of-squares39.9%
add-sqr-sqrt39.9%
sqrt-unprod61.5%
sqr-neg61.5%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
Applied egg-rr0.0%
difference-of-squares0.0%
rem-square-sqrt40.0%
rem-square-sqrt63.0%
Simplified63.0%
Taylor expanded in t1 around 0 41.9%
if -1.1500000000000001e215 < u Initial program 73.0%
times-frac97.7%
distribute-frac-neg97.7%
distribute-neg-frac297.7%
+-commutative97.7%
distribute-neg-in97.7%
unsub-neg97.7%
Simplified97.7%
Taylor expanded in t1 around inf 54.5%
associate-*r/54.5%
neg-mul-154.5%
Simplified54.5%
Final simplification53.8%
(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(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}{\left(-u\right) - t1}
\end{array}
Initial program 74.0%
times-frac97.9%
distribute-frac-neg97.9%
distribute-neg-frac297.9%
+-commutative97.9%
distribute-neg-in97.9%
unsub-neg97.9%
Simplified97.9%
frac-2neg97.9%
frac-2neg97.9%
frac-times74.0%
sub-neg74.0%
distribute-neg-in74.0%
+-commutative74.0%
remove-double-neg74.0%
frac-times97.9%
associate-*r/98.5%
add-sqr-sqrt50.3%
sqrt-unprod42.9%
sqr-neg42.9%
sqrt-unprod20.1%
add-sqr-sqrt38.4%
add-sqr-sqrt17.9%
sqrt-unprod58.1%
Applied egg-rr98.5%
Taylor expanded in t1 around inf 57.7%
mul-1-neg57.7%
Simplified57.7%
Final simplification57.7%
(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 74.0%
times-frac97.9%
distribute-frac-neg97.9%
distribute-neg-frac297.9%
+-commutative97.9%
distribute-neg-in97.9%
unsub-neg97.9%
Simplified97.9%
Taylor expanded in t1 around inf 52.2%
associate-*r/52.2%
neg-mul-152.2%
Simplified52.2%
distribute-frac-neg52.2%
div-inv52.1%
distribute-rgt-neg-in52.1%
frac-2neg52.1%
metadata-eval52.1%
add-sqr-sqrt26.1%
sqrt-unprod26.5%
sqr-neg26.5%
sqrt-unprod9.2%
add-sqr-sqrt15.3%
Applied egg-rr15.3%
distribute-rgt-neg-out15.3%
*-commutative15.3%
associate-*l/15.3%
mul-1-neg15.3%
distribute-neg-frac15.3%
remove-double-neg15.3%
Simplified15.3%
herbie shell --seed 2024130
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))