
(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 16 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 71.6%
associate-*l/74.9%
*-commutative74.9%
Simplified74.9%
*-commutative74.9%
associate-*l/71.6%
times-frac97.8%
frac-2neg97.8%
remove-double-neg97.8%
+-commutative97.8%
distribute-neg-in97.8%
sub-neg97.8%
frac-2neg97.8%
+-commutative97.8%
distribute-neg-in97.8%
sub-neg97.8%
associate-*r/98.3%
Applied egg-rr98.3%
Final simplification98.3%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ v (+ t1 u))) (t_2 (* t_1 (/ t1 (- u)))))
(if (<= u -9.4e+57)
t_2
(if (<= u -5.8e-68)
(/ (* v (/ t1 (- u t1))) t1)
(if (<= u -1.7e-75)
(* t1 (/ t_1 (- u)))
(if (<= u 1.15e-74) (/ v (- (- t1) (* u 2.0))) t_2))))))
double code(double u, double v, double t1) {
double t_1 = v / (t1 + u);
double t_2 = t_1 * (t1 / -u);
double tmp;
if (u <= -9.4e+57) {
tmp = t_2;
} else if (u <= -5.8e-68) {
tmp = (v * (t1 / (u - t1))) / t1;
} else if (u <= -1.7e-75) {
tmp = t1 * (t_1 / -u);
} else if (u <= 1.15e-74) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = v / (t1 + u)
t_2 = t_1 * (t1 / -u)
if (u <= (-9.4d+57)) then
tmp = t_2
else if (u <= (-5.8d-68)) then
tmp = (v * (t1 / (u - t1))) / t1
else if (u <= (-1.7d-75)) then
tmp = t1 * (t_1 / -u)
else if (u <= 1.15d-74) then
tmp = v / (-t1 - (u * 2.0d0))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = v / (t1 + u);
double t_2 = t_1 * (t1 / -u);
double tmp;
if (u <= -9.4e+57) {
tmp = t_2;
} else if (u <= -5.8e-68) {
tmp = (v * (t1 / (u - t1))) / t1;
} else if (u <= -1.7e-75) {
tmp = t1 * (t_1 / -u);
} else if (u <= 1.15e-74) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = t_2;
}
return tmp;
}
def code(u, v, t1): t_1 = v / (t1 + u) t_2 = t_1 * (t1 / -u) tmp = 0 if u <= -9.4e+57: tmp = t_2 elif u <= -5.8e-68: tmp = (v * (t1 / (u - t1))) / t1 elif u <= -1.7e-75: tmp = t1 * (t_1 / -u) elif u <= 1.15e-74: tmp = v / (-t1 - (u * 2.0)) else: tmp = t_2 return tmp
function code(u, v, t1) t_1 = Float64(v / Float64(t1 + u)) t_2 = Float64(t_1 * Float64(t1 / Float64(-u))) tmp = 0.0 if (u <= -9.4e+57) tmp = t_2; elseif (u <= -5.8e-68) tmp = Float64(Float64(v * Float64(t1 / Float64(u - t1))) / t1); elseif (u <= -1.7e-75) tmp = Float64(t1 * Float64(t_1 / Float64(-u))); elseif (u <= 1.15e-74) tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); else tmp = t_2; end return tmp end
function tmp_2 = code(u, v, t1) t_1 = v / (t1 + u); t_2 = t_1 * (t1 / -u); tmp = 0.0; if (u <= -9.4e+57) tmp = t_2; elseif (u <= -5.8e-68) tmp = (v * (t1 / (u - t1))) / t1; elseif (u <= -1.7e-75) tmp = t1 * (t_1 / -u); elseif (u <= 1.15e-74) tmp = v / (-t1 - (u * 2.0)); else tmp = t_2; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[(t1 / (-u)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[u, -9.4e+57], t$95$2, If[LessEqual[u, -5.8e-68], N[(N[(v * N[(t1 / N[(u - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t1), $MachinePrecision], If[LessEqual[u, -1.7e-75], N[(t1 * N[(t$95$1 / (-u)), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 1.15e-74], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{v}{t1 + u}\\
t_2 := t\_1 \cdot \frac{t1}{-u}\\
\mathbf{if}\;u \leq -9.4 \cdot 10^{+57}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;u \leq -5.8 \cdot 10^{-68}:\\
\;\;\;\;\frac{v \cdot \frac{t1}{u - t1}}{t1}\\
\mathbf{elif}\;u \leq -1.7 \cdot 10^{-75}:\\
\;\;\;\;t1 \cdot \frac{t\_1}{-u}\\
\mathbf{elif}\;u \leq 1.15 \cdot 10^{-74}:\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if u < -9.4000000000000006e57 or 1.1499999999999999e-74 < u Initial program 79.6%
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 91.8%
associate-*r/91.8%
mul-1-neg91.8%
Simplified91.8%
if -9.4000000000000006e57 < u < -5.8000000000000001e-68Initial program 78.6%
times-frac99.8%
distribute-frac-neg99.8%
distribute-neg-frac299.8%
+-commutative99.8%
distribute-neg-in99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in t1 around inf 71.1%
associate-*r/77.4%
add-sqr-sqrt77.4%
sqrt-unprod77.4%
sqr-neg77.4%
sqrt-unprod0.0%
add-sqr-sqrt78.1%
Applied egg-rr78.1%
if -5.8000000000000001e-68 < u < -1.70000000000000008e-75Initial program 59.1%
associate-*l/100.0%
*-commutative100.0%
Simplified100.0%
*-commutative100.0%
associate-*l/59.1%
times-frac99.7%
frac-2neg99.7%
remove-double-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
sub-neg99.7%
frac-2neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
sub-neg99.7%
associate-*r/74.8%
Applied egg-rr74.8%
associate-/l*99.7%
clear-num99.7%
frac-times99.5%
*-un-lft-identity99.5%
neg-mul-199.5%
times-frac99.7%
Applied egg-rr99.7%
associate-*l/100.0%
associate-*r/100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in t1 around 0 83.3%
frac-2neg83.3%
associate-/r/100.0%
Applied egg-rr100.0%
if -1.70000000000000008e-75 < u < 1.1499999999999999e-74Initial program 58.8%
associate-*l/65.7%
*-commutative65.7%
Simplified65.7%
associate-*r/58.8%
*-commutative58.8%
times-frac95.8%
frac-2neg95.8%
remove-double-neg95.8%
+-commutative95.8%
distribute-neg-in95.8%
sub-neg95.8%
clear-num95.7%
frac-2neg95.7%
frac-times99.8%
*-un-lft-identity99.8%
+-commutative99.8%
distribute-neg-in99.8%
sub-neg99.8%
Applied egg-rr99.8%
Taylor expanded in u around 0 85.9%
*-commutative85.9%
Simplified85.9%
Final simplification88.3%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ v (+ t1 u))))
(if (<= u -2.8e+58)
(/ t_1 (/ u (- t1)))
(if (<= u -1.34e-67)
(/ (* v (/ t1 (- u t1))) t1)
(if (<= u -4.6e-75)
(* t1 (/ t_1 (- u)))
(if (<= u 1.4e-74)
(/ v (- (- t1) (* u 2.0)))
(* t_1 (/ t1 (- u)))))))))
double code(double u, double v, double t1) {
double t_1 = v / (t1 + u);
double tmp;
if (u <= -2.8e+58) {
tmp = t_1 / (u / -t1);
} else if (u <= -1.34e-67) {
tmp = (v * (t1 / (u - t1))) / t1;
} else if (u <= -4.6e-75) {
tmp = t1 * (t_1 / -u);
} else if (u <= 1.4e-74) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = t_1 * (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) :: t_1
real(8) :: tmp
t_1 = v / (t1 + u)
if (u <= (-2.8d+58)) then
tmp = t_1 / (u / -t1)
else if (u <= (-1.34d-67)) then
tmp = (v * (t1 / (u - t1))) / t1
else if (u <= (-4.6d-75)) then
tmp = t1 * (t_1 / -u)
else if (u <= 1.4d-74) then
tmp = v / (-t1 - (u * 2.0d0))
else
tmp = t_1 * (t1 / -u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = v / (t1 + u);
double tmp;
if (u <= -2.8e+58) {
tmp = t_1 / (u / -t1);
} else if (u <= -1.34e-67) {
tmp = (v * (t1 / (u - t1))) / t1;
} else if (u <= -4.6e-75) {
tmp = t1 * (t_1 / -u);
} else if (u <= 1.4e-74) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = t_1 * (t1 / -u);
}
return tmp;
}
def code(u, v, t1): t_1 = v / (t1 + u) tmp = 0 if u <= -2.8e+58: tmp = t_1 / (u / -t1) elif u <= -1.34e-67: tmp = (v * (t1 / (u - t1))) / t1 elif u <= -4.6e-75: tmp = t1 * (t_1 / -u) elif u <= 1.4e-74: tmp = v / (-t1 - (u * 2.0)) else: tmp = t_1 * (t1 / -u) return tmp
function code(u, v, t1) t_1 = Float64(v / Float64(t1 + u)) tmp = 0.0 if (u <= -2.8e+58) tmp = Float64(t_1 / Float64(u / Float64(-t1))); elseif (u <= -1.34e-67) tmp = Float64(Float64(v * Float64(t1 / Float64(u - t1))) / t1); elseif (u <= -4.6e-75) tmp = Float64(t1 * Float64(t_1 / Float64(-u))); elseif (u <= 1.4e-74) tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); else tmp = Float64(t_1 * Float64(t1 / Float64(-u))); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = v / (t1 + u); tmp = 0.0; if (u <= -2.8e+58) tmp = t_1 / (u / -t1); elseif (u <= -1.34e-67) tmp = (v * (t1 / (u - t1))) / t1; elseif (u <= -4.6e-75) tmp = t1 * (t_1 / -u); elseif (u <= 1.4e-74) tmp = v / (-t1 - (u * 2.0)); else tmp = t_1 * (t1 / -u); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[u, -2.8e+58], N[(t$95$1 / N[(u / (-t1)), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, -1.34e-67], N[(N[(v * N[(t1 / N[(u - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t1), $MachinePrecision], If[LessEqual[u, -4.6e-75], N[(t1 * N[(t$95$1 / (-u)), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 1.4e-74], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(t1 / (-u)), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{v}{t1 + u}\\
\mathbf{if}\;u \leq -2.8 \cdot 10^{+58}:\\
\;\;\;\;\frac{t\_1}{\frac{u}{-t1}}\\
\mathbf{elif}\;u \leq -1.34 \cdot 10^{-67}:\\
\;\;\;\;\frac{v \cdot \frac{t1}{u - t1}}{t1}\\
\mathbf{elif}\;u \leq -4.6 \cdot 10^{-75}:\\
\;\;\;\;t1 \cdot \frac{t\_1}{-u}\\
\mathbf{elif}\;u \leq 1.4 \cdot 10^{-74}:\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \frac{t1}{-u}\\
\end{array}
\end{array}
if u < -2.7999999999999998e58Initial program 77.7%
associate-*l/73.6%
*-commutative73.6%
Simplified73.6%
*-commutative73.6%
associate-*l/77.7%
times-frac97.9%
frac-2neg97.9%
remove-double-neg97.9%
+-commutative97.9%
distribute-neg-in97.9%
sub-neg97.9%
frac-2neg97.9%
+-commutative97.9%
distribute-neg-in97.9%
sub-neg97.9%
associate-*r/98.0%
Applied egg-rr98.0%
associate-/l*97.9%
clear-num97.9%
frac-times85.0%
*-un-lft-identity85.0%
neg-mul-185.0%
times-frac97.9%
Applied egg-rr97.9%
associate-*l/98.0%
associate-*r/98.0%
mul-1-neg98.0%
Simplified98.0%
Taylor expanded in t1 around 0 92.6%
if -2.7999999999999998e58 < u < -1.3399999999999999e-67Initial program 78.6%
times-frac99.8%
distribute-frac-neg99.8%
distribute-neg-frac299.8%
+-commutative99.8%
distribute-neg-in99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in t1 around inf 71.1%
associate-*r/77.4%
add-sqr-sqrt77.4%
sqrt-unprod77.4%
sqr-neg77.4%
sqrt-unprod0.0%
add-sqr-sqrt78.1%
Applied egg-rr78.1%
if -1.3399999999999999e-67 < u < -4.6e-75Initial program 59.1%
associate-*l/100.0%
*-commutative100.0%
Simplified100.0%
*-commutative100.0%
associate-*l/59.1%
times-frac99.7%
frac-2neg99.7%
remove-double-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
sub-neg99.7%
frac-2neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
sub-neg99.7%
associate-*r/74.8%
Applied egg-rr74.8%
associate-/l*99.7%
clear-num99.7%
frac-times99.5%
*-un-lft-identity99.5%
neg-mul-199.5%
times-frac99.7%
Applied egg-rr99.7%
associate-*l/100.0%
associate-*r/100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in t1 around 0 83.3%
frac-2neg83.3%
associate-/r/100.0%
Applied egg-rr100.0%
if -4.6e-75 < u < 1.39999999999999994e-74Initial program 58.8%
associate-*l/65.7%
*-commutative65.7%
Simplified65.7%
associate-*r/58.8%
*-commutative58.8%
times-frac95.8%
frac-2neg95.8%
remove-double-neg95.8%
+-commutative95.8%
distribute-neg-in95.8%
sub-neg95.8%
clear-num95.7%
frac-2neg95.7%
frac-times99.8%
*-un-lft-identity99.8%
+-commutative99.8%
distribute-neg-in99.8%
sub-neg99.8%
Applied egg-rr99.8%
Taylor expanded in u around 0 85.9%
*-commutative85.9%
Simplified85.9%
if 1.39999999999999994e-74 < u Initial program 80.9%
times-frac99.2%
distribute-frac-neg99.2%
distribute-neg-frac299.2%
+-commutative99.2%
distribute-neg-in99.2%
unsub-neg99.2%
Simplified99.2%
Taylor expanded in t1 around 0 91.4%
associate-*r/91.4%
mul-1-neg91.4%
Simplified91.4%
Final simplification88.3%
(FPCore (u v t1) :precision binary64 (if (or (<= u -7e+56) (not (<= u 1.4e-74))) (* (/ v (+ t1 u)) (/ t1 (- u))) (/ v (- (- t1) (* u 2.0)))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -7e+56) || !(u <= 1.4e-74)) {
tmp = (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 ((u <= (-7d+56)) .or. (.not. (u <= 1.4d-74))) then
tmp = (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 ((u <= -7e+56) || !(u <= 1.4e-74)) {
tmp = (v / (t1 + u)) * (t1 / -u);
} else {
tmp = v / (-t1 - (u * 2.0));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -7e+56) or not (u <= 1.4e-74): tmp = (v / (t1 + u)) * (t1 / -u) else: tmp = v / (-t1 - (u * 2.0)) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -7e+56) || !(u <= 1.4e-74)) tmp = Float64(Float64(v / Float64(t1 + u)) * Float64(t1 / Float64(-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 ((u <= -7e+56) || ~((u <= 1.4e-74))) tmp = (v / (t1 + u)) * (t1 / -u); else tmp = v / (-t1 - (u * 2.0)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -7e+56], N[Not[LessEqual[u, 1.4e-74]], $MachinePrecision]], N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(t1 / (-u)), $MachinePrecision]), $MachinePrecision], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -7 \cdot 10^{+56} \lor \neg \left(u \leq 1.4 \cdot 10^{-74}\right):\\
\;\;\;\;\frac{v}{t1 + u} \cdot \frac{t1}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\end{array}
\end{array}
if u < -6.99999999999999999e56 or 1.39999999999999994e-74 < u Initial program 79.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 91.9%
associate-*r/91.9%
mul-1-neg91.9%
Simplified91.9%
if -6.99999999999999999e56 < u < 1.39999999999999994e-74Initial program 63.2%
associate-*l/70.2%
*-commutative70.2%
Simplified70.2%
associate-*r/63.2%
*-commutative63.2%
times-frac96.9%
frac-2neg96.9%
remove-double-neg96.9%
+-commutative96.9%
distribute-neg-in96.9%
sub-neg96.9%
clear-num96.9%
frac-2neg96.9%
frac-times99.8%
*-un-lft-identity99.8%
+-commutative99.8%
distribute-neg-in99.8%
sub-neg99.8%
Applied egg-rr99.8%
Taylor expanded in u around 0 79.9%
*-commutative79.9%
Simplified79.9%
Final simplification86.0%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.75e+139) (not (<= u 3.2e+142))) (/ (* v (/ t1 u)) u) (/ v (- (- t1) (* u 2.0)))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.75e+139) || !(u <= 3.2e+142)) {
tmp = (v * (t1 / u)) / 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 ((u <= (-1.75d+139)) .or. (.not. (u <= 3.2d+142))) then
tmp = (v * (t1 / u)) / 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 ((u <= -1.75e+139) || !(u <= 3.2e+142)) {
tmp = (v * (t1 / u)) / u;
} else {
tmp = v / (-t1 - (u * 2.0));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.75e+139) or not (u <= 3.2e+142): tmp = (v * (t1 / u)) / u else: tmp = v / (-t1 - (u * 2.0)) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.75e+139) || !(u <= 3.2e+142)) tmp = Float64(Float64(v * Float64(t1 / u)) / 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 ((u <= -1.75e+139) || ~((u <= 3.2e+142))) tmp = (v * (t1 / u)) / u; else tmp = v / (-t1 - (u * 2.0)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.75e+139], N[Not[LessEqual[u, 3.2e+142]], $MachinePrecision]], N[(N[(v * N[(t1 / u), $MachinePrecision]), $MachinePrecision] / u), $MachinePrecision], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.75 \cdot 10^{+139} \lor \neg \left(u \leq 3.2 \cdot 10^{+142}\right):\\
\;\;\;\;\frac{v \cdot \frac{t1}{u}}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\end{array}
\end{array}
if u < -1.74999999999999989e139 or 3.20000000000000005e142 < u Initial program 74.3%
times-frac99.8%
distribute-frac-neg99.8%
distribute-neg-frac299.8%
+-commutative99.8%
distribute-neg-in99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in t1 around inf 56.6%
associate-*l/47.7%
add-sqr-sqrt19.4%
sqrt-unprod60.6%
sqr-neg60.6%
sqrt-unprod28.3%
add-sqr-sqrt47.7%
Applied egg-rr47.7%
Taylor expanded in u around inf 43.6%
Taylor expanded in t1 around inf 70.4%
*-commutative70.4%
associate-*r/70.6%
Simplified70.6%
if -1.74999999999999989e139 < u < 3.20000000000000005e142Initial program 70.5%
associate-*l/75.5%
*-commutative75.5%
Simplified75.5%
associate-*r/70.5%
*-commutative70.5%
times-frac96.9%
frac-2neg96.9%
remove-double-neg96.9%
+-commutative96.9%
distribute-neg-in96.9%
sub-neg96.9%
clear-num96.7%
frac-2neg96.7%
frac-times98.3%
*-un-lft-identity98.3%
+-commutative98.3%
distribute-neg-in98.3%
sub-neg98.3%
Applied egg-rr98.3%
Taylor expanded in u around 0 68.6%
*-commutative68.6%
Simplified68.6%
Final simplification69.2%
(FPCore (u v t1) :precision binary64 (if (<= t1 -3.8e-37) (/ v (- (- t1) (* u 2.0))) (if (<= t1 2.2e-28) (/ (/ v u) (/ u (- t1))) (/ v (- u t1)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -3.8e-37) {
tmp = v / (-t1 - (u * 2.0));
} else if (t1 <= 2.2e-28) {
tmp = (v / u) / (u / -t1);
} 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 (t1 <= (-3.8d-37)) then
tmp = v / (-t1 - (u * 2.0d0))
else if (t1 <= 2.2d-28) then
tmp = (v / u) / (u / -t1)
else
tmp = v / (u - t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -3.8e-37) {
tmp = v / (-t1 - (u * 2.0));
} else if (t1 <= 2.2e-28) {
tmp = (v / u) / (u / -t1);
} else {
tmp = v / (u - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -3.8e-37: tmp = v / (-t1 - (u * 2.0)) elif t1 <= 2.2e-28: tmp = (v / u) / (u / -t1) else: tmp = v / (u - t1) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -3.8e-37) tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); elseif (t1 <= 2.2e-28) tmp = Float64(Float64(v / u) / Float64(u / Float64(-t1))); else tmp = Float64(v / Float64(u - t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -3.8e-37) tmp = v / (-t1 - (u * 2.0)); elseif (t1 <= 2.2e-28) tmp = (v / u) / (u / -t1); else tmp = v / (u - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -3.8e-37], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 2.2e-28], N[(N[(v / u), $MachinePrecision] / N[(u / (-t1)), $MachinePrecision]), $MachinePrecision], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -3.8 \cdot 10^{-37}:\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\mathbf{elif}\;t1 \leq 2.2 \cdot 10^{-28}:\\
\;\;\;\;\frac{\frac{v}{u}}{\frac{u}{-t1}}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u - t1}\\
\end{array}
\end{array}
if t1 < -3.8000000000000004e-37Initial program 55.3%
associate-*l/60.3%
*-commutative60.3%
Simplified60.3%
associate-*r/55.3%
*-commutative55.3%
times-frac99.9%
frac-2neg99.9%
remove-double-neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
clear-num99.9%
frac-2neg99.9%
frac-times92.9%
*-un-lft-identity92.9%
+-commutative92.9%
distribute-neg-in92.9%
sub-neg92.9%
Applied egg-rr92.9%
Taylor expanded in u around 0 83.0%
*-commutative83.0%
Simplified83.0%
if -3.8000000000000004e-37 < t1 < 2.19999999999999996e-28Initial program 86.7%
associate-*l/88.8%
*-commutative88.8%
Simplified88.8%
*-commutative88.8%
associate-*l/86.7%
times-frac95.6%
frac-2neg95.6%
remove-double-neg95.6%
+-commutative95.6%
distribute-neg-in95.6%
sub-neg95.6%
frac-2neg95.6%
+-commutative95.6%
distribute-neg-in95.6%
sub-neg95.6%
associate-*r/96.6%
Applied egg-rr96.6%
associate-/l*95.6%
clear-num95.3%
frac-times95.3%
*-un-lft-identity95.3%
neg-mul-195.3%
times-frac95.3%
Applied egg-rr95.3%
associate-*l/95.4%
associate-*r/95.4%
mul-1-neg95.4%
Simplified95.4%
Taylor expanded in t1 around 0 80.8%
Taylor expanded in t1 around 0 83.5%
mul-1-neg83.5%
distribute-neg-frac283.5%
Simplified83.5%
if 2.19999999999999996e-28 < t1 Initial program 59.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 82.2%
associate-*l/82.2%
add-sqr-sqrt48.6%
sqrt-unprod82.2%
sqr-neg82.2%
sqrt-unprod33.3%
add-sqr-sqrt82.3%
Applied egg-rr82.3%
Taylor expanded in t1 around 0 82.3%
Final simplification83.0%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.75e+139) (not (<= u 3.1e+156))) (/ (* v (/ t1 u)) u) (/ v (- (- u) t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.75e+139) || !(u <= 3.1e+156)) {
tmp = (v * (t1 / u)) / u;
} 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.75d+139)) .or. (.not. (u <= 3.1d+156))) then
tmp = (v * (t1 / u)) / u
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.75e+139) || !(u <= 3.1e+156)) {
tmp = (v * (t1 / u)) / u;
} else {
tmp = v / (-u - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.75e+139) or not (u <= 3.1e+156): tmp = (v * (t1 / u)) / u else: tmp = v / (-u - t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.75e+139) || !(u <= 3.1e+156)) tmp = Float64(Float64(v * Float64(t1 / u)) / u); 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.75e+139) || ~((u <= 3.1e+156))) tmp = (v * (t1 / u)) / u; else tmp = v / (-u - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.75e+139], N[Not[LessEqual[u, 3.1e+156]], $MachinePrecision]], N[(N[(v * N[(t1 / u), $MachinePrecision]), $MachinePrecision] / u), $MachinePrecision], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.75 \cdot 10^{+139} \lor \neg \left(u \leq 3.1 \cdot 10^{+156}\right):\\
\;\;\;\;\frac{v \cdot \frac{t1}{u}}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\end{array}
\end{array}
if u < -1.74999999999999989e139 or 3.1000000000000002e156 < u Initial program 74.3%
times-frac99.8%
distribute-frac-neg99.8%
distribute-neg-frac299.8%
+-commutative99.8%
distribute-neg-in99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in t1 around inf 56.6%
associate-*l/47.7%
add-sqr-sqrt19.4%
sqrt-unprod60.6%
sqr-neg60.6%
sqrt-unprod28.3%
add-sqr-sqrt47.7%
Applied egg-rr47.7%
Taylor expanded in u around inf 43.6%
Taylor expanded in t1 around inf 70.4%
*-commutative70.4%
associate-*r/70.6%
Simplified70.6%
if -1.74999999999999989e139 < u < 3.1000000000000002e156Initial program 70.5%
associate-*l/75.5%
*-commutative75.5%
Simplified75.5%
*-commutative75.5%
associate-*l/70.5%
times-frac96.9%
frac-2neg96.9%
remove-double-neg96.9%
+-commutative96.9%
distribute-neg-in96.9%
sub-neg96.9%
frac-2neg96.9%
+-commutative96.9%
distribute-neg-in96.9%
sub-neg96.9%
associate-*r/97.6%
Applied egg-rr97.6%
Taylor expanded in t1 around inf 68.0%
mul-1-neg68.0%
Simplified68.0%
Final simplification68.8%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.4e+138) (not (<= u 2.6e+142))) (* (/ v u) -0.5) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.4e+138) || !(u <= 2.6e+142)) {
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 <= (-1.4d+138)) .or. (.not. (u <= 2.6d+142))) 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 <= -1.4e+138) || !(u <= 2.6e+142)) {
tmp = (v / u) * -0.5;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.4e+138) or not (u <= 2.6e+142): tmp = (v / u) * -0.5 else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.4e+138) || !(u <= 2.6e+142)) tmp = Float64(Float64(v / u) * -0.5); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -1.4e+138) || ~((u <= 2.6e+142))) tmp = (v / u) * -0.5; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.4e+138], N[Not[LessEqual[u, 2.6e+142]], $MachinePrecision]], N[(N[(v / u), $MachinePrecision] * -0.5), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.4 \cdot 10^{+138} \lor \neg \left(u \leq 2.6 \cdot 10^{+142}\right):\\
\;\;\;\;\frac{v}{u} \cdot -0.5\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -1.4e138 or 2.60000000000000021e142 < u Initial program 74.9%
associate-*l/72.9%
*-commutative72.9%
Simplified72.9%
associate-*r/74.9%
*-commutative74.9%
times-frac98.6%
frac-2neg98.6%
remove-double-neg98.6%
+-commutative98.6%
distribute-neg-in98.6%
sub-neg98.6%
clear-num98.6%
frac-2neg98.6%
frac-times84.6%
*-un-lft-identity84.6%
+-commutative84.6%
distribute-neg-in84.6%
sub-neg84.6%
Applied egg-rr84.6%
Taylor expanded in u around 0 48.2%
*-commutative48.2%
Simplified48.2%
Taylor expanded in t1 around 0 45.5%
*-commutative45.5%
Simplified45.5%
if -1.4e138 < u < 2.60000000000000021e142Initial program 70.1%
associate-*l/75.8%
*-commutative75.8%
Simplified75.8%
Taylor expanded in t1 around inf 65.4%
associate-*r/65.4%
neg-mul-165.4%
Simplified65.4%
Final simplification59.2%
(FPCore (u v t1) :precision binary64 (if (<= u -4.2e+62) (/ 1.0 (/ u v)) (if (<= u 3e+141) (/ v (- t1)) (* (/ v u) -0.5))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -4.2e+62) {
tmp = 1.0 / (u / v);
} else if (u <= 3e+141) {
tmp = v / -t1;
} else {
tmp = (v / u) * -0.5;
}
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 <= (-4.2d+62)) then
tmp = 1.0d0 / (u / v)
else if (u <= 3d+141) then
tmp = v / -t1
else
tmp = (v / u) * (-0.5d0)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -4.2e+62) {
tmp = 1.0 / (u / v);
} else if (u <= 3e+141) {
tmp = v / -t1;
} else {
tmp = (v / u) * -0.5;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -4.2e+62: tmp = 1.0 / (u / v) elif u <= 3e+141: tmp = v / -t1 else: tmp = (v / u) * -0.5 return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -4.2e+62) tmp = Float64(1.0 / Float64(u / v)); elseif (u <= 3e+141) tmp = Float64(v / Float64(-t1)); else tmp = Float64(Float64(v / u) * -0.5); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -4.2e+62) tmp = 1.0 / (u / v); elseif (u <= 3e+141) tmp = v / -t1; else tmp = (v / u) * -0.5; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -4.2e+62], N[(1.0 / N[(u / v), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 3e+141], N[(v / (-t1)), $MachinePrecision], N[(N[(v / u), $MachinePrecision] * -0.5), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -4.2 \cdot 10^{+62}:\\
\;\;\;\;\frac{1}{\frac{u}{v}}\\
\mathbf{elif}\;u \leq 3 \cdot 10^{+141}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u} \cdot -0.5\\
\end{array}
\end{array}
if u < -4.2e62Initial program 76.8%
times-frac97.9%
distribute-frac-neg97.9%
distribute-neg-frac297.9%
+-commutative97.9%
distribute-neg-in97.9%
unsub-neg97.9%
Simplified97.9%
Taylor expanded in t1 around inf 56.2%
associate-*l/47.6%
add-sqr-sqrt47.6%
sqrt-unprod54.8%
sqr-neg54.8%
sqrt-unprod0.0%
add-sqr-sqrt47.8%
Applied egg-rr47.8%
clear-num49.6%
inv-pow49.6%
Applied egg-rr49.6%
unpow-149.6%
associate-*r/51.7%
*-commutative51.7%
associate-/l*49.9%
*-inverses49.9%
*-rgt-identity49.9%
Simplified49.9%
Taylor expanded in u around inf 41.8%
if -4.2e62 < u < 2.9999999999999999e141Initial program 68.5%
associate-*l/74.6%
*-commutative74.6%
Simplified74.6%
Taylor expanded in t1 around inf 67.6%
associate-*r/67.6%
neg-mul-167.6%
Simplified67.6%
if 2.9999999999999999e141 < u Initial program 77.5%
associate-*l/78.2%
*-commutative78.2%
Simplified78.2%
associate-*r/77.5%
*-commutative77.5%
times-frac99.8%
frac-2neg99.8%
remove-double-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
sub-neg99.8%
clear-num99.8%
frac-2neg99.8%
frac-times86.8%
*-un-lft-identity86.8%
+-commutative86.8%
distribute-neg-in86.8%
sub-neg86.8%
Applied egg-rr86.8%
Taylor expanded in u around 0 51.6%
*-commutative51.6%
Simplified51.6%
Taylor expanded in t1 around 0 49.4%
*-commutative49.4%
Simplified49.4%
Final simplification59.6%
(FPCore (u v t1) :precision binary64 (if (or (<= u -3.1e+138) (not (<= u 1.45e+151))) (/ v u) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.1e+138) || !(u <= 1.45e+151)) {
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.1d+138)) .or. (.not. (u <= 1.45d+151))) 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.1e+138) || !(u <= 1.45e+151)) {
tmp = v / u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -3.1e+138) or not (u <= 1.45e+151): tmp = v / u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -3.1e+138) || !(u <= 1.45e+151)) tmp = Float64(v / u); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -3.1e+138) || ~((u <= 1.45e+151))) tmp = v / u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -3.1e+138], N[Not[LessEqual[u, 1.45e+151]], $MachinePrecision]], N[(v / u), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.1 \cdot 10^{+138} \lor \neg \left(u \leq 1.45 \cdot 10^{+151}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -3.0999999999999998e138 or 1.45000000000000009e151 < u Initial program 74.9%
times-frac98.6%
distribute-frac-neg98.6%
distribute-neg-frac298.6%
+-commutative98.6%
distribute-neg-in98.6%
unsub-neg98.6%
Simplified98.6%
Taylor expanded in t1 around inf 56.4%
associate-*l/47.7%
add-sqr-sqrt20.2%
sqrt-unprod60.3%
sqr-neg60.3%
sqrt-unprod27.6%
add-sqr-sqrt47.7%
Applied egg-rr47.7%
Taylor expanded in t1 around 0 45.4%
if -3.0999999999999998e138 < u < 1.45000000000000009e151Initial program 70.1%
associate-*l/75.8%
*-commutative75.8%
Simplified75.8%
Taylor expanded in t1 around inf 65.4%
associate-*r/65.4%
neg-mul-165.4%
Simplified65.4%
Final simplification59.2%
(FPCore (u v t1) :precision binary64 (if (or (<= u -2.15e+138) (not (<= u 2.4e+143))) (/ v (- u)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.15e+138) || !(u <= 2.4e+143)) {
tmp = v / -u;
} else {
tmp = v / -t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-2.15d+138)) .or. (.not. (u <= 2.4d+143))) then
tmp = v / -u
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.15e+138) || !(u <= 2.4e+143)) {
tmp = v / -u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -2.15e+138) or not (u <= 2.4e+143): tmp = v / -u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -2.15e+138) || !(u <= 2.4e+143)) tmp = Float64(v / Float64(-u)); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -2.15e+138) || ~((u <= 2.4e+143))) tmp = v / -u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2.15e+138], N[Not[LessEqual[u, 2.4e+143]], $MachinePrecision]], N[(v / (-u)), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.15 \cdot 10^{+138} \lor \neg \left(u \leq 2.4 \cdot 10^{+143}\right):\\
\;\;\;\;\frac{v}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -2.1499999999999999e138 or 2.3999999999999998e143 < u Initial program 74.9%
times-frac98.6%
distribute-frac-neg98.6%
distribute-neg-frac298.6%
+-commutative98.6%
distribute-neg-in98.6%
unsub-neg98.6%
Simplified98.6%
Taylor expanded in t1 around inf 56.4%
Taylor expanded in t1 around 0 45.5%
associate-*r/45.5%
mul-1-neg45.5%
Simplified45.5%
if -2.1499999999999999e138 < u < 2.3999999999999998e143Initial program 70.1%
associate-*l/75.8%
*-commutative75.8%
Simplified75.8%
Taylor expanded in t1 around inf 65.4%
associate-*r/65.4%
neg-mul-165.4%
Simplified65.4%
Final simplification59.2%
(FPCore (u v t1) :precision binary64 (* (/ t1 (+ t1 u)) (/ v (- (- u) t1))))
double code(double u, double v, double t1) {
return (t1 / (t1 + u)) * (v / (-u - t1));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (t1 / (t1 + u)) * (v / (-u - t1))
end function
public static double code(double u, double v, double t1) {
return (t1 / (t1 + u)) * (v / (-u - t1));
}
def code(u, v, t1): return (t1 / (t1 + u)) * (v / (-u - t1))
function code(u, v, t1) return Float64(Float64(t1 / Float64(t1 + u)) * Float64(v / Float64(Float64(-u) - t1))) end
function tmp = code(u, v, t1) tmp = (t1 / (t1 + u)) * (v / (-u - t1)); end
code[u_, v_, t1_] := N[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{t1}{t1 + u} \cdot \frac{v}{\left(-u\right) - t1}
\end{array}
Initial program 71.6%
times-frac97.8%
distribute-frac-neg97.8%
distribute-neg-frac297.8%
+-commutative97.8%
distribute-neg-in97.8%
unsub-neg97.8%
Simplified97.8%
Final simplification97.8%
(FPCore (u v t1) :precision binary64 (/ (/ v (+ t1 u)) (- -1.0 (/ u t1))))
double code(double u, double v, double t1) {
return (v / (t1 + u)) / (-1.0 - (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 / (t1 + u)) / ((-1.0d0) - (u / t1))
end function
public static double code(double u, double v, double t1) {
return (v / (t1 + u)) / (-1.0 - (u / t1));
}
def code(u, v, t1): return (v / (t1 + u)) / (-1.0 - (u / t1))
function code(u, v, t1) return Float64(Float64(v / Float64(t1 + u)) / Float64(-1.0 - Float64(u / t1))) end
function tmp = code(u, v, t1) tmp = (v / (t1 + u)) / (-1.0 - (u / t1)); end
code[u_, v_, t1_] := N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{v}{t1 + u}}{-1 - \frac{u}{t1}}
\end{array}
Initial program 71.6%
associate-*l/74.9%
*-commutative74.9%
Simplified74.9%
*-commutative74.9%
associate-*l/71.6%
times-frac97.8%
frac-2neg97.8%
remove-double-neg97.8%
+-commutative97.8%
distribute-neg-in97.8%
sub-neg97.8%
frac-2neg97.8%
+-commutative97.8%
distribute-neg-in97.8%
sub-neg97.8%
associate-*r/98.3%
Applied egg-rr98.3%
associate-/l*97.8%
clear-num97.6%
frac-times94.3%
*-un-lft-identity94.3%
neg-mul-194.3%
times-frac97.6%
Applied egg-rr97.6%
associate-*l/97.7%
associate-*r/97.7%
mul-1-neg97.7%
Simplified97.7%
Taylor expanded in t1 around inf 97.7%
Taylor expanded in v around 0 94.3%
mul-1-neg94.3%
associate-/l/97.7%
distribute-frac-neg297.7%
+-commutative97.7%
distribute-neg-in97.7%
metadata-eval97.7%
unsub-neg97.7%
Simplified97.7%
Final simplification97.7%
(FPCore (u v t1) :precision binary64 (/ v (- (- u) t1)))
double code(double u, double v, double t1) {
return v / (-u - t1);
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = v / (-u - t1)
end function
public static double code(double u, double v, double t1) {
return v / (-u - t1);
}
def code(u, v, t1): return v / (-u - t1)
function code(u, v, t1) return Float64(v / Float64(Float64(-u) - t1)) end
function tmp = code(u, v, t1) tmp = v / (-u - t1); end
code[u_, v_, t1_] := N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{\left(-u\right) - t1}
\end{array}
Initial program 71.6%
associate-*l/74.9%
*-commutative74.9%
Simplified74.9%
*-commutative74.9%
associate-*l/71.6%
times-frac97.8%
frac-2neg97.8%
remove-double-neg97.8%
+-commutative97.8%
distribute-neg-in97.8%
sub-neg97.8%
frac-2neg97.8%
+-commutative97.8%
distribute-neg-in97.8%
sub-neg97.8%
associate-*r/98.3%
Applied egg-rr98.3%
Taylor expanded in t1 around inf 61.9%
mul-1-neg61.9%
Simplified61.9%
Final simplification61.9%
(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 71.6%
times-frac97.8%
distribute-frac-neg97.8%
distribute-neg-frac297.8%
+-commutative97.8%
distribute-neg-in97.8%
unsub-neg97.8%
Simplified97.8%
Taylor expanded in t1 around inf 65.2%
associate-*l/61.7%
add-sqr-sqrt33.1%
sqrt-unprod65.8%
sqr-neg65.8%
sqrt-unprod27.9%
add-sqr-sqrt60.3%
Applied egg-rr60.3%
Taylor expanded in t1 around 0 60.4%
Final simplification60.4%
(FPCore (u v t1) :precision binary64 (/ v u))
double code(double u, double v, double t1) {
return v / 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 / u
end function
public static double code(double u, double v, double t1) {
return v / u;
}
def code(u, v, t1): return v / u
function code(u, v, t1) return Float64(v / u) end
function tmp = code(u, v, t1) tmp = v / u; end
code[u_, v_, t1_] := N[(v / u), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{u}
\end{array}
Initial program 71.6%
times-frac97.8%
distribute-frac-neg97.8%
distribute-neg-frac297.8%
+-commutative97.8%
distribute-neg-in97.8%
unsub-neg97.8%
Simplified97.8%
Taylor expanded in t1 around inf 65.2%
associate-*l/61.7%
add-sqr-sqrt33.1%
sqrt-unprod65.8%
sqr-neg65.8%
sqrt-unprod27.9%
add-sqr-sqrt60.3%
Applied egg-rr60.3%
Taylor expanded in t1 around 0 20.0%
Final simplification20.0%
herbie shell --seed 2024076
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))