
(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 17 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[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * (-v)), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{t1}{t1 + u} \cdot \left(-v\right)}{t1 + u}
\end{array}
Initial program 71.9%
associate-/l*71.3%
distribute-lft-neg-out71.3%
distribute-rgt-neg-in71.3%
associate-/r*79.1%
distribute-neg-frac279.1%
Simplified79.1%
distribute-frac-neg279.1%
distribute-rgt-neg-out79.1%
associate-/r*71.3%
distribute-lft-neg-out71.3%
associate-/l*71.9%
times-frac98.0%
frac-2neg98.0%
associate-*r/98.3%
add-sqr-sqrt49.5%
sqrt-unprod39.9%
sqr-neg39.9%
sqrt-unprod20.1%
add-sqr-sqrt36.9%
add-sqr-sqrt17.5%
sqrt-unprod56.1%
sqr-neg56.1%
sqrt-prod49.5%
add-sqr-sqrt98.3%
Applied egg-rr98.3%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (- (- u) t1)))
(if (<= t1 -7e+146)
(/ v (- t1))
(if (<= t1 -4.1e-288)
(* t1 (/ (/ v (+ t1 u)) t_1))
(if (<= t1 6.2e-147)
(/ (* v (/ t1 (- u))) (+ t1 u))
(if (<= t1 6.6e+157)
(* v (/ t1 (* (+ t1 u) t_1)))
(/ v (- (- t1) (* u 2.0)))))))))
double code(double u, double v, double t1) {
double t_1 = -u - t1;
double tmp;
if (t1 <= -7e+146) {
tmp = v / -t1;
} else if (t1 <= -4.1e-288) {
tmp = t1 * ((v / (t1 + u)) / t_1);
} else if (t1 <= 6.2e-147) {
tmp = (v * (t1 / -u)) / (t1 + u);
} else if (t1 <= 6.6e+157) {
tmp = v * (t1 / ((t1 + u) * t_1));
} 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 <= (-7d+146)) then
tmp = v / -t1
else if (t1 <= (-4.1d-288)) then
tmp = t1 * ((v / (t1 + u)) / t_1)
else if (t1 <= 6.2d-147) then
tmp = (v * (t1 / -u)) / (t1 + u)
else if (t1 <= 6.6d+157) then
tmp = v * (t1 / ((t1 + u) * t_1))
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 <= -7e+146) {
tmp = v / -t1;
} else if (t1 <= -4.1e-288) {
tmp = t1 * ((v / (t1 + u)) / t_1);
} else if (t1 <= 6.2e-147) {
tmp = (v * (t1 / -u)) / (t1 + u);
} else if (t1 <= 6.6e+157) {
tmp = v * (t1 / ((t1 + u) * t_1));
} else {
tmp = v / (-t1 - (u * 2.0));
}
return tmp;
}
def code(u, v, t1): t_1 = -u - t1 tmp = 0 if t1 <= -7e+146: tmp = v / -t1 elif t1 <= -4.1e-288: tmp = t1 * ((v / (t1 + u)) / t_1) elif t1 <= 6.2e-147: tmp = (v * (t1 / -u)) / (t1 + u) elif t1 <= 6.6e+157: tmp = v * (t1 / ((t1 + u) * t_1)) 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 <= -7e+146) tmp = Float64(v / Float64(-t1)); elseif (t1 <= -4.1e-288) tmp = Float64(t1 * Float64(Float64(v / Float64(t1 + u)) / t_1)); elseif (t1 <= 6.2e-147) tmp = Float64(Float64(v * Float64(t1 / Float64(-u))) / Float64(t1 + u)); elseif (t1 <= 6.6e+157) tmp = Float64(v * Float64(t1 / Float64(Float64(t1 + u) * t_1))); 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 <= -7e+146) tmp = v / -t1; elseif (t1 <= -4.1e-288) tmp = t1 * ((v / (t1 + u)) / t_1); elseif (t1 <= 6.2e-147) tmp = (v * (t1 / -u)) / (t1 + u); elseif (t1 <= 6.6e+157) tmp = v * (t1 / ((t1 + u) * t_1)); 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, -7e+146], N[(v / (-t1)), $MachinePrecision], If[LessEqual[t1, -4.1e-288], N[(t1 * N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 6.2e-147], N[(N[(v * N[(t1 / (-u)), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 6.6e+157], N[(v * N[(t1 / N[(N[(t1 + u), $MachinePrecision] * t$95$1), $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 -7 \cdot 10^{+146}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{elif}\;t1 \leq -4.1 \cdot 10^{-288}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{t1 + u}}{t\_1}\\
\mathbf{elif}\;t1 \leq 6.2 \cdot 10^{-147}:\\
\;\;\;\;\frac{v \cdot \frac{t1}{-u}}{t1 + u}\\
\mathbf{elif}\;t1 \leq 6.6 \cdot 10^{+157}:\\
\;\;\;\;v \cdot \frac{t1}{\left(t1 + u\right) \cdot t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\end{array}
\end{array}
if t1 < -7.0000000000000002e146Initial program 40.5%
associate-/l*41.8%
distribute-lft-neg-out41.8%
distribute-rgt-neg-in41.8%
associate-/r*59.5%
distribute-neg-frac259.5%
Simplified59.5%
Taylor expanded in t1 around inf 93.1%
associate-*r/93.1%
neg-mul-193.1%
Simplified93.1%
if -7.0000000000000002e146 < t1 < -4.10000000000000007e-288Initial program 83.3%
associate-/l*79.1%
distribute-lft-neg-out79.1%
distribute-rgt-neg-in79.1%
associate-/r*83.8%
distribute-neg-frac283.8%
Simplified83.8%
if -4.10000000000000007e-288 < t1 < 6.2000000000000005e-147Initial program 81.2%
associate-/l*81.1%
distribute-lft-neg-out81.1%
distribute-rgt-neg-in81.1%
associate-/r*81.0%
distribute-neg-frac281.0%
Simplified81.0%
distribute-frac-neg281.0%
distribute-rgt-neg-out81.0%
associate-/r*81.1%
distribute-lft-neg-out81.1%
associate-/l*81.2%
times-frac89.5%
frac-2neg89.5%
associate-*r/96.6%
add-sqr-sqrt16.6%
sqrt-unprod42.5%
sqr-neg42.5%
sqrt-unprod31.5%
add-sqr-sqrt41.6%
add-sqr-sqrt20.6%
sqrt-unprod72.2%
sqr-neg72.2%
sqrt-prod58.7%
add-sqr-sqrt96.6%
Applied egg-rr96.6%
Taylor expanded in t1 around 0 96.6%
if 6.2000000000000005e-147 < t1 < 6.6000000000000003e157Initial program 88.0%
associate-*l/96.6%
*-commutative96.6%
Simplified96.6%
if 6.6000000000000003e157 < t1 Initial program 45.5%
associate-/l*47.1%
distribute-lft-neg-out47.1%
distribute-rgt-neg-in47.1%
associate-/r*66.4%
distribute-neg-frac266.4%
Simplified66.4%
associate-*r/100.0%
+-commutative100.0%
distribute-neg-in100.0%
sub-neg100.0%
associate-*l/100.0%
clear-num100.0%
frac-2neg100.0%
frac-times100.0%
*-un-lft-identity100.0%
frac-2neg100.0%
sub-neg100.0%
distribute-neg-in100.0%
+-commutative100.0%
remove-double-neg100.0%
add-sqr-sqrt0.0%
sqrt-unprod1.3%
sqr-neg1.3%
sqrt-unprod46.2%
add-sqr-sqrt46.2%
add-sqr-sqrt5.4%
sqrt-unprod47.1%
Applied egg-rr100.0%
Taylor expanded in u around 0 97.3%
*-commutative97.3%
Simplified97.3%
Final simplification92.0%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (* t1 (/ (/ v (+ t1 u)) (- (- u) t1)))))
(if (<= t1 -3.7e+160)
(/ v (- t1))
(if (<= t1 -1.65e-287)
t_1
(if (<= t1 4.5e-135)
(/ (* v (/ t1 (- u))) (+ t1 u))
(if (<= t1 2.8e+73) t_1 (/ v (- (- t1) (* u 2.0)))))))))
double code(double u, double v, double t1) {
double t_1 = t1 * ((v / (t1 + u)) / (-u - t1));
double tmp;
if (t1 <= -3.7e+160) {
tmp = v / -t1;
} else if (t1 <= -1.65e-287) {
tmp = t_1;
} else if (t1 <= 4.5e-135) {
tmp = (v * (t1 / -u)) / (t1 + u);
} else if (t1 <= 2.8e+73) {
tmp = t_1;
} 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 = t1 * ((v / (t1 + u)) / (-u - t1))
if (t1 <= (-3.7d+160)) then
tmp = v / -t1
else if (t1 <= (-1.65d-287)) then
tmp = t_1
else if (t1 <= 4.5d-135) then
tmp = (v * (t1 / -u)) / (t1 + u)
else if (t1 <= 2.8d+73) then
tmp = t_1
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 = t1 * ((v / (t1 + u)) / (-u - t1));
double tmp;
if (t1 <= -3.7e+160) {
tmp = v / -t1;
} else if (t1 <= -1.65e-287) {
tmp = t_1;
} else if (t1 <= 4.5e-135) {
tmp = (v * (t1 / -u)) / (t1 + u);
} else if (t1 <= 2.8e+73) {
tmp = t_1;
} else {
tmp = v / (-t1 - (u * 2.0));
}
return tmp;
}
def code(u, v, t1): t_1 = t1 * ((v / (t1 + u)) / (-u - t1)) tmp = 0 if t1 <= -3.7e+160: tmp = v / -t1 elif t1 <= -1.65e-287: tmp = t_1 elif t1 <= 4.5e-135: tmp = (v * (t1 / -u)) / (t1 + u) elif t1 <= 2.8e+73: tmp = t_1 else: tmp = v / (-t1 - (u * 2.0)) return tmp
function code(u, v, t1) t_1 = Float64(t1 * Float64(Float64(v / Float64(t1 + u)) / Float64(Float64(-u) - t1))) tmp = 0.0 if (t1 <= -3.7e+160) tmp = Float64(v / Float64(-t1)); elseif (t1 <= -1.65e-287) tmp = t_1; elseif (t1 <= 4.5e-135) tmp = Float64(Float64(v * Float64(t1 / Float64(-u))) / Float64(t1 + u)); elseif (t1 <= 2.8e+73) tmp = t_1; else tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = t1 * ((v / (t1 + u)) / (-u - t1)); tmp = 0.0; if (t1 <= -3.7e+160) tmp = v / -t1; elseif (t1 <= -1.65e-287) tmp = t_1; elseif (t1 <= 4.5e-135) tmp = (v * (t1 / -u)) / (t1 + u); elseif (t1 <= 2.8e+73) tmp = t_1; else tmp = v / (-t1 - (u * 2.0)); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(t1 * N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -3.7e+160], N[(v / (-t1)), $MachinePrecision], If[LessEqual[t1, -1.65e-287], t$95$1, If[LessEqual[t1, 4.5e-135], N[(N[(v * N[(t1 / (-u)), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 2.8e+73], t$95$1, N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t1 \cdot \frac{\frac{v}{t1 + u}}{\left(-u\right) - t1}\\
\mathbf{if}\;t1 \leq -3.7 \cdot 10^{+160}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{elif}\;t1 \leq -1.65 \cdot 10^{-287}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t1 \leq 4.5 \cdot 10^{-135}:\\
\;\;\;\;\frac{v \cdot \frac{t1}{-u}}{t1 + u}\\
\mathbf{elif}\;t1 \leq 2.8 \cdot 10^{+73}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\end{array}
\end{array}
if t1 < -3.70000000000000016e160Initial program 40.5%
associate-/l*41.8%
distribute-lft-neg-out41.8%
distribute-rgt-neg-in41.8%
associate-/r*59.5%
distribute-neg-frac259.5%
Simplified59.5%
Taylor expanded in t1 around inf 93.1%
associate-*r/93.1%
neg-mul-193.1%
Simplified93.1%
if -3.70000000000000016e160 < t1 < -1.64999999999999987e-287 or 4.49999999999999987e-135 < t1 < 2.80000000000000008e73Initial program 84.9%
associate-/l*82.8%
distribute-lft-neg-out82.8%
distribute-rgt-neg-in82.8%
associate-/r*87.5%
distribute-neg-frac287.5%
Simplified87.5%
if -1.64999999999999987e-287 < t1 < 4.49999999999999987e-135Initial program 82.3%
associate-/l*79.4%
distribute-lft-neg-out79.4%
distribute-rgt-neg-in79.4%
associate-/r*79.2%
distribute-neg-frac279.2%
Simplified79.2%
distribute-frac-neg279.2%
distribute-rgt-neg-out79.2%
associate-/r*79.4%
distribute-lft-neg-out79.4%
associate-/l*82.3%
times-frac87.2%
frac-2neg87.2%
associate-*r/96.9%
add-sqr-sqrt15.5%
sqrt-unprod39.9%
sqr-neg39.9%
sqrt-unprod29.7%
add-sqr-sqrt39.1%
add-sqr-sqrt19.3%
sqrt-unprod74.0%
sqr-neg74.0%
sqrt-prod61.3%
add-sqr-sqrt96.9%
Applied egg-rr96.9%
Taylor expanded in t1 around 0 96.9%
if 2.80000000000000008e73 < t1 Initial program 60.9%
associate-/l*63.1%
distribute-lft-neg-out63.1%
distribute-rgt-neg-in63.1%
associate-/r*75.3%
distribute-neg-frac275.3%
Simplified75.3%
associate-*r/99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*l/99.9%
clear-num99.9%
frac-2neg99.9%
frac-times99.9%
*-un-lft-identity99.9%
frac-2neg99.9%
sub-neg99.9%
distribute-neg-in99.9%
+-commutative99.9%
remove-double-neg99.9%
add-sqr-sqrt0.0%
sqrt-unprod13.4%
sqr-neg13.4%
sqrt-unprod43.2%
add-sqr-sqrt43.2%
add-sqr-sqrt5.2%
sqrt-unprod65.3%
Applied egg-rr99.9%
Taylor expanded in u around 0 95.2%
*-commutative95.2%
Simplified95.2%
Final simplification91.3%
(FPCore (u v t1) :precision binary64 (if (or (<= u -0.0215) (not (<= u 0.206))) (* (/ v (+ t1 u)) (/ t1 (- u))) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -0.0215) || !(u <= 0.206)) {
tmp = (v / (t1 + u)) * (t1 / -u);
} else {
tmp = v / -t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-0.0215d0)) .or. (.not. (u <= 0.206d0))) then
tmp = (v / (t1 + u)) * (t1 / -u)
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -0.0215) || !(u <= 0.206)) {
tmp = (v / (t1 + u)) * (t1 / -u);
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -0.0215) or not (u <= 0.206): tmp = (v / (t1 + u)) * (t1 / -u) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -0.0215) || !(u <= 0.206)) tmp = Float64(Float64(v / Float64(t1 + u)) * Float64(t1 / Float64(-u))); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -0.0215) || ~((u <= 0.206))) tmp = (v / (t1 + u)) * (t1 / -u); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -0.0215], N[Not[LessEqual[u, 0.206]], $MachinePrecision]], N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(t1 / (-u)), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -0.0215 \lor \neg \left(u \leq 0.206\right):\\
\;\;\;\;\frac{v}{t1 + u} \cdot \frac{t1}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -0.021499999999999998 or 0.205999999999999989 < u Initial program 81.6%
times-frac99.0%
distribute-frac-neg99.0%
distribute-neg-frac299.0%
+-commutative99.0%
distribute-neg-in99.0%
unsub-neg99.0%
Simplified99.0%
Taylor expanded in t1 around 0 84.3%
associate-*r/84.3%
mul-1-neg84.3%
Simplified84.3%
if -0.021499999999999998 < u < 0.205999999999999989Initial program 63.6%
associate-/l*62.1%
distribute-lft-neg-out62.1%
distribute-rgt-neg-in62.1%
associate-/r*70.5%
distribute-neg-frac270.5%
Simplified70.5%
Taylor expanded in t1 around inf 79.4%
associate-*r/79.4%
neg-mul-179.4%
Simplified79.4%
Final simplification81.7%
(FPCore (u v t1) :precision binary64 (if (or (<= u -0.0008) (not (<= u 0.2))) (* t1 (/ (/ v u) (- (- u) t1))) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -0.0008) || !(u <= 0.2)) {
tmp = t1 * ((v / u) / (-u - t1));
} else {
tmp = v / -t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-0.0008d0)) .or. (.not. (u <= 0.2d0))) then
tmp = t1 * ((v / u) / (-u - t1))
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -0.0008) || !(u <= 0.2)) {
tmp = t1 * ((v / u) / (-u - t1));
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -0.0008) or not (u <= 0.2): tmp = t1 * ((v / u) / (-u - t1)) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -0.0008) || !(u <= 0.2)) tmp = Float64(t1 * Float64(Float64(v / u) / Float64(Float64(-u) - t1))); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -0.0008) || ~((u <= 0.2))) tmp = t1 * ((v / u) / (-u - t1)); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -0.0008], N[Not[LessEqual[u, 0.2]], $MachinePrecision]], N[(t1 * N[(N[(v / u), $MachinePrecision] / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -0.0008 \lor \neg \left(u \leq 0.2\right):\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -8.00000000000000038e-4 or 0.20000000000000001 < u Initial program 81.6%
associate-/l*81.8%
distribute-lft-neg-out81.8%
distribute-rgt-neg-in81.8%
associate-/r*89.1%
distribute-neg-frac289.1%
Simplified89.1%
Taylor expanded in t1 around 0 83.2%
if -8.00000000000000038e-4 < u < 0.20000000000000001Initial program 63.6%
associate-/l*62.1%
distribute-lft-neg-out62.1%
distribute-rgt-neg-in62.1%
associate-/r*70.5%
distribute-neg-frac270.5%
Simplified70.5%
Taylor expanded in t1 around inf 79.4%
associate-*r/79.4%
neg-mul-179.4%
Simplified79.4%
Final simplification81.2%
(FPCore (u v t1) :precision binary64 (if (or (<= u -9.5e+170) (not (<= u 5e+61))) (* v (/ t1 (* u (+ t1 u)))) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -9.5e+170) || !(u <= 5e+61)) {
tmp = v * (t1 / (u * (t1 + u)));
} else {
tmp = v / -t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-9.5d+170)) .or. (.not. (u <= 5d+61))) then
tmp = v * (t1 / (u * (t1 + u)))
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -9.5e+170) || !(u <= 5e+61)) {
tmp = v * (t1 / (u * (t1 + u)));
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -9.5e+170) or not (u <= 5e+61): tmp = v * (t1 / (u * (t1 + u))) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -9.5e+170) || !(u <= 5e+61)) tmp = Float64(v * Float64(t1 / Float64(u * Float64(t1 + u)))); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -9.5e+170) || ~((u <= 5e+61))) tmp = v * (t1 / (u * (t1 + u))); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -9.5e+170], N[Not[LessEqual[u, 5e+61]], $MachinePrecision]], N[(v * N[(t1 / N[(u * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -9.5 \cdot 10^{+170} \lor \neg \left(u \leq 5 \cdot 10^{+61}\right):\\
\;\;\;\;v \cdot \frac{t1}{u \cdot \left(t1 + u\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -9.5000000000000005e170 or 5.00000000000000018e61 < u Initial program 79.8%
associate-/l*81.6%
distribute-lft-neg-out81.6%
distribute-rgt-neg-in81.6%
associate-/r*91.6%
distribute-neg-frac291.6%
Simplified91.6%
Taylor expanded in t1 around 0 89.2%
clear-num89.2%
un-div-inv89.2%
div-inv89.2%
add-sqr-sqrt35.6%
sqrt-unprod74.2%
sqr-neg74.2%
sqrt-unprod42.2%
add-sqr-sqrt74.0%
clear-num74.0%
Applied egg-rr74.0%
associate-*r/74.2%
associate-/r/74.2%
*-commutative74.2%
+-commutative74.2%
Applied egg-rr74.2%
if -9.5000000000000005e170 < u < 5.00000000000000018e61Initial program 68.6%
associate-/l*66.9%
distribute-lft-neg-out66.9%
distribute-rgt-neg-in66.9%
associate-/r*73.9%
distribute-neg-frac273.9%
Simplified73.9%
Taylor expanded in t1 around inf 72.4%
associate-*r/72.4%
neg-mul-172.4%
Simplified72.4%
Final simplification72.9%
(FPCore (u v t1) :precision binary64 (if (or (<= u -2.95e+168) (not (<= u 3.2e+63))) (* t1 (/ (/ v u) (+ t1 u))) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.95e+168) || !(u <= 3.2e+63)) {
tmp = t1 * ((v / u) / (t1 + u));
} else {
tmp = v / -t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-2.95d+168)) .or. (.not. (u <= 3.2d+63))) then
tmp = t1 * ((v / u) / (t1 + u))
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.95e+168) || !(u <= 3.2e+63)) {
tmp = t1 * ((v / u) / (t1 + u));
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -2.95e+168) or not (u <= 3.2e+63): tmp = t1 * ((v / u) / (t1 + u)) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -2.95e+168) || !(u <= 3.2e+63)) tmp = Float64(t1 * Float64(Float64(v / u) / Float64(t1 + u))); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -2.95e+168) || ~((u <= 3.2e+63))) tmp = t1 * ((v / u) / (t1 + u)); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2.95e+168], N[Not[LessEqual[u, 3.2e+63]], $MachinePrecision]], N[(t1 * N[(N[(v / u), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.95 \cdot 10^{+168} \lor \neg \left(u \leq 3.2 \cdot 10^{+63}\right):\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{t1 + u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -2.94999999999999993e168 or 3.20000000000000011e63 < u Initial program 79.8%
associate-/l*81.6%
distribute-lft-neg-out81.6%
distribute-rgt-neg-in81.6%
associate-/r*91.6%
distribute-neg-frac291.6%
Simplified91.6%
Taylor expanded in t1 around 0 89.2%
clear-num89.2%
un-div-inv89.2%
div-inv89.2%
add-sqr-sqrt35.6%
sqrt-unprod74.2%
sqr-neg74.2%
sqrt-unprod42.2%
add-sqr-sqrt74.0%
clear-num74.0%
Applied egg-rr74.0%
/-rgt-identity74.0%
*-rgt-identity74.0%
associate-/l/71.5%
associate-/r/71.5%
associate-*l/71.2%
associate-/r*73.6%
*-commutative73.6%
/-rgt-identity73.6%
*-rgt-identity73.6%
associate-*r/74.2%
/-rgt-identity74.2%
*-rgt-identity74.2%
*-commutative74.2%
associate-/r*74.0%
/-rgt-identity74.0%
*-rgt-identity74.0%
Simplified74.0%
if -2.94999999999999993e168 < u < 3.20000000000000011e63Initial program 68.6%
associate-/l*66.9%
distribute-lft-neg-out66.9%
distribute-rgt-neg-in66.9%
associate-/r*73.9%
distribute-neg-frac273.9%
Simplified73.9%
Taylor expanded in t1 around inf 72.4%
associate-*r/72.4%
neg-mul-172.4%
Simplified72.4%
Final simplification72.9%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.05e+241) (not (<= u 1.25e+94))) (/ v (* t1 (/ u t1))) (/ v (- (- t1) (* u 2.0)))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.05e+241) || !(u <= 1.25e+94)) {
tmp = v / (t1 * (u / t1));
} 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 ((u <= (-1.05d+241)) .or. (.not. (u <= 1.25d+94))) then
tmp = v / (t1 * (u / t1))
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 ((u <= -1.05e+241) || !(u <= 1.25e+94)) {
tmp = v / (t1 * (u / t1));
} else {
tmp = v / (-t1 - (u * 2.0));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.05e+241) or not (u <= 1.25e+94): tmp = v / (t1 * (u / t1)) else: tmp = v / (-t1 - (u * 2.0)) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.05e+241) || !(u <= 1.25e+94)) tmp = Float64(v / Float64(t1 * Float64(u / t1))); 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 ((u <= -1.05e+241) || ~((u <= 1.25e+94))) tmp = v / (t1 * (u / t1)); else tmp = v / (-t1 - (u * 2.0)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.05e+241], N[Not[LessEqual[u, 1.25e+94]], $MachinePrecision]], N[(v / N[(t1 * N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.05 \cdot 10^{+241} \lor \neg \left(u \leq 1.25 \cdot 10^{+94}\right):\\
\;\;\;\;\frac{v}{t1 \cdot \frac{u}{t1}}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\end{array}
\end{array}
if u < -1.05e241 or 1.25000000000000003e94 < u Initial program 79.0%
times-frac99.8%
distribute-frac-neg99.8%
distribute-neg-frac299.8%
+-commutative99.8%
distribute-neg-in99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in t1 around inf 58.5%
Taylor expanded in t1 around 0 52.6%
associate-*r/93.4%
mul-1-neg93.4%
Simplified52.6%
clear-num52.6%
frac-times61.1%
*-un-lft-identity61.1%
add-sqr-sqrt33.0%
sqrt-unprod50.6%
sqr-neg50.6%
sqrt-unprod28.1%
add-sqr-sqrt61.4%
Applied egg-rr61.4%
if -1.05e241 < u < 1.25000000000000003e94Initial program 69.8%
associate-/l*68.8%
distribute-lft-neg-out68.8%
distribute-rgt-neg-in68.8%
associate-/r*75.6%
distribute-neg-frac275.6%
Simplified75.6%
associate-*r/96.4%
+-commutative96.4%
distribute-neg-in96.4%
sub-neg96.4%
associate-*l/97.5%
clear-num97.0%
frac-2neg97.0%
frac-times98.0%
*-un-lft-identity98.0%
frac-2neg98.0%
sub-neg98.0%
distribute-neg-in98.0%
+-commutative98.0%
remove-double-neg98.0%
add-sqr-sqrt47.5%
sqrt-unprod30.9%
sqr-neg30.9%
sqrt-unprod15.4%
add-sqr-sqrt26.1%
add-sqr-sqrt16.2%
sqrt-unprod49.1%
Applied egg-rr98.0%
Taylor expanded in u around 0 72.7%
*-commutative72.7%
Simplified72.7%
Final simplification70.1%
(FPCore (u v t1) :precision binary64 (if (or (<= u -4.8e+239) (not (<= u 3.4e+94))) (/ v (* t1 (/ u t1))) (/ v (- u t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -4.8e+239) || !(u <= 3.4e+94)) {
tmp = v / (t1 * (u / t1));
} else {
tmp = v / (u - t1);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-4.8d+239)) .or. (.not. (u <= 3.4d+94))) then
tmp = v / (t1 * (u / t1))
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 <= -4.8e+239) || !(u <= 3.4e+94)) {
tmp = v / (t1 * (u / t1));
} else {
tmp = v / (u - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -4.8e+239) or not (u <= 3.4e+94): tmp = v / (t1 * (u / t1)) else: tmp = v / (u - t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -4.8e+239) || !(u <= 3.4e+94)) tmp = Float64(v / Float64(t1 * Float64(u / t1))); else tmp = Float64(v / Float64(u - t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -4.8e+239) || ~((u <= 3.4e+94))) tmp = v / (t1 * (u / t1)); else tmp = v / (u - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -4.8e+239], N[Not[LessEqual[u, 3.4e+94]], $MachinePrecision]], N[(v / N[(t1 * N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -4.8 \cdot 10^{+239} \lor \neg \left(u \leq 3.4 \cdot 10^{+94}\right):\\
\;\;\;\;\frac{v}{t1 \cdot \frac{u}{t1}}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u - t1}\\
\end{array}
\end{array}
if u < -4.8e239 or 3.4000000000000002e94 < u Initial program 79.0%
times-frac99.8%
distribute-frac-neg99.8%
distribute-neg-frac299.8%
+-commutative99.8%
distribute-neg-in99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in t1 around inf 58.5%
Taylor expanded in t1 around 0 52.6%
associate-*r/93.4%
mul-1-neg93.4%
Simplified52.6%
clear-num52.6%
frac-times61.1%
*-un-lft-identity61.1%
add-sqr-sqrt33.0%
sqrt-unprod50.6%
sqr-neg50.6%
sqrt-unprod28.1%
add-sqr-sqrt61.4%
Applied egg-rr61.4%
if -4.8e239 < u < 3.4000000000000002e94Initial program 69.8%
times-frac97.5%
distribute-frac-neg97.5%
distribute-neg-frac297.5%
+-commutative97.5%
distribute-neg-in97.5%
unsub-neg97.5%
Simplified97.5%
Taylor expanded in t1 around inf 72.3%
clear-num72.2%
frac-times72.3%
*-un-lft-identity72.3%
add-sqr-sqrt34.9%
sqrt-unprod71.3%
sqr-neg71.3%
sqrt-unprod36.3%
add-sqr-sqrt72.4%
Applied egg-rr72.4%
Taylor expanded in u around 0 72.3%
Final simplification69.8%
(FPCore (u v t1) :precision binary64 (if (or (<= u -5.8e+174) (not (<= u 3.85e+93))) (/ v (+ t1 u)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -5.8e+174) || !(u <= 3.85e+93)) {
tmp = v / (t1 + u);
} else {
tmp = v / -t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-5.8d+174)) .or. (.not. (u <= 3.85d+93))) then
tmp = v / (t1 + u)
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -5.8e+174) || !(u <= 3.85e+93)) {
tmp = v / (t1 + u);
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -5.8e+174) or not (u <= 3.85e+93): tmp = v / (t1 + u) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -5.8e+174) || !(u <= 3.85e+93)) tmp = Float64(v / Float64(t1 + u)); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -5.8e+174) || ~((u <= 3.85e+93))) tmp = v / (t1 + u); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -5.8e+174], N[Not[LessEqual[u, 3.85e+93]], $MachinePrecision]], N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -5.8 \cdot 10^{+174} \lor \neg \left(u \leq 3.85 \cdot 10^{+93}\right):\\
\;\;\;\;\frac{v}{t1 + u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -5.7999999999999999e174 or 3.85000000000000002e93 < u Initial program 80.3%
times-frac99.8%
distribute-frac-neg99.8%
distribute-neg-frac299.8%
+-commutative99.8%
distribute-neg-in99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in t1 around inf 63.8%
clear-num63.8%
frac-times72.0%
*-un-lft-identity72.0%
add-sqr-sqrt35.5%
sqrt-unprod75.7%
sqr-neg75.7%
sqrt-unprod36.8%
add-sqr-sqrt72.2%
Applied egg-rr72.2%
*-commutative72.2%
frac-2neg72.2%
associate-*r/49.6%
sub-neg49.6%
distribute-neg-in49.6%
add-sqr-sqrt22.4%
sqrt-unprod49.6%
sqr-neg49.6%
sqrt-unprod27.2%
add-sqr-sqrt49.6%
distribute-neg-in49.6%
+-commutative49.6%
associate-*r/66.1%
frac-2neg66.1%
clear-num66.1%
un-div-inv66.1%
Applied egg-rr66.1%
/-rgt-identity66.1%
*-rgt-identity66.1%
associate-/r/45.2%
*-inverses45.2%
*-lft-identity45.2%
/-rgt-identity45.2%
*-rgt-identity45.2%
Simplified45.2%
if -5.7999999999999999e174 < u < 3.85000000000000002e93Initial program 68.6%
associate-/l*67.4%
distribute-lft-neg-out67.4%
distribute-rgt-neg-in67.4%
associate-/r*74.3%
distribute-neg-frac274.3%
Simplified74.3%
Taylor expanded in t1 around inf 71.8%
associate-*r/71.8%
neg-mul-171.8%
Simplified71.8%
Final simplification64.2%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.48e+183) (not (<= u 8.2e+93))) (/ v u) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.48e+183) || !(u <= 8.2e+93)) {
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.48d+183)) .or. (.not. (u <= 8.2d+93))) 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.48e+183) || !(u <= 8.2e+93)) {
tmp = v / u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.48e+183) or not (u <= 8.2e+93): tmp = v / u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.48e+183) || !(u <= 8.2e+93)) 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.48e+183) || ~((u <= 8.2e+93))) tmp = v / u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.48e+183], N[Not[LessEqual[u, 8.2e+93]], $MachinePrecision]], N[(v / u), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.48 \cdot 10^{+183} \lor \neg \left(u \leq 8.2 \cdot 10^{+93}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -1.47999999999999991e183 or 8.2000000000000002e93 < u Initial program 79.4%
times-frac99.8%
distribute-frac-neg99.8%
distribute-neg-frac299.8%
+-commutative99.8%
distribute-neg-in99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in t1 around inf 62.2%
clear-num62.2%
frac-times70.8%
*-un-lft-identity70.8%
add-sqr-sqrt32.7%
sqrt-unprod74.6%
sqr-neg74.6%
sqrt-unprod38.4%
add-sqr-sqrt71.0%
Applied egg-rr71.0%
Taylor expanded in u around inf 41.9%
if -1.47999999999999991e183 < u < 8.2000000000000002e93Initial program 69.1%
associate-/l*68.0%
distribute-lft-neg-out68.0%
distribute-rgt-neg-in68.0%
associate-/r*74.7%
distribute-neg-frac274.7%
Simplified74.7%
Taylor expanded in t1 around inf 71.7%
associate-*r/71.7%
neg-mul-171.7%
Simplified71.7%
Final simplification63.6%
(FPCore (u v t1) :precision binary64 (if (<= u 6.1e+190) (/ v (* t1 (/ (- u t1) t1))) (* v (/ t1 (* u (+ t1 u))))))
double code(double u, double v, double t1) {
double tmp;
if (u <= 6.1e+190) {
tmp = v / (t1 * ((u - t1) / t1));
} else {
tmp = v * (t1 / (u * (t1 + u)));
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= 6.1d+190) then
tmp = v / (t1 * ((u - t1) / t1))
else
tmp = v * (t1 / (u * (t1 + u)))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= 6.1e+190) {
tmp = v / (t1 * ((u - t1) / t1));
} else {
tmp = v * (t1 / (u * (t1 + u)));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= 6.1e+190: tmp = v / (t1 * ((u - t1) / t1)) else: tmp = v * (t1 / (u * (t1 + u))) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= 6.1e+190) tmp = Float64(v / Float64(t1 * Float64(Float64(u - t1) / t1))); else tmp = Float64(v * Float64(t1 / Float64(u * Float64(t1 + u)))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= 6.1e+190) tmp = v / (t1 * ((u - t1) / t1)); else tmp = v * (t1 / (u * (t1 + u))); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, 6.1e+190], N[(v / N[(t1 * N[(N[(u - t1), $MachinePrecision] / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v * N[(t1 / N[(u * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq 6.1 \cdot 10^{+190}:\\
\;\;\;\;\frac{v}{t1 \cdot \frac{u - t1}{t1}}\\
\mathbf{else}:\\
\;\;\;\;v \cdot \frac{t1}{u \cdot \left(t1 + u\right)}\\
\end{array}
\end{array}
if u < 6.1000000000000004e190Initial program 71.7%
times-frac97.8%
distribute-frac-neg97.8%
distribute-neg-frac297.8%
+-commutative97.8%
distribute-neg-in97.8%
unsub-neg97.8%
Simplified97.8%
Taylor expanded in t1 around inf 70.7%
clear-num70.7%
frac-times72.9%
*-un-lft-identity72.9%
add-sqr-sqrt35.7%
sqrt-unprod71.4%
sqr-neg71.4%
sqrt-unprod36.3%
add-sqr-sqrt73.0%
Applied egg-rr73.0%
if 6.1000000000000004e190 < u Initial program 74.2%
associate-/l*74.8%
distribute-lft-neg-out74.8%
distribute-rgt-neg-in74.8%
associate-/r*86.0%
distribute-neg-frac286.0%
Simplified86.0%
Taylor expanded in t1 around 0 86.0%
clear-num86.0%
un-div-inv86.0%
div-inv86.0%
add-sqr-sqrt0.0%
sqrt-unprod74.8%
sqr-neg74.8%
sqrt-unprod74.6%
add-sqr-sqrt74.6%
clear-num74.6%
Applied egg-rr74.6%
associate-*r/74.8%
associate-/r/74.8%
*-commutative74.8%
+-commutative74.8%
Applied egg-rr74.8%
Final simplification73.2%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -8.2e+145) (not (<= t1 4.2e+130))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -8.2e+145) || !(t1 <= 4.2e+130)) {
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 <= (-8.2d+145)) .or. (.not. (t1 <= 4.2d+130))) 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 <= -8.2e+145) || !(t1 <= 4.2e+130)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -8.2e+145) or not (t1 <= 4.2e+130): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -8.2e+145) || !(t1 <= 4.2e+130)) 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 <= -8.2e+145) || ~((t1 <= 4.2e+130))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -8.2e+145], N[Not[LessEqual[t1, 4.2e+130]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -8.2 \cdot 10^{+145} \lor \neg \left(t1 \leq 4.2 \cdot 10^{+130}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -8.2000000000000003e145 or 4.19999999999999981e130 < t1 Initial program 45.1%
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 94.1%
Taylor expanded in u around inf 43.2%
if -8.2000000000000003e145 < t1 < 4.19999999999999981e130Initial program 84.8%
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 57.2%
clear-num57.2%
frac-times60.7%
*-un-lft-identity60.7%
add-sqr-sqrt25.9%
sqrt-unprod64.2%
sqr-neg64.2%
sqrt-unprod33.6%
add-sqr-sqrt60.8%
Applied egg-rr60.8%
Taylor expanded in u around inf 20.7%
Final simplification28.0%
(FPCore (u v t1) :precision binary64 (if (<= u 2.4e+254) (/ v (- u t1)) (* (/ t1 u) (/ v t1))))
double code(double u, double v, double t1) {
double tmp;
if (u <= 2.4e+254) {
tmp = v / (u - t1);
} else {
tmp = (t1 / u) * (v / t1);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= 2.4d+254) then
tmp = v / (u - t1)
else
tmp = (t1 / u) * (v / t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= 2.4e+254) {
tmp = v / (u - t1);
} else {
tmp = (t1 / u) * (v / t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= 2.4e+254: tmp = v / (u - t1) else: tmp = (t1 / u) * (v / t1) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= 2.4e+254) tmp = Float64(v / Float64(u - t1)); else tmp = Float64(Float64(t1 / u) * Float64(v / t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= 2.4e+254) tmp = v / (u - t1); else tmp = (t1 / u) * (v / t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, 2.4e+254], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision], N[(N[(t1 / u), $MachinePrecision] * N[(v / t1), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq 2.4 \cdot 10^{+254}:\\
\;\;\;\;\frac{v}{u - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{u} \cdot \frac{v}{t1}\\
\end{array}
\end{array}
if u < 2.3999999999999998e254Initial program 71.2%
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 69.5%
clear-num69.5%
frac-times72.0%
*-un-lft-identity72.0%
add-sqr-sqrt33.8%
sqrt-unprod71.0%
sqr-neg71.0%
sqrt-unprod37.4%
add-sqr-sqrt72.1%
Applied egg-rr72.1%
Taylor expanded in u around 0 67.7%
if 2.3999999999999998e254 < u Initial program 86.7%
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 60.2%
Taylor expanded in t1 around 0 60.2%
associate-*r/99.9%
mul-1-neg99.9%
Simplified60.2%
*-commutative60.2%
clear-num60.2%
un-div-inv60.2%
add-sqr-sqrt34.6%
sqrt-unprod51.3%
sqr-neg51.3%
sqrt-unprod25.6%
add-sqr-sqrt60.6%
Applied egg-rr60.6%
div-inv60.6%
clear-num60.6%
Applied egg-rr60.6%
Final simplification67.4%
(FPCore (u v t1) :precision binary64 (* (/ t1 (+ t1 u)) (/ v (- (- u) t1))))
double code(double u, double v, double t1) {
return (t1 / (t1 + u)) * (v / (-u - t1));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (t1 / (t1 + u)) * (v / (-u - t1))
end function
public static double code(double u, double v, double t1) {
return (t1 / (t1 + u)) * (v / (-u - t1));
}
def code(u, v, t1): return (t1 / (t1 + u)) * (v / (-u - t1))
function code(u, v, t1) return Float64(Float64(t1 / Float64(t1 + u)) * Float64(v / Float64(Float64(-u) - t1))) end
function tmp = code(u, v, t1) tmp = (t1 / (t1 + u)) * (v / (-u - t1)); end
code[u_, v_, t1_] := N[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{t1}{t1 + u} \cdot \frac{v}{\left(-u\right) - t1}
\end{array}
Initial program 71.9%
times-frac98.0%
distribute-frac-neg98.0%
distribute-neg-frac298.0%
+-commutative98.0%
distribute-neg-in98.0%
unsub-neg98.0%
Simplified98.0%
Final simplification98.0%
(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 71.9%
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 69.1%
clear-num69.1%
frac-times71.5%
*-un-lft-identity71.5%
add-sqr-sqrt32.3%
sqrt-unprod71.8%
sqr-neg71.8%
sqrt-unprod38.4%
add-sqr-sqrt71.6%
Applied egg-rr71.6%
Taylor expanded in u around 0 65.6%
(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 71.9%
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 61.8%
Taylor expanded in u around inf 17.7%
herbie shell --seed 2024085
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))