
(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 21 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))) (+ 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(t1 * Float64(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 * N[(v / N[((-t1) - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{t1 \cdot \frac{v}{\left(-t1\right) - u}}{t1 + u}
\end{array}
Initial program 70.8%
associate-/l*71.4%
Simplified71.4%
associate-*r/70.8%
times-frac98.8%
frac-2neg98.8%
+-commutative98.8%
distribute-neg-in98.8%
sub-neg98.8%
associate-*r/98.8%
add-sqr-sqrt54.7%
sqrt-unprod48.9%
sqr-neg48.9%
sqrt-unprod17.4%
add-sqr-sqrt34.8%
sub-neg34.8%
+-commutative34.8%
add-sqr-sqrt17.5%
sqrt-unprod44.3%
sqr-neg44.3%
sqrt-unprod32.7%
add-sqr-sqrt17.3%
sqrt-unprod36.1%
sqr-neg36.1%
sqrt-unprod21.4%
Applied egg-rr98.8%
Taylor expanded in v around 0 80.7%
mul-1-neg80.7%
associate-/l*99.9%
distribute-lft-neg-out99.9%
*-commutative99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (- (- t1) u)) (t_2 (* t1 (/ v (* (+ t1 u) t_1)))))
(if (<= t1 -1.22e+97)
(/ -1.0 (/ (+ t1 u) v))
(if (<= t1 -1.86e-149)
t_2
(if (<= t1 1.72e-125)
(/ (* t1 (/ v (- u))) u)
(if (<= t1 1.75e+129) t_2 (/ v t_1)))))))
double code(double u, double v, double t1) {
double t_1 = -t1 - u;
double t_2 = t1 * (v / ((t1 + u) * t_1));
double tmp;
if (t1 <= -1.22e+97) {
tmp = -1.0 / ((t1 + u) / v);
} else if (t1 <= -1.86e-149) {
tmp = t_2;
} else if (t1 <= 1.72e-125) {
tmp = (t1 * (v / -u)) / u;
} else if (t1 <= 1.75e+129) {
tmp = t_2;
} else {
tmp = 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) :: t_2
real(8) :: tmp
t_1 = -t1 - u
t_2 = t1 * (v / ((t1 + u) * t_1))
if (t1 <= (-1.22d+97)) then
tmp = (-1.0d0) / ((t1 + u) / v)
else if (t1 <= (-1.86d-149)) then
tmp = t_2
else if (t1 <= 1.72d-125) then
tmp = (t1 * (v / -u)) / u
else if (t1 <= 1.75d+129) then
tmp = t_2
else
tmp = v / t_1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = -t1 - u;
double t_2 = t1 * (v / ((t1 + u) * t_1));
double tmp;
if (t1 <= -1.22e+97) {
tmp = -1.0 / ((t1 + u) / v);
} else if (t1 <= -1.86e-149) {
tmp = t_2;
} else if (t1 <= 1.72e-125) {
tmp = (t1 * (v / -u)) / u;
} else if (t1 <= 1.75e+129) {
tmp = t_2;
} else {
tmp = v / t_1;
}
return tmp;
}
def code(u, v, t1): t_1 = -t1 - u t_2 = t1 * (v / ((t1 + u) * t_1)) tmp = 0 if t1 <= -1.22e+97: tmp = -1.0 / ((t1 + u) / v) elif t1 <= -1.86e-149: tmp = t_2 elif t1 <= 1.72e-125: tmp = (t1 * (v / -u)) / u elif t1 <= 1.75e+129: tmp = t_2 else: tmp = v / t_1 return tmp
function code(u, v, t1) t_1 = Float64(Float64(-t1) - u) t_2 = Float64(t1 * Float64(v / Float64(Float64(t1 + u) * t_1))) tmp = 0.0 if (t1 <= -1.22e+97) tmp = Float64(-1.0 / Float64(Float64(t1 + u) / v)); elseif (t1 <= -1.86e-149) tmp = t_2; elseif (t1 <= 1.72e-125) tmp = Float64(Float64(t1 * Float64(v / Float64(-u))) / u); elseif (t1 <= 1.75e+129) tmp = t_2; else tmp = Float64(v / t_1); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = -t1 - u; t_2 = t1 * (v / ((t1 + u) * t_1)); tmp = 0.0; if (t1 <= -1.22e+97) tmp = -1.0 / ((t1 + u) / v); elseif (t1 <= -1.86e-149) tmp = t_2; elseif (t1 <= 1.72e-125) tmp = (t1 * (v / -u)) / u; elseif (t1 <= 1.75e+129) tmp = t_2; else tmp = v / t_1; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-t1) - u), $MachinePrecision]}, Block[{t$95$2 = N[(t1 * N[(v / N[(N[(t1 + u), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -1.22e+97], N[(-1.0 / N[(N[(t1 + u), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, -1.86e-149], t$95$2, If[LessEqual[t1, 1.72e-125], N[(N[(t1 * N[(v / (-u)), $MachinePrecision]), $MachinePrecision] / u), $MachinePrecision], If[LessEqual[t1, 1.75e+129], t$95$2, N[(v / t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-t1\right) - u\\
t_2 := t1 \cdot \frac{v}{\left(t1 + u\right) \cdot t\_1}\\
\mathbf{if}\;t1 \leq -1.22 \cdot 10^{+97}:\\
\;\;\;\;\frac{-1}{\frac{t1 + u}{v}}\\
\mathbf{elif}\;t1 \leq -1.86 \cdot 10^{-149}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t1 \leq 1.72 \cdot 10^{-125}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{-u}}{u}\\
\mathbf{elif}\;t1 \leq 1.75 \cdot 10^{+129}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{t\_1}\\
\end{array}
\end{array}
if t1 < -1.21999999999999997e97Initial program 48.7%
times-frac100.0%
distribute-frac-neg100.0%
distribute-neg-frac2100.0%
+-commutative100.0%
distribute-neg-in100.0%
unsub-neg100.0%
Simplified100.0%
clear-num99.7%
inv-pow99.7%
Applied egg-rr99.7%
unpow-199.7%
Simplified99.7%
Taylor expanded in t1 around inf 92.7%
if -1.21999999999999997e97 < t1 < -1.8600000000000001e-149 or 1.72000000000000013e-125 < t1 < 1.7499999999999999e129Initial program 85.5%
associate-/l*88.7%
Simplified88.7%
if -1.8600000000000001e-149 < t1 < 1.72000000000000013e-125Initial program 80.7%
associate-/l*75.9%
Simplified75.9%
associate-*r/80.7%
times-frac94.8%
frac-2neg94.8%
+-commutative94.8%
distribute-neg-in94.8%
sub-neg94.8%
associate-*r/94.8%
add-sqr-sqrt48.1%
sqrt-unprod43.5%
sqr-neg43.5%
sqrt-unprod20.2%
add-sqr-sqrt38.8%
sub-neg38.8%
+-commutative38.8%
add-sqr-sqrt18.6%
sqrt-unprod40.7%
sqr-neg40.7%
sqrt-unprod23.8%
add-sqr-sqrt11.1%
sqrt-unprod31.0%
sqr-neg31.0%
sqrt-unprod23.1%
Applied egg-rr94.8%
Taylor expanded in t1 around 0 80.8%
mul-1-neg80.8%
associate-/l*89.5%
distribute-lft-neg-in89.5%
Simplified89.5%
Taylor expanded in t1 around 0 93.1%
if 1.7499999999999999e129 < t1 Initial program 51.4%
associate-/l*54.9%
Simplified54.9%
associate-*r/51.4%
times-frac99.9%
frac-2neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*r/99.9%
add-sqr-sqrt0.0%
sqrt-unprod11.8%
sqr-neg11.8%
sqrt-unprod45.8%
add-sqr-sqrt45.8%
sub-neg45.8%
+-commutative45.8%
add-sqr-sqrt0.0%
sqrt-unprod56.9%
sqr-neg56.9%
sqrt-unprod87.5%
add-sqr-sqrt42.6%
sqrt-unprod85.3%
sqr-neg85.3%
sqrt-unprod52.9%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 86.0%
mul-1-neg86.0%
Simplified86.0%
Final simplification89.9%
(FPCore (u v t1)
:precision binary64
(if (<= t1 -1.22e+97)
(/ -1.0 (/ (+ t1 u) v))
(if (<= t1 1.6e+188)
(* (- t1) (/ (/ v (+ t1 u)) (+ t1 u)))
(/ v (- u t1)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1.22e+97) {
tmp = -1.0 / ((t1 + u) / v);
} else if (t1 <= 1.6e+188) {
tmp = -t1 * ((v / (t1 + u)) / (t1 + u));
} else {
tmp = v / (u - t1);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (t1 <= (-1.22d+97)) then
tmp = (-1.0d0) / ((t1 + u) / v)
else if (t1 <= 1.6d+188) then
tmp = -t1 * ((v / (t1 + u)) / (t1 + u))
else
tmp = v / (u - t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1.22e+97) {
tmp = -1.0 / ((t1 + u) / v);
} else if (t1 <= 1.6e+188) {
tmp = -t1 * ((v / (t1 + u)) / (t1 + u));
} else {
tmp = v / (u - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -1.22e+97: tmp = -1.0 / ((t1 + u) / v) elif t1 <= 1.6e+188: tmp = -t1 * ((v / (t1 + u)) / (t1 + u)) else: tmp = v / (u - t1) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -1.22e+97) tmp = Float64(-1.0 / Float64(Float64(t1 + u) / v)); elseif (t1 <= 1.6e+188) tmp = Float64(Float64(-t1) * Float64(Float64(v / Float64(t1 + u)) / Float64(t1 + u))); else tmp = Float64(v / Float64(u - t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -1.22e+97) tmp = -1.0 / ((t1 + u) / v); elseif (t1 <= 1.6e+188) tmp = -t1 * ((v / (t1 + u)) / (t1 + u)); else tmp = v / (u - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -1.22e+97], N[(-1.0 / N[(N[(t1 + u), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 1.6e+188], N[((-t1) * N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.22 \cdot 10^{+97}:\\
\;\;\;\;\frac{-1}{\frac{t1 + u}{v}}\\
\mathbf{elif}\;t1 \leq 1.6 \cdot 10^{+188}:\\
\;\;\;\;\left(-t1\right) \cdot \frac{\frac{v}{t1 + u}}{t1 + u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u - t1}\\
\end{array}
\end{array}
if t1 < -1.21999999999999997e97Initial program 48.7%
times-frac100.0%
distribute-frac-neg100.0%
distribute-neg-frac2100.0%
+-commutative100.0%
distribute-neg-in100.0%
unsub-neg100.0%
Simplified100.0%
clear-num99.7%
inv-pow99.7%
Applied egg-rr99.7%
unpow-199.7%
Simplified99.7%
Taylor expanded in t1 around inf 92.7%
if -1.21999999999999997e97 < t1 < 1.59999999999999985e188Initial program 80.4%
associate-/l*81.4%
Simplified81.4%
associate-/r*92.6%
div-inv92.5%
Applied egg-rr92.5%
associate-*r/92.6%
*-rgt-identity92.6%
Simplified92.6%
if 1.59999999999999985e188 < t1 Initial program 45.5%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
clear-num98.8%
inv-pow98.8%
Applied egg-rr98.8%
unpow-198.8%
Simplified98.8%
Taylor expanded in t1 around inf 91.0%
add-sqr-sqrt65.9%
sqrt-unprod63.4%
clear-num63.5%
mul-1-neg63.5%
clear-num63.5%
mul-1-neg63.5%
sqr-neg63.5%
sqrt-unprod45.9%
add-sqr-sqrt46.7%
frac-2neg46.7%
distribute-neg-in46.7%
add-sqr-sqrt0.0%
sqrt-unprod47.6%
sqr-neg47.6%
sqrt-unprod91.9%
add-sqr-sqrt92.3%
sub-neg92.3%
Applied egg-rr92.3%
Final simplification92.6%
(FPCore (u v t1) :precision binary64 (if (or (<= u -7.2e-30) (not (<= u 3.2e+109))) (/ (/ t1 (/ (- t1 u) v)) u) (/ (* t1 (/ v (- (- t1) u))) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -7.2e-30) || !(u <= 3.2e+109)) {
tmp = (t1 / ((t1 - u) / v)) / u;
} else {
tmp = (t1 * (v / (-t1 - 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 <= (-7.2d-30)) .or. (.not. (u <= 3.2d+109))) then
tmp = (t1 / ((t1 - u) / v)) / u
else
tmp = (t1 * (v / (-t1 - u))) / t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -7.2e-30) || !(u <= 3.2e+109)) {
tmp = (t1 / ((t1 - u) / v)) / u;
} else {
tmp = (t1 * (v / (-t1 - u))) / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -7.2e-30) or not (u <= 3.2e+109): tmp = (t1 / ((t1 - u) / v)) / u else: tmp = (t1 * (v / (-t1 - u))) / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -7.2e-30) || !(u <= 3.2e+109)) tmp = Float64(Float64(t1 / Float64(Float64(t1 - u) / v)) / u); else tmp = Float64(Float64(t1 * Float64(v / Float64(Float64(-t1) - u))) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -7.2e-30) || ~((u <= 3.2e+109))) tmp = (t1 / ((t1 - u) / v)) / u; else tmp = (t1 * (v / (-t1 - u))) / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -7.2e-30], N[Not[LessEqual[u, 3.2e+109]], $MachinePrecision]], N[(N[(t1 / N[(N[(t1 - u), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision] / u), $MachinePrecision], N[(N[(t1 * N[(v / N[((-t1) - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -7.2 \cdot 10^{-30} \lor \neg \left(u \leq 3.2 \cdot 10^{+109}\right):\\
\;\;\;\;\frac{\frac{t1}{\frac{t1 - u}{v}}}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{\left(-t1\right) - u}}{t1}\\
\end{array}
\end{array}
if u < -7.2000000000000006e-30 or 3.2000000000000001e109 < u Initial program 73.7%
associate-/l*72.6%
Simplified72.6%
associate-*r/73.7%
times-frac97.2%
frac-2neg97.2%
+-commutative97.2%
distribute-neg-in97.2%
sub-neg97.2%
associate-*r/97.3%
add-sqr-sqrt53.9%
sqrt-unprod62.6%
sqr-neg62.6%
sqrt-unprod28.0%
add-sqr-sqrt57.1%
sub-neg57.1%
+-commutative57.1%
add-sqr-sqrt29.1%
sqrt-unprod57.4%
sqr-neg57.4%
sqrt-unprod31.7%
add-sqr-sqrt17.8%
sqrt-unprod32.6%
sqr-neg32.6%
sqrt-unprod19.1%
Applied egg-rr97.3%
Taylor expanded in v around 0 86.5%
mul-1-neg86.5%
associate-/l*99.8%
distribute-lft-neg-out99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t1 around 0 86.8%
clear-num87.4%
frac-2neg87.4%
metadata-eval87.4%
associate-*l/87.5%
add-sqr-sqrt46.2%
sqrt-unprod60.8%
sqr-neg60.8%
sqrt-unprod28.0%
add-sqr-sqrt57.2%
neg-mul-157.2%
add-sqr-sqrt29.3%
sqrt-unprod53.2%
sqr-neg53.2%
sqrt-unprod41.1%
add-sqr-sqrt87.5%
distribute-neg-frac87.5%
distribute-neg-in87.5%
add-sqr-sqrt46.3%
sqrt-unprod83.2%
sqr-neg83.2%
sqrt-unprod41.1%
add-sqr-sqrt87.3%
sub-neg87.3%
Applied egg-rr87.3%
if -7.2000000000000006e-30 < u < 3.2000000000000001e109Initial program 68.8%
associate-/l*70.5%
Simplified70.5%
associate-*r/68.8%
times-frac99.9%
frac-2neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*r/99.9%
add-sqr-sqrt55.3%
sqrt-unprod38.7%
sqr-neg38.7%
sqrt-unprod9.5%
add-sqr-sqrt18.3%
sub-neg18.3%
+-commutative18.3%
add-sqr-sqrt8.8%
sqrt-unprod34.7%
sqr-neg34.7%
sqrt-unprod33.4%
add-sqr-sqrt17.0%
sqrt-unprod38.7%
sqr-neg38.7%
sqrt-unprod23.0%
Applied egg-rr99.9%
Taylor expanded in v around 0 76.4%
mul-1-neg76.4%
associate-/l*99.9%
distribute-lft-neg-out99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in t1 around inf 82.4%
Final simplification84.5%
(FPCore (u v t1)
:precision binary64
(if (<= u -1.5e-29)
(/ (* t1 (/ v (+ t1 u))) (- u))
(if (<= u 1.15e+110)
(/ (* t1 (/ v (- (- t1) u))) t1)
(/ (/ t1 (/ (- t1 u) v)) u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.5e-29) {
tmp = (t1 * (v / (t1 + u))) / -u;
} else if (u <= 1.15e+110) {
tmp = (t1 * (v / (-t1 - u))) / t1;
} else {
tmp = (t1 / ((t1 - u) / v)) / u;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-1.5d-29)) then
tmp = (t1 * (v / (t1 + u))) / -u
else if (u <= 1.15d+110) then
tmp = (t1 * (v / (-t1 - u))) / t1
else
tmp = (t1 / ((t1 - u) / v)) / u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -1.5e-29) {
tmp = (t1 * (v / (t1 + u))) / -u;
} else if (u <= 1.15e+110) {
tmp = (t1 * (v / (-t1 - u))) / t1;
} else {
tmp = (t1 / ((t1 - u) / v)) / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.5e-29: tmp = (t1 * (v / (t1 + u))) / -u elif u <= 1.15e+110: tmp = (t1 * (v / (-t1 - u))) / t1 else: tmp = (t1 / ((t1 - u) / v)) / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.5e-29) tmp = Float64(Float64(t1 * Float64(v / Float64(t1 + u))) / Float64(-u)); elseif (u <= 1.15e+110) tmp = Float64(Float64(t1 * Float64(v / Float64(Float64(-t1) - u))) / t1); else tmp = Float64(Float64(t1 / Float64(Float64(t1 - u) / v)) / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -1.5e-29) tmp = (t1 * (v / (t1 + u))) / -u; elseif (u <= 1.15e+110) tmp = (t1 * (v / (-t1 - u))) / t1; else tmp = (t1 / ((t1 - u) / v)) / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.5e-29], N[(N[(t1 * N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision], If[LessEqual[u, 1.15e+110], N[(N[(t1 * N[(v / N[((-t1) - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t1), $MachinePrecision], N[(N[(t1 / N[(N[(t1 - u), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision] / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.5 \cdot 10^{-29}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{t1 + u}}{-u}\\
\mathbf{elif}\;u \leq 1.15 \cdot 10^{+110}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{\left(-t1\right) - u}}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t1}{\frac{t1 - u}{v}}}{u}\\
\end{array}
\end{array}
if u < -1.5000000000000001e-29Initial program 75.0%
associate-/l*75.5%
Simplified75.5%
associate-*r/75.0%
times-frac95.3%
frac-2neg95.3%
+-commutative95.3%
distribute-neg-in95.3%
sub-neg95.3%
associate-*r/95.4%
add-sqr-sqrt53.0%
sqrt-unprod64.5%
sqr-neg64.5%
sqrt-unprod29.7%
add-sqr-sqrt55.1%
sub-neg55.1%
+-commutative55.1%
add-sqr-sqrt25.4%
sqrt-unprod55.3%
sqr-neg55.3%
sqrt-unprod31.2%
add-sqr-sqrt31.2%
sqrt-unprod31.3%
sqr-neg31.3%
sqrt-unprod0.0%
Applied egg-rr95.4%
Taylor expanded in v around 0 88.9%
mul-1-neg88.9%
associate-/l*99.9%
distribute-lft-neg-out99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in t1 around 0 89.3%
if -1.5000000000000001e-29 < u < 1.15e110Initial program 68.8%
associate-/l*70.5%
Simplified70.5%
associate-*r/68.8%
times-frac99.9%
frac-2neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*r/99.9%
add-sqr-sqrt55.3%
sqrt-unprod38.7%
sqr-neg38.7%
sqrt-unprod9.5%
add-sqr-sqrt18.3%
sub-neg18.3%
+-commutative18.3%
add-sqr-sqrt8.8%
sqrt-unprod34.7%
sqr-neg34.7%
sqrt-unprod33.4%
add-sqr-sqrt17.0%
sqrt-unprod38.7%
sqr-neg38.7%
sqrt-unprod23.0%
Applied egg-rr99.9%
Taylor expanded in v around 0 76.4%
mul-1-neg76.4%
associate-/l*99.9%
distribute-lft-neg-out99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in t1 around inf 82.4%
if 1.15e110 < u Initial program 71.9%
associate-/l*68.7%
Simplified68.7%
associate-*r/71.9%
times-frac99.8%
frac-2neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
sub-neg99.8%
associate-*r/99.8%
add-sqr-sqrt55.1%
sqrt-unprod60.3%
sqr-neg60.3%
sqrt-unprod25.8%
add-sqr-sqrt59.8%
sub-neg59.8%
+-commutative59.8%
add-sqr-sqrt34.0%
sqrt-unprod60.2%
sqr-neg60.2%
sqrt-unprod32.4%
add-sqr-sqrt0.0%
sqrt-unprod34.2%
sqr-neg34.2%
sqrt-unprod44.4%
Applied egg-rr99.8%
Taylor expanded in v around 0 83.3%
mul-1-neg83.3%
associate-/l*99.8%
distribute-lft-neg-out99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t1 around 0 83.6%
clear-num85.1%
frac-2neg85.1%
metadata-eval85.1%
associate-*l/85.1%
add-sqr-sqrt47.0%
sqrt-unprod58.0%
sqr-neg58.0%
sqrt-unprod25.8%
add-sqr-sqrt60.3%
neg-mul-160.3%
add-sqr-sqrt34.5%
sqrt-unprod51.5%
sqr-neg51.5%
sqrt-unprod38.1%
add-sqr-sqrt85.1%
distribute-neg-frac85.1%
distribute-neg-in85.1%
add-sqr-sqrt47.0%
sqrt-unprod79.3%
sqr-neg79.3%
sqrt-unprod37.9%
add-sqr-sqrt85.3%
sub-neg85.3%
Applied egg-rr85.3%
Final simplification84.6%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.38e-33) (not (<= u 2800000000.0))) (/ (/ t1 (/ (- t1 u) v)) u) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.38e-33) || !(u <= 2800000000.0)) {
tmp = (t1 / ((t1 - u) / 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.38d-33)) .or. (.not. (u <= 2800000000.0d0))) then
tmp = (t1 / ((t1 - u) / 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.38e-33) || !(u <= 2800000000.0)) {
tmp = (t1 / ((t1 - u) / v)) / u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.38e-33) or not (u <= 2800000000.0): tmp = (t1 / ((t1 - u) / v)) / u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.38e-33) || !(u <= 2800000000.0)) tmp = Float64(Float64(t1 / Float64(Float64(t1 - u) / v)) / u); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -1.38e-33) || ~((u <= 2800000000.0))) tmp = (t1 / ((t1 - u) / v)) / u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.38e-33], N[Not[LessEqual[u, 2800000000.0]], $MachinePrecision]], N[(N[(t1 / N[(N[(t1 - u), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision] / u), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.38 \cdot 10^{-33} \lor \neg \left(u \leq 2800000000\right):\\
\;\;\;\;\frac{\frac{t1}{\frac{t1 - u}{v}}}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -1.38e-33 or 2.8e9 < u Initial program 74.3%
associate-/l*73.9%
Simplified73.9%
associate-*r/74.3%
times-frac97.7%
frac-2neg97.7%
+-commutative97.7%
distribute-neg-in97.7%
sub-neg97.7%
associate-*r/97.7%
add-sqr-sqrt55.5%
sqrt-unprod63.0%
sqr-neg63.0%
sqrt-unprod25.7%
add-sqr-sqrt52.4%
sub-neg52.4%
+-commutative52.4%
add-sqr-sqrt26.7%
sqrt-unprod52.7%
sqr-neg52.7%
sqrt-unprod28.8%
add-sqr-sqrt15.5%
sqrt-unprod33.2%
sqr-neg33.2%
sqrt-unprod21.2%
Applied egg-rr97.7%
Taylor expanded in v around 0 85.8%
mul-1-neg85.8%
associate-/l*99.8%
distribute-lft-neg-out99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t1 around 0 82.3%
clear-num82.8%
frac-2neg82.8%
metadata-eval82.8%
associate-*l/82.8%
add-sqr-sqrt42.4%
sqrt-unprod56.9%
sqr-neg56.9%
sqrt-unprod25.7%
add-sqr-sqrt52.8%
neg-mul-152.8%
add-sqr-sqrt27.1%
sqrt-unprod52.3%
sqr-neg52.3%
sqrt-unprod40.3%
add-sqr-sqrt82.8%
distribute-neg-frac82.8%
distribute-neg-in82.8%
add-sqr-sqrt42.5%
sqrt-unprod79.3%
sqr-neg79.3%
sqrt-unprod40.3%
add-sqr-sqrt83.0%
sub-neg83.0%
Applied egg-rr83.0%
if -1.38e-33 < u < 2.8e9Initial program 67.2%
associate-/l*68.8%
Simplified68.8%
Taylor expanded in t1 around inf 85.6%
associate-*r/85.6%
neg-mul-185.6%
Simplified85.6%
Final simplification84.3%
(FPCore (u v t1) :precision binary64 (if (or (<= u -3.6e-34) (not (<= u 1100000000.0))) (/ (* t1 (/ v (- u))) u) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.6e-34) || !(u <= 1100000000.0)) {
tmp = (t1 * (v / -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 <= (-3.6d-34)) .or. (.not. (u <= 1100000000.0d0))) then
tmp = (t1 * (v / -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 <= -3.6e-34) || !(u <= 1100000000.0)) {
tmp = (t1 * (v / -u)) / u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -3.6e-34) or not (u <= 1100000000.0): tmp = (t1 * (v / -u)) / u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -3.6e-34) || !(u <= 1100000000.0)) tmp = Float64(Float64(t1 * Float64(v / Float64(-u))) / u); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -3.6e-34) || ~((u <= 1100000000.0))) tmp = (t1 * (v / -u)) / u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -3.6e-34], N[Not[LessEqual[u, 1100000000.0]], $MachinePrecision]], N[(N[(t1 * N[(v / (-u)), $MachinePrecision]), $MachinePrecision] / u), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.6 \cdot 10^{-34} \lor \neg \left(u \leq 1100000000\right):\\
\;\;\;\;\frac{t1 \cdot \frac{v}{-u}}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -3.60000000000000008e-34 or 1.1e9 < u Initial program 74.3%
associate-/l*73.9%
Simplified73.9%
associate-*r/74.3%
times-frac97.7%
frac-2neg97.7%
+-commutative97.7%
distribute-neg-in97.7%
sub-neg97.7%
associate-*r/97.7%
add-sqr-sqrt55.5%
sqrt-unprod63.0%
sqr-neg63.0%
sqrt-unprod25.7%
add-sqr-sqrt52.4%
sub-neg52.4%
+-commutative52.4%
add-sqr-sqrt26.7%
sqrt-unprod52.7%
sqr-neg52.7%
sqrt-unprod28.8%
add-sqr-sqrt15.5%
sqrt-unprod33.2%
sqr-neg33.2%
sqrt-unprod21.2%
Applied egg-rr97.7%
Taylor expanded in t1 around 0 77.0%
mul-1-neg77.0%
associate-/l*81.5%
distribute-lft-neg-in81.5%
Simplified81.5%
Taylor expanded in t1 around 0 81.7%
if -3.60000000000000008e-34 < u < 1.1e9Initial program 67.2%
associate-/l*68.8%
Simplified68.8%
Taylor expanded in t1 around inf 85.6%
associate-*r/85.6%
neg-mul-185.6%
Simplified85.6%
Final simplification83.6%
(FPCore (u v t1) :precision binary64 (if (<= t1 -0.0009) (/ -1.0 (/ (- t1 u) v)) (if (<= t1 2.25e-38) (/ (* v (/ t1 (- u))) u) (/ v (- (- t1) u)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -0.0009) {
tmp = -1.0 / ((t1 - u) / v);
} else if (t1 <= 2.25e-38) {
tmp = (v * (t1 / -u)) / u;
} else {
tmp = v / (-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.0009d0)) then
tmp = (-1.0d0) / ((t1 - u) / v)
else if (t1 <= 2.25d-38) then
tmp = (v * (t1 / -u)) / u
else
tmp = v / (-t1 - u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -0.0009) {
tmp = -1.0 / ((t1 - u) / v);
} else if (t1 <= 2.25e-38) {
tmp = (v * (t1 / -u)) / u;
} else {
tmp = v / (-t1 - u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -0.0009: tmp = -1.0 / ((t1 - u) / v) elif t1 <= 2.25e-38: tmp = (v * (t1 / -u)) / u else: tmp = v / (-t1 - u) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -0.0009) tmp = Float64(-1.0 / Float64(Float64(t1 - u) / v)); elseif (t1 <= 2.25e-38) tmp = Float64(Float64(v * Float64(t1 / Float64(-u))) / u); else tmp = Float64(v / Float64(Float64(-t1) - u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -0.0009) tmp = -1.0 / ((t1 - u) / v); elseif (t1 <= 2.25e-38) tmp = (v * (t1 / -u)) / u; else tmp = v / (-t1 - u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -0.0009], N[(-1.0 / N[(N[(t1 - u), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 2.25e-38], N[(N[(v * N[(t1 / (-u)), $MachinePrecision]), $MachinePrecision] / u), $MachinePrecision], N[(v / N[((-t1) - u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -0.0009:\\
\;\;\;\;\frac{-1}{\frac{t1 - u}{v}}\\
\mathbf{elif}\;t1 \leq 2.25 \cdot 10^{-38}:\\
\;\;\;\;\frac{v \cdot \frac{t1}{-u}}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{\left(-t1\right) - u}\\
\end{array}
\end{array}
if t1 < -8.9999999999999998e-4Initial program 61.6%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
clear-num99.6%
inv-pow99.6%
Applied egg-rr99.6%
unpow-199.6%
Simplified99.6%
Taylor expanded in t1 around inf 84.7%
add-sqr-sqrt51.3%
sqrt-unprod43.1%
clear-num43.1%
mul-1-neg43.1%
clear-num43.1%
mul-1-neg43.1%
sqr-neg43.1%
sqrt-unprod20.9%
add-sqr-sqrt22.1%
clear-num22.7%
frac-2neg22.7%
metadata-eval22.7%
distribute-neg-frac22.7%
distribute-neg-in22.7%
add-sqr-sqrt22.7%
sqrt-unprod24.3%
sqr-neg24.3%
sqrt-unprod0.0%
add-sqr-sqrt84.6%
sub-neg84.6%
Applied egg-rr84.6%
if -8.9999999999999998e-4 < t1 < 2.25000000000000004e-38Initial program 84.8%
associate-/l*84.7%
Simplified84.7%
associate-*r/84.8%
times-frac96.9%
frac-2neg96.9%
+-commutative96.9%
distribute-neg-in96.9%
sub-neg96.9%
associate-*r/96.9%
add-sqr-sqrt61.6%
sqrt-unprod61.3%
sqr-neg61.3%
sqrt-unprod13.9%
add-sqr-sqrt39.1%
sub-neg39.1%
+-commutative39.1%
add-sqr-sqrt25.3%
sqrt-unprod42.3%
sqr-neg42.3%
sqrt-unprod18.0%
add-sqr-sqrt10.6%
sqrt-unprod25.1%
sqr-neg25.1%
sqrt-unprod16.4%
Applied egg-rr96.9%
Taylor expanded in v around 0 90.2%
mul-1-neg90.2%
associate-/l*99.8%
distribute-lft-neg-out99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t1 around 0 80.7%
Taylor expanded in t1 around 0 79.7%
mul-1-neg79.7%
distribute-frac-neg279.7%
*-commutative79.7%
associate-/l*82.0%
distribute-frac-neg282.0%
mul-1-neg82.0%
associate-*r/82.0%
neg-mul-182.0%
Simplified82.0%
if 2.25000000000000004e-38 < t1 Initial program 63.1%
associate-/l*66.0%
Simplified66.0%
associate-*r/63.1%
times-frac99.9%
frac-2neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*r/99.9%
add-sqr-sqrt0.0%
sqrt-unprod19.3%
sqr-neg19.3%
sqrt-unprod39.8%
add-sqr-sqrt39.8%
sub-neg39.8%
+-commutative39.8%
add-sqr-sqrt0.0%
sqrt-unprod66.6%
sqr-neg66.6%
sqrt-unprod84.9%
add-sqr-sqrt43.7%
sqrt-unprod87.4%
sqr-neg87.4%
sqrt-unprod49.7%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 77.1%
mul-1-neg77.1%
Simplified77.1%
Final simplification81.4%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.45e+182) (not (<= u 2.15e+202))) (* (/ v u) (/ t1 u)) (/ -1.0 (/ (- t1 u) v))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.45e+182) || !(u <= 2.15e+202)) {
tmp = (v / u) * (t1 / u);
} else {
tmp = -1.0 / ((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.45d+182)) .or. (.not. (u <= 2.15d+202))) then
tmp = (v / u) * (t1 / u)
else
tmp = (-1.0d0) / ((t1 - u) / v)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.45e+182) || !(u <= 2.15e+202)) {
tmp = (v / u) * (t1 / u);
} else {
tmp = -1.0 / ((t1 - u) / v);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.45e+182) or not (u <= 2.15e+202): tmp = (v / u) * (t1 / u) else: tmp = -1.0 / ((t1 - u) / v) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.45e+182) || !(u <= 2.15e+202)) tmp = Float64(Float64(v / u) * Float64(t1 / u)); else tmp = Float64(-1.0 / Float64(Float64(t1 - u) / v)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -1.45e+182) || ~((u <= 2.15e+202))) tmp = (v / u) * (t1 / u); else tmp = -1.0 / ((t1 - u) / v); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.45e+182], N[Not[LessEqual[u, 2.15e+202]], $MachinePrecision]], N[(N[(v / u), $MachinePrecision] * N[(t1 / u), $MachinePrecision]), $MachinePrecision], N[(-1.0 / N[(N[(t1 - u), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.45 \cdot 10^{+182} \lor \neg \left(u \leq 2.15 \cdot 10^{+202}\right):\\
\;\;\;\;\frac{v}{u} \cdot \frac{t1}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\frac{t1 - u}{v}}\\
\end{array}
\end{array}
if u < -1.4499999999999999e182 or 2.1500000000000001e202 < u Initial program 72.8%
associate-/l*73.5%
Simplified73.5%
associate-*r/72.8%
times-frac98.2%
frac-2neg98.2%
+-commutative98.2%
distribute-neg-in98.2%
sub-neg98.2%
associate-*r/98.2%
add-sqr-sqrt56.0%
sqrt-unprod70.8%
sqr-neg70.8%
sqrt-unprod30.1%
add-sqr-sqrt73.0%
sub-neg73.0%
+-commutative73.0%
add-sqr-sqrt42.9%
sqrt-unprod73.2%
sqr-neg73.2%
sqrt-unprod30.5%
add-sqr-sqrt16.2%
sqrt-unprod30.4%
sqr-neg30.4%
sqrt-unprod19.2%
Applied egg-rr98.2%
Taylor expanded in t1 around 0 84.7%
mul-1-neg84.7%
associate-/l*94.9%
distribute-lft-neg-in94.9%
Simplified94.9%
Taylor expanded in t1 around 0 95.0%
*-commutative95.0%
associate-/l*93.4%
add-sqr-sqrt52.8%
sqrt-unprod70.7%
sqr-neg70.7%
sqrt-unprod28.9%
add-sqr-sqrt71.8%
Applied egg-rr71.8%
if -1.4499999999999999e182 < u < 2.1500000000000001e202Initial program 70.3%
times-frac98.9%
distribute-frac-neg98.9%
distribute-neg-frac298.9%
+-commutative98.9%
distribute-neg-in98.9%
unsub-neg98.9%
Simplified98.9%
clear-num98.7%
inv-pow98.7%
Applied egg-rr98.7%
unpow-198.7%
Simplified98.7%
Taylor expanded in t1 around inf 71.4%
add-sqr-sqrt43.6%
sqrt-unprod39.5%
clear-num39.6%
mul-1-neg39.6%
clear-num39.6%
mul-1-neg39.6%
sqr-neg39.6%
sqrt-unprod17.4%
add-sqr-sqrt19.1%
clear-num19.3%
frac-2neg19.3%
metadata-eval19.3%
distribute-neg-frac19.3%
distribute-neg-in19.3%
add-sqr-sqrt8.2%
sqrt-unprod31.5%
sqr-neg31.5%
sqrt-unprod30.7%
add-sqr-sqrt71.8%
sub-neg71.8%
Applied egg-rr71.8%
Final simplification71.8%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.18e+182) (not (<= u 2.35e+202))) (* (/ v u) (/ t1 u)) (/ v (- u t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.18e+182) || !(u <= 2.35e+202)) {
tmp = (v / u) * (t1 / u);
} else {
tmp = v / (u - t1);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-1.18d+182)) .or. (.not. (u <= 2.35d+202))) then
tmp = (v / u) * (t1 / u)
else
tmp = v / (u - t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.18e+182) || !(u <= 2.35e+202)) {
tmp = (v / u) * (t1 / u);
} else {
tmp = v / (u - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.18e+182) or not (u <= 2.35e+202): tmp = (v / u) * (t1 / u) else: tmp = v / (u - t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.18e+182) || !(u <= 2.35e+202)) tmp = Float64(Float64(v / u) * Float64(t1 / u)); else tmp = Float64(v / Float64(u - t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -1.18e+182) || ~((u <= 2.35e+202))) tmp = (v / u) * (t1 / u); else tmp = v / (u - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.18e+182], N[Not[LessEqual[u, 2.35e+202]], $MachinePrecision]], N[(N[(v / u), $MachinePrecision] * N[(t1 / u), $MachinePrecision]), $MachinePrecision], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.18 \cdot 10^{+182} \lor \neg \left(u \leq 2.35 \cdot 10^{+202}\right):\\
\;\;\;\;\frac{v}{u} \cdot \frac{t1}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u - t1}\\
\end{array}
\end{array}
if u < -1.1799999999999999e182 or 2.3500000000000001e202 < u Initial program 72.8%
associate-/l*73.5%
Simplified73.5%
associate-*r/72.8%
times-frac98.2%
frac-2neg98.2%
+-commutative98.2%
distribute-neg-in98.2%
sub-neg98.2%
associate-*r/98.2%
add-sqr-sqrt56.0%
sqrt-unprod70.8%
sqr-neg70.8%
sqrt-unprod30.1%
add-sqr-sqrt73.0%
sub-neg73.0%
+-commutative73.0%
add-sqr-sqrt42.9%
sqrt-unprod73.2%
sqr-neg73.2%
sqrt-unprod30.5%
add-sqr-sqrt16.2%
sqrt-unprod30.4%
sqr-neg30.4%
sqrt-unprod19.2%
Applied egg-rr98.2%
Taylor expanded in t1 around 0 84.7%
mul-1-neg84.7%
associate-/l*94.9%
distribute-lft-neg-in94.9%
Simplified94.9%
Taylor expanded in t1 around 0 95.0%
*-commutative95.0%
associate-/l*93.4%
add-sqr-sqrt52.8%
sqrt-unprod70.7%
sqr-neg70.7%
sqrt-unprod28.9%
add-sqr-sqrt71.8%
Applied egg-rr71.8%
if -1.1799999999999999e182 < u < 2.3500000000000001e202Initial program 70.3%
times-frac98.9%
distribute-frac-neg98.9%
distribute-neg-frac298.9%
+-commutative98.9%
distribute-neg-in98.9%
unsub-neg98.9%
Simplified98.9%
clear-num98.7%
inv-pow98.7%
Applied egg-rr98.7%
unpow-198.7%
Simplified98.7%
Taylor expanded in t1 around inf 71.4%
add-sqr-sqrt43.6%
sqrt-unprod39.5%
clear-num39.6%
mul-1-neg39.6%
clear-num39.6%
mul-1-neg39.6%
sqr-neg39.6%
sqrt-unprod17.4%
add-sqr-sqrt19.1%
frac-2neg19.1%
distribute-neg-in19.1%
add-sqr-sqrt8.2%
sqrt-unprod31.3%
sqr-neg31.3%
sqrt-unprod30.5%
add-sqr-sqrt71.8%
sub-neg71.8%
Applied egg-rr71.8%
Final simplification71.8%
(FPCore (u v t1) :precision binary64 (if (<= u -1.65e+182) (* (/ v u) (/ t1 u)) (if (<= u 2.2e+202) (/ -1.0 (/ (- t1 u) v)) (/ (* t1 (/ v u)) u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.65e+182) {
tmp = (v / u) * (t1 / u);
} else if (u <= 2.2e+202) {
tmp = -1.0 / ((t1 - u) / v);
} else {
tmp = (t1 * (v / u)) / u;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-1.65d+182)) then
tmp = (v / u) * (t1 / u)
else if (u <= 2.2d+202) then
tmp = (-1.0d0) / ((t1 - u) / v)
else
tmp = (t1 * (v / u)) / u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -1.65e+182) {
tmp = (v / u) * (t1 / u);
} else if (u <= 2.2e+202) {
tmp = -1.0 / ((t1 - u) / v);
} else {
tmp = (t1 * (v / u)) / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.65e+182: tmp = (v / u) * (t1 / u) elif u <= 2.2e+202: tmp = -1.0 / ((t1 - u) / v) else: tmp = (t1 * (v / u)) / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.65e+182) tmp = Float64(Float64(v / u) * Float64(t1 / u)); elseif (u <= 2.2e+202) tmp = Float64(-1.0 / Float64(Float64(t1 - u) / v)); else tmp = Float64(Float64(t1 * Float64(v / u)) / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -1.65e+182) tmp = (v / u) * (t1 / u); elseif (u <= 2.2e+202) tmp = -1.0 / ((t1 - u) / v); else tmp = (t1 * (v / u)) / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.65e+182], N[(N[(v / u), $MachinePrecision] * N[(t1 / u), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 2.2e+202], N[(-1.0 / N[(N[(t1 - u), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision], N[(N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision] / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.65 \cdot 10^{+182}:\\
\;\;\;\;\frac{v}{u} \cdot \frac{t1}{u}\\
\mathbf{elif}\;u \leq 2.2 \cdot 10^{+202}:\\
\;\;\;\;\frac{-1}{\frac{t1 - u}{v}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{u}}{u}\\
\end{array}
\end{array}
if u < -1.65e182Initial program 68.1%
associate-/l*68.7%
Simplified68.7%
associate-*r/68.1%
times-frac96.9%
frac-2neg96.9%
+-commutative96.9%
distribute-neg-in96.9%
sub-neg96.9%
associate-*r/96.8%
add-sqr-sqrt53.1%
sqrt-unprod74.1%
sqr-neg74.1%
sqrt-unprod30.8%
add-sqr-sqrt68.3%
sub-neg68.3%
+-commutative68.3%
add-sqr-sqrt37.5%
sqrt-unprod68.4%
sqr-neg68.4%
sqrt-unprod30.8%
add-sqr-sqrt30.8%
sqrt-unprod31.0%
sqr-neg31.0%
sqrt-unprod0.0%
Applied egg-rr96.8%
Taylor expanded in t1 around 0 86.9%
mul-1-neg86.9%
associate-/l*96.8%
distribute-lft-neg-in96.8%
Simplified96.8%
Taylor expanded in t1 around 0 96.7%
*-commutative96.7%
associate-/l*93.7%
add-sqr-sqrt50.0%
sqrt-unprod74.0%
sqr-neg74.0%
sqrt-unprod30.8%
add-sqr-sqrt68.3%
Applied egg-rr68.3%
if -1.65e182 < u < 2.19999999999999978e202Initial program 70.3%
times-frac98.9%
distribute-frac-neg98.9%
distribute-neg-frac298.9%
+-commutative98.9%
distribute-neg-in98.9%
unsub-neg98.9%
Simplified98.9%
clear-num98.7%
inv-pow98.7%
Applied egg-rr98.7%
unpow-198.7%
Simplified98.7%
Taylor expanded in t1 around inf 71.4%
add-sqr-sqrt43.6%
sqrt-unprod39.5%
clear-num39.6%
mul-1-neg39.6%
clear-num39.6%
mul-1-neg39.6%
sqr-neg39.6%
sqrt-unprod17.4%
add-sqr-sqrt19.1%
clear-num19.3%
frac-2neg19.3%
metadata-eval19.3%
distribute-neg-frac19.3%
distribute-neg-in19.3%
add-sqr-sqrt8.2%
sqrt-unprod31.5%
sqr-neg31.5%
sqrt-unprod30.7%
add-sqr-sqrt71.8%
sub-neg71.8%
Applied egg-rr71.8%
if 2.19999999999999978e202 < u Initial program 78.1%
times-frac99.7%
distribute-frac-neg99.7%
distribute-neg-frac299.7%
+-commutative99.7%
distribute-neg-in99.7%
unsub-neg99.7%
Simplified99.7%
Taylor expanded in t1 around inf 56.3%
Taylor expanded in u around inf 36.4%
+-commutative36.4%
mul-1-neg36.4%
unsub-neg36.4%
associate-/l*36.8%
Simplified36.8%
Taylor expanded in t1 around inf 75.5%
associate-*r/75.7%
Simplified75.7%
(FPCore (u v t1) :precision binary64 (if (<= u -1.08e+204) (/ 1.0 (/ u v)) (if (<= u 2.2e+202) (/ v (- t1)) (/ v (+ t1 u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.08e+204) {
tmp = 1.0 / (u / v);
} else if (u <= 2.2e+202) {
tmp = v / -t1;
} else {
tmp = v / (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 (u <= (-1.08d+204)) then
tmp = 1.0d0 / (u / v)
else if (u <= 2.2d+202) then
tmp = v / -t1
else
tmp = v / (t1 + u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -1.08e+204) {
tmp = 1.0 / (u / v);
} else if (u <= 2.2e+202) {
tmp = v / -t1;
} else {
tmp = v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.08e+204: tmp = 1.0 / (u / v) elif u <= 2.2e+202: tmp = v / -t1 else: tmp = v / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.08e+204) tmp = Float64(1.0 / Float64(u / v)); elseif (u <= 2.2e+202) tmp = Float64(v / Float64(-t1)); else tmp = Float64(v / Float64(t1 + u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -1.08e+204) tmp = 1.0 / (u / v); elseif (u <= 2.2e+202) tmp = v / -t1; else tmp = v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.08e+204], N[(1.0 / N[(u / v), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 2.2e+202], N[(v / (-t1)), $MachinePrecision], N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.08 \cdot 10^{+204}:\\
\;\;\;\;\frac{1}{\frac{u}{v}}\\
\mathbf{elif}\;u \leq 2.2 \cdot 10^{+202}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{t1 + u}\\
\end{array}
\end{array}
if u < -1.08e204Initial program 68.2%
times-frac96.1%
distribute-frac-neg96.1%
distribute-neg-frac296.1%
+-commutative96.1%
distribute-neg-in96.1%
unsub-neg96.1%
Simplified96.1%
Taylor expanded in t1 around inf 57.7%
Taylor expanded in t1 around 0 42.5%
associate-*r/42.5%
mul-1-neg42.5%
Simplified42.5%
add-sqr-sqrt29.1%
sqrt-unprod42.1%
sqr-neg42.1%
sqrt-unprod13.4%
add-sqr-sqrt42.9%
clear-num44.8%
inv-pow44.8%
Applied egg-rr44.8%
unpow-144.8%
Simplified44.8%
if -1.08e204 < u < 2.19999999999999978e202Initial program 70.2%
associate-/l*70.7%
Simplified70.7%
Taylor expanded in t1 around inf 68.1%
associate-*r/68.1%
neg-mul-168.1%
Simplified68.1%
if 2.19999999999999978e202 < u Initial program 78.1%
times-frac99.7%
distribute-frac-neg99.7%
distribute-neg-frac299.7%
+-commutative99.7%
distribute-neg-in99.7%
unsub-neg99.7%
Simplified99.7%
clear-num99.0%
inv-pow99.0%
Applied egg-rr99.0%
unpow-199.0%
Simplified99.0%
Taylor expanded in t1 around inf 41.5%
add-sqr-sqrt40.1%
sqrt-unprod66.0%
clear-num66.0%
mul-1-neg66.0%
clear-num66.0%
mul-1-neg66.0%
sqr-neg66.0%
sqrt-unprod37.6%
add-sqr-sqrt39.2%
Applied egg-rr39.2%
Final simplification62.9%
(FPCore (u v t1) :precision binary64 (if (or (<= u -4e+207) (not (<= u 2.7e+216))) (/ v u) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -4e+207) || !(u <= 2.7e+216)) {
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 <= (-4d+207)) .or. (.not. (u <= 2.7d+216))) 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 <= -4e+207) || !(u <= 2.7e+216)) {
tmp = v / u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -4e+207) or not (u <= 2.7e+216): tmp = v / u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -4e+207) || !(u <= 2.7e+216)) 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 <= -4e+207) || ~((u <= 2.7e+216))) tmp = v / u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -4e+207], N[Not[LessEqual[u, 2.7e+216]], $MachinePrecision]], N[(v / u), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -4 \cdot 10^{+207} \lor \neg \left(u \leq 2.7 \cdot 10^{+216}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -4.0000000000000002e207 or 2.7000000000000001e216 < u Initial program 71.9%
times-frac97.7%
distribute-frac-neg97.7%
distribute-neg-frac297.7%
+-commutative97.7%
distribute-neg-in97.7%
unsub-neg97.7%
Simplified97.7%
Taylor expanded in t1 around inf 53.3%
Taylor expanded in t1 around 0 38.5%
associate-*r/38.5%
mul-1-neg38.5%
Simplified38.5%
div-inv38.5%
add-sqr-sqrt25.9%
sqrt-unprod38.0%
sqr-neg38.0%
sqrt-unprod12.6%
add-sqr-sqrt38.6%
Applied egg-rr38.6%
associate-*r/38.6%
*-rgt-identity38.6%
Simplified38.6%
if -4.0000000000000002e207 < u < 2.7000000000000001e216Initial program 70.6%
associate-/l*71.2%
Simplified71.2%
Taylor expanded in t1 around inf 67.6%
associate-*r/67.6%
neg-mul-167.6%
Simplified67.6%
Final simplification62.6%
(FPCore (u v t1) :precision binary64 (if (<= u -5e+201) (/ 1.0 (/ u v)) (if (<= u 9e+221) (/ v (- t1)) (/ v (- u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -5e+201) {
tmp = 1.0 / (u / v);
} else if (u <= 9e+221) {
tmp = v / -t1;
} else {
tmp = v / -u;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-5d+201)) then
tmp = 1.0d0 / (u / v)
else if (u <= 9d+221) then
tmp = v / -t1
else
tmp = v / -u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -5e+201) {
tmp = 1.0 / (u / v);
} else if (u <= 9e+221) {
tmp = v / -t1;
} else {
tmp = v / -u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -5e+201: tmp = 1.0 / (u / v) elif u <= 9e+221: tmp = v / -t1 else: tmp = v / -u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -5e+201) tmp = Float64(1.0 / Float64(u / v)); elseif (u <= 9e+221) tmp = Float64(v / Float64(-t1)); else tmp = Float64(v / Float64(-u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -5e+201) tmp = 1.0 / (u / v); elseif (u <= 9e+221) tmp = v / -t1; else tmp = v / -u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -5e+201], N[(1.0 / N[(u / v), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 9e+221], N[(v / (-t1)), $MachinePrecision], N[(v / (-u)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -5 \cdot 10^{+201}:\\
\;\;\;\;\frac{1}{\frac{u}{v}}\\
\mathbf{elif}\;u \leq 9 \cdot 10^{+221}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-u}\\
\end{array}
\end{array}
if u < -4.9999999999999995e201Initial program 68.2%
times-frac96.1%
distribute-frac-neg96.1%
distribute-neg-frac296.1%
+-commutative96.1%
distribute-neg-in96.1%
unsub-neg96.1%
Simplified96.1%
Taylor expanded in t1 around inf 57.7%
Taylor expanded in t1 around 0 42.5%
associate-*r/42.5%
mul-1-neg42.5%
Simplified42.5%
add-sqr-sqrt29.1%
sqrt-unprod42.1%
sqr-neg42.1%
sqrt-unprod13.4%
add-sqr-sqrt42.9%
clear-num44.8%
inv-pow44.8%
Applied egg-rr44.8%
unpow-144.8%
Simplified44.8%
if -4.9999999999999995e201 < u < 9.0000000000000004e221Initial program 70.3%
associate-/l*70.8%
Simplified70.8%
Taylor expanded in t1 around inf 67.3%
associate-*r/67.3%
neg-mul-167.3%
Simplified67.3%
if 9.0000000000000004e221 < u Initial program 80.4%
times-frac99.8%
distribute-frac-neg99.8%
distribute-neg-frac299.8%
+-commutative99.8%
distribute-neg-in99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in t1 around inf 50.4%
Taylor expanded in t1 around 0 35.3%
associate-*r/35.3%
mul-1-neg35.3%
Simplified35.3%
Final simplification62.8%
(FPCore (u v t1) :precision binary64 (if (<= u -1.6e+200) (/ v u) (if (<= u 4.1e+218) (/ v (- t1)) (/ v (- u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.6e+200) {
tmp = v / u;
} else if (u <= 4.1e+218) {
tmp = v / -t1;
} else {
tmp = v / -u;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-1.6d+200)) then
tmp = v / u
else if (u <= 4.1d+218) then
tmp = v / -t1
else
tmp = v / -u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -1.6e+200) {
tmp = v / u;
} else if (u <= 4.1e+218) {
tmp = v / -t1;
} else {
tmp = v / -u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.6e+200: tmp = v / u elif u <= 4.1e+218: tmp = v / -t1 else: tmp = v / -u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.6e+200) tmp = Float64(v / u); elseif (u <= 4.1e+218) tmp = Float64(v / Float64(-t1)); else tmp = Float64(v / Float64(-u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -1.6e+200) tmp = v / u; elseif (u <= 4.1e+218) tmp = v / -t1; else tmp = v / -u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.6e+200], N[(v / u), $MachinePrecision], If[LessEqual[u, 4.1e+218], N[(v / (-t1)), $MachinePrecision], N[(v / (-u)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.6 \cdot 10^{+200}:\\
\;\;\;\;\frac{v}{u}\\
\mathbf{elif}\;u \leq 4.1 \cdot 10^{+218}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-u}\\
\end{array}
\end{array}
if u < -1.60000000000000016e200Initial program 68.2%
times-frac96.1%
distribute-frac-neg96.1%
distribute-neg-frac296.1%
+-commutative96.1%
distribute-neg-in96.1%
unsub-neg96.1%
Simplified96.1%
Taylor expanded in t1 around inf 57.7%
Taylor expanded in t1 around 0 42.5%
associate-*r/42.5%
mul-1-neg42.5%
Simplified42.5%
div-inv42.5%
add-sqr-sqrt29.1%
sqrt-unprod42.1%
sqr-neg42.1%
sqrt-unprod13.4%
add-sqr-sqrt42.9%
Applied egg-rr42.9%
associate-*r/42.9%
*-rgt-identity42.9%
Simplified42.9%
if -1.60000000000000016e200 < u < 4.09999999999999965e218Initial program 70.3%
associate-/l*70.8%
Simplified70.8%
Taylor expanded in t1 around inf 67.3%
associate-*r/67.3%
neg-mul-167.3%
Simplified67.3%
if 4.09999999999999965e218 < u Initial program 80.4%
times-frac99.8%
distribute-frac-neg99.8%
distribute-neg-frac299.8%
+-commutative99.8%
distribute-neg-in99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in t1 around inf 50.4%
Taylor expanded in t1 around 0 35.3%
associate-*r/35.3%
mul-1-neg35.3%
Simplified35.3%
Final simplification62.6%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1.08e+89) (not (<= t1 2.5e+133))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.08e+89) || !(t1 <= 2.5e+133)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-1.08d+89)) .or. (.not. (t1 <= 2.5d+133))) then
tmp = v / t1
else
tmp = v / u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.08e+89) || !(t1 <= 2.5e+133)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.08e+89) or not (t1 <= 2.5e+133): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.08e+89) || !(t1 <= 2.5e+133)) 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 <= -1.08e+89) || ~((t1 <= 2.5e+133))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.08e+89], N[Not[LessEqual[t1, 2.5e+133]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.08 \cdot 10^{+89} \lor \neg \left(t1 \leq 2.5 \cdot 10^{+133}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -1.08000000000000006e89 or 2.4999999999999998e133 < t1 Initial program 51.0%
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 88.4%
Taylor expanded in u around inf 34.1%
if -1.08000000000000006e89 < t1 < 2.4999999999999998e133Initial program 83.6%
times-frac98.0%
distribute-frac-neg98.0%
distribute-neg-frac298.0%
+-commutative98.0%
distribute-neg-in98.0%
unsub-neg98.0%
Simplified98.0%
Taylor expanded in t1 around inf 55.7%
Taylor expanded in t1 around 0 16.7%
associate-*r/16.7%
mul-1-neg16.7%
Simplified16.7%
div-inv16.7%
add-sqr-sqrt8.8%
sqrt-unprod21.8%
sqr-neg21.8%
sqrt-unprod8.5%
add-sqr-sqrt18.2%
Applied egg-rr18.2%
associate-*r/18.2%
*-rgt-identity18.2%
Simplified18.2%
Final simplification24.4%
(FPCore (u v t1) :precision binary64 (/ (* v (/ t1 (- (- t1) u))) (+ t1 u)))
double code(double u, double v, double t1) {
return (v * (t1 / (-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 = (v * (t1 / (-t1 - u))) / (t1 + u)
end function
public static double code(double u, double v, double t1) {
return (v * (t1 / (-t1 - u))) / (t1 + u);
}
def code(u, v, t1): return (v * (t1 / (-t1 - u))) / (t1 + u)
function code(u, v, t1) return Float64(Float64(v * Float64(t1 / Float64(Float64(-t1) - u))) / Float64(t1 + u)) end
function tmp = code(u, v, t1) tmp = (v * (t1 / (-t1 - u))) / (t1 + u); end
code[u_, v_, t1_] := N[(N[(v * N[(t1 / N[((-t1) - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{v \cdot \frac{t1}{\left(-t1\right) - u}}{t1 + u}
\end{array}
Initial program 70.8%
associate-/l*71.4%
Simplified71.4%
associate-*r/70.8%
times-frac98.8%
frac-2neg98.8%
+-commutative98.8%
distribute-neg-in98.8%
sub-neg98.8%
associate-*r/98.8%
add-sqr-sqrt54.7%
sqrt-unprod48.9%
sqr-neg48.9%
sqrt-unprod17.4%
add-sqr-sqrt34.8%
sub-neg34.8%
+-commutative34.8%
add-sqr-sqrt17.5%
sqrt-unprod44.3%
sqr-neg44.3%
sqrt-unprod32.7%
add-sqr-sqrt17.3%
sqrt-unprod36.1%
sqr-neg36.1%
sqrt-unprod21.4%
Applied egg-rr98.8%
Final simplification98.8%
(FPCore (u v t1) :precision binary64 (* (/ v (+ t1 u)) (/ t1 (- (- t1) u))))
double code(double u, double v, double t1) {
return (v / (t1 + u)) * (t1 / (-t1 - u));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (v / (t1 + u)) * (t1 / (-t1 - u))
end function
public static double code(double u, double v, double t1) {
return (v / (t1 + u)) * (t1 / (-t1 - u));
}
def code(u, v, t1): return (v / (t1 + u)) * (t1 / (-t1 - u))
function code(u, v, t1) return Float64(Float64(v / Float64(t1 + u)) * Float64(t1 / Float64(Float64(-t1) - u))) end
function tmp = code(u, v, t1) tmp = (v / (t1 + u)) * (t1 / (-t1 - u)); end
code[u_, v_, t1_] := N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(t1 / N[((-t1) - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{t1 + u} \cdot \frac{t1}{\left(-t1\right) - u}
\end{array}
Initial program 70.8%
times-frac98.8%
distribute-frac-neg98.8%
distribute-neg-frac298.8%
+-commutative98.8%
distribute-neg-in98.8%
unsub-neg98.8%
Simplified98.8%
Final simplification98.8%
(FPCore (u v t1) :precision binary64 (/ v (- (- t1) u)))
double code(double u, double v, double t1) {
return v / (-t1 - u);
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = v / (-t1 - u)
end function
public static double code(double u, double v, double t1) {
return v / (-t1 - u);
}
def code(u, v, t1): return v / (-t1 - u)
function code(u, v, t1) return Float64(v / Float64(Float64(-t1) - u)) end
function tmp = code(u, v, t1) tmp = v / (-t1 - u); end
code[u_, v_, t1_] := N[(v / N[((-t1) - u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{\left(-t1\right) - u}
\end{array}
Initial program 70.8%
associate-/l*71.4%
Simplified71.4%
associate-*r/70.8%
times-frac98.8%
frac-2neg98.8%
+-commutative98.8%
distribute-neg-in98.8%
sub-neg98.8%
associate-*r/98.8%
add-sqr-sqrt54.7%
sqrt-unprod48.9%
sqr-neg48.9%
sqrt-unprod17.4%
add-sqr-sqrt34.8%
sub-neg34.8%
+-commutative34.8%
add-sqr-sqrt17.5%
sqrt-unprod44.3%
sqr-neg44.3%
sqrt-unprod32.7%
add-sqr-sqrt17.3%
sqrt-unprod36.1%
sqr-neg36.1%
sqrt-unprod21.4%
Applied egg-rr98.8%
Taylor expanded in t1 around inf 64.4%
mul-1-neg64.4%
Simplified64.4%
Final simplification64.4%
(FPCore (u v t1) :precision binary64 (/ v (- u t1)))
double code(double u, double v, double t1) {
return v / (u - t1);
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = v / (u - t1)
end function
public static double code(double u, double v, double t1) {
return v / (u - t1);
}
def code(u, v, t1): return v / (u - t1)
function code(u, v, t1) return Float64(v / Float64(u - t1)) end
function tmp = code(u, v, t1) tmp = v / (u - t1); end
code[u_, v_, t1_] := N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{u - t1}
\end{array}
Initial program 70.8%
times-frac98.8%
distribute-frac-neg98.8%
distribute-neg-frac298.8%
+-commutative98.8%
distribute-neg-in98.8%
unsub-neg98.8%
Simplified98.8%
clear-num98.5%
inv-pow98.5%
Applied egg-rr98.5%
unpow-198.5%
Simplified98.5%
Taylor expanded in t1 around inf 64.6%
add-sqr-sqrt42.2%
sqrt-unprod45.3%
clear-num45.3%
mul-1-neg45.3%
clear-num45.4%
mul-1-neg45.4%
sqr-neg45.4%
sqrt-unprod21.5%
add-sqr-sqrt23.1%
frac-2neg23.1%
distribute-neg-in23.1%
add-sqr-sqrt11.6%
sqrt-unprod33.4%
sqr-neg33.4%
sqrt-unprod26.8%
add-sqr-sqrt64.8%
sub-neg64.8%
Applied egg-rr64.8%
Final simplification64.8%
(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 70.8%
times-frac98.8%
distribute-frac-neg98.8%
distribute-neg-frac298.8%
+-commutative98.8%
distribute-neg-in98.8%
unsub-neg98.8%
Simplified98.8%
Taylor expanded in t1 around inf 60.5%
Taylor expanded in u around inf 15.1%
herbie shell --seed 2024150
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))