
(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 18 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 (/ (* 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 78.0%
associate-/l*76.3%
distribute-lft-neg-out76.3%
distribute-rgt-neg-in76.3%
associate-/r*86.9%
distribute-neg-frac286.9%
Simplified86.9%
distribute-frac-neg286.9%
distribute-rgt-neg-out86.9%
associate-/r*76.3%
distribute-lft-neg-out76.3%
associate-/l*78.0%
times-frac97.7%
frac-2neg97.7%
associate-*r/98.0%
add-sqr-sqrt49.1%
sqrt-unprod42.6%
sqr-neg42.6%
sqrt-unprod19.2%
add-sqr-sqrt38.4%
add-sqr-sqrt18.0%
sqrt-unprod60.6%
sqr-neg60.6%
sqrt-prod50.2%
add-sqr-sqrt98.0%
Applied egg-rr98.0%
Final simplification98.0%
(FPCore (u v t1)
:precision binary64
(if (<= t1 -3.8e+151)
(/ v (- u t1))
(if (<= t1 1.82e+117)
(* t1 (/ (/ v (+ t1 u)) (- (- u) t1)))
(/ v (- (* u (- 2.0)) t1)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -3.8e+151) {
tmp = v / (u - t1);
} else if (t1 <= 1.82e+117) {
tmp = t1 * ((v / (t1 + u)) / (-u - t1));
} else {
tmp = v / ((u * -2.0) - t1);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (t1 <= (-3.8d+151)) then
tmp = v / (u - t1)
else if (t1 <= 1.82d+117) then
tmp = t1 * ((v / (t1 + u)) / (-u - t1))
else
tmp = v / ((u * -2.0d0) - t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -3.8e+151) {
tmp = v / (u - t1);
} else if (t1 <= 1.82e+117) {
tmp = t1 * ((v / (t1 + u)) / (-u - t1));
} else {
tmp = v / ((u * -2.0) - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -3.8e+151: tmp = v / (u - t1) elif t1 <= 1.82e+117: tmp = t1 * ((v / (t1 + u)) / (-u - t1)) else: tmp = v / ((u * -2.0) - t1) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -3.8e+151) tmp = Float64(v / Float64(u - t1)); elseif (t1 <= 1.82e+117) tmp = Float64(t1 * Float64(Float64(v / Float64(t1 + u)) / Float64(Float64(-u) - t1))); else tmp = Float64(v / Float64(Float64(u * Float64(-2.0)) - t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -3.8e+151) tmp = v / (u - t1); elseif (t1 <= 1.82e+117) tmp = t1 * ((v / (t1 + u)) / (-u - t1)); else tmp = v / ((u * -2.0) - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -3.8e+151], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 1.82e+117], N[(t1 * N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / N[(N[(u * (-2.0)), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -3.8 \cdot 10^{+151}:\\
\;\;\;\;\frac{v}{u - t1}\\
\mathbf{elif}\;t1 \leq 1.82 \cdot 10^{+117}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{t1 + u}}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u \cdot \left(-2\right) - t1}\\
\end{array}
\end{array}
if t1 < -3.8e151Initial program 46.3%
associate-/l*47.9%
distribute-lft-neg-out47.9%
distribute-rgt-neg-in47.9%
associate-/r*72.7%
distribute-neg-frac272.7%
Simplified72.7%
distribute-frac-neg272.7%
distribute-rgt-neg-out72.7%
associate-/r*47.9%
distribute-lft-neg-out47.9%
associate-/l*46.3%
times-frac100.0%
frac-2neg100.0%
associate-*r/100.0%
add-sqr-sqrt99.5%
sqrt-unprod2.2%
sqr-neg2.2%
sqrt-unprod0.0%
add-sqr-sqrt47.0%
add-sqr-sqrt46.7%
sqrt-unprod47.9%
sqr-neg47.9%
sqrt-prod5.4%
add-sqr-sqrt100.0%
Applied egg-rr100.0%
Taylor expanded in t1 around inf 92.2%
mul-1-neg92.2%
Simplified92.2%
div-inv92.2%
add-sqr-sqrt43.3%
sqrt-unprod57.7%
sqr-neg57.7%
sqrt-unprod22.4%
add-sqr-sqrt47.1%
frac-2neg47.1%
metadata-eval47.1%
distribute-neg-in47.1%
add-sqr-sqrt47.1%
sqrt-unprod47.9%
sqr-neg47.9%
sqrt-unprod0.0%
add-sqr-sqrt92.2%
sub-neg92.2%
Applied egg-rr92.2%
associate-*r/92.3%
*-commutative92.3%
mul-1-neg92.3%
Simplified92.3%
if -3.8e151 < t1 < 1.82000000000000001e117Initial program 86.2%
associate-/l*84.9%
distribute-lft-neg-out84.9%
distribute-rgt-neg-in84.9%
associate-/r*92.1%
distribute-neg-frac292.1%
Simplified92.1%
if 1.82000000000000001e117 < t1 Initial program 69.3%
associate-/l*62.3%
distribute-lft-neg-out62.3%
distribute-rgt-neg-in62.3%
associate-/r*75.3%
distribute-neg-frac275.3%
Simplified75.3%
associate-*r/100.0%
+-commutative100.0%
distribute-neg-in100.0%
sub-neg100.0%
associate-*l/99.9%
clear-num99.9%
frac-2neg99.9%
frac-times97.6%
*-un-lft-identity97.6%
frac-2neg97.6%
sub-neg97.6%
distribute-neg-in97.6%
+-commutative97.6%
remove-double-neg97.6%
add-sqr-sqrt0.0%
sqrt-unprod7.5%
sqr-neg7.5%
sqrt-unprod56.4%
add-sqr-sqrt56.4%
add-sqr-sqrt5.8%
sqrt-unprod69.8%
Applied egg-rr97.6%
Taylor expanded in u around 0 93.6%
*-commutative93.6%
Simplified93.6%
Final simplification92.4%
(FPCore (u v t1) :precision binary64 (if (or (<= u -9.5e-24) (not (<= u 7e+28))) (* (/ v u) (/ t1 (- u))) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -9.5e-24) || !(u <= 7e+28)) {
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 <= (-9.5d-24)) .or. (.not. (u <= 7d+28))) 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 <= -9.5e-24) || !(u <= 7e+28)) {
tmp = (v / u) * (t1 / -u);
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -9.5e-24) or not (u <= 7e+28): tmp = (v / u) * (t1 / -u) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -9.5e-24) || !(u <= 7e+28)) 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 <= -9.5e-24) || ~((u <= 7e+28))) tmp = (v / u) * (t1 / -u); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -9.5e-24], N[Not[LessEqual[u, 7e+28]], $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 -9.5 \cdot 10^{-24} \lor \neg \left(u \leq 7 \cdot 10^{+28}\right):\\
\;\;\;\;\frac{v}{u} \cdot \frac{t1}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -9.50000000000000029e-24 or 6.9999999999999999e28 < u Initial program 80.8%
times-frac98.2%
distribute-frac-neg98.2%
distribute-neg-frac298.2%
+-commutative98.2%
distribute-neg-in98.2%
unsub-neg98.2%
Simplified98.2%
Taylor expanded in t1 around 0 83.0%
Taylor expanded in t1 around 0 83.8%
associate-*r/83.8%
mul-1-neg83.8%
Simplified83.8%
if -9.50000000000000029e-24 < u < 6.9999999999999999e28Initial program 75.4%
associate-/l*71.0%
distribute-lft-neg-out71.0%
distribute-rgt-neg-in71.0%
associate-/r*81.2%
distribute-neg-frac281.2%
Simplified81.2%
Taylor expanded in t1 around inf 85.2%
associate-*r/85.2%
neg-mul-185.2%
Simplified85.2%
Final simplification84.5%
(FPCore (u v t1) :precision binary64 (if (or (<= u -3e-24) (not (<= u 1.55e+24))) (/ t1 (* u (/ u (- v)))) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -3e-24) || !(u <= 1.55e+24)) {
tmp = t1 / (u * (u / -v));
} else {
tmp = v / -t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-3d-24)) .or. (.not. (u <= 1.55d+24))) then
tmp = t1 / (u * (u / -v))
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -3e-24) || !(u <= 1.55e+24)) {
tmp = t1 / (u * (u / -v));
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -3e-24) or not (u <= 1.55e+24): tmp = t1 / (u * (u / -v)) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -3e-24) || !(u <= 1.55e+24)) tmp = Float64(t1 / Float64(u * Float64(u / Float64(-v)))); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -3e-24) || ~((u <= 1.55e+24))) tmp = t1 / (u * (u / -v)); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -3e-24], N[Not[LessEqual[u, 1.55e+24]], $MachinePrecision]], N[(t1 / N[(u * N[(u / (-v)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3 \cdot 10^{-24} \lor \neg \left(u \leq 1.55 \cdot 10^{+24}\right):\\
\;\;\;\;\frac{t1}{u \cdot \frac{u}{-v}}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -2.99999999999999995e-24 or 1.55000000000000005e24 < u Initial program 81.0%
times-frac98.2%
distribute-frac-neg98.2%
distribute-neg-frac298.2%
+-commutative98.2%
distribute-neg-in98.2%
unsub-neg98.2%
Simplified98.2%
Taylor expanded in t1 around 0 82.9%
Taylor expanded in t1 around 0 83.2%
associate-*r/83.2%
mul-1-neg83.2%
Simplified83.2%
*-commutative83.2%
clear-num84.0%
frac-2neg84.0%
frac-times86.3%
*-un-lft-identity86.3%
remove-double-neg86.3%
Applied egg-rr86.3%
if -2.99999999999999995e-24 < u < 1.55000000000000005e24Initial program 75.3%
associate-/l*70.8%
distribute-lft-neg-out70.8%
distribute-rgt-neg-in70.8%
associate-/r*81.0%
distribute-neg-frac281.0%
Simplified81.0%
Taylor expanded in t1 around inf 85.1%
associate-*r/85.1%
neg-mul-185.1%
Simplified85.1%
Final simplification85.7%
(FPCore (u v t1) :precision binary64 (if (<= u -5.4e-26) (/ t1 (* u (/ u (- v)))) (if (<= u 8e+29) (/ v (- t1)) (/ (* t1 (/ v u)) (- u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -5.4e-26) {
tmp = t1 / (u * (u / -v));
} else if (u <= 8e+29) {
tmp = v / -t1;
} 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 <= (-5.4d-26)) then
tmp = t1 / (u * (u / -v))
else if (u <= 8d+29) then
tmp = v / -t1
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 <= -5.4e-26) {
tmp = t1 / (u * (u / -v));
} else if (u <= 8e+29) {
tmp = v / -t1;
} else {
tmp = (t1 * (v / u)) / -u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -5.4e-26: tmp = t1 / (u * (u / -v)) elif u <= 8e+29: tmp = v / -t1 else: tmp = (t1 * (v / u)) / -u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -5.4e-26) tmp = Float64(t1 / Float64(u * Float64(u / Float64(-v)))); elseif (u <= 8e+29) tmp = Float64(v / Float64(-t1)); else tmp = Float64(Float64(t1 * Float64(v / u)) / Float64(-u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -5.4e-26) tmp = t1 / (u * (u / -v)); elseif (u <= 8e+29) tmp = v / -t1; else tmp = (t1 * (v / u)) / -u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -5.4e-26], N[(t1 / N[(u * N[(u / (-v)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 8e+29], N[(v / (-t1)), $MachinePrecision], N[(N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -5.4 \cdot 10^{-26}:\\
\;\;\;\;\frac{t1}{u \cdot \frac{u}{-v}}\\
\mathbf{elif}\;u \leq 8 \cdot 10^{+29}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{u}}{-u}\\
\end{array}
\end{array}
if u < -5.39999999999999963e-26Initial program 80.0%
times-frac98.3%
distribute-frac-neg98.3%
distribute-neg-frac298.3%
+-commutative98.3%
distribute-neg-in98.3%
unsub-neg98.3%
Simplified98.3%
Taylor expanded in t1 around 0 83.2%
Taylor expanded in t1 around 0 84.6%
associate-*r/84.6%
mul-1-neg84.6%
Simplified84.6%
*-commutative84.6%
clear-num84.6%
frac-2neg84.6%
frac-times87.8%
*-un-lft-identity87.8%
remove-double-neg87.8%
Applied egg-rr87.8%
if -5.39999999999999963e-26 < u < 7.99999999999999931e29Initial program 75.4%
associate-/l*71.0%
distribute-lft-neg-out71.0%
distribute-rgt-neg-in71.0%
associate-/r*81.2%
distribute-neg-frac281.2%
Simplified81.2%
Taylor expanded in t1 around inf 85.2%
associate-*r/85.2%
neg-mul-185.2%
Simplified85.2%
if 7.99999999999999931e29 < u Initial program 81.6%
times-frac98.2%
distribute-frac-neg98.2%
distribute-neg-frac298.2%
+-commutative98.2%
distribute-neg-in98.2%
unsub-neg98.2%
Simplified98.2%
Taylor expanded in t1 around 0 82.9%
Taylor expanded in t1 around 0 83.0%
associate-*r/83.0%
mul-1-neg83.0%
Simplified83.0%
distribute-frac-neg83.0%
distribute-frac-neg283.0%
associate-*l/84.5%
Applied egg-rr84.5%
Final simplification85.7%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.66e+31) (not (<= u 2e+32))) (/ v (* u (/ u t1))) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.66e+31) || !(u <= 2e+32)) {
tmp = v / (u * (u / t1));
} else {
tmp = v / -t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-1.66d+31)) .or. (.not. (u <= 2d+32))) then
tmp = v / (u * (u / t1))
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.66e+31) || !(u <= 2e+32)) {
tmp = v / (u * (u / t1));
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.66e+31) or not (u <= 2e+32): tmp = v / (u * (u / t1)) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.66e+31) || !(u <= 2e+32)) tmp = Float64(v / Float64(u * Float64(u / t1))); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -1.66e+31) || ~((u <= 2e+32))) tmp = v / (u * (u / t1)); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.66e+31], N[Not[LessEqual[u, 2e+32]], $MachinePrecision]], N[(v / N[(u * N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.66 \cdot 10^{+31} \lor \neg \left(u \leq 2 \cdot 10^{+32}\right):\\
\;\;\;\;\frac{v}{u \cdot \frac{u}{t1}}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -1.6599999999999999e31 or 2.00000000000000011e32 < u Initial program 80.6%
times-frac98.1%
distribute-frac-neg98.1%
distribute-neg-frac298.1%
+-commutative98.1%
distribute-neg-in98.1%
unsub-neg98.1%
Simplified98.1%
Taylor expanded in t1 around 0 84.7%
Taylor expanded in t1 around 0 84.6%
associate-*r/84.6%
mul-1-neg84.6%
Simplified84.6%
clear-num84.6%
frac-times70.9%
*-un-lft-identity70.9%
add-sqr-sqrt36.7%
sqrt-unprod54.1%
sqr-neg54.1%
sqrt-unprod27.5%
add-sqr-sqrt59.5%
Applied egg-rr59.5%
if -1.6599999999999999e31 < u < 2.00000000000000011e32Initial program 76.1%
associate-/l*72.2%
distribute-lft-neg-out72.2%
distribute-rgt-neg-in72.2%
associate-/r*82.8%
distribute-neg-frac282.8%
Simplified82.8%
Taylor expanded in t1 around inf 80.7%
associate-*r/80.7%
neg-mul-180.7%
Simplified80.7%
Final simplification71.7%
(FPCore (u v t1) :precision binary64 (if (or (<= u -2.75e+31) (not (<= u 2e+32))) (/ (* t1 (/ v u)) u) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.75e+31) || !(u <= 2e+32)) {
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.75d+31)) .or. (.not. (u <= 2d+32))) 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.75e+31) || !(u <= 2e+32)) {
tmp = (t1 * (v / u)) / u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -2.75e+31) or not (u <= 2e+32): tmp = (t1 * (v / u)) / u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -2.75e+31) || !(u <= 2e+32)) tmp = Float64(Float64(t1 * Float64(v / u)) / u); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -2.75e+31) || ~((u <= 2e+32))) tmp = (t1 * (v / u)) / u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2.75e+31], N[Not[LessEqual[u, 2e+32]], $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 -2.75 \cdot 10^{+31} \lor \neg \left(u \leq 2 \cdot 10^{+32}\right):\\
\;\;\;\;\frac{t1 \cdot \frac{v}{u}}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -2.75000000000000001e31 or 2.00000000000000011e32 < u Initial program 80.6%
times-frac98.1%
distribute-frac-neg98.1%
distribute-neg-frac298.1%
+-commutative98.1%
distribute-neg-in98.1%
unsub-neg98.1%
Simplified98.1%
Taylor expanded in t1 around 0 84.7%
Taylor expanded in t1 around 0 84.6%
associate-*r/84.6%
mul-1-neg84.6%
Simplified84.6%
associate-*l/86.3%
add-sqr-sqrt47.0%
sqrt-unprod57.1%
sqr-neg57.1%
sqrt-unprod27.4%
add-sqr-sqrt60.4%
Applied egg-rr60.4%
if -2.75000000000000001e31 < u < 2.00000000000000011e32Initial program 76.1%
associate-/l*72.2%
distribute-lft-neg-out72.2%
distribute-rgt-neg-in72.2%
associate-/r*82.8%
distribute-neg-frac282.8%
Simplified82.8%
Taylor expanded in t1 around inf 80.7%
associate-*r/80.7%
neg-mul-180.7%
Simplified80.7%
Final simplification72.0%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1e+168) (not (<= u 9.2e+145))) (* (/ v u) -0.5) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1e+168) || !(u <= 9.2e+145)) {
tmp = (v / u) * -0.5;
} else {
tmp = v / -t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-1d+168)) .or. (.not. (u <= 9.2d+145))) then
tmp = (v / u) * (-0.5d0)
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -1e+168) || !(u <= 9.2e+145)) {
tmp = (v / u) * -0.5;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1e+168) or not (u <= 9.2e+145): tmp = (v / u) * -0.5 else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1e+168) || !(u <= 9.2e+145)) tmp = Float64(Float64(v / u) * -0.5); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -1e+168) || ~((u <= 9.2e+145))) tmp = (v / u) * -0.5; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1e+168], N[Not[LessEqual[u, 9.2e+145]], $MachinePrecision]], N[(N[(v / u), $MachinePrecision] * -0.5), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1 \cdot 10^{+168} \lor \neg \left(u \leq 9.2 \cdot 10^{+145}\right):\\
\;\;\;\;\frac{v}{u} \cdot -0.5\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -9.9999999999999993e167 or 9.2e145 < u Initial program 79.8%
associate-/l*80.1%
distribute-lft-neg-out80.1%
distribute-rgt-neg-in80.1%
associate-/r*93.7%
distribute-neg-frac293.7%
Simplified93.7%
associate-*r/99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*l/99.9%
clear-num99.8%
frac-2neg99.8%
frac-times85.0%
*-un-lft-identity85.0%
frac-2neg85.0%
sub-neg85.0%
distribute-neg-in85.0%
+-commutative85.0%
remove-double-neg85.0%
add-sqr-sqrt46.8%
sqrt-unprod59.1%
sqr-neg59.1%
sqrt-unprod33.6%
add-sqr-sqrt78.4%
add-sqr-sqrt36.8%
sqrt-unprod80.1%
Applied egg-rr85.0%
Taylor expanded in u around 0 48.0%
*-commutative48.0%
Simplified48.0%
Taylor expanded in t1 around 0 41.9%
if -9.9999999999999993e167 < u < 9.2e145Initial program 77.4%
associate-/l*75.1%
distribute-lft-neg-out75.1%
distribute-rgt-neg-in75.1%
associate-/r*84.8%
distribute-neg-frac284.8%
Simplified84.8%
Taylor expanded in t1 around inf 68.1%
associate-*r/68.1%
neg-mul-168.1%
Simplified68.1%
Final simplification61.8%
(FPCore (u v t1) :precision binary64 (if (or (<= u -3.9e+167) (not (<= u 4e+145))) (/ v (+ t1 u)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.9e+167) || !(u <= 4e+145)) {
tmp = v / (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 <= (-3.9d+167)) .or. (.not. (u <= 4d+145))) then
tmp = v / (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 <= -3.9e+167) || !(u <= 4e+145)) {
tmp = v / (t1 + u);
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -3.9e+167) or not (u <= 4e+145): tmp = v / (t1 + u) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -3.9e+167) || !(u <= 4e+145)) tmp = Float64(v / Float64(t1 + u)); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -3.9e+167) || ~((u <= 4e+145))) tmp = v / (t1 + u); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -3.9e+167], N[Not[LessEqual[u, 4e+145]], $MachinePrecision]], N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.9 \cdot 10^{+167} \lor \neg \left(u \leq 4 \cdot 10^{+145}\right):\\
\;\;\;\;\frac{v}{t1 + u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -3.8999999999999998e167 or 4e145 < u Initial program 79.8%
associate-/l*80.1%
distribute-lft-neg-out80.1%
distribute-rgt-neg-in80.1%
associate-/r*93.7%
distribute-neg-frac293.7%
Simplified93.7%
Taylor expanded in t1 around inf 46.0%
associate-*r/47.8%
clear-num48.4%
add-sqr-sqrt22.5%
sqrt-unprod72.0%
sqr-neg72.0%
sqrt-unprod24.3%
add-sqr-sqrt46.7%
Applied egg-rr46.7%
associate-/r/45.8%
associate-*r/47.3%
associate-*r/58.7%
associate-*l/58.7%
*-lft-identity58.7%
*-commutative58.7%
associate-/r*50.5%
times-frac45.9%
*-inverses45.9%
*-rgt-identity45.9%
Simplified45.9%
if -3.8999999999999998e167 < u < 4e145Initial program 77.4%
associate-/l*75.1%
distribute-lft-neg-out75.1%
distribute-rgt-neg-in75.1%
associate-/r*84.8%
distribute-neg-frac284.8%
Simplified84.8%
Taylor expanded in t1 around inf 68.1%
associate-*r/68.1%
neg-mul-168.1%
Simplified68.1%
Final simplification62.8%
(FPCore (u v t1) :precision binary64 (if (<= u -1.45e+169) (* (/ v u) -0.5) (if (<= u 1.75e+146) (/ v (- t1)) (* v (/ -0.5 u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.45e+169) {
tmp = (v / u) * -0.5;
} else if (u <= 1.75e+146) {
tmp = v / -t1;
} else {
tmp = v * (-0.5 / u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-1.45d+169)) then
tmp = (v / u) * (-0.5d0)
else if (u <= 1.75d+146) then
tmp = v / -t1
else
tmp = v * ((-0.5d0) / u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -1.45e+169) {
tmp = (v / u) * -0.5;
} else if (u <= 1.75e+146) {
tmp = v / -t1;
} else {
tmp = v * (-0.5 / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.45e+169: tmp = (v / u) * -0.5 elif u <= 1.75e+146: tmp = v / -t1 else: tmp = v * (-0.5 / u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.45e+169) tmp = Float64(Float64(v / u) * -0.5); elseif (u <= 1.75e+146) tmp = Float64(v / Float64(-t1)); else tmp = Float64(v * Float64(-0.5 / u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -1.45e+169) tmp = (v / u) * -0.5; elseif (u <= 1.75e+146) tmp = v / -t1; else tmp = v * (-0.5 / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.45e+169], N[(N[(v / u), $MachinePrecision] * -0.5), $MachinePrecision], If[LessEqual[u, 1.75e+146], N[(v / (-t1)), $MachinePrecision], N[(v * N[(-0.5 / u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.45 \cdot 10^{+169}:\\
\;\;\;\;\frac{v}{u} \cdot -0.5\\
\mathbf{elif}\;u \leq 1.75 \cdot 10^{+146}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;v \cdot \frac{-0.5}{u}\\
\end{array}
\end{array}
if u < -1.45e169Initial program 79.9%
associate-/l*80.1%
distribute-lft-neg-out80.1%
distribute-rgt-neg-in80.1%
associate-/r*96.8%
distribute-neg-frac296.8%
Simplified96.8%
associate-*r/100.0%
+-commutative100.0%
distribute-neg-in100.0%
sub-neg100.0%
associate-*l/99.9%
clear-num99.8%
frac-2neg99.8%
frac-times83.6%
*-un-lft-identity83.6%
frac-2neg83.6%
sub-neg83.6%
distribute-neg-in83.6%
+-commutative83.6%
remove-double-neg83.6%
add-sqr-sqrt45.5%
sqrt-unprod58.1%
sqr-neg58.1%
sqrt-unprod38.1%
add-sqr-sqrt80.1%
add-sqr-sqrt72.7%
sqrt-unprod80.1%
Applied egg-rr83.6%
Taylor expanded in u around 0 47.9%
*-commutative47.9%
Simplified47.9%
Taylor expanded in t1 around 0 44.7%
if -1.45e169 < u < 1.7500000000000001e146Initial program 77.4%
associate-/l*75.1%
distribute-lft-neg-out75.1%
distribute-rgt-neg-in75.1%
associate-/r*84.8%
distribute-neg-frac284.8%
Simplified84.8%
Taylor expanded in t1 around inf 68.1%
associate-*r/68.1%
neg-mul-168.1%
Simplified68.1%
if 1.7500000000000001e146 < u Initial program 79.8%
associate-/l*80.1%
distribute-lft-neg-out80.1%
distribute-rgt-neg-in80.1%
associate-/r*91.2%
distribute-neg-frac291.2%
Simplified91.2%
associate-*r/99.8%
+-commutative99.8%
distribute-neg-in99.8%
sub-neg99.8%
associate-*l/99.9%
clear-num99.9%
frac-2neg99.9%
frac-times86.1%
*-un-lft-identity86.1%
frac-2neg86.1%
sub-neg86.1%
distribute-neg-in86.1%
+-commutative86.1%
remove-double-neg86.1%
add-sqr-sqrt47.7%
sqrt-unprod59.9%
sqr-neg59.9%
sqrt-unprod30.0%
add-sqr-sqrt77.1%
add-sqr-sqrt8.3%
sqrt-unprod80.1%
Applied egg-rr86.1%
Taylor expanded in u around 0 48.0%
*-commutative48.0%
Simplified48.0%
Taylor expanded in t1 around 0 39.7%
associate-*r/39.7%
*-commutative39.7%
associate-/l*39.7%
Simplified39.7%
Final simplification61.8%
(FPCore (u v t1) :precision binary64 (if (<= u -1.5e+170) (* (/ v u) -0.5) (if (<= u 6.5e+145) (/ v (- t1)) (/ -0.5 (/ u v)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.5e+170) {
tmp = (v / u) * -0.5;
} else if (u <= 6.5e+145) {
tmp = v / -t1;
} else {
tmp = -0.5 / (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+170)) then
tmp = (v / u) * (-0.5d0)
else if (u <= 6.5d+145) then
tmp = v / -t1
else
tmp = (-0.5d0) / (u / v)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -1.5e+170) {
tmp = (v / u) * -0.5;
} else if (u <= 6.5e+145) {
tmp = v / -t1;
} else {
tmp = -0.5 / (u / v);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.5e+170: tmp = (v / u) * -0.5 elif u <= 6.5e+145: tmp = v / -t1 else: tmp = -0.5 / (u / v) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.5e+170) tmp = Float64(Float64(v / u) * -0.5); elseif (u <= 6.5e+145) tmp = Float64(v / Float64(-t1)); else tmp = Float64(-0.5 / Float64(u / v)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -1.5e+170) tmp = (v / u) * -0.5; elseif (u <= 6.5e+145) tmp = v / -t1; else tmp = -0.5 / (u / v); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.5e+170], N[(N[(v / u), $MachinePrecision] * -0.5), $MachinePrecision], If[LessEqual[u, 6.5e+145], N[(v / (-t1)), $MachinePrecision], N[(-0.5 / N[(u / v), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.5 \cdot 10^{+170}:\\
\;\;\;\;\frac{v}{u} \cdot -0.5\\
\mathbf{elif}\;u \leq 6.5 \cdot 10^{+145}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{-0.5}{\frac{u}{v}}\\
\end{array}
\end{array}
if u < -1.49999999999999998e170Initial program 79.9%
associate-/l*80.1%
distribute-lft-neg-out80.1%
distribute-rgt-neg-in80.1%
associate-/r*96.8%
distribute-neg-frac296.8%
Simplified96.8%
associate-*r/100.0%
+-commutative100.0%
distribute-neg-in100.0%
sub-neg100.0%
associate-*l/99.9%
clear-num99.8%
frac-2neg99.8%
frac-times83.6%
*-un-lft-identity83.6%
frac-2neg83.6%
sub-neg83.6%
distribute-neg-in83.6%
+-commutative83.6%
remove-double-neg83.6%
add-sqr-sqrt45.5%
sqrt-unprod58.1%
sqr-neg58.1%
sqrt-unprod38.1%
add-sqr-sqrt80.1%
add-sqr-sqrt72.7%
sqrt-unprod80.1%
Applied egg-rr83.6%
Taylor expanded in u around 0 47.9%
*-commutative47.9%
Simplified47.9%
Taylor expanded in t1 around 0 44.7%
if -1.49999999999999998e170 < u < 6.50000000000000034e145Initial program 77.4%
associate-/l*75.1%
distribute-lft-neg-out75.1%
distribute-rgt-neg-in75.1%
associate-/r*84.8%
distribute-neg-frac284.8%
Simplified84.8%
Taylor expanded in t1 around inf 68.1%
associate-*r/68.1%
neg-mul-168.1%
Simplified68.1%
if 6.50000000000000034e145 < u Initial program 79.8%
associate-/l*80.1%
distribute-lft-neg-out80.1%
distribute-rgt-neg-in80.1%
associate-/r*91.2%
distribute-neg-frac291.2%
Simplified91.2%
associate-*r/99.8%
+-commutative99.8%
distribute-neg-in99.8%
sub-neg99.8%
associate-*l/99.9%
clear-num99.9%
frac-2neg99.9%
frac-times86.1%
*-un-lft-identity86.1%
frac-2neg86.1%
sub-neg86.1%
distribute-neg-in86.1%
+-commutative86.1%
remove-double-neg86.1%
add-sqr-sqrt47.7%
sqrt-unprod59.9%
sqr-neg59.9%
sqrt-unprod30.0%
add-sqr-sqrt77.1%
add-sqr-sqrt8.3%
sqrt-unprod80.1%
Applied egg-rr86.1%
Taylor expanded in u around 0 48.0%
*-commutative48.0%
Simplified48.0%
Taylor expanded in t1 around 0 39.7%
clear-num41.3%
un-div-inv41.3%
Applied egg-rr41.3%
Final simplification62.0%
(FPCore (u v t1) :precision binary64 (if (or (<= u -3.8e+170) (not (<= u 1.8e+146))) (/ v u) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.8e+170) || !(u <= 1.8e+146)) {
tmp = v / u;
} else {
tmp = v / -t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-3.8d+170)) .or. (.not. (u <= 1.8d+146))) then
tmp = v / u
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.8e+170) || !(u <= 1.8e+146)) {
tmp = v / u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -3.8e+170) or not (u <= 1.8e+146): tmp = v / u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -3.8e+170) || !(u <= 1.8e+146)) tmp = Float64(v / u); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -3.8e+170) || ~((u <= 1.8e+146))) tmp = v / u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -3.8e+170], N[Not[LessEqual[u, 1.8e+146]], $MachinePrecision]], N[(v / u), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.8 \cdot 10^{+170} \lor \neg \left(u \leq 1.8 \cdot 10^{+146}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -3.7999999999999998e170 or 1.7999999999999999e146 < u Initial program 79.8%
associate-/l*80.1%
distribute-lft-neg-out80.1%
distribute-rgt-neg-in80.1%
associate-/r*93.7%
distribute-neg-frac293.7%
Simplified93.7%
distribute-frac-neg293.7%
distribute-rgt-neg-out93.7%
associate-/r*80.1%
distribute-lft-neg-out80.1%
associate-/l*79.8%
times-frac99.9%
frac-2neg99.9%
associate-*r/99.8%
add-sqr-sqrt55.6%
sqrt-unprod63.3%
sqr-neg63.3%
sqrt-unprod33.5%
add-sqr-sqrt78.2%
add-sqr-sqrt36.6%
sqrt-unprod80.1%
sqr-neg80.1%
sqrt-prod54.0%
add-sqr-sqrt99.8%
Applied egg-rr99.8%
Taylor expanded in t1 around inf 47.9%
mul-1-neg47.9%
Simplified47.9%
div-inv47.9%
add-sqr-sqrt19.2%
sqrt-unprod46.0%
sqr-neg46.0%
sqrt-unprod27.0%
add-sqr-sqrt45.9%
frac-2neg45.9%
metadata-eval45.9%
distribute-neg-in45.9%
add-sqr-sqrt29.7%
sqrt-unprod46.0%
sqr-neg46.0%
sqrt-unprod17.7%
add-sqr-sqrt47.8%
sub-neg47.8%
Applied egg-rr47.8%
associate-*r/47.8%
*-commutative47.8%
mul-1-neg47.8%
Simplified47.8%
Taylor expanded in t1 around 0 41.7%
if -3.7999999999999998e170 < u < 1.7999999999999999e146Initial program 77.4%
associate-/l*75.1%
distribute-lft-neg-out75.1%
distribute-rgt-neg-in75.1%
associate-/r*84.8%
distribute-neg-frac284.8%
Simplified84.8%
Taylor expanded in t1 around inf 68.1%
associate-*r/68.1%
neg-mul-168.1%
Simplified68.1%
Final simplification61.8%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.15e+171) (not (<= u 1.9e+146))) (/ v (- u)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.15e+171) || !(u <= 1.9e+146)) {
tmp = v / -u;
} else {
tmp = v / -t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-1.15d+171)) .or. (.not. (u <= 1.9d+146))) then
tmp = v / -u
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.15e+171) || !(u <= 1.9e+146)) {
tmp = v / -u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.15e+171) or not (u <= 1.9e+146): tmp = v / -u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.15e+171) || !(u <= 1.9e+146)) tmp = Float64(v / Float64(-u)); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -1.15e+171) || ~((u <= 1.9e+146))) tmp = v / -u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.15e+171], N[Not[LessEqual[u, 1.9e+146]], $MachinePrecision]], N[(v / (-u)), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.15 \cdot 10^{+171} \lor \neg \left(u \leq 1.9 \cdot 10^{+146}\right):\\
\;\;\;\;\frac{v}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -1.15000000000000009e171 or 1.8999999999999999e146 < u Initial program 79.8%
associate-/l*80.1%
distribute-lft-neg-out80.1%
distribute-rgt-neg-in80.1%
associate-/r*93.7%
distribute-neg-frac293.7%
Simplified93.7%
Taylor expanded in t1 around inf 46.0%
Taylor expanded in t1 around 0 41.9%
associate-*r/41.9%
mul-1-neg41.9%
Simplified41.9%
if -1.15000000000000009e171 < u < 1.8999999999999999e146Initial program 77.4%
associate-/l*75.1%
distribute-lft-neg-out75.1%
distribute-rgt-neg-in75.1%
associate-/r*84.8%
distribute-neg-frac284.8%
Simplified84.8%
Taylor expanded in t1 around inf 68.1%
associate-*r/68.1%
neg-mul-168.1%
Simplified68.1%
Final simplification61.8%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -2.4e+79) (not (<= t1 1.7e+19))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -2.4e+79) || !(t1 <= 1.7e+19)) {
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 <= (-2.4d+79)) .or. (.not. (t1 <= 1.7d+19))) 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 <= -2.4e+79) || !(t1 <= 1.7e+19)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -2.4e+79) or not (t1 <= 1.7e+19): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -2.4e+79) || !(t1 <= 1.7e+19)) 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 <= -2.4e+79) || ~((t1 <= 1.7e+19))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -2.4e+79], N[Not[LessEqual[t1, 1.7e+19]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2.4 \cdot 10^{+79} \lor \neg \left(t1 \leq 1.7 \cdot 10^{+19}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -2.39999999999999986e79 or 1.7e19 < t1 Initial program 67.2%
associate-/l*64.6%
distribute-lft-neg-out64.6%
distribute-rgt-neg-in64.6%
associate-/r*79.0%
distribute-neg-frac279.0%
Simplified79.0%
Taylor expanded in t1 around inf 71.1%
associate-*r/89.5%
clear-num87.5%
add-sqr-sqrt40.8%
sqrt-unprod51.1%
sqr-neg51.1%
sqrt-unprod23.1%
add-sqr-sqrt43.6%
Applied egg-rr43.6%
associate-/r/43.6%
associate-*r/43.3%
associate-*r/43.3%
associate-*l/43.3%
*-lft-identity43.3%
*-commutative43.3%
associate-/r*45.1%
times-frac43.6%
*-inverses43.6%
*-rgt-identity43.6%
Simplified43.6%
Taylor expanded in t1 around inf 42.1%
if -2.39999999999999986e79 < t1 < 1.7e19Initial program 86.2%
associate-/l*85.1%
distribute-lft-neg-out85.1%
distribute-rgt-neg-in85.1%
associate-/r*92.8%
distribute-neg-frac292.8%
Simplified92.8%
distribute-frac-neg292.8%
distribute-rgt-neg-out92.8%
associate-/r*85.1%
distribute-lft-neg-out85.1%
associate-/l*86.2%
times-frac96.0%
frac-2neg96.0%
associate-*r/96.6%
add-sqr-sqrt53.4%
sqrt-unprod59.6%
sqr-neg59.6%
sqrt-unprod14.2%
add-sqr-sqrt33.1%
add-sqr-sqrt15.4%
sqrt-unprod57.2%
sqr-neg57.2%
sqrt-prod46.4%
add-sqr-sqrt96.6%
Applied egg-rr96.6%
Taylor expanded in t1 around inf 42.9%
mul-1-neg42.9%
Simplified42.9%
div-inv42.8%
add-sqr-sqrt21.1%
sqrt-unprod27.9%
sqr-neg27.9%
sqrt-unprod9.1%
add-sqr-sqrt14.7%
frac-2neg14.7%
metadata-eval14.7%
distribute-neg-in14.7%
add-sqr-sqrt10.0%
sqrt-unprod25.5%
sqr-neg25.5%
sqrt-unprod16.4%
add-sqr-sqrt43.9%
sub-neg43.9%
Applied egg-rr43.9%
associate-*r/44.0%
*-commutative44.0%
mul-1-neg44.0%
Simplified44.0%
Taylor expanded in t1 around 0 16.7%
Final simplification27.6%
(FPCore (u v t1) :precision binary64 (* (/ t1 (+ t1 u)) (/ v (- (- u) t1))))
double code(double u, double v, double t1) {
return (t1 / (t1 + u)) * (v / (-u - t1));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (t1 / (t1 + u)) * (v / (-u - t1))
end function
public static double code(double u, double v, double t1) {
return (t1 / (t1 + u)) * (v / (-u - t1));
}
def code(u, v, t1): return (t1 / (t1 + u)) * (v / (-u - t1))
function code(u, v, t1) return Float64(Float64(t1 / Float64(t1 + u)) * Float64(v / Float64(Float64(-u) - t1))) end
function tmp = code(u, v, t1) tmp = (t1 / (t1 + u)) * (v / (-u - t1)); end
code[u_, v_, t1_] := N[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{t1}{t1 + u} \cdot \frac{v}{\left(-u\right) - t1}
\end{array}
Initial program 78.0%
times-frac97.7%
distribute-frac-neg97.7%
distribute-neg-frac297.7%
+-commutative97.7%
distribute-neg-in97.7%
unsub-neg97.7%
Simplified97.7%
Final simplification97.7%
(FPCore (u v t1) :precision binary64 (if (<= v 1.05e+260) (/ v (- (- u) t1)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if (v <= 1.05e+260) {
tmp = v / (-u - t1);
} else {
tmp = v / -t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (v <= 1.05d+260) then
tmp = v / (-u - t1)
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (v <= 1.05e+260) {
tmp = v / (-u - t1);
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if v <= 1.05e+260: tmp = v / (-u - t1) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if (v <= 1.05e+260) tmp = Float64(v / Float64(Float64(-u) - t1)); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (v <= 1.05e+260) tmp = v / (-u - t1); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[v, 1.05e+260], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;v \leq 1.05 \cdot 10^{+260}:\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if v < 1.05000000000000006e260Initial program 79.1%
associate-/l*77.6%
distribute-lft-neg-out77.6%
distribute-rgt-neg-in77.6%
associate-/r*86.5%
distribute-neg-frac286.5%
Simplified86.5%
distribute-frac-neg286.5%
distribute-rgt-neg-out86.5%
associate-/r*77.6%
distribute-lft-neg-out77.6%
associate-/l*79.1%
times-frac98.3%
frac-2neg98.3%
associate-*r/98.3%
add-sqr-sqrt48.8%
sqrt-unprod43.9%
sqr-neg43.9%
sqrt-unprod20.4%
add-sqr-sqrt40.7%
add-sqr-sqrt19.1%
sqrt-unprod62.6%
sqr-neg62.6%
sqrt-prod51.2%
add-sqr-sqrt98.3%
Applied egg-rr98.3%
Taylor expanded in t1 around inf 63.8%
mul-1-neg63.8%
Simplified63.8%
if 1.05000000000000006e260 < v Initial program 59.7%
associate-/l*55.0%
distribute-lft-neg-out55.0%
distribute-rgt-neg-in55.0%
associate-/r*93.8%
distribute-neg-frac293.8%
Simplified93.8%
Taylor expanded in t1 around inf 68.5%
associate-*r/68.5%
neg-mul-168.5%
Simplified68.5%
Final simplification64.1%
(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 78.0%
associate-/l*76.3%
distribute-lft-neg-out76.3%
distribute-rgt-neg-in76.3%
associate-/r*86.9%
distribute-neg-frac286.9%
Simplified86.9%
distribute-frac-neg286.9%
distribute-rgt-neg-out86.9%
associate-/r*76.3%
distribute-lft-neg-out76.3%
associate-/l*78.0%
times-frac97.7%
frac-2neg97.7%
associate-*r/98.0%
add-sqr-sqrt49.1%
sqrt-unprod42.6%
sqr-neg42.6%
sqrt-unprod19.2%
add-sqr-sqrt38.4%
add-sqr-sqrt18.0%
sqrt-unprod60.6%
sqr-neg60.6%
sqrt-prod50.2%
add-sqr-sqrt98.0%
Applied egg-rr98.0%
Taylor expanded in t1 around inf 62.9%
mul-1-neg62.9%
Simplified62.9%
div-inv62.8%
add-sqr-sqrt30.9%
sqrt-unprod39.6%
sqr-neg39.6%
sqrt-unprod13.8%
add-sqr-sqrt27.1%
frac-2neg27.1%
metadata-eval27.1%
distribute-neg-in27.1%
add-sqr-sqrt14.1%
sqrt-unprod40.1%
sqr-neg40.1%
sqrt-unprod30.3%
add-sqr-sqrt63.3%
sub-neg63.3%
Applied egg-rr63.3%
associate-*r/63.4%
*-commutative63.4%
mul-1-neg63.4%
Simplified63.4%
Final simplification63.4%
(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 78.0%
associate-/l*76.3%
distribute-lft-neg-out76.3%
distribute-rgt-neg-in76.3%
associate-/r*86.9%
distribute-neg-frac286.9%
Simplified86.9%
Taylor expanded in t1 around inf 53.7%
associate-*r/62.9%
clear-num62.3%
add-sqr-sqrt31.5%
sqrt-unprod44.8%
sqr-neg44.8%
sqrt-unprod14.6%
add-sqr-sqrt27.4%
Applied egg-rr27.4%
associate-/r/27.0%
associate-*r/30.3%
associate-*r/33.9%
associate-*l/33.9%
*-lft-identity33.9%
*-commutative33.9%
associate-/r*30.6%
times-frac27.1%
*-inverses27.1%
*-rgt-identity27.1%
Simplified27.1%
Taylor expanded in t1 around inf 19.1%
Final simplification19.1%
herbie shell --seed 2024080
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))