
(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 (* (/ (- t1) (+ t1 u)) (/ v (+ t1 u))))
double code(double u, double v, double t1) {
return (-t1 / (t1 + u)) * (v / (t1 + u));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-t1 / (t1 + u)) * (v / (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (-t1 / (t1 + u)) * (v / (t1 + u));
}
def code(u, v, t1): return (-t1 / (t1 + u)) * (v / (t1 + u))
function code(u, v, t1) return Float64(Float64(Float64(-t1) / Float64(t1 + u)) * Float64(v / Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (-t1 / (t1 + u)) * (v / (t1 + u)); end
code[u_, v_, t1_] := N[(N[((-t1) / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{-t1}{t1 + u} \cdot \frac{v}{t1 + u}
\end{array}
Initial program 73.9%
times-frac99.2%
Simplified99.2%
Final simplification99.2%
(FPCore (u v t1) :precision binary64 (if (<= u -2.7e-61) (- (* (/ v u) (/ t1 u))) (if (<= u 9.2e-28) (/ (- v) t1) (/ t1 (* (- t1 u) (/ u v))))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -2.7e-61) {
tmp = -((v / u) * (t1 / u));
} else if (u <= 9.2e-28) {
tmp = -v / t1;
} else {
tmp = t1 / ((t1 - u) * (u / v));
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-2.7d-61)) then
tmp = -((v / u) * (t1 / u))
else if (u <= 9.2d-28) then
tmp = -v / t1
else
tmp = t1 / ((t1 - u) * (u / v))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -2.7e-61) {
tmp = -((v / u) * (t1 / u));
} else if (u <= 9.2e-28) {
tmp = -v / t1;
} else {
tmp = t1 / ((t1 - u) * (u / v));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -2.7e-61: tmp = -((v / u) * (t1 / u)) elif u <= 9.2e-28: tmp = -v / t1 else: tmp = t1 / ((t1 - u) * (u / v)) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -2.7e-61) tmp = Float64(-Float64(Float64(v / u) * Float64(t1 / u))); elseif (u <= 9.2e-28) tmp = Float64(Float64(-v) / t1); else tmp = Float64(t1 / Float64(Float64(t1 - u) * Float64(u / v))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -2.7e-61) tmp = -((v / u) * (t1 / u)); elseif (u <= 9.2e-28) tmp = -v / t1; else tmp = t1 / ((t1 - u) * (u / v)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -2.7e-61], (-N[(N[(v / u), $MachinePrecision] * N[(t1 / u), $MachinePrecision]), $MachinePrecision]), If[LessEqual[u, 9.2e-28], N[((-v) / t1), $MachinePrecision], N[(t1 / N[(N[(t1 - u), $MachinePrecision] * N[(u / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.7 \cdot 10^{-61}:\\
\;\;\;\;-\frac{v}{u} \cdot \frac{t1}{u}\\
\mathbf{elif}\;u \leq 9.2 \cdot 10^{-28}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{\left(t1 - u\right) \cdot \frac{u}{v}}\\
\end{array}
\end{array}
if u < -2.69999999999999993e-61Initial program 73.6%
times-frac99.8%
Simplified99.8%
Taylor expanded in t1 around 0 80.5%
Taylor expanded in t1 around 0 80.0%
associate-*r/80.0%
mul-1-neg80.0%
Simplified80.0%
if -2.69999999999999993e-61 < u < 9.19999999999999942e-28Initial program 66.8%
times-frac99.1%
Simplified99.1%
Taylor expanded in t1 around inf 86.1%
associate-*r/86.1%
neg-mul-186.1%
Simplified86.1%
if 9.19999999999999942e-28 < u Initial program 84.5%
times-frac98.9%
Simplified98.9%
*-commutative98.9%
clear-num98.4%
frac-2neg98.4%
frac-times94.5%
*-un-lft-identity94.5%
remove-double-neg94.5%
distribute-neg-in94.5%
add-sqr-sqrt49.2%
sqrt-unprod89.4%
sqr-neg89.4%
sqrt-unprod42.7%
add-sqr-sqrt86.9%
sub-neg86.9%
Applied egg-rr86.9%
Taylor expanded in t1 around 0 87.1%
Final simplification84.7%
(FPCore (u v t1) :precision binary64 (if (<= u -5e-64) (/ (/ v u) (- 1.0 (/ u t1))) (if (<= u 6.2e-27) (/ (- v) t1) (/ t1 (* (- t1 u) (/ u v))))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -5e-64) {
tmp = (v / u) / (1.0 - (u / t1));
} else if (u <= 6.2e-27) {
tmp = -v / t1;
} else {
tmp = t1 / ((t1 - u) * (u / v));
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-5d-64)) then
tmp = (v / u) / (1.0d0 - (u / t1))
else if (u <= 6.2d-27) then
tmp = -v / t1
else
tmp = t1 / ((t1 - u) * (u / v))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -5e-64) {
tmp = (v / u) / (1.0 - (u / t1));
} else if (u <= 6.2e-27) {
tmp = -v / t1;
} else {
tmp = t1 / ((t1 - u) * (u / v));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -5e-64: tmp = (v / u) / (1.0 - (u / t1)) elif u <= 6.2e-27: tmp = -v / t1 else: tmp = t1 / ((t1 - u) * (u / v)) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -5e-64) tmp = Float64(Float64(v / u) / Float64(1.0 - Float64(u / t1))); elseif (u <= 6.2e-27) tmp = Float64(Float64(-v) / t1); else tmp = Float64(t1 / Float64(Float64(t1 - u) * Float64(u / v))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -5e-64) tmp = (v / u) / (1.0 - (u / t1)); elseif (u <= 6.2e-27) tmp = -v / t1; else tmp = t1 / ((t1 - u) * (u / v)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -5e-64], N[(N[(v / u), $MachinePrecision] / N[(1.0 - N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 6.2e-27], N[((-v) / t1), $MachinePrecision], N[(t1 / N[(N[(t1 - u), $MachinePrecision] * N[(u / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -5 \cdot 10^{-64}:\\
\;\;\;\;\frac{\frac{v}{u}}{1 - \frac{u}{t1}}\\
\mathbf{elif}\;u \leq 6.2 \cdot 10^{-27}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{\left(t1 - u\right) \cdot \frac{u}{v}}\\
\end{array}
\end{array}
if u < -5.00000000000000033e-64Initial program 73.6%
times-frac99.8%
Simplified99.8%
Taylor expanded in t1 around 0 80.5%
expm1-log1p-u76.1%
expm1-udef53.3%
Applied egg-rr53.2%
expm1-def63.2%
expm1-log1p67.6%
associate-/r*80.3%
Simplified80.3%
if -5.00000000000000033e-64 < u < 6.1999999999999997e-27Initial program 66.8%
times-frac99.1%
Simplified99.1%
Taylor expanded in t1 around inf 86.1%
associate-*r/86.1%
neg-mul-186.1%
Simplified86.1%
if 6.1999999999999997e-27 < u Initial program 84.5%
times-frac98.9%
Simplified98.9%
*-commutative98.9%
clear-num98.4%
frac-2neg98.4%
frac-times94.5%
*-un-lft-identity94.5%
remove-double-neg94.5%
distribute-neg-in94.5%
add-sqr-sqrt49.2%
sqrt-unprod89.4%
sqr-neg89.4%
sqrt-unprod42.7%
add-sqr-sqrt86.9%
sub-neg86.9%
Applied egg-rr86.9%
Taylor expanded in t1 around 0 87.1%
Final simplification84.8%
(FPCore (u v t1) :precision binary64 (if (<= u -6.4e-60) (* (/ (- t1) (+ t1 u)) (/ v u)) (if (<= u 3.1e-28) (/ (- v) t1) (/ t1 (* (- t1 u) (/ u v))))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -6.4e-60) {
tmp = (-t1 / (t1 + u)) * (v / u);
} else if (u <= 3.1e-28) {
tmp = -v / t1;
} else {
tmp = t1 / ((t1 - u) * (u / v));
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-6.4d-60)) then
tmp = (-t1 / (t1 + u)) * (v / u)
else if (u <= 3.1d-28) then
tmp = -v / t1
else
tmp = t1 / ((t1 - u) * (u / v))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -6.4e-60) {
tmp = (-t1 / (t1 + u)) * (v / u);
} else if (u <= 3.1e-28) {
tmp = -v / t1;
} else {
tmp = t1 / ((t1 - u) * (u / v));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -6.4e-60: tmp = (-t1 / (t1 + u)) * (v / u) elif u <= 3.1e-28: tmp = -v / t1 else: tmp = t1 / ((t1 - u) * (u / v)) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -6.4e-60) tmp = Float64(Float64(Float64(-t1) / Float64(t1 + u)) * Float64(v / u)); elseif (u <= 3.1e-28) tmp = Float64(Float64(-v) / t1); else tmp = Float64(t1 / Float64(Float64(t1 - u) * Float64(u / v))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -6.4e-60) tmp = (-t1 / (t1 + u)) * (v / u); elseif (u <= 3.1e-28) tmp = -v / t1; else tmp = t1 / ((t1 - u) * (u / v)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -6.4e-60], N[(N[((-t1) / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 3.1e-28], N[((-v) / t1), $MachinePrecision], N[(t1 / N[(N[(t1 - u), $MachinePrecision] * N[(u / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -6.4 \cdot 10^{-60}:\\
\;\;\;\;\frac{-t1}{t1 + u} \cdot \frac{v}{u}\\
\mathbf{elif}\;u \leq 3.1 \cdot 10^{-28}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{\left(t1 - u\right) \cdot \frac{u}{v}}\\
\end{array}
\end{array}
if u < -6.4000000000000003e-60Initial program 73.6%
times-frac99.8%
Simplified99.8%
Taylor expanded in t1 around 0 80.5%
if -6.4000000000000003e-60 < u < 3.09999999999999992e-28Initial program 66.8%
times-frac99.1%
Simplified99.1%
Taylor expanded in t1 around inf 86.1%
associate-*r/86.1%
neg-mul-186.1%
Simplified86.1%
if 3.09999999999999992e-28 < u Initial program 84.5%
times-frac98.9%
Simplified98.9%
*-commutative98.9%
clear-num98.4%
frac-2neg98.4%
frac-times94.5%
*-un-lft-identity94.5%
remove-double-neg94.5%
distribute-neg-in94.5%
add-sqr-sqrt49.2%
sqrt-unprod89.4%
sqr-neg89.4%
sqrt-unprod42.7%
add-sqr-sqrt86.9%
sub-neg86.9%
Applied egg-rr86.9%
Taylor expanded in t1 around 0 87.1%
Final simplification84.8%
(FPCore (u v t1) :precision binary64 (if (<= u -7.2e-72) (/ (/ v (+ t1 u)) (/ (- t1 u) t1)) (if (<= u 3.3e-28) (/ (- v) t1) (/ t1 (* (- t1 u) (/ u v))))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -7.2e-72) {
tmp = (v / (t1 + u)) / ((t1 - u) / t1);
} else if (u <= 3.3e-28) {
tmp = -v / t1;
} else {
tmp = t1 / ((t1 - u) * (u / v));
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-7.2d-72)) then
tmp = (v / (t1 + u)) / ((t1 - u) / t1)
else if (u <= 3.3d-28) then
tmp = -v / t1
else
tmp = t1 / ((t1 - u) * (u / v))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -7.2e-72) {
tmp = (v / (t1 + u)) / ((t1 - u) / t1);
} else if (u <= 3.3e-28) {
tmp = -v / t1;
} else {
tmp = t1 / ((t1 - u) * (u / v));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -7.2e-72: tmp = (v / (t1 + u)) / ((t1 - u) / t1) elif u <= 3.3e-28: tmp = -v / t1 else: tmp = t1 / ((t1 - u) * (u / v)) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -7.2e-72) tmp = Float64(Float64(v / Float64(t1 + u)) / Float64(Float64(t1 - u) / t1)); elseif (u <= 3.3e-28) tmp = Float64(Float64(-v) / t1); else tmp = Float64(t1 / Float64(Float64(t1 - u) * Float64(u / v))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -7.2e-72) tmp = (v / (t1 + u)) / ((t1 - u) / t1); elseif (u <= 3.3e-28) tmp = -v / t1; else tmp = t1 / ((t1 - u) * (u / v)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -7.2e-72], N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[(N[(t1 - u), $MachinePrecision] / t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 3.3e-28], N[((-v) / t1), $MachinePrecision], N[(t1 / N[(N[(t1 - u), $MachinePrecision] * N[(u / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -7.2 \cdot 10^{-72}:\\
\;\;\;\;\frac{\frac{v}{t1 + u}}{\frac{t1 - u}{t1}}\\
\mathbf{elif}\;u \leq 3.3 \cdot 10^{-28}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{\left(t1 - u\right) \cdot \frac{u}{v}}\\
\end{array}
\end{array}
if u < -7.2e-72Initial program 73.6%
times-frac99.8%
Simplified99.8%
clear-num99.8%
frac-times87.0%
*-un-lft-identity87.0%
frac-2neg87.0%
distribute-neg-in87.0%
add-sqr-sqrt43.3%
sqrt-unprod73.8%
sqr-neg73.8%
sqrt-unprod36.7%
add-sqr-sqrt71.3%
sub-neg71.3%
remove-double-neg71.3%
Applied egg-rr71.3%
associate-/l/84.0%
Simplified84.0%
if -7.2e-72 < u < 3.3000000000000002e-28Initial program 66.8%
times-frac99.1%
Simplified99.1%
Taylor expanded in t1 around inf 86.1%
associate-*r/86.1%
neg-mul-186.1%
Simplified86.1%
if 3.3000000000000002e-28 < u Initial program 84.5%
times-frac98.9%
Simplified98.9%
*-commutative98.9%
clear-num98.4%
frac-2neg98.4%
frac-times94.5%
*-un-lft-identity94.5%
remove-double-neg94.5%
distribute-neg-in94.5%
add-sqr-sqrt49.2%
sqrt-unprod89.4%
sqr-neg89.4%
sqrt-unprod42.7%
add-sqr-sqrt86.9%
sub-neg86.9%
Applied egg-rr86.9%
Taylor expanded in t1 around 0 87.1%
Final simplification85.8%
(FPCore (u v t1) :precision binary64 (if (<= t1 -2.5e-50) (/ v (- u t1)) (if (<= t1 2.7e-52) (- (* (/ v u) (/ t1 u))) (/ v (- (* u -2.0) t1)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -2.5e-50) {
tmp = v / (u - t1);
} else if (t1 <= 2.7e-52) {
tmp = -((v / u) * (t1 / u));
} 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 <= (-2.5d-50)) then
tmp = v / (u - t1)
else if (t1 <= 2.7d-52) then
tmp = -((v / u) * (t1 / u))
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 <= -2.5e-50) {
tmp = v / (u - t1);
} else if (t1 <= 2.7e-52) {
tmp = -((v / u) * (t1 / u));
} else {
tmp = v / ((u * -2.0) - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -2.5e-50: tmp = v / (u - t1) elif t1 <= 2.7e-52: tmp = -((v / u) * (t1 / u)) else: tmp = v / ((u * -2.0) - t1) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -2.5e-50) tmp = Float64(v / Float64(u - t1)); elseif (t1 <= 2.7e-52) tmp = Float64(-Float64(Float64(v / u) * Float64(t1 / u))); else tmp = Float64(v / Float64(Float64(u * -2.0) - t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -2.5e-50) tmp = v / (u - t1); elseif (t1 <= 2.7e-52) tmp = -((v / u) * (t1 / u)); else tmp = v / ((u * -2.0) - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -2.5e-50], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 2.7e-52], (-N[(N[(v / u), $MachinePrecision] * N[(t1 / u), $MachinePrecision]), $MachinePrecision]), N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2.5 \cdot 10^{-50}:\\
\;\;\;\;\frac{v}{u - t1}\\
\mathbf{elif}\;t1 \leq 2.7 \cdot 10^{-52}:\\
\;\;\;\;-\frac{v}{u} \cdot \frac{t1}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u \cdot -2 - t1}\\
\end{array}
\end{array}
if t1 < -2.49999999999999984e-50Initial program 60.2%
times-frac99.9%
Simplified99.9%
associate-*r/99.9%
clear-num99.9%
associate-*l/99.9%
*-un-lft-identity99.9%
frac-2neg99.9%
distribute-neg-in99.9%
add-sqr-sqrt99.3%
sqrt-unprod68.0%
sqr-neg68.0%
sqrt-unprod0.0%
add-sqr-sqrt39.8%
sub-neg39.8%
remove-double-neg39.8%
Applied egg-rr39.8%
Taylor expanded in t1 around inf 31.1%
clear-num31.2%
associate-/r/31.1%
frac-2neg31.1%
metadata-eval31.1%
distribute-neg-in31.1%
add-sqr-sqrt31.1%
sqrt-unprod31.7%
sqr-neg31.7%
sqrt-unprod0.0%
add-sqr-sqrt89.7%
sub-neg89.7%
Applied egg-rr89.7%
expm1-log1p-u83.3%
expm1-udef37.5%
*-commutative37.5%
frac-2neg37.5%
metadata-eval37.5%
un-div-inv37.5%
sub-neg37.5%
distribute-neg-in37.5%
remove-double-neg37.5%
Applied egg-rr37.5%
expm1-def83.6%
expm1-log1p90.0%
+-commutative90.0%
unsub-neg90.0%
Simplified90.0%
if -2.49999999999999984e-50 < t1 < 2.70000000000000009e-52Initial program 81.5%
times-frac98.5%
Simplified98.5%
Taylor expanded in t1 around 0 80.0%
Taylor expanded in t1 around 0 81.9%
associate-*r/81.9%
mul-1-neg81.9%
Simplified81.9%
if 2.70000000000000009e-52 < t1 Initial program 74.1%
associate-/r*86.4%
*-commutative86.4%
associate-/l*99.9%
associate-/l/90.9%
+-commutative90.9%
remove-double-neg90.9%
unsub-neg90.9%
div-sub90.9%
sub-neg90.9%
*-inverses90.9%
metadata-eval90.9%
Simplified90.9%
Taylor expanded in t1 around inf 78.6%
mul-1-neg78.6%
unsub-neg78.6%
*-commutative78.6%
Simplified78.6%
Final simplification83.1%
(FPCore (u v t1) :precision binary64 (if (<= u -5.2e-61) (- (* (/ v u) (/ t1 u))) (if (<= u 3.8e-30) (/ (- v) t1) (/ t1 (* u (/ (- u) v))))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -5.2e-61) {
tmp = -((v / u) * (t1 / u));
} else if (u <= 3.8e-30) {
tmp = -v / 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 <= (-5.2d-61)) then
tmp = -((v / u) * (t1 / u))
else if (u <= 3.8d-30) then
tmp = -v / 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 <= -5.2e-61) {
tmp = -((v / u) * (t1 / u));
} else if (u <= 3.8e-30) {
tmp = -v / t1;
} else {
tmp = t1 / (u * (-u / v));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -5.2e-61: tmp = -((v / u) * (t1 / u)) elif u <= 3.8e-30: tmp = -v / t1 else: tmp = t1 / (u * (-u / v)) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -5.2e-61) tmp = Float64(-Float64(Float64(v / u) * Float64(t1 / u))); elseif (u <= 3.8e-30) tmp = Float64(Float64(-v) / t1); else tmp = Float64(t1 / Float64(u * Float64(Float64(-u) / v))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -5.2e-61) tmp = -((v / u) * (t1 / u)); elseif (u <= 3.8e-30) tmp = -v / t1; else tmp = t1 / (u * (-u / v)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -5.2e-61], (-N[(N[(v / u), $MachinePrecision] * N[(t1 / u), $MachinePrecision]), $MachinePrecision]), If[LessEqual[u, 3.8e-30], N[((-v) / t1), $MachinePrecision], N[(t1 / N[(u * N[((-u) / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -5.2 \cdot 10^{-61}:\\
\;\;\;\;-\frac{v}{u} \cdot \frac{t1}{u}\\
\mathbf{elif}\;u \leq 3.8 \cdot 10^{-30}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{u \cdot \frac{-u}{v}}\\
\end{array}
\end{array}
if u < -5.20000000000000021e-61Initial program 73.6%
times-frac99.8%
Simplified99.8%
Taylor expanded in t1 around 0 80.5%
Taylor expanded in t1 around 0 80.0%
associate-*r/80.0%
mul-1-neg80.0%
Simplified80.0%
if -5.20000000000000021e-61 < u < 3.8000000000000003e-30Initial program 66.8%
times-frac99.1%
Simplified99.1%
Taylor expanded in t1 around inf 86.1%
associate-*r/86.1%
neg-mul-186.1%
Simplified86.1%
if 3.8000000000000003e-30 < u Initial program 84.5%
times-frac98.9%
Simplified98.9%
Taylor expanded in t1 around 0 80.9%
Taylor expanded in t1 around 0 80.1%
associate-*r/80.1%
mul-1-neg80.1%
Simplified80.1%
*-commutative80.1%
clear-num81.3%
frac-2neg81.3%
frac-times83.6%
*-un-lft-identity83.6%
remove-double-neg83.6%
Applied egg-rr83.6%
Final simplification83.7%
(FPCore (u v t1) :precision binary64 (if (or (<= u -6.6e+104) (not (<= u 2.2e+86))) (/ v (* u (/ u t1))) (/ (- v) (+ t1 u))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -6.6e+104) || !(u <= 2.2e+86)) {
tmp = v / (u * (u / 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 <= (-6.6d+104)) .or. (.not. (u <= 2.2d+86))) then
tmp = v / (u * (u / 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 <= -6.6e+104) || !(u <= 2.2e+86)) {
tmp = v / (u * (u / t1));
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -6.6e+104) or not (u <= 2.2e+86): tmp = v / (u * (u / t1)) else: tmp = -v / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -6.6e+104) || !(u <= 2.2e+86)) tmp = Float64(v / Float64(u * Float64(u / t1))); else tmp = Float64(Float64(-v) / Float64(t1 + u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -6.6e+104) || ~((u <= 2.2e+86))) tmp = v / (u * (u / t1)); else tmp = -v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -6.6e+104], N[Not[LessEqual[u, 2.2e+86]], $MachinePrecision]], N[(v / N[(u * N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -6.6 \cdot 10^{+104} \lor \neg \left(u \leq 2.2 \cdot 10^{+86}\right):\\
\;\;\;\;\frac{v}{u \cdot \frac{u}{t1}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\end{array}
\end{array}
if u < -6.59999999999999969e104 or 2.20000000000000003e86 < u Initial program 76.4%
times-frac99.0%
Simplified99.0%
Taylor expanded in t1 around 0 93.0%
Taylor expanded in t1 around 0 92.8%
associate-*r/92.8%
mul-1-neg92.8%
Simplified92.8%
clear-num92.8%
frac-times74.5%
*-un-lft-identity74.5%
add-sqr-sqrt40.4%
sqrt-unprod61.2%
sqr-neg61.2%
sqrt-unprod29.7%
add-sqr-sqrt68.0%
Applied egg-rr68.0%
if -6.59999999999999969e104 < u < 2.20000000000000003e86Initial program 72.6%
times-frac99.3%
Simplified99.3%
associate-*r/98.8%
clear-num98.8%
associate-*l/98.7%
*-un-lft-identity98.7%
frac-2neg98.7%
distribute-neg-in98.7%
add-sqr-sqrt41.5%
sqrt-unprod57.4%
sqr-neg57.4%
sqrt-unprod27.1%
add-sqr-sqrt43.2%
sub-neg43.2%
remove-double-neg43.2%
Applied egg-rr43.2%
clear-num43.1%
associate-/r/43.2%
clear-num43.2%
add-sqr-sqrt27.1%
sqrt-unprod31.2%
sqr-neg31.2%
sqrt-unprod33.9%
add-sqr-sqrt78.1%
sub-neg78.1%
add-sqr-sqrt43.8%
sqrt-unprod48.1%
sqr-neg48.1%
sqrt-unprod9.8%
add-sqr-sqrt24.3%
distribute-neg-in24.3%
frac-2neg24.3%
associate-/r/24.4%
frac-2neg24.4%
associate-/r/24.3%
remove-double-neg24.3%
frac-2neg24.3%
Applied egg-rr98.8%
Taylor expanded in t1 around inf 75.1%
mul-1-neg75.1%
Simplified75.1%
Final simplification72.5%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.55e+105) (not (<= u 2.35e+86))) (/ v (* u (/ u t1))) (/ v (- (* u -2.0) t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.55e+105) || !(u <= 2.35e+86)) {
tmp = v / (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 ((u <= (-1.55d+105)) .or. (.not. (u <= 2.35d+86))) then
tmp = v / (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 ((u <= -1.55e+105) || !(u <= 2.35e+86)) {
tmp = v / (u * (u / t1));
} else {
tmp = v / ((u * -2.0) - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.55e+105) or not (u <= 2.35e+86): tmp = v / (u * (u / t1)) else: tmp = v / ((u * -2.0) - t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.55e+105) || !(u <= 2.35e+86)) tmp = Float64(v / Float64(u * Float64(u / t1))); else tmp = Float64(v / Float64(Float64(u * -2.0) - t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -1.55e+105) || ~((u <= 2.35e+86))) tmp = v / (u * (u / t1)); else tmp = v / ((u * -2.0) - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.55e+105], N[Not[LessEqual[u, 2.35e+86]], $MachinePrecision]], N[(v / N[(u * 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}\;u \leq -1.55 \cdot 10^{+105} \lor \neg \left(u \leq 2.35 \cdot 10^{+86}\right):\\
\;\;\;\;\frac{v}{u \cdot \frac{u}{t1}}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u \cdot -2 - t1}\\
\end{array}
\end{array}
if u < -1.55000000000000002e105 or 2.3500000000000001e86 < u Initial program 76.4%
times-frac99.0%
Simplified99.0%
Taylor expanded in t1 around 0 93.0%
Taylor expanded in t1 around 0 92.8%
associate-*r/92.8%
mul-1-neg92.8%
Simplified92.8%
clear-num92.8%
frac-times74.5%
*-un-lft-identity74.5%
add-sqr-sqrt40.4%
sqrt-unprod61.2%
sqr-neg61.2%
sqrt-unprod29.7%
add-sqr-sqrt68.0%
Applied egg-rr68.0%
if -1.55000000000000002e105 < u < 2.3500000000000001e86Initial program 72.6%
associate-/r*83.5%
*-commutative83.5%
associate-/l*98.7%
associate-/l/99.9%
+-commutative99.9%
remove-double-neg99.9%
unsub-neg99.9%
div-sub99.9%
sub-neg99.9%
*-inverses99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t1 around inf 75.3%
mul-1-neg75.3%
unsub-neg75.3%
*-commutative75.3%
Simplified75.3%
Final simplification72.7%
(FPCore (u v t1) :precision binary64 (if (<= u -3.6e+57) (/ (* t1 (/ v u)) u) (if (<= u 1.85e+86) (/ v (- (* u -2.0) t1)) (/ v (* u (/ u t1))))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -3.6e+57) {
tmp = (t1 * (v / u)) / u;
} else if (u <= 1.85e+86) {
tmp = v / ((u * -2.0) - t1);
} else {
tmp = v / (u * (u / t1));
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-3.6d+57)) then
tmp = (t1 * (v / u)) / u
else if (u <= 1.85d+86) then
tmp = v / ((u * (-2.0d0)) - t1)
else
tmp = v / (u * (u / t1))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -3.6e+57) {
tmp = (t1 * (v / u)) / u;
} else if (u <= 1.85e+86) {
tmp = v / ((u * -2.0) - t1);
} else {
tmp = v / (u * (u / t1));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -3.6e+57: tmp = (t1 * (v / u)) / u elif u <= 1.85e+86: tmp = v / ((u * -2.0) - t1) else: tmp = v / (u * (u / t1)) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -3.6e+57) tmp = Float64(Float64(t1 * Float64(v / u)) / u); elseif (u <= 1.85e+86) tmp = Float64(v / Float64(Float64(u * -2.0) - t1)); else tmp = Float64(v / Float64(u * Float64(u / t1))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -3.6e+57) tmp = (t1 * (v / u)) / u; elseif (u <= 1.85e+86) tmp = v / ((u * -2.0) - t1); else tmp = v / (u * (u / t1)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -3.6e+57], N[(N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision] / u), $MachinePrecision], If[LessEqual[u, 1.85e+86], N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision], N[(v / N[(u * N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.6 \cdot 10^{+57}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{u}}{u}\\
\mathbf{elif}\;u \leq 1.85 \cdot 10^{+86}:\\
\;\;\;\;\frac{v}{u \cdot -2 - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u \cdot \frac{u}{t1}}\\
\end{array}
\end{array}
if u < -3.6000000000000002e57Initial program 74.2%
times-frac99.8%
Simplified99.8%
Taylor expanded in t1 around 0 91.1%
Taylor expanded in t1 around 0 90.6%
associate-*r/90.6%
mul-1-neg90.6%
Simplified90.6%
associate-*l/90.6%
add-sqr-sqrt41.3%
sqrt-unprod67.4%
sqr-neg67.4%
sqrt-unprod32.4%
add-sqr-sqrt64.4%
Applied egg-rr64.4%
if -3.6000000000000002e57 < u < 1.84999999999999996e86Initial program 72.3%
associate-/r*83.8%
*-commutative83.8%
associate-/l*98.7%
associate-/l/99.9%
+-commutative99.9%
remove-double-neg99.9%
unsub-neg99.9%
div-sub99.9%
sub-neg99.9%
*-inverses99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t1 around inf 75.3%
mul-1-neg75.3%
unsub-neg75.3%
*-commutative75.3%
Simplified75.3%
if 1.84999999999999996e86 < u Initial program 78.9%
times-frac98.4%
Simplified98.4%
Taylor expanded in t1 around 0 92.5%
Taylor expanded in t1 around 0 92.6%
associate-*r/92.6%
mul-1-neg92.6%
Simplified92.6%
clear-num92.5%
frac-times77.2%
*-un-lft-identity77.2%
add-sqr-sqrt45.9%
sqrt-unprod63.1%
sqr-neg63.1%
sqrt-unprod27.4%
add-sqr-sqrt73.1%
Applied egg-rr73.1%
Final simplification72.7%
(FPCore (u v t1) :precision binary64 (if (<= u -4.8e+55) (/ (/ v u) (/ u t1)) (if (<= u 2.35e+86) (/ v (- (* u -2.0) t1)) (/ v (* u (/ u t1))))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -4.8e+55) {
tmp = (v / u) / (u / t1);
} else if (u <= 2.35e+86) {
tmp = v / ((u * -2.0) - t1);
} else {
tmp = v / (u * (u / t1));
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-4.8d+55)) then
tmp = (v / u) / (u / t1)
else if (u <= 2.35d+86) then
tmp = v / ((u * (-2.0d0)) - t1)
else
tmp = v / (u * (u / t1))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -4.8e+55) {
tmp = (v / u) / (u / t1);
} else if (u <= 2.35e+86) {
tmp = v / ((u * -2.0) - t1);
} else {
tmp = v / (u * (u / t1));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -4.8e+55: tmp = (v / u) / (u / t1) elif u <= 2.35e+86: tmp = v / ((u * -2.0) - t1) else: tmp = v / (u * (u / t1)) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -4.8e+55) tmp = Float64(Float64(v / u) / Float64(u / t1)); elseif (u <= 2.35e+86) tmp = Float64(v / Float64(Float64(u * -2.0) - t1)); else tmp = Float64(v / Float64(u * Float64(u / t1))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -4.8e+55) tmp = (v / u) / (u / t1); elseif (u <= 2.35e+86) tmp = v / ((u * -2.0) - t1); else tmp = v / (u * (u / t1)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -4.8e+55], N[(N[(v / u), $MachinePrecision] / N[(u / t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 2.35e+86], N[(v / N[(N[(u * -2.0), $MachinePrecision] - t1), $MachinePrecision]), $MachinePrecision], N[(v / N[(u * N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -4.8 \cdot 10^{+55}:\\
\;\;\;\;\frac{\frac{v}{u}}{\frac{u}{t1}}\\
\mathbf{elif}\;u \leq 2.35 \cdot 10^{+86}:\\
\;\;\;\;\frac{v}{u \cdot -2 - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u \cdot \frac{u}{t1}}\\
\end{array}
\end{array}
if u < -4.7999999999999998e55Initial program 74.2%
times-frac99.8%
Simplified99.8%
Taylor expanded in t1 around 0 91.1%
Taylor expanded in t1 around 0 90.6%
associate-*r/90.6%
mul-1-neg90.6%
Simplified90.6%
*-commutative90.6%
clear-num90.5%
un-div-inv90.5%
add-sqr-sqrt41.3%
sqrt-unprod67.4%
sqr-neg67.4%
sqrt-unprod32.4%
add-sqr-sqrt64.5%
Applied egg-rr64.5%
if -4.7999999999999998e55 < u < 2.3500000000000001e86Initial program 72.3%
associate-/r*83.8%
*-commutative83.8%
associate-/l*98.7%
associate-/l/99.9%
+-commutative99.9%
remove-double-neg99.9%
unsub-neg99.9%
div-sub99.9%
sub-neg99.9%
*-inverses99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t1 around inf 75.3%
mul-1-neg75.3%
unsub-neg75.3%
*-commutative75.3%
Simplified75.3%
if 2.3500000000000001e86 < u Initial program 78.9%
times-frac98.4%
Simplified98.4%
Taylor expanded in t1 around 0 92.5%
Taylor expanded in t1 around 0 92.6%
associate-*r/92.6%
mul-1-neg92.6%
Simplified92.6%
clear-num92.5%
frac-times77.2%
*-un-lft-identity77.2%
add-sqr-sqrt45.9%
sqrt-unprod63.1%
sqr-neg63.1%
sqrt-unprod27.4%
add-sqr-sqrt73.1%
Applied egg-rr73.1%
Final simplification72.7%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.2e+58) (not (<= u 1.1e+138))) (/ v u) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.2e+58) || !(u <= 1.1e+138)) {
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.2d+58)) .or. (.not. (u <= 1.1d+138))) 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.2e+58) || !(u <= 1.1e+138)) {
tmp = v / u;
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.2e+58) or not (u <= 1.1e+138): tmp = v / u else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.2e+58) || !(u <= 1.1e+138)) tmp = Float64(v / u); else tmp = Float64(Float64(-v) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -1.2e+58) || ~((u <= 1.1e+138))) tmp = v / u; else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.2e+58], N[Not[LessEqual[u, 1.1e+138]], $MachinePrecision]], N[(v / u), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.2 \cdot 10^{+58} \lor \neg \left(u \leq 1.1 \cdot 10^{+138}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -1.2e58 or 1.1e138 < u Initial program 76.9%
times-frac99.0%
Simplified99.0%
Taylor expanded in t1 around 0 94.0%
expm1-log1p-u91.8%
expm1-udef71.8%
Applied egg-rr71.8%
expm1-def74.1%
expm1-log1p76.3%
associate-/r*93.9%
Simplified93.9%
Taylor expanded in u around 0 38.2%
if -1.2e58 < u < 1.1e138Initial program 72.4%
times-frac99.3%
Simplified99.3%
Taylor expanded in t1 around inf 71.8%
associate-*r/71.8%
neg-mul-171.8%
Simplified71.8%
Final simplification60.1%
(FPCore (u v t1) :precision binary64 (if (<= u -1.2e+58) (/ v u) (if (<= u 4e+138) (/ (- v) t1) (/ (- v) u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.2e+58) {
tmp = v / u;
} else if (u <= 4e+138) {
tmp = -v / t1;
} else {
tmp = -v / u;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-1.2d+58)) then
tmp = v / u
else if (u <= 4d+138) then
tmp = -v / t1
else
tmp = -v / u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -1.2e+58) {
tmp = v / u;
} else if (u <= 4e+138) {
tmp = -v / t1;
} else {
tmp = -v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.2e+58: tmp = v / u elif u <= 4e+138: tmp = -v / t1 else: tmp = -v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.2e+58) tmp = Float64(v / u); elseif (u <= 4e+138) tmp = Float64(Float64(-v) / t1); else tmp = Float64(Float64(-v) / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -1.2e+58) tmp = v / u; elseif (u <= 4e+138) tmp = -v / t1; else tmp = -v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.2e+58], N[(v / u), $MachinePrecision], If[LessEqual[u, 4e+138], N[((-v) / t1), $MachinePrecision], N[((-v) / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.2 \cdot 10^{+58}:\\
\;\;\;\;\frac{v}{u}\\
\mathbf{elif}\;u \leq 4 \cdot 10^{+138}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{u}\\
\end{array}
\end{array}
if u < -1.2e58Initial program 74.2%
times-frac99.8%
Simplified99.8%
Taylor expanded in t1 around 0 91.1%
expm1-log1p-u87.2%
expm1-udef67.1%
Applied egg-rr67.0%
expm1-def69.1%
expm1-log1p73.0%
associate-/r*91.0%
Simplified91.0%
Taylor expanded in u around 0 35.3%
if -1.2e58 < u < 4.0000000000000001e138Initial program 72.4%
times-frac99.3%
Simplified99.3%
Taylor expanded in t1 around inf 71.8%
associate-*r/71.8%
neg-mul-171.8%
Simplified71.8%
if 4.0000000000000001e138 < u Initial program 80.5%
times-frac98.0%
Simplified98.0%
Taylor expanded in t1 around 0 98.0%
Taylor expanded in t1 around inf 42.2%
associate-*r/42.2%
neg-mul-142.2%
Simplified42.2%
Final simplification60.2%
(FPCore (u v t1) :precision binary64 (if (<= u -4e+25) (/ v (+ t1 u)) (if (<= u 1.4e+138) (/ (- v) t1) (/ (- v) u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -4e+25) {
tmp = v / (t1 + u);
} else if (u <= 1.4e+138) {
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 <= (-4d+25)) then
tmp = v / (t1 + u)
else if (u <= 1.4d+138) 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 <= -4e+25) {
tmp = v / (t1 + u);
} else if (u <= 1.4e+138) {
tmp = -v / t1;
} else {
tmp = -v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -4e+25: tmp = v / (t1 + u) elif u <= 1.4e+138: tmp = -v / t1 else: tmp = -v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -4e+25) tmp = Float64(v / Float64(t1 + u)); elseif (u <= 1.4e+138) tmp = Float64(Float64(-v) / t1); else tmp = Float64(Float64(-v) / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -4e+25) tmp = v / (t1 + u); elseif (u <= 1.4e+138) tmp = -v / t1; else tmp = -v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -4e+25], N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 1.4e+138], N[((-v) / t1), $MachinePrecision], N[((-v) / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -4 \cdot 10^{+25}:\\
\;\;\;\;\frac{v}{t1 + u}\\
\mathbf{elif}\;u \leq 1.4 \cdot 10^{+138}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{u}\\
\end{array}
\end{array}
if u < -4.00000000000000036e25Initial program 75.1%
times-frac99.8%
Simplified99.8%
associate-*r/99.9%
clear-num99.8%
associate-*l/99.8%
*-un-lft-identity99.8%
frac-2neg99.8%
distribute-neg-in99.8%
add-sqr-sqrt45.2%
sqrt-unprod87.8%
sqr-neg87.8%
sqrt-unprod51.0%
add-sqr-sqrt92.9%
sub-neg92.9%
remove-double-neg92.9%
Applied egg-rr92.9%
Taylor expanded in t1 around inf 37.5%
if -4.00000000000000036e25 < u < 1.4e138Initial program 72.0%
times-frac99.3%
Simplified99.3%
Taylor expanded in t1 around inf 72.1%
associate-*r/72.1%
neg-mul-172.1%
Simplified72.1%
if 1.4e138 < u Initial program 80.5%
times-frac98.0%
Simplified98.0%
Taylor expanded in t1 around 0 98.0%
Taylor expanded in t1 around inf 42.2%
associate-*r/42.2%
neg-mul-142.2%
Simplified42.2%
Final simplification60.5%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1.8e+81) (not (<= t1 1.9e+108))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.8e+81) || !(t1 <= 1.9e+108)) {
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.8d+81)) .or. (.not. (t1 <= 1.9d+108))) 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.8e+81) || !(t1 <= 1.9e+108)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.8e+81) or not (t1 <= 1.9e+108): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.8e+81) || !(t1 <= 1.9e+108)) 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.8e+81) || ~((t1 <= 1.9e+108))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.8e+81], N[Not[LessEqual[t1, 1.9e+108]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.8 \cdot 10^{+81} \lor \neg \left(t1 \leq 1.9 \cdot 10^{+108}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -1.80000000000000003e81 or 1.90000000000000004e108 < t1 Initial program 55.4%
times-frac99.9%
Simplified99.9%
*-commutative99.9%
clear-num98.2%
frac-2neg98.2%
frac-times65.8%
*-un-lft-identity65.8%
remove-double-neg65.8%
distribute-neg-in65.8%
add-sqr-sqrt33.4%
sqrt-unprod50.4%
sqr-neg50.4%
sqrt-unprod26.5%
add-sqr-sqrt50.2%
sub-neg50.2%
Applied egg-rr50.2%
Taylor expanded in t1 around inf 43.5%
if -1.80000000000000003e81 < t1 < 1.90000000000000004e108Initial program 82.5%
times-frac98.9%
Simplified98.9%
Taylor expanded in t1 around 0 66.1%
expm1-log1p-u62.2%
expm1-udef44.9%
Applied egg-rr45.2%
expm1-def55.0%
expm1-log1p59.5%
associate-/r*66.4%
Simplified66.4%
Taylor expanded in u around 0 18.3%
Final simplification26.3%
(FPCore (u v t1) :precision binary64 (/ (- v) (+ t1 u)))
double code(double u, double v, double t1) {
return -v / (t1 + u);
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = -v / (t1 + u)
end function
public static double code(double u, double v, double t1) {
return -v / (t1 + u);
}
def code(u, v, t1): return -v / (t1 + u)
function code(u, v, t1) return Float64(Float64(-v) / Float64(t1 + u)) end
function tmp = code(u, v, t1) tmp = -v / (t1 + u); end
code[u_, v_, t1_] := N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{-v}{t1 + u}
\end{array}
Initial program 73.9%
times-frac99.2%
Simplified99.2%
associate-*r/98.9%
clear-num98.9%
associate-*l/98.8%
*-un-lft-identity98.8%
frac-2neg98.8%
distribute-neg-in98.8%
add-sqr-sqrt45.9%
sqrt-unprod69.0%
sqr-neg69.0%
sqrt-unprod33.2%
add-sqr-sqrt61.2%
sub-neg61.2%
remove-double-neg61.2%
Applied egg-rr61.2%
clear-num61.2%
associate-/r/61.2%
clear-num61.3%
add-sqr-sqrt33.1%
sqrt-unprod44.7%
sqr-neg44.7%
sqrt-unprod36.9%
add-sqr-sqrt76.6%
sub-neg76.6%
add-sqr-sqrt39.4%
sqrt-unprod55.5%
sqr-neg55.5%
sqrt-unprod19.9%
add-sqr-sqrt40.2%
distribute-neg-in40.2%
frac-2neg40.2%
associate-/r/40.2%
frac-2neg40.2%
associate-/r/40.2%
remove-double-neg40.2%
frac-2neg40.2%
Applied egg-rr98.9%
Taylor expanded in t1 around inf 62.5%
mul-1-neg62.5%
Simplified62.5%
Final simplification62.5%
(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 73.9%
times-frac99.2%
Simplified99.2%
associate-*r/98.9%
clear-num98.9%
associate-*l/98.8%
*-un-lft-identity98.8%
frac-2neg98.8%
distribute-neg-in98.8%
add-sqr-sqrt45.9%
sqrt-unprod69.0%
sqr-neg69.0%
sqrt-unprod33.2%
add-sqr-sqrt61.2%
sub-neg61.2%
remove-double-neg61.2%
Applied egg-rr61.2%
Taylor expanded in t1 around inf 25.7%
clear-num26.1%
associate-/r/25.7%
frac-2neg25.7%
metadata-eval25.7%
distribute-neg-in25.7%
add-sqr-sqrt11.7%
sqrt-unprod41.4%
sqr-neg41.4%
sqrt-unprod33.1%
add-sqr-sqrt62.0%
sub-neg62.0%
Applied egg-rr62.0%
expm1-log1p-u53.1%
expm1-udef44.4%
*-commutative44.4%
frac-2neg44.4%
metadata-eval44.4%
un-div-inv44.4%
sub-neg44.4%
distribute-neg-in44.4%
remove-double-neg44.4%
Applied egg-rr44.4%
expm1-def53.2%
expm1-log1p62.2%
+-commutative62.2%
unsub-neg62.2%
Simplified62.2%
Final simplification62.2%
(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 73.9%
times-frac99.2%
Simplified99.2%
*-commutative99.2%
clear-num98.3%
frac-2neg98.3%
frac-times83.0%
*-un-lft-identity83.0%
remove-double-neg83.0%
distribute-neg-in83.0%
add-sqr-sqrt37.9%
sqrt-unprod64.8%
sqr-neg64.8%
sqrt-unprod30.3%
add-sqr-sqrt58.0%
sub-neg58.0%
Applied egg-rr58.0%
Taylor expanded in t1 around inf 15.7%
Final simplification15.7%
herbie shell --seed 2023315
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))