
(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 17 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.4%
associate-*l/78.8%
*-commutative78.8%
Simplified78.8%
*-commutative78.8%
associate-*l/74.4%
times-frac98.0%
frac-2neg98.0%
remove-double-neg98.0%
+-commutative98.0%
distribute-neg-in98.0%
sub-neg98.0%
frac-2neg98.0%
+-commutative98.0%
distribute-neg-in98.0%
sub-neg98.0%
associate-*r/98.4%
Applied egg-rr98.4%
Final simplification98.4%
(FPCore (u v t1) :precision binary64 (if (<= t1 -1.5e+193) (/ v (- (* u -2.0) t1)) (if (<= t1 8.5e+144) (* t1 (/ (/ v (+ t1 u)) (- (- u) t1))) (- (/ v t1)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1.5e+193) {
tmp = v / ((u * -2.0) - t1);
} else if (t1 <= 8.5e+144) {
tmp = t1 * ((v / (t1 + u)) / (-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 (t1 <= (-1.5d+193)) then
tmp = v / ((u * (-2.0d0)) - t1)
else if (t1 <= 8.5d+144) then
tmp = t1 * ((v / (t1 + u)) / (-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 (t1 <= -1.5e+193) {
tmp = v / ((u * -2.0) - t1);
} else if (t1 <= 8.5e+144) {
tmp = t1 * ((v / (t1 + u)) / (-u - t1));
} else {
tmp = -(v / t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -1.5e+193: tmp = v / ((u * -2.0) - t1) elif t1 <= 8.5e+144: tmp = t1 * ((v / (t1 + u)) / (-u - t1)) else: tmp = -(v / t1) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -1.5e+193) tmp = Float64(v / Float64(Float64(u * -2.0) - t1)); elseif (t1 <= 8.5e+144) tmp = Float64(t1 * Float64(Float64(v / Float64(t1 + u)) / Float64(Float64(-u) - t1))); else tmp = Float64(-Float64(v / t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -1.5e+193) tmp = v / ((u * -2.0) - t1); elseif (t1 <= 8.5e+144) tmp = t1 * ((v / (t1 + u)) / (-u - t1)); else tmp = -(v / t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -1.5e+193], N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 8.5e+144], N[(t1 * N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], (-N[(v / t1), $MachinePrecision])]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.5 \cdot 10^{+193}:\\
\;\;\;\;\frac{v}{u \cdot -2 - t1}\\
\mathbf{elif}\;t1 \leq 8.5 \cdot 10^{+144}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{t1 + u}}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;-\frac{v}{t1}\\
\end{array}
\end{array}
if t1 < -1.5e193Initial program 57.2%
associate-*l/58.0%
*-commutative58.0%
Simplified58.0%
associate-*r/57.2%
*-commutative57.2%
times-frac99.9%
frac-2neg99.9%
remove-double-neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
clear-num100.0%
frac-2neg100.0%
frac-times100.0%
*-un-lft-identity100.0%
+-commutative100.0%
distribute-neg-in100.0%
sub-neg100.0%
Applied egg-rr100.0%
Taylor expanded in u around 0 99.2%
*-commutative99.2%
Simplified99.2%
Taylor expanded in v around 0 99.2%
mul-1-neg99.2%
+-commutative99.2%
*-commutative99.2%
fma-undefine99.2%
distribute-neg-frac299.2%
neg-sub099.2%
fma-undefine99.2%
associate--r+99.2%
neg-sub099.2%
distribute-rgt-neg-in99.2%
metadata-eval99.2%
Simplified99.2%
if -1.5e193 < t1 < 8.4999999999999998e144Initial program 80.9%
associate-/l*80.7%
Simplified80.7%
associate-/r*90.9%
div-inv90.7%
Applied egg-rr90.7%
associate-*r/90.9%
*-rgt-identity90.9%
Simplified90.9%
if 8.4999999999999998e144 < t1 Initial program 38.3%
associate-*l/42.8%
*-commutative42.8%
Simplified42.8%
Taylor expanded in t1 around inf 93.8%
associate-*r/93.8%
neg-mul-193.8%
Simplified93.8%
Final simplification91.8%
(FPCore (u v t1) :precision binary64 (if (<= t1 -9.8e+153) (/ v (- (* u -2.0) t1)) (if (<= t1 8e+131) (* v (/ t1 (* (+ t1 u) (- (- u) t1)))) (- (/ v t1)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -9.8e+153) {
tmp = v / ((u * -2.0) - t1);
} else if (t1 <= 8e+131) {
tmp = v * (t1 / ((t1 + u) * (-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 (t1 <= (-9.8d+153)) then
tmp = v / ((u * (-2.0d0)) - t1)
else if (t1 <= 8d+131) then
tmp = v * (t1 / ((t1 + u) * (-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 (t1 <= -9.8e+153) {
tmp = v / ((u * -2.0) - t1);
} else if (t1 <= 8e+131) {
tmp = v * (t1 / ((t1 + u) * (-u - t1)));
} else {
tmp = -(v / t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -9.8e+153: tmp = v / ((u * -2.0) - t1) elif t1 <= 8e+131: tmp = v * (t1 / ((t1 + u) * (-u - t1))) else: tmp = -(v / t1) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -9.8e+153) tmp = Float64(v / Float64(Float64(u * -2.0) - t1)); elseif (t1 <= 8e+131) tmp = Float64(v * Float64(t1 / Float64(Float64(t1 + u) * Float64(Float64(-u) - t1)))); else tmp = Float64(-Float64(v / t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -9.8e+153) tmp = v / ((u * -2.0) - t1); elseif (t1 <= 8e+131) tmp = v * (t1 / ((t1 + u) * (-u - t1))); else tmp = -(v / t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -9.8e+153], N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 8e+131], N[(v * N[(t1 / N[(N[(t1 + u), $MachinePrecision] * N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], (-N[(v / t1), $MachinePrecision])]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -9.8 \cdot 10^{+153}:\\
\;\;\;\;\frac{v}{u \cdot -2 - t1}\\
\mathbf{elif}\;t1 \leq 8 \cdot 10^{+131}:\\
\;\;\;\;v \cdot \frac{t1}{\left(t1 + u\right) \cdot \left(\left(-u\right) - t1\right)}\\
\mathbf{else}:\\
\;\;\;\;-\frac{v}{t1}\\
\end{array}
\end{array}
if t1 < -9.80000000000000003e153Initial program 41.2%
associate-*l/42.6%
*-commutative42.6%
Simplified42.6%
associate-*r/41.2%
*-commutative41.2%
times-frac99.9%
frac-2neg99.9%
remove-double-neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
clear-num99.9%
frac-2neg99.9%
frac-times96.5%
*-un-lft-identity96.5%
+-commutative96.5%
distribute-neg-in96.5%
sub-neg96.5%
Applied egg-rr96.5%
Taylor expanded in u around 0 89.4%
*-commutative89.4%
Simplified89.4%
Taylor expanded in v around 0 89.4%
mul-1-neg89.4%
+-commutative89.4%
*-commutative89.4%
fma-undefine89.4%
distribute-neg-frac289.4%
neg-sub089.4%
fma-undefine89.4%
associate--r+89.4%
neg-sub089.4%
distribute-rgt-neg-in89.4%
metadata-eval89.4%
Simplified89.4%
if -9.80000000000000003e153 < t1 < 7.9999999999999993e131Initial program 84.3%
associate-*l/89.2%
*-commutative89.2%
Simplified89.2%
if 7.9999999999999993e131 < t1 Initial program 42.8%
associate-*l/46.8%
*-commutative46.8%
Simplified46.8%
Taylor expanded in t1 around inf 91.6%
associate-*r/91.6%
neg-mul-191.6%
Simplified91.6%
Final simplification89.5%
(FPCore (u v t1) :precision binary64 (if (or (<= u -3.4e+48) (not (<= u 3.2e-46))) (* (/ v (+ t1 u)) (/ t1 (- u))) (- (/ v t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.4e+48) || !(u <= 3.2e-46)) {
tmp = (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 <= (-3.4d+48)) .or. (.not. (u <= 3.2d-46))) then
tmp = (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 <= -3.4e+48) || !(u <= 3.2e-46)) {
tmp = (v / (t1 + u)) * (t1 / -u);
} else {
tmp = -(v / t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -3.4e+48) or not (u <= 3.2e-46): tmp = (v / (t1 + u)) * (t1 / -u) else: tmp = -(v / t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -3.4e+48) || !(u <= 3.2e-46)) tmp = Float64(Float64(v / Float64(t1 + u)) * Float64(t1 / Float64(-u))); else tmp = Float64(-Float64(v / t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -3.4e+48) || ~((u <= 3.2e-46))) tmp = (v / (t1 + u)) * (t1 / -u); else tmp = -(v / t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -3.4e+48], N[Not[LessEqual[u, 3.2e-46]], $MachinePrecision]], N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(t1 / (-u)), $MachinePrecision]), $MachinePrecision], (-N[(v / t1), $MachinePrecision])]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.4 \cdot 10^{+48} \lor \neg \left(u \leq 3.2 \cdot 10^{-46}\right):\\
\;\;\;\;\frac{v}{t1 + u} \cdot \frac{t1}{-u}\\
\mathbf{else}:\\
\;\;\;\;-\frac{v}{t1}\\
\end{array}
\end{array}
if u < -3.4000000000000003e48 or 3.1999999999999999e-46 < u Initial program 77.5%
times-frac98.0%
distribute-frac-neg98.0%
distribute-neg-frac298.0%
+-commutative98.0%
distribute-neg-in98.0%
unsub-neg98.0%
Simplified98.0%
Taylor expanded in t1 around 0 82.1%
associate-*r/82.1%
mul-1-neg82.1%
Simplified82.1%
if -3.4000000000000003e48 < u < 3.1999999999999999e-46Initial program 70.7%
associate-*l/80.3%
*-commutative80.3%
Simplified80.3%
Taylor expanded in t1 around inf 85.3%
associate-*r/85.3%
neg-mul-185.3%
Simplified85.3%
Final simplification83.6%
(FPCore (u v t1) :precision binary64 (if (<= u -1.7e+49) (/ (* t1 (/ v (- u))) (+ t1 u)) (if (<= u 1.2e-44) (- (/ v t1)) (* (/ v (+ t1 u)) (/ t1 (- u))))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.7e+49) {
tmp = (t1 * (v / -u)) / (t1 + u);
} else if (u <= 1.2e-44) {
tmp = -(v / t1);
} else {
tmp = (v / (t1 + 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 (u <= (-1.7d+49)) then
tmp = (t1 * (v / -u)) / (t1 + u)
else if (u <= 1.2d-44) then
tmp = -(v / t1)
else
tmp = (v / (t1 + u)) * (t1 / -u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -1.7e+49) {
tmp = (t1 * (v / -u)) / (t1 + u);
} else if (u <= 1.2e-44) {
tmp = -(v / t1);
} else {
tmp = (v / (t1 + u)) * (t1 / -u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.7e+49: tmp = (t1 * (v / -u)) / (t1 + u) elif u <= 1.2e-44: tmp = -(v / t1) else: tmp = (v / (t1 + u)) * (t1 / -u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.7e+49) tmp = Float64(Float64(t1 * Float64(v / Float64(-u))) / Float64(t1 + u)); elseif (u <= 1.2e-44) tmp = Float64(-Float64(v / t1)); else tmp = Float64(Float64(v / Float64(t1 + u)) * Float64(t1 / Float64(-u))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -1.7e+49) tmp = (t1 * (v / -u)) / (t1 + u); elseif (u <= 1.2e-44) tmp = -(v / t1); else tmp = (v / (t1 + u)) * (t1 / -u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.7e+49], N[(N[(t1 * N[(v / (-u)), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 1.2e-44], (-N[(v / t1), $MachinePrecision]), N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(t1 / (-u)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.7 \cdot 10^{+49}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{-u}}{t1 + u}\\
\mathbf{elif}\;u \leq 1.2 \cdot 10^{-44}:\\
\;\;\;\;-\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{t1 + u} \cdot \frac{t1}{-u}\\
\end{array}
\end{array}
if u < -1.7e49Initial program 77.8%
associate-*l/78.4%
*-commutative78.4%
Simplified78.4%
*-commutative78.4%
associate-*l/77.8%
times-frac99.9%
frac-2neg99.9%
remove-double-neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
frac-2neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*r/99.8%
Applied egg-rr99.8%
Taylor expanded in t1 around 0 78.0%
mul-1-neg78.0%
associate-/l*85.5%
distribute-lft-neg-in85.5%
Simplified85.5%
if -1.7e49 < u < 1.20000000000000004e-44Initial program 70.7%
associate-*l/80.3%
*-commutative80.3%
Simplified80.3%
Taylor expanded in t1 around inf 85.3%
associate-*r/85.3%
neg-mul-185.3%
Simplified85.3%
if 1.20000000000000004e-44 < u Initial program 77.3%
times-frac96.9%
distribute-frac-neg96.9%
distribute-neg-frac296.9%
+-commutative96.9%
distribute-neg-in96.9%
unsub-neg96.9%
Simplified96.9%
Taylor expanded in t1 around 0 80.0%
associate-*r/80.0%
mul-1-neg80.0%
Simplified80.0%
Final simplification83.6%
(FPCore (u v t1) :precision binary64 (if (<= t1 -9.6e-107) (/ -1.0 (/ (+ t1 u) v)) (if (<= t1 5.6e-39) (/ v (/ (- u) (/ t1 u))) (/ v (- (* u -2.0) t1)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -9.6e-107) {
tmp = -1.0 / ((t1 + u) / v);
} else if (t1 <= 5.6e-39) {
tmp = v / (-u / (t1 / u));
} else {
tmp = v / ((u * -2.0) - 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 <= (-9.6d-107)) then
tmp = (-1.0d0) / ((t1 + u) / v)
else if (t1 <= 5.6d-39) then
tmp = v / (-u / (t1 / u))
else
tmp = v / ((u * (-2.0d0)) - t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -9.6e-107) {
tmp = -1.0 / ((t1 + u) / v);
} else if (t1 <= 5.6e-39) {
tmp = v / (-u / (t1 / u));
} else {
tmp = v / ((u * -2.0) - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -9.6e-107: tmp = -1.0 / ((t1 + u) / v) elif t1 <= 5.6e-39: tmp = v / (-u / (t1 / u)) else: tmp = v / ((u * -2.0) - t1) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -9.6e-107) tmp = Float64(-1.0 / Float64(Float64(t1 + u) / v)); elseif (t1 <= 5.6e-39) tmp = Float64(v / Float64(Float64(-u) / Float64(t1 / u))); else tmp = Float64(v / Float64(Float64(u * -2.0) - t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -9.6e-107) tmp = -1.0 / ((t1 + u) / v); elseif (t1 <= 5.6e-39) tmp = v / (-u / (t1 / u)); else tmp = v / ((u * -2.0) - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -9.6e-107], N[(-1.0 / N[(N[(t1 + u), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 5.6e-39], N[(v / N[((-u) / N[(t1 / u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -9.6 \cdot 10^{-107}:\\
\;\;\;\;\frac{-1}{\frac{t1 + u}{v}}\\
\mathbf{elif}\;t1 \leq 5.6 \cdot 10^{-39}:\\
\;\;\;\;\frac{v}{\frac{-u}{\frac{t1}{u}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u \cdot -2 - t1}\\
\end{array}
\end{array}
if t1 < -9.59999999999999977e-107Initial program 64.6%
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 77.4%
clear-num78.0%
un-div-inv78.0%
Applied egg-rr78.0%
if -9.59999999999999977e-107 < t1 < 5.6000000000000003e-39Initial program 90.1%
associate-*l/87.1%
*-commutative87.1%
Simplified87.1%
associate-*r/90.1%
*-commutative90.1%
times-frac95.1%
frac-2neg95.1%
remove-double-neg95.1%
+-commutative95.1%
distribute-neg-in95.1%
sub-neg95.1%
clear-num94.4%
frac-2neg94.4%
frac-times94.1%
*-un-lft-identity94.1%
+-commutative94.1%
distribute-neg-in94.1%
sub-neg94.1%
Applied egg-rr94.1%
Taylor expanded in t1 around 0 76.9%
*-commutative76.9%
clear-num76.9%
un-div-inv77.1%
+-commutative77.1%
Applied egg-rr77.1%
Taylor expanded in u around inf 81.4%
if 5.6000000000000003e-39 < t1 Initial program 64.4%
associate-*l/70.6%
*-commutative70.6%
Simplified70.6%
associate-*r/64.4%
*-commutative64.4%
times-frac99.9%
frac-2neg99.9%
remove-double-neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
clear-num99.9%
frac-2neg99.9%
frac-times97.1%
*-un-lft-identity97.1%
+-commutative97.1%
distribute-neg-in97.1%
sub-neg97.1%
Applied egg-rr97.1%
Taylor expanded in u around 0 86.3%
*-commutative86.3%
Simplified86.3%
Taylor expanded in v around 0 86.3%
mul-1-neg86.3%
+-commutative86.3%
*-commutative86.3%
fma-undefine86.3%
distribute-neg-frac286.3%
neg-sub086.3%
fma-undefine86.3%
associate--r+86.3%
neg-sub086.3%
distribute-rgt-neg-in86.3%
metadata-eval86.3%
Simplified86.3%
Final simplification81.5%
(FPCore (u v t1) :precision binary64 (if (<= t1 -1e-106) (/ -1.0 (/ (+ t1 u) v)) (if (<= t1 5.8e-39) (/ v (* u (/ u (- t1)))) (/ v (- (* u -2.0) t1)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1e-106) {
tmp = -1.0 / ((t1 + u) / v);
} else if (t1 <= 5.8e-39) {
tmp = v / (u * (u / -t1));
} else {
tmp = v / ((u * -2.0) - 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 <= (-1d-106)) then
tmp = (-1.0d0) / ((t1 + u) / v)
else if (t1 <= 5.8d-39) then
tmp = v / (u * (u / -t1))
else
tmp = v / ((u * (-2.0d0)) - t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1e-106) {
tmp = -1.0 / ((t1 + u) / v);
} else if (t1 <= 5.8e-39) {
tmp = v / (u * (u / -t1));
} else {
tmp = v / ((u * -2.0) - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -1e-106: tmp = -1.0 / ((t1 + u) / v) elif t1 <= 5.8e-39: tmp = v / (u * (u / -t1)) else: tmp = v / ((u * -2.0) - t1) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -1e-106) tmp = Float64(-1.0 / Float64(Float64(t1 + u) / v)); elseif (t1 <= 5.8e-39) tmp = Float64(v / Float64(u * Float64(u / Float64(-t1)))); else tmp = Float64(v / Float64(Float64(u * -2.0) - t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -1e-106) tmp = -1.0 / ((t1 + u) / v); elseif (t1 <= 5.8e-39) tmp = v / (u * (u / -t1)); else tmp = v / ((u * -2.0) - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -1e-106], N[(-1.0 / N[(N[(t1 + u), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 5.8e-39], N[(v / N[(u * N[(u / (-t1)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1 \cdot 10^{-106}:\\
\;\;\;\;\frac{-1}{\frac{t1 + u}{v}}\\
\mathbf{elif}\;t1 \leq 5.8 \cdot 10^{-39}:\\
\;\;\;\;\frac{v}{u \cdot \frac{u}{-t1}}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u \cdot -2 - t1}\\
\end{array}
\end{array}
if t1 < -9.99999999999999941e-107Initial program 64.6%
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 77.4%
clear-num78.0%
un-div-inv78.0%
Applied egg-rr78.0%
if -9.99999999999999941e-107 < t1 < 5.79999999999999975e-39Initial program 90.1%
associate-*l/87.1%
*-commutative87.1%
Simplified87.1%
associate-*r/90.1%
*-commutative90.1%
times-frac95.1%
frac-2neg95.1%
remove-double-neg95.1%
+-commutative95.1%
distribute-neg-in95.1%
sub-neg95.1%
clear-num94.4%
frac-2neg94.4%
frac-times94.1%
*-un-lft-identity94.1%
+-commutative94.1%
distribute-neg-in94.1%
sub-neg94.1%
Applied egg-rr94.1%
Taylor expanded in t1 around 0 76.9%
Taylor expanded in t1 around 0 81.3%
if 5.79999999999999975e-39 < t1 Initial program 64.4%
associate-*l/70.6%
*-commutative70.6%
Simplified70.6%
associate-*r/64.4%
*-commutative64.4%
times-frac99.9%
frac-2neg99.9%
remove-double-neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
clear-num99.9%
frac-2neg99.9%
frac-times97.1%
*-un-lft-identity97.1%
+-commutative97.1%
distribute-neg-in97.1%
sub-neg97.1%
Applied egg-rr97.1%
Taylor expanded in u around 0 86.3%
*-commutative86.3%
Simplified86.3%
Taylor expanded in v around 0 86.3%
mul-1-neg86.3%
+-commutative86.3%
*-commutative86.3%
fma-undefine86.3%
distribute-neg-frac286.3%
neg-sub086.3%
fma-undefine86.3%
associate--r+86.3%
neg-sub086.3%
distribute-rgt-neg-in86.3%
metadata-eval86.3%
Simplified86.3%
Final simplification81.5%
(FPCore (u v t1) :precision binary64 (if (or (<= u -2.9e+116) (not (<= u 1.75e+230))) (/ -1.0 (/ u v)) (- (/ v t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.9e+116) || !(u <= 1.75e+230)) {
tmp = -1.0 / (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 <= (-2.9d+116)) .or. (.not. (u <= 1.75d+230))) then
tmp = (-1.0d0) / (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 <= -2.9e+116) || !(u <= 1.75e+230)) {
tmp = -1.0 / (u / v);
} else {
tmp = -(v / t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -2.9e+116) or not (u <= 1.75e+230): tmp = -1.0 / (u / v) else: tmp = -(v / t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -2.9e+116) || !(u <= 1.75e+230)) tmp = Float64(-1.0 / 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 <= -2.9e+116) || ~((u <= 1.75e+230))) tmp = -1.0 / (u / v); else tmp = -(v / t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2.9e+116], N[Not[LessEqual[u, 1.75e+230]], $MachinePrecision]], N[(-1.0 / N[(u / v), $MachinePrecision]), $MachinePrecision], (-N[(v / t1), $MachinePrecision])]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.9 \cdot 10^{+116} \lor \neg \left(u \leq 1.75 \cdot 10^{+230}\right):\\
\;\;\;\;\frac{-1}{\frac{u}{v}}\\
\mathbf{else}:\\
\;\;\;\;-\frac{v}{t1}\\
\end{array}
\end{array}
if u < -2.9000000000000001e116 or 1.75e230 < u Initial program 79.6%
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 53.9%
clear-num55.6%
un-div-inv55.6%
Applied egg-rr55.6%
Taylor expanded in t1 around 0 53.5%
if -2.9000000000000001e116 < u < 1.75e230Initial program 72.8%
associate-*l/78.4%
*-commutative78.4%
Simplified78.4%
Taylor expanded in t1 around inf 64.6%
associate-*r/64.6%
neg-mul-164.6%
Simplified64.6%
Final simplification62.0%
(FPCore (u v t1) :precision binary64 (if (or (<= u -2.7e+116) (not (<= u 1.75e+230))) (* (/ v u) -0.5) (- (/ v t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.7e+116) || !(u <= 1.75e+230)) {
tmp = (v / u) * -0.5;
} 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.7d+116)) .or. (.not. (u <= 1.75d+230))) then
tmp = (v / u) * (-0.5d0)
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.7e+116) || !(u <= 1.75e+230)) {
tmp = (v / u) * -0.5;
} else {
tmp = -(v / t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -2.7e+116) or not (u <= 1.75e+230): tmp = (v / u) * -0.5 else: tmp = -(v / t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -2.7e+116) || !(u <= 1.75e+230)) tmp = Float64(Float64(v / u) * -0.5); else tmp = Float64(-Float64(v / t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -2.7e+116) || ~((u <= 1.75e+230))) tmp = (v / u) * -0.5; else tmp = -(v / t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2.7e+116], N[Not[LessEqual[u, 1.75e+230]], $MachinePrecision]], N[(N[(v / u), $MachinePrecision] * -0.5), $MachinePrecision], (-N[(v / t1), $MachinePrecision])]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.7 \cdot 10^{+116} \lor \neg \left(u \leq 1.75 \cdot 10^{+230}\right):\\
\;\;\;\;\frac{v}{u} \cdot -0.5\\
\mathbf{else}:\\
\;\;\;\;-\frac{v}{t1}\\
\end{array}
\end{array}
if u < -2.7e116 or 1.75e230 < u Initial program 79.6%
associate-*l/80.1%
*-commutative80.1%
Simplified80.1%
associate-*r/79.6%
*-commutative79.6%
times-frac99.9%
frac-2neg99.9%
remove-double-neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
clear-num99.9%
frac-2neg99.9%
frac-times89.4%
*-un-lft-identity89.4%
+-commutative89.4%
distribute-neg-in89.4%
sub-neg89.4%
Applied egg-rr89.4%
Taylor expanded in u around 0 54.5%
*-commutative54.5%
Simplified54.5%
Taylor expanded in t1 around 0 51.8%
if -2.7e116 < u < 1.75e230Initial program 72.8%
associate-*l/78.4%
*-commutative78.4%
Simplified78.4%
Taylor expanded in t1 around inf 64.6%
associate-*r/64.6%
neg-mul-164.6%
Simplified64.6%
Final simplification61.6%
(FPCore (u v t1) :precision binary64 (if (<= u -2.8e+116) (/ -1.0 (/ u v)) (if (<= u 1.55e+114) (- (/ v t1)) (/ v (+ t1 u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -2.8e+116) {
tmp = -1.0 / (u / v);
} else if (u <= 1.55e+114) {
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 <= (-2.8d+116)) then
tmp = (-1.0d0) / (u / v)
else if (u <= 1.55d+114) 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 <= -2.8e+116) {
tmp = -1.0 / (u / v);
} else if (u <= 1.55e+114) {
tmp = -(v / t1);
} else {
tmp = v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -2.8e+116: tmp = -1.0 / (u / v) elif u <= 1.55e+114: tmp = -(v / t1) else: tmp = v / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -2.8e+116) tmp = Float64(-1.0 / Float64(u / v)); elseif (u <= 1.55e+114) 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 <= -2.8e+116) tmp = -1.0 / (u / v); elseif (u <= 1.55e+114) tmp = -(v / t1); else tmp = v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -2.8e+116], N[(-1.0 / N[(u / v), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 1.55e+114], (-N[(v / t1), $MachinePrecision]), N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.8 \cdot 10^{+116}:\\
\;\;\;\;\frac{-1}{\frac{u}{v}}\\
\mathbf{elif}\;u \leq 1.55 \cdot 10^{+114}:\\
\;\;\;\;-\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{t1 + u}\\
\end{array}
\end{array}
if u < -2.80000000000000004e116Initial program 74.9%
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 46.4%
clear-num48.3%
un-div-inv48.3%
Applied egg-rr48.3%
Taylor expanded in t1 around 0 44.8%
if -2.80000000000000004e116 < u < 1.55e114Initial program 73.5%
associate-*l/79.9%
*-commutative79.9%
Simplified79.9%
Taylor expanded in t1 around inf 70.6%
associate-*r/70.6%
neg-mul-170.6%
Simplified70.6%
if 1.55e114 < u Initial program 77.2%
times-frac98.6%
distribute-frac-neg98.6%
distribute-neg-frac298.6%
+-commutative98.6%
distribute-neg-in98.6%
unsub-neg98.6%
Simplified98.6%
Taylor expanded in t1 around inf 52.3%
add-sqr-sqrt43.9%
sqrt-unprod56.7%
mul-1-neg56.7%
mul-1-neg56.7%
sqr-neg56.7%
sqrt-unprod45.0%
add-sqr-sqrt46.3%
Applied egg-rr46.3%
Final simplification62.0%
(FPCore (u v t1) :precision binary64 (if (or (<= u -2.35e+116) (not (<= u 1.75e+230))) (/ v (- u)) (- (/ v t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.35e+116) || !(u <= 1.75e+230)) {
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.35d+116)) .or. (.not. (u <= 1.75d+230))) 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.35e+116) || !(u <= 1.75e+230)) {
tmp = v / -u;
} else {
tmp = -(v / t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -2.35e+116) or not (u <= 1.75e+230): tmp = v / -u else: tmp = -(v / t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -2.35e+116) || !(u <= 1.75e+230)) 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 <= -2.35e+116) || ~((u <= 1.75e+230))) tmp = v / -u; else tmp = -(v / t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2.35e+116], N[Not[LessEqual[u, 1.75e+230]], $MachinePrecision]], N[(v / (-u)), $MachinePrecision], (-N[(v / t1), $MachinePrecision])]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.35 \cdot 10^{+116} \lor \neg \left(u \leq 1.75 \cdot 10^{+230}\right):\\
\;\;\;\;\frac{v}{-u}\\
\mathbf{else}:\\
\;\;\;\;-\frac{v}{t1}\\
\end{array}
\end{array}
if u < -2.3500000000000002e116 or 1.75e230 < u Initial program 79.6%
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 53.9%
Taylor expanded in t1 around 0 51.8%
associate-*r/51.8%
mul-1-neg51.8%
Simplified51.8%
if -2.3500000000000002e116 < u < 1.75e230Initial program 72.8%
associate-*l/78.4%
*-commutative78.4%
Simplified78.4%
Taylor expanded in t1 around inf 64.6%
associate-*r/64.6%
neg-mul-164.6%
Simplified64.6%
Final simplification61.6%
(FPCore (u v t1) :precision binary64 (if (or (<= u -2.5e+116) (not (<= u 1.75e+230))) (/ v u) (- (/ v t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.5e+116) || !(u <= 1.75e+230)) {
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.5d+116)) .or. (.not. (u <= 1.75d+230))) 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.5e+116) || !(u <= 1.75e+230)) {
tmp = v / u;
} else {
tmp = -(v / t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -2.5e+116) or not (u <= 1.75e+230): tmp = v / u else: tmp = -(v / t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -2.5e+116) || !(u <= 1.75e+230)) 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.5e+116) || ~((u <= 1.75e+230))) tmp = v / u; else tmp = -(v / t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2.5e+116], N[Not[LessEqual[u, 1.75e+230]], $MachinePrecision]], N[(v / u), $MachinePrecision], (-N[(v / t1), $MachinePrecision])]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.5 \cdot 10^{+116} \lor \neg \left(u \leq 1.75 \cdot 10^{+230}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;-\frac{v}{t1}\\
\end{array}
\end{array}
if u < -2.50000000000000013e116 or 1.75e230 < u Initial program 79.6%
associate-*l/80.1%
*-commutative80.1%
Simplified80.1%
*-commutative80.1%
associate-*l/79.6%
times-frac99.9%
frac-2neg99.9%
remove-double-neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
frac-2neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*r/99.8%
Applied egg-rr99.8%
Taylor expanded in t1 around inf 53.9%
mul-1-neg53.9%
Simplified53.9%
div-inv53.9%
add-sqr-sqrt18.3%
sqrt-unprod50.9%
sqr-neg50.9%
sqrt-unprod33.0%
add-sqr-sqrt51.4%
+-commutative51.4%
Applied egg-rr51.4%
associate-*r/51.4%
*-rgt-identity51.4%
Simplified51.4%
Taylor expanded in u around inf 51.4%
if -2.50000000000000013e116 < u < 1.75e230Initial program 72.8%
associate-*l/78.4%
*-commutative78.4%
Simplified78.4%
Taylor expanded in t1 around inf 64.6%
associate-*r/64.6%
neg-mul-164.6%
Simplified64.6%
Final simplification61.5%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -3.5e+117) (not (<= t1 8.5e+62))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -3.5e+117) || !(t1 <= 8.5e+62)) {
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.5d+117)) .or. (.not. (t1 <= 8.5d+62))) 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.5e+117) || !(t1 <= 8.5e+62)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -3.5e+117) or not (t1 <= 8.5e+62): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -3.5e+117) || !(t1 <= 8.5e+62)) 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.5e+117) || ~((t1 <= 8.5e+62))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -3.5e+117], N[Not[LessEqual[t1, 8.5e+62]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -3.5 \cdot 10^{+117} \lor \neg \left(t1 \leq 8.5 \cdot 10^{+62}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -3.49999999999999983e117 or 8.4999999999999997e62 < t1 Initial program 48.2%
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.7%
Taylor expanded in u around inf 35.3%
if -3.49999999999999983e117 < t1 < 8.4999999999999997e62Initial program 86.3%
associate-*l/89.1%
*-commutative89.1%
Simplified89.1%
*-commutative89.1%
associate-*l/86.3%
times-frac97.2%
frac-2neg97.2%
remove-double-neg97.2%
+-commutative97.2%
distribute-neg-in97.2%
sub-neg97.2%
frac-2neg97.2%
+-commutative97.2%
distribute-neg-in97.2%
sub-neg97.2%
associate-*r/97.7%
Applied egg-rr97.7%
Taylor expanded in t1 around inf 52.8%
mul-1-neg52.8%
Simplified52.8%
div-inv52.7%
add-sqr-sqrt26.9%
sqrt-unprod36.6%
sqr-neg36.6%
sqrt-unprod12.7%
add-sqr-sqrt21.0%
+-commutative21.0%
Applied egg-rr21.0%
associate-*r/21.0%
*-rgt-identity21.0%
Simplified21.0%
Taylor expanded in u around inf 23.7%
Final simplification27.3%
(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.4%
times-frac98.0%
distribute-frac-neg98.0%
distribute-neg-frac298.0%
+-commutative98.0%
distribute-neg-in98.0%
unsub-neg98.0%
Simplified98.0%
Final simplification98.0%
(FPCore (u v t1) :precision binary64 (/ -1.0 (/ (+ t1 u) v)))
double code(double u, double v, double t1) {
return -1.0 / ((t1 + u) / v);
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-1.0d0) / ((t1 + u) / v)
end function
public static double code(double u, double v, double t1) {
return -1.0 / ((t1 + u) / v);
}
def code(u, v, t1): return -1.0 / ((t1 + u) / v)
function code(u, v, t1) return Float64(-1.0 / Float64(Float64(t1 + u) / v)) end
function tmp = code(u, v, t1) tmp = -1.0 / ((t1 + u) / v); end
code[u_, v_, t1_] := N[(-1.0 / N[(N[(t1 + u), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1}{\frac{t1 + u}{v}}
\end{array}
Initial program 74.4%
times-frac98.0%
distribute-frac-neg98.0%
distribute-neg-frac298.0%
+-commutative98.0%
distribute-neg-in98.0%
unsub-neg98.0%
Simplified98.0%
Taylor expanded in t1 around inf 63.9%
clear-num64.7%
un-div-inv64.7%
Applied egg-rr64.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 74.4%
associate-*l/78.8%
*-commutative78.8%
Simplified78.8%
*-commutative78.8%
associate-*l/74.4%
times-frac98.0%
frac-2neg98.0%
remove-double-neg98.0%
+-commutative98.0%
distribute-neg-in98.0%
sub-neg98.0%
frac-2neg98.0%
+-commutative98.0%
distribute-neg-in98.0%
sub-neg98.0%
associate-*r/98.4%
Applied egg-rr98.4%
Taylor expanded in t1 around inf 63.9%
mul-1-neg63.9%
Simplified63.9%
Final simplification63.9%
(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.4%
times-frac98.0%
distribute-frac-neg98.0%
distribute-neg-frac298.0%
+-commutative98.0%
distribute-neg-in98.0%
unsub-neg98.0%
Simplified98.0%
Taylor expanded in t1 around inf 57.5%
Taylor expanded in u around inf 13.3%
herbie shell --seed 2024172
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))