
(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 20 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 70.8%
associate-/l*71.4%
distribute-lft-neg-out71.4%
distribute-rgt-neg-in71.4%
associate-/r*83.3%
distribute-neg-frac283.3%
Simplified83.3%
associate-*r/99.9%
neg-mul-199.9%
associate-/r*99.9%
Applied egg-rr99.9%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ v (+ t1 u))))
(if (<= t1 -9.6e+96)
(* t_1 (+ -1.0 (/ u t1)))
(if (<= t1 1.6e+188) (* t1 (/ t_1 (- (- u) t1))) (/ v (- u t1))))))
double code(double u, double v, double t1) {
double t_1 = v / (t1 + u);
double tmp;
if (t1 <= -9.6e+96) {
tmp = t_1 * (-1.0 + (u / t1));
} else if (t1 <= 1.6e+188) {
tmp = t1 * (t_1 / (-u - t1));
} else {
tmp = v / (u - t1);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: t_1
real(8) :: tmp
t_1 = v / (t1 + u)
if (t1 <= (-9.6d+96)) then
tmp = t_1 * ((-1.0d0) + (u / t1))
else if (t1 <= 1.6d+188) then
tmp = t1 * (t_1 / (-u - t1))
else
tmp = v / (u - t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = v / (t1 + u);
double tmp;
if (t1 <= -9.6e+96) {
tmp = t_1 * (-1.0 + (u / t1));
} else if (t1 <= 1.6e+188) {
tmp = t1 * (t_1 / (-u - t1));
} else {
tmp = v / (u - t1);
}
return tmp;
}
def code(u, v, t1): t_1 = v / (t1 + u) tmp = 0 if t1 <= -9.6e+96: tmp = t_1 * (-1.0 + (u / t1)) elif t1 <= 1.6e+188: tmp = t1 * (t_1 / (-u - t1)) else: tmp = v / (u - t1) return tmp
function code(u, v, t1) t_1 = Float64(v / Float64(t1 + u)) tmp = 0.0 if (t1 <= -9.6e+96) tmp = Float64(t_1 * Float64(-1.0 + Float64(u / t1))); elseif (t1 <= 1.6e+188) tmp = Float64(t1 * Float64(t_1 / Float64(Float64(-u) - t1))); else tmp = Float64(v / Float64(u - t1)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = v / (t1 + u); tmp = 0.0; if (t1 <= -9.6e+96) tmp = t_1 * (-1.0 + (u / t1)); elseif (t1 <= 1.6e+188) tmp = t1 * (t_1 / (-u - t1)); else tmp = v / (u - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -9.6e+96], N[(t$95$1 * N[(-1.0 + N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 1.6e+188], N[(t1 * N[(t$95$1 / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{v}{t1 + u}\\
\mathbf{if}\;t1 \leq -9.6 \cdot 10^{+96}:\\
\;\;\;\;t\_1 \cdot \left(-1 + \frac{u}{t1}\right)\\
\mathbf{elif}\;t1 \leq 1.6 \cdot 10^{+188}:\\
\;\;\;\;t1 \cdot \frac{t\_1}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u - t1}\\
\end{array}
\end{array}
if t1 < -9.59999999999999972e96Initial 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%
Taylor expanded in t1 around inf 92.4%
if -9.59999999999999972e96 < t1 < 1.59999999999999985e188Initial program 80.4%
associate-/l*81.4%
distribute-lft-neg-out81.4%
distribute-rgt-neg-in81.4%
associate-/r*92.6%
distribute-neg-frac292.6%
Simplified92.6%
if 1.59999999999999985e188 < t1 Initial program 45.5%
associate-/l*47.6%
distribute-lft-neg-out47.6%
distribute-rgt-neg-in47.6%
associate-/r*67.8%
distribute-neg-frac267.8%
Simplified67.8%
associate-*r/99.9%
neg-mul-199.9%
associate-/r*99.9%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 92.1%
mul-1-neg92.1%
Simplified92.1%
add-sqr-sqrt54.5%
sqrt-unprod87.7%
sqr-neg87.7%
sqrt-unprod37.8%
add-sqr-sqrt92.3%
sub-neg92.3%
Applied egg-rr92.3%
Final simplification92.5%
(FPCore (u v t1)
:precision binary64
(if (<= u -2.7e-29)
(/ (* t1 (/ v (- u))) u)
(if (<= u 3.6e+109)
(/ (* v (/ t1 (- (- u) t1))) t1)
(* (/ v u) (/ t1 (- u))))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -2.7e-29) {
tmp = (t1 * (v / -u)) / u;
} else if (u <= 3.6e+109) {
tmp = (v * (t1 / (-u - t1))) / t1;
} else {
tmp = (v / u) * (t1 / -u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-2.7d-29)) then
tmp = (t1 * (v / -u)) / u
else if (u <= 3.6d+109) then
tmp = (v * (t1 / (-u - t1))) / t1
else
tmp = (v / u) * (t1 / -u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -2.7e-29) {
tmp = (t1 * (v / -u)) / u;
} else if (u <= 3.6e+109) {
tmp = (v * (t1 / (-u - t1))) / t1;
} else {
tmp = (v / u) * (t1 / -u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -2.7e-29: tmp = (t1 * (v / -u)) / u elif u <= 3.6e+109: tmp = (v * (t1 / (-u - t1))) / t1 else: tmp = (v / u) * (t1 / -u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -2.7e-29) tmp = Float64(Float64(t1 * Float64(v / Float64(-u))) / u); elseif (u <= 3.6e+109) tmp = Float64(Float64(v * Float64(t1 / Float64(Float64(-u) - t1))) / t1); else tmp = Float64(Float64(v / u) * Float64(t1 / Float64(-u))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -2.7e-29) tmp = (t1 * (v / -u)) / u; elseif (u <= 3.6e+109) tmp = (v * (t1 / (-u - t1))) / t1; else tmp = (v / u) * (t1 / -u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -2.7e-29], N[(N[(t1 * N[(v / (-u)), $MachinePrecision]), $MachinePrecision] / u), $MachinePrecision], If[LessEqual[u, 3.6e+109], N[(N[(v * N[(t1 / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t1), $MachinePrecision], N[(N[(v / u), $MachinePrecision] * N[(t1 / (-u)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.7 \cdot 10^{-29}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{-u}}{u}\\
\mathbf{elif}\;u \leq 3.6 \cdot 10^{+109}:\\
\;\;\;\;\frac{v \cdot \frac{t1}{\left(-u\right) - t1}}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u} \cdot \frac{t1}{-u}\\
\end{array}
\end{array}
if u < -2.70000000000000023e-29Initial program 75.0%
associate-/l*75.5%
distribute-lft-neg-out75.5%
distribute-rgt-neg-in75.5%
associate-/r*89.2%
distribute-neg-frac289.2%
Simplified89.2%
distribute-frac-neg289.2%
associate-/r*75.5%
distribute-rgt-neg-in75.5%
distribute-lft-neg-out75.5%
associate-*r/75.0%
times-frac95.3%
frac-2neg95.3%
associate-*r/95.4%
add-sqr-sqrt53.0%
sqrt-unprod64.5%
sqr-neg64.5%
sqrt-unprod29.7%
add-sqr-sqrt55.1%
add-sqr-sqrt48.5%
sqrt-unprod55.4%
sqr-neg55.4%
sqrt-prod8.1%
add-sqr-sqrt95.4%
Applied egg-rr95.4%
Taylor expanded in t1 around 0 83.3%
Taylor expanded in t1 around 0 77.1%
mul-1-neg77.1%
associate-/l*87.6%
distribute-lft-neg-in87.6%
Simplified87.6%
if -2.70000000000000023e-29 < u < 3.6e109Initial program 68.8%
associate-/l*70.5%
distribute-lft-neg-out70.5%
distribute-rgt-neg-in70.5%
associate-/r*81.0%
distribute-neg-frac281.0%
Simplified81.0%
distribute-frac-neg281.0%
associate-/r*70.5%
distribute-rgt-neg-in70.5%
distribute-lft-neg-out70.5%
associate-*r/68.8%
times-frac99.9%
frac-2neg99.9%
associate-*r/99.9%
add-sqr-sqrt55.3%
sqrt-unprod38.7%
sqr-neg38.7%
sqrt-unprod9.5%
add-sqr-sqrt18.3%
add-sqr-sqrt7.4%
sqrt-unprod44.6%
sqr-neg44.6%
sqrt-prod46.7%
add-sqr-sqrt99.9%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 82.4%
if 3.6e109 < u Initial program 71.9%
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 0 83.6%
associate-*r/83.6%
mul-1-neg83.6%
Simplified83.6%
Taylor expanded in t1 around 0 83.8%
Final simplification83.9%
(FPCore (u v t1) :precision binary64 (if (or (<= u -2.2e-33) (not (<= u 7200000000.0))) (* (/ v u) (/ t1 (- u))) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.2e-33) || !(u <= 7200000000.0)) {
tmp = (v / u) * (t1 / -u);
} else {
tmp = v / -t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-2.2d-33)) .or. (.not. (u <= 7200000000.0d0))) then
tmp = (v / u) * (t1 / -u)
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.2e-33) || !(u <= 7200000000.0)) {
tmp = (v / u) * (t1 / -u);
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -2.2e-33) or not (u <= 7200000000.0): tmp = (v / u) * (t1 / -u) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -2.2e-33) || !(u <= 7200000000.0)) tmp = Float64(Float64(v / u) * Float64(t1 / Float64(-u))); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -2.2e-33) || ~((u <= 7200000000.0))) tmp = (v / u) * (t1 / -u); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2.2e-33], N[Not[LessEqual[u, 7200000000.0]], $MachinePrecision]], N[(N[(v / u), $MachinePrecision] * N[(t1 / (-u)), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.2 \cdot 10^{-33} \lor \neg \left(u \leq 7200000000\right):\\
\;\;\;\;\frac{v}{u} \cdot \frac{t1}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -2.20000000000000005e-33 or 7.2e9 < u Initial program 74.3%
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 0 80.2%
associate-*r/80.2%
mul-1-neg80.2%
Simplified80.2%
Taylor expanded in t1 around 0 79.6%
if -2.20000000000000005e-33 < u < 7.2e9Initial program 67.2%
associate-/l*68.8%
distribute-lft-neg-out68.8%
distribute-rgt-neg-in68.8%
associate-/r*80.2%
distribute-neg-frac280.2%
Simplified80.2%
Taylor expanded in t1 around inf 85.6%
associate-*r/85.6%
neg-mul-185.6%
Simplified85.6%
Final simplification82.6%
(FPCore (u v t1) :precision binary64 (if (or (<= u -2.2e-33) (not (<= u 230000000.0))) (* t1 (/ (/ v u) (- u))) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.2e-33) || !(u <= 230000000.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 <= (-2.2d-33)) .or. (.not. (u <= 230000000.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 <= -2.2e-33) || !(u <= 230000000.0)) {
tmp = t1 * ((v / u) / -u);
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -2.2e-33) or not (u <= 230000000.0): tmp = t1 * ((v / u) / -u) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -2.2e-33) || !(u <= 230000000.0)) tmp = Float64(t1 * Float64(Float64(v / u) / Float64(-u))); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -2.2e-33) || ~((u <= 230000000.0))) tmp = t1 * ((v / u) / -u); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2.2e-33], N[Not[LessEqual[u, 230000000.0]], $MachinePrecision]], N[(t1 * N[(N[(v / u), $MachinePrecision] / (-u)), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.2 \cdot 10^{-33} \lor \neg \left(u \leq 230000000\right):\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -2.20000000000000005e-33 or 2.3e8 < u Initial program 74.3%
associate-/l*73.9%
distribute-lft-neg-out73.9%
distribute-rgt-neg-in73.9%
associate-/r*86.3%
distribute-neg-frac286.3%
Simplified86.3%
Taylor expanded in t1 around 0 78.5%
Taylor expanded in t1 around 0 77.9%
if -2.20000000000000005e-33 < u < 2.3e8Initial program 67.2%
associate-/l*68.8%
distribute-lft-neg-out68.8%
distribute-rgt-neg-in68.8%
associate-/r*80.2%
distribute-neg-frac280.2%
Simplified80.2%
Taylor expanded in t1 around inf 85.6%
associate-*r/85.6%
neg-mul-185.6%
Simplified85.6%
Final simplification81.7%
(FPCore (u v t1) :precision binary64 (if (<= u -2.2e-33) (/ (* t1 (/ v (- u))) u) (if (<= u 46000000.0) (/ v (- t1)) (* (/ v u) (/ t1 (- u))))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -2.2e-33) {
tmp = (t1 * (v / -u)) / u;
} else if (u <= 46000000.0) {
tmp = v / -t1;
} else {
tmp = (v / u) * (t1 / -u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-2.2d-33)) then
tmp = (t1 * (v / -u)) / u
else if (u <= 46000000.0d0) then
tmp = v / -t1
else
tmp = (v / u) * (t1 / -u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -2.2e-33) {
tmp = (t1 * (v / -u)) / u;
} else if (u <= 46000000.0) {
tmp = v / -t1;
} else {
tmp = (v / u) * (t1 / -u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -2.2e-33: tmp = (t1 * (v / -u)) / u elif u <= 46000000.0: tmp = v / -t1 else: tmp = (v / u) * (t1 / -u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -2.2e-33) tmp = Float64(Float64(t1 * Float64(v / Float64(-u))) / u); elseif (u <= 46000000.0) tmp = Float64(v / Float64(-t1)); else tmp = Float64(Float64(v / u) * Float64(t1 / Float64(-u))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -2.2e-33) tmp = (t1 * (v / -u)) / u; elseif (u <= 46000000.0) tmp = v / -t1; else tmp = (v / u) * (t1 / -u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -2.2e-33], N[(N[(t1 * N[(v / (-u)), $MachinePrecision]), $MachinePrecision] / u), $MachinePrecision], If[LessEqual[u, 46000000.0], N[(v / (-t1)), $MachinePrecision], N[(N[(v / u), $MachinePrecision] * N[(t1 / (-u)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.2 \cdot 10^{-33}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{-u}}{u}\\
\mathbf{elif}\;u \leq 46000000:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u} \cdot \frac{t1}{-u}\\
\end{array}
\end{array}
if u < -2.20000000000000005e-33Initial program 75.4%
associate-/l*75.9%
distribute-lft-neg-out75.9%
distribute-rgt-neg-in75.9%
associate-/r*89.3%
distribute-neg-frac289.3%
Simplified89.3%
distribute-frac-neg289.3%
associate-/r*75.9%
distribute-rgt-neg-in75.9%
distribute-lft-neg-out75.9%
associate-*r/75.4%
times-frac95.4%
frac-2neg95.4%
associate-*r/95.4%
add-sqr-sqrt52.2%
sqrt-unprod65.0%
sqr-neg65.0%
sqrt-unprod30.8%
add-sqr-sqrt55.8%
add-sqr-sqrt49.4%
sqrt-unprod56.1%
sqr-neg56.1%
sqrt-prod7.9%
add-sqr-sqrt95.4%
Applied egg-rr95.4%
Taylor expanded in t1 around 0 83.5%
Taylor expanded in t1 around 0 77.4%
mul-1-neg77.4%
associate-/l*87.8%
distribute-lft-neg-in87.8%
Simplified87.8%
if -2.20000000000000005e-33 < u < 4.6e7Initial program 67.2%
associate-/l*68.8%
distribute-lft-neg-out68.8%
distribute-rgt-neg-in68.8%
associate-/r*80.2%
distribute-neg-frac280.2%
Simplified80.2%
Taylor expanded in t1 around inf 85.6%
associate-*r/85.6%
neg-mul-185.6%
Simplified85.6%
if 4.6e7 < u Initial program 73.3%
times-frac99.8%
distribute-frac-neg99.8%
distribute-neg-frac299.8%
+-commutative99.8%
distribute-neg-in99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in t1 around 0 75.7%
associate-*r/75.7%
mul-1-neg75.7%
Simplified75.7%
Taylor expanded in t1 around 0 76.2%
Final simplification83.6%
(FPCore (u v t1) :precision binary64 (if (<= u -2.2e-33) (/ t1 (* u (/ u (- v)))) (if (<= u 90000000.0) (/ v (- t1)) (* (/ v u) (/ t1 (- u))))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -2.2e-33) {
tmp = t1 / (u * (u / -v));
} else if (u <= 90000000.0) {
tmp = v / -t1;
} else {
tmp = (v / u) * (t1 / -u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-2.2d-33)) then
tmp = t1 / (u * (u / -v))
else if (u <= 90000000.0d0) then
tmp = v / -t1
else
tmp = (v / u) * (t1 / -u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -2.2e-33) {
tmp = t1 / (u * (u / -v));
} else if (u <= 90000000.0) {
tmp = v / -t1;
} else {
tmp = (v / u) * (t1 / -u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -2.2e-33: tmp = t1 / (u * (u / -v)) elif u <= 90000000.0: tmp = v / -t1 else: tmp = (v / u) * (t1 / -u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -2.2e-33) tmp = Float64(t1 / Float64(u * Float64(u / Float64(-v)))); elseif (u <= 90000000.0) tmp = Float64(v / Float64(-t1)); else tmp = Float64(Float64(v / u) * Float64(t1 / Float64(-u))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -2.2e-33) tmp = t1 / (u * (u / -v)); elseif (u <= 90000000.0) tmp = v / -t1; else tmp = (v / u) * (t1 / -u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -2.2e-33], N[(t1 / N[(u * N[(u / (-v)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 90000000.0], N[(v / (-t1)), $MachinePrecision], N[(N[(v / u), $MachinePrecision] * N[(t1 / (-u)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.2 \cdot 10^{-33}:\\
\;\;\;\;\frac{t1}{u \cdot \frac{u}{-v}}\\
\mathbf{elif}\;u \leq 90000000:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u} \cdot \frac{t1}{-u}\\
\end{array}
\end{array}
if u < -2.20000000000000005e-33Initial program 75.4%
times-frac95.4%
distribute-frac-neg95.4%
distribute-neg-frac295.4%
+-commutative95.4%
distribute-neg-in95.4%
unsub-neg95.4%
Simplified95.4%
Taylor expanded in t1 around 0 85.0%
associate-*r/85.0%
mul-1-neg85.0%
Simplified85.0%
Taylor expanded in t1 around 0 83.3%
*-commutative83.3%
clear-num83.3%
frac-2neg83.3%
frac-times83.3%
*-un-lft-identity83.3%
remove-double-neg83.3%
Applied egg-rr83.3%
if -2.20000000000000005e-33 < u < 9e7Initial program 67.2%
associate-/l*68.8%
distribute-lft-neg-out68.8%
distribute-rgt-neg-in68.8%
associate-/r*80.2%
distribute-neg-frac280.2%
Simplified80.2%
Taylor expanded in t1 around inf 85.6%
associate-*r/85.6%
neg-mul-185.6%
Simplified85.6%
if 9e7 < u Initial program 73.3%
times-frac99.8%
distribute-frac-neg99.8%
distribute-neg-frac299.8%
+-commutative99.8%
distribute-neg-in99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in t1 around 0 75.7%
associate-*r/75.7%
mul-1-neg75.7%
Simplified75.7%
Taylor expanded in t1 around 0 76.2%
Final simplification82.6%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.45e+182) (not (<= u 2.35e+202))) (* v (/ (/ t1 u) u)) (/ v (- u t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.45e+182) || !(u <= 2.35e+202)) {
tmp = v * ((t1 / u) / u);
} else {
tmp = v / (u - t1);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-1.45d+182)) .or. (.not. (u <= 2.35d+202))) then
tmp = v * ((t1 / u) / u)
else
tmp = v / (u - t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.45e+182) || !(u <= 2.35e+202)) {
tmp = v * ((t1 / u) / u);
} else {
tmp = v / (u - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.45e+182) or not (u <= 2.35e+202): tmp = v * ((t1 / u) / u) else: tmp = v / (u - t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.45e+182) || !(u <= 2.35e+202)) tmp = Float64(v * Float64(Float64(t1 / u) / 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.45e+182) || ~((u <= 2.35e+202))) tmp = v * ((t1 / u) / u); else tmp = v / (u - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.45e+182], N[Not[LessEqual[u, 2.35e+202]], $MachinePrecision]], N[(v * N[(N[(t1 / u), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.45 \cdot 10^{+182} \lor \neg \left(u \leq 2.35 \cdot 10^{+202}\right):\\
\;\;\;\;v \cdot \frac{\frac{t1}{u}}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u - t1}\\
\end{array}
\end{array}
if u < -1.4499999999999999e182 or 2.3500000000000001e202 < u Initial program 72.8%
associate-/l*73.5%
distribute-lft-neg-out73.5%
distribute-rgt-neg-in73.5%
associate-/r*89.3%
distribute-neg-frac289.3%
Simplified89.3%
distribute-frac-neg289.3%
associate-/r*73.5%
distribute-rgt-neg-in73.5%
distribute-lft-neg-out73.5%
associate-*r/72.8%
times-frac98.2%
frac-2neg98.2%
associate-*r/98.2%
add-sqr-sqrt56.0%
sqrt-unprod70.8%
sqr-neg70.8%
sqrt-unprod30.1%
add-sqr-sqrt73.0%
add-sqr-sqrt37.7%
sqrt-unprod73.5%
sqr-neg73.5%
sqrt-prod43.8%
add-sqr-sqrt98.2%
Applied egg-rr98.2%
Taylor expanded in t1 around 0 93.4%
Taylor expanded in t1 around 0 84.7%
associate-*r/84.7%
mul-1-neg84.7%
distribute-lft-neg-out84.7%
*-commutative84.7%
Simplified84.7%
associate-/l*93.4%
associate-/l*74.0%
add-sqr-sqrt44.8%
sqrt-unprod62.9%
sqr-neg62.9%
sqrt-unprod29.1%
add-sqr-sqrt72.1%
Applied egg-rr72.1%
if -1.4499999999999999e182 < u < 2.3500000000000001e202Initial program 70.3%
associate-/l*70.8%
distribute-lft-neg-out70.8%
distribute-rgt-neg-in70.8%
associate-/r*81.6%
distribute-neg-frac281.6%
Simplified81.6%
associate-*r/99.9%
neg-mul-199.9%
associate-/r*99.9%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 71.4%
mul-1-neg71.4%
Simplified71.4%
add-sqr-sqrt42.0%
sqrt-unprod71.1%
sqr-neg71.1%
sqrt-unprod29.8%
add-sqr-sqrt71.8%
sub-neg71.8%
Applied egg-rr71.8%
Final simplification71.8%
(FPCore (u v t1) :precision binary64 (if (<= u -1.2e+182) (/ v (* u (/ u t1))) (if (<= u 2.15e+202) (/ v (- u t1)) (/ t1 (* u (/ u v))))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.2e+182) {
tmp = v / (u * (u / t1));
} else if (u <= 2.15e+202) {
tmp = v / (u - t1);
} else {
tmp = 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 <= (-1.2d+182)) then
tmp = v / (u * (u / t1))
else if (u <= 2.15d+202) then
tmp = v / (u - t1)
else
tmp = t1 / (u * (u / v))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -1.2e+182) {
tmp = v / (u * (u / t1));
} else if (u <= 2.15e+202) {
tmp = v / (u - t1);
} else {
tmp = t1 / (u * (u / v));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.2e+182: tmp = v / (u * (u / t1)) elif u <= 2.15e+202: tmp = v / (u - t1) else: tmp = t1 / (u * (u / v)) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.2e+182) tmp = Float64(v / Float64(u * Float64(u / t1))); elseif (u <= 2.15e+202) tmp = Float64(v / Float64(u - t1)); else tmp = Float64(t1 / Float64(u * Float64(u / v))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -1.2e+182) tmp = v / (u * (u / t1)); elseif (u <= 2.15e+202) tmp = v / (u - t1); else tmp = t1 / (u * (u / v)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.2e+182], N[(v / N[(u * N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 2.15e+202], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision], N[(t1 / N[(u * N[(u / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.2 \cdot 10^{+182}:\\
\;\;\;\;\frac{v}{u \cdot \frac{u}{t1}}\\
\mathbf{elif}\;u \leq 2.15 \cdot 10^{+202}:\\
\;\;\;\;\frac{v}{u - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{u \cdot \frac{u}{v}}\\
\end{array}
\end{array}
if u < -1.20000000000000005e182Initial program 68.1%
times-frac96.9%
distribute-frac-neg96.9%
distribute-neg-frac296.9%
+-commutative96.9%
distribute-neg-in96.9%
unsub-neg96.9%
Simplified96.9%
Taylor expanded in t1 around 0 93.8%
associate-*r/93.8%
mul-1-neg93.8%
Simplified93.8%
Taylor expanded in t1 around 0 93.7%
clear-num93.8%
frac-times68.8%
*-un-lft-identity68.8%
add-sqr-sqrt37.8%
sqrt-unprod61.9%
sqr-neg61.9%
sqrt-unprod31.0%
add-sqr-sqrt68.7%
Applied egg-rr68.7%
if -1.20000000000000005e182 < u < 2.1500000000000001e202Initial program 70.3%
associate-/l*70.8%
distribute-lft-neg-out70.8%
distribute-rgt-neg-in70.8%
associate-/r*81.6%
distribute-neg-frac281.6%
Simplified81.6%
associate-*r/99.9%
neg-mul-199.9%
associate-/r*99.9%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 71.4%
mul-1-neg71.4%
Simplified71.4%
add-sqr-sqrt42.0%
sqrt-unprod71.1%
sqr-neg71.1%
sqrt-unprod29.8%
add-sqr-sqrt71.8%
sub-neg71.8%
Applied egg-rr71.8%
if 2.1500000000000001e202 < 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 0 92.9%
associate-*r/92.9%
mul-1-neg92.9%
Simplified92.9%
Taylor expanded in t1 around 0 93.0%
*-commutative93.0%
clear-num93.0%
frac-times89.1%
*-un-lft-identity89.1%
add-sqr-sqrt55.9%
sqrt-unprod66.9%
sqr-neg66.9%
sqrt-unprod29.6%
add-sqr-sqrt78.5%
Applied egg-rr78.5%
Final simplification72.1%
(FPCore (u v t1) :precision binary64 (if (<= u -1.5e+182) (* v (/ (/ t1 u) u)) (if (<= u 2.3e+202) (/ v (- u t1)) (/ t1 (* u (/ u v))))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.5e+182) {
tmp = v * ((t1 / u) / u);
} else if (u <= 2.3e+202) {
tmp = v / (u - t1);
} else {
tmp = 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 <= (-1.5d+182)) then
tmp = v * ((t1 / u) / u)
else if (u <= 2.3d+202) then
tmp = v / (u - t1)
else
tmp = t1 / (u * (u / v))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -1.5e+182) {
tmp = v * ((t1 / u) / u);
} else if (u <= 2.3e+202) {
tmp = v / (u - t1);
} else {
tmp = t1 / (u * (u / v));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.5e+182: tmp = v * ((t1 / u) / u) elif u <= 2.3e+202: tmp = v / (u - t1) else: tmp = t1 / (u * (u / v)) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.5e+182) tmp = Float64(v * Float64(Float64(t1 / u) / u)); elseif (u <= 2.3e+202) tmp = Float64(v / Float64(u - t1)); else tmp = Float64(t1 / Float64(u * Float64(u / v))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -1.5e+182) tmp = v * ((t1 / u) / u); elseif (u <= 2.3e+202) tmp = v / (u - t1); else tmp = t1 / (u * (u / v)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.5e+182], N[(v * N[(N[(t1 / u), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 2.3e+202], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision], N[(t1 / N[(u * N[(u / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.5 \cdot 10^{+182}:\\
\;\;\;\;v \cdot \frac{\frac{t1}{u}}{u}\\
\mathbf{elif}\;u \leq 2.3 \cdot 10^{+202}:\\
\;\;\;\;\frac{v}{u - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{u \cdot \frac{u}{v}}\\
\end{array}
\end{array}
if u < -1.5000000000000001e182Initial program 68.1%
associate-/l*68.7%
distribute-lft-neg-out68.7%
distribute-rgt-neg-in68.7%
associate-/r*87.5%
distribute-neg-frac287.5%
Simplified87.5%
distribute-frac-neg287.5%
associate-/r*68.7%
distribute-rgt-neg-in68.7%
distribute-lft-neg-out68.7%
associate-*r/68.1%
times-frac96.9%
frac-2neg96.9%
associate-*r/96.8%
add-sqr-sqrt53.1%
sqrt-unprod74.1%
sqr-neg74.1%
sqrt-unprod30.8%
add-sqr-sqrt68.3%
add-sqr-sqrt68.3%
sqrt-unprod68.7%
sqr-neg68.7%
sqrt-prod0.0%
add-sqr-sqrt96.8%
Applied egg-rr96.8%
Taylor expanded in t1 around 0 93.7%
Taylor expanded in t1 around 0 86.9%
associate-*r/86.9%
mul-1-neg86.9%
distribute-lft-neg-out86.9%
*-commutative86.9%
Simplified86.9%
associate-/l*93.7%
associate-/l*71.9%
add-sqr-sqrt40.9%
sqrt-unprod64.9%
sqr-neg64.9%
sqrt-unprod31.0%
add-sqr-sqrt68.6%
Applied egg-rr68.6%
if -1.5000000000000001e182 < u < 2.29999999999999999e202Initial program 70.3%
associate-/l*70.8%
distribute-lft-neg-out70.8%
distribute-rgt-neg-in70.8%
associate-/r*81.6%
distribute-neg-frac281.6%
Simplified81.6%
associate-*r/99.9%
neg-mul-199.9%
associate-/r*99.9%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 71.4%
mul-1-neg71.4%
Simplified71.4%
add-sqr-sqrt42.0%
sqrt-unprod71.1%
sqr-neg71.1%
sqrt-unprod29.8%
add-sqr-sqrt71.8%
sub-neg71.8%
Applied egg-rr71.8%
if 2.29999999999999999e202 < 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 0 92.9%
associate-*r/92.9%
mul-1-neg92.9%
Simplified92.9%
Taylor expanded in t1 around 0 93.0%
*-commutative93.0%
clear-num93.0%
frac-times89.1%
*-un-lft-identity89.1%
add-sqr-sqrt55.9%
sqrt-unprod66.9%
sqr-neg66.9%
sqrt-unprod29.6%
add-sqr-sqrt78.5%
Applied egg-rr78.5%
Final simplification72.1%
(FPCore (u v t1) :precision binary64 (if (<= u -5.8e+199) (/ 1.0 (/ u v)) (if (<= u 2.3e+202) (/ v (- t1)) (/ v (+ t1 u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -5.8e+199) {
tmp = 1.0 / (u / v);
} else if (u <= 2.3e+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 <= (-5.8d+199)) then
tmp = 1.0d0 / (u / v)
else if (u <= 2.3d+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 <= -5.8e+199) {
tmp = 1.0 / (u / v);
} else if (u <= 2.3e+202) {
tmp = v / -t1;
} else {
tmp = v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -5.8e+199: tmp = 1.0 / (u / v) elif u <= 2.3e+202: tmp = v / -t1 else: tmp = v / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -5.8e+199) tmp = Float64(1.0 / Float64(u / v)); elseif (u <= 2.3e+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 <= -5.8e+199) tmp = 1.0 / (u / v); elseif (u <= 2.3e+202) tmp = v / -t1; else tmp = v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -5.8e+199], N[(1.0 / N[(u / v), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 2.3e+202], N[(v / (-t1)), $MachinePrecision], N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -5.8 \cdot 10^{+199}:\\
\;\;\;\;\frac{1}{\frac{u}{v}}\\
\mathbf{elif}\;u \leq 2.3 \cdot 10^{+202}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{t1 + u}\\
\end{array}
\end{array}
if u < -5.7999999999999998e199Initial program 68.2%
associate-/l*68.8%
distribute-lft-neg-out68.8%
distribute-rgt-neg-in68.8%
associate-/r*88.3%
distribute-neg-frac288.3%
Simplified88.3%
Taylor expanded in t1 around 0 88.3%
Taylor expanded in t1 around inf 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 -5.7999999999999998e199 < u < 2.29999999999999999e202Initial program 70.2%
associate-/l*70.7%
distribute-lft-neg-out70.7%
distribute-rgt-neg-in70.7%
associate-/r*81.7%
distribute-neg-frac281.7%
Simplified81.7%
Taylor expanded in t1 around inf 68.1%
associate-*r/68.1%
neg-mul-168.1%
Simplified68.1%
if 2.29999999999999999e202 < u Initial program 78.1%
associate-/l*78.7%
distribute-lft-neg-out78.7%
distribute-rgt-neg-in78.7%
associate-/r*91.4%
distribute-neg-frac291.4%
Simplified91.4%
associate-*r/99.8%
neg-mul-199.8%
associate-/r*99.8%
Applied egg-rr99.8%
Taylor expanded in t1 around inf 42.3%
mul-1-neg42.3%
Simplified42.3%
div-inv42.3%
add-sqr-sqrt16.4%
sqrt-unprod38.8%
sqr-neg38.8%
sqrt-unprod22.9%
add-sqr-sqrt39.2%
Applied egg-rr39.2%
associate-*r/39.2%
*-rgt-identity39.2%
Simplified39.2%
Final simplification62.9%
(FPCore (u v t1) :precision binary64 (if (or (<= u -4.2e+199) (not (<= u 1.2e+217))) (/ v u) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -4.2e+199) || !(u <= 1.2e+217)) {
tmp = v / u;
} else {
tmp = v / -t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-4.2d+199)) .or. (.not. (u <= 1.2d+217))) then
tmp = v / u
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -4.2e+199) || !(u <= 1.2e+217)) {
tmp = v / u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -4.2e+199) or not (u <= 1.2e+217): tmp = v / u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -4.2e+199) || !(u <= 1.2e+217)) tmp = Float64(v / u); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -4.2e+199) || ~((u <= 1.2e+217))) tmp = v / u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -4.2e+199], N[Not[LessEqual[u, 1.2e+217]], $MachinePrecision]], N[(v / u), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -4.2 \cdot 10^{+199} \lor \neg \left(u \leq 1.2 \cdot 10^{+217}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -4.1999999999999999e199 or 1.1999999999999999e217 < u Initial program 71.9%
associate-/l*72.6%
distribute-lft-neg-out72.6%
distribute-rgt-neg-in72.6%
associate-/r*91.0%
distribute-neg-frac291.0%
Simplified91.0%
associate-*r/99.8%
neg-mul-199.8%
associate-/r*99.8%
Applied egg-rr99.8%
Taylor expanded in t1 around inf 38.5%
mul-1-neg38.5%
Simplified38.5%
clear-num39.5%
associate-/r/38.5%
add-sqr-sqrt25.9%
sqrt-unprod38.0%
sqr-neg38.0%
sqrt-unprod12.6%
add-sqr-sqrt38.6%
Applied egg-rr38.6%
Taylor expanded in t1 around 0 38.6%
if -4.1999999999999999e199 < u < 1.1999999999999999e217Initial program 70.6%
associate-/l*71.2%
distribute-lft-neg-out71.2%
distribute-rgt-neg-in71.2%
associate-/r*81.7%
distribute-neg-frac281.7%
Simplified81.7%
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 -3.2e+199) (/ 1.0 (/ u v)) (if (<= u 2.9e+218) (/ v (- t1)) (/ v (- u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -3.2e+199) {
tmp = 1.0 / (u / v);
} else if (u <= 2.9e+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 <= (-3.2d+199)) then
tmp = 1.0d0 / (u / v)
else if (u <= 2.9d+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 <= -3.2e+199) {
tmp = 1.0 / (u / v);
} else if (u <= 2.9e+218) {
tmp = v / -t1;
} else {
tmp = v / -u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -3.2e+199: tmp = 1.0 / (u / v) elif u <= 2.9e+218: tmp = v / -t1 else: tmp = v / -u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -3.2e+199) tmp = Float64(1.0 / Float64(u / v)); elseif (u <= 2.9e+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 <= -3.2e+199) tmp = 1.0 / (u / v); elseif (u <= 2.9e+218) tmp = v / -t1; else tmp = v / -u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -3.2e+199], N[(1.0 / N[(u / v), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 2.9e+218], N[(v / (-t1)), $MachinePrecision], N[(v / (-u)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.2 \cdot 10^{+199}:\\
\;\;\;\;\frac{1}{\frac{u}{v}}\\
\mathbf{elif}\;u \leq 2.9 \cdot 10^{+218}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-u}\\
\end{array}
\end{array}
if u < -3.20000000000000006e199Initial program 68.2%
associate-/l*68.8%
distribute-lft-neg-out68.8%
distribute-rgt-neg-in68.8%
associate-/r*88.3%
distribute-neg-frac288.3%
Simplified88.3%
Taylor expanded in t1 around 0 88.3%
Taylor expanded in t1 around inf 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 -3.20000000000000006e199 < u < 2.8999999999999999e218Initial program 70.3%
associate-/l*70.8%
distribute-lft-neg-out70.8%
distribute-rgt-neg-in70.8%
associate-/r*81.8%
distribute-neg-frac281.8%
Simplified81.8%
Taylor expanded in t1 around inf 67.3%
associate-*r/67.3%
neg-mul-167.3%
Simplified67.3%
if 2.8999999999999999e218 < u Initial program 80.4%
associate-/l*80.9%
distribute-lft-neg-out80.9%
distribute-rgt-neg-in80.9%
associate-/r*93.9%
distribute-neg-frac293.9%
Simplified93.9%
Taylor expanded in t1 around 0 93.9%
Taylor expanded in t1 around inf 35.3%
associate-*r/35.3%
mul-1-neg35.3%
Simplified35.3%
Final simplification62.8%
(FPCore (u v t1) :precision binary64 (if (<= u -5.2e+202) (/ v u) (if (<= u 4.2e+218) (/ v (- t1)) (/ v (- u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -5.2e+202) {
tmp = v / u;
} else if (u <= 4.2e+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 <= (-5.2d+202)) then
tmp = v / u
else if (u <= 4.2d+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 <= -5.2e+202) {
tmp = v / u;
} else if (u <= 4.2e+218) {
tmp = v / -t1;
} else {
tmp = v / -u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -5.2e+202: tmp = v / u elif u <= 4.2e+218: tmp = v / -t1 else: tmp = v / -u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -5.2e+202) tmp = Float64(v / u); elseif (u <= 4.2e+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 <= -5.2e+202) tmp = v / u; elseif (u <= 4.2e+218) tmp = v / -t1; else tmp = v / -u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -5.2e+202], N[(v / u), $MachinePrecision], If[LessEqual[u, 4.2e+218], N[(v / (-t1)), $MachinePrecision], N[(v / (-u)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -5.2 \cdot 10^{+202}:\\
\;\;\;\;\frac{v}{u}\\
\mathbf{elif}\;u \leq 4.2 \cdot 10^{+218}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-u}\\
\end{array}
\end{array}
if u < -5.2000000000000004e202Initial program 68.2%
associate-/l*68.8%
distribute-lft-neg-out68.8%
distribute-rgt-neg-in68.8%
associate-/r*88.3%
distribute-neg-frac288.3%
Simplified88.3%
associate-*r/99.8%
neg-mul-199.8%
associate-/r*99.8%
Applied egg-rr99.8%
Taylor expanded in t1 around inf 42.5%
mul-1-neg42.5%
Simplified42.5%
clear-num44.4%
associate-/r/42.5%
add-sqr-sqrt29.1%
sqrt-unprod42.1%
sqr-neg42.1%
sqrt-unprod13.4%
add-sqr-sqrt42.9%
Applied egg-rr42.9%
Taylor expanded in t1 around 0 42.9%
if -5.2000000000000004e202 < u < 4.1999999999999998e218Initial program 70.3%
associate-/l*70.8%
distribute-lft-neg-out70.8%
distribute-rgt-neg-in70.8%
associate-/r*81.8%
distribute-neg-frac281.8%
Simplified81.8%
Taylor expanded in t1 around inf 67.3%
associate-*r/67.3%
neg-mul-167.3%
Simplified67.3%
if 4.1999999999999998e218 < u Initial program 80.4%
associate-/l*80.9%
distribute-lft-neg-out80.9%
distribute-rgt-neg-in80.9%
associate-/r*93.9%
distribute-neg-frac293.9%
Simplified93.9%
Taylor expanded in t1 around 0 93.9%
Taylor expanded in t1 around inf 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.45e+91) (not (<= t1 1.65e+134))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.45e+91) || !(t1 <= 1.65e+134)) {
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.45d+91)) .or. (.not. (t1 <= 1.65d+134))) 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.45e+91) || !(t1 <= 1.65e+134)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.45e+91) or not (t1 <= 1.65e+134): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.45e+91) || !(t1 <= 1.65e+134)) 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.45e+91) || ~((t1 <= 1.65e+134))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.45e+91], N[Not[LessEqual[t1, 1.65e+134]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.45 \cdot 10^{+91} \lor \neg \left(t1 \leq 1.65 \cdot 10^{+134}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -1.45000000000000007e91 or 1.65e134 < t1 Initial program 51.0%
associate-/l*51.9%
distribute-lft-neg-out51.9%
distribute-rgt-neg-in51.9%
associate-/r*68.6%
distribute-neg-frac268.6%
Simplified68.6%
Taylor expanded in t1 around inf 87.1%
associate-*r/87.1%
neg-mul-187.1%
Simplified87.1%
*-un-lft-identity87.1%
*-commutative87.1%
add-sqr-sqrt40.8%
sqrt-unprod47.5%
sqr-neg47.5%
sqrt-unprod20.0%
add-sqr-sqrt34.1%
Applied egg-rr34.1%
*-rgt-identity34.1%
Simplified34.1%
if -1.45000000000000007e91 < t1 < 1.65e134Initial program 83.6%
associate-/l*83.9%
distribute-lft-neg-out83.9%
distribute-rgt-neg-in83.9%
associate-/r*92.8%
distribute-neg-frac292.8%
Simplified92.8%
associate-*r/99.8%
neg-mul-199.8%
associate-/r*99.8%
Applied egg-rr99.8%
Taylor expanded in t1 around inf 49.1%
mul-1-neg49.1%
Simplified49.1%
clear-num49.3%
associate-/r/49.0%
add-sqr-sqrt27.5%
sqrt-unprod29.3%
sqr-neg29.3%
sqrt-unprod7.8%
add-sqr-sqrt15.2%
Applied egg-rr15.2%
Taylor expanded in t1 around 0 18.2%
Final simplification24.4%
(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 / Float64(Float64(-u) - t1))) / 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 / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{v \cdot \frac{t1}{\left(-u\right) - t1}}{t1 + u}
\end{array}
Initial program 70.8%
associate-/l*71.4%
distribute-lft-neg-out71.4%
distribute-rgt-neg-in71.4%
associate-/r*83.3%
distribute-neg-frac283.3%
Simplified83.3%
distribute-frac-neg283.3%
associate-/r*71.4%
distribute-rgt-neg-in71.4%
distribute-lft-neg-out71.4%
associate-*r/70.8%
times-frac98.8%
frac-2neg98.8%
associate-*r/98.8%
add-sqr-sqrt54.7%
sqrt-unprod48.9%
sqr-neg48.9%
sqrt-unprod17.4%
add-sqr-sqrt34.8%
add-sqr-sqrt16.8%
sqrt-unprod52.0%
sqr-neg52.0%
sqrt-prod44.7%
add-sqr-sqrt98.8%
Applied egg-rr98.8%
Final simplification98.8%
(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 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 (- (- 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 70.8%
associate-/l*71.4%
distribute-lft-neg-out71.4%
distribute-rgt-neg-in71.4%
associate-/r*83.3%
distribute-neg-frac283.3%
Simplified83.3%
associate-*r/99.9%
neg-mul-199.9%
associate-/r*99.9%
Applied egg-rr99.9%
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%
associate-/l*71.4%
distribute-lft-neg-out71.4%
distribute-rgt-neg-in71.4%
associate-/r*83.3%
distribute-neg-frac283.3%
Simplified83.3%
associate-*r/99.9%
neg-mul-199.9%
associate-/r*99.9%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 64.4%
mul-1-neg64.4%
Simplified64.4%
add-sqr-sqrt37.1%
sqrt-unprod71.6%
sqr-neg71.6%
sqrt-unprod27.7%
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%
associate-/l*71.4%
distribute-lft-neg-out71.4%
distribute-rgt-neg-in71.4%
associate-/r*83.3%
distribute-neg-frac283.3%
Simplified83.3%
Taylor expanded in t1 around inf 57.8%
associate-*r/57.8%
neg-mul-157.8%
Simplified57.8%
*-un-lft-identity57.8%
*-commutative57.8%
add-sqr-sqrt29.8%
sqrt-unprod34.9%
sqr-neg34.9%
sqrt-unprod9.0%
add-sqr-sqrt15.1%
Applied egg-rr15.1%
*-rgt-identity15.1%
Simplified15.1%
herbie shell --seed 2024150
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))