
(FPCore (u v t1) :precision binary64 (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))
double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-t1 * v) / ((t1 + u) * (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
def code(u, v, t1): return (-t1 * v) / ((t1 + u) * (t1 + u))
function code(u, v, t1) return Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (-t1 * v) / ((t1 + u) * (t1 + u)); end
code[u_, v_, t1_] := N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (u v t1) :precision binary64 (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))
double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-t1 * v) / ((t1 + u) * (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
def code(u, v, t1): return (-t1 * v) / ((t1 + u) * (t1 + u))
function code(u, v, t1) return Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (-t1 * v) / ((t1 + u) * (t1 + u)); end
code[u_, v_, t1_] := N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}
\end{array}
(FPCore (u v t1) :precision binary64 (* (/ (- t1) (+ t1 u)) (/ v (+ t1 u))))
double code(double u, double v, double t1) {
return (-t1 / (t1 + u)) * (v / (t1 + u));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-t1 / (t1 + u)) * (v / (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (-t1 / (t1 + u)) * (v / (t1 + u));
}
def code(u, v, t1): return (-t1 / (t1 + u)) * (v / (t1 + u))
function code(u, v, t1) return Float64(Float64(Float64(-t1) / Float64(t1 + u)) * Float64(v / Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (-t1 / (t1 + u)) * (v / (t1 + u)); end
code[u_, v_, t1_] := N[(N[((-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 67.3%
times-frac99.3%
distribute-frac-neg99.3%
distribute-neg-frac299.3%
+-commutative99.3%
distribute-neg-in99.3%
unsub-neg99.3%
Simplified99.3%
Final simplification99.3%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (* v (/ t1 (* (- (- u) t1) (+ t1 u))))))
(if (<= t1 -1.3e+154)
(* (/ v (+ t1 u)) (+ (/ u t1) -1.0))
(if (<= t1 -5e-148)
t_1
(if (<= t1 1.5e-167)
(* (/ t1 (- u)) (/ v u))
(if (<= t1 6e+132) t_1 (/ v (- (- t1) (* u 2.0)))))))))
double code(double u, double v, double t1) {
double t_1 = v * (t1 / ((-u - t1) * (t1 + u)));
double tmp;
if (t1 <= -1.3e+154) {
tmp = (v / (t1 + u)) * ((u / t1) + -1.0);
} else if (t1 <= -5e-148) {
tmp = t_1;
} else if (t1 <= 1.5e-167) {
tmp = (t1 / -u) * (v / u);
} else if (t1 <= 6e+132) {
tmp = t_1;
} else {
tmp = v / (-t1 - (u * 2.0));
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: t_1
real(8) :: tmp
t_1 = v * (t1 / ((-u - t1) * (t1 + u)))
if (t1 <= (-1.3d+154)) then
tmp = (v / (t1 + u)) * ((u / t1) + (-1.0d0))
else if (t1 <= (-5d-148)) then
tmp = t_1
else if (t1 <= 1.5d-167) then
tmp = (t1 / -u) * (v / u)
else if (t1 <= 6d+132) then
tmp = t_1
else
tmp = v / (-t1 - (u * 2.0d0))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = v * (t1 / ((-u - t1) * (t1 + u)));
double tmp;
if (t1 <= -1.3e+154) {
tmp = (v / (t1 + u)) * ((u / t1) + -1.0);
} else if (t1 <= -5e-148) {
tmp = t_1;
} else if (t1 <= 1.5e-167) {
tmp = (t1 / -u) * (v / u);
} else if (t1 <= 6e+132) {
tmp = t_1;
} else {
tmp = v / (-t1 - (u * 2.0));
}
return tmp;
}
def code(u, v, t1): t_1 = v * (t1 / ((-u - t1) * (t1 + u))) tmp = 0 if t1 <= -1.3e+154: tmp = (v / (t1 + u)) * ((u / t1) + -1.0) elif t1 <= -5e-148: tmp = t_1 elif t1 <= 1.5e-167: tmp = (t1 / -u) * (v / u) elif t1 <= 6e+132: tmp = t_1 else: tmp = v / (-t1 - (u * 2.0)) return tmp
function code(u, v, t1) t_1 = Float64(v * Float64(t1 / Float64(Float64(Float64(-u) - t1) * Float64(t1 + u)))) tmp = 0.0 if (t1 <= -1.3e+154) tmp = Float64(Float64(v / Float64(t1 + u)) * Float64(Float64(u / t1) + -1.0)); elseif (t1 <= -5e-148) tmp = t_1; elseif (t1 <= 1.5e-167) tmp = Float64(Float64(t1 / Float64(-u)) * Float64(v / u)); elseif (t1 <= 6e+132) tmp = t_1; else tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = v * (t1 / ((-u - t1) * (t1 + u))); tmp = 0.0; if (t1 <= -1.3e+154) tmp = (v / (t1 + u)) * ((u / t1) + -1.0); elseif (t1 <= -5e-148) tmp = t_1; elseif (t1 <= 1.5e-167) tmp = (t1 / -u) * (v / u); elseif (t1 <= 6e+132) tmp = t_1; else tmp = v / (-t1 - (u * 2.0)); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(v * N[(t1 / N[(N[((-u) - t1), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -1.3e+154], N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(N[(u / t1), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, -5e-148], t$95$1, If[LessEqual[t1, 1.5e-167], N[(N[(t1 / (-u)), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 6e+132], t$95$1, N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := v \cdot \frac{t1}{\left(\left(-u\right) - t1\right) \cdot \left(t1 + u\right)}\\
\mathbf{if}\;t1 \leq -1.3 \cdot 10^{+154}:\\
\;\;\;\;\frac{v}{t1 + u} \cdot \left(\frac{u}{t1} + -1\right)\\
\mathbf{elif}\;t1 \leq -5 \cdot 10^{-148}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t1 \leq 1.5 \cdot 10^{-167}:\\
\;\;\;\;\frac{t1}{-u} \cdot \frac{v}{u}\\
\mathbf{elif}\;t1 \leq 6 \cdot 10^{+132}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\end{array}
\end{array}
if t1 < -1.29999999999999994e154Initial program 48.5%
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 99.0%
if -1.29999999999999994e154 < t1 < -4.9999999999999999e-148 or 1.4999999999999999e-167 < t1 < 5.9999999999999996e132Initial program 81.1%
associate-*l/89.4%
*-commutative89.4%
Simplified89.4%
if -4.9999999999999999e-148 < t1 < 1.4999999999999999e-167Initial program 74.4%
times-frac97.3%
distribute-frac-neg97.3%
distribute-neg-frac297.3%
+-commutative97.3%
distribute-neg-in97.3%
unsub-neg97.3%
Simplified97.3%
Taylor expanded in t1 around 0 87.8%
Taylor expanded in t1 around 0 89.6%
associate-*r/89.6%
mul-1-neg89.6%
Simplified89.6%
if 5.9999999999999996e132 < t1 Initial program 40.4%
associate-*l/43.9%
*-commutative43.9%
Simplified43.9%
associate-*r/40.4%
times-frac100.0%
*-commutative100.0%
frac-2neg100.0%
remove-double-neg100.0%
+-commutative100.0%
distribute-neg-in100.0%
sub-neg100.0%
clear-num100.0%
frac-2neg100.0%
frac-times95.4%
*-un-lft-identity95.4%
+-commutative95.4%
distribute-neg-in95.4%
sub-neg95.4%
sub-neg95.4%
+-commutative95.4%
add-sqr-sqrt0.0%
sqrt-unprod36.1%
sqr-neg36.1%
sqrt-unprod35.3%
add-sqr-sqrt10.9%
sqrt-unprod35.3%
sqr-neg35.3%
Applied egg-rr95.4%
Taylor expanded in u around 0 90.4%
*-commutative90.4%
Simplified90.4%
Final simplification91.3%
(FPCore (u v t1)
:precision binary64
(if (<= t1 -9.2e+107)
(* (/ v (+ t1 u)) (+ (/ u t1) -1.0))
(if (<= t1 3.4e+63)
(* t1 (/ (/ (- v) (+ t1 u)) (+ t1 u)))
(/ v (- (- t1) (* u 2.0))))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -9.2e+107) {
tmp = (v / (t1 + u)) * ((u / t1) + -1.0);
} else if (t1 <= 3.4e+63) {
tmp = t1 * ((-v / (t1 + u)) / (t1 + u));
} else {
tmp = v / (-t1 - (u * 2.0));
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (t1 <= (-9.2d+107)) then
tmp = (v / (t1 + u)) * ((u / t1) + (-1.0d0))
else if (t1 <= 3.4d+63) then
tmp = t1 * ((-v / (t1 + u)) / (t1 + u))
else
tmp = v / (-t1 - (u * 2.0d0))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -9.2e+107) {
tmp = (v / (t1 + u)) * ((u / t1) + -1.0);
} else if (t1 <= 3.4e+63) {
tmp = t1 * ((-v / (t1 + u)) / (t1 + u));
} else {
tmp = v / (-t1 - (u * 2.0));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -9.2e+107: tmp = (v / (t1 + u)) * ((u / t1) + -1.0) elif t1 <= 3.4e+63: tmp = t1 * ((-v / (t1 + u)) / (t1 + u)) else: tmp = v / (-t1 - (u * 2.0)) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -9.2e+107) tmp = Float64(Float64(v / Float64(t1 + u)) * Float64(Float64(u / t1) + -1.0)); elseif (t1 <= 3.4e+63) tmp = Float64(t1 * Float64(Float64(Float64(-v) / Float64(t1 + u)) / Float64(t1 + u))); else tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -9.2e+107) tmp = (v / (t1 + u)) * ((u / t1) + -1.0); elseif (t1 <= 3.4e+63) tmp = t1 * ((-v / (t1 + u)) / (t1 + u)); else tmp = v / (-t1 - (u * 2.0)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -9.2e+107], N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(N[(u / t1), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 3.4e+63], N[(t1 * N[(N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -9.2 \cdot 10^{+107}:\\
\;\;\;\;\frac{v}{t1 + u} \cdot \left(\frac{u}{t1} + -1\right)\\
\mathbf{elif}\;t1 \leq 3.4 \cdot 10^{+63}:\\
\;\;\;\;t1 \cdot \frac{\frac{-v}{t1 + u}}{t1 + u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\end{array}
\end{array}
if t1 < -9.2000000000000001e107Initial program 55.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 99.2%
if -9.2000000000000001e107 < t1 < 3.3999999999999999e63Initial program 78.4%
associate-/l*81.0%
Simplified81.0%
associate-/r*93.1%
div-inv93.0%
Applied egg-rr93.0%
associate-*r/93.1%
*-rgt-identity93.1%
Simplified93.1%
if 3.3999999999999999e63 < t1 Initial program 51.3%
associate-*l/57.4%
*-commutative57.4%
Simplified57.4%
associate-*r/51.3%
times-frac100.0%
*-commutative100.0%
frac-2neg100.0%
remove-double-neg100.0%
+-commutative100.0%
distribute-neg-in100.0%
sub-neg100.0%
clear-num100.0%
frac-2neg100.0%
frac-times96.5%
*-un-lft-identity96.5%
+-commutative96.5%
distribute-neg-in96.5%
sub-neg96.5%
sub-neg96.5%
+-commutative96.5%
add-sqr-sqrt0.0%
sqrt-unprod38.8%
sqr-neg38.8%
sqrt-unprod38.2%
add-sqr-sqrt14.0%
sqrt-unprod38.2%
sqr-neg38.2%
Applied egg-rr96.5%
Taylor expanded in u around 0 92.5%
*-commutative92.5%
Simplified92.5%
Final simplification94.4%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1.05e-63) (not (<= t1 1.82e+50))) (/ v (- (- t1) (* u 2.0))) (* (/ t1 (- u)) (/ v u))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.05e-63) || !(t1 <= 1.82e+50)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = (t1 / -u) * (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 <= (-1.05d-63)) .or. (.not. (t1 <= 1.82d+50))) then
tmp = v / (-t1 - (u * 2.0d0))
else
tmp = (t1 / -u) * (v / u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.05e-63) || !(t1 <= 1.82e+50)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = (t1 / -u) * (v / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.05e-63) or not (t1 <= 1.82e+50): tmp = v / (-t1 - (u * 2.0)) else: tmp = (t1 / -u) * (v / u) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.05e-63) || !(t1 <= 1.82e+50)) tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); else tmp = Float64(Float64(t1 / Float64(-u)) * Float64(v / u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -1.05e-63) || ~((t1 <= 1.82e+50))) tmp = v / (-t1 - (u * 2.0)); else tmp = (t1 / -u) * (v / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.05e-63], N[Not[LessEqual[t1, 1.82e+50]], $MachinePrecision]], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t1 / (-u)), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.05 \cdot 10^{-63} \lor \neg \left(t1 \leq 1.82 \cdot 10^{+50}\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{-u} \cdot \frac{v}{u}\\
\end{array}
\end{array}
if t1 < -1.05e-63 or 1.81999999999999997e50 < t1 Initial program 57.2%
associate-*l/62.9%
*-commutative62.9%
Simplified62.9%
associate-*r/57.2%
times-frac99.9%
*-commutative99.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.6%
*-un-lft-identity96.6%
+-commutative96.6%
distribute-neg-in96.6%
sub-neg96.6%
sub-neg96.6%
+-commutative96.6%
add-sqr-sqrt58.3%
sqrt-unprod57.0%
sqr-neg57.0%
sqrt-unprod15.0%
add-sqr-sqrt5.5%
sqrt-unprod15.1%
sqr-neg15.1%
Applied egg-rr96.6%
Taylor expanded in u around 0 89.9%
*-commutative89.9%
Simplified89.9%
if -1.05e-63 < t1 < 1.81999999999999997e50Initial program 79.0%
times-frac98.5%
distribute-frac-neg98.5%
distribute-neg-frac298.5%
+-commutative98.5%
distribute-neg-in98.5%
unsub-neg98.5%
Simplified98.5%
Taylor expanded in t1 around 0 77.3%
Taylor expanded in t1 around 0 80.6%
associate-*r/80.6%
mul-1-neg80.6%
Simplified80.6%
Final simplification85.6%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -2e-64) (not (<= t1 2.4e+49))) (/ (- v) (+ t1 u)) (* (/ t1 (- u)) (/ v u))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -2e-64) || !(t1 <= 2.4e+49)) {
tmp = -v / (t1 + u);
} else {
tmp = (t1 / -u) * (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 <= (-2d-64)) .or. (.not. (t1 <= 2.4d+49))) then
tmp = -v / (t1 + u)
else
tmp = (t1 / -u) * (v / u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -2e-64) || !(t1 <= 2.4e+49)) {
tmp = -v / (t1 + u);
} else {
tmp = (t1 / -u) * (v / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -2e-64) or not (t1 <= 2.4e+49): tmp = -v / (t1 + u) else: tmp = (t1 / -u) * (v / u) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -2e-64) || !(t1 <= 2.4e+49)) tmp = Float64(Float64(-v) / Float64(t1 + u)); else tmp = Float64(Float64(t1 / Float64(-u)) * Float64(v / u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -2e-64) || ~((t1 <= 2.4e+49))) tmp = -v / (t1 + u); else tmp = (t1 / -u) * (v / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -2e-64], N[Not[LessEqual[t1, 2.4e+49]], $MachinePrecision]], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision], N[(N[(t1 / (-u)), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2 \cdot 10^{-64} \lor \neg \left(t1 \leq 2.4 \cdot 10^{+49}\right):\\
\;\;\;\;\frac{-v}{t1 + u}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{-u} \cdot \frac{v}{u}\\
\end{array}
\end{array}
if t1 < -1.99999999999999993e-64 or 2.4e49 < t1 Initial program 57.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 89.3%
clear-num88.9%
un-div-inv88.9%
Applied egg-rr88.9%
Taylor expanded in v around 0 89.3%
associate-*r/89.3%
mul-1-neg89.3%
Simplified89.3%
if -1.99999999999999993e-64 < t1 < 2.4e49Initial program 79.0%
times-frac98.5%
distribute-frac-neg98.5%
distribute-neg-frac298.5%
+-commutative98.5%
distribute-neg-in98.5%
unsub-neg98.5%
Simplified98.5%
Taylor expanded in t1 around 0 77.3%
Taylor expanded in t1 around 0 80.6%
associate-*r/80.6%
mul-1-neg80.6%
Simplified80.6%
Final simplification85.3%
(FPCore (u v t1) :precision binary64 (if (<= u -1.9e+171) (/ v (+ t1 u)) (if (<= u 3e+170) (/ v (- t1)) (* v (/ 0.5 u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.9e+171) {
tmp = v / (t1 + u);
} else if (u <= 3e+170) {
tmp = v / -t1;
} else {
tmp = v * (0.5 / 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.9d+171)) then
tmp = v / (t1 + u)
else if (u <= 3d+170) then
tmp = v / -t1
else
tmp = v * (0.5d0 / u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -1.9e+171) {
tmp = v / (t1 + u);
} else if (u <= 3e+170) {
tmp = v / -t1;
} else {
tmp = v * (0.5 / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.9e+171: tmp = v / (t1 + u) elif u <= 3e+170: tmp = v / -t1 else: tmp = v * (0.5 / u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.9e+171) tmp = Float64(v / Float64(t1 + u)); elseif (u <= 3e+170) tmp = Float64(v / Float64(-t1)); else tmp = Float64(v * Float64(0.5 / u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -1.9e+171) tmp = v / (t1 + u); elseif (u <= 3e+170) tmp = v / -t1; else tmp = v * (0.5 / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.9e+171], N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 3e+170], N[(v / (-t1)), $MachinePrecision], N[(v * N[(0.5 / u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.9 \cdot 10^{+171}:\\
\;\;\;\;\frac{v}{t1 + u}\\
\mathbf{elif}\;u \leq 3 \cdot 10^{+170}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;v \cdot \frac{0.5}{u}\\
\end{array}
\end{array}
if u < -1.9000000000000001e171Initial program 76.1%
times-frac99.4%
distribute-frac-neg99.4%
distribute-neg-frac299.4%
+-commutative99.4%
distribute-neg-in99.4%
unsub-neg99.4%
Simplified99.4%
Taylor expanded in t1 around inf 52.7%
associate-*r/52.7%
neg-mul-152.7%
add-sqr-sqrt29.7%
sqrt-unprod47.8%
sqr-neg47.8%
sqrt-unprod21.1%
add-sqr-sqrt48.0%
Applied egg-rr48.0%
if -1.9000000000000001e171 < u < 2.99999999999999997e170Initial program 63.6%
associate-*l/69.2%
*-commutative69.2%
Simplified69.2%
Taylor expanded in t1 around inf 71.4%
associate-*r/71.4%
neg-mul-171.4%
Simplified71.4%
if 2.99999999999999997e170 < u Initial program 82.4%
associate-*l/82.5%
*-commutative82.5%
Simplified82.5%
associate-*r/82.4%
times-frac99.9%
*-commutative99.9%
frac-2neg99.9%
remove-double-neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
clear-num99.8%
frac-2neg99.8%
frac-times86.0%
*-un-lft-identity86.0%
+-commutative86.0%
distribute-neg-in86.0%
sub-neg86.0%
sub-neg86.0%
+-commutative86.0%
add-sqr-sqrt37.2%
sqrt-unprod82.5%
sqr-neg82.5%
sqrt-unprod48.8%
add-sqr-sqrt0.0%
sqrt-unprod48.8%
sqr-neg48.8%
Applied egg-rr86.0%
Taylor expanded in u around 0 52.9%
*-commutative52.9%
Simplified52.9%
neg-sub052.9%
sub-neg52.9%
add-sqr-sqrt20.0%
sqrt-unprod50.4%
sqr-neg50.4%
sqrt-unprod30.8%
add-sqr-sqrt50.9%
Applied egg-rr50.9%
+-lft-identity50.9%
Simplified50.9%
Taylor expanded in t1 around 0 51.2%
associate-*r/51.2%
*-commutative51.2%
associate-/l*51.2%
Simplified51.2%
Final simplification66.0%
(FPCore (u v t1) :precision binary64 (if (<= u -2.9e+171) (/ -0.5 (/ u v)) (if (<= u 1.36e+178) (/ v (- t1)) (* v (/ 0.5 u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -2.9e+171) {
tmp = -0.5 / (u / v);
} else if (u <= 1.36e+178) {
tmp = v / -t1;
} else {
tmp = v * (0.5 / 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.9d+171)) then
tmp = (-0.5d0) / (u / v)
else if (u <= 1.36d+178) then
tmp = v / -t1
else
tmp = v * (0.5d0 / u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -2.9e+171) {
tmp = -0.5 / (u / v);
} else if (u <= 1.36e+178) {
tmp = v / -t1;
} else {
tmp = v * (0.5 / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -2.9e+171: tmp = -0.5 / (u / v) elif u <= 1.36e+178: tmp = v / -t1 else: tmp = v * (0.5 / u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -2.9e+171) tmp = Float64(-0.5 / Float64(u / v)); elseif (u <= 1.36e+178) tmp = Float64(v / Float64(-t1)); else tmp = Float64(v * Float64(0.5 / u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -2.9e+171) tmp = -0.5 / (u / v); elseif (u <= 1.36e+178) tmp = v / -t1; else tmp = v * (0.5 / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -2.9e+171], N[(-0.5 / N[(u / v), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 1.36e+178], N[(v / (-t1)), $MachinePrecision], N[(v * N[(0.5 / u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.9 \cdot 10^{+171}:\\
\;\;\;\;\frac{-0.5}{\frac{u}{v}}\\
\mathbf{elif}\;u \leq 1.36 \cdot 10^{+178}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;v \cdot \frac{0.5}{u}\\
\end{array}
\end{array}
if u < -2.89999999999999985e171Initial program 76.1%
associate-*l/76.5%
*-commutative76.5%
Simplified76.5%
associate-*r/76.1%
times-frac99.4%
*-commutative99.4%
frac-2neg99.4%
remove-double-neg99.4%
+-commutative99.4%
distribute-neg-in99.4%
sub-neg99.4%
clear-num97.8%
frac-2neg97.8%
frac-times81.9%
*-un-lft-identity81.9%
+-commutative81.9%
distribute-neg-in81.9%
sub-neg81.9%
sub-neg81.9%
+-commutative81.9%
add-sqr-sqrt43.5%
sqrt-unprod76.5%
sqr-neg76.5%
sqrt-unprod35.6%
add-sqr-sqrt35.6%
sqrt-unprod35.7%
sqr-neg35.7%
Applied egg-rr81.9%
Taylor expanded in u around 0 53.7%
*-commutative53.7%
Simplified53.7%
Taylor expanded in t1 around 0 46.2%
*-commutative46.2%
Simplified46.2%
*-commutative46.2%
clear-num46.5%
un-div-inv46.5%
Applied egg-rr46.5%
if -2.89999999999999985e171 < u < 1.35999999999999992e178Initial program 63.6%
associate-*l/69.2%
*-commutative69.2%
Simplified69.2%
Taylor expanded in t1 around inf 71.4%
associate-*r/71.4%
neg-mul-171.4%
Simplified71.4%
if 1.35999999999999992e178 < u Initial program 82.4%
associate-*l/82.5%
*-commutative82.5%
Simplified82.5%
associate-*r/82.4%
times-frac99.9%
*-commutative99.9%
frac-2neg99.9%
remove-double-neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
clear-num99.8%
frac-2neg99.8%
frac-times86.0%
*-un-lft-identity86.0%
+-commutative86.0%
distribute-neg-in86.0%
sub-neg86.0%
sub-neg86.0%
+-commutative86.0%
add-sqr-sqrt37.2%
sqrt-unprod82.5%
sqr-neg82.5%
sqrt-unprod48.8%
add-sqr-sqrt0.0%
sqrt-unprod48.8%
sqr-neg48.8%
Applied egg-rr86.0%
Taylor expanded in u around 0 52.9%
*-commutative52.9%
Simplified52.9%
neg-sub052.9%
sub-neg52.9%
add-sqr-sqrt20.0%
sqrt-unprod50.4%
sqr-neg50.4%
sqrt-unprod30.8%
add-sqr-sqrt50.9%
Applied egg-rr50.9%
+-lft-identity50.9%
Simplified50.9%
Taylor expanded in t1 around 0 51.2%
associate-*r/51.2%
*-commutative51.2%
associate-/l*51.2%
Simplified51.2%
Final simplification65.8%
(FPCore (u v t1) :precision binary64 (if (<= u -1.72e+171) (/ -1.0 (/ u v)) (if (<= u 2.65e+178) (/ v (- t1)) (* v (/ 0.5 u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.72e+171) {
tmp = -1.0 / (u / v);
} else if (u <= 2.65e+178) {
tmp = v / -t1;
} else {
tmp = v * (0.5 / 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.72d+171)) then
tmp = (-1.0d0) / (u / v)
else if (u <= 2.65d+178) then
tmp = v / -t1
else
tmp = v * (0.5d0 / u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -1.72e+171) {
tmp = -1.0 / (u / v);
} else if (u <= 2.65e+178) {
tmp = v / -t1;
} else {
tmp = v * (0.5 / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.72e+171: tmp = -1.0 / (u / v) elif u <= 2.65e+178: tmp = v / -t1 else: tmp = v * (0.5 / u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.72e+171) tmp = Float64(-1.0 / Float64(u / v)); elseif (u <= 2.65e+178) tmp = Float64(v / Float64(-t1)); else tmp = Float64(v * Float64(0.5 / u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -1.72e+171) tmp = -1.0 / (u / v); elseif (u <= 2.65e+178) tmp = v / -t1; else tmp = v * (0.5 / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.72e+171], N[(-1.0 / N[(u / v), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 2.65e+178], N[(v / (-t1)), $MachinePrecision], N[(v * N[(0.5 / u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.72 \cdot 10^{+171}:\\
\;\;\;\;\frac{-1}{\frac{u}{v}}\\
\mathbf{elif}\;u \leq 2.65 \cdot 10^{+178}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;v \cdot \frac{0.5}{u}\\
\end{array}
\end{array}
if u < -1.7199999999999999e171Initial program 76.1%
times-frac99.4%
distribute-frac-neg99.4%
distribute-neg-frac299.4%
+-commutative99.4%
distribute-neg-in99.4%
unsub-neg99.4%
Simplified99.4%
Taylor expanded in t1 around inf 52.7%
clear-num53.1%
un-div-inv53.1%
Applied egg-rr53.1%
Taylor expanded in t1 around 0 46.4%
if -1.7199999999999999e171 < u < 2.64999999999999994e178Initial program 63.6%
associate-*l/69.2%
*-commutative69.2%
Simplified69.2%
Taylor expanded in t1 around inf 71.4%
associate-*r/71.4%
neg-mul-171.4%
Simplified71.4%
if 2.64999999999999994e178 < u Initial program 82.4%
associate-*l/82.5%
*-commutative82.5%
Simplified82.5%
associate-*r/82.4%
times-frac99.9%
*-commutative99.9%
frac-2neg99.9%
remove-double-neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
clear-num99.8%
frac-2neg99.8%
frac-times86.0%
*-un-lft-identity86.0%
+-commutative86.0%
distribute-neg-in86.0%
sub-neg86.0%
sub-neg86.0%
+-commutative86.0%
add-sqr-sqrt37.2%
sqrt-unprod82.5%
sqr-neg82.5%
sqrt-unprod48.8%
add-sqr-sqrt0.0%
sqrt-unprod48.8%
sqr-neg48.8%
Applied egg-rr86.0%
Taylor expanded in u around 0 52.9%
*-commutative52.9%
Simplified52.9%
neg-sub052.9%
sub-neg52.9%
add-sqr-sqrt20.0%
sqrt-unprod50.4%
sqr-neg50.4%
sqrt-unprod30.8%
add-sqr-sqrt50.9%
Applied egg-rr50.9%
+-lft-identity50.9%
Simplified50.9%
Taylor expanded in t1 around 0 51.2%
associate-*r/51.2%
*-commutative51.2%
associate-/l*51.2%
Simplified51.2%
Final simplification65.8%
(FPCore (u v t1) :precision binary64 (if (<= u -2.55e+171) (* (/ v u) -0.5) (if (<= u 3.4e+173) (/ v (- t1)) (* v (/ 0.5 u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -2.55e+171) {
tmp = (v / u) * -0.5;
} else if (u <= 3.4e+173) {
tmp = v / -t1;
} else {
tmp = v * (0.5 / 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.55d+171)) then
tmp = (v / u) * (-0.5d0)
else if (u <= 3.4d+173) then
tmp = v / -t1
else
tmp = v * (0.5d0 / u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -2.55e+171) {
tmp = (v / u) * -0.5;
} else if (u <= 3.4e+173) {
tmp = v / -t1;
} else {
tmp = v * (0.5 / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -2.55e+171: tmp = (v / u) * -0.5 elif u <= 3.4e+173: tmp = v / -t1 else: tmp = v * (0.5 / u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -2.55e+171) tmp = Float64(Float64(v / u) * -0.5); elseif (u <= 3.4e+173) tmp = Float64(v / Float64(-t1)); else tmp = Float64(v * Float64(0.5 / u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -2.55e+171) tmp = (v / u) * -0.5; elseif (u <= 3.4e+173) tmp = v / -t1; else tmp = v * (0.5 / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -2.55e+171], N[(N[(v / u), $MachinePrecision] * -0.5), $MachinePrecision], If[LessEqual[u, 3.4e+173], N[(v / (-t1)), $MachinePrecision], N[(v * N[(0.5 / u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.55 \cdot 10^{+171}:\\
\;\;\;\;\frac{v}{u} \cdot -0.5\\
\mathbf{elif}\;u \leq 3.4 \cdot 10^{+173}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;v \cdot \frac{0.5}{u}\\
\end{array}
\end{array}
if u < -2.55000000000000011e171Initial program 76.1%
associate-*l/76.5%
*-commutative76.5%
Simplified76.5%
associate-*r/76.1%
times-frac99.4%
*-commutative99.4%
frac-2neg99.4%
remove-double-neg99.4%
+-commutative99.4%
distribute-neg-in99.4%
sub-neg99.4%
clear-num97.8%
frac-2neg97.8%
frac-times81.9%
*-un-lft-identity81.9%
+-commutative81.9%
distribute-neg-in81.9%
sub-neg81.9%
sub-neg81.9%
+-commutative81.9%
add-sqr-sqrt43.5%
sqrt-unprod76.5%
sqr-neg76.5%
sqrt-unprod35.6%
add-sqr-sqrt35.6%
sqrt-unprod35.7%
sqr-neg35.7%
Applied egg-rr81.9%
Taylor expanded in u around 0 53.7%
*-commutative53.7%
Simplified53.7%
Taylor expanded in t1 around 0 46.2%
*-commutative46.2%
Simplified46.2%
if -2.55000000000000011e171 < u < 3.40000000000000021e173Initial program 63.6%
associate-*l/69.2%
*-commutative69.2%
Simplified69.2%
Taylor expanded in t1 around inf 71.4%
associate-*r/71.4%
neg-mul-171.4%
Simplified71.4%
if 3.40000000000000021e173 < u Initial program 82.4%
associate-*l/82.5%
*-commutative82.5%
Simplified82.5%
associate-*r/82.4%
times-frac99.9%
*-commutative99.9%
frac-2neg99.9%
remove-double-neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
clear-num99.8%
frac-2neg99.8%
frac-times86.0%
*-un-lft-identity86.0%
+-commutative86.0%
distribute-neg-in86.0%
sub-neg86.0%
sub-neg86.0%
+-commutative86.0%
add-sqr-sqrt37.2%
sqrt-unprod82.5%
sqr-neg82.5%
sqrt-unprod48.8%
add-sqr-sqrt0.0%
sqrt-unprod48.8%
sqr-neg48.8%
Applied egg-rr86.0%
Taylor expanded in u around 0 52.9%
*-commutative52.9%
Simplified52.9%
neg-sub052.9%
sub-neg52.9%
add-sqr-sqrt20.0%
sqrt-unprod50.4%
sqr-neg50.4%
sqrt-unprod30.8%
add-sqr-sqrt50.9%
Applied egg-rr50.9%
+-lft-identity50.9%
Simplified50.9%
Taylor expanded in t1 around 0 51.2%
associate-*r/51.2%
*-commutative51.2%
associate-/l*51.2%
Simplified51.2%
Final simplification65.8%
(FPCore (u v t1) :precision binary64 (if (<= u -1.2e+171) (/ (- v) u) (if (<= u 1.7e+176) (/ v (- t1)) (* v (/ 0.5 u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.2e+171) {
tmp = -v / u;
} else if (u <= 1.7e+176) {
tmp = v / -t1;
} else {
tmp = v * (0.5 / 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.2d+171)) then
tmp = -v / u
else if (u <= 1.7d+176) then
tmp = v / -t1
else
tmp = v * (0.5d0 / u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -1.2e+171) {
tmp = -v / u;
} else if (u <= 1.7e+176) {
tmp = v / -t1;
} else {
tmp = v * (0.5 / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.2e+171: tmp = -v / u elif u <= 1.7e+176: tmp = v / -t1 else: tmp = v * (0.5 / u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.2e+171) tmp = Float64(Float64(-v) / u); elseif (u <= 1.7e+176) tmp = Float64(v / Float64(-t1)); else tmp = Float64(v * Float64(0.5 / u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -1.2e+171) tmp = -v / u; elseif (u <= 1.7e+176) tmp = v / -t1; else tmp = v * (0.5 / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.2e+171], N[((-v) / u), $MachinePrecision], If[LessEqual[u, 1.7e+176], N[(v / (-t1)), $MachinePrecision], N[(v * N[(0.5 / u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.2 \cdot 10^{+171}:\\
\;\;\;\;\frac{-v}{u}\\
\mathbf{elif}\;u \leq 1.7 \cdot 10^{+176}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;v \cdot \frac{0.5}{u}\\
\end{array}
\end{array}
if u < -1.19999999999999999e171Initial program 76.1%
times-frac99.4%
distribute-frac-neg99.4%
distribute-neg-frac299.4%
+-commutative99.4%
distribute-neg-in99.4%
unsub-neg99.4%
Simplified99.4%
Taylor expanded in t1 around inf 52.7%
Taylor expanded in t1 around 0 46.0%
neg-mul-146.0%
distribute-neg-frac246.0%
Simplified46.0%
if -1.19999999999999999e171 < u < 1.70000000000000007e176Initial program 63.6%
associate-*l/69.2%
*-commutative69.2%
Simplified69.2%
Taylor expanded in t1 around inf 71.4%
associate-*r/71.4%
neg-mul-171.4%
Simplified71.4%
if 1.70000000000000007e176 < u Initial program 82.4%
associate-*l/82.5%
*-commutative82.5%
Simplified82.5%
associate-*r/82.4%
times-frac99.9%
*-commutative99.9%
frac-2neg99.9%
remove-double-neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
clear-num99.8%
frac-2neg99.8%
frac-times86.0%
*-un-lft-identity86.0%
+-commutative86.0%
distribute-neg-in86.0%
sub-neg86.0%
sub-neg86.0%
+-commutative86.0%
add-sqr-sqrt37.2%
sqrt-unprod82.5%
sqr-neg82.5%
sqrt-unprod48.8%
add-sqr-sqrt0.0%
sqrt-unprod48.8%
sqr-neg48.8%
Applied egg-rr86.0%
Taylor expanded in u around 0 52.9%
*-commutative52.9%
Simplified52.9%
neg-sub052.9%
sub-neg52.9%
add-sqr-sqrt20.0%
sqrt-unprod50.4%
sqr-neg50.4%
sqrt-unprod30.8%
add-sqr-sqrt50.9%
Applied egg-rr50.9%
+-lft-identity50.9%
Simplified50.9%
Taylor expanded in t1 around 0 51.2%
associate-*r/51.2%
*-commutative51.2%
associate-/l*51.2%
Simplified51.2%
Final simplification65.8%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1.8e+85) (not (<= t1 3.6e+130))) (/ v t1) (/ (- v) u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.8e+85) || !(t1 <= 3.6e+130)) {
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 <= (-1.8d+85)) .or. (.not. (t1 <= 3.6d+130))) 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 <= -1.8e+85) || !(t1 <= 3.6e+130)) {
tmp = v / t1;
} else {
tmp = -v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.8e+85) or not (t1 <= 3.6e+130): tmp = v / t1 else: tmp = -v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.8e+85) || !(t1 <= 3.6e+130)) tmp = Float64(v / t1); else tmp = Float64(Float64(-v) / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -1.8e+85) || ~((t1 <= 3.6e+130))) tmp = v / t1; else tmp = -v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.8e+85], N[Not[LessEqual[t1, 3.6e+130]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[((-v) / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.8 \cdot 10^{+85} \lor \neg \left(t1 \leq 3.6 \cdot 10^{+130}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{u}\\
\end{array}
\end{array}
if t1 < -1.7999999999999999e85 or 3.6000000000000001e130 < t1 Initial program 49.0%
associate-*l/54.0%
*-commutative54.0%
Simplified54.0%
Taylor expanded in t1 around inf 94.7%
associate-*r/94.7%
neg-mul-194.7%
Simplified94.7%
neg-sub095.6%
sub-neg95.6%
add-sqr-sqrt43.0%
sqrt-unprod54.0%
sqr-neg54.0%
sqrt-unprod21.0%
add-sqr-sqrt41.4%
Applied egg-rr41.3%
+-lft-identity41.4%
Simplified41.3%
if -1.7999999999999999e85 < t1 < 3.6000000000000001e130Initial program 79.0%
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 50.8%
Taylor expanded in t1 around 0 24.0%
neg-mul-124.0%
distribute-neg-frac224.0%
Simplified24.0%
Final simplification30.8%
(FPCore (u v t1) :precision binary64 (if (<= u -1.2e+171) (/ (- v) u) (if (<= u 2e+175) (/ v (- t1)) (/ v u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.2e+171) {
tmp = -v / u;
} else if (u <= 2e+175) {
tmp = v / -t1;
} else {
tmp = v / u;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-1.2d+171)) then
tmp = -v / u
else if (u <= 2d+175) then
tmp = v / -t1
else
tmp = v / u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -1.2e+171) {
tmp = -v / u;
} else if (u <= 2e+175) {
tmp = v / -t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.2e+171: tmp = -v / u elif u <= 2e+175: tmp = v / -t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.2e+171) tmp = Float64(Float64(-v) / u); elseif (u <= 2e+175) tmp = Float64(v / Float64(-t1)); else tmp = Float64(v / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -1.2e+171) tmp = -v / u; elseif (u <= 2e+175) tmp = v / -t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.2e+171], N[((-v) / u), $MachinePrecision], If[LessEqual[u, 2e+175], N[(v / (-t1)), $MachinePrecision], N[(v / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.2 \cdot 10^{+171}:\\
\;\;\;\;\frac{-v}{u}\\
\mathbf{elif}\;u \leq 2 \cdot 10^{+175}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if u < -1.19999999999999999e171Initial program 76.1%
times-frac99.4%
distribute-frac-neg99.4%
distribute-neg-frac299.4%
+-commutative99.4%
distribute-neg-in99.4%
unsub-neg99.4%
Simplified99.4%
Taylor expanded in t1 around inf 52.7%
Taylor expanded in t1 around 0 46.0%
neg-mul-146.0%
distribute-neg-frac246.0%
Simplified46.0%
if -1.19999999999999999e171 < u < 1.9999999999999999e175Initial program 63.6%
associate-*l/69.2%
*-commutative69.2%
Simplified69.2%
Taylor expanded in t1 around inf 71.4%
associate-*r/71.4%
neg-mul-171.4%
Simplified71.4%
if 1.9999999999999999e175 < u Initial program 82.4%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in t1 around inf 52.2%
associate-*r/52.2%
neg-mul-152.2%
add-sqr-sqrt20.0%
sqrt-unprod50.4%
sqr-neg50.4%
sqrt-unprod30.8%
add-sqr-sqrt50.8%
Applied egg-rr50.8%
Taylor expanded in t1 around 0 51.1%
Final simplification65.8%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -2.2e+80) (not (<= t1 1.6e+65))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -2.2e+80) || !(t1 <= 1.6e+65)) {
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 <= (-2.2d+80)) .or. (.not. (t1 <= 1.6d+65))) 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 <= -2.2e+80) || !(t1 <= 1.6e+65)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -2.2e+80) or not (t1 <= 1.6e+65): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -2.2e+80) || !(t1 <= 1.6e+65)) 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 <= -2.2e+80) || ~((t1 <= 1.6e+65))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -2.2e+80], N[Not[LessEqual[t1, 1.6e+65]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2.2 \cdot 10^{+80} \lor \neg \left(t1 \leq 1.6 \cdot 10^{+65}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -2.20000000000000003e80 or 1.60000000000000003e65 < t1 Initial program 52.4%
associate-*l/59.3%
*-commutative59.3%
Simplified59.3%
Taylor expanded in t1 around inf 94.4%
associate-*r/94.4%
neg-mul-194.4%
Simplified94.4%
neg-sub096.0%
sub-neg96.0%
add-sqr-sqrt44.2%
sqrt-unprod54.9%
sqr-neg54.9%
sqrt-unprod21.2%
add-sqr-sqrt42.0%
Applied egg-rr41.1%
+-lft-identity42.0%
Simplified41.1%
if -2.20000000000000003e80 < t1 < 1.60000000000000003e65Initial program 79.1%
times-frac98.7%
distribute-frac-neg98.7%
distribute-neg-frac298.7%
+-commutative98.7%
distribute-neg-in98.7%
unsub-neg98.7%
Simplified98.7%
Taylor expanded in t1 around inf 46.4%
associate-*r/46.4%
neg-mul-146.4%
add-sqr-sqrt25.5%
sqrt-unprod33.0%
sqr-neg33.0%
sqrt-unprod8.8%
add-sqr-sqrt17.4%
Applied egg-rr17.4%
Taylor expanded in t1 around 0 20.4%
Final simplification29.5%
(FPCore (u v t1) :precision binary64 (/ (- v) (+ t1 u)))
double code(double u, double v, double t1) {
return -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 = -v / (t1 + u)
end function
public static double code(double u, double v, double t1) {
return -v / (t1 + u);
}
def code(u, v, t1): return -v / (t1 + u)
function code(u, v, t1) return Float64(Float64(-v) / Float64(t1 + u)) end
function tmp = code(u, v, t1) tmp = -v / (t1 + u); end
code[u_, v_, t1_] := N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{-v}{t1 + u}
\end{array}
Initial program 67.3%
times-frac99.3%
distribute-frac-neg99.3%
distribute-neg-frac299.3%
+-commutative99.3%
distribute-neg-in99.3%
unsub-neg99.3%
Simplified99.3%
Taylor expanded in t1 around inf 68.0%
clear-num67.7%
un-div-inv67.7%
Applied egg-rr67.7%
Taylor expanded in v around 0 68.0%
associate-*r/68.0%
mul-1-neg68.0%
Simplified68.0%
(FPCore (u v t1) :precision binary64 (/ v t1))
double code(double u, double v, double t1) {
return v / t1;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = v / t1
end function
public static double code(double u, double v, double t1) {
return v / t1;
}
def code(u, v, t1): return v / t1
function code(u, v, t1) return Float64(v / t1) end
function tmp = code(u, v, t1) tmp = v / t1; end
code[u_, v_, t1_] := N[(v / t1), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{t1}
\end{array}
Initial program 67.3%
associate-*l/71.6%
*-commutative71.6%
Simplified71.6%
Taylor expanded in t1 around inf 61.2%
associate-*r/61.2%
neg-mul-161.2%
Simplified61.2%
neg-sub068.6%
sub-neg68.6%
add-sqr-sqrt33.9%
sqrt-unprod42.7%
sqr-neg42.7%
sqrt-unprod14.3%
add-sqr-sqrt28.3%
Applied egg-rr20.1%
+-lft-identity28.3%
Simplified20.1%
herbie shell --seed 2024160
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))