
(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 13 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[((-t1) / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{-t1}{t1 + u} \cdot \frac{v}{t1 + u}
\end{array}
Initial program 73.8%
times-frac97.2%
Simplified97.2%
Final simplification97.2%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (- (/ v t1))))
(if (<= u -1600000000000.0)
(* (/ v (+ t1 u)) (/ (- t1) u))
(if (<= u -9e-106)
(/ v (- (* u -2.0) t1))
(if (<= u -2.7e-151)
(/ v (* (/ u t1) (- t1 u)))
(if (<= u 8e-130)
t_1
(if (<= u 1.02e-83)
(/ (/ v (/ (- t1 u) t1)) (+ t1 u))
(if (<= u 2.7e+23) t_1 (/ t1 (* u (/ (- (- t1) u) v)))))))))))
double code(double u, double v, double t1) {
double t_1 = -(v / t1);
double tmp;
if (u <= -1600000000000.0) {
tmp = (v / (t1 + u)) * (-t1 / u);
} else if (u <= -9e-106) {
tmp = v / ((u * -2.0) - t1);
} else if (u <= -2.7e-151) {
tmp = v / ((u / t1) * (t1 - u));
} else if (u <= 8e-130) {
tmp = t_1;
} else if (u <= 1.02e-83) {
tmp = (v / ((t1 - u) / t1)) / (t1 + u);
} else if (u <= 2.7e+23) {
tmp = t_1;
} else {
tmp = t1 / (u * ((-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) :: t_1
real(8) :: tmp
t_1 = -(v / t1)
if (u <= (-1600000000000.0d0)) then
tmp = (v / (t1 + u)) * (-t1 / u)
else if (u <= (-9d-106)) then
tmp = v / ((u * (-2.0d0)) - t1)
else if (u <= (-2.7d-151)) then
tmp = v / ((u / t1) * (t1 - u))
else if (u <= 8d-130) then
tmp = t_1
else if (u <= 1.02d-83) then
tmp = (v / ((t1 - u) / t1)) / (t1 + u)
else if (u <= 2.7d+23) then
tmp = t_1
else
tmp = t1 / (u * ((-t1 - u) / v))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = -(v / t1);
double tmp;
if (u <= -1600000000000.0) {
tmp = (v / (t1 + u)) * (-t1 / u);
} else if (u <= -9e-106) {
tmp = v / ((u * -2.0) - t1);
} else if (u <= -2.7e-151) {
tmp = v / ((u / t1) * (t1 - u));
} else if (u <= 8e-130) {
tmp = t_1;
} else if (u <= 1.02e-83) {
tmp = (v / ((t1 - u) / t1)) / (t1 + u);
} else if (u <= 2.7e+23) {
tmp = t_1;
} else {
tmp = t1 / (u * ((-t1 - u) / v));
}
return tmp;
}
def code(u, v, t1): t_1 = -(v / t1) tmp = 0 if u <= -1600000000000.0: tmp = (v / (t1 + u)) * (-t1 / u) elif u <= -9e-106: tmp = v / ((u * -2.0) - t1) elif u <= -2.7e-151: tmp = v / ((u / t1) * (t1 - u)) elif u <= 8e-130: tmp = t_1 elif u <= 1.02e-83: tmp = (v / ((t1 - u) / t1)) / (t1 + u) elif u <= 2.7e+23: tmp = t_1 else: tmp = t1 / (u * ((-t1 - u) / v)) return tmp
function code(u, v, t1) t_1 = Float64(-Float64(v / t1)) tmp = 0.0 if (u <= -1600000000000.0) tmp = Float64(Float64(v / Float64(t1 + u)) * Float64(Float64(-t1) / u)); elseif (u <= -9e-106) tmp = Float64(v / Float64(Float64(u * -2.0) - t1)); elseif (u <= -2.7e-151) tmp = Float64(v / Float64(Float64(u / t1) * Float64(t1 - u))); elseif (u <= 8e-130) tmp = t_1; elseif (u <= 1.02e-83) tmp = Float64(Float64(v / Float64(Float64(t1 - u) / t1)) / Float64(t1 + u)); elseif (u <= 2.7e+23) tmp = t_1; else tmp = Float64(t1 / Float64(u * Float64(Float64(Float64(-t1) - u) / v))); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = -(v / t1); tmp = 0.0; if (u <= -1600000000000.0) tmp = (v / (t1 + u)) * (-t1 / u); elseif (u <= -9e-106) tmp = v / ((u * -2.0) - t1); elseif (u <= -2.7e-151) tmp = v / ((u / t1) * (t1 - u)); elseif (u <= 8e-130) tmp = t_1; elseif (u <= 1.02e-83) tmp = (v / ((t1 - u) / t1)) / (t1 + u); elseif (u <= 2.7e+23) tmp = t_1; else tmp = t1 / (u * ((-t1 - u) / v)); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = (-N[(v / t1), $MachinePrecision])}, If[LessEqual[u, -1600000000000.0], N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[((-t1) / u), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, -9e-106], N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, -2.7e-151], N[(v / N[(N[(u / t1), $MachinePrecision] * N[(t1 - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 8e-130], t$95$1, If[LessEqual[u, 1.02e-83], N[(N[(v / N[(N[(t1 - u), $MachinePrecision] / t1), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 2.7e+23], t$95$1, N[(t1 / N[(u * N[(N[((-t1) - u), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -\frac{v}{t1}\\
\mathbf{if}\;u \leq -1600000000000:\\
\;\;\;\;\frac{v}{t1 + u} \cdot \frac{-t1}{u}\\
\mathbf{elif}\;u \leq -9 \cdot 10^{-106}:\\
\;\;\;\;\frac{v}{u \cdot -2 - t1}\\
\mathbf{elif}\;u \leq -2.7 \cdot 10^{-151}:\\
\;\;\;\;\frac{v}{\frac{u}{t1} \cdot \left(t1 - u\right)}\\
\mathbf{elif}\;u \leq 8 \cdot 10^{-130}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;u \leq 1.02 \cdot 10^{-83}:\\
\;\;\;\;\frac{\frac{v}{\frac{t1 - u}{t1}}}{t1 + u}\\
\mathbf{elif}\;u \leq 2.7 \cdot 10^{+23}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{u \cdot \frac{\left(-t1\right) - u}{v}}\\
\end{array}
\end{array}
if u < -1.6e12Initial program 76.3%
times-frac97.9%
Simplified97.9%
Taylor expanded in t1 around 0 92.5%
associate-*r/92.5%
mul-1-neg92.5%
Simplified92.5%
if -1.6e12 < u < -8.99999999999999911e-106Initial program 82.0%
associate-/r*85.8%
*-commutative85.8%
associate-/l*99.7%
associate-/l/99.7%
+-commutative99.7%
remove-double-neg99.7%
unsub-neg99.7%
div-sub99.7%
sub-neg99.7%
*-inverses99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in t1 around inf 74.6%
mul-1-neg74.6%
unsub-neg74.6%
*-commutative74.6%
Simplified74.6%
if -8.99999999999999911e-106 < u < -2.70000000000000007e-151Initial program 61.5%
times-frac80.8%
Simplified80.8%
Taylor expanded in t1 around 0 61.2%
associate-*r/61.2%
mul-1-neg61.2%
Simplified61.2%
associate-*r/61.3%
frac-2neg61.3%
add-sqr-sqrt10.5%
sqrt-unprod13.3%
sqr-neg13.3%
sqrt-unprod12.0%
add-sqr-sqrt12.7%
distribute-lft-neg-out12.7%
distribute-frac-neg12.7%
clear-num12.7%
associate-*l/12.7%
*-un-lft-identity12.7%
add-sqr-sqrt0.7%
sqrt-unprod22.6%
sqr-neg22.6%
sqrt-unprod50.6%
add-sqr-sqrt61.0%
distribute-neg-in61.0%
Applied egg-rr61.3%
associate-/l/80.2%
*-commutative80.2%
Simplified80.2%
if -2.70000000000000007e-151 < u < 8.0000000000000007e-130 or 1.0199999999999999e-83 < u < 2.6999999999999999e23Initial program 62.8%
times-frac97.9%
Simplified97.9%
Taylor expanded in t1 around inf 84.6%
associate-*r/84.6%
neg-mul-184.6%
Simplified84.6%
if 8.0000000000000007e-130 < u < 1.0199999999999999e-83Initial program 89.9%
times-frac90.1%
Simplified90.1%
associate-*r/96.4%
clear-num96.1%
associate-*l/96.1%
*-un-lft-identity96.1%
frac-2neg96.1%
distribute-neg-in96.1%
add-sqr-sqrt49.4%
sqrt-unprod94.3%
sqr-neg94.3%
sqrt-unprod44.6%
add-sqr-sqrt74.5%
sub-neg74.5%
remove-double-neg74.5%
Applied egg-rr74.5%
if 2.6999999999999999e23 < u Initial program 84.5%
times-frac98.1%
Simplified98.1%
Taylor expanded in t1 around 0 89.6%
associate-*r/89.6%
mul-1-neg89.6%
Simplified89.6%
*-commutative89.6%
clear-num89.6%
frac-2neg89.6%
frac-times91.3%
*-un-lft-identity91.3%
remove-double-neg91.3%
Applied egg-rr91.3%
Final simplification86.2%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (* (/ v (+ t1 u)) (/ (- t1) u))))
(if (<= u -300000000000.0)
t_1
(if (<= u -1e-105)
(/ v (- (* u -2.0) t1))
(if (<= u -2.7e-151)
(/ v (* (/ u t1) (- t1 u)))
(if (<= u 1.15e+20) (- (/ v t1)) t_1))))))
double code(double u, double v, double t1) {
double t_1 = (v / (t1 + u)) * (-t1 / u);
double tmp;
if (u <= -300000000000.0) {
tmp = t_1;
} else if (u <= -1e-105) {
tmp = v / ((u * -2.0) - t1);
} else if (u <= -2.7e-151) {
tmp = v / ((u / t1) * (t1 - u));
} else if (u <= 1.15e+20) {
tmp = -(v / t1);
} else {
tmp = 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 = (v / (t1 + u)) * (-t1 / u)
if (u <= (-300000000000.0d0)) then
tmp = t_1
else if (u <= (-1d-105)) then
tmp = v / ((u * (-2.0d0)) - t1)
else if (u <= (-2.7d-151)) then
tmp = v / ((u / t1) * (t1 - u))
else if (u <= 1.15d+20) then
tmp = -(v / t1)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = (v / (t1 + u)) * (-t1 / u);
double tmp;
if (u <= -300000000000.0) {
tmp = t_1;
} else if (u <= -1e-105) {
tmp = v / ((u * -2.0) - t1);
} else if (u <= -2.7e-151) {
tmp = v / ((u / t1) * (t1 - u));
} else if (u <= 1.15e+20) {
tmp = -(v / t1);
} else {
tmp = t_1;
}
return tmp;
}
def code(u, v, t1): t_1 = (v / (t1 + u)) * (-t1 / u) tmp = 0 if u <= -300000000000.0: tmp = t_1 elif u <= -1e-105: tmp = v / ((u * -2.0) - t1) elif u <= -2.7e-151: tmp = v / ((u / t1) * (t1 - u)) elif u <= 1.15e+20: tmp = -(v / t1) else: tmp = t_1 return tmp
function code(u, v, t1) t_1 = Float64(Float64(v / Float64(t1 + u)) * Float64(Float64(-t1) / u)) tmp = 0.0 if (u <= -300000000000.0) tmp = t_1; elseif (u <= -1e-105) tmp = Float64(v / Float64(Float64(u * -2.0) - t1)); elseif (u <= -2.7e-151) tmp = Float64(v / Float64(Float64(u / t1) * Float64(t1 - u))); elseif (u <= 1.15e+20) tmp = Float64(-Float64(v / t1)); else tmp = t_1; end return tmp end
function tmp_2 = code(u, v, t1) t_1 = (v / (t1 + u)) * (-t1 / u); tmp = 0.0; if (u <= -300000000000.0) tmp = t_1; elseif (u <= -1e-105) tmp = v / ((u * -2.0) - t1); elseif (u <= -2.7e-151) tmp = v / ((u / t1) * (t1 - u)); elseif (u <= 1.15e+20) tmp = -(v / t1); else tmp = t_1; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[((-t1) / u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[u, -300000000000.0], t$95$1, If[LessEqual[u, -1e-105], N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, -2.7e-151], N[(v / N[(N[(u / t1), $MachinePrecision] * N[(t1 - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 1.15e+20], (-N[(v / t1), $MachinePrecision]), t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{v}{t1 + u} \cdot \frac{-t1}{u}\\
\mathbf{if}\;u \leq -300000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;u \leq -1 \cdot 10^{-105}:\\
\;\;\;\;\frac{v}{u \cdot -2 - t1}\\
\mathbf{elif}\;u \leq -2.7 \cdot 10^{-151}:\\
\;\;\;\;\frac{v}{\frac{u}{t1} \cdot \left(t1 - u\right)}\\
\mathbf{elif}\;u \leq 1.15 \cdot 10^{+20}:\\
\;\;\;\;-\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if u < -3e11 or 1.15e20 < u Initial program 80.3%
times-frac98.0%
Simplified98.0%
Taylor expanded in t1 around 0 91.1%
associate-*r/91.1%
mul-1-neg91.1%
Simplified91.1%
if -3e11 < u < -9.99999999999999965e-106Initial program 82.0%
associate-/r*85.8%
*-commutative85.8%
associate-/l*99.7%
associate-/l/99.7%
+-commutative99.7%
remove-double-neg99.7%
unsub-neg99.7%
div-sub99.7%
sub-neg99.7%
*-inverses99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in t1 around inf 74.6%
mul-1-neg74.6%
unsub-neg74.6%
*-commutative74.6%
Simplified74.6%
if -9.99999999999999965e-106 < u < -2.70000000000000007e-151Initial program 61.5%
times-frac80.8%
Simplified80.8%
Taylor expanded in t1 around 0 61.2%
associate-*r/61.2%
mul-1-neg61.2%
Simplified61.2%
associate-*r/61.3%
frac-2neg61.3%
add-sqr-sqrt10.5%
sqrt-unprod13.3%
sqr-neg13.3%
sqrt-unprod12.0%
add-sqr-sqrt12.7%
distribute-lft-neg-out12.7%
distribute-frac-neg12.7%
clear-num12.7%
associate-*l/12.7%
*-un-lft-identity12.7%
add-sqr-sqrt0.7%
sqrt-unprod22.6%
sqr-neg22.6%
sqrt-unprod50.6%
add-sqr-sqrt61.0%
distribute-neg-in61.0%
Applied egg-rr61.3%
associate-/l/80.2%
*-commutative80.2%
Simplified80.2%
if -2.70000000000000007e-151 < u < 1.15e20Initial program 65.4%
times-frac97.1%
Simplified97.1%
Taylor expanded in t1 around inf 79.7%
associate-*r/79.7%
neg-mul-179.7%
Simplified79.7%
Final simplification84.3%
(FPCore (u v t1)
:precision binary64
(if (<= u -265000000000.0)
(* (/ v (+ t1 u)) (/ (- t1) u))
(if (<= u -9e-106)
(/ v (- (* u -2.0) t1))
(if (<= u -1.9e-151)
(/ v (* (/ u t1) (- t1 u)))
(if (<= u 4.5e+21) (- (/ v t1)) (/ t1 (* u (/ (- (- t1) u) v))))))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -265000000000.0) {
tmp = (v / (t1 + u)) * (-t1 / u);
} else if (u <= -9e-106) {
tmp = v / ((u * -2.0) - t1);
} else if (u <= -1.9e-151) {
tmp = v / ((u / t1) * (t1 - u));
} else if (u <= 4.5e+21) {
tmp = -(v / t1);
} else {
tmp = t1 / (u * ((-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 (u <= (-265000000000.0d0)) then
tmp = (v / (t1 + u)) * (-t1 / u)
else if (u <= (-9d-106)) then
tmp = v / ((u * (-2.0d0)) - t1)
else if (u <= (-1.9d-151)) then
tmp = v / ((u / t1) * (t1 - u))
else if (u <= 4.5d+21) then
tmp = -(v / t1)
else
tmp = t1 / (u * ((-t1 - u) / v))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -265000000000.0) {
tmp = (v / (t1 + u)) * (-t1 / u);
} else if (u <= -9e-106) {
tmp = v / ((u * -2.0) - t1);
} else if (u <= -1.9e-151) {
tmp = v / ((u / t1) * (t1 - u));
} else if (u <= 4.5e+21) {
tmp = -(v / t1);
} else {
tmp = t1 / (u * ((-t1 - u) / v));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -265000000000.0: tmp = (v / (t1 + u)) * (-t1 / u) elif u <= -9e-106: tmp = v / ((u * -2.0) - t1) elif u <= -1.9e-151: tmp = v / ((u / t1) * (t1 - u)) elif u <= 4.5e+21: tmp = -(v / t1) else: tmp = t1 / (u * ((-t1 - u) / v)) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -265000000000.0) tmp = Float64(Float64(v / Float64(t1 + u)) * Float64(Float64(-t1) / u)); elseif (u <= -9e-106) tmp = Float64(v / Float64(Float64(u * -2.0) - t1)); elseif (u <= -1.9e-151) tmp = Float64(v / Float64(Float64(u / t1) * Float64(t1 - u))); elseif (u <= 4.5e+21) tmp = Float64(-Float64(v / t1)); else tmp = Float64(t1 / Float64(u * Float64(Float64(Float64(-t1) - u) / v))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -265000000000.0) tmp = (v / (t1 + u)) * (-t1 / u); elseif (u <= -9e-106) tmp = v / ((u * -2.0) - t1); elseif (u <= -1.9e-151) tmp = v / ((u / t1) * (t1 - u)); elseif (u <= 4.5e+21) tmp = -(v / t1); else tmp = t1 / (u * ((-t1 - u) / v)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -265000000000.0], N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[((-t1) / u), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, -9e-106], N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, -1.9e-151], N[(v / N[(N[(u / t1), $MachinePrecision] * N[(t1 - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 4.5e+21], (-N[(v / t1), $MachinePrecision]), N[(t1 / N[(u * N[(N[((-t1) - u), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -265000000000:\\
\;\;\;\;\frac{v}{t1 + u} \cdot \frac{-t1}{u}\\
\mathbf{elif}\;u \leq -9 \cdot 10^{-106}:\\
\;\;\;\;\frac{v}{u \cdot -2 - t1}\\
\mathbf{elif}\;u \leq -1.9 \cdot 10^{-151}:\\
\;\;\;\;\frac{v}{\frac{u}{t1} \cdot \left(t1 - u\right)}\\
\mathbf{elif}\;u \leq 4.5 \cdot 10^{+21}:\\
\;\;\;\;-\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{u \cdot \frac{\left(-t1\right) - u}{v}}\\
\end{array}
\end{array}
if u < -2.65e11Initial program 76.3%
times-frac97.9%
Simplified97.9%
Taylor expanded in t1 around 0 92.5%
associate-*r/92.5%
mul-1-neg92.5%
Simplified92.5%
if -2.65e11 < u < -8.99999999999999911e-106Initial program 82.0%
associate-/r*85.8%
*-commutative85.8%
associate-/l*99.7%
associate-/l/99.7%
+-commutative99.7%
remove-double-neg99.7%
unsub-neg99.7%
div-sub99.7%
sub-neg99.7%
*-inverses99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in t1 around inf 74.6%
mul-1-neg74.6%
unsub-neg74.6%
*-commutative74.6%
Simplified74.6%
if -8.99999999999999911e-106 < u < -1.89999999999999985e-151Initial program 61.5%
times-frac80.8%
Simplified80.8%
Taylor expanded in t1 around 0 61.2%
associate-*r/61.2%
mul-1-neg61.2%
Simplified61.2%
associate-*r/61.3%
frac-2neg61.3%
add-sqr-sqrt10.5%
sqrt-unprod13.3%
sqr-neg13.3%
sqrt-unprod12.0%
add-sqr-sqrt12.7%
distribute-lft-neg-out12.7%
distribute-frac-neg12.7%
clear-num12.7%
associate-*l/12.7%
*-un-lft-identity12.7%
add-sqr-sqrt0.7%
sqrt-unprod22.6%
sqr-neg22.6%
sqrt-unprod50.6%
add-sqr-sqrt61.0%
distribute-neg-in61.0%
Applied egg-rr61.3%
associate-/l/80.2%
*-commutative80.2%
Simplified80.2%
if -1.89999999999999985e-151 < u < 4.5e21Initial program 65.4%
times-frac97.1%
Simplified97.1%
Taylor expanded in t1 around inf 79.7%
associate-*r/79.7%
neg-mul-179.7%
Simplified79.7%
if 4.5e21 < u Initial program 84.5%
times-frac98.1%
Simplified98.1%
Taylor expanded in t1 around 0 89.6%
associate-*r/89.6%
mul-1-neg89.6%
Simplified89.6%
*-commutative89.6%
clear-num89.6%
frac-2neg89.6%
frac-times91.3%
*-un-lft-identity91.3%
remove-double-neg91.3%
Applied egg-rr91.3%
Final simplification84.7%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (* (/ (- t1) u) (/ v u))))
(if (<= u -5.3e+43)
t_1
(if (<= u -1.3e-105)
(/ v (- (* u -2.0) t1))
(if (or (<= u -6e-123) (not (<= u 2e+21))) t_1 (- (/ v t1)))))))
double code(double u, double v, double t1) {
double t_1 = (-t1 / u) * (v / u);
double tmp;
if (u <= -5.3e+43) {
tmp = t_1;
} else if (u <= -1.3e-105) {
tmp = v / ((u * -2.0) - t1);
} else if ((u <= -6e-123) || !(u <= 2e+21)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (-t1 / u) * (v / u)
if (u <= (-5.3d+43)) then
tmp = t_1
else if (u <= (-1.3d-105)) then
tmp = v / ((u * (-2.0d0)) - t1)
else if ((u <= (-6d-123)) .or. (.not. (u <= 2d+21))) then
tmp = t_1
else
tmp = -(v / t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = (-t1 / u) * (v / u);
double tmp;
if (u <= -5.3e+43) {
tmp = t_1;
} else if (u <= -1.3e-105) {
tmp = v / ((u * -2.0) - t1);
} else if ((u <= -6e-123) || !(u <= 2e+21)) {
tmp = t_1;
} else {
tmp = -(v / t1);
}
return tmp;
}
def code(u, v, t1): t_1 = (-t1 / u) * (v / u) tmp = 0 if u <= -5.3e+43: tmp = t_1 elif u <= -1.3e-105: tmp = v / ((u * -2.0) - t1) elif (u <= -6e-123) or not (u <= 2e+21): tmp = t_1 else: tmp = -(v / t1) return tmp
function code(u, v, t1) t_1 = Float64(Float64(Float64(-t1) / u) * Float64(v / u)) tmp = 0.0 if (u <= -5.3e+43) tmp = t_1; elseif (u <= -1.3e-105) tmp = Float64(v / Float64(Float64(u * -2.0) - t1)); elseif ((u <= -6e-123) || !(u <= 2e+21)) tmp = t_1; else tmp = Float64(-Float64(v / t1)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = (-t1 / u) * (v / u); tmp = 0.0; if (u <= -5.3e+43) tmp = t_1; elseif (u <= -1.3e-105) tmp = v / ((u * -2.0) - t1); elseif ((u <= -6e-123) || ~((u <= 2e+21))) tmp = t_1; else tmp = -(v / t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(N[((-t1) / u), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[u, -5.3e+43], t$95$1, If[LessEqual[u, -1.3e-105], N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[u, -6e-123], N[Not[LessEqual[u, 2e+21]], $MachinePrecision]], t$95$1, (-N[(v / t1), $MachinePrecision])]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-t1}{u} \cdot \frac{v}{u}\\
\mathbf{if}\;u \leq -5.3 \cdot 10^{+43}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;u \leq -1.3 \cdot 10^{-105}:\\
\;\;\;\;\frac{v}{u \cdot -2 - t1}\\
\mathbf{elif}\;u \leq -6 \cdot 10^{-123} \lor \neg \left(u \leq 2 \cdot 10^{+21}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;-\frac{v}{t1}\\
\end{array}
\end{array}
if u < -5.2999999999999999e43 or -1.2999999999999999e-105 < u < -5.99999999999999968e-123 or 2e21 < u Initial program 79.4%
times-frac98.0%
Simplified98.0%
Taylor expanded in t1 around 0 91.9%
associate-*r/91.9%
mul-1-neg91.9%
Simplified91.9%
Taylor expanded in t1 around 0 86.7%
if -5.2999999999999999e43 < u < -1.2999999999999999e-105Initial program 82.3%
associate-/r*85.4%
*-commutative85.4%
associate-/l*99.6%
associate-/l/99.7%
+-commutative99.7%
remove-double-neg99.7%
unsub-neg99.7%
div-sub99.7%
sub-neg99.7%
*-inverses99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in t1 around inf 70.7%
mul-1-neg70.7%
unsub-neg70.7%
*-commutative70.7%
Simplified70.7%
if -5.99999999999999968e-123 < u < 2e21Initial program 65.2%
times-frac95.5%
Simplified95.5%
Taylor expanded in t1 around inf 78.0%
associate-*r/78.0%
neg-mul-178.0%
Simplified78.0%
Final simplification80.9%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (* (/ (- t1) u) (/ v u))))
(if (<= u -4.3e+35)
t_1
(if (<= u -9e-106)
(/ v (- (* u -2.0) t1))
(if (<= u -6e-123)
t_1
(if (<= u 12000000.0) (- (/ v t1)) (/ t1 (* u (/ (- u) v)))))))))
double code(double u, double v, double t1) {
double t_1 = (-t1 / u) * (v / u);
double tmp;
if (u <= -4.3e+35) {
tmp = t_1;
} else if (u <= -9e-106) {
tmp = v / ((u * -2.0) - t1);
} else if (u <= -6e-123) {
tmp = t_1;
} else if (u <= 12000000.0) {
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) :: t_1
real(8) :: tmp
t_1 = (-t1 / u) * (v / u)
if (u <= (-4.3d+35)) then
tmp = t_1
else if (u <= (-9d-106)) then
tmp = v / ((u * (-2.0d0)) - t1)
else if (u <= (-6d-123)) then
tmp = t_1
else if (u <= 12000000.0d0) 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 t_1 = (-t1 / u) * (v / u);
double tmp;
if (u <= -4.3e+35) {
tmp = t_1;
} else if (u <= -9e-106) {
tmp = v / ((u * -2.0) - t1);
} else if (u <= -6e-123) {
tmp = t_1;
} else if (u <= 12000000.0) {
tmp = -(v / t1);
} else {
tmp = t1 / (u * (-u / v));
}
return tmp;
}
def code(u, v, t1): t_1 = (-t1 / u) * (v / u) tmp = 0 if u <= -4.3e+35: tmp = t_1 elif u <= -9e-106: tmp = v / ((u * -2.0) - t1) elif u <= -6e-123: tmp = t_1 elif u <= 12000000.0: tmp = -(v / t1) else: tmp = t1 / (u * (-u / v)) return tmp
function code(u, v, t1) t_1 = Float64(Float64(Float64(-t1) / u) * Float64(v / u)) tmp = 0.0 if (u <= -4.3e+35) tmp = t_1; elseif (u <= -9e-106) tmp = Float64(v / Float64(Float64(u * -2.0) - t1)); elseif (u <= -6e-123) tmp = t_1; elseif (u <= 12000000.0) tmp = Float64(-Float64(v / t1)); else tmp = Float64(t1 / Float64(u * Float64(Float64(-u) / v))); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = (-t1 / u) * (v / u); tmp = 0.0; if (u <= -4.3e+35) tmp = t_1; elseif (u <= -9e-106) tmp = v / ((u * -2.0) - t1); elseif (u <= -6e-123) tmp = t_1; elseif (u <= 12000000.0) tmp = -(v / t1); else tmp = t1 / (u * (-u / v)); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(N[((-t1) / u), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[u, -4.3e+35], t$95$1, If[LessEqual[u, -9e-106], N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, -6e-123], t$95$1, If[LessEqual[u, 12000000.0], (-N[(v / t1), $MachinePrecision]), N[(t1 / N[(u * N[((-u) / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-t1}{u} \cdot \frac{v}{u}\\
\mathbf{if}\;u \leq -4.3 \cdot 10^{+35}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;u \leq -9 \cdot 10^{-106}:\\
\;\;\;\;\frac{v}{u \cdot -2 - t1}\\
\mathbf{elif}\;u \leq -6 \cdot 10^{-123}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;u \leq 12000000:\\
\;\;\;\;-\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{u \cdot \frac{-u}{v}}\\
\end{array}
\end{array}
if u < -4.2999999999999998e35 or -8.99999999999999911e-106 < u < -5.99999999999999968e-123Initial program 74.4%
times-frac97.9%
Simplified97.9%
Taylor expanded in t1 around 0 94.0%
associate-*r/94.0%
mul-1-neg94.0%
Simplified94.0%
Taylor expanded in t1 around 0 90.6%
if -4.2999999999999998e35 < u < -8.99999999999999911e-106Initial program 82.3%
associate-/r*85.4%
*-commutative85.4%
associate-/l*99.6%
associate-/l/99.7%
+-commutative99.7%
remove-double-neg99.7%
unsub-neg99.7%
div-sub99.7%
sub-neg99.7%
*-inverses99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in t1 around inf 70.7%
mul-1-neg70.7%
unsub-neg70.7%
*-commutative70.7%
Simplified70.7%
if -5.99999999999999968e-123 < u < 1.2e7Initial program 63.9%
times-frac95.4%
Simplified95.4%
Taylor expanded in t1 around inf 79.0%
associate-*r/79.0%
neg-mul-179.0%
Simplified79.0%
if 1.2e7 < u Initial program 85.5%
times-frac98.2%
Simplified98.2%
Taylor expanded in t1 around 0 87.1%
associate-*r/87.1%
mul-1-neg87.1%
Simplified87.1%
Taylor expanded in t1 around 0 80.6%
*-commutative80.6%
clear-num80.6%
frac-2neg80.6%
frac-times85.5%
*-un-lft-identity85.5%
remove-double-neg85.5%
Applied egg-rr85.5%
Final simplification82.1%
(FPCore (u v t1)
:precision binary64
(if (<= u -2.55e+43)
(* (/ (- t1) u) (/ v u))
(if (<= u -9e-106)
(/ v (- (* u -2.0) t1))
(if (<= u -2.7e-151)
(/ v (* (/ u t1) (- t1 u)))
(if (<= u 16500000.0) (- (/ v t1)) (/ t1 (* u (/ (- u) v))))))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -2.55e+43) {
tmp = (-t1 / u) * (v / u);
} else if (u <= -9e-106) {
tmp = v / ((u * -2.0) - t1);
} else if (u <= -2.7e-151) {
tmp = v / ((u / t1) * (t1 - u));
} else if (u <= 16500000.0) {
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 <= (-2.55d+43)) then
tmp = (-t1 / u) * (v / u)
else if (u <= (-9d-106)) then
tmp = v / ((u * (-2.0d0)) - t1)
else if (u <= (-2.7d-151)) then
tmp = v / ((u / t1) * (t1 - u))
else if (u <= 16500000.0d0) 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 <= -2.55e+43) {
tmp = (-t1 / u) * (v / u);
} else if (u <= -9e-106) {
tmp = v / ((u * -2.0) - t1);
} else if (u <= -2.7e-151) {
tmp = v / ((u / t1) * (t1 - u));
} else if (u <= 16500000.0) {
tmp = -(v / t1);
} else {
tmp = t1 / (u * (-u / v));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -2.55e+43: tmp = (-t1 / u) * (v / u) elif u <= -9e-106: tmp = v / ((u * -2.0) - t1) elif u <= -2.7e-151: tmp = v / ((u / t1) * (t1 - u)) elif u <= 16500000.0: tmp = -(v / t1) else: tmp = t1 / (u * (-u / v)) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -2.55e+43) tmp = Float64(Float64(Float64(-t1) / u) * Float64(v / u)); elseif (u <= -9e-106) tmp = Float64(v / Float64(Float64(u * -2.0) - t1)); elseif (u <= -2.7e-151) tmp = Float64(v / Float64(Float64(u / t1) * Float64(t1 - u))); elseif (u <= 16500000.0) tmp = Float64(-Float64(v / t1)); else tmp = Float64(t1 / Float64(u * Float64(Float64(-u) / v))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -2.55e+43) tmp = (-t1 / u) * (v / u); elseif (u <= -9e-106) tmp = v / ((u * -2.0) - t1); elseif (u <= -2.7e-151) tmp = v / ((u / t1) * (t1 - u)); elseif (u <= 16500000.0) tmp = -(v / t1); else tmp = t1 / (u * (-u / v)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -2.55e+43], N[(N[((-t1) / u), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, -9e-106], N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, -2.7e-151], N[(v / N[(N[(u / t1), $MachinePrecision] * N[(t1 - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 16500000.0], (-N[(v / t1), $MachinePrecision]), N[(t1 / N[(u * N[((-u) / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.55 \cdot 10^{+43}:\\
\;\;\;\;\frac{-t1}{u} \cdot \frac{v}{u}\\
\mathbf{elif}\;u \leq -9 \cdot 10^{-106}:\\
\;\;\;\;\frac{v}{u \cdot -2 - t1}\\
\mathbf{elif}\;u \leq -2.7 \cdot 10^{-151}:\\
\;\;\;\;\frac{v}{\frac{u}{t1} \cdot \left(t1 - u\right)}\\
\mathbf{elif}\;u \leq 16500000:\\
\;\;\;\;-\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{u \cdot \frac{-u}{v}}\\
\end{array}
\end{array}
if u < -2.54999999999999997e43Initial program 75.5%
times-frac97.7%
Simplified97.7%
Taylor expanded in t1 around 0 93.5%
associate-*r/93.5%
mul-1-neg93.5%
Simplified93.5%
Taylor expanded in t1 around 0 89.8%
if -2.54999999999999997e43 < u < -8.99999999999999911e-106Initial program 82.3%
associate-/r*85.4%
*-commutative85.4%
associate-/l*99.6%
associate-/l/99.7%
+-commutative99.7%
remove-double-neg99.7%
unsub-neg99.7%
div-sub99.7%
sub-neg99.7%
*-inverses99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in t1 around inf 70.7%
mul-1-neg70.7%
unsub-neg70.7%
*-commutative70.7%
Simplified70.7%
if -8.99999999999999911e-106 < u < -2.70000000000000007e-151Initial program 61.5%
times-frac80.8%
Simplified80.8%
Taylor expanded in t1 around 0 61.2%
associate-*r/61.2%
mul-1-neg61.2%
Simplified61.2%
associate-*r/61.3%
frac-2neg61.3%
add-sqr-sqrt10.5%
sqrt-unprod13.3%
sqr-neg13.3%
sqrt-unprod12.0%
add-sqr-sqrt12.7%
distribute-lft-neg-out12.7%
distribute-frac-neg12.7%
clear-num12.7%
associate-*l/12.7%
*-un-lft-identity12.7%
add-sqr-sqrt0.7%
sqrt-unprod22.6%
sqr-neg22.6%
sqrt-unprod50.6%
add-sqr-sqrt61.0%
distribute-neg-in61.0%
Applied egg-rr61.3%
associate-/l/80.2%
*-commutative80.2%
Simplified80.2%
if -2.70000000000000007e-151 < u < 1.65e7Initial program 64.1%
times-frac97.0%
Simplified97.0%
Taylor expanded in t1 around inf 80.8%
associate-*r/80.8%
neg-mul-180.8%
Simplified80.8%
if 1.65e7 < u Initial program 85.5%
times-frac98.2%
Simplified98.2%
Taylor expanded in t1 around 0 87.1%
associate-*r/87.1%
mul-1-neg87.1%
Simplified87.1%
Taylor expanded in t1 around 0 80.6%
*-commutative80.6%
clear-num80.6%
frac-2neg80.6%
frac-times85.5%
*-un-lft-identity85.5%
remove-double-neg85.5%
Applied egg-rr85.5%
Final simplification82.4%
(FPCore (u v t1) :precision binary64 (if (or (<= u -5e+68) (not (<= u 4.7e+160))) (/ t1 (* u (/ u v))) (- (/ v t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -5e+68) || !(u <= 4.7e+160)) {
tmp = t1 / (u * (u / v));
} else {
tmp = -(v / t1);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-5d+68)) .or. (.not. (u <= 4.7d+160))) then
tmp = t1 / (u * (u / v))
else
tmp = -(v / t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -5e+68) || !(u <= 4.7e+160)) {
tmp = t1 / (u * (u / v));
} else {
tmp = -(v / t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -5e+68) or not (u <= 4.7e+160): tmp = t1 / (u * (u / v)) else: tmp = -(v / t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -5e+68) || !(u <= 4.7e+160)) tmp = Float64(t1 / Float64(u * Float64(u / v))); else tmp = Float64(-Float64(v / t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -5e+68) || ~((u <= 4.7e+160))) tmp = t1 / (u * (u / v)); else tmp = -(v / t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -5e+68], N[Not[LessEqual[u, 4.7e+160]], $MachinePrecision]], N[(t1 / N[(u * N[(u / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], (-N[(v / t1), $MachinePrecision])]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -5 \cdot 10^{+68} \lor \neg \left(u \leq 4.7 \cdot 10^{+160}\right):\\
\;\;\;\;\frac{t1}{u \cdot \frac{u}{v}}\\
\mathbf{else}:\\
\;\;\;\;-\frac{v}{t1}\\
\end{array}
\end{array}
if u < -5.0000000000000004e68 or 4.6999999999999997e160 < u Initial program 77.3%
times-frac98.4%
Simplified98.4%
Taylor expanded in t1 around 0 96.2%
associate-*r/96.2%
mul-1-neg96.2%
Simplified96.2%
Taylor expanded in t1 around 0 93.7%
*-commutative93.7%
clear-num93.7%
frac-times92.8%
*-un-lft-identity92.8%
add-sqr-sqrt46.6%
sqrt-unprod64.5%
sqr-neg64.5%
sqrt-unprod34.6%
add-sqr-sqrt74.9%
Applied egg-rr74.9%
if -5.0000000000000004e68 < u < 4.6999999999999997e160Initial program 72.2%
times-frac96.7%
Simplified96.7%
Taylor expanded in t1 around inf 66.4%
associate-*r/66.4%
neg-mul-166.4%
Simplified66.4%
Final simplification69.0%
(FPCore (u v t1) :precision binary64 (if (or (<= u -9.4e+73) (not (<= u 5e+160))) (/ t1 (* u (/ u v))) (/ v (- (* u -2.0) t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -9.4e+73) || !(u <= 5e+160)) {
tmp = t1 / (u * (u / v));
} 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 ((u <= (-9.4d+73)) .or. (.not. (u <= 5d+160))) then
tmp = t1 / (u * (u / v))
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 ((u <= -9.4e+73) || !(u <= 5e+160)) {
tmp = t1 / (u * (u / v));
} else {
tmp = v / ((u * -2.0) - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -9.4e+73) or not (u <= 5e+160): tmp = t1 / (u * (u / v)) else: tmp = v / ((u * -2.0) - t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -9.4e+73) || !(u <= 5e+160)) tmp = Float64(t1 / Float64(u * Float64(u / v))); 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 ((u <= -9.4e+73) || ~((u <= 5e+160))) tmp = t1 / (u * (u / v)); else tmp = v / ((u * -2.0) - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -9.4e+73], N[Not[LessEqual[u, 5e+160]], $MachinePrecision]], N[(t1 / N[(u * N[(u / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -9.4 \cdot 10^{+73} \lor \neg \left(u \leq 5 \cdot 10^{+160}\right):\\
\;\;\;\;\frac{t1}{u \cdot \frac{u}{v}}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u \cdot -2 - t1}\\
\end{array}
\end{array}
if u < -9.4000000000000004e73 or 5.0000000000000002e160 < u Initial program 77.0%
times-frac98.4%
Simplified98.4%
Taylor expanded in t1 around 0 96.1%
associate-*r/96.1%
mul-1-neg96.1%
Simplified96.1%
Taylor expanded in t1 around 0 93.6%
*-commutative93.6%
clear-num93.6%
frac-times92.7%
*-un-lft-identity92.7%
add-sqr-sqrt45.9%
sqrt-unprod64.0%
sqr-neg64.0%
sqrt-unprod35.1%
add-sqr-sqrt74.5%
Applied egg-rr74.5%
if -9.4000000000000004e73 < u < 5.0000000000000002e160Initial program 72.4%
associate-/r*81.3%
*-commutative81.3%
associate-/l*98.0%
associate-/l/98.2%
+-commutative98.2%
remove-double-neg98.2%
unsub-neg98.2%
div-sub98.2%
sub-neg98.2%
*-inverses98.2%
metadata-eval98.2%
Simplified98.2%
Taylor expanded in t1 around inf 66.6%
mul-1-neg66.6%
unsub-neg66.6%
*-commutative66.6%
Simplified66.6%
Final simplification69.0%
(FPCore (u v t1) :precision binary64 (if (<= u -9.2e+73) (* (/ v u) -0.5) (- (/ v t1))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -9.2e+73) {
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 <= (-9.2d+73)) 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 <= -9.2e+73) {
tmp = (v / u) * -0.5;
} else {
tmp = -(v / t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -9.2e+73: tmp = (v / u) * -0.5 else: tmp = -(v / t1) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -9.2e+73) 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 <= -9.2e+73) tmp = (v / u) * -0.5; else tmp = -(v / t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -9.2e+73], N[(N[(v / u), $MachinePrecision] * -0.5), $MachinePrecision], (-N[(v / t1), $MachinePrecision])]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -9.2 \cdot 10^{+73}:\\
\;\;\;\;\frac{v}{u} \cdot -0.5\\
\mathbf{else}:\\
\;\;\;\;-\frac{v}{t1}\\
\end{array}
\end{array}
if u < -9.199999999999999e73Initial program 74.1%
associate-/r*86.4%
*-commutative86.4%
associate-/l*97.1%
associate-/l/82.2%
+-commutative82.2%
remove-double-neg82.2%
unsub-neg82.2%
div-sub82.3%
sub-neg82.3%
*-inverses82.3%
metadata-eval82.3%
Simplified82.3%
Taylor expanded in t1 around inf 38.8%
mul-1-neg38.8%
unsub-neg38.8%
*-commutative38.8%
Simplified38.8%
Taylor expanded in u around inf 35.1%
*-commutative35.1%
Simplified35.1%
if -9.199999999999999e73 < u Initial program 73.7%
times-frac97.1%
Simplified97.1%
Taylor expanded in t1 around inf 60.1%
associate-*r/60.1%
neg-mul-160.1%
Simplified60.1%
Final simplification55.3%
(FPCore (u v t1) :precision binary64 (if (<= u -9.2e+73) (- (/ v u)) (- (/ v t1))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -9.2e+73) {
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 <= (-9.2d+73)) 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 <= -9.2e+73) {
tmp = -(v / u);
} else {
tmp = -(v / t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -9.2e+73: tmp = -(v / u) else: tmp = -(v / t1) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -9.2e+73) tmp = Float64(-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 <= -9.2e+73) tmp = -(v / u); else tmp = -(v / t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -9.2e+73], (-N[(v / u), $MachinePrecision]), (-N[(v / t1), $MachinePrecision])]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -9.2 \cdot 10^{+73}:\\
\;\;\;\;-\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;-\frac{v}{t1}\\
\end{array}
\end{array}
if u < -9.199999999999999e73Initial program 74.1%
times-frac97.6%
Simplified97.6%
Taylor expanded in t1 around 0 94.1%
associate-*r/94.1%
mul-1-neg94.1%
Simplified94.1%
Taylor expanded in t1 around inf 35.0%
associate-*r/35.0%
neg-mul-135.0%
Simplified35.0%
if -9.199999999999999e73 < u Initial program 73.7%
times-frac97.1%
Simplified97.1%
Taylor expanded in t1 around inf 60.1%
associate-*r/60.1%
neg-mul-160.1%
Simplified60.1%
Final simplification55.2%
(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(-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 73.8%
times-frac97.2%
Simplified97.2%
Taylor expanded in t1 around inf 52.1%
associate-*r/52.1%
neg-mul-152.1%
Simplified52.1%
Final simplification52.1%
(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 73.8%
times-frac97.2%
Simplified97.2%
Taylor expanded in t1 around inf 52.3%
Taylor expanded in u around inf 13.2%
Final simplification13.2%
herbie shell --seed 2023332
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))