
(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.6%
associate-*l/77.5%
*-commutative77.5%
Simplified77.5%
associate-*r/74.6%
*-commutative74.6%
times-frac99.1%
frac-2neg99.1%
+-commutative99.1%
distribute-neg-in99.1%
sub-neg99.1%
associate-*r/99.1%
add-sqr-sqrt48.2%
sqrt-unprod49.7%
sqr-neg49.7%
sqrt-unprod22.3%
add-sqr-sqrt41.8%
sub-neg41.8%
+-commutative41.8%
add-sqr-sqrt19.5%
sqrt-unprod50.1%
sqr-neg50.1%
sqrt-unprod37.4%
add-sqr-sqrt19.0%
sqrt-unprod41.3%
sqr-neg41.3%
Applied egg-rr99.1%
Final simplification99.1%
(FPCore (u v t1)
:precision binary64
(if (<= t1 -1.6e+134)
(- (/ v t1))
(if (<= t1 8.5e+120)
(* v (/ t1 (* (+ t1 u) (- (- u) t1))))
(/ -1.0 (/ (+ t1 u) v)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1.6e+134) {
tmp = -(v / t1);
} else if (t1 <= 8.5e+120) {
tmp = v * (t1 / ((t1 + u) * (-u - t1)));
} else {
tmp = -1.0 / ((t1 + u) / v);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (t1 <= (-1.6d+134)) then
tmp = -(v / t1)
else if (t1 <= 8.5d+120) then
tmp = v * (t1 / ((t1 + u) * (-u - t1)))
else
tmp = (-1.0d0) / ((t1 + u) / v)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1.6e+134) {
tmp = -(v / t1);
} else if (t1 <= 8.5e+120) {
tmp = v * (t1 / ((t1 + u) * (-u - t1)));
} else {
tmp = -1.0 / ((t1 + u) / v);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -1.6e+134: tmp = -(v / t1) elif t1 <= 8.5e+120: tmp = v * (t1 / ((t1 + u) * (-u - t1))) else: tmp = -1.0 / ((t1 + u) / v) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -1.6e+134) tmp = Float64(-Float64(v / t1)); elseif (t1 <= 8.5e+120) tmp = Float64(v * Float64(t1 / Float64(Float64(t1 + u) * Float64(Float64(-u) - t1)))); else tmp = Float64(-1.0 / Float64(Float64(t1 + u) / v)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -1.6e+134) tmp = -(v / t1); elseif (t1 <= 8.5e+120) tmp = v * (t1 / ((t1 + u) * (-u - t1))); else tmp = -1.0 / ((t1 + u) / v); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -1.6e+134], (-N[(v / t1), $MachinePrecision]), If[LessEqual[t1, 8.5e+120], N[(v * N[(t1 / N[(N[(t1 + u), $MachinePrecision] * N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 / N[(N[(t1 + u), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.6 \cdot 10^{+134}:\\
\;\;\;\;-\frac{v}{t1}\\
\mathbf{elif}\;t1 \leq 8.5 \cdot 10^{+120}:\\
\;\;\;\;v \cdot \frac{t1}{\left(t1 + u\right) \cdot \left(\left(-u\right) - t1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\frac{t1 + u}{v}}\\
\end{array}
\end{array}
if t1 < -1.6e134Initial program 40.7%
associate-*l/44.6%
*-commutative44.6%
Simplified44.6%
Taylor expanded in t1 around inf 83.1%
associate-*r/83.1%
neg-mul-183.1%
Simplified83.1%
if -1.6e134 < t1 < 8.50000000000000026e120Initial program 84.2%
associate-*l/86.8%
*-commutative86.8%
Simplified86.8%
if 8.50000000000000026e120 < t1 Initial program 56.2%
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 93.3%
clear-num93.5%
un-div-inv93.5%
Applied egg-rr93.5%
Final simplification87.3%
(FPCore (u v t1) :precision binary64 (if (<= u -3.6e-75) (/ (/ t1 (+ t1 u)) (/ u (- v))) (if (<= u 4.6e-51) (- (/ v t1)) (* t1 (/ (/ v u) (- t1 u))))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -3.6e-75) {
tmp = (t1 / (t1 + u)) / (u / -v);
} else if (u <= 4.6e-51) {
tmp = -(v / t1);
} else {
tmp = t1 * ((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 (u <= (-3.6d-75)) then
tmp = (t1 / (t1 + u)) / (u / -v)
else if (u <= 4.6d-51) then
tmp = -(v / t1)
else
tmp = t1 * ((v / u) / (t1 - u))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -3.6e-75) {
tmp = (t1 / (t1 + u)) / (u / -v);
} else if (u <= 4.6e-51) {
tmp = -(v / t1);
} else {
tmp = t1 * ((v / u) / (t1 - u));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -3.6e-75: tmp = (t1 / (t1 + u)) / (u / -v) elif u <= 4.6e-51: tmp = -(v / t1) else: tmp = t1 * ((v / u) / (t1 - u)) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -3.6e-75) tmp = Float64(Float64(t1 / Float64(t1 + u)) / Float64(u / Float64(-v))); elseif (u <= 4.6e-51) tmp = Float64(-Float64(v / t1)); else tmp = Float64(t1 * Float64(Float64(v / u) / Float64(t1 - u))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -3.6e-75) tmp = (t1 / (t1 + u)) / (u / -v); elseif (u <= 4.6e-51) tmp = -(v / t1); else tmp = t1 * ((v / u) / (t1 - u)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -3.6e-75], N[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[(u / (-v)), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 4.6e-51], (-N[(v / t1), $MachinePrecision]), N[(t1 * N[(N[(v / u), $MachinePrecision] / N[(t1 - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.6 \cdot 10^{-75}:\\
\;\;\;\;\frac{\frac{t1}{t1 + u}}{\frac{u}{-v}}\\
\mathbf{elif}\;u \leq 4.6 \cdot 10^{-51}:\\
\;\;\;\;-\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{t1 - u}\\
\end{array}
\end{array}
if u < -3.6e-75Initial program 77.4%
times-frac98.8%
distribute-frac-neg98.8%
distribute-neg-frac298.8%
+-commutative98.8%
distribute-neg-in98.8%
unsub-neg98.8%
Simplified98.8%
Taylor expanded in t1 around 0 79.0%
*-commutative79.0%
clear-num79.3%
frac-2neg79.3%
frac-times76.8%
*-un-lft-identity76.8%
neg-sub076.8%
add-sqr-sqrt76.7%
sqrt-unprod69.6%
sqr-neg69.6%
sqrt-unprod0.0%
add-sqr-sqrt51.3%
associate-+l-51.3%
neg-sub051.3%
add-sqr-sqrt51.3%
sqrt-unprod51.4%
sqr-neg51.4%
sqrt-unprod0.0%
add-sqr-sqrt76.8%
+-commutative76.8%
Applied egg-rr76.8%
*-commutative76.8%
associate-/r*79.4%
Simplified79.4%
if -3.6e-75 < u < 4.60000000000000004e-51Initial program 62.5%
associate-*l/69.4%
*-commutative69.4%
Simplified69.4%
Taylor expanded in t1 around inf 84.2%
associate-*r/84.2%
neg-mul-184.2%
Simplified84.2%
if 4.60000000000000004e-51 < u Initial program 83.8%
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 0 81.7%
frac-times75.0%
frac-2neg75.0%
distribute-rgt-neg-out75.0%
add-sqr-sqrt33.6%
sqrt-unprod65.5%
sqr-neg65.5%
sqrt-unprod34.0%
add-sqr-sqrt56.6%
*-commutative56.6%
add-sqr-sqrt0.0%
sqrt-unprod75.1%
sqr-neg75.1%
sqrt-unprod75.0%
add-sqr-sqrt75.1%
Applied egg-rr75.1%
distribute-frac-neg275.1%
associate-/r*78.0%
associate-*r/82.8%
associate-*r/87.1%
Simplified87.1%
Final simplification83.4%
(FPCore (u v t1) :precision binary64 (if (<= u -3.6e-75) (/ (/ t1 (/ u v)) (- u)) (if (<= u 3.4e-51) (- (/ v t1)) (* t1 (/ (/ v u) (- t1 u))))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -3.6e-75) {
tmp = (t1 / (u / v)) / -u;
} else if (u <= 3.4e-51) {
tmp = -(v / t1);
} else {
tmp = t1 * ((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 (u <= (-3.6d-75)) then
tmp = (t1 / (u / v)) / -u
else if (u <= 3.4d-51) then
tmp = -(v / t1)
else
tmp = t1 * ((v / u) / (t1 - u))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -3.6e-75) {
tmp = (t1 / (u / v)) / -u;
} else if (u <= 3.4e-51) {
tmp = -(v / t1);
} else {
tmp = t1 * ((v / u) / (t1 - u));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -3.6e-75: tmp = (t1 / (u / v)) / -u elif u <= 3.4e-51: tmp = -(v / t1) else: tmp = t1 * ((v / u) / (t1 - u)) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -3.6e-75) tmp = Float64(Float64(t1 / Float64(u / v)) / Float64(-u)); elseif (u <= 3.4e-51) tmp = Float64(-Float64(v / t1)); else tmp = Float64(t1 * Float64(Float64(v / u) / Float64(t1 - u))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -3.6e-75) tmp = (t1 / (u / v)) / -u; elseif (u <= 3.4e-51) tmp = -(v / t1); else tmp = t1 * ((v / u) / (t1 - u)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -3.6e-75], N[(N[(t1 / N[(u / v), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision], If[LessEqual[u, 3.4e-51], (-N[(v / t1), $MachinePrecision]), N[(t1 * N[(N[(v / u), $MachinePrecision] / N[(t1 - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.6 \cdot 10^{-75}:\\
\;\;\;\;\frac{\frac{t1}{\frac{u}{v}}}{-u}\\
\mathbf{elif}\;u \leq 3.4 \cdot 10^{-51}:\\
\;\;\;\;-\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{t1 - u}\\
\end{array}
\end{array}
if u < -3.6e-75Initial program 77.4%
times-frac98.8%
distribute-frac-neg98.8%
distribute-neg-frac298.8%
+-commutative98.8%
distribute-neg-in98.8%
unsub-neg98.8%
Simplified98.8%
Taylor expanded in t1 around 0 79.0%
Taylor expanded in t1 around 0 78.3%
associate-*r/78.3%
mul-1-neg78.3%
Simplified78.3%
*-commutative78.3%
frac-2neg78.3%
associate-*l/78.3%
add-sqr-sqrt39.4%
sqrt-unprod51.0%
sqr-neg51.0%
sqrt-unprod20.5%
add-sqr-sqrt44.5%
*-commutative44.5%
associate-*l/44.4%
associate-*r/45.5%
clear-num46.5%
un-div-inv46.5%
add-sqr-sqrt22.6%
sqrt-unprod54.2%
sqr-neg54.2%
sqrt-unprod41.4%
add-sqr-sqrt79.3%
Applied egg-rr79.3%
if -3.6e-75 < u < 3.40000000000000003e-51Initial program 62.5%
associate-*l/69.4%
*-commutative69.4%
Simplified69.4%
Taylor expanded in t1 around inf 84.2%
associate-*r/84.2%
neg-mul-184.2%
Simplified84.2%
if 3.40000000000000003e-51 < u Initial program 83.8%
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 0 81.7%
frac-times75.0%
frac-2neg75.0%
distribute-rgt-neg-out75.0%
add-sqr-sqrt33.6%
sqrt-unprod65.5%
sqr-neg65.5%
sqrt-unprod34.0%
add-sqr-sqrt56.6%
*-commutative56.6%
add-sqr-sqrt0.0%
sqrt-unprod75.1%
sqr-neg75.1%
sqrt-unprod75.0%
add-sqr-sqrt75.1%
Applied egg-rr75.1%
distribute-frac-neg275.1%
associate-/r*78.0%
associate-*r/82.8%
associate-*r/87.1%
Simplified87.1%
Final simplification83.4%
(FPCore (u v t1) :precision binary64 (if (or (<= u -3.2e-75) (not (<= u 9.5e-78))) (/ (/ t1 (/ u v)) (- u)) (- (/ v t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.2e-75) || !(u <= 9.5e-78)) {
tmp = (t1 / (u / 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 <= (-3.2d-75)) .or. (.not. (u <= 9.5d-78))) then
tmp = (t1 / (u / 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 <= -3.2e-75) || !(u <= 9.5e-78)) {
tmp = (t1 / (u / v)) / -u;
} else {
tmp = -(v / t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -3.2e-75) or not (u <= 9.5e-78): tmp = (t1 / (u / v)) / -u else: tmp = -(v / t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -3.2e-75) || !(u <= 9.5e-78)) tmp = Float64(Float64(t1 / Float64(u / 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 <= -3.2e-75) || ~((u <= 9.5e-78))) tmp = (t1 / (u / v)) / -u; else tmp = -(v / t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -3.2e-75], N[Not[LessEqual[u, 9.5e-78]], $MachinePrecision]], N[(N[(t1 / N[(u / v), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision], (-N[(v / t1), $MachinePrecision])]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.2 \cdot 10^{-75} \lor \neg \left(u \leq 9.5 \cdot 10^{-78}\right):\\
\;\;\;\;\frac{\frac{t1}{\frac{u}{v}}}{-u}\\
\mathbf{else}:\\
\;\;\;\;-\frac{v}{t1}\\
\end{array}
\end{array}
if u < -3.19999999999999977e-75 or 9.4999999999999997e-78 < u Initial program 80.2%
times-frac98.8%
distribute-frac-neg98.8%
distribute-neg-frac298.8%
+-commutative98.8%
distribute-neg-in98.8%
unsub-neg98.8%
Simplified98.8%
Taylor expanded in t1 around 0 80.1%
Taylor expanded in t1 around 0 79.6%
associate-*r/79.6%
mul-1-neg79.6%
Simplified79.6%
*-commutative79.6%
frac-2neg79.6%
associate-*l/79.7%
add-sqr-sqrt38.0%
sqrt-unprod56.7%
sqr-neg56.7%
sqrt-unprod26.3%
add-sqr-sqrt48.8%
*-commutative48.8%
associate-*l/48.8%
associate-*r/49.3%
clear-num49.9%
un-div-inv49.9%
add-sqr-sqrt25.2%
sqrt-unprod55.2%
sqr-neg55.2%
sqrt-unprod40.2%
add-sqr-sqrt80.7%
Applied egg-rr80.7%
if -3.19999999999999977e-75 < u < 9.4999999999999997e-78Initial program 62.3%
associate-*l/69.5%
*-commutative69.5%
Simplified69.5%
Taylor expanded in t1 around inf 86.0%
associate-*r/86.0%
neg-mul-186.0%
Simplified86.0%
Final simplification82.3%
(FPCore (u v t1) :precision binary64 (if (or (<= u -2.12e-75) (not (<= u 1.05e-77))) (* (/ v u) (/ t1 (- u))) (- (/ v t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.12e-75) || !(u <= 1.05e-77)) {
tmp = (v / u) * (t1 / -u);
} else {
tmp = -(v / t1);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-2.12d-75)) .or. (.not. (u <= 1.05d-77))) then
tmp = (v / u) * (t1 / -u)
else
tmp = -(v / t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.12e-75) || !(u <= 1.05e-77)) {
tmp = (v / u) * (t1 / -u);
} else {
tmp = -(v / t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -2.12e-75) or not (u <= 1.05e-77): tmp = (v / u) * (t1 / -u) else: tmp = -(v / t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -2.12e-75) || !(u <= 1.05e-77)) tmp = Float64(Float64(v / 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 <= -2.12e-75) || ~((u <= 1.05e-77))) tmp = (v / u) * (t1 / -u); else tmp = -(v / t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2.12e-75], N[Not[LessEqual[u, 1.05e-77]], $MachinePrecision]], N[(N[(v / u), $MachinePrecision] * N[(t1 / (-u)), $MachinePrecision]), $MachinePrecision], (-N[(v / t1), $MachinePrecision])]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.12 \cdot 10^{-75} \lor \neg \left(u \leq 1.05 \cdot 10^{-77}\right):\\
\;\;\;\;\frac{v}{u} \cdot \frac{t1}{-u}\\
\mathbf{else}:\\
\;\;\;\;-\frac{v}{t1}\\
\end{array}
\end{array}
if u < -2.12e-75 or 1.05000000000000008e-77 < u Initial program 80.2%
times-frac98.8%
distribute-frac-neg98.8%
distribute-neg-frac298.8%
+-commutative98.8%
distribute-neg-in98.8%
unsub-neg98.8%
Simplified98.8%
Taylor expanded in t1 around 0 80.1%
Taylor expanded in t1 around 0 79.6%
associate-*r/79.6%
mul-1-neg79.6%
Simplified79.6%
if -2.12e-75 < u < 1.05000000000000008e-77Initial program 62.3%
associate-*l/69.5%
*-commutative69.5%
Simplified69.5%
Taylor expanded in t1 around inf 86.0%
associate-*r/86.0%
neg-mul-186.0%
Simplified86.0%
Final simplification81.6%
(FPCore (u v t1) :precision binary64 (if (<= u -3.4e-75) (* (/ v u) (/ t1 (- u))) (if (<= u 6.5e-51) (- (/ v t1)) (/ t1 (* u (/ u (- v)))))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -3.4e-75) {
tmp = (v / u) * (t1 / -u);
} else if (u <= 6.5e-51) {
tmp = -(v / t1);
} else {
tmp = t1 / (u * (u / -v));
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-3.4d-75)) then
tmp = (v / u) * (t1 / -u)
else if (u <= 6.5d-51) then
tmp = -(v / t1)
else
tmp = t1 / (u * (u / -v))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -3.4e-75) {
tmp = (v / u) * (t1 / -u);
} else if (u <= 6.5e-51) {
tmp = -(v / t1);
} else {
tmp = t1 / (u * (u / -v));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -3.4e-75: tmp = (v / u) * (t1 / -u) elif u <= 6.5e-51: tmp = -(v / t1) else: tmp = t1 / (u * (u / -v)) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -3.4e-75) tmp = Float64(Float64(v / u) * Float64(t1 / Float64(-u))); elseif (u <= 6.5e-51) tmp = Float64(-Float64(v / t1)); else tmp = Float64(t1 / Float64(u * Float64(u / Float64(-v)))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -3.4e-75) tmp = (v / u) * (t1 / -u); elseif (u <= 6.5e-51) tmp = -(v / t1); else tmp = t1 / (u * (u / -v)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -3.4e-75], N[(N[(v / u), $MachinePrecision] * N[(t1 / (-u)), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 6.5e-51], (-N[(v / t1), $MachinePrecision]), N[(t1 / N[(u * N[(u / (-v)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.4 \cdot 10^{-75}:\\
\;\;\;\;\frac{v}{u} \cdot \frac{t1}{-u}\\
\mathbf{elif}\;u \leq 6.5 \cdot 10^{-51}:\\
\;\;\;\;-\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{u \cdot \frac{u}{-v}}\\
\end{array}
\end{array}
if u < -3.40000000000000015e-75Initial program 77.4%
times-frac98.8%
distribute-frac-neg98.8%
distribute-neg-frac298.8%
+-commutative98.8%
distribute-neg-in98.8%
unsub-neg98.8%
Simplified98.8%
Taylor expanded in t1 around 0 79.0%
Taylor expanded in t1 around 0 78.3%
associate-*r/78.3%
mul-1-neg78.3%
Simplified78.3%
if -3.40000000000000015e-75 < u < 6.5000000000000003e-51Initial program 62.5%
associate-*l/69.4%
*-commutative69.4%
Simplified69.4%
Taylor expanded in t1 around inf 84.2%
associate-*r/84.2%
neg-mul-184.2%
Simplified84.2%
if 6.5000000000000003e-51 < u Initial program 83.8%
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 0 81.7%
Taylor expanded in t1 around 0 81.7%
associate-*r/81.7%
mul-1-neg81.7%
Simplified81.7%
*-commutative81.7%
clear-num81.5%
frac-2neg81.5%
frac-times82.8%
*-un-lft-identity82.8%
remove-double-neg82.8%
Applied egg-rr82.8%
Final simplification81.7%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.5e+38) (not (<= u 1.55e+136))) (/ t1 (* u (/ u v))) (/ v (- (- u) t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.5e+38) || !(u <= 1.55e+136)) {
tmp = t1 / (u * (u / v));
} 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 ((u <= (-1.5d+38)) .or. (.not. (u <= 1.55d+136))) then
tmp = t1 / (u * (u / v))
else
tmp = v / (-u - t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.5e+38) || !(u <= 1.55e+136)) {
tmp = t1 / (u * (u / v));
} else {
tmp = v / (-u - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.5e+38) or not (u <= 1.55e+136): tmp = t1 / (u * (u / v)) else: tmp = v / (-u - t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.5e+38) || !(u <= 1.55e+136)) tmp = Float64(t1 / Float64(u * Float64(u / v))); else tmp = Float64(v / Float64(Float64(-u) - t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -1.5e+38) || ~((u <= 1.55e+136))) tmp = t1 / (u * (u / v)); else tmp = v / (-u - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.5e+38], N[Not[LessEqual[u, 1.55e+136]], $MachinePrecision]], N[(t1 / N[(u * N[(u / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.5 \cdot 10^{+38} \lor \neg \left(u \leq 1.55 \cdot 10^{+136}\right):\\
\;\;\;\;\frac{t1}{u \cdot \frac{u}{v}}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\end{array}
\end{array}
if u < -1.5000000000000001e38 or 1.54999999999999992e136 < u Initial program 78.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 0 91.6%
Taylor expanded in t1 around 0 91.5%
associate-*r/91.5%
mul-1-neg91.5%
Simplified91.5%
*-commutative91.5%
clear-num91.5%
frac-times89.1%
*-un-lft-identity89.1%
add-sqr-sqrt43.3%
sqrt-unprod69.5%
sqr-neg69.5%
sqrt-unprod37.4%
add-sqr-sqrt71.7%
Applied egg-rr71.7%
if -1.5000000000000001e38 < u < 1.54999999999999992e136Initial program 71.4%
associate-*l/76.2%
*-commutative76.2%
Simplified76.2%
associate-*r/71.4%
*-commutative71.4%
times-frac98.5%
frac-2neg98.5%
+-commutative98.5%
distribute-neg-in98.5%
sub-neg98.5%
associate-*r/98.6%
add-sqr-sqrt48.7%
sqrt-unprod34.4%
sqr-neg34.4%
sqrt-unprod10.5%
add-sqr-sqrt19.0%
sub-neg19.0%
+-commutative19.0%
add-sqr-sqrt8.4%
sqrt-unprod33.3%
sqr-neg33.3%
sqrt-unprod34.8%
add-sqr-sqrt15.0%
sqrt-unprod42.8%
sqr-neg42.8%
Applied egg-rr98.6%
Taylor expanded in t1 around inf 65.6%
mul-1-neg65.6%
Simplified65.6%
Final simplification68.2%
(FPCore (u v t1) :precision binary64 (if (<= u -3.8e+36) (/ t1 (* u (/ u v))) (if (<= u 2.05e+136) (/ v (- (- u) t1)) (/ v (* u (/ u t1))))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -3.8e+36) {
tmp = t1 / (u * (u / v));
} else if (u <= 2.05e+136) {
tmp = v / (-u - t1);
} else {
tmp = v / (u * (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 (u <= (-3.8d+36)) then
tmp = t1 / (u * (u / v))
else if (u <= 2.05d+136) then
tmp = v / (-u - t1)
else
tmp = v / (u * (u / t1))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -3.8e+36) {
tmp = t1 / (u * (u / v));
} else if (u <= 2.05e+136) {
tmp = v / (-u - t1);
} else {
tmp = v / (u * (u / t1));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -3.8e+36: tmp = t1 / (u * (u / v)) elif u <= 2.05e+136: tmp = v / (-u - t1) else: tmp = v / (u * (u / t1)) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -3.8e+36) tmp = Float64(t1 / Float64(u * Float64(u / v))); elseif (u <= 2.05e+136) tmp = Float64(v / Float64(Float64(-u) - t1)); else tmp = Float64(v / Float64(u * Float64(u / t1))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -3.8e+36) tmp = t1 / (u * (u / v)); elseif (u <= 2.05e+136) tmp = v / (-u - t1); else tmp = v / (u * (u / t1)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -3.8e+36], N[(t1 / N[(u * N[(u / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 2.05e+136], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], N[(v / N[(u * N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.8 \cdot 10^{+36}:\\
\;\;\;\;\frac{t1}{u \cdot \frac{u}{v}}\\
\mathbf{elif}\;u \leq 2.05 \cdot 10^{+136}:\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u \cdot \frac{u}{t1}}\\
\end{array}
\end{array}
if u < -3.80000000000000025e36Initial program 76.0%
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 0 87.2%
Taylor expanded in t1 around 0 87.1%
associate-*r/87.1%
mul-1-neg87.1%
Simplified87.1%
*-commutative87.1%
clear-num87.1%
frac-times82.9%
*-un-lft-identity82.9%
add-sqr-sqrt37.7%
sqrt-unprod65.0%
sqr-neg65.0%
sqrt-unprod35.4%
add-sqr-sqrt64.0%
Applied egg-rr64.0%
if -3.80000000000000025e36 < u < 2.0499999999999999e136Initial program 71.4%
associate-*l/76.2%
*-commutative76.2%
Simplified76.2%
associate-*r/71.4%
*-commutative71.4%
times-frac98.5%
frac-2neg98.5%
+-commutative98.5%
distribute-neg-in98.5%
sub-neg98.5%
associate-*r/98.6%
add-sqr-sqrt48.7%
sqrt-unprod34.4%
sqr-neg34.4%
sqrt-unprod10.5%
add-sqr-sqrt19.0%
sub-neg19.0%
+-commutative19.0%
add-sqr-sqrt8.4%
sqrt-unprod33.3%
sqr-neg33.3%
sqrt-unprod34.8%
add-sqr-sqrt15.0%
sqrt-unprod42.8%
sqr-neg42.8%
Applied egg-rr98.6%
Taylor expanded in t1 around inf 65.6%
mul-1-neg65.6%
Simplified65.6%
if 2.0499999999999999e136 < u Initial program 82.7%
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 0 97.8%
Taylor expanded in t1 around 0 97.8%
associate-*r/97.8%
mul-1-neg97.8%
Simplified97.8%
clear-num97.8%
frac-times85.2%
*-un-lft-identity85.2%
add-sqr-sqrt44.8%
sqrt-unprod69.8%
sqr-neg69.8%
sqrt-unprod40.3%
add-sqr-sqrt83.0%
Applied egg-rr83.0%
Final simplification68.3%
(FPCore (u v t1) :precision binary64 (if (<= u -1.4e+150) (/ v (- u)) (if (<= u 3.2e+136) (- (/ v t1)) (/ 1.0 (/ u v)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.4e+150) {
tmp = v / -u;
} else if (u <= 3.2e+136) {
tmp = -(v / t1);
} else {
tmp = 1.0 / (u / v);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-1.4d+150)) then
tmp = v / -u
else if (u <= 3.2d+136) then
tmp = -(v / t1)
else
tmp = 1.0d0 / (u / v)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -1.4e+150) {
tmp = v / -u;
} else if (u <= 3.2e+136) {
tmp = -(v / t1);
} else {
tmp = 1.0 / (u / v);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.4e+150: tmp = v / -u elif u <= 3.2e+136: tmp = -(v / t1) else: tmp = 1.0 / (u / v) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.4e+150) tmp = Float64(v / Float64(-u)); elseif (u <= 3.2e+136) tmp = Float64(-Float64(v / t1)); else tmp = Float64(1.0 / Float64(u / v)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -1.4e+150) tmp = v / -u; elseif (u <= 3.2e+136) tmp = -(v / t1); else tmp = 1.0 / (u / v); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.4e+150], N[(v / (-u)), $MachinePrecision], If[LessEqual[u, 3.2e+136], (-N[(v / t1), $MachinePrecision]), N[(1.0 / N[(u / v), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.4 \cdot 10^{+150}:\\
\;\;\;\;\frac{v}{-u}\\
\mathbf{elif}\;u \leq 3.2 \cdot 10^{+136}:\\
\;\;\;\;-\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{u}{v}}\\
\end{array}
\end{array}
if u < -1.40000000000000005e150Initial program 70.3%
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 37.1%
Taylor expanded in t1 around 0 32.5%
associate-*r/32.5%
mul-1-neg32.5%
Simplified32.5%
if -1.40000000000000005e150 < u < 3.19999999999999988e136Initial program 73.4%
associate-*l/77.6%
*-commutative77.6%
Simplified77.6%
Taylor expanded in t1 around inf 60.8%
associate-*r/60.8%
neg-mul-160.8%
Simplified60.8%
if 3.19999999999999988e136 < u Initial program 82.7%
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 52.3%
associate-*r/52.3%
neg-mul-152.3%
clear-num53.7%
add-sqr-sqrt23.2%
sqrt-unprod53.4%
sqr-neg53.4%
sqrt-unprod30.5%
add-sqr-sqrt51.8%
Applied egg-rr51.8%
Taylor expanded in t1 around 0 51.9%
Final simplification54.6%
(FPCore (u v t1) :precision binary64 (if (or (<= u -3.7e+174) (not (<= u 2.35e+136))) (/ v u) (- (/ v t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.7e+174) || !(u <= 2.35e+136)) {
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 <= (-3.7d+174)) .or. (.not. (u <= 2.35d+136))) 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 <= -3.7e+174) || !(u <= 2.35e+136)) {
tmp = v / u;
} else {
tmp = -(v / t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -3.7e+174) or not (u <= 2.35e+136): tmp = v / u else: tmp = -(v / t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -3.7e+174) || !(u <= 2.35e+136)) 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 <= -3.7e+174) || ~((u <= 2.35e+136))) tmp = v / u; else tmp = -(v / t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -3.7e+174], N[Not[LessEqual[u, 2.35e+136]], $MachinePrecision]], N[(v / u), $MachinePrecision], (-N[(v / t1), $MachinePrecision])]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.7 \cdot 10^{+174} \lor \neg \left(u \leq 2.35 \cdot 10^{+136}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;-\frac{v}{t1}\\
\end{array}
\end{array}
if u < -3.7000000000000002e174 or 2.35000000000000002e136 < u Initial program 80.0%
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 47.3%
associate-*r/47.3%
neg-mul-147.3%
clear-num48.0%
add-sqr-sqrt22.1%
sqrt-unprod46.3%
sqr-neg46.3%
sqrt-unprod24.7%
add-sqr-sqrt44.5%
Applied egg-rr44.5%
Taylor expanded in t1 around 0 44.0%
if -3.7000000000000002e174 < u < 2.35000000000000002e136Initial program 72.0%
associate-*l/76.1%
*-commutative76.1%
Simplified76.1%
Taylor expanded in t1 around inf 59.2%
associate-*r/59.2%
neg-mul-159.2%
Simplified59.2%
Final simplification54.3%
(FPCore (u v t1) :precision binary64 (if (<= u -6.2e+156) (/ v (- u)) (if (<= u 1.8e+136) (- (/ v t1)) (/ v u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -6.2e+156) {
tmp = v / -u;
} else if (u <= 1.8e+136) {
tmp = -(v / t1);
} else {
tmp = v / u;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-6.2d+156)) then
tmp = v / -u
else if (u <= 1.8d+136) then
tmp = -(v / t1)
else
tmp = v / u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -6.2e+156) {
tmp = v / -u;
} else if (u <= 1.8e+136) {
tmp = -(v / t1);
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -6.2e+156: tmp = v / -u elif u <= 1.8e+136: tmp = -(v / t1) else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -6.2e+156) tmp = Float64(v / Float64(-u)); elseif (u <= 1.8e+136) tmp = Float64(-Float64(v / t1)); else tmp = Float64(v / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -6.2e+156) tmp = v / -u; elseif (u <= 1.8e+136) tmp = -(v / t1); else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -6.2e+156], N[(v / (-u)), $MachinePrecision], If[LessEqual[u, 1.8e+136], (-N[(v / t1), $MachinePrecision]), N[(v / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -6.2 \cdot 10^{+156}:\\
\;\;\;\;\frac{v}{-u}\\
\mathbf{elif}\;u \leq 1.8 \cdot 10^{+136}:\\
\;\;\;\;-\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if u < -6.2000000000000004e156Initial program 70.3%
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 37.1%
Taylor expanded in t1 around 0 32.5%
associate-*r/32.5%
mul-1-neg32.5%
Simplified32.5%
if -6.2000000000000004e156 < u < 1.80000000000000003e136Initial program 73.4%
associate-*l/77.6%
*-commutative77.6%
Simplified77.6%
Taylor expanded in t1 around inf 60.8%
associate-*r/60.8%
neg-mul-160.8%
Simplified60.8%
if 1.80000000000000003e136 < u Initial program 82.7%
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 52.3%
associate-*r/52.3%
neg-mul-152.3%
clear-num53.7%
add-sqr-sqrt23.2%
sqrt-unprod53.4%
sqr-neg53.4%
sqrt-unprod30.5%
add-sqr-sqrt51.8%
Applied egg-rr51.8%
Taylor expanded in t1 around 0 50.5%
Final simplification54.4%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -3.5e+158) (not (<= t1 2.2e+111))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -3.5e+158) || !(t1 <= 2.2e+111)) {
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+158)) .or. (.not. (t1 <= 2.2d+111))) 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+158) || !(t1 <= 2.2e+111)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -3.5e+158) or not (t1 <= 2.2e+111): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -3.5e+158) || !(t1 <= 2.2e+111)) 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+158) || ~((t1 <= 2.2e+111))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -3.5e+158], N[Not[LessEqual[t1, 2.2e+111]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -3.5 \cdot 10^{+158} \lor \neg \left(t1 \leq 2.2 \cdot 10^{+111}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -3.5000000000000001e158 or 2.19999999999999999e111 < t1 Initial program 51.0%
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 92.6%
Taylor expanded in u around inf 45.5%
if -3.5000000000000001e158 < t1 < 2.19999999999999999e111Initial program 82.6%
times-frac98.8%
distribute-frac-neg98.8%
distribute-neg-frac298.8%
+-commutative98.8%
distribute-neg-in98.8%
unsub-neg98.8%
Simplified98.8%
Taylor expanded in t1 around inf 43.8%
associate-*r/43.8%
neg-mul-143.8%
clear-num43.9%
add-sqr-sqrt21.4%
sqrt-unprod28.6%
sqr-neg28.6%
sqrt-unprod8.6%
add-sqr-sqrt17.9%
Applied egg-rr17.9%
Taylor expanded in t1 around 0 18.6%
Final simplification25.4%
(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.6%
times-frac99.1%
distribute-frac-neg99.1%
distribute-neg-frac299.1%
+-commutative99.1%
distribute-neg-in99.1%
unsub-neg99.1%
Simplified99.1%
Final simplification99.1%
(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.6%
associate-*l/77.5%
*-commutative77.5%
Simplified77.5%
associate-*r/74.6%
*-commutative74.6%
times-frac99.1%
frac-2neg99.1%
+-commutative99.1%
distribute-neg-in99.1%
sub-neg99.1%
associate-*r/99.1%
add-sqr-sqrt48.2%
sqrt-unprod49.7%
sqr-neg49.7%
sqrt-unprod22.3%
add-sqr-sqrt41.8%
sub-neg41.8%
+-commutative41.8%
add-sqr-sqrt19.5%
sqrt-unprod50.1%
sqr-neg50.1%
sqrt-unprod37.4%
add-sqr-sqrt19.0%
sqrt-unprod41.3%
sqr-neg41.3%
Applied egg-rr99.1%
Taylor expanded in t1 around inf 56.4%
mul-1-neg56.4%
Simplified56.4%
Final simplification56.4%
(FPCore (u v t1) :precision binary64 (/ v (- u t1)))
double code(double u, double v, double t1) {
return v / (u - t1);
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = v / (u - t1)
end function
public static double code(double u, double v, double t1) {
return v / (u - t1);
}
def code(u, v, t1): return v / (u - t1)
function code(u, v, t1) return Float64(v / Float64(u - t1)) end
function tmp = code(u, v, t1) tmp = v / (u - t1); end
code[u_, v_, t1_] := N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{u - t1}
\end{array}
Initial program 74.6%
times-frac99.1%
distribute-frac-neg99.1%
distribute-neg-frac299.1%
+-commutative99.1%
distribute-neg-in99.1%
unsub-neg99.1%
Simplified99.1%
Taylor expanded in t1 around inf 56.4%
mul-1-neg56.4%
distribute-neg-frac256.4%
+-commutative56.4%
distribute-neg-in56.4%
sub-neg56.4%
add-sqr-sqrt28.0%
sqrt-unprod66.6%
sqr-neg66.6%
sqrt-unprod28.3%
add-sqr-sqrt56.3%
Applied egg-rr56.3%
(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.6%
times-frac99.1%
distribute-frac-neg99.1%
distribute-neg-frac299.1%
+-commutative99.1%
distribute-neg-in99.1%
unsub-neg99.1%
Simplified99.1%
Taylor expanded in t1 around inf 48.6%
Taylor expanded in u around inf 15.0%
herbie shell --seed 2024155
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))