
(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 19 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 (/ v (+ t1 u))) -1.0) (+ t1 u)))
double code(double u, double v, double t1) {
return ((t1 * (v / (t1 + u))) / -1.0) / (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))) / (-1.0d0)) / (t1 + u)
end function
public static double code(double u, double v, double t1) {
return ((t1 * (v / (t1 + u))) / -1.0) / (t1 + u);
}
def code(u, v, t1): return ((t1 * (v / (t1 + u))) / -1.0) / (t1 + u)
function code(u, v, t1) return Float64(Float64(Float64(t1 * Float64(v / Float64(t1 + u))) / -1.0) / Float64(t1 + u)) end
function tmp = code(u, v, t1) tmp = ((t1 * (v / (t1 + u))) / -1.0) / (t1 + u); end
code[u_, v_, t1_] := N[(N[(N[(t1 * N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / -1.0), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{t1 \cdot \frac{v}{t1 + u}}{-1}}{t1 + u}
\end{array}
Initial program 69.9%
associate-/l*72.2%
distribute-lft-neg-out72.2%
distribute-rgt-neg-in72.2%
associate-/r*83.7%
distribute-neg-frac283.7%
Simplified83.7%
associate-*r/99.5%
neg-mul-199.5%
associate-/r*99.5%
Applied egg-rr99.5%
Final simplification99.5%
(FPCore (u v t1)
:precision binary64
(if (or (<= t1 -0.082)
(not
(or (<= t1 -1.52e-74)
(and (not (<= t1 -1.1e-103)) (<= t1 6.6e-161)))))
(/ v (- (- t1) (* u 2.0)))
(* t1 (/ v (* u (- (- u) t1))))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -0.082) || !((t1 <= -1.52e-74) || (!(t1 <= -1.1e-103) && (t1 <= 6.6e-161)))) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = t1 * (v / (u * (-u - t1)));
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-0.082d0)) .or. (.not. (t1 <= (-1.52d-74)) .or. (.not. (t1 <= (-1.1d-103))) .and. (t1 <= 6.6d-161))) then
tmp = v / (-t1 - (u * 2.0d0))
else
tmp = t1 * (v / (u * (-u - t1)))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -0.082) || !((t1 <= -1.52e-74) || (!(t1 <= -1.1e-103) && (t1 <= 6.6e-161)))) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = t1 * (v / (u * (-u - t1)));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -0.082) or not ((t1 <= -1.52e-74) or (not (t1 <= -1.1e-103) and (t1 <= 6.6e-161))): tmp = v / (-t1 - (u * 2.0)) else: tmp = t1 * (v / (u * (-u - t1))) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -0.082) || !((t1 <= -1.52e-74) || (!(t1 <= -1.1e-103) && (t1 <= 6.6e-161)))) tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); else tmp = Float64(t1 * Float64(v / Float64(u * Float64(Float64(-u) - t1)))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -0.082) || ~(((t1 <= -1.52e-74) || (~((t1 <= -1.1e-103)) && (t1 <= 6.6e-161))))) tmp = v / (-t1 - (u * 2.0)); else tmp = t1 * (v / (u * (-u - t1))); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -0.082], N[Not[Or[LessEqual[t1, -1.52e-74], And[N[Not[LessEqual[t1, -1.1e-103]], $MachinePrecision], LessEqual[t1, 6.6e-161]]]], $MachinePrecision]], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t1 * N[(v / N[(u * N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -0.082 \lor \neg \left(t1 \leq -1.52 \cdot 10^{-74} \lor \neg \left(t1 \leq -1.1 \cdot 10^{-103}\right) \land t1 \leq 6.6 \cdot 10^{-161}\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;t1 \cdot \frac{v}{u \cdot \left(\left(-u\right) - t1\right)}\\
\end{array}
\end{array}
if t1 < -0.0820000000000000034 or -1.51999999999999997e-74 < t1 < -1.1e-103 or 6.5999999999999997e-161 < t1 Initial program 67.5%
associate-/l*68.3%
distribute-lft-neg-out68.3%
distribute-rgt-neg-in68.3%
associate-/r*81.2%
distribute-neg-frac281.2%
Simplified81.2%
associate-*r/99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*l/99.7%
clear-num99.4%
frac-2neg99.4%
frac-times96.0%
*-un-lft-identity96.0%
add-sqr-sqrt46.6%
sqrt-unprod52.4%
sqr-neg52.4%
sqrt-prod16.8%
add-sqr-sqrt37.9%
Applied egg-rr96.0%
Taylor expanded in u around 0 83.4%
*-commutative83.4%
Simplified83.4%
if -0.0820000000000000034 < t1 < -1.51999999999999997e-74 or -1.1e-103 < t1 < 6.5999999999999997e-161Initial program 74.2%
associate-/l*79.3%
distribute-lft-neg-out79.3%
distribute-rgt-neg-in79.3%
associate-/r*88.2%
distribute-neg-frac288.2%
Simplified88.2%
Taylor expanded in t1 around 0 75.6%
Taylor expanded in v around 0 70.9%
associate-*r/70.9%
neg-mul-170.9%
Simplified70.9%
Final simplification78.9%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ v (- (- t1) (* u 2.0)))))
(if (<= t1 -0.16)
t_1
(if (<= t1 -1.65e-73)
(* t1 (/ (/ v (- u)) (+ t1 u)))
(if (or (<= t1 -1.1e-103) (not (<= t1 6.6e-161)))
t_1
(* v (/ (/ t1 u) (- (- u) t1))))))))
double code(double u, double v, double t1) {
double t_1 = v / (-t1 - (u * 2.0));
double tmp;
if (t1 <= -0.16) {
tmp = t_1;
} else if (t1 <= -1.65e-73) {
tmp = t1 * ((v / -u) / (t1 + u));
} else if ((t1 <= -1.1e-103) || !(t1 <= 6.6e-161)) {
tmp = t_1;
} else {
tmp = v * ((t1 / u) / (-u - t1));
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: t_1
real(8) :: tmp
t_1 = v / (-t1 - (u * 2.0d0))
if (t1 <= (-0.16d0)) then
tmp = t_1
else if (t1 <= (-1.65d-73)) then
tmp = t1 * ((v / -u) / (t1 + u))
else if ((t1 <= (-1.1d-103)) .or. (.not. (t1 <= 6.6d-161))) then
tmp = t_1
else
tmp = v * ((t1 / u) / (-u - t1))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = v / (-t1 - (u * 2.0));
double tmp;
if (t1 <= -0.16) {
tmp = t_1;
} else if (t1 <= -1.65e-73) {
tmp = t1 * ((v / -u) / (t1 + u));
} else if ((t1 <= -1.1e-103) || !(t1 <= 6.6e-161)) {
tmp = t_1;
} else {
tmp = v * ((t1 / u) / (-u - t1));
}
return tmp;
}
def code(u, v, t1): t_1 = v / (-t1 - (u * 2.0)) tmp = 0 if t1 <= -0.16: tmp = t_1 elif t1 <= -1.65e-73: tmp = t1 * ((v / -u) / (t1 + u)) elif (t1 <= -1.1e-103) or not (t1 <= 6.6e-161): tmp = t_1 else: tmp = v * ((t1 / u) / (-u - t1)) return tmp
function code(u, v, t1) t_1 = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))) tmp = 0.0 if (t1 <= -0.16) tmp = t_1; elseif (t1 <= -1.65e-73) tmp = Float64(t1 * Float64(Float64(v / Float64(-u)) / Float64(t1 + u))); elseif ((t1 <= -1.1e-103) || !(t1 <= 6.6e-161)) tmp = t_1; else tmp = Float64(v * Float64(Float64(t1 / u) / Float64(Float64(-u) - t1))); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = v / (-t1 - (u * 2.0)); tmp = 0.0; if (t1 <= -0.16) tmp = t_1; elseif (t1 <= -1.65e-73) tmp = t1 * ((v / -u) / (t1 + u)); elseif ((t1 <= -1.1e-103) || ~((t1 <= 6.6e-161))) tmp = t_1; else tmp = v * ((t1 / u) / (-u - t1)); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -0.16], t$95$1, If[LessEqual[t1, -1.65e-73], N[(t1 * N[(N[(v / (-u)), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t1, -1.1e-103], N[Not[LessEqual[t1, 6.6e-161]], $MachinePrecision]], t$95$1, N[(v * N[(N[(t1 / u), $MachinePrecision] / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{v}{\left(-t1\right) - u \cdot 2}\\
\mathbf{if}\;t1 \leq -0.16:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t1 \leq -1.65 \cdot 10^{-73}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{-u}}{t1 + u}\\
\mathbf{elif}\;t1 \leq -1.1 \cdot 10^{-103} \lor \neg \left(t1 \leq 6.6 \cdot 10^{-161}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;v \cdot \frac{\frac{t1}{u}}{\left(-u\right) - t1}\\
\end{array}
\end{array}
if t1 < -0.160000000000000003 or -1.65000000000000002e-73 < t1 < -1.1e-103 or 6.5999999999999997e-161 < t1 Initial program 67.5%
associate-/l*68.3%
distribute-lft-neg-out68.3%
distribute-rgt-neg-in68.3%
associate-/r*81.2%
distribute-neg-frac281.2%
Simplified81.2%
associate-*r/99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*l/99.7%
clear-num99.4%
frac-2neg99.4%
frac-times96.0%
*-un-lft-identity96.0%
add-sqr-sqrt46.6%
sqrt-unprod52.4%
sqr-neg52.4%
sqrt-prod16.8%
add-sqr-sqrt37.9%
Applied egg-rr96.0%
Taylor expanded in u around 0 83.4%
*-commutative83.4%
Simplified83.4%
if -0.160000000000000003 < t1 < -1.65000000000000002e-73Initial program 82.7%
associate-/l*82.7%
distribute-lft-neg-out82.7%
distribute-rgt-neg-in82.7%
associate-/r*99.7%
distribute-neg-frac299.7%
Simplified99.7%
Taylor expanded in t1 around 0 78.0%
if -1.1e-103 < t1 < 6.5999999999999997e-161Initial program 73.0%
associate-/l*78.8%
distribute-lft-neg-out78.8%
distribute-rgt-neg-in78.8%
associate-/r*86.7%
distribute-neg-frac286.7%
Simplified86.7%
Taylor expanded in t1 around 0 75.3%
Taylor expanded in v around 0 70.0%
mul-1-neg70.0%
associate-/r*72.9%
associate-*r/81.4%
distribute-frac-neg81.4%
distribute-rgt-neg-in81.4%
distribute-frac-neg81.4%
Simplified81.4%
Taylor expanded in v around 0 70.0%
mul-1-neg70.0%
associate-*l/71.2%
*-commutative71.2%
distribute-lft-neg-in71.2%
associate-/r*79.3%
Simplified79.3%
Final simplification81.9%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ v (- (- t1) (* u 2.0)))) (t_2 (- (- u) t1)))
(if (<= t1 -8e-6)
t_1
(if (<= t1 -1.9e-74)
(* t1 (/ (/ v (- u)) (+ t1 u)))
(if (<= t1 -1.06e-103)
t_1
(if (<= t1 6.6e-161)
(* v (/ (/ t1 u) t_2))
(* (/ t1 t_2) (/ v t1))))))))
double code(double u, double v, double t1) {
double t_1 = v / (-t1 - (u * 2.0));
double t_2 = -u - t1;
double tmp;
if (t1 <= -8e-6) {
tmp = t_1;
} else if (t1 <= -1.9e-74) {
tmp = t1 * ((v / -u) / (t1 + u));
} else if (t1 <= -1.06e-103) {
tmp = t_1;
} else if (t1 <= 6.6e-161) {
tmp = v * ((t1 / u) / t_2);
} else {
tmp = (t1 / t_2) * (v / t1);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = v / (-t1 - (u * 2.0d0))
t_2 = -u - t1
if (t1 <= (-8d-6)) then
tmp = t_1
else if (t1 <= (-1.9d-74)) then
tmp = t1 * ((v / -u) / (t1 + u))
else if (t1 <= (-1.06d-103)) then
tmp = t_1
else if (t1 <= 6.6d-161) then
tmp = v * ((t1 / u) / t_2)
else
tmp = (t1 / t_2) * (v / t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = v / (-t1 - (u * 2.0));
double t_2 = -u - t1;
double tmp;
if (t1 <= -8e-6) {
tmp = t_1;
} else if (t1 <= -1.9e-74) {
tmp = t1 * ((v / -u) / (t1 + u));
} else if (t1 <= -1.06e-103) {
tmp = t_1;
} else if (t1 <= 6.6e-161) {
tmp = v * ((t1 / u) / t_2);
} else {
tmp = (t1 / t_2) * (v / t1);
}
return tmp;
}
def code(u, v, t1): t_1 = v / (-t1 - (u * 2.0)) t_2 = -u - t1 tmp = 0 if t1 <= -8e-6: tmp = t_1 elif t1 <= -1.9e-74: tmp = t1 * ((v / -u) / (t1 + u)) elif t1 <= -1.06e-103: tmp = t_1 elif t1 <= 6.6e-161: tmp = v * ((t1 / u) / t_2) else: tmp = (t1 / t_2) * (v / t1) return tmp
function code(u, v, t1) t_1 = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))) t_2 = Float64(Float64(-u) - t1) tmp = 0.0 if (t1 <= -8e-6) tmp = t_1; elseif (t1 <= -1.9e-74) tmp = Float64(t1 * Float64(Float64(v / Float64(-u)) / Float64(t1 + u))); elseif (t1 <= -1.06e-103) tmp = t_1; elseif (t1 <= 6.6e-161) tmp = Float64(v * Float64(Float64(t1 / u) / t_2)); else tmp = Float64(Float64(t1 / t_2) * Float64(v / t1)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = v / (-t1 - (u * 2.0)); t_2 = -u - t1; tmp = 0.0; if (t1 <= -8e-6) tmp = t_1; elseif (t1 <= -1.9e-74) tmp = t1 * ((v / -u) / (t1 + u)); elseif (t1 <= -1.06e-103) tmp = t_1; elseif (t1 <= 6.6e-161) tmp = v * ((t1 / u) / t_2); else tmp = (t1 / t_2) * (v / t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[((-u) - t1), $MachinePrecision]}, If[LessEqual[t1, -8e-6], t$95$1, If[LessEqual[t1, -1.9e-74], N[(t1 * N[(N[(v / (-u)), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, -1.06e-103], t$95$1, If[LessEqual[t1, 6.6e-161], N[(v * N[(N[(t1 / u), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], N[(N[(t1 / t$95$2), $MachinePrecision] * N[(v / t1), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{v}{\left(-t1\right) - u \cdot 2}\\
t_2 := \left(-u\right) - t1\\
\mathbf{if}\;t1 \leq -8 \cdot 10^{-6}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t1 \leq -1.9 \cdot 10^{-74}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{-u}}{t1 + u}\\
\mathbf{elif}\;t1 \leq -1.06 \cdot 10^{-103}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t1 \leq 6.6 \cdot 10^{-161}:\\
\;\;\;\;v \cdot \frac{\frac{t1}{u}}{t\_2}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{t\_2} \cdot \frac{v}{t1}\\
\end{array}
\end{array}
if t1 < -7.99999999999999964e-6 or -1.8999999999999998e-74 < t1 < -1.06000000000000004e-103Initial program 65.7%
associate-/l*68.1%
distribute-lft-neg-out68.1%
distribute-rgt-neg-in68.1%
associate-/r*81.9%
distribute-neg-frac281.9%
Simplified81.9%
associate-*r/99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*l/99.5%
clear-num98.9%
frac-2neg98.9%
frac-times96.5%
*-un-lft-identity96.5%
add-sqr-sqrt84.6%
sqrt-unprod70.1%
sqr-neg70.1%
sqrt-prod7.7%
add-sqr-sqrt40.2%
Applied egg-rr96.5%
Taylor expanded in u around 0 85.6%
*-commutative85.6%
Simplified85.6%
if -7.99999999999999964e-6 < t1 < -1.8999999999999998e-74Initial program 82.7%
associate-/l*82.7%
distribute-lft-neg-out82.7%
distribute-rgt-neg-in82.7%
associate-/r*99.7%
distribute-neg-frac299.7%
Simplified99.7%
Taylor expanded in t1 around 0 78.0%
if -1.06000000000000004e-103 < t1 < 6.5999999999999997e-161Initial program 73.0%
associate-/l*78.8%
distribute-lft-neg-out78.8%
distribute-rgt-neg-in78.8%
associate-/r*86.7%
distribute-neg-frac286.7%
Simplified86.7%
Taylor expanded in t1 around 0 75.3%
Taylor expanded in v around 0 70.0%
mul-1-neg70.0%
associate-/r*72.9%
associate-*r/81.4%
distribute-frac-neg81.4%
distribute-rgt-neg-in81.4%
distribute-frac-neg81.4%
Simplified81.4%
Taylor expanded in v around 0 70.0%
mul-1-neg70.0%
associate-*l/71.2%
*-commutative71.2%
distribute-lft-neg-in71.2%
associate-/r*79.3%
Simplified79.3%
if 6.5999999999999997e-161 < t1 Initial program 69.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.4%
Final simplification82.2%
(FPCore (u v t1) :precision binary64 (if (<= t1 -4e+135) (/ v (- (- t1) (* u 2.0))) (if (<= t1 5.8e+130) (* t1 (/ (/ v (+ t1 u)) (- (- u) t1))) (/ v (- t1)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -4e+135) {
tmp = v / (-t1 - (u * 2.0));
} else if (t1 <= 5.8e+130) {
tmp = t1 * ((v / (t1 + 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 (t1 <= (-4d+135)) then
tmp = v / (-t1 - (u * 2.0d0))
else if (t1 <= 5.8d+130) then
tmp = t1 * ((v / (t1 + 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 (t1 <= -4e+135) {
tmp = v / (-t1 - (u * 2.0));
} else if (t1 <= 5.8e+130) {
tmp = t1 * ((v / (t1 + u)) / (-u - t1));
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -4e+135: tmp = v / (-t1 - (u * 2.0)) elif t1 <= 5.8e+130: tmp = t1 * ((v / (t1 + u)) / (-u - t1)) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -4e+135) tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); elseif (t1 <= 5.8e+130) tmp = Float64(t1 * Float64(Float64(v / Float64(t1 + 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 (t1 <= -4e+135) tmp = v / (-t1 - (u * 2.0)); elseif (t1 <= 5.8e+130) tmp = t1 * ((v / (t1 + u)) / (-u - t1)); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -4e+135], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 5.8e+130], N[(t1 * N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -4 \cdot 10^{+135}:\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\mathbf{elif}\;t1 \leq 5.8 \cdot 10^{+130}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{t1 + u}}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if t1 < -3.99999999999999985e135Initial program 53.2%
associate-/l*54.0%
distribute-lft-neg-out54.0%
distribute-rgt-neg-in54.0%
associate-/r*70.8%
distribute-neg-frac270.8%
Simplified70.8%
associate-*r/99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*l/100.0%
clear-num99.9%
frac-2neg99.9%
frac-times100.0%
*-un-lft-identity100.0%
add-sqr-sqrt99.6%
sqrt-unprod54.0%
sqr-neg54.0%
sqrt-prod0.0%
add-sqr-sqrt53.3%
Applied egg-rr100.0%
Taylor expanded in u around 0 95.0%
*-commutative95.0%
Simplified95.0%
if -3.99999999999999985e135 < t1 < 5.7999999999999998e130Initial program 78.8%
associate-/l*81.1%
distribute-lft-neg-out81.1%
distribute-rgt-neg-in81.1%
associate-/r*89.6%
distribute-neg-frac289.6%
Simplified89.6%
if 5.7999999999999998e130 < t1 Initial program 38.4%
associate-/l*42.6%
distribute-lft-neg-out42.6%
distribute-rgt-neg-in42.6%
associate-/r*65.2%
distribute-neg-frac265.2%
Simplified65.2%
Taylor expanded in t1 around inf 91.5%
associate-*r/91.5%
neg-mul-191.5%
Simplified91.5%
Final simplification90.6%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -0.0085) (not (<= t1 6.6e-161))) (/ v (- (- t1) (* u 2.0))) (* t1 (/ (/ v (- u)) (+ t1 u)))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -0.0085) || !(t1 <= 6.6e-161)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = t1 * ((v / -u) / (t1 + u));
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-0.0085d0)) .or. (.not. (t1 <= 6.6d-161))) then
tmp = v / (-t1 - (u * 2.0d0))
else
tmp = t1 * ((v / -u) / (t1 + u))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -0.0085) || !(t1 <= 6.6e-161)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = t1 * ((v / -u) / (t1 + u));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -0.0085) or not (t1 <= 6.6e-161): tmp = v / (-t1 - (u * 2.0)) else: tmp = t1 * ((v / -u) / (t1 + u)) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -0.0085) || !(t1 <= 6.6e-161)) tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); else tmp = Float64(t1 * Float64(Float64(v / Float64(-u)) / Float64(t1 + u))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -0.0085) || ~((t1 <= 6.6e-161))) tmp = v / (-t1 - (u * 2.0)); else tmp = t1 * ((v / -u) / (t1 + u)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -0.0085], N[Not[LessEqual[t1, 6.6e-161]], $MachinePrecision]], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t1 * N[(N[(v / (-u)), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -0.0085 \lor \neg \left(t1 \leq 6.6 \cdot 10^{-161}\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{-u}}{t1 + u}\\
\end{array}
\end{array}
if t1 < -0.0085000000000000006 or 6.5999999999999997e-161 < t1 Initial program 66.6%
associate-/l*68.0%
distribute-lft-neg-out68.0%
distribute-rgt-neg-in68.0%
associate-/r*81.0%
distribute-neg-frac281.0%
Simplified81.0%
associate-*r/99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*l/99.9%
clear-num99.9%
frac-2neg99.9%
frac-times96.3%
*-un-lft-identity96.3%
add-sqr-sqrt45.4%
sqrt-unprod50.8%
sqr-neg50.8%
sqrt-prod16.9%
add-sqr-sqrt38.8%
Applied egg-rr96.3%
Taylor expanded in u around 0 83.3%
*-commutative83.3%
Simplified83.3%
if -0.0085000000000000006 < t1 < 6.5999999999999997e-161Initial program 75.1%
associate-/l*78.9%
distribute-lft-neg-out78.9%
distribute-rgt-neg-in78.9%
associate-/r*88.1%
distribute-neg-frac288.1%
Simplified88.1%
Taylor expanded in t1 around 0 72.6%
Final simplification79.2%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ t1 (- (- u) t1))))
(if (<= t1 -4.4e-14)
(/ v (- (- t1) (* u 2.0)))
(if (<= t1 6.6e-161) (* t_1 (/ v u)) (* t_1 (/ v t1))))))
double code(double u, double v, double t1) {
double t_1 = t1 / (-u - t1);
double tmp;
if (t1 <= -4.4e-14) {
tmp = v / (-t1 - (u * 2.0));
} else if (t1 <= 6.6e-161) {
tmp = t_1 * (v / u);
} else {
tmp = t_1 * (v / t1);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: t_1
real(8) :: tmp
t_1 = t1 / (-u - t1)
if (t1 <= (-4.4d-14)) then
tmp = v / (-t1 - (u * 2.0d0))
else if (t1 <= 6.6d-161) then
tmp = t_1 * (v / u)
else
tmp = t_1 * (v / t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = t1 / (-u - t1);
double tmp;
if (t1 <= -4.4e-14) {
tmp = v / (-t1 - (u * 2.0));
} else if (t1 <= 6.6e-161) {
tmp = t_1 * (v / u);
} else {
tmp = t_1 * (v / t1);
}
return tmp;
}
def code(u, v, t1): t_1 = t1 / (-u - t1) tmp = 0 if t1 <= -4.4e-14: tmp = v / (-t1 - (u * 2.0)) elif t1 <= 6.6e-161: tmp = t_1 * (v / u) else: tmp = t_1 * (v / t1) return tmp
function code(u, v, t1) t_1 = Float64(t1 / Float64(Float64(-u) - t1)) tmp = 0.0 if (t1 <= -4.4e-14) tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); elseif (t1 <= 6.6e-161) tmp = Float64(t_1 * Float64(v / u)); else tmp = Float64(t_1 * Float64(v / t1)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = t1 / (-u - t1); tmp = 0.0; if (t1 <= -4.4e-14) tmp = v / (-t1 - (u * 2.0)); elseif (t1 <= 6.6e-161) tmp = t_1 * (v / u); else tmp = t_1 * (v / t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(t1 / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -4.4e-14], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 6.6e-161], N[(t$95$1 * N[(v / u), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(v / t1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t1}{\left(-u\right) - t1}\\
\mathbf{if}\;t1 \leq -4.4 \cdot 10^{-14}:\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\mathbf{elif}\;t1 \leq 6.6 \cdot 10^{-161}:\\
\;\;\;\;t\_1 \cdot \frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \frac{v}{t1}\\
\end{array}
\end{array}
if t1 < -4.4000000000000002e-14Initial program 63.6%
associate-/l*67.4%
distribute-lft-neg-out67.4%
distribute-rgt-neg-in67.4%
associate-/r*81.4%
distribute-neg-frac281.4%
Simplified81.4%
associate-*r/99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*l/99.9%
clear-num99.9%
frac-2neg99.9%
frac-times97.3%
*-un-lft-identity97.3%
add-sqr-sqrt85.7%
sqrt-unprod68.4%
sqr-neg68.4%
sqrt-prod7.1%
add-sqr-sqrt42.4%
Applied egg-rr97.3%
Taylor expanded in u around 0 85.5%
*-commutative85.5%
Simplified85.5%
if -4.4000000000000002e-14 < t1 < 6.5999999999999997e-161Initial program 75.1%
times-frac97.6%
distribute-frac-neg97.6%
distribute-neg-frac297.6%
+-commutative97.6%
distribute-neg-in97.6%
unsub-neg97.6%
Simplified97.6%
Taylor expanded in t1 around 0 76.5%
if 6.5999999999999997e-161 < t1 Initial program 69.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.4%
Final simplification81.0%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (- (- u) t1)))
(if (<= t1 -0.00115)
(/ v (- (- t1) (* u 2.0)))
(if (<= t1 6.5e-161) (/ (* t1 (/ v u)) t_1) (* (/ t1 t_1) (/ v t1))))))
double code(double u, double v, double t1) {
double t_1 = -u - t1;
double tmp;
if (t1 <= -0.00115) {
tmp = v / (-t1 - (u * 2.0));
} else if (t1 <= 6.5e-161) {
tmp = (t1 * (v / u)) / t_1;
} else {
tmp = (t1 / t_1) * (v / t1);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: t_1
real(8) :: tmp
t_1 = -u - t1
if (t1 <= (-0.00115d0)) then
tmp = v / (-t1 - (u * 2.0d0))
else if (t1 <= 6.5d-161) then
tmp = (t1 * (v / u)) / t_1
else
tmp = (t1 / t_1) * (v / t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = -u - t1;
double tmp;
if (t1 <= -0.00115) {
tmp = v / (-t1 - (u * 2.0));
} else if (t1 <= 6.5e-161) {
tmp = (t1 * (v / u)) / t_1;
} else {
tmp = (t1 / t_1) * (v / t1);
}
return tmp;
}
def code(u, v, t1): t_1 = -u - t1 tmp = 0 if t1 <= -0.00115: tmp = v / (-t1 - (u * 2.0)) elif t1 <= 6.5e-161: tmp = (t1 * (v / u)) / t_1 else: tmp = (t1 / t_1) * (v / t1) return tmp
function code(u, v, t1) t_1 = Float64(Float64(-u) - t1) tmp = 0.0 if (t1 <= -0.00115) tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); elseif (t1 <= 6.5e-161) tmp = Float64(Float64(t1 * Float64(v / u)) / t_1); else tmp = Float64(Float64(t1 / t_1) * Float64(v / t1)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = -u - t1; tmp = 0.0; if (t1 <= -0.00115) tmp = v / (-t1 - (u * 2.0)); elseif (t1 <= 6.5e-161) tmp = (t1 * (v / u)) / t_1; else tmp = (t1 / t_1) * (v / t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-u) - t1), $MachinePrecision]}, If[LessEqual[t1, -0.00115], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 6.5e-161], N[(N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], N[(N[(t1 / t$95$1), $MachinePrecision] * N[(v / t1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-u\right) - t1\\
\mathbf{if}\;t1 \leq -0.00115:\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\mathbf{elif}\;t1 \leq 6.5 \cdot 10^{-161}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{u}}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{t\_1} \cdot \frac{v}{t1}\\
\end{array}
\end{array}
if t1 < -0.00115Initial program 63.6%
associate-/l*67.4%
distribute-lft-neg-out67.4%
distribute-rgt-neg-in67.4%
associate-/r*81.4%
distribute-neg-frac281.4%
Simplified81.4%
associate-*r/99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*l/99.9%
clear-num99.9%
frac-2neg99.9%
frac-times97.3%
*-un-lft-identity97.3%
add-sqr-sqrt85.7%
sqrt-unprod68.4%
sqr-neg68.4%
sqrt-prod7.1%
add-sqr-sqrt42.4%
Applied egg-rr97.3%
Taylor expanded in u around 0 85.5%
*-commutative85.5%
Simplified85.5%
if -0.00115 < t1 < 6.50000000000000008e-161Initial program 75.1%
associate-/l*78.9%
distribute-lft-neg-out78.9%
distribute-rgt-neg-in78.9%
associate-/r*88.1%
distribute-neg-frac288.1%
Simplified88.1%
Taylor expanded in t1 around 0 72.6%
Taylor expanded in v around 0 65.6%
mul-1-neg65.6%
associate-/r*70.7%
associate-*r/77.6%
distribute-frac-neg77.6%
distribute-rgt-neg-in77.6%
distribute-frac-neg77.6%
Simplified77.6%
if 6.50000000000000008e-161 < t1 Initial program 69.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.4%
Final simplification81.5%
(FPCore (u v t1) :precision binary64 (if (or (<= u -4e+112) (not (<= u 7.8e+217))) (* t1 (/ v (* u (+ t1 u)))) (/ v (- (- t1) (* u 2.0)))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -4e+112) || !(u <= 7.8e+217)) {
tmp = t1 * (v / (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 <= (-4d+112)) .or. (.not. (u <= 7.8d+217))) then
tmp = t1 * (v / (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 <= -4e+112) || !(u <= 7.8e+217)) {
tmp = t1 * (v / (u * (t1 + u)));
} else {
tmp = v / (-t1 - (u * 2.0));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -4e+112) or not (u <= 7.8e+217): tmp = t1 * (v / (u * (t1 + u))) else: tmp = v / (-t1 - (u * 2.0)) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -4e+112) || !(u <= 7.8e+217)) tmp = Float64(t1 * Float64(v / Float64(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 ((u <= -4e+112) || ~((u <= 7.8e+217))) tmp = t1 * (v / (u * (t1 + u))); else tmp = v / (-t1 - (u * 2.0)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -4e+112], N[Not[LessEqual[u, 7.8e+217]], $MachinePrecision]], N[(t1 * N[(v / N[(u * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -4 \cdot 10^{+112} \lor \neg \left(u \leq 7.8 \cdot 10^{+217}\right):\\
\;\;\;\;t1 \cdot \frac{v}{u \cdot \left(t1 + u\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\end{array}
\end{array}
if u < -3.9999999999999997e112 or 7.79999999999999986e217 < u Initial program 74.4%
associate-/l*75.0%
distribute-lft-neg-out75.0%
distribute-rgt-neg-in75.0%
associate-/r*90.7%
distribute-neg-frac290.7%
Simplified90.7%
Taylor expanded in t1 around 0 84.8%
associate-/l/75.0%
associate-*r/74.4%
add-sqr-sqrt47.6%
sqrt-unprod74.4%
sqr-neg74.4%
sqrt-unprod26.7%
add-sqr-sqrt72.9%
Applied egg-rr72.9%
associate-/l*73.5%
*-commutative73.5%
Simplified73.5%
if -3.9999999999999997e112 < u < 7.79999999999999986e217Initial program 68.4%
associate-/l*71.3%
distribute-lft-neg-out71.3%
distribute-rgt-neg-in71.3%
associate-/r*81.4%
distribute-neg-frac281.4%
Simplified81.4%
associate-*r/99.3%
+-commutative99.3%
distribute-neg-in99.3%
sub-neg99.3%
associate-*l/98.9%
clear-num98.9%
frac-2neg98.9%
frac-times97.4%
*-un-lft-identity97.4%
add-sqr-sqrt48.1%
sqrt-unprod51.5%
sqr-neg51.5%
sqrt-prod13.1%
add-sqr-sqrt26.1%
Applied egg-rr97.4%
Taylor expanded in u around 0 68.4%
*-commutative68.4%
Simplified68.4%
Final simplification69.7%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (* u (+ t1 u))))
(if (<= u -3.1e+106)
(* v (/ t1 t_1))
(if (<= u 1.75e+217) (/ v (- (- t1) (* u 2.0))) (* t1 (/ v t_1))))))
double code(double u, double v, double t1) {
double t_1 = u * (t1 + u);
double tmp;
if (u <= -3.1e+106) {
tmp = v * (t1 / t_1);
} else if (u <= 1.75e+217) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = t1 * (v / t_1);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: t_1
real(8) :: tmp
t_1 = u * (t1 + u)
if (u <= (-3.1d+106)) then
tmp = v * (t1 / t_1)
else if (u <= 1.75d+217) then
tmp = v / (-t1 - (u * 2.0d0))
else
tmp = t1 * (v / t_1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = u * (t1 + u);
double tmp;
if (u <= -3.1e+106) {
tmp = v * (t1 / t_1);
} else if (u <= 1.75e+217) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = t1 * (v / t_1);
}
return tmp;
}
def code(u, v, t1): t_1 = u * (t1 + u) tmp = 0 if u <= -3.1e+106: tmp = v * (t1 / t_1) elif u <= 1.75e+217: tmp = v / (-t1 - (u * 2.0)) else: tmp = t1 * (v / t_1) return tmp
function code(u, v, t1) t_1 = Float64(u * Float64(t1 + u)) tmp = 0.0 if (u <= -3.1e+106) tmp = Float64(v * Float64(t1 / t_1)); elseif (u <= 1.75e+217) tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); else tmp = Float64(t1 * Float64(v / t_1)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = u * (t1 + u); tmp = 0.0; if (u <= -3.1e+106) tmp = v * (t1 / t_1); elseif (u <= 1.75e+217) tmp = v / (-t1 - (u * 2.0)); else tmp = t1 * (v / t_1); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(u * N[(t1 + u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[u, -3.1e+106], N[(v * N[(t1 / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 1.75e+217], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t1 * N[(v / t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := u \cdot \left(t1 + u\right)\\
\mathbf{if}\;u \leq -3.1 \cdot 10^{+106}:\\
\;\;\;\;v \cdot \frac{t1}{t\_1}\\
\mathbf{elif}\;u \leq 1.75 \cdot 10^{+217}:\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;t1 \cdot \frac{v}{t\_1}\\
\end{array}
\end{array}
if u < -3.0999999999999999e106Initial program 70.5%
associate-/l*70.9%
distribute-lft-neg-out70.9%
distribute-rgt-neg-in70.9%
associate-/r*90.3%
distribute-neg-frac290.3%
Simplified90.3%
Taylor expanded in t1 around 0 83.7%
clear-num83.7%
un-div-inv83.8%
div-inv83.8%
add-sqr-sqrt83.4%
sqrt-unprod70.9%
sqr-neg70.9%
sqrt-unprod0.6%
add-sqr-sqrt68.6%
clear-num68.6%
Applied egg-rr68.6%
associate-/r*68.5%
Simplified68.5%
associate-/r/68.7%
associate-/l/68.7%
Applied egg-rr68.7%
if -3.0999999999999999e106 < u < 1.7499999999999999e217Initial program 68.4%
associate-/l*71.3%
distribute-lft-neg-out71.3%
distribute-rgt-neg-in71.3%
associate-/r*81.4%
distribute-neg-frac281.4%
Simplified81.4%
associate-*r/99.3%
+-commutative99.3%
distribute-neg-in99.3%
sub-neg99.3%
associate-*l/98.9%
clear-num98.9%
frac-2neg98.9%
frac-times97.4%
*-un-lft-identity97.4%
add-sqr-sqrt48.1%
sqrt-unprod51.5%
sqr-neg51.5%
sqrt-prod13.1%
add-sqr-sqrt26.1%
Applied egg-rr97.4%
Taylor expanded in u around 0 68.4%
*-commutative68.4%
Simplified68.4%
if 1.7499999999999999e217 < u Initial program 81.8%
associate-/l*82.8%
distribute-lft-neg-out82.8%
distribute-rgt-neg-in82.8%
associate-/r*91.4%
distribute-neg-frac291.4%
Simplified91.4%
Taylor expanded in t1 around 0 87.0%
associate-/l/82.8%
associate-*r/81.8%
add-sqr-sqrt4.5%
sqrt-unprod81.8%
sqr-neg81.8%
sqrt-unprod77.3%
add-sqr-sqrt81.8%
Applied egg-rr81.8%
associate-/l*82.8%
*-commutative82.8%
Simplified82.8%
Final simplification69.7%
(FPCore (u v t1)
:precision binary64
(if (<= u -4e+112)
(* v (/ t1 (* u (+ t1 u))))
(if (<= u 1.75e+217)
(/ v (- (- t1) (* u 2.0)))
(/ (/ t1 (+ t1 u)) (/ u v)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -4e+112) {
tmp = v * (t1 / (u * (t1 + u)));
} else if (u <= 1.75e+217) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = (t1 / (t1 + u)) / (u / v);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-4d+112)) then
tmp = v * (t1 / (u * (t1 + u)))
else if (u <= 1.75d+217) then
tmp = v / (-t1 - (u * 2.0d0))
else
tmp = (t1 / (t1 + u)) / (u / v)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -4e+112) {
tmp = v * (t1 / (u * (t1 + u)));
} else if (u <= 1.75e+217) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = (t1 / (t1 + u)) / (u / v);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -4e+112: tmp = v * (t1 / (u * (t1 + u))) elif u <= 1.75e+217: tmp = v / (-t1 - (u * 2.0)) else: tmp = (t1 / (t1 + u)) / (u / v) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -4e+112) tmp = Float64(v * Float64(t1 / Float64(u * Float64(t1 + u)))); elseif (u <= 1.75e+217) tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); else tmp = Float64(Float64(t1 / Float64(t1 + u)) / Float64(u / v)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -4e+112) tmp = v * (t1 / (u * (t1 + u))); elseif (u <= 1.75e+217) tmp = v / (-t1 - (u * 2.0)); else tmp = (t1 / (t1 + u)) / (u / v); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -4e+112], N[(v * N[(t1 / N[(u * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 1.75e+217], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[(u / v), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -4 \cdot 10^{+112}:\\
\;\;\;\;v \cdot \frac{t1}{u \cdot \left(t1 + u\right)}\\
\mathbf{elif}\;u \leq 1.75 \cdot 10^{+217}:\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t1}{t1 + u}}{\frac{u}{v}}\\
\end{array}
\end{array}
if u < -3.9999999999999997e112Initial program 70.5%
associate-/l*70.9%
distribute-lft-neg-out70.9%
distribute-rgt-neg-in70.9%
associate-/r*90.3%
distribute-neg-frac290.3%
Simplified90.3%
Taylor expanded in t1 around 0 83.7%
clear-num83.7%
un-div-inv83.8%
div-inv83.8%
add-sqr-sqrt83.4%
sqrt-unprod70.9%
sqr-neg70.9%
sqrt-unprod0.6%
add-sqr-sqrt68.6%
clear-num68.6%
Applied egg-rr68.6%
associate-/r*68.5%
Simplified68.5%
associate-/r/68.7%
associate-/l/68.7%
Applied egg-rr68.7%
if -3.9999999999999997e112 < u < 1.7499999999999999e217Initial program 68.4%
associate-/l*71.3%
distribute-lft-neg-out71.3%
distribute-rgt-neg-in71.3%
associate-/r*81.4%
distribute-neg-frac281.4%
Simplified81.4%
associate-*r/99.3%
+-commutative99.3%
distribute-neg-in99.3%
sub-neg99.3%
associate-*l/98.9%
clear-num98.9%
frac-2neg98.9%
frac-times97.4%
*-un-lft-identity97.4%
add-sqr-sqrt48.1%
sqrt-unprod51.5%
sqr-neg51.5%
sqrt-prod13.1%
add-sqr-sqrt26.1%
Applied egg-rr97.4%
Taylor expanded in u around 0 68.4%
*-commutative68.4%
Simplified68.4%
if 1.7499999999999999e217 < u Initial program 81.8%
associate-/l*82.8%
distribute-lft-neg-out82.8%
distribute-rgt-neg-in82.8%
associate-/r*91.4%
distribute-neg-frac291.4%
Simplified91.4%
Taylor expanded in t1 around 0 87.0%
clear-num87.0%
un-div-inv87.1%
div-inv87.1%
add-sqr-sqrt4.6%
sqrt-unprod82.8%
sqr-neg82.8%
sqrt-unprod78.0%
add-sqr-sqrt83.0%
clear-num83.0%
Applied egg-rr83.0%
associate-/r*82.9%
Simplified82.9%
Final simplification69.7%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.7e+110) (not (<= u 3.6e+217))) (/ (/ t1 u) (/ u v)) (/ v (- (- t1) (* u 2.0)))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.7e+110) || !(u <= 3.6e+217)) {
tmp = (t1 / u) / (u / v);
} 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.7d+110)) .or. (.not. (u <= 3.6d+217))) then
tmp = (t1 / u) / (u / v)
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.7e+110) || !(u <= 3.6e+217)) {
tmp = (t1 / u) / (u / v);
} else {
tmp = v / (-t1 - (u * 2.0));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.7e+110) or not (u <= 3.6e+217): tmp = (t1 / u) / (u / v) else: tmp = v / (-t1 - (u * 2.0)) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.7e+110) || !(u <= 3.6e+217)) tmp = Float64(Float64(t1 / u) / Float64(u / v)); 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.7e+110) || ~((u <= 3.6e+217))) tmp = (t1 / u) / (u / v); else tmp = v / (-t1 - (u * 2.0)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.7e+110], N[Not[LessEqual[u, 3.6e+217]], $MachinePrecision]], N[(N[(t1 / u), $MachinePrecision] / N[(u / v), $MachinePrecision]), $MachinePrecision], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.7 \cdot 10^{+110} \lor \neg \left(u \leq 3.6 \cdot 10^{+217}\right):\\
\;\;\;\;\frac{\frac{t1}{u}}{\frac{u}{v}}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\end{array}
\end{array}
if u < -1.7000000000000001e110 or 3.6000000000000002e217 < u Initial program 74.4%
associate-/l*75.0%
distribute-lft-neg-out75.0%
distribute-rgt-neg-in75.0%
associate-/r*90.7%
distribute-neg-frac290.7%
Simplified90.7%
Taylor expanded in t1 around 0 84.8%
clear-num84.8%
un-div-inv84.9%
div-inv84.9%
add-sqr-sqrt56.3%
sqrt-unprod75.0%
sqr-neg75.0%
sqrt-unprod27.2%
add-sqr-sqrt73.6%
clear-num73.6%
Applied egg-rr73.6%
associate-/r*73.5%
Simplified73.5%
Taylor expanded in t1 around 0 73.0%
if -1.7000000000000001e110 < u < 3.6000000000000002e217Initial program 68.4%
associate-/l*71.3%
distribute-lft-neg-out71.3%
distribute-rgt-neg-in71.3%
associate-/r*81.4%
distribute-neg-frac281.4%
Simplified81.4%
associate-*r/99.3%
+-commutative99.3%
distribute-neg-in99.3%
sub-neg99.3%
associate-*l/98.9%
clear-num98.9%
frac-2neg98.9%
frac-times97.4%
*-un-lft-identity97.4%
add-sqr-sqrt48.1%
sqrt-unprod51.5%
sqr-neg51.5%
sqrt-prod13.1%
add-sqr-sqrt26.1%
Applied egg-rr97.4%
Taylor expanded in u around 0 68.4%
*-commutative68.4%
Simplified68.4%
Final simplification69.6%
(FPCore (u v t1) :precision binary64 (if (or (<= u -2e+110) (not (<= u 1.75e+217))) (/ (/ t1 u) (/ u v)) (/ v (- (- u) t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -2e+110) || !(u <= 1.75e+217)) {
tmp = (t1 / u) / (u / v);
} else {
tmp = v / (-u - t1);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-2d+110)) .or. (.not. (u <= 1.75d+217))) then
tmp = (t1 / u) / (u / v)
else
tmp = v / (-u - t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -2e+110) || !(u <= 1.75e+217)) {
tmp = (t1 / u) / (u / v);
} else {
tmp = v / (-u - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -2e+110) or not (u <= 1.75e+217): tmp = (t1 / u) / (u / v) else: tmp = v / (-u - t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -2e+110) || !(u <= 1.75e+217)) tmp = Float64(Float64(t1 / u) / Float64(u / v)); else tmp = Float64(v / Float64(Float64(-u) - t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -2e+110) || ~((u <= 1.75e+217))) tmp = (t1 / u) / (u / v); else tmp = v / (-u - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2e+110], N[Not[LessEqual[u, 1.75e+217]], $MachinePrecision]], N[(N[(t1 / u), $MachinePrecision] / N[(u / v), $MachinePrecision]), $MachinePrecision], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2 \cdot 10^{+110} \lor \neg \left(u \leq 1.75 \cdot 10^{+217}\right):\\
\;\;\;\;\frac{\frac{t1}{u}}{\frac{u}{v}}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\end{array}
\end{array}
if u < -2e110 or 1.7499999999999999e217 < u Initial program 74.4%
associate-/l*75.0%
distribute-lft-neg-out75.0%
distribute-rgt-neg-in75.0%
associate-/r*90.7%
distribute-neg-frac290.7%
Simplified90.7%
Taylor expanded in t1 around 0 84.8%
clear-num84.8%
un-div-inv84.9%
div-inv84.9%
add-sqr-sqrt56.3%
sqrt-unprod75.0%
sqr-neg75.0%
sqrt-unprod27.2%
add-sqr-sqrt73.6%
clear-num73.6%
Applied egg-rr73.6%
associate-/r*73.5%
Simplified73.5%
Taylor expanded in t1 around 0 73.0%
if -2e110 < u < 1.7499999999999999e217Initial program 68.4%
associate-/l*71.3%
distribute-lft-neg-out71.3%
distribute-rgt-neg-in71.3%
associate-/r*81.4%
distribute-neg-frac281.4%
Simplified81.4%
associate-*r/99.3%
neg-mul-199.3%
associate-/r*99.3%
Applied egg-rr99.3%
Taylor expanded in t1 around inf 67.6%
Taylor expanded in v around 0 67.6%
neg-mul-167.6%
distribute-neg-frac67.6%
Simplified67.6%
Final simplification69.0%
(FPCore (u v t1) :precision binary64 (if (or (<= u -6e+176) (not (<= u 2.7e+199))) (/ v u) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -6e+176) || !(u <= 2.7e+199)) {
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 <= (-6d+176)) .or. (.not. (u <= 2.7d+199))) 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 <= -6e+176) || !(u <= 2.7e+199)) {
tmp = v / u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -6e+176) or not (u <= 2.7e+199): tmp = v / u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -6e+176) || !(u <= 2.7e+199)) 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 <= -6e+176) || ~((u <= 2.7e+199))) tmp = v / u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -6e+176], N[Not[LessEqual[u, 2.7e+199]], $MachinePrecision]], N[(v / u), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -6 \cdot 10^{+176} \lor \neg \left(u \leq 2.7 \cdot 10^{+199}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -6e176 or 2.6999999999999999e199 < u Initial program 72.7%
associate-/l*73.5%
distribute-lft-neg-out73.5%
distribute-rgt-neg-in73.5%
associate-/r*89.7%
distribute-neg-frac289.7%
Simplified89.7%
Taylor expanded in t1 around 0 87.4%
clear-num87.4%
un-div-inv87.4%
div-inv87.4%
add-sqr-sqrt43.6%
sqrt-unprod73.5%
sqr-neg73.5%
sqrt-unprod39.5%
add-sqr-sqrt73.4%
clear-num73.4%
Applied egg-rr73.4%
associate-/r*73.2%
Simplified73.2%
Taylor expanded in t1 around inf 46.6%
if -6e176 < u < 2.6999999999999999e199Initial program 69.3%
associate-/l*71.9%
distribute-lft-neg-out71.9%
distribute-rgt-neg-in71.9%
associate-/r*82.4%
distribute-neg-frac282.4%
Simplified82.4%
Taylor expanded in t1 around inf 62.0%
associate-*r/62.0%
neg-mul-162.0%
Simplified62.0%
Final simplification59.2%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.4e+176) (not (<= u 3.3e+198))) (/ v (- u)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.4e+176) || !(u <= 3.3e+198)) {
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.4d+176)) .or. (.not. (u <= 3.3d+198))) 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.4e+176) || !(u <= 3.3e+198)) {
tmp = v / -u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.4e+176) or not (u <= 3.3e+198): tmp = v / -u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.4e+176) || !(u <= 3.3e+198)) 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.4e+176) || ~((u <= 3.3e+198))) tmp = v / -u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.4e+176], N[Not[LessEqual[u, 3.3e+198]], $MachinePrecision]], N[(v / (-u)), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.4 \cdot 10^{+176} \lor \neg \left(u \leq 3.3 \cdot 10^{+198}\right):\\
\;\;\;\;\frac{v}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -1.4000000000000001e176 or 3.29999999999999994e198 < u Initial program 72.7%
associate-/l*73.5%
distribute-lft-neg-out73.5%
distribute-rgt-neg-in73.5%
associate-/r*89.7%
distribute-neg-frac289.7%
Simplified89.7%
Taylor expanded in t1 around 0 87.4%
Taylor expanded in t1 around inf 46.7%
associate-*r/46.7%
neg-mul-146.7%
Simplified46.7%
if -1.4000000000000001e176 < u < 3.29999999999999994e198Initial program 69.3%
associate-/l*71.9%
distribute-lft-neg-out71.9%
distribute-rgt-neg-in71.9%
associate-/r*82.4%
distribute-neg-frac282.4%
Simplified82.4%
Taylor expanded in t1 around inf 62.0%
associate-*r/62.0%
neg-mul-162.0%
Simplified62.0%
Final simplification59.2%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -4.7e+78) (not (<= t1 3.6e+130))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -4.7e+78) || !(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 <= (-4.7d+78)) .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 <= -4.7e+78) || !(t1 <= 3.6e+130)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -4.7e+78) 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 <= -4.7e+78) || !(t1 <= 3.6e+130)) 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 <= -4.7e+78) || ~((t1 <= 3.6e+130))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -4.7e+78], 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 -4.7 \cdot 10^{+78} \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 < -4.70000000000000006e78 or 3.6000000000000001e130 < t1 Initial program 48.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.8%
Taylor expanded in u around inf 38.7%
if -4.70000000000000006e78 < t1 < 3.6000000000000001e130Initial program 80.9%
associate-/l*81.8%
distribute-lft-neg-out81.8%
distribute-rgt-neg-in81.8%
associate-/r*90.0%
distribute-neg-frac290.0%
Simplified90.0%
Taylor expanded in t1 around 0 63.0%
clear-num63.0%
un-div-inv63.9%
div-inv63.8%
add-sqr-sqrt33.5%
sqrt-unprod48.7%
sqr-neg48.7%
sqrt-unprod17.7%
add-sqr-sqrt38.5%
clear-num38.5%
Applied egg-rr38.5%
associate-/r*38.2%
Simplified38.2%
Taylor expanded in t1 around inf 19.6%
Final simplification26.0%
(FPCore (u v t1) :precision binary64 (* (/ v (+ t1 u)) (/ t1 (- (- u) t1))))
double code(double u, double v, double t1) {
return (v / (t1 + u)) * (t1 / (-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)) * (t1 / (-u - t1))
end function
public static double code(double u, double v, double t1) {
return (v / (t1 + u)) * (t1 / (-u - t1));
}
def code(u, v, t1): return (v / (t1 + u)) * (t1 / (-u - t1))
function code(u, v, t1) return Float64(Float64(v / Float64(t1 + u)) * Float64(t1 / Float64(Float64(-u) - t1))) end
function tmp = code(u, v, t1) tmp = (v / (t1 + u)) * (t1 / (-u - t1)); end
code[u_, v_, t1_] := N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(t1 / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{t1 + u} \cdot \frac{t1}{\left(-u\right) - t1}
\end{array}
Initial program 69.9%
times-frac99.0%
distribute-frac-neg99.0%
distribute-neg-frac299.0%
+-commutative99.0%
distribute-neg-in99.0%
unsub-neg99.0%
Simplified99.0%
Final simplification99.0%
(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 69.9%
associate-/l*72.2%
distribute-lft-neg-out72.2%
distribute-rgt-neg-in72.2%
associate-/r*83.7%
distribute-neg-frac283.7%
Simplified83.7%
associate-*r/99.5%
neg-mul-199.5%
associate-/r*99.5%
Applied egg-rr99.5%
Taylor expanded in t1 around inf 62.7%
Taylor expanded in v around 0 62.7%
neg-mul-162.7%
distribute-neg-frac62.7%
Simplified62.7%
Final simplification62.7%
(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 69.9%
times-frac99.0%
distribute-frac-neg99.0%
distribute-neg-frac299.0%
+-commutative99.0%
distribute-neg-in99.0%
unsub-neg99.0%
Simplified99.0%
Taylor expanded in t1 around inf 58.4%
Taylor expanded in u around inf 15.6%
Final simplification15.6%
herbie shell --seed 2024058
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))