
(FPCore (u v t1) :precision binary64 (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))
double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-t1 * v) / ((t1 + u) * (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
def code(u, v, t1): return (-t1 * v) / ((t1 + u) * (t1 + u))
function code(u, v, t1) return Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (-t1 * v) / ((t1 + u) * (t1 + u)); end
code[u_, v_, t1_] := N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (u v t1) :precision binary64 (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))
double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-t1 * v) / ((t1 + u) * (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
def code(u, v, t1): return (-t1 * v) / ((t1 + u) * (t1 + u))
function code(u, v, t1) return Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (-t1 * v) / ((t1 + u) * (t1 + u)); end
code[u_, v_, t1_] := N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}
\end{array}
(FPCore (u v t1) :precision binary64 (/ (* (/ t1 (+ t1 u)) (- v)) (+ 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[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * (-v)), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{t1 + u}
\end{array}
Initial program 75.7%
associate-/l*76.7%
distribute-lft-neg-out76.7%
distribute-rgt-neg-in76.7%
associate-/r*85.7%
distribute-neg-frac285.7%
Simplified85.7%
associate-*r/97.3%
+-commutative97.3%
distribute-neg-in97.3%
sub-neg97.3%
associate-*l/97.6%
frac-2neg97.6%
associate-*r/98.6%
remove-double-neg98.6%
sub-neg98.6%
distribute-neg-in98.6%
+-commutative98.6%
frac-2neg98.6%
add-sqr-sqrt48.8%
sqrt-unprod44.0%
sqr-neg44.0%
sqrt-unprod17.5%
add-sqr-sqrt34.4%
add-sqr-sqrt16.6%
sqrt-unprod55.6%
Applied egg-rr98.6%
Final simplification98.6%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (* t1 (/ (/ v (+ t1 u)) (- (- u) t1))))
(t_2 (/ v (- (* u (- 2.0)) t1))))
(if (<= t1 -5.4e+137)
t_2
(if (<= t1 -2.7e-195)
t_1
(if (<= t1 1.45e-164)
(/ v (* (/ u t1) (- t1 u)))
(if (<= t1 1.3e+83) t_1 t_2))))))
double code(double u, double v, double t1) {
double t_1 = t1 * ((v / (t1 + u)) / (-u - t1));
double t_2 = v / ((u * -2.0) - t1);
double tmp;
if (t1 <= -5.4e+137) {
tmp = t_2;
} else if (t1 <= -2.7e-195) {
tmp = t_1;
} else if (t1 <= 1.45e-164) {
tmp = v / ((u / t1) * (t1 - u));
} else if (t1 <= 1.3e+83) {
tmp = t_1;
} 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 = t1 * ((v / (t1 + u)) / (-u - t1))
t_2 = v / ((u * -2.0d0) - t1)
if (t1 <= (-5.4d+137)) then
tmp = t_2
else if (t1 <= (-2.7d-195)) then
tmp = t_1
else if (t1 <= 1.45d-164) then
tmp = v / ((u / t1) * (t1 - u))
else if (t1 <= 1.3d+83) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = t1 * ((v / (t1 + u)) / (-u - t1));
double t_2 = v / ((u * -2.0) - t1);
double tmp;
if (t1 <= -5.4e+137) {
tmp = t_2;
} else if (t1 <= -2.7e-195) {
tmp = t_1;
} else if (t1 <= 1.45e-164) {
tmp = v / ((u / t1) * (t1 - u));
} else if (t1 <= 1.3e+83) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(u, v, t1): t_1 = t1 * ((v / (t1 + u)) / (-u - t1)) t_2 = v / ((u * -2.0) - t1) tmp = 0 if t1 <= -5.4e+137: tmp = t_2 elif t1 <= -2.7e-195: tmp = t_1 elif t1 <= 1.45e-164: tmp = v / ((u / t1) * (t1 - u)) elif t1 <= 1.3e+83: tmp = t_1 else: tmp = t_2 return tmp
function code(u, v, t1) t_1 = Float64(t1 * Float64(Float64(v / Float64(t1 + u)) / Float64(Float64(-u) - t1))) t_2 = Float64(v / Float64(Float64(u * Float64(-2.0)) - t1)) tmp = 0.0 if (t1 <= -5.4e+137) tmp = t_2; elseif (t1 <= -2.7e-195) tmp = t_1; elseif (t1 <= 1.45e-164) tmp = Float64(v / Float64(Float64(u / t1) * Float64(t1 - u))); elseif (t1 <= 1.3e+83) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(u, v, t1) t_1 = t1 * ((v / (t1 + u)) / (-u - t1)); t_2 = v / ((u * -2.0) - t1); tmp = 0.0; if (t1 <= -5.4e+137) tmp = t_2; elseif (t1 <= -2.7e-195) tmp = t_1; elseif (t1 <= 1.45e-164) tmp = v / ((u / t1) * (t1 - u)); elseif (t1 <= 1.3e+83) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(t1 * N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(v / N[(N[(u * (-2.0)), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -5.4e+137], t$95$2, If[LessEqual[t1, -2.7e-195], t$95$1, If[LessEqual[t1, 1.45e-164], N[(v / N[(N[(u / t1), $MachinePrecision] * N[(t1 - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 1.3e+83], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t1 \cdot \frac{\frac{v}{t1 + u}}{\left(-u\right) - t1}\\
t_2 := \frac{v}{u \cdot \left(-2\right) - t1}\\
\mathbf{if}\;t1 \leq -5.4 \cdot 10^{+137}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t1 \leq -2.7 \cdot 10^{-195}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t1 \leq 1.45 \cdot 10^{-164}:\\
\;\;\;\;\frac{v}{\frac{u}{t1} \cdot \left(t1 - u\right)}\\
\mathbf{elif}\;t1 \leq 1.3 \cdot 10^{+83}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t1 < -5.40000000000000034e137 or 1.3000000000000001e83 < t1 Initial program 45.9%
associate-/l*47.4%
distribute-lft-neg-out47.4%
distribute-rgt-neg-in47.4%
associate-/r*69.6%
distribute-neg-frac269.6%
Simplified69.6%
associate-*r/100.0%
+-commutative100.0%
distribute-neg-in100.0%
sub-neg100.0%
associate-*l/99.9%
frac-2neg99.9%
clear-num100.0%
frac-times99.9%
*-un-lft-identity99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
Applied egg-rr99.9%
Taylor expanded in u around 0 96.8%
*-commutative96.8%
Simplified96.8%
if -5.40000000000000034e137 < t1 < -2.7e-195 or 1.45e-164 < t1 < 1.3000000000000001e83Initial program 90.6%
associate-/l*91.4%
distribute-lft-neg-out91.4%
distribute-rgt-neg-in91.4%
associate-/r*95.1%
distribute-neg-frac295.1%
Simplified95.1%
if -2.7e-195 < t1 < 1.45e-164Initial program 78.0%
associate-/l*79.3%
distribute-lft-neg-out79.3%
distribute-rgt-neg-in79.3%
associate-/r*83.6%
distribute-neg-frac283.6%
Simplified83.6%
Taylor expanded in t1 around 0 77.6%
associate-/l/73.3%
associate-*r/72.1%
*-commutative72.1%
add-sqr-sqrt40.2%
sqrt-unprod58.2%
sqr-neg58.2%
sqrt-unprod18.0%
add-sqr-sqrt48.9%
Applied egg-rr48.9%
associate-/l*48.9%
Simplified48.9%
add-sqr-sqrt23.5%
sqrt-unprod43.3%
sqr-neg43.3%
sqrt-unprod29.1%
add-sqr-sqrt73.3%
associate-/l*72.1%
frac-times81.5%
clear-num80.7%
frac-2neg80.7%
frac-times86.3%
*-un-lft-identity86.3%
add-sqr-sqrt48.0%
sqrt-unprod56.7%
sqr-neg56.7%
sqrt-unprod26.8%
add-sqr-sqrt49.1%
add-sqr-sqrt25.4%
sqrt-unprod43.9%
sqr-neg43.9%
sqrt-unprod49.7%
add-sqr-sqrt86.3%
distribute-neg-in86.3%
Applied egg-rr92.3%
Final simplification95.0%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (- (- u) t1)) (t_2 (/ v (- (* u (- 2.0)) t1))))
(if (<= t1 -2.2e+124)
t_2
(if (<= t1 -4.8e-195)
(* t1 (/ (/ v (+ t1 u)) t_1))
(if (<= t1 2.5e-163)
(/ v (* (/ u t1) (- t1 u)))
(if (<= t1 1.5e+133) (* v (/ t1 (* (+ t1 u) t_1))) t_2))))))
double code(double u, double v, double t1) {
double t_1 = -u - t1;
double t_2 = v / ((u * -2.0) - t1);
double tmp;
if (t1 <= -2.2e+124) {
tmp = t_2;
} else if (t1 <= -4.8e-195) {
tmp = t1 * ((v / (t1 + u)) / t_1);
} else if (t1 <= 2.5e-163) {
tmp = v / ((u / t1) * (t1 - u));
} else if (t1 <= 1.5e+133) {
tmp = v * (t1 / ((t1 + u) * t_1));
} 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 = -u - t1
t_2 = v / ((u * -2.0d0) - t1)
if (t1 <= (-2.2d+124)) then
tmp = t_2
else if (t1 <= (-4.8d-195)) then
tmp = t1 * ((v / (t1 + u)) / t_1)
else if (t1 <= 2.5d-163) then
tmp = v / ((u / t1) * (t1 - u))
else if (t1 <= 1.5d+133) then
tmp = v * (t1 / ((t1 + u) * t_1))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = -u - t1;
double t_2 = v / ((u * -2.0) - t1);
double tmp;
if (t1 <= -2.2e+124) {
tmp = t_2;
} else if (t1 <= -4.8e-195) {
tmp = t1 * ((v / (t1 + u)) / t_1);
} else if (t1 <= 2.5e-163) {
tmp = v / ((u / t1) * (t1 - u));
} else if (t1 <= 1.5e+133) {
tmp = v * (t1 / ((t1 + u) * t_1));
} else {
tmp = t_2;
}
return tmp;
}
def code(u, v, t1): t_1 = -u - t1 t_2 = v / ((u * -2.0) - t1) tmp = 0 if t1 <= -2.2e+124: tmp = t_2 elif t1 <= -4.8e-195: tmp = t1 * ((v / (t1 + u)) / t_1) elif t1 <= 2.5e-163: tmp = v / ((u / t1) * (t1 - u)) elif t1 <= 1.5e+133: tmp = v * (t1 / ((t1 + u) * t_1)) else: tmp = t_2 return tmp
function code(u, v, t1) t_1 = Float64(Float64(-u) - t1) t_2 = Float64(v / Float64(Float64(u * Float64(-2.0)) - t1)) tmp = 0.0 if (t1 <= -2.2e+124) tmp = t_2; elseif (t1 <= -4.8e-195) tmp = Float64(t1 * Float64(Float64(v / Float64(t1 + u)) / t_1)); elseif (t1 <= 2.5e-163) tmp = Float64(v / Float64(Float64(u / t1) * Float64(t1 - u))); elseif (t1 <= 1.5e+133) tmp = Float64(v * Float64(t1 / Float64(Float64(t1 + u) * t_1))); else tmp = t_2; end return tmp end
function tmp_2 = code(u, v, t1) t_1 = -u - t1; t_2 = v / ((u * -2.0) - t1); tmp = 0.0; if (t1 <= -2.2e+124) tmp = t_2; elseif (t1 <= -4.8e-195) tmp = t1 * ((v / (t1 + u)) / t_1); elseif (t1 <= 2.5e-163) tmp = v / ((u / t1) * (t1 - u)); elseif (t1 <= 1.5e+133) tmp = v * (t1 / ((t1 + u) * t_1)); else tmp = t_2; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-u) - t1), $MachinePrecision]}, Block[{t$95$2 = N[(v / N[(N[(u * (-2.0)), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -2.2e+124], t$95$2, If[LessEqual[t1, -4.8e-195], N[(t1 * N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 2.5e-163], N[(v / N[(N[(u / t1), $MachinePrecision] * N[(t1 - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 1.5e+133], N[(v * N[(t1 / N[(N[(t1 + u), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-u\right) - t1\\
t_2 := \frac{v}{u \cdot \left(-2\right) - t1}\\
\mathbf{if}\;t1 \leq -2.2 \cdot 10^{+124}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t1 \leq -4.8 \cdot 10^{-195}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{t1 + u}}{t\_1}\\
\mathbf{elif}\;t1 \leq 2.5 \cdot 10^{-163}:\\
\;\;\;\;\frac{v}{\frac{u}{t1} \cdot \left(t1 - u\right)}\\
\mathbf{elif}\;t1 \leq 1.5 \cdot 10^{+133}:\\
\;\;\;\;v \cdot \frac{t1}{\left(t1 + u\right) \cdot t\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t1 < -2.2000000000000001e124 or 1.50000000000000003e133 < t1 Initial program 43.0%
associate-/l*43.1%
distribute-lft-neg-out43.1%
distribute-rgt-neg-in43.1%
associate-/r*67.6%
distribute-neg-frac267.6%
Simplified67.6%
associate-*r/100.0%
+-commutative100.0%
distribute-neg-in100.0%
sub-neg100.0%
associate-*l/100.0%
frac-2neg100.0%
clear-num100.0%
frac-times100.0%
*-un-lft-identity100.0%
+-commutative100.0%
distribute-neg-in100.0%
sub-neg100.0%
Applied egg-rr100.0%
Taylor expanded in u around 0 97.9%
*-commutative97.9%
Simplified97.9%
if -2.2000000000000001e124 < t1 < -4.8e-195Initial program 89.3%
associate-/l*89.6%
distribute-lft-neg-out89.6%
distribute-rgt-neg-in89.6%
associate-/r*95.0%
distribute-neg-frac295.0%
Simplified95.0%
if -4.8e-195 < t1 < 2.49999999999999989e-163Initial program 78.0%
associate-/l*79.3%
distribute-lft-neg-out79.3%
distribute-rgt-neg-in79.3%
associate-/r*83.6%
distribute-neg-frac283.6%
Simplified83.6%
Taylor expanded in t1 around 0 77.6%
associate-/l/73.3%
associate-*r/72.1%
*-commutative72.1%
add-sqr-sqrt40.2%
sqrt-unprod58.2%
sqr-neg58.2%
sqrt-unprod18.0%
add-sqr-sqrt48.9%
Applied egg-rr48.9%
associate-/l*48.9%
Simplified48.9%
add-sqr-sqrt23.5%
sqrt-unprod43.3%
sqr-neg43.3%
sqrt-unprod29.1%
add-sqr-sqrt73.3%
associate-/l*72.1%
frac-times81.5%
clear-num80.7%
frac-2neg80.7%
frac-times86.3%
*-un-lft-identity86.3%
add-sqr-sqrt48.0%
sqrt-unprod56.7%
sqr-neg56.7%
sqrt-unprod26.8%
add-sqr-sqrt49.1%
add-sqr-sqrt25.4%
sqrt-unprod43.9%
sqr-neg43.9%
sqrt-unprod49.7%
add-sqr-sqrt86.3%
distribute-neg-in86.3%
Applied egg-rr92.3%
if 2.49999999999999989e-163 < t1 < 1.50000000000000003e133Initial program 90.2%
associate-*l/96.5%
*-commutative96.5%
Simplified96.5%
Final simplification95.6%
(FPCore (u v t1) :precision binary64 (if (or (<= u -3.4e-17) (not (<= u 1.15e-54))) (* t1 (/ (/ v u) (- (- u) t1))) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.4e-17) || !(u <= 1.15e-54)) {
tmp = t1 * ((v / u) / (-u - t1));
} else {
tmp = v / -t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-3.4d-17)) .or. (.not. (u <= 1.15d-54))) then
tmp = t1 * ((v / u) / (-u - t1))
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.4e-17) || !(u <= 1.15e-54)) {
tmp = t1 * ((v / u) / (-u - t1));
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -3.4e-17) or not (u <= 1.15e-54): tmp = t1 * ((v / u) / (-u - t1)) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -3.4e-17) || !(u <= 1.15e-54)) tmp = Float64(t1 * Float64(Float64(v / u) / Float64(Float64(-u) - t1))); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -3.4e-17) || ~((u <= 1.15e-54))) tmp = t1 * ((v / u) / (-u - t1)); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -3.4e-17], N[Not[LessEqual[u, 1.15e-54]], $MachinePrecision]], N[(t1 * N[(N[(v / u), $MachinePrecision] / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.4 \cdot 10^{-17} \lor \neg \left(u \leq 1.15 \cdot 10^{-54}\right):\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -3.3999999999999998e-17 or 1.1499999999999999e-54 < u Initial program 82.6%
associate-/l*83.0%
distribute-lft-neg-out83.0%
distribute-rgt-neg-in83.0%
associate-/r*92.0%
distribute-neg-frac292.0%
Simplified92.0%
Taylor expanded in t1 around 0 80.7%
if -3.3999999999999998e-17 < u < 1.1499999999999999e-54Initial program 66.6%
associate-/l*68.5%
distribute-lft-neg-out68.5%
distribute-rgt-neg-in68.5%
associate-/r*77.4%
distribute-neg-frac277.4%
Simplified77.4%
Taylor expanded in t1 around inf 84.8%
associate-*r/84.8%
neg-mul-184.8%
Simplified84.8%
Final simplification82.4%
(FPCore (u v t1) :precision binary64 (if (<= u -1.62e-18) (* t1 (/ (/ v u) (- (- u) t1))) (if (<= u 4.8e-67) (/ v (- t1)) (/ (/ t1 (- u)) (/ (+ t1 u) v)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.62e-18) {
tmp = t1 * ((v / u) / (-u - t1));
} else if (u <= 4.8e-67) {
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 <= (-1.62d-18)) then
tmp = t1 * ((v / u) / (-u - t1))
else if (u <= 4.8d-67) 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 <= -1.62e-18) {
tmp = t1 * ((v / u) / (-u - t1));
} else if (u <= 4.8e-67) {
tmp = v / -t1;
} else {
tmp = (t1 / -u) / ((t1 + u) / v);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.62e-18: tmp = t1 * ((v / u) / (-u - t1)) elif u <= 4.8e-67: tmp = v / -t1 else: tmp = (t1 / -u) / ((t1 + u) / v) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.62e-18) tmp = Float64(t1 * Float64(Float64(v / u) / Float64(Float64(-u) - t1))); elseif (u <= 4.8e-67) tmp = Float64(v / Float64(-t1)); else tmp = Float64(Float64(t1 / Float64(-u)) / Float64(Float64(t1 + u) / v)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -1.62e-18) tmp = t1 * ((v / u) / (-u - t1)); elseif (u <= 4.8e-67) tmp = v / -t1; else tmp = (t1 / -u) / ((t1 + u) / v); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.62e-18], N[(t1 * N[(N[(v / u), $MachinePrecision] / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 4.8e-67], N[(v / (-t1)), $MachinePrecision], N[(N[(t1 / (-u)), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.62 \cdot 10^{-18}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{\left(-u\right) - t1}\\
\mathbf{elif}\;u \leq 4.8 \cdot 10^{-67}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t1}{-u}}{\frac{t1 + u}{v}}\\
\end{array}
\end{array}
if u < -1.62000000000000005e-18Initial program 79.7%
associate-/l*81.4%
distribute-lft-neg-out81.4%
distribute-rgt-neg-in81.4%
associate-/r*92.3%
distribute-neg-frac292.3%
Simplified92.3%
Taylor expanded in t1 around 0 77.8%
if -1.62000000000000005e-18 < u < 4.8e-67Initial program 65.6%
associate-/l*67.7%
distribute-lft-neg-out67.7%
distribute-rgt-neg-in67.7%
associate-/r*76.8%
distribute-neg-frac276.8%
Simplified76.8%
Taylor expanded in t1 around inf 85.4%
associate-*r/85.4%
neg-mul-185.4%
Simplified85.4%
if 4.8e-67 < u Initial program 86.2%
associate-/l*85.3%
distribute-lft-neg-out85.3%
distribute-rgt-neg-in85.3%
associate-/r*92.1%
distribute-neg-frac292.1%
Simplified92.1%
Taylor expanded in t1 around 0 81.6%
associate-/l/79.0%
associate-*r/78.1%
*-commutative78.1%
add-sqr-sqrt0.2%
sqrt-unprod55.5%
sqr-neg55.5%
sqrt-unprod52.1%
add-sqr-sqrt52.7%
Applied egg-rr52.7%
associate-/l*54.9%
Simplified54.9%
add-sqr-sqrt28.8%
sqrt-unprod47.5%
sqr-neg47.5%
sqrt-unprod35.5%
add-sqr-sqrt79.0%
associate-/l*78.1%
frac-times82.1%
frac-2neg82.1%
clear-num82.7%
frac-times82.9%
remove-double-neg82.9%
*-commutative82.9%
*-un-lft-identity82.9%
Applied egg-rr82.9%
associate-/r*82.8%
Simplified82.8%
Final simplification82.5%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.02e-36) (not (<= u 1.15e-54))) (* t1 (/ v (* u (- t1 u)))) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.02e-36) || !(u <= 1.15e-54)) {
tmp = t1 * (v / (u * (t1 - u)));
} else {
tmp = v / -t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-1.02d-36)) .or. (.not. (u <= 1.15d-54))) then
tmp = t1 * (v / (u * (t1 - u)))
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.02e-36) || !(u <= 1.15e-54)) {
tmp = t1 * (v / (u * (t1 - u)));
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.02e-36) or not (u <= 1.15e-54): tmp = t1 * (v / (u * (t1 - u))) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.02e-36) || !(u <= 1.15e-54)) tmp = Float64(t1 * Float64(v / Float64(u * Float64(t1 - u)))); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -1.02e-36) || ~((u <= 1.15e-54))) tmp = t1 * (v / (u * (t1 - u))); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.02e-36], N[Not[LessEqual[u, 1.15e-54]], $MachinePrecision]], N[(t1 * N[(v / N[(u * N[(t1 - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.02 \cdot 10^{-36} \lor \neg \left(u \leq 1.15 \cdot 10^{-54}\right):\\
\;\;\;\;t1 \cdot \frac{v}{u \cdot \left(t1 - u\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -1.02e-36 or 1.1499999999999999e-54 < u Initial program 82.8%
associate-/l*83.2%
distribute-lft-neg-out83.2%
distribute-rgt-neg-in83.2%
associate-/r*92.1%
distribute-neg-frac292.1%
Simplified92.1%
Taylor expanded in t1 around 0 80.3%
associate-/l/77.5%
associate-*r/76.3%
*-commutative76.3%
add-sqr-sqrt37.2%
sqrt-unprod65.1%
sqr-neg65.1%
sqrt-unprod26.8%
add-sqr-sqrt50.6%
Applied egg-rr50.6%
associate-/l*52.1%
Simplified52.1%
frac-2neg52.1%
div-inv52.1%
add-sqr-sqrt25.9%
sqrt-unprod51.6%
sqr-neg51.6%
sqrt-unprod38.8%
add-sqr-sqrt77.4%
distribute-rgt-neg-in77.4%
distribute-neg-in77.4%
add-sqr-sqrt36.0%
sqrt-unprod77.6%
sqr-neg77.6%
sqrt-unprod41.5%
add-sqr-sqrt77.6%
sub-neg77.6%
Applied egg-rr77.6%
associate-*r/77.6%
*-rgt-identity77.6%
Simplified77.6%
if -1.02e-36 < u < 1.1499999999999999e-54Initial program 66.0%
associate-/l*68.0%
distribute-lft-neg-out68.0%
distribute-rgt-neg-in68.0%
associate-/r*77.0%
distribute-neg-frac277.0%
Simplified77.0%
Taylor expanded in t1 around inf 85.4%
associate-*r/85.4%
neg-mul-185.4%
Simplified85.4%
Final simplification80.9%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.06e-36) (not (<= u 1.7e-67))) (/ (* t1 (/ v (- t1 u))) u) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.06e-36) || !(u <= 1.7e-67)) {
tmp = (t1 * (v / (t1 - u))) / 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 <= (-1.06d-36)) .or. (.not. (u <= 1.7d-67))) then
tmp = (t1 * (v / (t1 - u))) / 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 <= -1.06e-36) || !(u <= 1.7e-67)) {
tmp = (t1 * (v / (t1 - u))) / u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.06e-36) or not (u <= 1.7e-67): tmp = (t1 * (v / (t1 - u))) / u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.06e-36) || !(u <= 1.7e-67)) tmp = Float64(Float64(t1 * Float64(v / Float64(t1 - u))) / u); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -1.06e-36) || ~((u <= 1.7e-67))) tmp = (t1 * (v / (t1 - u))) / u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.06e-36], N[Not[LessEqual[u, 1.7e-67]], $MachinePrecision]], N[(N[(t1 * N[(v / N[(t1 - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / u), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.06 \cdot 10^{-36} \lor \neg \left(u \leq 1.7 \cdot 10^{-67}\right):\\
\;\;\;\;\frac{t1 \cdot \frac{v}{t1 - u}}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -1.05999999999999999e-36 or 1.70000000000000005e-67 < u Initial program 83.2%
associate-/l*83.6%
distribute-lft-neg-out83.6%
distribute-rgt-neg-in83.6%
associate-/r*92.3%
distribute-neg-frac292.3%
Simplified92.3%
Taylor expanded in t1 around 0 79.3%
associate-/l/76.6%
associate-*r/75.5%
*-commutative75.5%
add-sqr-sqrt36.5%
sqrt-unprod64.4%
sqr-neg64.4%
sqrt-unprod26.3%
add-sqr-sqrt49.7%
Applied egg-rr49.7%
associate-/l*51.2%
Simplified51.2%
add-sqr-sqrt26.8%
sqrt-unprod48.6%
sqr-neg48.6%
sqrt-unprod35.2%
add-sqr-sqrt76.6%
associate-/l*75.5%
frac-times78.6%
associate-*l/79.5%
Applied egg-rr79.6%
if -1.05999999999999999e-36 < u < 1.70000000000000005e-67Initial program 65.0%
associate-/l*67.1%
distribute-lft-neg-out67.1%
distribute-rgt-neg-in67.1%
associate-/r*76.3%
distribute-neg-frac276.3%
Simplified76.3%
Taylor expanded in t1 around inf 86.0%
associate-*r/86.0%
neg-mul-186.0%
Simplified86.0%
Final simplification82.3%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1.6e-18) (not (<= t1 5.4e-9))) (/ v (- (- u) t1)) (* (/ v u) (/ t1 (- u)))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.6e-18) || !(t1 <= 5.4e-9)) {
tmp = v / (-u - t1);
} else {
tmp = (v / u) * (t1 / -u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-1.6d-18)) .or. (.not. (t1 <= 5.4d-9))) then
tmp = v / (-u - t1)
else
tmp = (v / u) * (t1 / -u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.6e-18) || !(t1 <= 5.4e-9)) {
tmp = v / (-u - t1);
} else {
tmp = (v / u) * (t1 / -u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.6e-18) or not (t1 <= 5.4e-9): tmp = v / (-u - t1) else: tmp = (v / u) * (t1 / -u) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.6e-18) || !(t1 <= 5.4e-9)) tmp = Float64(v / Float64(Float64(-u) - t1)); else tmp = Float64(Float64(v / u) * Float64(t1 / Float64(-u))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -1.6e-18) || ~((t1 <= 5.4e-9))) tmp = v / (-u - t1); else tmp = (v / u) * (t1 / -u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.6e-18], N[Not[LessEqual[t1, 5.4e-9]], $MachinePrecision]], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], N[(N[(v / u), $MachinePrecision] * N[(t1 / (-u)), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.6 \cdot 10^{-18} \lor \neg \left(t1 \leq 5.4 \cdot 10^{-9}\right):\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u} \cdot \frac{t1}{-u}\\
\end{array}
\end{array}
if t1 < -1.6e-18 or 5.4000000000000004e-9 < t1 Initial program 66.3%
associate-/l*65.7%
distribute-lft-neg-out65.7%
distribute-rgt-neg-in65.7%
associate-/r*80.2%
distribute-neg-frac280.2%
Simplified80.2%
associate-*r/99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*l/99.9%
frac-2neg99.9%
associate-*r/99.9%
remove-double-neg99.9%
sub-neg99.9%
distribute-neg-in99.9%
+-commutative99.9%
frac-2neg99.9%
add-sqr-sqrt52.5%
sqrt-unprod34.6%
sqr-neg34.6%
sqrt-unprod15.6%
add-sqr-sqrt31.9%
add-sqr-sqrt14.5%
sqrt-unprod51.2%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 86.5%
mul-1-neg86.5%
Simplified86.5%
if -1.6e-18 < t1 < 5.4000000000000004e-9Initial program 84.3%
times-frac95.4%
distribute-frac-neg95.4%
distribute-neg-frac295.4%
+-commutative95.4%
distribute-neg-in95.4%
unsub-neg95.4%
Simplified95.4%
Taylor expanded in t1 around 0 72.1%
associate-*r/72.1%
mul-1-neg72.1%
Simplified72.1%
Taylor expanded in t1 around 0 75.5%
Final simplification80.8%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -3e-15) (not (<= t1 2.8e-11))) (/ v (- (* u (- 2.0)) t1)) (* (/ v u) (/ t1 (- u)))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -3e-15) || !(t1 <= 2.8e-11)) {
tmp = v / ((u * -2.0) - t1);
} else {
tmp = (v / u) * (t1 / -u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-3d-15)) .or. (.not. (t1 <= 2.8d-11))) then
tmp = v / ((u * -2.0d0) - t1)
else
tmp = (v / u) * (t1 / -u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -3e-15) || !(t1 <= 2.8e-11)) {
tmp = v / ((u * -2.0) - t1);
} else {
tmp = (v / u) * (t1 / -u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -3e-15) or not (t1 <= 2.8e-11): tmp = v / ((u * -2.0) - t1) else: tmp = (v / u) * (t1 / -u) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -3e-15) || !(t1 <= 2.8e-11)) tmp = Float64(v / Float64(Float64(u * Float64(-2.0)) - t1)); else tmp = Float64(Float64(v / u) * Float64(t1 / Float64(-u))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -3e-15) || ~((t1 <= 2.8e-11))) tmp = v / ((u * -2.0) - t1); else tmp = (v / u) * (t1 / -u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -3e-15], N[Not[LessEqual[t1, 2.8e-11]], $MachinePrecision]], N[(v / N[(N[(u * (-2.0)), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision], N[(N[(v / u), $MachinePrecision] * N[(t1 / (-u)), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -3 \cdot 10^{-15} \lor \neg \left(t1 \leq 2.8 \cdot 10^{-11}\right):\\
\;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u} \cdot \frac{t1}{-u}\\
\end{array}
\end{array}
if t1 < -3e-15 or 2.8e-11 < t1 Initial program 66.3%
associate-/l*65.7%
distribute-lft-neg-out65.7%
distribute-rgt-neg-in65.7%
associate-/r*80.2%
distribute-neg-frac280.2%
Simplified80.2%
associate-*r/99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*l/99.9%
frac-2neg99.9%
clear-num99.9%
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 86.7%
*-commutative86.7%
Simplified86.7%
if -3e-15 < t1 < 2.8e-11Initial program 84.3%
times-frac95.4%
distribute-frac-neg95.4%
distribute-neg-frac295.4%
+-commutative95.4%
distribute-neg-in95.4%
unsub-neg95.4%
Simplified95.4%
Taylor expanded in t1 around 0 72.1%
associate-*r/72.1%
mul-1-neg72.1%
Simplified72.1%
Taylor expanded in t1 around 0 75.5%
Final simplification80.9%
(FPCore (u v t1) :precision binary64 (if (or (<= u -5.2e+177) (not (<= u 8.5e+224))) (* (/ v u) -0.5) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -5.2e+177) || !(u <= 8.5e+224)) {
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 <= (-5.2d+177)) .or. (.not. (u <= 8.5d+224))) 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 <= -5.2e+177) || !(u <= 8.5e+224)) {
tmp = (v / u) * -0.5;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -5.2e+177) or not (u <= 8.5e+224): tmp = (v / u) * -0.5 else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -5.2e+177) || !(u <= 8.5e+224)) 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 <= -5.2e+177) || ~((u <= 8.5e+224))) tmp = (v / u) * -0.5; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -5.2e+177], N[Not[LessEqual[u, 8.5e+224]], $MachinePrecision]], N[(N[(v / u), $MachinePrecision] * -0.5), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -5.2 \cdot 10^{+177} \lor \neg \left(u \leq 8.5 \cdot 10^{+224}\right):\\
\;\;\;\;\frac{v}{u} \cdot -0.5\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -5.19999999999999959e177 or 8.50000000000000046e224 < u Initial program 91.2%
associate-/l*91.3%
distribute-lft-neg-out91.3%
distribute-rgt-neg-in91.3%
associate-/r*100.0%
distribute-neg-frac2100.0%
Simplified100.0%
associate-*r/99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*l/98.6%
frac-2neg98.6%
clear-num97.5%
frac-times95.5%
*-un-lft-identity95.5%
+-commutative95.5%
distribute-neg-in95.5%
sub-neg95.5%
Applied egg-rr95.5%
Taylor expanded in u around 0 46.1%
*-commutative46.1%
Simplified46.1%
Taylor expanded in t1 around 0 42.3%
if -5.19999999999999959e177 < u < 8.50000000000000046e224Initial program 72.3%
associate-/l*73.5%
distribute-lft-neg-out73.5%
distribute-rgt-neg-in73.5%
associate-/r*82.6%
distribute-neg-frac282.6%
Simplified82.6%
Taylor expanded in t1 around inf 62.1%
associate-*r/62.1%
neg-mul-162.1%
Simplified62.1%
Final simplification58.6%
(FPCore (u v t1) :precision binary64 (if (or (<= u -2.05e+169) (not (<= u 5e+176))) (/ 1.0 (/ u v)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.05e+169) || !(u <= 5e+176)) {
tmp = 1.0 / (u / v);
} else {
tmp = v / -t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-2.05d+169)) .or. (.not. (u <= 5d+176))) then
tmp = 1.0d0 / (u / v)
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.05e+169) || !(u <= 5e+176)) {
tmp = 1.0 / (u / v);
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -2.05e+169) or not (u <= 5e+176): tmp = 1.0 / (u / v) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -2.05e+169) || !(u <= 5e+176)) tmp = Float64(1.0 / Float64(u / v)); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -2.05e+169) || ~((u <= 5e+176))) tmp = 1.0 / (u / v); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2.05e+169], N[Not[LessEqual[u, 5e+176]], $MachinePrecision]], N[(1.0 / N[(u / v), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.05 \cdot 10^{+169} \lor \neg \left(u \leq 5 \cdot 10^{+176}\right):\\
\;\;\;\;\frac{1}{\frac{u}{v}}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -2.0500000000000002e169 or 5e176 < u Initial program 90.8%
associate-/l*91.0%
distribute-lft-neg-out91.0%
distribute-rgt-neg-in91.0%
associate-/r*100.0%
distribute-neg-frac2100.0%
Simplified100.0%
Taylor expanded in t1 around 0 96.7%
Taylor expanded in u around 0 45.1%
associate-*r/45.1%
mul-1-neg45.1%
Simplified45.1%
clear-num45.1%
un-div-inv45.1%
associate-/l*44.8%
add-sqr-sqrt19.9%
sqrt-unprod44.2%
sqr-neg44.2%
sqrt-unprod24.7%
add-sqr-sqrt44.5%
Applied egg-rr44.5%
associate-/r*42.9%
*-inverses42.9%
Simplified42.9%
if -2.0500000000000002e169 < u < 5e176Initial program 71.5%
associate-/l*72.8%
distribute-lft-neg-out72.8%
distribute-rgt-neg-in72.8%
associate-/r*81.8%
distribute-neg-frac281.8%
Simplified81.8%
Taylor expanded in t1 around inf 63.4%
associate-*r/63.4%
neg-mul-163.4%
Simplified63.4%
Final simplification59.0%
(FPCore (u v t1) :precision binary64 (if (<= u -6e+169) (* (/ v u) -0.5) (if (<= u 9e+224) (/ v (- t1)) (* v (/ -0.5 u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -6e+169) {
tmp = (v / u) * -0.5;
} else if (u <= 9e+224) {
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 <= (-6d+169)) then
tmp = (v / u) * (-0.5d0)
else if (u <= 9d+224) 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 <= -6e+169) {
tmp = (v / u) * -0.5;
} else if (u <= 9e+224) {
tmp = v / -t1;
} else {
tmp = v * (-0.5 / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -6e+169: tmp = (v / u) * -0.5 elif u <= 9e+224: tmp = v / -t1 else: tmp = v * (-0.5 / u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -6e+169) tmp = Float64(Float64(v / u) * -0.5); elseif (u <= 9e+224) 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 <= -6e+169) tmp = (v / u) * -0.5; elseif (u <= 9e+224) tmp = v / -t1; else tmp = v * (-0.5 / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -6e+169], N[(N[(v / u), $MachinePrecision] * -0.5), $MachinePrecision], If[LessEqual[u, 9e+224], N[(v / (-t1)), $MachinePrecision], N[(v * N[(-0.5 / u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -6 \cdot 10^{+169}:\\
\;\;\;\;\frac{v}{u} \cdot -0.5\\
\mathbf{elif}\;u \leq 9 \cdot 10^{+224}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;v \cdot \frac{-0.5}{u}\\
\end{array}
\end{array}
if u < -5.9999999999999999e169Initial program 91.9%
associate-/l*92.0%
distribute-lft-neg-out92.0%
distribute-rgt-neg-in92.0%
associate-/r*100.0%
distribute-neg-frac2100.0%
Simplified100.0%
associate-*r/99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*l/97.6%
frac-2neg97.6%
clear-num95.7%
frac-times95.7%
*-un-lft-identity95.7%
+-commutative95.7%
distribute-neg-in95.7%
sub-neg95.7%
Applied egg-rr95.7%
Taylor expanded in u around 0 39.3%
*-commutative39.3%
Simplified39.3%
Taylor expanded in t1 around 0 35.9%
if -5.9999999999999999e169 < u < 8.9999999999999995e224Initial program 72.3%
associate-/l*73.5%
distribute-lft-neg-out73.5%
distribute-rgt-neg-in73.5%
associate-/r*82.6%
distribute-neg-frac282.6%
Simplified82.6%
Taylor expanded in t1 around inf 62.1%
associate-*r/62.1%
neg-mul-162.1%
Simplified62.1%
if 8.9999999999999995e224 < u Initial program 90.3%
associate-/l*90.5%
distribute-lft-neg-out90.5%
distribute-rgt-neg-in90.5%
associate-/r*99.9%
distribute-neg-frac299.9%
Simplified99.9%
associate-*r/99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*l/99.9%
frac-2neg99.9%
clear-num99.9%
frac-times95.2%
*-un-lft-identity95.2%
+-commutative95.2%
distribute-neg-in95.2%
sub-neg95.2%
Applied egg-rr95.2%
Taylor expanded in u around 0 55.1%
*-commutative55.1%
Simplified55.1%
Taylor expanded in t1 around 0 50.6%
associate-*r/50.6%
*-commutative50.6%
associate-/l*50.6%
Simplified50.6%
Final simplification58.6%
(FPCore (u v t1) :precision binary64 (if (or (<= u -4.2e+170) (not (<= u 1.05e+225))) (/ v u) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -4.2e+170) || !(u <= 1.05e+225)) {
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 <= (-4.2d+170)) .or. (.not. (u <= 1.05d+225))) 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 <= -4.2e+170) || !(u <= 1.05e+225)) {
tmp = v / u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -4.2e+170) or not (u <= 1.05e+225): tmp = v / u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -4.2e+170) || !(u <= 1.05e+225)) 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 <= -4.2e+170) || ~((u <= 1.05e+225))) tmp = v / u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -4.2e+170], N[Not[LessEqual[u, 1.05e+225]], $MachinePrecision]], N[(v / u), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -4.2 \cdot 10^{+170} \lor \neg \left(u \leq 1.05 \cdot 10^{+225}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -4.19999999999999996e170 or 1.05e225 < u Initial program 91.2%
associate-/l*91.3%
distribute-lft-neg-out91.3%
distribute-rgt-neg-in91.3%
associate-/r*100.0%
distribute-neg-frac2100.0%
Simplified100.0%
Taylor expanded in t1 around 0 96.1%
associate-/l/91.3%
associate-*r/91.2%
*-commutative91.2%
add-sqr-sqrt51.9%
sqrt-unprod91.2%
sqr-neg91.2%
sqrt-unprod39.3%
add-sqr-sqrt91.2%
Applied egg-rr91.2%
associate-/l*91.3%
Simplified91.3%
Taylor expanded in t1 around inf 41.8%
if -4.19999999999999996e170 < u < 1.05e225Initial program 72.3%
associate-/l*73.5%
distribute-lft-neg-out73.5%
distribute-rgt-neg-in73.5%
associate-/r*82.6%
distribute-neg-frac282.6%
Simplified82.6%
Taylor expanded in t1 around inf 62.1%
associate-*r/62.1%
neg-mul-162.1%
Simplified62.1%
Final simplification58.5%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.05e+169) (not (<= u 8.5e+224))) (/ v (- u)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.05e+169) || !(u <= 8.5e+224)) {
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 <= (-1.05d+169)) .or. (.not. (u <= 8.5d+224))) 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 <= -1.05e+169) || !(u <= 8.5e+224)) {
tmp = v / -u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.05e+169) or not (u <= 8.5e+224): tmp = v / -u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.05e+169) || !(u <= 8.5e+224)) 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 <= -1.05e+169) || ~((u <= 8.5e+224))) tmp = v / -u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.05e+169], N[Not[LessEqual[u, 8.5e+224]], $MachinePrecision]], N[(v / (-u)), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.05 \cdot 10^{+169} \lor \neg \left(u \leq 8.5 \cdot 10^{+224}\right):\\
\;\;\;\;\frac{v}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -1.0500000000000001e169 or 8.50000000000000046e224 < u Initial program 91.2%
associate-/l*91.3%
distribute-lft-neg-out91.3%
distribute-rgt-neg-in91.3%
associate-/r*100.0%
distribute-neg-frac2100.0%
Simplified100.0%
Taylor expanded in t1 around 0 96.1%
Taylor expanded in t1 around inf 42.2%
associate-*r/42.2%
mul-1-neg42.2%
Simplified42.2%
if -1.0500000000000001e169 < u < 8.50000000000000046e224Initial program 72.3%
associate-/l*73.5%
distribute-lft-neg-out73.5%
distribute-rgt-neg-in73.5%
associate-/r*82.6%
distribute-neg-frac282.6%
Simplified82.6%
Taylor expanded in t1 around inf 62.1%
associate-*r/62.1%
neg-mul-162.1%
Simplified62.1%
Final simplification58.6%
(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 75.7%
times-frac97.6%
distribute-frac-neg97.6%
distribute-neg-frac297.6%
+-commutative97.6%
distribute-neg-in97.6%
unsub-neg97.6%
Simplified97.6%
Final simplification97.6%
(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 75.7%
associate-/l*76.7%
distribute-lft-neg-out76.7%
distribute-rgt-neg-in76.7%
associate-/r*85.7%
distribute-neg-frac285.7%
Simplified85.7%
associate-*r/97.3%
+-commutative97.3%
distribute-neg-in97.3%
sub-neg97.3%
associate-*l/97.6%
frac-2neg97.6%
associate-*r/98.6%
remove-double-neg98.6%
sub-neg98.6%
distribute-neg-in98.6%
+-commutative98.6%
frac-2neg98.6%
add-sqr-sqrt48.8%
sqrt-unprod44.0%
sqr-neg44.0%
sqrt-unprod17.5%
add-sqr-sqrt34.4%
add-sqr-sqrt16.6%
sqrt-unprod55.6%
Applied egg-rr98.6%
Taylor expanded in t1 around inf 60.6%
mul-1-neg60.6%
Simplified60.6%
Final simplification60.6%
(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 75.7%
associate-/l*76.7%
distribute-lft-neg-out76.7%
distribute-rgt-neg-in76.7%
associate-/r*85.7%
distribute-neg-frac285.7%
Simplified85.7%
Taylor expanded in t1 around 0 52.7%
associate-/l/50.3%
associate-*r/48.6%
*-commutative48.6%
add-sqr-sqrt24.7%
sqrt-unprod43.9%
sqr-neg43.9%
sqrt-unprod15.9%
add-sqr-sqrt31.8%
Applied egg-rr31.8%
associate-/l*33.0%
Simplified33.0%
Taylor expanded in t1 around inf 16.6%
Final simplification16.6%
herbie shell --seed 2024081
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))