
(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 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (u v t1) :precision binary64 (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))
double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-t1 * v) / ((t1 + u) * (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
def code(u, v, t1): return (-t1 * v) / ((t1 + u) * (t1 + u))
function code(u, v, t1) return Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (-t1 * v) / ((t1 + u) * (t1 + u)); end
code[u_, v_, t1_] := N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}
\end{array}
(FPCore (u v t1) :precision binary64 (/ (* (/ t1 (+ t1 u)) (- v)) (+ t1 u)))
double code(double u, double v, double t1) {
return ((t1 / (t1 + u)) * -v) / (t1 + u);
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = ((t1 / (t1 + u)) * -v) / (t1 + u)
end function
public static double code(double u, double v, double t1) {
return ((t1 / (t1 + u)) * -v) / (t1 + u);
}
def code(u, v, t1): return ((t1 / (t1 + u)) * -v) / (t1 + u)
function code(u, v, t1) return Float64(Float64(Float64(t1 / Float64(t1 + u)) * Float64(-v)) / Float64(t1 + u)) end
function tmp = code(u, v, t1) tmp = ((t1 / (t1 + u)) * -v) / (t1 + u); end
code[u_, v_, t1_] := N[(N[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * (-v)), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{t1 + u}
\end{array}
Initial program 72.1%
associate-/l*73.0%
distribute-lft-neg-out73.0%
distribute-rgt-neg-in73.0%
associate-/r*83.4%
distribute-neg-frac283.4%
Simplified83.4%
associate-*r/97.9%
+-commutative97.9%
distribute-neg-in97.9%
sub-neg97.9%
associate-*l/97.4%
frac-2neg97.4%
associate-*r/97.5%
remove-double-neg97.5%
sub-neg97.5%
distribute-neg-in97.5%
+-commutative97.5%
frac-2neg97.5%
add-sqr-sqrt45.0%
sqrt-unprod42.2%
sqr-neg42.2%
sqrt-unprod19.6%
add-sqr-sqrt35.2%
add-sqr-sqrt15.8%
sqrt-unprod55.9%
Applied egg-rr97.5%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (- (- u) t1)))
(if (<= t1 -2e+156)
(/ (- (* u (/ v t1)) v) (+ t1 u))
(if (<= t1 1e+122) (* t1 (/ (/ v (+ t1 u)) t_1)) (/ v t_1)))))
double code(double u, double v, double t1) {
double t_1 = -u - t1;
double tmp;
if (t1 <= -2e+156) {
tmp = ((u * (v / t1)) - v) / (t1 + u);
} else if (t1 <= 1e+122) {
tmp = t1 * ((v / (t1 + u)) / t_1);
} else {
tmp = v / t_1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: t_1
real(8) :: tmp
t_1 = -u - t1
if (t1 <= (-2d+156)) then
tmp = ((u * (v / t1)) - v) / (t1 + u)
else if (t1 <= 1d+122) then
tmp = t1 * ((v / (t1 + u)) / t_1)
else
tmp = v / t_1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = -u - t1;
double tmp;
if (t1 <= -2e+156) {
tmp = ((u * (v / t1)) - v) / (t1 + u);
} else if (t1 <= 1e+122) {
tmp = t1 * ((v / (t1 + u)) / t_1);
} else {
tmp = v / t_1;
}
return tmp;
}
def code(u, v, t1): t_1 = -u - t1 tmp = 0 if t1 <= -2e+156: tmp = ((u * (v / t1)) - v) / (t1 + u) elif t1 <= 1e+122: tmp = t1 * ((v / (t1 + u)) / t_1) else: tmp = v / t_1 return tmp
function code(u, v, t1) t_1 = Float64(Float64(-u) - t1) tmp = 0.0 if (t1 <= -2e+156) tmp = Float64(Float64(Float64(u * Float64(v / t1)) - v) / Float64(t1 + u)); elseif (t1 <= 1e+122) tmp = Float64(t1 * Float64(Float64(v / Float64(t1 + u)) / t_1)); else tmp = Float64(v / t_1); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = -u - t1; tmp = 0.0; if (t1 <= -2e+156) tmp = ((u * (v / t1)) - v) / (t1 + u); elseif (t1 <= 1e+122) tmp = t1 * ((v / (t1 + u)) / t_1); else tmp = v / t_1; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-u) - t1), $MachinePrecision]}, If[LessEqual[t1, -2e+156], N[(N[(N[(u * N[(v / t1), $MachinePrecision]), $MachinePrecision] - v), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 1e+122], N[(t1 * N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], N[(v / t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-u\right) - t1\\
\mathbf{if}\;t1 \leq -2 \cdot 10^{+156}:\\
\;\;\;\;\frac{u \cdot \frac{v}{t1} - v}{t1 + u}\\
\mathbf{elif}\;t1 \leq 10^{+122}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{t1 + u}}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{t\_1}\\
\end{array}
\end{array}
if t1 < -2e156Initial program 41.8%
associate-/l*42.7%
distribute-lft-neg-out42.7%
distribute-rgt-neg-in42.7%
associate-/r*66.9%
distribute-neg-frac266.9%
Simplified66.9%
associate-*r/100.0%
+-commutative100.0%
distribute-neg-in100.0%
sub-neg100.0%
associate-*l/99.9%
frac-2neg99.9%
associate-*r/100.0%
remove-double-neg100.0%
sub-neg100.0%
distribute-neg-in100.0%
+-commutative100.0%
frac-2neg100.0%
add-sqr-sqrt99.6%
sqrt-unprod2.1%
sqr-neg2.1%
sqrt-unprod0.0%
add-sqr-sqrt41.7%
add-sqr-sqrt34.3%
sqrt-unprod42.7%
Applied egg-rr100.0%
Taylor expanded in t1 around inf 97.8%
+-commutative97.8%
mul-1-neg97.8%
sub-neg97.8%
associate-/l*97.8%
Simplified97.8%
if -2e156 < t1 < 1.00000000000000001e122Initial program 81.5%
associate-/l*81.9%
distribute-lft-neg-out81.9%
distribute-rgt-neg-in81.9%
associate-/r*89.3%
distribute-neg-frac289.3%
Simplified89.3%
if 1.00000000000000001e122 < t1 Initial program 48.6%
associate-/l*52.1%
distribute-lft-neg-out52.1%
distribute-rgt-neg-in52.1%
associate-/r*67.1%
distribute-neg-frac267.1%
Simplified67.1%
Taylor expanded in t1 around inf 63.4%
Taylor expanded in v around 0 85.4%
associate-*r/85.4%
mul-1-neg85.4%
+-commutative85.4%
Simplified85.4%
Final simplification89.6%
(FPCore (u v t1) :precision binary64 (if (<= u -1.5e-55) (* t1 (/ (/ v (+ t1 u)) (- u))) (if (<= u 0.006) (- (/ v t1)) (/ (* (/ v u) (- t1)) (+ t1 u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.5e-55) {
tmp = t1 * ((v / (t1 + u)) / -u);
} else if (u <= 0.006) {
tmp = -(v / t1);
} else {
tmp = ((v / u) * -t1) / (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.5d-55)) then
tmp = t1 * ((v / (t1 + u)) / -u)
else if (u <= 0.006d0) then
tmp = -(v / t1)
else
tmp = ((v / u) * -t1) / (t1 + u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -1.5e-55) {
tmp = t1 * ((v / (t1 + u)) / -u);
} else if (u <= 0.006) {
tmp = -(v / t1);
} else {
tmp = ((v / u) * -t1) / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.5e-55: tmp = t1 * ((v / (t1 + u)) / -u) elif u <= 0.006: tmp = -(v / t1) else: tmp = ((v / u) * -t1) / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.5e-55) tmp = Float64(t1 * Float64(Float64(v / Float64(t1 + u)) / Float64(-u))); elseif (u <= 0.006) tmp = Float64(-Float64(v / t1)); else tmp = Float64(Float64(Float64(v / u) * Float64(-t1)) / Float64(t1 + u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -1.5e-55) tmp = t1 * ((v / (t1 + u)) / -u); elseif (u <= 0.006) tmp = -(v / t1); else tmp = ((v / u) * -t1) / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.5e-55], N[(t1 * N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 0.006], (-N[(v / t1), $MachinePrecision]), N[(N[(N[(v / u), $MachinePrecision] * (-t1)), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.5 \cdot 10^{-55}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{t1 + u}}{-u}\\
\mathbf{elif}\;u \leq 0.006:\\
\;\;\;\;-\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{v}{u} \cdot \left(-t1\right)}{t1 + u}\\
\end{array}
\end{array}
if u < -1.50000000000000008e-55Initial program 77.2%
associate-/l*76.0%
distribute-lft-neg-out76.0%
distribute-rgt-neg-in76.0%
associate-/r*86.5%
distribute-neg-frac286.5%
Simplified86.5%
Taylor expanded in t1 around 0 81.3%
if -1.50000000000000008e-55 < u < 0.0060000000000000001Initial program 67.0%
associate-/l*67.3%
distribute-lft-neg-out67.3%
distribute-rgt-neg-in67.3%
associate-/r*76.4%
distribute-neg-frac276.4%
Simplified76.4%
Taylor expanded in t1 around inf 80.8%
associate-*r/80.8%
neg-mul-180.8%
Simplified80.8%
if 0.0060000000000000001 < u Initial program 74.6%
associate-/l*79.5%
distribute-lft-neg-out79.5%
distribute-rgt-neg-in79.5%
associate-/r*92.0%
distribute-neg-frac292.0%
Simplified92.0%
associate-*r/99.8%
+-commutative99.8%
distribute-neg-in99.8%
sub-neg99.8%
associate-*l/96.9%
frac-2neg96.9%
associate-*r/96.9%
remove-double-neg96.9%
sub-neg96.9%
distribute-neg-in96.9%
+-commutative96.9%
frac-2neg96.9%
add-sqr-sqrt38.2%
sqrt-unprod56.1%
sqr-neg56.1%
sqrt-unprod28.2%
add-sqr-sqrt53.4%
add-sqr-sqrt1.6%
sqrt-unprod77.3%
Applied egg-rr96.9%
Taylor expanded in t1 around 0 81.6%
associate-*r/81.6%
*-commutative81.6%
associate-*r*81.6%
associate-*l/85.7%
associate-*r/85.7%
*-commutative85.7%
associate-*l*85.7%
mul-1-neg85.7%
Simplified85.7%
Final simplification82.2%
(FPCore (u v t1) :precision binary64 (if (or (<= u -9.6e-61) (not (<= u 7.2e-11))) (/ (* t1 (/ v u)) (- u)) (- (/ v t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -9.6e-61) || !(u <= 7.2e-11)) {
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 <= (-9.6d-61)) .or. (.not. (u <= 7.2d-11))) 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 <= -9.6e-61) || !(u <= 7.2e-11)) {
tmp = (t1 * (v / u)) / -u;
} else {
tmp = -(v / t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -9.6e-61) or not (u <= 7.2e-11): tmp = (t1 * (v / u)) / -u else: tmp = -(v / t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -9.6e-61) || !(u <= 7.2e-11)) tmp = Float64(Float64(t1 * Float64(v / u)) / Float64(-u)); else tmp = Float64(-Float64(v / t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -9.6e-61) || ~((u <= 7.2e-11))) tmp = (t1 * (v / u)) / -u; else tmp = -(v / t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -9.6e-61], N[Not[LessEqual[u, 7.2e-11]], $MachinePrecision]], N[(N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision], (-N[(v / t1), $MachinePrecision])]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -9.6 \cdot 10^{-61} \lor \neg \left(u \leq 7.2 \cdot 10^{-11}\right):\\
\;\;\;\;\frac{t1 \cdot \frac{v}{u}}{-u}\\
\mathbf{else}:\\
\;\;\;\;-\frac{v}{t1}\\
\end{array}
\end{array}
if u < -9.6000000000000004e-61 or 7.19999999999999969e-11 < u Initial program 76.4%
associate-*l/74.9%
*-commutative74.9%
Simplified74.9%
Taylor expanded in t1 around 0 68.3%
distribute-frac-neg68.3%
distribute-rgt-neg-out68.3%
add-sqr-sqrt37.1%
sqrt-unprod46.6%
sqr-neg46.6%
sqrt-unprod20.7%
add-sqr-sqrt48.8%
*-commutative48.8%
associate-/r*48.0%
associate-*l/47.9%
Applied egg-rr79.1%
Taylor expanded in t1 around 0 77.7%
associate-/l*81.5%
Simplified81.5%
if -9.6000000000000004e-61 < u < 7.19999999999999969e-11Initial program 66.4%
associate-/l*66.7%
distribute-lft-neg-out66.7%
distribute-rgt-neg-in66.7%
associate-/r*76.0%
distribute-neg-frac276.0%
Simplified76.0%
Taylor expanded in t1 around inf 81.3%
associate-*r/81.3%
neg-mul-181.3%
Simplified81.3%
Final simplification81.4%
(FPCore (u v t1) :precision binary64 (if (or (<= u -5.6e-39) (not (<= u 1.8e-6))) (* t1 (/ (/ v u) (- u))) (- (/ v t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -5.6e-39) || !(u <= 1.8e-6)) {
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-39)) .or. (.not. (u <= 1.8d-6))) 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-39) || !(u <= 1.8e-6)) {
tmp = t1 * ((v / u) / -u);
} else {
tmp = -(v / t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -5.6e-39) or not (u <= 1.8e-6): tmp = t1 * ((v / u) / -u) else: tmp = -(v / t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -5.6e-39) || !(u <= 1.8e-6)) tmp = Float64(t1 * Float64(Float64(v / u) / Float64(-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-39) || ~((u <= 1.8e-6))) tmp = t1 * ((v / u) / -u); else tmp = -(v / t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -5.6e-39], N[Not[LessEqual[u, 1.8e-6]], $MachinePrecision]], N[(t1 * N[(N[(v / u), $MachinePrecision] / (-u)), $MachinePrecision]), $MachinePrecision], (-N[(v / t1), $MachinePrecision])]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -5.6 \cdot 10^{-39} \lor \neg \left(u \leq 1.8 \cdot 10^{-6}\right):\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{-u}\\
\mathbf{else}:\\
\;\;\;\;-\frac{v}{t1}\\
\end{array}
\end{array}
if u < -5.6000000000000003e-39 or 1.79999999999999992e-6 < u Initial program 75.6%
associate-*l/74.0%
*-commutative74.0%
Simplified74.0%
Taylor expanded in t1 around 0 68.6%
distribute-frac-neg68.6%
distribute-rgt-neg-out68.6%
add-sqr-sqrt37.0%
sqrt-unprod46.8%
sqr-neg46.8%
sqrt-unprod21.4%
add-sqr-sqrt50.4%
*-commutative50.4%
associate-/r*49.6%
associate-*l/49.4%
Applied egg-rr79.8%
Taylor expanded in t1 around 0 78.3%
associate-/l*82.2%
un-div-inv82.2%
associate-/l*80.4%
un-div-inv80.4%
Applied egg-rr80.4%
if -5.6000000000000003e-39 < u < 1.79999999999999992e-6Initial program 67.8%
associate-/l*67.3%
distribute-lft-neg-out67.3%
distribute-rgt-neg-in67.3%
associate-/r*76.2%
distribute-neg-frac276.2%
Simplified76.2%
Taylor expanded in t1 around inf 79.7%
associate-*r/79.7%
neg-mul-179.7%
Simplified79.7%
Final simplification80.1%
(FPCore (u v t1) :precision binary64 (if (<= u -8.5e-56) (* t1 (/ (/ v (+ t1 u)) (- u))) (if (<= u 4.1e-11) (- (/ v t1)) (/ (* t1 (/ v u)) (- u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -8.5e-56) {
tmp = t1 * ((v / (t1 + u)) / -u);
} else if (u <= 4.1e-11) {
tmp = -(v / t1);
} else {
tmp = (t1 * (v / 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 (u <= (-8.5d-56)) then
tmp = t1 * ((v / (t1 + u)) / -u)
else if (u <= 4.1d-11) then
tmp = -(v / t1)
else
tmp = (t1 * (v / u)) / -u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -8.5e-56) {
tmp = t1 * ((v / (t1 + u)) / -u);
} else if (u <= 4.1e-11) {
tmp = -(v / t1);
} else {
tmp = (t1 * (v / u)) / -u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -8.5e-56: tmp = t1 * ((v / (t1 + u)) / -u) elif u <= 4.1e-11: tmp = -(v / t1) else: tmp = (t1 * (v / u)) / -u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -8.5e-56) tmp = Float64(t1 * Float64(Float64(v / Float64(t1 + u)) / Float64(-u))); elseif (u <= 4.1e-11) tmp = Float64(-Float64(v / t1)); else tmp = Float64(Float64(t1 * Float64(v / u)) / Float64(-u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -8.5e-56) tmp = t1 * ((v / (t1 + u)) / -u); elseif (u <= 4.1e-11) tmp = -(v / t1); else tmp = (t1 * (v / u)) / -u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -8.5e-56], N[(t1 * N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 4.1e-11], (-N[(v / t1), $MachinePrecision]), N[(N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -8.5 \cdot 10^{-56}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{t1 + u}}{-u}\\
\mathbf{elif}\;u \leq 4.1 \cdot 10^{-11}:\\
\;\;\;\;-\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{u}}{-u}\\
\end{array}
\end{array}
if u < -8.49999999999999932e-56Initial program 77.2%
associate-/l*76.0%
distribute-lft-neg-out76.0%
distribute-rgt-neg-in76.0%
associate-/r*86.5%
distribute-neg-frac286.5%
Simplified86.5%
Taylor expanded in t1 around 0 81.3%
if -8.49999999999999932e-56 < u < 4.1000000000000001e-11Initial program 67.0%
associate-/l*67.3%
distribute-lft-neg-out67.3%
distribute-rgt-neg-in67.3%
associate-/r*76.4%
distribute-neg-frac276.4%
Simplified76.4%
Taylor expanded in t1 around inf 80.8%
associate-*r/80.8%
neg-mul-180.8%
Simplified80.8%
if 4.1000000000000001e-11 < u Initial program 74.6%
associate-*l/75.0%
*-commutative75.0%
Simplified75.0%
Taylor expanded in t1 around 0 70.4%
distribute-frac-neg70.4%
distribute-rgt-neg-out70.4%
add-sqr-sqrt36.1%
sqrt-unprod52.9%
sqr-neg52.9%
sqrt-unprod25.3%
add-sqr-sqrt53.8%
*-commutative53.8%
associate-/r*53.6%
associate-*l/53.4%
Applied egg-rr82.0%
Taylor expanded in t1 around 0 81.6%
associate-/l*85.6%
Simplified85.6%
Final simplification82.1%
(FPCore (u v t1) :precision binary64 (if (<= u -1.7e-59) (/ (/ t1 (/ u v)) (- u)) (if (<= u 2.5e-11) (- (/ v t1)) (/ (* t1 (/ v u)) (- u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.7e-59) {
tmp = (t1 / (u / v)) / -u;
} else if (u <= 2.5e-11) {
tmp = -(v / t1);
} else {
tmp = (t1 * (v / 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 (u <= (-1.7d-59)) then
tmp = (t1 / (u / v)) / -u
else if (u <= 2.5d-11) then
tmp = -(v / t1)
else
tmp = (t1 * (v / u)) / -u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -1.7e-59) {
tmp = (t1 / (u / v)) / -u;
} else if (u <= 2.5e-11) {
tmp = -(v / t1);
} else {
tmp = (t1 * (v / u)) / -u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.7e-59: tmp = (t1 / (u / v)) / -u elif u <= 2.5e-11: tmp = -(v / t1) else: tmp = (t1 * (v / u)) / -u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.7e-59) tmp = Float64(Float64(t1 / Float64(u / v)) / Float64(-u)); elseif (u <= 2.5e-11) tmp = Float64(-Float64(v / t1)); else tmp = Float64(Float64(t1 * Float64(v / u)) / Float64(-u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -1.7e-59) tmp = (t1 / (u / v)) / -u; elseif (u <= 2.5e-11) tmp = -(v / t1); else tmp = (t1 * (v / u)) / -u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.7e-59], N[(N[(t1 / N[(u / v), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision], If[LessEqual[u, 2.5e-11], (-N[(v / t1), $MachinePrecision]), N[(N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.7 \cdot 10^{-59}:\\
\;\;\;\;\frac{\frac{t1}{\frac{u}{v}}}{-u}\\
\mathbf{elif}\;u \leq 2.5 \cdot 10^{-11}:\\
\;\;\;\;-\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{u}}{-u}\\
\end{array}
\end{array}
if u < -1.70000000000000009e-59Initial program 77.7%
associate-*l/74.9%
*-commutative74.9%
Simplified74.9%
Taylor expanded in t1 around 0 66.8%
distribute-frac-neg66.8%
distribute-rgt-neg-out66.8%
add-sqr-sqrt37.9%
sqrt-unprod41.8%
sqr-neg41.8%
sqrt-unprod17.1%
add-sqr-sqrt45.0%
*-commutative45.0%
associate-/r*43.7%
associate-*l/43.6%
Applied egg-rr76.9%
Taylor expanded in t1 around 0 74.8%
associate-/l*78.4%
Applied egg-rr78.4%
*-rgt-identity78.4%
associate-*r/78.3%
*-commutative78.3%
associate-/r/79.5%
associate-*r/79.5%
*-rgt-identity79.5%
Simplified79.5%
if -1.70000000000000009e-59 < u < 2.50000000000000009e-11Initial program 66.4%
associate-/l*66.7%
distribute-lft-neg-out66.7%
distribute-rgt-neg-in66.7%
associate-/r*76.0%
distribute-neg-frac276.0%
Simplified76.0%
Taylor expanded in t1 around inf 81.3%
associate-*r/81.3%
neg-mul-181.3%
Simplified81.3%
if 2.50000000000000009e-11 < u Initial program 74.6%
associate-*l/75.0%
*-commutative75.0%
Simplified75.0%
Taylor expanded in t1 around 0 70.4%
distribute-frac-neg70.4%
distribute-rgt-neg-out70.4%
add-sqr-sqrt36.1%
sqrt-unprod52.9%
sqr-neg52.9%
sqrt-unprod25.3%
add-sqr-sqrt53.8%
*-commutative53.8%
associate-/r*53.6%
associate-*l/53.4%
Applied egg-rr82.0%
Taylor expanded in t1 around 0 81.6%
associate-/l*85.6%
Simplified85.6%
Final simplification81.8%
(FPCore (u v t1) :precision binary64 (if (<= u -1.7e-59) (* (/ v u) (/ t1 (- u))) (if (<= u 5e-12) (- (/ v t1)) (* t1 (/ (/ v u) (- u))))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.7e-59) {
tmp = (v / u) * (t1 / -u);
} else if (u <= 5e-12) {
tmp = -(v / t1);
} else {
tmp = t1 * ((v / 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 (u <= (-1.7d-59)) then
tmp = (v / u) * (t1 / -u)
else if (u <= 5d-12) then
tmp = -(v / t1)
else
tmp = t1 * ((v / u) / -u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -1.7e-59) {
tmp = (v / u) * (t1 / -u);
} else if (u <= 5e-12) {
tmp = -(v / t1);
} else {
tmp = t1 * ((v / u) / -u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.7e-59: tmp = (v / u) * (t1 / -u) elif u <= 5e-12: tmp = -(v / t1) else: tmp = t1 * ((v / u) / -u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.7e-59) tmp = Float64(Float64(v / u) * Float64(t1 / Float64(-u))); elseif (u <= 5e-12) tmp = Float64(-Float64(v / t1)); else tmp = Float64(t1 * Float64(Float64(v / u) / Float64(-u))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -1.7e-59) tmp = (v / u) * (t1 / -u); elseif (u <= 5e-12) tmp = -(v / t1); else tmp = t1 * ((v / u) / -u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.7e-59], N[(N[(v / u), $MachinePrecision] * N[(t1 / (-u)), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 5e-12], (-N[(v / t1), $MachinePrecision]), N[(t1 * N[(N[(v / u), $MachinePrecision] / (-u)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.7 \cdot 10^{-59}:\\
\;\;\;\;\frac{v}{u} \cdot \frac{t1}{-u}\\
\mathbf{elif}\;u \leq 5 \cdot 10^{-12}:\\
\;\;\;\;-\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{-u}\\
\end{array}
\end{array}
if u < -1.70000000000000009e-59Initial program 77.7%
associate-*l/74.9%
*-commutative74.9%
Simplified74.9%
Taylor expanded in t1 around 0 66.8%
distribute-frac-neg66.8%
distribute-rgt-neg-out66.8%
add-sqr-sqrt37.9%
sqrt-unprod41.8%
sqr-neg41.8%
sqrt-unprod17.1%
add-sqr-sqrt45.0%
*-commutative45.0%
associate-/r*43.7%
associate-*l/43.6%
Applied egg-rr76.9%
Taylor expanded in t1 around 0 74.8%
associate-/l/66.9%
*-commutative66.9%
times-frac76.3%
Applied egg-rr76.3%
if -1.70000000000000009e-59 < u < 4.9999999999999997e-12Initial program 66.4%
associate-/l*66.7%
distribute-lft-neg-out66.7%
distribute-rgt-neg-in66.7%
associate-/r*76.0%
distribute-neg-frac276.0%
Simplified76.0%
Taylor expanded in t1 around inf 81.3%
associate-*r/81.3%
neg-mul-181.3%
Simplified81.3%
if 4.9999999999999997e-12 < u Initial program 74.6%
associate-*l/75.0%
*-commutative75.0%
Simplified75.0%
Taylor expanded in t1 around 0 70.4%
distribute-frac-neg70.4%
distribute-rgt-neg-out70.4%
add-sqr-sqrt36.1%
sqrt-unprod52.9%
sqr-neg52.9%
sqrt-unprod25.3%
add-sqr-sqrt53.8%
*-commutative53.8%
associate-/r*53.6%
associate-*l/53.4%
Applied egg-rr82.0%
Taylor expanded in t1 around 0 81.6%
associate-/l*85.6%
un-div-inv85.6%
associate-/l*83.4%
un-div-inv83.5%
Applied egg-rr83.5%
Final simplification80.2%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.15e+111) (not (<= u 9e+43))) (/ v (- u)) (- (/ v t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.15e+111) || !(u <= 9e+43)) {
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+111)) .or. (.not. (u <= 9d+43))) 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+111) || !(u <= 9e+43)) {
tmp = v / -u;
} else {
tmp = -(v / t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.15e+111) or not (u <= 9e+43): tmp = v / -u else: tmp = -(v / t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.15e+111) || !(u <= 9e+43)) tmp = Float64(v / Float64(-u)); else tmp = Float64(-Float64(v / t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -1.15e+111) || ~((u <= 9e+43))) tmp = v / -u; else tmp = -(v / t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.15e+111], N[Not[LessEqual[u, 9e+43]], $MachinePrecision]], N[(v / (-u)), $MachinePrecision], (-N[(v / t1), $MachinePrecision])]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.15 \cdot 10^{+111} \lor \neg \left(u \leq 9 \cdot 10^{+43}\right):\\
\;\;\;\;\frac{v}{-u}\\
\mathbf{else}:\\
\;\;\;\;-\frac{v}{t1}\\
\end{array}
\end{array}
if u < -1.15000000000000001e111 or 9e43 < u Initial program 72.5%
associate-/l*73.9%
distribute-lft-neg-out73.9%
distribute-rgt-neg-in73.9%
associate-/r*88.0%
distribute-neg-frac288.0%
Simplified88.0%
Taylor expanded in t1 around inf 45.2%
Taylor expanded in t1 around 0 40.5%
associate-*r/40.5%
mul-1-neg40.5%
Simplified40.5%
if -1.15000000000000001e111 < u < 9e43Initial program 71.8%
associate-/l*72.4%
distribute-lft-neg-out72.4%
distribute-rgt-neg-in72.4%
associate-/r*80.6%
distribute-neg-frac280.6%
Simplified80.6%
Taylor expanded in t1 around inf 68.5%
associate-*r/68.5%
neg-mul-168.5%
Simplified68.5%
Final simplification58.0%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.15e+111) (not (<= u 9e+43))) (/ v u) (- (/ v t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.15e+111) || !(u <= 9e+43)) {
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+111)) .or. (.not. (u <= 9d+43))) 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+111) || !(u <= 9e+43)) {
tmp = v / u;
} else {
tmp = -(v / t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.15e+111) or not (u <= 9e+43): tmp = v / u else: tmp = -(v / t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.15e+111) || !(u <= 9e+43)) tmp = Float64(v / u); else tmp = Float64(-Float64(v / t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -1.15e+111) || ~((u <= 9e+43))) tmp = v / u; else tmp = -(v / t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.15e+111], N[Not[LessEqual[u, 9e+43]], $MachinePrecision]], N[(v / u), $MachinePrecision], (-N[(v / t1), $MachinePrecision])]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.15 \cdot 10^{+111} \lor \neg \left(u \leq 9 \cdot 10^{+43}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;-\frac{v}{t1}\\
\end{array}
\end{array}
if u < -1.15000000000000001e111 or 9e43 < u Initial program 72.5%
associate-*l/69.0%
*-commutative69.0%
Simplified69.0%
Taylor expanded in t1 around 0 69.0%
frac-2neg69.0%
div-inv69.1%
remove-double-neg69.1%
*-commutative69.1%
distribute-rgt-neg-in69.1%
distribute-neg-in69.1%
add-sqr-sqrt31.4%
sqrt-unprod69.1%
sqr-neg69.1%
sqrt-unprod37.6%
add-sqr-sqrt69.1%
sub-neg69.1%
Applied egg-rr69.1%
associate-*r/69.0%
*-rgt-identity69.0%
associate-/r*72.3%
Simplified72.3%
Taylor expanded in t1 around inf 39.6%
if -1.15000000000000001e111 < u < 9e43Initial program 71.8%
associate-/l*72.4%
distribute-lft-neg-out72.4%
distribute-rgt-neg-in72.4%
associate-/r*80.6%
distribute-neg-frac280.6%
Simplified80.6%
Taylor expanded in t1 around inf 68.5%
associate-*r/68.5%
neg-mul-168.5%
Simplified68.5%
Final simplification57.7%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -3.1e+139) (not (<= t1 1.45e+86))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -3.1e+139) || !(t1 <= 1.45e+86)) {
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 <= (-3.1d+139)) .or. (.not. (t1 <= 1.45d+86))) 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 <= -3.1e+139) || !(t1 <= 1.45e+86)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -3.1e+139) or not (t1 <= 1.45e+86): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -3.1e+139) || !(t1 <= 1.45e+86)) 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 <= -3.1e+139) || ~((t1 <= 1.45e+86))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -3.1e+139], N[Not[LessEqual[t1, 1.45e+86]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -3.1 \cdot 10^{+139} \lor \neg \left(t1 \leq 1.45 \cdot 10^{+86}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -3.1e139 or 1.44999999999999995e86 < t1 Initial program 50.4%
associate-/l*53.8%
distribute-lft-neg-out53.8%
distribute-rgt-neg-in53.8%
associate-/r*69.7%
distribute-neg-frac269.7%
Simplified69.7%
Taylor expanded in t1 around inf 66.6%
clear-num65.0%
un-div-inv65.1%
div-inv65.0%
add-sqr-sqrt22.9%
sqrt-unprod42.8%
sqr-neg42.8%
sqrt-unprod26.9%
add-sqr-sqrt42.5%
clear-num42.5%
Applied egg-rr42.5%
associate-/r*39.8%
*-inverses39.8%
+-commutative39.8%
Simplified39.8%
Taylor expanded in u around 0 38.4%
if -3.1e139 < t1 < 1.44999999999999995e86Initial program 81.9%
associate-*l/84.6%
*-commutative84.6%
Simplified84.6%
Taylor expanded in t1 around 0 58.6%
frac-2neg58.6%
div-inv58.5%
remove-double-neg58.5%
*-commutative58.5%
distribute-rgt-neg-in58.5%
distribute-neg-in58.5%
add-sqr-sqrt29.8%
sqrt-unprod58.5%
sqr-neg58.5%
sqrt-unprod28.0%
add-sqr-sqrt56.9%
sub-neg56.9%
Applied egg-rr56.9%
associate-*r/56.9%
*-rgt-identity56.9%
associate-/r*61.7%
Simplified61.7%
Taylor expanded in t1 around inf 17.8%
Final simplification24.2%
(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 72.1%
times-frac97.4%
distribute-frac-neg97.4%
distribute-neg-frac297.4%
+-commutative97.4%
distribute-neg-in97.4%
unsub-neg97.4%
Simplified97.4%
Final simplification97.4%
(FPCore (u v t1) :precision binary64 (if (<= v 4.4e+146) (/ v (- u t1)) (- (/ v t1))))
double code(double u, double v, double t1) {
double tmp;
if (v <= 4.4e+146) {
tmp = v / (u - t1);
} 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 <= 4.4d+146) then
tmp = v / (u - t1)
else
tmp = -(v / t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (v <= 4.4e+146) {
tmp = v / (u - t1);
} else {
tmp = -(v / t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if v <= 4.4e+146: tmp = v / (u - t1) else: tmp = -(v / t1) return tmp
function code(u, v, t1) tmp = 0.0 if (v <= 4.4e+146) tmp = Float64(v / Float64(u - t1)); else tmp = Float64(-Float64(v / t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (v <= 4.4e+146) tmp = v / (u - t1); else tmp = -(v / t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[v, 4.4e+146], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision], (-N[(v / t1), $MachinePrecision])]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;v \leq 4.4 \cdot 10^{+146}:\\
\;\;\;\;\frac{v}{u - t1}\\
\mathbf{else}:\\
\;\;\;\;-\frac{v}{t1}\\
\end{array}
\end{array}
if v < 4.3999999999999996e146Initial program 74.4%
times-frac98.4%
distribute-frac-neg98.4%
distribute-neg-frac298.4%
+-commutative98.4%
distribute-neg-in98.4%
unsub-neg98.4%
Simplified98.4%
Taylor expanded in t1 around inf 65.3%
clear-num64.8%
frac-times52.8%
*-commutative52.8%
*-un-lft-identity52.8%
add-sqr-sqrt25.5%
sqrt-unprod55.5%
sqr-neg55.5%
sqrt-unprod27.5%
add-sqr-sqrt52.5%
Applied egg-rr52.5%
associate-/l/62.3%
associate-/r/62.9%
associate-*l/60.6%
*-commutative60.6%
associate-/l*62.9%
*-inverses62.9%
*-rgt-identity62.9%
Simplified62.9%
if 4.3999999999999996e146 < v Initial program 61.3%
associate-/l*64.3%
distribute-lft-neg-out64.3%
distribute-rgt-neg-in64.3%
associate-/r*85.4%
distribute-neg-frac285.4%
Simplified85.4%
Taylor expanded in t1 around inf 50.2%
associate-*r/50.2%
neg-mul-150.2%
Simplified50.2%
Final simplification60.7%
(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 72.1%
associate-/l*73.0%
distribute-lft-neg-out73.0%
distribute-rgt-neg-in73.0%
associate-/r*83.4%
distribute-neg-frac283.4%
Simplified83.4%
Taylor expanded in t1 around inf 51.4%
Taylor expanded in v around 0 61.0%
associate-*r/61.0%
mul-1-neg61.0%
+-commutative61.0%
Simplified61.0%
Final simplification61.0%
(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 72.1%
associate-/l*73.0%
distribute-lft-neg-out73.0%
distribute-rgt-neg-in73.0%
associate-/r*83.4%
distribute-neg-frac283.4%
Simplified83.4%
Taylor expanded in t1 around inf 51.4%
clear-num50.8%
un-div-inv51.3%
div-inv51.4%
add-sqr-sqrt23.6%
sqrt-unprod32.7%
sqr-neg32.7%
sqrt-unprod14.7%
add-sqr-sqrt25.3%
clear-num25.3%
Applied egg-rr25.3%
associate-/r*24.2%
*-inverses24.2%
+-commutative24.2%
Simplified24.2%
Taylor expanded in u around 0 14.3%
herbie shell --seed 2024111
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))