
(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(Float64(-v) / Float64(t1 + u)) * Float64(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 + u), $MachinePrecision]), $MachinePrecision] * N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{-v}{t1 + u} \cdot \frac{t1}{t1 + u}
\end{array}
Initial program 72.9%
times-frac96.9%
distribute-frac-neg96.9%
distribute-neg-frac296.9%
+-commutative96.9%
distribute-neg-in96.9%
unsub-neg96.9%
Simplified96.9%
Final simplification96.9%
(FPCore (u v t1)
:precision binary64
(if (<= t1 -9e+107)
(/ (- (* 2.0 (* u (/ v t1))) v) t1)
(if (<= t1 1.15e+87)
(* t1 (/ (/ v (+ t1 u)) (- (- u) t1)))
(/ (- v) (+ t1 u)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -9e+107) {
tmp = ((2.0 * (u * (v / t1))) - v) / t1;
} else if (t1 <= 1.15e+87) {
tmp = t1 * ((v / (t1 + 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 (t1 <= (-9d+107)) then
tmp = ((2.0d0 * (u * (v / t1))) - v) / t1
else if (t1 <= 1.15d+87) then
tmp = t1 * ((v / (t1 + 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 (t1 <= -9e+107) {
tmp = ((2.0 * (u * (v / t1))) - v) / t1;
} else if (t1 <= 1.15e+87) {
tmp = t1 * ((v / (t1 + u)) / (-u - t1));
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -9e+107: tmp = ((2.0 * (u * (v / t1))) - v) / t1 elif t1 <= 1.15e+87: tmp = t1 * ((v / (t1 + u)) / (-u - t1)) else: tmp = -v / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -9e+107) tmp = Float64(Float64(Float64(2.0 * Float64(u * Float64(v / t1))) - v) / t1); elseif (t1 <= 1.15e+87) tmp = Float64(t1 * Float64(Float64(v / Float64(t1 + u)) / Float64(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 (t1 <= -9e+107) tmp = ((2.0 * (u * (v / t1))) - v) / t1; elseif (t1 <= 1.15e+87) tmp = t1 * ((v / (t1 + u)) / (-u - t1)); else tmp = -v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -9e+107], N[(N[(N[(2.0 * N[(u * N[(v / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - v), $MachinePrecision] / t1), $MachinePrecision], If[LessEqual[t1, 1.15e+87], N[(t1 * N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -9 \cdot 10^{+107}:\\
\;\;\;\;\frac{2 \cdot \left(u \cdot \frac{v}{t1}\right) - v}{t1}\\
\mathbf{elif}\;t1 \leq 1.15 \cdot 10^{+87}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{t1 + u}}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\end{array}
\end{array}
if t1 < -9e107Initial program 45.3%
associate-*l/51.0%
*-commutative51.0%
Simplified51.0%
Taylor expanded in t1 around inf 91.2%
+-commutative91.2%
neg-mul-191.2%
unsub-neg91.2%
associate-/l*95.6%
Simplified95.6%
if -9e107 < t1 < 1.1500000000000001e87Initial program 87.7%
associate-/l*85.7%
Simplified85.7%
associate-/r*92.2%
div-inv92.1%
Applied egg-rr92.1%
associate-*r/92.2%
*-rgt-identity92.2%
Simplified92.2%
if 1.1500000000000001e87 < t1 Initial program 34.4%
associate-*l/43.4%
*-commutative43.4%
Simplified43.4%
associate-*r/34.4%
*-commutative34.4%
times-frac100.0%
frac-2neg100.0%
+-commutative100.0%
distribute-neg-in100.0%
sub-neg100.0%
associate-*r/100.0%
add-sqr-sqrt0.0%
sqrt-unprod4.9%
sqr-neg4.9%
sqrt-unprod15.9%
add-sqr-sqrt15.9%
sub-neg15.9%
+-commutative15.9%
add-sqr-sqrt0.0%
sqrt-unprod43.4%
sqr-neg43.4%
sqrt-unprod91.5%
add-sqr-sqrt38.8%
sqrt-unprod91.7%
sqr-neg91.7%
Applied egg-rr100.0%
Taylor expanded in t1 around inf 92.3%
mul-1-neg92.3%
Simplified92.3%
Final simplification92.8%
(FPCore (u v t1)
:precision binary64
(if (<= t1 -4.2e+80)
(/ (- (* 2.0 (* u (/ v t1))) v) t1)
(if (<= t1 3.1e+116)
(* v (/ t1 (* (- (- u) t1) (+ t1 u))))
(/ (- v) (+ t1 u)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -4.2e+80) {
tmp = ((2.0 * (u * (v / t1))) - v) / t1;
} else if (t1 <= 3.1e+116) {
tmp = v * (t1 / ((-u - t1) * (t1 + 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 <= (-4.2d+80)) then
tmp = ((2.0d0 * (u * (v / t1))) - v) / t1
else if (t1 <= 3.1d+116) then
tmp = v * (t1 / ((-u - t1) * (t1 + 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 <= -4.2e+80) {
tmp = ((2.0 * (u * (v / t1))) - v) / t1;
} else if (t1 <= 3.1e+116) {
tmp = v * (t1 / ((-u - t1) * (t1 + u)));
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -4.2e+80: tmp = ((2.0 * (u * (v / t1))) - v) / t1 elif t1 <= 3.1e+116: tmp = v * (t1 / ((-u - t1) * (t1 + u))) else: tmp = -v / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -4.2e+80) tmp = Float64(Float64(Float64(2.0 * Float64(u * Float64(v / t1))) - v) / t1); elseif (t1 <= 3.1e+116) tmp = Float64(v * Float64(t1 / Float64(Float64(Float64(-u) - t1) * Float64(t1 + 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 <= -4.2e+80) tmp = ((2.0 * (u * (v / t1))) - v) / t1; elseif (t1 <= 3.1e+116) tmp = v * (t1 / ((-u - t1) * (t1 + u))); else tmp = -v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -4.2e+80], N[(N[(N[(2.0 * N[(u * N[(v / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - v), $MachinePrecision] / t1), $MachinePrecision], If[LessEqual[t1, 3.1e+116], N[(v * N[(t1 / N[(N[((-u) - t1), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -4.2 \cdot 10^{+80}:\\
\;\;\;\;\frac{2 \cdot \left(u \cdot \frac{v}{t1}\right) - v}{t1}\\
\mathbf{elif}\;t1 \leq 3.1 \cdot 10^{+116}:\\
\;\;\;\;v \cdot \frac{t1}{\left(\left(-u\right) - t1\right) \cdot \left(t1 + u\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\end{array}
\end{array}
if t1 < -4.20000000000000003e80Initial program 48.7%
associate-*l/54.0%
*-commutative54.0%
Simplified54.0%
Taylor expanded in t1 around inf 91.7%
+-commutative91.7%
neg-mul-191.7%
unsub-neg91.7%
associate-/l*95.9%
Simplified95.9%
if -4.20000000000000003e80 < t1 < 3.09999999999999996e116Initial program 86.4%
associate-*l/86.1%
*-commutative86.1%
Simplified86.1%
if 3.09999999999999996e116 < t1 Initial program 28.4%
associate-*l/33.0%
*-commutative33.0%
Simplified33.0%
associate-*r/28.4%
*-commutative28.4%
times-frac99.9%
frac-2neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*r/100.0%
add-sqr-sqrt0.0%
sqrt-unprod1.4%
sqr-neg1.4%
sqrt-unprod15.0%
add-sqr-sqrt15.0%
sub-neg15.0%
+-commutative15.0%
add-sqr-sqrt0.0%
sqrt-unprod32.9%
sqr-neg32.9%
sqrt-unprod92.9%
add-sqr-sqrt41.1%
sqrt-unprod93.0%
sqr-neg93.0%
Applied egg-rr100.0%
Taylor expanded in t1 around inf 93.7%
mul-1-neg93.7%
Simplified93.7%
Final simplification88.7%
(FPCore (u v t1) :precision binary64 (if (or (<= u -3.8e-27) (not (<= u 1.46e-29))) (* t1 (/ (/ v (- t1 u)) u)) (/ (* (- v) (/ t1 (+ t1 u))) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.8e-27) || !(u <= 1.46e-29)) {
tmp = t1 * ((v / (t1 - u)) / u);
} else {
tmp = (-v * (t1 / (t1 + u))) / t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-3.8d-27)) .or. (.not. (u <= 1.46d-29))) then
tmp = t1 * ((v / (t1 - u)) / u)
else
tmp = (-v * (t1 / (t1 + u))) / t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.8e-27) || !(u <= 1.46e-29)) {
tmp = t1 * ((v / (t1 - u)) / u);
} else {
tmp = (-v * (t1 / (t1 + u))) / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -3.8e-27) or not (u <= 1.46e-29): tmp = t1 * ((v / (t1 - u)) / u) else: tmp = (-v * (t1 / (t1 + u))) / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -3.8e-27) || !(u <= 1.46e-29)) tmp = Float64(t1 * Float64(Float64(v / Float64(t1 - u)) / u)); else tmp = Float64(Float64(Float64(-v) * Float64(t1 / Float64(t1 + u))) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -3.8e-27) || ~((u <= 1.46e-29))) tmp = t1 * ((v / (t1 - u)) / u); else tmp = (-v * (t1 / (t1 + u))) / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -3.8e-27], N[Not[LessEqual[u, 1.46e-29]], $MachinePrecision]], N[(t1 * N[(N[(v / N[(t1 - u), $MachinePrecision]), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision], N[(N[((-v) * N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.8 \cdot 10^{-27} \lor \neg \left(u \leq 1.46 \cdot 10^{-29}\right):\\
\;\;\;\;t1 \cdot \frac{\frac{v}{t1 - u}}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(-v\right) \cdot \frac{t1}{t1 + u}}{t1}\\
\end{array}
\end{array}
if u < -3.8e-27 or 1.4600000000000001e-29 < u Initial program 82.7%
times-frac95.6%
distribute-frac-neg95.6%
distribute-neg-frac295.6%
+-commutative95.6%
distribute-neg-in95.6%
unsub-neg95.6%
Simplified95.6%
Taylor expanded in t1 around 0 82.8%
associate-*r/82.8%
mul-1-neg82.8%
Simplified82.8%
*-commutative82.8%
frac-2neg82.8%
clear-num81.6%
frac-times70.6%
*-commutative70.6%
*-un-lft-identity70.6%
add-sqr-sqrt41.0%
sqrt-unprod54.7%
sqr-neg54.7%
sqrt-unprod19.7%
add-sqr-sqrt45.5%
distribute-neg-in45.5%
add-sqr-sqrt22.4%
sqrt-unprod49.9%
sqr-neg49.9%
sqrt-unprod23.3%
add-sqr-sqrt45.5%
sub-neg45.5%
add-sqr-sqrt22.2%
sqrt-unprod51.5%
sqr-neg51.5%
sqrt-unprod38.2%
add-sqr-sqrt70.6%
Applied egg-rr70.6%
associate-/r*81.6%
associate-/r/83.3%
Simplified83.3%
if -3.8e-27 < u < 1.4600000000000001e-29Initial program 61.8%
associate-*l/67.7%
*-commutative67.7%
Simplified67.7%
associate-*r/61.8%
*-commutative61.8%
times-frac98.3%
frac-2neg98.3%
+-commutative98.3%
distribute-neg-in98.3%
sub-neg98.3%
associate-*r/97.6%
add-sqr-sqrt46.4%
sqrt-unprod26.9%
sqr-neg26.9%
sqrt-unprod3.4%
add-sqr-sqrt10.3%
sub-neg10.3%
+-commutative10.3%
add-sqr-sqrt6.8%
sqrt-unprod31.8%
sqr-neg31.8%
sqrt-unprod41.3%
add-sqr-sqrt20.6%
sqrt-unprod45.5%
sqr-neg45.5%
Applied egg-rr97.6%
Taylor expanded in t1 around inf 83.0%
Final simplification83.2%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.35e-25) (not (<= u 3.8e-40))) (* t1 (/ (/ v (- t1 u)) u)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.35e-25) || !(u <= 3.8e-40)) {
tmp = t1 * ((v / (t1 - 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 <= (-1.35d-25)) .or. (.not. (u <= 3.8d-40))) then
tmp = t1 * ((v / (t1 - 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 <= -1.35e-25) || !(u <= 3.8e-40)) {
tmp = t1 * ((v / (t1 - u)) / u);
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.35e-25) or not (u <= 3.8e-40): tmp = t1 * ((v / (t1 - u)) / u) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.35e-25) || !(u <= 3.8e-40)) tmp = Float64(t1 * Float64(Float64(v / Float64(t1 - u)) / u)); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -1.35e-25) || ~((u <= 3.8e-40))) tmp = t1 * ((v / (t1 - u)) / u); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.35e-25], N[Not[LessEqual[u, 3.8e-40]], $MachinePrecision]], N[(t1 * N[(N[(v / N[(t1 - u), $MachinePrecision]), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.35 \cdot 10^{-25} \lor \neg \left(u \leq 3.8 \cdot 10^{-40}\right):\\
\;\;\;\;t1 \cdot \frac{\frac{v}{t1 - u}}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -1.35000000000000008e-25 or 3.7999999999999999e-40 < u Initial program 81.6%
times-frac95.7%
distribute-frac-neg95.7%
distribute-neg-frac295.7%
+-commutative95.7%
distribute-neg-in95.7%
unsub-neg95.7%
Simplified95.7%
Taylor expanded in t1 around 0 82.3%
associate-*r/82.3%
mul-1-neg82.3%
Simplified82.3%
*-commutative82.3%
frac-2neg82.3%
clear-num81.1%
frac-times70.3%
*-commutative70.3%
*-un-lft-identity70.3%
add-sqr-sqrt41.1%
sqrt-unprod54.7%
sqr-neg54.7%
sqrt-unprod19.5%
add-sqr-sqrt45.0%
distribute-neg-in45.0%
add-sqr-sqrt22.1%
sqrt-unprod49.2%
sqr-neg49.2%
sqrt-unprod23.0%
add-sqr-sqrt44.9%
sub-neg44.9%
add-sqr-sqrt21.9%
sqrt-unprod50.8%
sqr-neg50.8%
sqrt-unprod38.3%
add-sqr-sqrt70.4%
Applied egg-rr70.4%
associate-/r*81.2%
associate-/r/82.9%
Simplified82.9%
if -1.35000000000000008e-25 < u < 3.7999999999999999e-40Initial program 62.7%
associate-*l/67.1%
*-commutative67.1%
Simplified67.1%
Taylor expanded in t1 around inf 82.7%
associate-*r/82.7%
neg-mul-182.7%
Simplified82.7%
Final simplification82.8%
(FPCore (u v t1) :precision binary64 (if (or (<= u -4e-29) (not (<= u 7.6e-27))) (/ (* t1 (/ v u)) (- u)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -4e-29) || !(u <= 7.6e-27)) {
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 <= (-4d-29)) .or. (.not. (u <= 7.6d-27))) 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 <= -4e-29) || !(u <= 7.6e-27)) {
tmp = (t1 * (v / u)) / -u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -4e-29) or not (u <= 7.6e-27): tmp = (t1 * (v / u)) / -u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -4e-29) || !(u <= 7.6e-27)) tmp = Float64(Float64(t1 * Float64(v / u)) / Float64(-u)); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -4e-29) || ~((u <= 7.6e-27))) tmp = (t1 * (v / u)) / -u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -4e-29], N[Not[LessEqual[u, 7.6e-27]], $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 -4 \cdot 10^{-29} \lor \neg \left(u \leq 7.6 \cdot 10^{-27}\right):\\
\;\;\;\;\frac{t1 \cdot \frac{v}{u}}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -3.99999999999999977e-29 or 7.60000000000000001e-27 < u Initial program 82.7%
times-frac95.6%
distribute-frac-neg95.6%
distribute-neg-frac295.6%
+-commutative95.6%
distribute-neg-in95.6%
unsub-neg95.6%
Simplified95.6%
Taylor expanded in t1 around 0 82.8%
associate-*r/82.8%
mul-1-neg82.8%
Simplified82.8%
Taylor expanded in t1 around 0 78.7%
neg-sub078.7%
sub-neg78.7%
add-sqr-sqrt36.1%
sqrt-unprod50.5%
sqr-neg50.5%
sqrt-unprod23.0%
add-sqr-sqrt44.9%
Applied egg-rr44.9%
+-lft-identity44.9%
Simplified44.9%
frac-2neg44.9%
associate-*l/44.9%
add-sqr-sqrt20.5%
sqrt-unprod59.4%
sqr-neg59.4%
sqrt-unprod44.1%
add-sqr-sqrt82.5%
Applied egg-rr82.5%
if -3.99999999999999977e-29 < u < 7.60000000000000001e-27Initial program 61.8%
associate-*l/67.7%
*-commutative67.7%
Simplified67.7%
Taylor expanded in t1 around inf 82.2%
associate-*r/82.2%
neg-mul-182.2%
Simplified82.2%
Final simplification82.4%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1e-33) (not (<= t1 3.5e+68))) (/ (- v) (+ t1 u)) (/ (- t1) (* u (/ u v)))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1e-33) || !(t1 <= 3.5e+68)) {
tmp = -v / (t1 + u);
} 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 ((t1 <= (-1d-33)) .or. (.not. (t1 <= 3.5d+68))) then
tmp = -v / (t1 + u)
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 ((t1 <= -1e-33) || !(t1 <= 3.5e+68)) {
tmp = -v / (t1 + u);
} else {
tmp = -t1 / (u * (u / v));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1e-33) or not (t1 <= 3.5e+68): tmp = -v / (t1 + u) else: tmp = -t1 / (u * (u / v)) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1e-33) || !(t1 <= 3.5e+68)) tmp = Float64(Float64(-v) / Float64(t1 + u)); else tmp = Float64(Float64(-t1) / Float64(u * Float64(u / v))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -1e-33) || ~((t1 <= 3.5e+68))) tmp = -v / (t1 + u); else tmp = -t1 / (u * (u / v)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1e-33], N[Not[LessEqual[t1, 3.5e+68]], $MachinePrecision]], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision], N[((-t1) / N[(u * N[(u / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1 \cdot 10^{-33} \lor \neg \left(t1 \leq 3.5 \cdot 10^{+68}\right):\\
\;\;\;\;\frac{-v}{t1 + u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-t1}{u \cdot \frac{u}{v}}\\
\end{array}
\end{array}
if t1 < -1.0000000000000001e-33 or 3.49999999999999977e68 < t1 Initial program 53.7%
associate-*l/58.9%
*-commutative58.9%
Simplified58.9%
associate-*r/53.7%
*-commutative53.7%
times-frac99.9%
frac-2neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*r/99.9%
add-sqr-sqrt64.3%
sqrt-unprod36.8%
sqr-neg36.8%
sqrt-unprod5.9%
add-sqr-sqrt27.8%
sub-neg27.8%
+-commutative27.8%
add-sqr-sqrt21.8%
sqrt-unprod38.3%
sqr-neg38.3%
sqrt-unprod31.1%
add-sqr-sqrt13.0%
sqrt-unprod31.2%
sqr-neg31.2%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 86.4%
mul-1-neg86.4%
Simplified86.4%
if -1.0000000000000001e-33 < t1 < 3.49999999999999977e68Initial program 88.8%
times-frac94.4%
distribute-frac-neg94.4%
distribute-neg-frac294.4%
+-commutative94.4%
distribute-neg-in94.4%
unsub-neg94.4%
Simplified94.4%
Taylor expanded in t1 around 0 74.1%
associate-*r/74.1%
mul-1-neg74.1%
Simplified74.1%
Taylor expanded in t1 around 0 76.5%
*-commutative76.5%
clear-num76.4%
frac-2neg76.4%
frac-times77.0%
*-un-lft-identity77.0%
remove-double-neg77.0%
Applied egg-rr77.0%
Final simplification81.3%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -3.4e-37) (not (<= t1 2.9e+68))) (/ (- v) (+ t1 u)) (* (/ v u) (/ t1 (- u)))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -3.4e-37) || !(t1 <= 2.9e+68)) {
tmp = -v / (t1 + u);
} else {
tmp = (v / u) * (t1 / -u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-3.4d-37)) .or. (.not. (t1 <= 2.9d+68))) then
tmp = -v / (t1 + u)
else
tmp = (v / u) * (t1 / -u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -3.4e-37) || !(t1 <= 2.9e+68)) {
tmp = -v / (t1 + u);
} else {
tmp = (v / u) * (t1 / -u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -3.4e-37) or not (t1 <= 2.9e+68): tmp = -v / (t1 + u) else: tmp = (v / u) * (t1 / -u) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -3.4e-37) || !(t1 <= 2.9e+68)) tmp = Float64(Float64(-v) / Float64(t1 + u)); else tmp = Float64(Float64(v / u) * Float64(t1 / Float64(-u))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -3.4e-37) || ~((t1 <= 2.9e+68))) tmp = -v / (t1 + u); else tmp = (v / u) * (t1 / -u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -3.4e-37], N[Not[LessEqual[t1, 2.9e+68]], $MachinePrecision]], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision], N[(N[(v / u), $MachinePrecision] * N[(t1 / (-u)), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -3.4 \cdot 10^{-37} \lor \neg \left(t1 \leq 2.9 \cdot 10^{+68}\right):\\
\;\;\;\;\frac{-v}{t1 + u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u} \cdot \frac{t1}{-u}\\
\end{array}
\end{array}
if t1 < -3.40000000000000018e-37 or 2.90000000000000011e68 < t1 Initial program 53.7%
associate-*l/58.9%
*-commutative58.9%
Simplified58.9%
associate-*r/53.7%
*-commutative53.7%
times-frac99.9%
frac-2neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*r/99.9%
add-sqr-sqrt64.3%
sqrt-unprod36.8%
sqr-neg36.8%
sqrt-unprod5.9%
add-sqr-sqrt27.8%
sub-neg27.8%
+-commutative27.8%
add-sqr-sqrt21.8%
sqrt-unprod38.3%
sqr-neg38.3%
sqrt-unprod31.1%
add-sqr-sqrt13.0%
sqrt-unprod31.2%
sqr-neg31.2%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 86.4%
mul-1-neg86.4%
Simplified86.4%
if -3.40000000000000018e-37 < t1 < 2.90000000000000011e68Initial program 88.8%
times-frac94.4%
distribute-frac-neg94.4%
distribute-neg-frac294.4%
+-commutative94.4%
distribute-neg-in94.4%
unsub-neg94.4%
Simplified94.4%
Taylor expanded in t1 around 0 74.1%
associate-*r/74.1%
mul-1-neg74.1%
Simplified74.1%
Taylor expanded in t1 around 0 76.5%
Final simplification81.0%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -2.5e-39) (not (<= t1 2.9e+68))) (/ (- v) (+ t1 u)) (* v (/ (/ t1 (- u)) u))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -2.5e-39) || !(t1 <= 2.9e+68)) {
tmp = -v / (t1 + u);
} else {
tmp = v * ((t1 / -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 ((t1 <= (-2.5d-39)) .or. (.not. (t1 <= 2.9d+68))) then
tmp = -v / (t1 + u)
else
tmp = v * ((t1 / -u) / u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -2.5e-39) || !(t1 <= 2.9e+68)) {
tmp = -v / (t1 + u);
} else {
tmp = v * ((t1 / -u) / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -2.5e-39) or not (t1 <= 2.9e+68): tmp = -v / (t1 + u) else: tmp = v * ((t1 / -u) / u) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -2.5e-39) || !(t1 <= 2.9e+68)) tmp = Float64(Float64(-v) / Float64(t1 + u)); else tmp = Float64(v * Float64(Float64(t1 / Float64(-u)) / u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -2.5e-39) || ~((t1 <= 2.9e+68))) tmp = -v / (t1 + u); else tmp = v * ((t1 / -u) / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -2.5e-39], N[Not[LessEqual[t1, 2.9e+68]], $MachinePrecision]], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision], N[(v * N[(N[(t1 / (-u)), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2.5 \cdot 10^{-39} \lor \neg \left(t1 \leq 2.9 \cdot 10^{+68}\right):\\
\;\;\;\;\frac{-v}{t1 + u}\\
\mathbf{else}:\\
\;\;\;\;v \cdot \frac{\frac{t1}{-u}}{u}\\
\end{array}
\end{array}
if t1 < -2.4999999999999999e-39 or 2.90000000000000011e68 < t1 Initial program 53.7%
associate-*l/58.9%
*-commutative58.9%
Simplified58.9%
associate-*r/53.7%
*-commutative53.7%
times-frac99.9%
frac-2neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*r/99.9%
add-sqr-sqrt64.3%
sqrt-unprod36.8%
sqr-neg36.8%
sqrt-unprod5.9%
add-sqr-sqrt27.8%
sub-neg27.8%
+-commutative27.8%
add-sqr-sqrt21.8%
sqrt-unprod38.3%
sqr-neg38.3%
sqrt-unprod31.1%
add-sqr-sqrt13.0%
sqrt-unprod31.2%
sqr-neg31.2%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 86.4%
mul-1-neg86.4%
Simplified86.4%
if -2.4999999999999999e-39 < t1 < 2.90000000000000011e68Initial program 88.8%
times-frac94.4%
distribute-frac-neg94.4%
distribute-neg-frac294.4%
+-commutative94.4%
distribute-neg-in94.4%
unsub-neg94.4%
Simplified94.4%
Taylor expanded in t1 around 0 74.1%
associate-*r/74.1%
mul-1-neg74.1%
Simplified74.1%
Taylor expanded in v around 0 72.6%
mul-1-neg72.6%
associate-/r*75.7%
*-commutative75.7%
associate-*r/73.1%
associate-/l*72.9%
distribute-lft-neg-in72.9%
Simplified72.9%
Taylor expanded in t1 around 0 75.2%
Final simplification80.3%
(FPCore (u v t1) :precision binary64 (if (<= u -6.2e-29) (/ (/ t1 (/ u v)) (- u)) (if (<= u 1.05e-26) (/ v (- t1)) (/ (* t1 (/ v u)) (- u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -6.2e-29) {
tmp = (t1 / (u / v)) / -u;
} else if (u <= 1.05e-26) {
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 <= (-6.2d-29)) then
tmp = (t1 / (u / v)) / -u
else if (u <= 1.05d-26) 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 <= -6.2e-29) {
tmp = (t1 / (u / v)) / -u;
} else if (u <= 1.05e-26) {
tmp = v / -t1;
} else {
tmp = (t1 * (v / u)) / -u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -6.2e-29: tmp = (t1 / (u / v)) / -u elif u <= 1.05e-26: tmp = v / -t1 else: tmp = (t1 * (v / u)) / -u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -6.2e-29) tmp = Float64(Float64(t1 / Float64(u / v)) / Float64(-u)); elseif (u <= 1.05e-26) 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 <= -6.2e-29) tmp = (t1 / (u / v)) / -u; elseif (u <= 1.05e-26) tmp = v / -t1; else tmp = (t1 * (v / u)) / -u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -6.2e-29], N[(N[(t1 / N[(u / v), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision], If[LessEqual[u, 1.05e-26], N[(v / (-t1)), $MachinePrecision], N[(N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -6.2 \cdot 10^{-29}:\\
\;\;\;\;\frac{\frac{t1}{\frac{u}{v}}}{-u}\\
\mathbf{elif}\;u \leq 1.05 \cdot 10^{-26}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{u}}{-u}\\
\end{array}
\end{array}
if u < -6.20000000000000052e-29Initial program 82.3%
times-frac94.9%
distribute-frac-neg94.9%
distribute-neg-frac294.9%
+-commutative94.9%
distribute-neg-in94.9%
unsub-neg94.9%
Simplified94.9%
Taylor expanded in t1 around 0 84.9%
associate-*r/84.9%
mul-1-neg84.9%
Simplified84.9%
Taylor expanded in t1 around 0 80.1%
*-commutative80.1%
distribute-frac-neg80.1%
distribute-frac-neg280.1%
associate-*r/84.1%
add-sqr-sqrt47.1%
sqrt-unprod54.2%
sqr-neg54.2%
sqrt-unprod21.2%
add-sqr-sqrt45.0%
*-commutative45.0%
clear-num45.0%
un-div-inv45.0%
add-sqr-sqrt21.2%
sqrt-unprod54.2%
sqr-neg54.2%
sqrt-unprod47.1%
add-sqr-sqrt84.1%
Applied egg-rr84.1%
if -6.20000000000000052e-29 < u < 1.05000000000000004e-26Initial program 61.8%
associate-*l/67.7%
*-commutative67.7%
Simplified67.7%
Taylor expanded in t1 around inf 82.2%
associate-*r/82.2%
neg-mul-182.2%
Simplified82.2%
if 1.05000000000000004e-26 < u Initial program 83.0%
times-frac96.1%
distribute-frac-neg96.1%
distribute-neg-frac296.1%
+-commutative96.1%
distribute-neg-in96.1%
unsub-neg96.1%
Simplified96.1%
Taylor expanded in t1 around 0 81.1%
associate-*r/81.1%
mul-1-neg81.1%
Simplified81.1%
Taylor expanded in t1 around 0 77.5%
neg-sub077.5%
sub-neg77.5%
add-sqr-sqrt36.6%
sqrt-unprod52.0%
sqr-neg52.0%
sqrt-unprod22.4%
add-sqr-sqrt44.8%
Applied egg-rr44.8%
+-lft-identity44.8%
Simplified44.8%
frac-2neg44.8%
associate-*l/44.7%
add-sqr-sqrt0.0%
sqrt-unprod71.2%
sqr-neg71.2%
sqrt-unprod81.0%
add-sqr-sqrt81.2%
Applied egg-rr81.2%
Final simplification82.4%
(FPCore (u v t1) :precision binary64 (if (or (<= u -3.5e+27) (not (<= u 4.6e+117))) (* t1 (/ (/ v u) u)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.5e+27) || !(u <= 4.6e+117)) {
tmp = t1 * ((v / u) / u);
} else {
tmp = v / -t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-3.5d+27)) .or. (.not. (u <= 4.6d+117))) then
tmp = t1 * ((v / u) / u)
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.5e+27) || !(u <= 4.6e+117)) {
tmp = t1 * ((v / u) / u);
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -3.5e+27) or not (u <= 4.6e+117): tmp = t1 * ((v / u) / u) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -3.5e+27) || !(u <= 4.6e+117)) tmp = Float64(t1 * Float64(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 <= -3.5e+27) || ~((u <= 4.6e+117))) tmp = t1 * ((v / u) / u); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -3.5e+27], N[Not[LessEqual[u, 4.6e+117]], $MachinePrecision]], N[(t1 * N[(N[(v / u), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.5 \cdot 10^{+27} \lor \neg \left(u \leq 4.6 \cdot 10^{+117}\right):\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -3.5000000000000002e27 or 4.59999999999999976e117 < u Initial program 78.5%
times-frac95.9%
distribute-frac-neg95.9%
distribute-neg-frac295.9%
+-commutative95.9%
distribute-neg-in95.9%
unsub-neg95.9%
Simplified95.9%
Taylor expanded in t1 around 0 89.3%
associate-*r/89.3%
mul-1-neg89.3%
Simplified89.3%
Taylor expanded in t1 around 0 89.2%
clear-num87.7%
frac-times74.2%
*-un-lft-identity74.2%
add-sqr-sqrt33.1%
sqrt-unprod58.0%
sqr-neg58.0%
sqrt-unprod31.9%
add-sqr-sqrt58.0%
Applied egg-rr58.0%
*-un-lft-identity58.0%
frac-times61.4%
clear-num61.4%
associate-*l/61.4%
associate-/l*61.5%
Applied egg-rr61.5%
if -3.5000000000000002e27 < u < 4.59999999999999976e117Initial program 70.2%
associate-*l/73.5%
*-commutative73.5%
Simplified73.5%
Taylor expanded in t1 around inf 67.8%
associate-*r/67.8%
neg-mul-167.8%
Simplified67.8%
Final simplification65.8%
(FPCore (u v t1) :precision binary64 (if (<= u -3.5e+27) (* t1 (/ (/ v u) u)) (if (<= u 6.4e+117) (/ v (- t1)) (/ t1 (* u (/ u v))))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -3.5e+27) {
tmp = t1 * ((v / u) / u);
} else if (u <= 6.4e+117) {
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 <= (-3.5d+27)) then
tmp = t1 * ((v / u) / u)
else if (u <= 6.4d+117) 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 <= -3.5e+27) {
tmp = t1 * ((v / u) / u);
} else if (u <= 6.4e+117) {
tmp = v / -t1;
} else {
tmp = t1 / (u * (u / v));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -3.5e+27: tmp = t1 * ((v / u) / u) elif u <= 6.4e+117: tmp = v / -t1 else: tmp = t1 / (u * (u / v)) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -3.5e+27) tmp = Float64(t1 * Float64(Float64(v / u) / u)); elseif (u <= 6.4e+117) tmp = Float64(v / Float64(-t1)); else tmp = Float64(t1 / Float64(u * Float64(u / v))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -3.5e+27) tmp = t1 * ((v / u) / u); elseif (u <= 6.4e+117) tmp = v / -t1; else tmp = t1 / (u * (u / v)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -3.5e+27], N[(t1 * N[(N[(v / u), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 6.4e+117], N[(v / (-t1)), $MachinePrecision], N[(t1 / N[(u * N[(u / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.5 \cdot 10^{+27}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{u}\\
\mathbf{elif}\;u \leq 6.4 \cdot 10^{+117}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{u \cdot \frac{u}{v}}\\
\end{array}
\end{array}
if u < -3.5000000000000002e27Initial program 80.5%
times-frac93.6%
distribute-frac-neg93.6%
distribute-neg-frac293.6%
+-commutative93.6%
distribute-neg-in93.6%
unsub-neg93.6%
Simplified93.6%
Taylor expanded in t1 around 0 84.3%
associate-*r/84.3%
mul-1-neg84.3%
Simplified84.3%
Taylor expanded in t1 around 0 84.1%
clear-num82.7%
frac-times71.4%
*-un-lft-identity71.4%
add-sqr-sqrt33.7%
sqrt-unprod51.3%
sqr-neg51.3%
sqrt-unprod25.9%
add-sqr-sqrt47.6%
Applied egg-rr47.6%
*-un-lft-identity47.6%
frac-times51.3%
clear-num51.3%
associate-*l/51.2%
associate-/l*51.5%
Applied egg-rr51.5%
if -3.5000000000000002e27 < u < 6.4000000000000001e117Initial program 70.2%
associate-*l/73.5%
*-commutative73.5%
Simplified73.5%
Taylor expanded in t1 around inf 67.8%
associate-*r/67.8%
neg-mul-167.8%
Simplified67.8%
if 6.4000000000000001e117 < u Initial program 75.7%
times-frac99.2%
distribute-frac-neg99.2%
distribute-neg-frac299.2%
+-commutative99.2%
distribute-neg-in99.2%
unsub-neg99.2%
Simplified99.2%
Taylor expanded in t1 around 0 96.4%
associate-*r/96.4%
mul-1-neg96.4%
Simplified96.4%
Taylor expanded in t1 around 0 96.4%
*-commutative96.4%
clear-num96.4%
frac-times89.4%
*-un-lft-identity89.4%
add-sqr-sqrt40.7%
sqrt-unprod72.4%
sqr-neg72.4%
sqrt-unprod40.3%
add-sqr-sqrt75.7%
Applied egg-rr75.7%
Final simplification65.8%
(FPCore (u v t1) :precision binary64 (if (or (<= u -3e+228) (not (<= u 7.8e+180))) (/ v (- u)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -3e+228) || !(u <= 7.8e+180)) {
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 <= (-3d+228)) .or. (.not. (u <= 7.8d+180))) 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 <= -3e+228) || !(u <= 7.8e+180)) {
tmp = v / -u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -3e+228) or not (u <= 7.8e+180): tmp = v / -u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -3e+228) || !(u <= 7.8e+180)) 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 <= -3e+228) || ~((u <= 7.8e+180))) tmp = v / -u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -3e+228], N[Not[LessEqual[u, 7.8e+180]], $MachinePrecision]], N[(v / (-u)), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3 \cdot 10^{+228} \lor \neg \left(u \leq 7.8 \cdot 10^{+180}\right):\\
\;\;\;\;\frac{v}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -3.0000000000000001e228 or 7.8000000000000002e180 < u Initial program 80.8%
times-frac99.2%
distribute-frac-neg99.2%
distribute-neg-frac299.2%
+-commutative99.2%
distribute-neg-in99.2%
unsub-neg99.2%
Simplified99.2%
Taylor expanded in t1 around inf 61.1%
Taylor expanded in t1 around 0 61.1%
associate-*r/61.1%
mul-1-neg61.1%
Simplified61.1%
if -3.0000000000000001e228 < u < 7.8000000000000002e180Initial program 71.7%
associate-*l/73.1%
*-commutative73.1%
Simplified73.1%
Taylor expanded in t1 around inf 58.0%
associate-*r/58.0%
neg-mul-158.0%
Simplified58.0%
Final simplification58.4%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.8e+228) (not (<= u 9.2e+173))) (/ v u) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.8e+228) || !(u <= 9.2e+173)) {
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.8d+228)) .or. (.not. (u <= 9.2d+173))) 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.8e+228) || !(u <= 9.2e+173)) {
tmp = v / u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.8e+228) or not (u <= 9.2e+173): tmp = v / u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.8e+228) || !(u <= 9.2e+173)) 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 <= -1.8e+228) || ~((u <= 9.2e+173))) tmp = v / u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.8e+228], N[Not[LessEqual[u, 9.2e+173]], $MachinePrecision]], N[(v / u), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.8 \cdot 10^{+228} \lor \neg \left(u \leq 9.2 \cdot 10^{+173}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -1.8e228 or 9.1999999999999998e173 < u Initial program 78.6%
times-frac99.2%
distribute-frac-neg99.2%
distribute-neg-frac299.2%
+-commutative99.2%
distribute-neg-in99.2%
unsub-neg99.2%
Simplified99.2%
Taylor expanded in t1 around inf 59.4%
mul-1-neg59.4%
neg-sub059.4%
frac-2neg59.4%
add-sqr-sqrt38.2%
sqrt-unprod58.9%
sqr-neg58.9%
sqrt-unprod21.2%
add-sqr-sqrt59.1%
distribute-neg-in59.1%
add-sqr-sqrt40.8%
sqrt-unprod61.8%
sqr-neg61.8%
sqrt-unprod18.3%
add-sqr-sqrt59.1%
sub-neg59.1%
Applied egg-rr59.1%
neg-sub059.1%
distribute-neg-frac59.1%
Simplified59.1%
Taylor expanded in t1 around 0 59.1%
if -1.8e228 < u < 9.1999999999999998e173Initial program 72.0%
associate-*l/73.4%
*-commutative73.4%
Simplified73.4%
Taylor expanded in t1 around inf 58.2%
associate-*r/58.2%
neg-mul-158.2%
Simplified58.2%
Final simplification58.3%
(FPCore (u v t1) :precision binary64 (if (<= t1 -3.2e+46) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -3.2e+46) {
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 <= (-3.2d+46)) 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 <= -3.2e+46) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -3.2e+46: tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -3.2e+46) 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 <= -3.2e+46) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -3.2e+46], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -3.2 \cdot 10^{+46}:\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -3.1999999999999998e46Initial program 55.4%
associate-*l/59.6%
*-commutative59.6%
Simplified59.6%
Taylor expanded in t1 around inf 88.2%
associate-*r/88.2%
neg-mul-188.2%
Simplified88.2%
distribute-frac-neg88.2%
div-inv88.1%
distribute-rgt-neg-in88.1%
frac-2neg88.1%
metadata-eval88.1%
add-sqr-sqrt87.9%
sqrt-unprod54.6%
sqr-neg54.6%
sqrt-unprod0.0%
add-sqr-sqrt34.8%
Applied egg-rr34.8%
distribute-rgt-neg-out34.8%
*-commutative34.8%
associate-*l/34.8%
mul-1-neg34.8%
distribute-neg-frac34.8%
remove-double-neg34.8%
Simplified34.8%
if -3.1999999999999998e46 < t1 Initial program 78.1%
times-frac96.0%
distribute-frac-neg96.0%
distribute-neg-frac296.0%
+-commutative96.0%
distribute-neg-in96.0%
unsub-neg96.0%
Simplified96.0%
Taylor expanded in t1 around inf 49.6%
mul-1-neg49.6%
neg-sub049.6%
frac-2neg49.6%
add-sqr-sqrt26.1%
sqrt-unprod31.4%
sqr-neg31.4%
sqrt-unprod5.5%
add-sqr-sqrt14.3%
distribute-neg-in14.3%
add-sqr-sqrt4.8%
sqrt-unprod28.2%
sqr-neg28.2%
sqrt-unprod34.4%
add-sqr-sqrt49.0%
sub-neg49.0%
Applied egg-rr49.0%
neg-sub049.0%
distribute-neg-frac49.0%
Simplified49.0%
Taylor expanded in t1 around 0 14.7%
(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 72.9%
associate-*l/74.2%
*-commutative74.2%
Simplified74.2%
associate-*r/72.9%
*-commutative72.9%
times-frac96.9%
frac-2neg96.9%
+-commutative96.9%
distribute-neg-in96.9%
sub-neg96.9%
associate-*r/96.4%
add-sqr-sqrt47.3%
sqrt-unprod42.1%
sqr-neg42.1%
sqrt-unprod14.6%
add-sqr-sqrt31.0%
sub-neg31.0%
+-commutative31.0%
add-sqr-sqrt16.4%
sqrt-unprod41.9%
sqr-neg41.9%
sqrt-unprod33.9%
add-sqr-sqrt16.2%
sqrt-unprod39.7%
sqr-neg39.7%
Applied egg-rr96.4%
Taylor expanded in t1 around inf 58.7%
mul-1-neg58.7%
Simplified58.7%
(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 72.9%
associate-*l/74.2%
*-commutative74.2%
Simplified74.2%
associate-*r/72.9%
*-commutative72.9%
times-frac96.9%
frac-2neg96.9%
+-commutative96.9%
distribute-neg-in96.9%
sub-neg96.9%
associate-*r/96.4%
add-sqr-sqrt47.3%
sqrt-unprod42.1%
sqr-neg42.1%
sqrt-unprod14.6%
add-sqr-sqrt31.0%
sub-neg31.0%
+-commutative31.0%
add-sqr-sqrt16.4%
sqrt-unprod41.9%
sqr-neg41.9%
sqrt-unprod33.9%
add-sqr-sqrt16.2%
sqrt-unprod39.7%
sqr-neg39.7%
Applied egg-rr96.4%
Taylor expanded in t1 around inf 58.7%
mul-1-neg58.7%
Simplified58.7%
frac-2neg58.7%
div-inv58.6%
remove-double-neg58.6%
+-commutative58.6%
distribute-neg-in58.6%
add-sqr-sqrt29.7%
sqrt-unprod62.1%
sqr-neg62.1%
sqrt-unprod28.0%
add-sqr-sqrt58.1%
Applied egg-rr58.1%
sub-neg58.1%
associate-*r/58.2%
*-rgt-identity58.2%
Simplified58.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 72.9%
associate-*l/74.2%
*-commutative74.2%
Simplified74.2%
Taylor expanded in t1 around inf 53.4%
associate-*r/53.4%
neg-mul-153.4%
Simplified53.4%
distribute-frac-neg53.4%
div-inv53.2%
distribute-rgt-neg-in53.2%
frac-2neg53.2%
metadata-eval53.2%
add-sqr-sqrt28.5%
sqrt-unprod23.9%
sqr-neg23.9%
sqrt-unprod3.3%
add-sqr-sqrt11.8%
Applied egg-rr11.8%
distribute-rgt-neg-out11.8%
*-commutative11.8%
associate-*l/11.8%
mul-1-neg11.8%
distribute-neg-frac11.8%
remove-double-neg11.8%
Simplified11.8%
herbie shell --seed 2024185
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))