
(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 15 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.1%
times-frac97.6%
distribute-frac-neg97.6%
distribute-neg-frac297.6%
+-commutative97.6%
distribute-neg-in97.6%
unsub-neg97.6%
Simplified97.6%
Final simplification97.6%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (- (- u) t1)))
(if (<= t1 -3.7e+191)
(/ v (- t1))
(if (<= t1 5.5e-242)
(* t1 (/ (/ v (+ t1 u)) t_1))
(if (<= t1 2.65e+142)
(* v (/ t1 (* t_1 (+ t1 u))))
(/ v (- (- t1) (* u 2.0))))))))
double code(double u, double v, double t1) {
double t_1 = -u - t1;
double tmp;
if (t1 <= -3.7e+191) {
tmp = v / -t1;
} else if (t1 <= 5.5e-242) {
tmp = t1 * ((v / (t1 + u)) / t_1);
} else if (t1 <= 2.65e+142) {
tmp = v * (t1 / (t_1 * (t1 + u)));
} else {
tmp = v / (-t1 - (u * 2.0));
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: t_1
real(8) :: tmp
t_1 = -u - t1
if (t1 <= (-3.7d+191)) then
tmp = v / -t1
else if (t1 <= 5.5d-242) then
tmp = t1 * ((v / (t1 + u)) / t_1)
else if (t1 <= 2.65d+142) then
tmp = v * (t1 / (t_1 * (t1 + u)))
else
tmp = v / (-t1 - (u * 2.0d0))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = -u - t1;
double tmp;
if (t1 <= -3.7e+191) {
tmp = v / -t1;
} else if (t1 <= 5.5e-242) {
tmp = t1 * ((v / (t1 + u)) / t_1);
} else if (t1 <= 2.65e+142) {
tmp = v * (t1 / (t_1 * (t1 + u)));
} else {
tmp = v / (-t1 - (u * 2.0));
}
return tmp;
}
def code(u, v, t1): t_1 = -u - t1 tmp = 0 if t1 <= -3.7e+191: tmp = v / -t1 elif t1 <= 5.5e-242: tmp = t1 * ((v / (t1 + u)) / t_1) elif t1 <= 2.65e+142: tmp = v * (t1 / (t_1 * (t1 + u))) else: tmp = v / (-t1 - (u * 2.0)) return tmp
function code(u, v, t1) t_1 = Float64(Float64(-u) - t1) tmp = 0.0 if (t1 <= -3.7e+191) tmp = Float64(v / Float64(-t1)); elseif (t1 <= 5.5e-242) tmp = Float64(t1 * Float64(Float64(v / Float64(t1 + u)) / t_1)); elseif (t1 <= 2.65e+142) tmp = Float64(v * Float64(t1 / Float64(t_1 * Float64(t1 + u)))); else tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = -u - t1; tmp = 0.0; if (t1 <= -3.7e+191) tmp = v / -t1; elseif (t1 <= 5.5e-242) tmp = t1 * ((v / (t1 + u)) / t_1); elseif (t1 <= 2.65e+142) tmp = v * (t1 / (t_1 * (t1 + u))); else tmp = v / (-t1 - (u * 2.0)); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-u) - t1), $MachinePrecision]}, If[LessEqual[t1, -3.7e+191], N[(v / (-t1)), $MachinePrecision], If[LessEqual[t1, 5.5e-242], N[(t1 * N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 2.65e+142], N[(v * N[(t1 / N[(t$95$1 * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-u\right) - t1\\
\mathbf{if}\;t1 \leq -3.7 \cdot 10^{+191}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{elif}\;t1 \leq 5.5 \cdot 10^{-242}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{t1 + u}}{t\_1}\\
\mathbf{elif}\;t1 \leq 2.65 \cdot 10^{+142}:\\
\;\;\;\;v \cdot \frac{t1}{t\_1 \cdot \left(t1 + u\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\end{array}
\end{array}
if t1 < -3.70000000000000019e191Initial program 51.5%
associate-*l/53.1%
*-commutative53.1%
Simplified53.1%
Taylor expanded in t1 around inf 100.0%
associate-*r/100.0%
neg-mul-1100.0%
Simplified100.0%
if -3.70000000000000019e191 < t1 < 5.4999999999999998e-242Initial program 79.2%
associate-/l*78.9%
Simplified78.9%
associate-/r*92.3%
div-inv92.2%
Applied egg-rr92.2%
associate-*r/92.3%
*-rgt-identity92.3%
Simplified92.3%
if 5.4999999999999998e-242 < t1 < 2.65e142Initial program 85.3%
associate-*l/91.5%
*-commutative91.5%
Simplified91.5%
if 2.65e142 < t1 Initial program 36.0%
associate-*l/37.7%
*-commutative37.7%
Simplified37.7%
associate-*r/36.0%
*-commutative36.0%
times-frac99.9%
frac-2neg99.9%
remove-double-neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
clear-num99.9%
frac-2neg99.9%
frac-times94.1%
*-un-lft-identity94.1%
+-commutative94.1%
distribute-neg-in94.1%
sub-neg94.1%
Applied egg-rr94.1%
Taylor expanded in u around 0 82.1%
*-commutative82.1%
Simplified82.1%
Final simplification91.5%
(FPCore (u v t1)
:precision binary64
(if (<= t1 -6.8e+153)
(/ v (- u t1))
(if (<= t1 2.15e+141)
(* v (/ t1 (* (- (- u) t1) (+ t1 u))))
(/ v (- (- t1) (* u 2.0))))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -6.8e+153) {
tmp = v / (u - t1);
} else if (t1 <= 2.15e+141) {
tmp = v * (t1 / ((-u - t1) * (t1 + u)));
} else {
tmp = v / (-t1 - (u * 2.0));
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (t1 <= (-6.8d+153)) then
tmp = v / (u - t1)
else if (t1 <= 2.15d+141) then
tmp = v * (t1 / ((-u - t1) * (t1 + u)))
else
tmp = v / (-t1 - (u * 2.0d0))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -6.8e+153) {
tmp = v / (u - t1);
} else if (t1 <= 2.15e+141) {
tmp = v * (t1 / ((-u - t1) * (t1 + u)));
} else {
tmp = v / (-t1 - (u * 2.0));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -6.8e+153: tmp = v / (u - t1) elif t1 <= 2.15e+141: tmp = v * (t1 / ((-u - t1) * (t1 + u))) else: tmp = v / (-t1 - (u * 2.0)) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -6.8e+153) tmp = Float64(v / Float64(u - t1)); elseif (t1 <= 2.15e+141) tmp = Float64(v * Float64(t1 / Float64(Float64(Float64(-u) - t1) * Float64(t1 + u)))); else tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -6.8e+153) tmp = v / (u - t1); elseif (t1 <= 2.15e+141) tmp = v * (t1 / ((-u - t1) * (t1 + u))); else tmp = v / (-t1 - (u * 2.0)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -6.8e+153], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 2.15e+141], N[(v * N[(t1 / N[(N[((-u) - t1), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -6.8 \cdot 10^{+153}:\\
\;\;\;\;\frac{v}{u - t1}\\
\mathbf{elif}\;t1 \leq 2.15 \cdot 10^{+141}:\\
\;\;\;\;v \cdot \frac{t1}{\left(\left(-u\right) - t1\right) \cdot \left(t1 + u\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\end{array}
\end{array}
if t1 < -6.7999999999999995e153Initial program 45.0%
times-frac100.0%
distribute-frac-neg100.0%
distribute-neg-frac2100.0%
+-commutative100.0%
distribute-neg-in100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in t1 around inf 92.2%
mul-1-neg92.2%
distribute-neg-frac292.2%
+-commutative92.2%
distribute-neg-in92.2%
sub-neg92.2%
add-sqr-sqrt37.9%
sqrt-unprod89.7%
sqr-neg89.7%
sqrt-unprod54.7%
add-sqr-sqrt92.4%
Applied egg-rr92.4%
if -6.7999999999999995e153 < t1 < 2.1499999999999999e141Initial program 85.0%
associate-*l/87.6%
*-commutative87.6%
Simplified87.6%
if 2.1499999999999999e141 < t1 Initial program 36.0%
associate-*l/37.7%
*-commutative37.7%
Simplified37.7%
associate-*r/36.0%
*-commutative36.0%
times-frac99.9%
frac-2neg99.9%
remove-double-neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
clear-num99.9%
frac-2neg99.9%
frac-times94.1%
*-un-lft-identity94.1%
+-commutative94.1%
distribute-neg-in94.1%
sub-neg94.1%
Applied egg-rr94.1%
Taylor expanded in u around 0 82.1%
*-commutative82.1%
Simplified82.1%
Final simplification87.6%
(FPCore (u v t1) :precision binary64 (if (<= t1 -2.9e+34) (/ v (- u t1)) (if (<= t1 4.1e-42) (/ (/ t1 (/ u v)) (- u)) (/ v (- (- t1) (* u 2.0))))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -2.9e+34) {
tmp = v / (u - t1);
} else if (t1 <= 4.1e-42) {
tmp = (t1 / (u / v)) / -u;
} else {
tmp = v / (-t1 - (u * 2.0));
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (t1 <= (-2.9d+34)) then
tmp = v / (u - t1)
else if (t1 <= 4.1d-42) then
tmp = (t1 / (u / v)) / -u
else
tmp = v / (-t1 - (u * 2.0d0))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -2.9e+34) {
tmp = v / (u - t1);
} else if (t1 <= 4.1e-42) {
tmp = (t1 / (u / v)) / -u;
} else {
tmp = v / (-t1 - (u * 2.0));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -2.9e+34: tmp = v / (u - t1) elif t1 <= 4.1e-42: tmp = (t1 / (u / v)) / -u else: tmp = v / (-t1 - (u * 2.0)) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -2.9e+34) tmp = Float64(v / Float64(u - t1)); elseif (t1 <= 4.1e-42) tmp = Float64(Float64(t1 / Float64(u / v)) / Float64(-u)); else tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -2.9e+34) tmp = v / (u - t1); elseif (t1 <= 4.1e-42) tmp = (t1 / (u / v)) / -u; else tmp = v / (-t1 - (u * 2.0)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -2.9e+34], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 4.1e-42], N[(N[(t1 / N[(u / v), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2.9 \cdot 10^{+34}:\\
\;\;\;\;\frac{v}{u - t1}\\
\mathbf{elif}\;t1 \leq 4.1 \cdot 10^{-42}:\\
\;\;\;\;\frac{\frac{t1}{\frac{u}{v}}}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\end{array}
\end{array}
if t1 < -2.9000000000000001e34Initial program 60.5%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in t1 around inf 91.9%
mul-1-neg91.9%
distribute-neg-frac291.9%
+-commutative91.9%
distribute-neg-in91.9%
sub-neg91.9%
add-sqr-sqrt39.0%
sqrt-unprod92.0%
sqr-neg92.0%
sqrt-unprod53.2%
add-sqr-sqrt92.2%
Applied egg-rr92.2%
if -2.9000000000000001e34 < t1 < 4.1000000000000001e-42Initial program 83.4%
times-frac95.2%
distribute-frac-neg95.2%
distribute-neg-frac295.2%
+-commutative95.2%
distribute-neg-in95.2%
unsub-neg95.2%
Simplified95.2%
Taylor expanded in t1 around 0 81.6%
associate-*l/83.3%
frac-2neg83.3%
clear-num83.3%
un-div-inv83.3%
neg-sub083.3%
add-sqr-sqrt37.1%
sqrt-unprod56.0%
sqr-neg56.0%
sqrt-unprod21.6%
add-sqr-sqrt43.7%
associate-+l-43.7%
neg-sub043.7%
add-sqr-sqrt22.1%
sqrt-unprod63.7%
sqr-neg63.7%
sqrt-unprod46.0%
add-sqr-sqrt83.3%
+-commutative83.3%
Applied egg-rr83.3%
Taylor expanded in t1 around 0 83.6%
if 4.1000000000000001e-42 < t1 Initial program 64.9%
associate-*l/67.2%
*-commutative67.2%
Simplified67.2%
associate-*r/64.9%
*-commutative64.9%
times-frac99.9%
frac-2neg99.9%
remove-double-neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
clear-num99.9%
frac-2neg99.9%
frac-times93.2%
*-un-lft-identity93.2%
+-commutative93.2%
distribute-neg-in93.2%
sub-neg93.2%
Applied egg-rr93.2%
Taylor expanded in u around 0 77.0%
*-commutative77.0%
Simplified77.0%
Final simplification83.8%
(FPCore (u v t1) :precision binary64 (if (<= t1 -2.15e+33) (/ v (- u t1)) (if (<= t1 8.2e-43) (/ t1 (* u (/ u (- v)))) (/ v (- (- t1) (* u 2.0))))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -2.15e+33) {
tmp = v / (u - t1);
} else if (t1 <= 8.2e-43) {
tmp = t1 / (u * (u / -v));
} else {
tmp = v / (-t1 - (u * 2.0));
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (t1 <= (-2.15d+33)) then
tmp = v / (u - t1)
else if (t1 <= 8.2d-43) then
tmp = t1 / (u * (u / -v))
else
tmp = v / (-t1 - (u * 2.0d0))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -2.15e+33) {
tmp = v / (u - t1);
} else if (t1 <= 8.2e-43) {
tmp = t1 / (u * (u / -v));
} else {
tmp = v / (-t1 - (u * 2.0));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -2.15e+33: tmp = v / (u - t1) elif t1 <= 8.2e-43: tmp = t1 / (u * (u / -v)) else: tmp = v / (-t1 - (u * 2.0)) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -2.15e+33) tmp = Float64(v / Float64(u - t1)); elseif (t1 <= 8.2e-43) tmp = Float64(t1 / Float64(u * Float64(u / Float64(-v)))); else tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -2.15e+33) tmp = v / (u - t1); elseif (t1 <= 8.2e-43) tmp = t1 / (u * (u / -v)); else tmp = v / (-t1 - (u * 2.0)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -2.15e+33], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 8.2e-43], N[(t1 / N[(u * N[(u / (-v)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2.15 \cdot 10^{+33}:\\
\;\;\;\;\frac{v}{u - t1}\\
\mathbf{elif}\;t1 \leq 8.2 \cdot 10^{-43}:\\
\;\;\;\;\frac{t1}{u \cdot \frac{u}{-v}}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\end{array}
\end{array}
if t1 < -2.15000000000000014e33Initial program 60.5%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in t1 around inf 91.9%
mul-1-neg91.9%
distribute-neg-frac291.9%
+-commutative91.9%
distribute-neg-in91.9%
sub-neg91.9%
add-sqr-sqrt39.0%
sqrt-unprod92.0%
sqr-neg92.0%
sqrt-unprod53.2%
add-sqr-sqrt92.2%
Applied egg-rr92.2%
if -2.15000000000000014e33 < t1 < 8.1999999999999996e-43Initial program 83.4%
times-frac95.2%
distribute-frac-neg95.2%
distribute-neg-frac295.2%
+-commutative95.2%
distribute-neg-in95.2%
unsub-neg95.2%
Simplified95.2%
Taylor expanded in t1 around 0 81.6%
*-commutative81.6%
clear-num81.6%
frac-2neg81.6%
frac-times82.4%
*-un-lft-identity82.4%
neg-sub082.4%
add-sqr-sqrt36.4%
sqrt-unprod55.2%
sqr-neg55.2%
sqrt-unprod21.6%
add-sqr-sqrt43.6%
associate-+l-43.6%
neg-sub043.6%
add-sqr-sqrt22.0%
sqrt-unprod65.0%
sqr-neg65.0%
sqrt-unprod46.0%
add-sqr-sqrt82.4%
+-commutative82.4%
Applied egg-rr82.4%
Taylor expanded in t1 around 0 82.7%
if 8.1999999999999996e-43 < t1 Initial program 64.9%
associate-*l/67.2%
*-commutative67.2%
Simplified67.2%
associate-*r/64.9%
*-commutative64.9%
times-frac99.9%
frac-2neg99.9%
remove-double-neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
clear-num99.9%
frac-2neg99.9%
frac-times93.2%
*-un-lft-identity93.2%
+-commutative93.2%
distribute-neg-in93.2%
sub-neg93.2%
Applied egg-rr93.2%
Taylor expanded in u around 0 77.0%
*-commutative77.0%
Simplified77.0%
Final simplification83.3%
(FPCore (u v t1) :precision binary64 (if (<= t1 -1.9e+33) (/ v (- u t1)) (if (<= t1 7.2e-42) (/ t1 (* u (/ u (- v)))) (/ (- v) (+ t1 u)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1.9e+33) {
tmp = v / (u - t1);
} else if (t1 <= 7.2e-42) {
tmp = t1 / (u * (u / -v));
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (t1 <= (-1.9d+33)) then
tmp = v / (u - t1)
else if (t1 <= 7.2d-42) then
tmp = t1 / (u * (u / -v))
else
tmp = -v / (t1 + u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1.9e+33) {
tmp = v / (u - t1);
} else if (t1 <= 7.2e-42) {
tmp = t1 / (u * (u / -v));
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -1.9e+33: tmp = v / (u - t1) elif t1 <= 7.2e-42: tmp = t1 / (u * (u / -v)) else: tmp = -v / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -1.9e+33) tmp = Float64(v / Float64(u - t1)); elseif (t1 <= 7.2e-42) tmp = Float64(t1 / Float64(u * Float64(u / Float64(-v)))); else tmp = Float64(Float64(-v) / Float64(t1 + u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -1.9e+33) tmp = v / (u - t1); elseif (t1 <= 7.2e-42) tmp = t1 / (u * (u / -v)); else tmp = -v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -1.9e+33], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 7.2e-42], N[(t1 / N[(u * N[(u / (-v)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.9 \cdot 10^{+33}:\\
\;\;\;\;\frac{v}{u - t1}\\
\mathbf{elif}\;t1 \leq 7.2 \cdot 10^{-42}:\\
\;\;\;\;\frac{t1}{u \cdot \frac{u}{-v}}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\end{array}
\end{array}
if t1 < -1.90000000000000001e33Initial program 60.5%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in t1 around inf 91.9%
mul-1-neg91.9%
distribute-neg-frac291.9%
+-commutative91.9%
distribute-neg-in91.9%
sub-neg91.9%
add-sqr-sqrt39.0%
sqrt-unprod92.0%
sqr-neg92.0%
sqrt-unprod53.2%
add-sqr-sqrt92.2%
Applied egg-rr92.2%
if -1.90000000000000001e33 < t1 < 7.2000000000000004e-42Initial program 83.4%
times-frac95.2%
distribute-frac-neg95.2%
distribute-neg-frac295.2%
+-commutative95.2%
distribute-neg-in95.2%
unsub-neg95.2%
Simplified95.2%
Taylor expanded in t1 around 0 81.6%
*-commutative81.6%
clear-num81.6%
frac-2neg81.6%
frac-times82.4%
*-un-lft-identity82.4%
neg-sub082.4%
add-sqr-sqrt36.4%
sqrt-unprod55.2%
sqr-neg55.2%
sqrt-unprod21.6%
add-sqr-sqrt43.6%
associate-+l-43.6%
neg-sub043.6%
add-sqr-sqrt22.0%
sqrt-unprod65.0%
sqr-neg65.0%
sqrt-unprod46.0%
add-sqr-sqrt82.4%
+-commutative82.4%
Applied egg-rr82.4%
Taylor expanded in t1 around 0 82.7%
if 7.2000000000000004e-42 < t1 Initial program 64.9%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in t1 around inf 76.3%
clear-num76.2%
un-div-inv76.2%
Applied egg-rr76.2%
associate-/r/76.1%
Simplified76.1%
Taylor expanded in v around 0 76.3%
mul-1-neg76.3%
distribute-frac-neg76.3%
Simplified76.3%
Final simplification83.1%
(FPCore (u v t1) :precision binary64 (if (<= t1 -1.65e+33) (/ v (- u t1)) (if (<= t1 9.4e-42) (* (/ t1 (- u)) (/ v u)) (/ (- v) (+ t1 u)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1.65e+33) {
tmp = v / (u - t1);
} else if (t1 <= 9.4e-42) {
tmp = (t1 / -u) * (v / u);
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (t1 <= (-1.65d+33)) then
tmp = v / (u - t1)
else if (t1 <= 9.4d-42) then
tmp = (t1 / -u) * (v / u)
else
tmp = -v / (t1 + u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1.65e+33) {
tmp = v / (u - t1);
} else if (t1 <= 9.4e-42) {
tmp = (t1 / -u) * (v / u);
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -1.65e+33: tmp = v / (u - t1) elif t1 <= 9.4e-42: tmp = (t1 / -u) * (v / u) else: tmp = -v / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -1.65e+33) tmp = Float64(v / Float64(u - t1)); elseif (t1 <= 9.4e-42) tmp = Float64(Float64(t1 / Float64(-u)) * Float64(v / u)); else tmp = Float64(Float64(-v) / Float64(t1 + u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -1.65e+33) tmp = v / (u - t1); elseif (t1 <= 9.4e-42) tmp = (t1 / -u) * (v / u); else tmp = -v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -1.65e+33], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 9.4e-42], N[(N[(t1 / (-u)), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.65 \cdot 10^{+33}:\\
\;\;\;\;\frac{v}{u - t1}\\
\mathbf{elif}\;t1 \leq 9.4 \cdot 10^{-42}:\\
\;\;\;\;\frac{t1}{-u} \cdot \frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\end{array}
\end{array}
if t1 < -1.64999999999999988e33Initial program 60.5%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in t1 around inf 91.9%
mul-1-neg91.9%
distribute-neg-frac291.9%
+-commutative91.9%
distribute-neg-in91.9%
sub-neg91.9%
add-sqr-sqrt39.0%
sqrt-unprod92.0%
sqr-neg92.0%
sqrt-unprod53.2%
add-sqr-sqrt92.2%
Applied egg-rr92.2%
if -1.64999999999999988e33 < t1 < 9.4000000000000001e-42Initial program 83.4%
times-frac95.2%
distribute-frac-neg95.2%
distribute-neg-frac295.2%
+-commutative95.2%
distribute-neg-in95.2%
unsub-neg95.2%
Simplified95.2%
Taylor expanded in t1 around 0 81.6%
Taylor expanded in t1 around 0 81.9%
associate-*r/81.9%
mul-1-neg81.9%
Simplified81.9%
if 9.4000000000000001e-42 < t1 Initial program 64.9%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in t1 around inf 76.3%
clear-num76.2%
un-div-inv76.2%
Applied egg-rr76.2%
associate-/r/76.1%
Simplified76.1%
Taylor expanded in v around 0 76.3%
mul-1-neg76.3%
distribute-frac-neg76.3%
Simplified76.3%
Final simplification82.7%
(FPCore (u v t1) :precision binary64 (if (or (<= u -8.4e+58) (not (<= u 1.3e+175))) (* t1 (/ (/ v u) u)) (/ v (- u t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -8.4e+58) || !(u <= 1.3e+175)) {
tmp = t1 * ((v / u) / u);
} else {
tmp = v / (u - t1);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-8.4d+58)) .or. (.not. (u <= 1.3d+175))) then
tmp = t1 * ((v / u) / u)
else
tmp = v / (u - t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -8.4e+58) || !(u <= 1.3e+175)) {
tmp = t1 * ((v / u) / u);
} else {
tmp = v / (u - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -8.4e+58) or not (u <= 1.3e+175): tmp = t1 * ((v / u) / u) else: tmp = v / (u - t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -8.4e+58) || !(u <= 1.3e+175)) tmp = Float64(t1 * Float64(Float64(v / u) / u)); else tmp = Float64(v / Float64(u - t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -8.4e+58) || ~((u <= 1.3e+175))) tmp = t1 * ((v / u) / u); else tmp = v / (u - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -8.4e+58], N[Not[LessEqual[u, 1.3e+175]], $MachinePrecision]], N[(t1 * N[(N[(v / u), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -8.4 \cdot 10^{+58} \lor \neg \left(u \leq 1.3 \cdot 10^{+175}\right):\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u - t1}\\
\end{array}
\end{array}
if u < -8.40000000000000048e58 or 1.3e175 < u Initial program 79.3%
times-frac97.0%
distribute-frac-neg97.0%
distribute-neg-frac297.0%
+-commutative97.0%
distribute-neg-in97.0%
unsub-neg97.0%
Simplified97.0%
Taylor expanded in t1 around 0 89.6%
associate-*l/92.5%
frac-2neg92.5%
clear-num93.5%
un-div-inv93.5%
neg-sub093.5%
add-sqr-sqrt63.3%
sqrt-unprod78.7%
sqr-neg78.7%
sqrt-unprod23.0%
add-sqr-sqrt70.7%
associate-+l-70.7%
neg-sub070.7%
add-sqr-sqrt47.8%
sqrt-unprod70.9%
sqr-neg70.9%
sqrt-unprod30.1%
add-sqr-sqrt93.5%
+-commutative93.5%
Applied egg-rr93.5%
Taylor expanded in t1 around 0 93.6%
distribute-neg-frac93.6%
associate-/r*84.7%
clear-num84.7%
associate-/r/84.6%
associate-/r*84.7%
clear-num84.7%
add-sqr-sqrt48.1%
sqrt-unprod61.5%
sqr-neg61.5%
sqrt-unprod31.9%
add-sqr-sqrt70.7%
Applied egg-rr70.7%
if -8.40000000000000048e58 < u < 1.3e175Initial program 70.0%
times-frac97.9%
distribute-frac-neg97.9%
distribute-neg-frac297.9%
+-commutative97.9%
distribute-neg-in97.9%
unsub-neg97.9%
Simplified97.9%
Taylor expanded in t1 around inf 65.5%
mul-1-neg65.5%
distribute-neg-frac265.5%
+-commutative65.5%
distribute-neg-in65.5%
sub-neg65.5%
add-sqr-sqrt23.2%
sqrt-unprod66.1%
sqr-neg66.1%
sqrt-unprod43.5%
add-sqr-sqrt66.6%
Applied egg-rr66.6%
Final simplification67.9%
(FPCore (u v t1) :precision binary64 (if (or (<= u -9.5e+102) (not (<= u 1.7e+168))) (* (/ v u) (/ t1 u)) (/ v (- u t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -9.5e+102) || !(u <= 1.7e+168)) {
tmp = (v / u) * (t1 / u);
} else {
tmp = v / (u - t1);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-9.5d+102)) .or. (.not. (u <= 1.7d+168))) then
tmp = (v / u) * (t1 / u)
else
tmp = v / (u - t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -9.5e+102) || !(u <= 1.7e+168)) {
tmp = (v / u) * (t1 / u);
} else {
tmp = v / (u - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -9.5e+102) or not (u <= 1.7e+168): tmp = (v / u) * (t1 / u) else: tmp = v / (u - t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -9.5e+102) || !(u <= 1.7e+168)) tmp = Float64(Float64(v / u) * Float64(t1 / u)); else tmp = Float64(v / Float64(u - t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -9.5e+102) || ~((u <= 1.7e+168))) tmp = (v / u) * (t1 / u); else tmp = v / (u - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -9.5e+102], N[Not[LessEqual[u, 1.7e+168]], $MachinePrecision]], N[(N[(v / u), $MachinePrecision] * N[(t1 / u), $MachinePrecision]), $MachinePrecision], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -9.5 \cdot 10^{+102} \lor \neg \left(u \leq 1.7 \cdot 10^{+168}\right):\\
\;\;\;\;\frac{v}{u} \cdot \frac{t1}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u - t1}\\
\end{array}
\end{array}
if u < -9.4999999999999992e102 or 1.70000000000000001e168 < u Initial program 77.9%
times-frac96.6%
distribute-frac-neg96.6%
distribute-neg-frac296.6%
+-commutative96.6%
distribute-neg-in96.6%
unsub-neg96.6%
Simplified96.6%
Taylor expanded in t1 around 0 90.8%
associate-*l/94.2%
frac-2neg94.2%
clear-num95.1%
un-div-inv95.2%
neg-sub095.2%
add-sqr-sqrt60.9%
sqrt-unprod78.4%
sqr-neg78.4%
sqrt-unprod26.1%
add-sqr-sqrt73.2%
associate-+l-73.2%
neg-sub073.2%
add-sqr-sqrt47.2%
sqrt-unprod73.4%
sqr-neg73.4%
sqrt-unprod34.1%
add-sqr-sqrt95.2%
+-commutative95.2%
Applied egg-rr95.2%
Taylor expanded in t1 around 0 95.3%
add-sqr-sqrt74.4%
sqrt-unprod84.4%
sqr-neg84.4%
sqrt-unprod56.0%
add-sqr-sqrt73.1%
associate-/r*73.3%
*-un-lft-identity73.3%
times-frac73.2%
clear-num71.9%
Applied egg-rr71.9%
if -9.4999999999999992e102 < u < 1.70000000000000001e168Initial program 71.1%
times-frac98.0%
distribute-frac-neg98.0%
distribute-neg-frac298.0%
+-commutative98.0%
distribute-neg-in98.0%
unsub-neg98.0%
Simplified98.0%
Taylor expanded in t1 around inf 64.3%
mul-1-neg64.3%
distribute-neg-frac264.3%
+-commutative64.3%
distribute-neg-in64.3%
sub-neg64.3%
add-sqr-sqrt24.3%
sqrt-unprod64.9%
sqr-neg64.9%
sqrt-unprod41.1%
add-sqr-sqrt65.3%
Applied egg-rr65.3%
Final simplification67.2%
(FPCore (u v t1) :precision binary64 (if (<= u -3e+164) (/ 1.0 (/ u v)) (if (<= u 1.3e+112) (/ v (- t1)) (/ (- v) u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -3e+164) {
tmp = 1.0 / (u / v);
} else if (u <= 1.3e+112) {
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 <= (-3d+164)) then
tmp = 1.0d0 / (u / v)
else if (u <= 1.3d+112) 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 <= -3e+164) {
tmp = 1.0 / (u / v);
} else if (u <= 1.3e+112) {
tmp = v / -t1;
} else {
tmp = -v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -3e+164: tmp = 1.0 / (u / v) elif u <= 1.3e+112: tmp = v / -t1 else: tmp = -v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -3e+164) tmp = Float64(1.0 / Float64(u / v)); elseif (u <= 1.3e+112) tmp = Float64(v / Float64(-t1)); else tmp = Float64(Float64(-v) / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -3e+164) tmp = 1.0 / (u / v); elseif (u <= 1.3e+112) tmp = v / -t1; else tmp = -v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -3e+164], N[(1.0 / N[(u / v), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 1.3e+112], N[(v / (-t1)), $MachinePrecision], N[((-v) / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3 \cdot 10^{+164}:\\
\;\;\;\;\frac{1}{\frac{u}{v}}\\
\mathbf{elif}\;u \leq 1.3 \cdot 10^{+112}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{u}\\
\end{array}
\end{array}
if u < -3.00000000000000001e164Initial program 79.5%
times-frac95.1%
distribute-frac-neg95.1%
distribute-neg-frac295.1%
+-commutative95.1%
distribute-neg-in95.1%
unsub-neg95.1%
Simplified95.1%
Taylor expanded in t1 around inf 47.6%
associate-*r/47.6%
neg-mul-147.6%
add-sqr-sqrt16.1%
sqrt-unprod47.1%
sqr-neg47.1%
sqrt-unprod31.5%
add-sqr-sqrt47.6%
clear-num49.4%
Applied egg-rr49.4%
Taylor expanded in t1 around 0 49.4%
if -3.00000000000000001e164 < u < 1.3e112Initial program 71.4%
associate-*l/75.3%
*-commutative75.3%
Simplified75.3%
Taylor expanded in t1 around inf 62.2%
associate-*r/62.2%
neg-mul-162.2%
Simplified62.2%
if 1.3e112 < u Initial program 76.0%
times-frac97.3%
distribute-frac-neg97.3%
distribute-neg-frac297.3%
+-commutative97.3%
distribute-neg-in97.3%
unsub-neg97.3%
Simplified97.3%
Taylor expanded in t1 around inf 36.2%
Taylor expanded in t1 around 0 33.6%
neg-mul-133.6%
distribute-neg-frac233.6%
Simplified33.6%
Final simplification56.5%
(FPCore (u v t1) :precision binary64 (if (<= u -6.5e+163) (/ v u) (if (<= u 1.05e+111) (/ v (- t1)) (/ (- v) u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -6.5e+163) {
tmp = v / u;
} else if (u <= 1.05e+111) {
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 <= (-6.5d+163)) then
tmp = v / u
else if (u <= 1.05d+111) 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 <= -6.5e+163) {
tmp = v / u;
} else if (u <= 1.05e+111) {
tmp = v / -t1;
} else {
tmp = -v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -6.5e+163: tmp = v / u elif u <= 1.05e+111: tmp = v / -t1 else: tmp = -v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -6.5e+163) tmp = Float64(v / u); elseif (u <= 1.05e+111) tmp = Float64(v / Float64(-t1)); else tmp = Float64(Float64(-v) / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -6.5e+163) tmp = v / u; elseif (u <= 1.05e+111) tmp = v / -t1; else tmp = -v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -6.5e+163], N[(v / u), $MachinePrecision], If[LessEqual[u, 1.05e+111], N[(v / (-t1)), $MachinePrecision], N[((-v) / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -6.5 \cdot 10^{+163}:\\
\;\;\;\;\frac{v}{u}\\
\mathbf{elif}\;u \leq 1.05 \cdot 10^{+111}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{u}\\
\end{array}
\end{array}
if u < -6.4999999999999998e163Initial program 79.5%
times-frac95.1%
distribute-frac-neg95.1%
distribute-neg-frac295.1%
+-commutative95.1%
distribute-neg-in95.1%
unsub-neg95.1%
Simplified95.1%
Taylor expanded in t1 around inf 47.6%
associate-*r/47.6%
neg-mul-147.6%
add-sqr-sqrt16.1%
sqrt-unprod47.1%
sqr-neg47.1%
sqrt-unprod31.5%
add-sqr-sqrt47.6%
clear-num49.4%
Applied egg-rr49.4%
Taylor expanded in t1 around 0 47.6%
if -6.4999999999999998e163 < u < 1.04999999999999997e111Initial program 71.4%
associate-*l/75.3%
*-commutative75.3%
Simplified75.3%
Taylor expanded in t1 around inf 62.2%
associate-*r/62.2%
neg-mul-162.2%
Simplified62.2%
if 1.04999999999999997e111 < u Initial program 76.0%
times-frac97.3%
distribute-frac-neg97.3%
distribute-neg-frac297.3%
+-commutative97.3%
distribute-neg-in97.3%
unsub-neg97.3%
Simplified97.3%
Taylor expanded in t1 around inf 36.2%
Taylor expanded in t1 around 0 33.6%
neg-mul-133.6%
distribute-neg-frac233.6%
Simplified33.6%
Final simplification56.3%
(FPCore (u v t1) :precision binary64 (if (<= t1 -6.3e+128) (/ v t1) (/ (- v) u)))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -6.3e+128) {
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 <= (-6.3d+128)) 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 <= -6.3e+128) {
tmp = v / t1;
} else {
tmp = -v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -6.3e+128: tmp = v / t1 else: tmp = -v / u return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -6.3e+128) tmp = Float64(v / t1); else tmp = Float64(Float64(-v) / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -6.3e+128) tmp = v / t1; else tmp = -v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -6.3e+128], N[(v / t1), $MachinePrecision], N[((-v) / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -6.3 \cdot 10^{+128}:\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{u}\\
\end{array}
\end{array}
if t1 < -6.2999999999999999e128Initial program 52.7%
times-frac100.0%
distribute-frac-neg100.0%
distribute-neg-frac2100.0%
+-commutative100.0%
distribute-neg-in100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in t1 around inf 91.0%
Taylor expanded in u around inf 39.3%
if -6.2999999999999999e128 < t1 Initial program 77.2%
times-frac97.1%
distribute-frac-neg97.1%
distribute-neg-frac297.1%
+-commutative97.1%
distribute-neg-in97.1%
unsub-neg97.1%
Simplified97.1%
Taylor expanded in t1 around inf 50.3%
Taylor expanded in t1 around 0 15.7%
neg-mul-115.7%
distribute-neg-frac215.7%
Simplified15.7%
Final simplification19.7%
(FPCore (u v t1) :precision binary64 (if (<= t1 -2.3e+122) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -2.3e+122) {
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.3d+122)) 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.3e+122) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -2.3e+122: tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -2.3e+122) 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.3e+122) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -2.3e+122], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2.3 \cdot 10^{+122}:\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -2.3000000000000001e122Initial program 54.8%
times-frac100.0%
distribute-frac-neg100.0%
distribute-neg-frac2100.0%
+-commutative100.0%
distribute-neg-in100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in t1 around inf 91.4%
Taylor expanded in u around inf 37.7%
if -2.3000000000000001e122 < t1 Initial program 77.0%
times-frac97.1%
distribute-frac-neg97.1%
distribute-neg-frac297.1%
+-commutative97.1%
distribute-neg-in97.1%
unsub-neg97.1%
Simplified97.1%
Taylor expanded in t1 around inf 49.8%
associate-*r/49.8%
neg-mul-149.8%
add-sqr-sqrt29.2%
sqrt-unprod33.3%
sqr-neg33.3%
sqrt-unprod9.5%
add-sqr-sqrt17.3%
clear-num17.5%
Applied egg-rr17.5%
Taylor expanded in t1 around 0 15.8%
(FPCore (u v t1) :precision binary64 (/ v (- u t1)))
double code(double u, double v, double t1) {
return v / (u - t1);
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = v / (u - t1)
end function
public static double code(double u, double v, double t1) {
return v / (u - t1);
}
def code(u, v, t1): return v / (u - t1)
function code(u, v, t1) return Float64(v / Float64(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.1%
times-frac97.6%
distribute-frac-neg97.6%
distribute-neg-frac297.6%
+-commutative97.6%
distribute-neg-in97.6%
unsub-neg97.6%
Simplified97.6%
Taylor expanded in t1 around inf 57.2%
mul-1-neg57.2%
distribute-neg-frac257.2%
+-commutative57.2%
distribute-neg-in57.2%
sub-neg57.2%
add-sqr-sqrt26.0%
sqrt-unprod66.1%
sqr-neg66.1%
sqrt-unprod32.0%
add-sqr-sqrt57.9%
Applied egg-rr57.9%
(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.1%
times-frac97.6%
distribute-frac-neg97.6%
distribute-neg-frac297.6%
+-commutative97.6%
distribute-neg-in97.6%
unsub-neg97.6%
Simplified97.6%
Taylor expanded in t1 around inf 51.0%
Taylor expanded in u around inf 11.7%
herbie shell --seed 2024157
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))