
(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 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (u v t1) :precision binary64 (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))
double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-t1 * v) / ((t1 + u) * (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
def code(u, v, t1): return (-t1 * v) / ((t1 + u) * (t1 + u))
function code(u, v, t1) return Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (-t1 * v) / ((t1 + u) * (t1 + u)); end
code[u_, v_, t1_] := N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}
\end{array}
(FPCore (u v t1) :precision binary64 (* (/ (- t1) (+ t1 u)) (/ v (+ t1 u))))
double code(double u, double v, double t1) {
return (-t1 / (t1 + u)) * (v / (t1 + u));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-t1 / (t1 + u)) * (v / (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (-t1 / (t1 + u)) * (v / (t1 + u));
}
def code(u, v, t1): return (-t1 / (t1 + u)) * (v / (t1 + u))
function code(u, v, t1) return Float64(Float64(Float64(-t1) / Float64(t1 + u)) * Float64(v / Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (-t1 / (t1 + u)) * (v / (t1 + u)); end
code[u_, v_, t1_] := N[(N[((-t1) / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{-t1}{t1 + u} \cdot \frac{v}{t1 + u}
\end{array}
Initial program 69.1%
times-frac98.4%
distribute-frac-neg98.4%
distribute-neg-frac298.4%
+-commutative98.4%
distribute-neg-in98.4%
unsub-neg98.4%
Simplified98.4%
Final simplification98.4%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -2.35e+98) (not (<= t1 9e+188))) (/ v (- u t1)) (* t1 (/ (/ v (+ t1 u)) (- (- u) t1)))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -2.35e+98) || !(t1 <= 9e+188)) {
tmp = v / (u - t1);
} else {
tmp = t1 * ((v / (t1 + u)) / (-u - t1));
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-2.35d+98)) .or. (.not. (t1 <= 9d+188))) then
tmp = v / (u - t1)
else
tmp = t1 * ((v / (t1 + u)) / (-u - t1))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -2.35e+98) || !(t1 <= 9e+188)) {
tmp = v / (u - t1);
} else {
tmp = t1 * ((v / (t1 + u)) / (-u - t1));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -2.35e+98) or not (t1 <= 9e+188): tmp = v / (u - t1) else: tmp = t1 * ((v / (t1 + u)) / (-u - t1)) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -2.35e+98) || !(t1 <= 9e+188)) tmp = Float64(v / Float64(u - t1)); else tmp = Float64(t1 * Float64(Float64(v / Float64(t1 + u)) / Float64(Float64(-u) - t1))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -2.35e+98) || ~((t1 <= 9e+188))) tmp = v / (u - t1); else tmp = t1 * ((v / (t1 + u)) / (-u - t1)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -2.35e+98], N[Not[LessEqual[t1, 9e+188]], $MachinePrecision]], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision], N[(t1 * N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2.35 \cdot 10^{+98} \lor \neg \left(t1 \leq 9 \cdot 10^{+188}\right):\\
\;\;\;\;\frac{v}{u - t1}\\
\mathbf{else}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{t1 + u}}{\left(-u\right) - t1}\\
\end{array}
\end{array}
if t1 < -2.34999999999999985e98 or 9.00000000000000021e188 < t1 Initial program 38.8%
times-frac100.0%
distribute-frac-neg100.0%
distribute-neg-frac2100.0%
+-commutative100.0%
distribute-neg-in100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in t1 around inf 90.8%
*-commutative90.8%
frac-times38.8%
add-sqr-sqrt17.2%
sqrt-unprod38.8%
sqr-neg38.8%
sqrt-unprod21.6%
add-sqr-sqrt38.8%
Applied egg-rr38.8%
Taylor expanded in v around 0 90.9%
if -2.34999999999999985e98 < t1 < 9.00000000000000021e188Initial program 80.7%
associate-/l*79.6%
Simplified79.6%
associate-/r*90.2%
div-inv90.1%
Applied egg-rr90.1%
associate-*r/90.2%
*-rgt-identity90.2%
Simplified90.2%
Final simplification90.4%
(FPCore (u v t1)
:precision binary64
(if (<= t1 -1.06e+129)
(/ v (- u t1))
(if (<= t1 6e+47)
(* (- v) (/ t1 (* (+ t1 u) (+ t1 u))))
(/ (- v) (+ t1 u)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1.06e+129) {
tmp = v / (u - t1);
} else if (t1 <= 6e+47) {
tmp = -v * (t1 / ((t1 + u) * (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 <= (-1.06d+129)) then
tmp = v / (u - t1)
else if (t1 <= 6d+47) then
tmp = -v * (t1 / ((t1 + u) * (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 <= -1.06e+129) {
tmp = v / (u - t1);
} else if (t1 <= 6e+47) {
tmp = -v * (t1 / ((t1 + u) * (t1 + u)));
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -1.06e+129: tmp = v / (u - t1) elif t1 <= 6e+47: tmp = -v * (t1 / ((t1 + u) * (t1 + u))) else: tmp = -v / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -1.06e+129) tmp = Float64(v / Float64(u - t1)); elseif (t1 <= 6e+47) tmp = Float64(Float64(-v) * Float64(t1 / Float64(Float64(t1 + u) * 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 <= -1.06e+129) tmp = v / (u - t1); elseif (t1 <= 6e+47) tmp = -v * (t1 / ((t1 + u) * (t1 + u))); else tmp = -v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -1.06e+129], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 6e+47], N[((-v) * N[(t1 / N[(N[(t1 + u), $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 -1.06 \cdot 10^{+129}:\\
\;\;\;\;\frac{v}{u - t1}\\
\mathbf{elif}\;t1 \leq 6 \cdot 10^{+47}:\\
\;\;\;\;\left(-v\right) \cdot \frac{t1}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\end{array}
\end{array}
if t1 < -1.06e129Initial program 32.2%
times-frac100.0%
distribute-frac-neg100.0%
distribute-neg-frac2100.0%
+-commutative100.0%
distribute-neg-in100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in t1 around inf 85.7%
*-commutative85.7%
frac-times32.2%
add-sqr-sqrt10.7%
sqrt-unprod32.2%
sqr-neg32.2%
sqrt-unprod21.6%
add-sqr-sqrt32.2%
Applied egg-rr32.2%
Taylor expanded in v around 0 85.9%
if -1.06e129 < t1 < 6.0000000000000003e47Initial program 84.5%
associate-*l/88.1%
*-commutative88.1%
Simplified88.1%
if 6.0000000000000003e47 < t1 Initial program 45.6%
associate-*l/50.5%
*-commutative50.5%
Simplified50.5%
associate-*r/45.6%
*-commutative45.6%
times-frac99.9%
frac-2neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*r/99.9%
add-sqr-sqrt0.0%
sqrt-unprod13.7%
sqr-neg13.7%
sqrt-unprod32.7%
add-sqr-sqrt32.7%
sub-neg32.7%
+-commutative32.7%
add-sqr-sqrt0.0%
sqrt-unprod50.5%
sqr-neg50.5%
sqrt-unprod89.2%
add-sqr-sqrt40.1%
sqrt-unprod82.7%
sqr-neg82.7%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 88.5%
neg-mul-188.5%
Simplified88.5%
Final simplification87.9%
(FPCore (u v t1) :precision binary64 (if (or (<= u -5.8e+99) (not (<= u 1.15e+31))) (/ (* t1 (/ v u)) (- t1 u)) (/ (* v (/ t1 (- u t1))) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -5.8e+99) || !(u <= 1.15e+31)) {
tmp = (t1 * (v / u)) / (t1 - u);
} else {
tmp = (v * (t1 / (u - t1))) / 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+99)) .or. (.not. (u <= 1.15d+31))) then
tmp = (t1 * (v / u)) / (t1 - u)
else
tmp = (v * (t1 / (u - t1))) / t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -5.8e+99) || !(u <= 1.15e+31)) {
tmp = (t1 * (v / u)) / (t1 - u);
} else {
tmp = (v * (t1 / (u - t1))) / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -5.8e+99) or not (u <= 1.15e+31): tmp = (t1 * (v / u)) / (t1 - u) else: tmp = (v * (t1 / (u - t1))) / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -5.8e+99) || !(u <= 1.15e+31)) tmp = Float64(Float64(t1 * Float64(v / u)) / Float64(t1 - u)); else tmp = Float64(Float64(v * Float64(t1 / Float64(u - t1))) / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -5.8e+99) || ~((u <= 1.15e+31))) tmp = (t1 * (v / u)) / (t1 - u); else tmp = (v * (t1 / (u - t1))) / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -5.8e+99], N[Not[LessEqual[u, 1.15e+31]], $MachinePrecision]], N[(N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision] / N[(t1 - u), $MachinePrecision]), $MachinePrecision], N[(N[(v * N[(t1 / N[(u - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -5.8 \cdot 10^{+99} \lor \neg \left(u \leq 1.15 \cdot 10^{+31}\right):\\
\;\;\;\;\frac{t1 \cdot \frac{v}{u}}{t1 - u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v \cdot \frac{t1}{u - t1}}{t1}\\
\end{array}
\end{array}
if u < -5.8000000000000004e99 or 1.15e31 < u Initial program 75.6%
times-frac97.4%
distribute-frac-neg97.4%
distribute-neg-frac297.4%
+-commutative97.4%
distribute-neg-in97.4%
unsub-neg97.4%
Simplified97.4%
Taylor expanded in t1 around 0 88.0%
associate-*r/88.0%
mul-1-neg88.0%
Simplified88.0%
clear-num88.0%
frac-2neg88.0%
frac-times77.7%
*-un-lft-identity77.7%
add-sqr-sqrt34.9%
sqrt-unprod62.1%
sqr-neg62.1%
sqrt-unprod39.2%
add-sqr-sqrt67.5%
add-sqr-sqrt35.0%
sqrt-unprod61.1%
sqr-neg61.1%
sqrt-unprod37.8%
add-sqr-sqrt77.7%
distribute-neg-in77.7%
add-sqr-sqrt39.9%
sqrt-unprod74.5%
sqr-neg74.5%
sqrt-unprod37.8%
add-sqr-sqrt77.9%
sub-neg77.9%
Applied egg-rr77.9%
associate-/r*88.1%
Simplified88.1%
associate-/r/90.6%
Applied egg-rr90.6%
if -5.8000000000000004e99 < u < 1.15e31Initial program 64.0%
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 74.3%
associate-*r/79.2%
add-sqr-sqrt38.0%
sqrt-unprod79.9%
sqr-neg79.9%
sqrt-unprod41.0%
add-sqr-sqrt80.0%
Applied egg-rr80.0%
Final simplification84.7%
(FPCore (u v t1) :precision binary64 (if (<= u -3.3e+183) (/ (/ v (/ u t1)) (- u)) (if (<= u 5e+31) (/ (* v (/ t1 (- u t1))) t1) (* (/ t1 u) (/ v (- u))))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -3.3e+183) {
tmp = (v / (u / t1)) / -u;
} else if (u <= 5e+31) {
tmp = (v * (t1 / (u - t1))) / t1;
} else {
tmp = (t1 / u) * (v / -u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-3.3d+183)) then
tmp = (v / (u / t1)) / -u
else if (u <= 5d+31) then
tmp = (v * (t1 / (u - t1))) / t1
else
tmp = (t1 / u) * (v / -u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -3.3e+183) {
tmp = (v / (u / t1)) / -u;
} else if (u <= 5e+31) {
tmp = (v * (t1 / (u - t1))) / t1;
} else {
tmp = (t1 / u) * (v / -u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -3.3e+183: tmp = (v / (u / t1)) / -u elif u <= 5e+31: tmp = (v * (t1 / (u - t1))) / t1 else: tmp = (t1 / u) * (v / -u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -3.3e+183) tmp = Float64(Float64(v / Float64(u / t1)) / Float64(-u)); elseif (u <= 5e+31) tmp = Float64(Float64(v * Float64(t1 / Float64(u - t1))) / t1); else tmp = Float64(Float64(t1 / u) * Float64(v / Float64(-u))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -3.3e+183) tmp = (v / (u / t1)) / -u; elseif (u <= 5e+31) tmp = (v * (t1 / (u - t1))) / t1; else tmp = (t1 / u) * (v / -u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -3.3e+183], N[(N[(v / N[(u / t1), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision], If[LessEqual[u, 5e+31], N[(N[(v * N[(t1 / N[(u - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t1), $MachinePrecision], N[(N[(t1 / u), $MachinePrecision] * N[(v / (-u)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.3 \cdot 10^{+183}:\\
\;\;\;\;\frac{\frac{v}{\frac{u}{t1}}}{-u}\\
\mathbf{elif}\;u \leq 5 \cdot 10^{+31}:\\
\;\;\;\;\frac{v \cdot \frac{t1}{u - t1}}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{u} \cdot \frac{v}{-u}\\
\end{array}
\end{array}
if u < -3.3000000000000001e183Initial program 84.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 0 99.8%
associate-*r/99.8%
mul-1-neg99.8%
Simplified99.8%
clear-num99.8%
frac-2neg99.8%
frac-times90.6%
*-un-lft-identity90.6%
add-sqr-sqrt26.7%
sqrt-unprod70.1%
sqr-neg70.1%
sqrt-unprod60.4%
add-sqr-sqrt84.1%
add-sqr-sqrt51.0%
sqrt-unprod70.7%
sqr-neg70.7%
sqrt-unprod33.5%
add-sqr-sqrt90.6%
distribute-neg-in90.6%
add-sqr-sqrt57.1%
sqrt-unprod84.3%
sqr-neg84.3%
sqrt-unprod33.5%
add-sqr-sqrt90.6%
sub-neg90.6%
Applied egg-rr90.6%
associate-/r*99.9%
Simplified99.9%
Taylor expanded in t1 around 0 99.9%
neg-mul-199.9%
Simplified99.9%
if -3.3000000000000001e183 < u < 5.00000000000000027e31Initial program 65.3%
times-frac98.1%
distribute-frac-neg98.1%
distribute-neg-frac298.1%
+-commutative98.1%
distribute-neg-in98.1%
unsub-neg98.1%
Simplified98.1%
Taylor expanded in t1 around inf 72.4%
associate-*r/78.7%
add-sqr-sqrt41.5%
sqrt-unprod78.6%
sqr-neg78.6%
sqrt-unprod37.1%
add-sqr-sqrt79.5%
Applied egg-rr79.5%
if 5.00000000000000027e31 < u Initial program 71.3%
times-frac98.4%
distribute-frac-neg98.4%
distribute-neg-frac298.4%
+-commutative98.4%
distribute-neg-in98.4%
unsub-neg98.4%
Simplified98.4%
Taylor expanded in t1 around 0 85.7%
associate-*r/85.7%
mul-1-neg85.7%
Simplified85.7%
Taylor expanded in t1 around 0 84.5%
Final simplification83.2%
(FPCore (u v t1) :precision binary64 (if (<= t1 -0.00031) (/ v (- u t1)) (if (<= t1 0.0042) (* (/ t1 u) (/ v (- u))) (/ (- v) (+ t1 u)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -0.00031) {
tmp = v / (u - t1);
} else if (t1 <= 0.0042) {
tmp = (t1 / u) * (v / -u);
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (t1 <= (-0.00031d0)) then
tmp = v / (u - t1)
else if (t1 <= 0.0042d0) then
tmp = (t1 / u) * (v / -u)
else
tmp = -v / (t1 + u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -0.00031) {
tmp = v / (u - t1);
} else if (t1 <= 0.0042) {
tmp = (t1 / u) * (v / -u);
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -0.00031: tmp = v / (u - t1) elif t1 <= 0.0042: tmp = (t1 / u) * (v / -u) else: tmp = -v / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -0.00031) tmp = Float64(v / Float64(u - t1)); elseif (t1 <= 0.0042) tmp = Float64(Float64(t1 / u) * Float64(v / Float64(-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 <= -0.00031) tmp = v / (u - t1); elseif (t1 <= 0.0042) tmp = (t1 / u) * (v / -u); else tmp = -v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -0.00031], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 0.0042], N[(N[(t1 / u), $MachinePrecision] * N[(v / (-u)), $MachinePrecision]), $MachinePrecision], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -0.00031:\\
\;\;\;\;\frac{v}{u - t1}\\
\mathbf{elif}\;t1 \leq 0.0042:\\
\;\;\;\;\frac{t1}{u} \cdot \frac{v}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\end{array}
\end{array}
if t1 < -3.1e-4Initial program 58.6%
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 80.3%
*-commutative80.3%
frac-times54.3%
add-sqr-sqrt20.8%
sqrt-unprod55.9%
sqr-neg55.9%
sqrt-unprod33.5%
add-sqr-sqrt54.2%
Applied egg-rr54.2%
Taylor expanded in v around 0 80.4%
if -3.1e-4 < t1 < 0.00419999999999999974Initial program 82.5%
times-frac96.8%
distribute-frac-neg96.8%
distribute-neg-frac296.8%
+-commutative96.8%
distribute-neg-in96.8%
unsub-neg96.8%
Simplified96.8%
Taylor expanded in t1 around 0 78.0%
associate-*r/78.0%
mul-1-neg78.0%
Simplified78.0%
Taylor expanded in t1 around 0 80.7%
if 0.00419999999999999974 < t1 Initial program 54.3%
associate-*l/58.3%
*-commutative58.3%
Simplified58.3%
associate-*r/54.3%
*-commutative54.3%
times-frac99.9%
frac-2neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*r/99.9%
add-sqr-sqrt0.0%
sqrt-unprod18.2%
sqr-neg18.2%
sqrt-unprod33.6%
add-sqr-sqrt33.6%
sub-neg33.6%
+-commutative33.6%
add-sqr-sqrt0.0%
sqrt-unprod58.1%
sqr-neg58.1%
sqrt-unprod89.5%
add-sqr-sqrt38.3%
sqrt-unprod84.4%
sqr-neg84.4%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 87.7%
neg-mul-187.7%
Simplified87.7%
Final simplification82.5%
(FPCore (u v t1) :precision binary64 (if (<= t1 -1.22e-147) (/ v (- u t1)) (if (<= t1 9.2e-106) (/ (/ v (/ u t1)) t1) (/ (- v) (+ t1 u)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -1.22e-147) {
tmp = v / (u - t1);
} else if (t1 <= 9.2e-106) {
tmp = (v / (u / t1)) / 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 <= (-1.22d-147)) then
tmp = v / (u - t1)
else if (t1 <= 9.2d-106) then
tmp = (v / (u / t1)) / 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 <= -1.22e-147) {
tmp = v / (u - t1);
} else if (t1 <= 9.2e-106) {
tmp = (v / (u / t1)) / t1;
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -1.22e-147: tmp = v / (u - t1) elif t1 <= 9.2e-106: tmp = (v / (u / t1)) / t1 else: tmp = -v / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -1.22e-147) tmp = Float64(v / Float64(u - t1)); elseif (t1 <= 9.2e-106) tmp = Float64(Float64(v / Float64(u / t1)) / 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 <= -1.22e-147) tmp = v / (u - t1); elseif (t1 <= 9.2e-106) tmp = (v / (u / t1)) / t1; else tmp = -v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -1.22e-147], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 9.2e-106], N[(N[(v / N[(u / t1), $MachinePrecision]), $MachinePrecision] / t1), $MachinePrecision], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.22 \cdot 10^{-147}:\\
\;\;\;\;\frac{v}{u - t1}\\
\mathbf{elif}\;t1 \leq 9.2 \cdot 10^{-106}:\\
\;\;\;\;\frac{\frac{v}{\frac{u}{t1}}}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\end{array}
\end{array}
if t1 < -1.21999999999999995e-147Initial program 68.6%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in t1 around inf 76.2%
*-commutative76.2%
frac-times57.1%
add-sqr-sqrt25.1%
sqrt-unprod61.4%
sqr-neg61.4%
sqrt-unprod32.2%
add-sqr-sqrt57.1%
Applied egg-rr57.1%
Taylor expanded in v around 0 75.3%
if -1.21999999999999995e-147 < t1 < 9.2000000000000004e-106Initial program 79.9%
times-frac95.2%
distribute-frac-neg95.2%
distribute-neg-frac295.2%
+-commutative95.2%
distribute-neg-in95.2%
unsub-neg95.2%
Simplified95.2%
Taylor expanded in t1 around 0 85.7%
associate-*r/85.7%
mul-1-neg85.7%
Simplified85.7%
clear-num85.8%
frac-2neg85.8%
frac-times85.8%
*-un-lft-identity85.8%
add-sqr-sqrt38.7%
sqrt-unprod54.1%
sqr-neg54.1%
sqrt-unprod33.3%
add-sqr-sqrt55.7%
add-sqr-sqrt22.5%
sqrt-unprod54.9%
sqr-neg54.9%
sqrt-unprod51.5%
add-sqr-sqrt85.8%
distribute-neg-in85.8%
add-sqr-sqrt34.1%
sqrt-unprod88.3%
sqr-neg88.3%
sqrt-unprod50.6%
add-sqr-sqrt84.4%
sub-neg84.4%
Applied egg-rr84.4%
associate-/r*82.7%
Simplified82.7%
Taylor expanded in t1 around inf 57.7%
if 9.2000000000000004e-106 < t1 Initial program 59.0%
associate-*l/63.3%
*-commutative63.3%
Simplified63.3%
associate-*r/59.0%
*-commutative59.0%
times-frac99.9%
frac-2neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*r/98.9%
add-sqr-sqrt0.0%
sqrt-unprod20.0%
sqr-neg20.0%
sqrt-unprod32.7%
add-sqr-sqrt32.7%
sub-neg32.7%
+-commutative32.7%
add-sqr-sqrt0.0%
sqrt-unprod59.8%
sqr-neg59.8%
sqrt-unprod85.5%
add-sqr-sqrt37.4%
sqrt-unprod82.6%
sqr-neg82.6%
Applied egg-rr98.9%
Taylor expanded in t1 around inf 79.8%
neg-mul-179.8%
Simplified79.8%
(FPCore (u v t1) :precision binary64 (if (<= t1 -5e-148) (/ v (- u t1)) (if (<= t1 1.55e-103) (/ (* v (/ t1 u)) t1) (/ (- v) (+ t1 u)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -5e-148) {
tmp = v / (u - t1);
} else if (t1 <= 1.55e-103) {
tmp = (v * (t1 / 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 <= (-5d-148)) then
tmp = v / (u - t1)
else if (t1 <= 1.55d-103) then
tmp = (v * (t1 / 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 <= -5e-148) {
tmp = v / (u - t1);
} else if (t1 <= 1.55e-103) {
tmp = (v * (t1 / u)) / t1;
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -5e-148: tmp = v / (u - t1) elif t1 <= 1.55e-103: tmp = (v * (t1 / u)) / t1 else: tmp = -v / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -5e-148) tmp = Float64(v / Float64(u - t1)); elseif (t1 <= 1.55e-103) tmp = Float64(Float64(v * Float64(t1 / 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 <= -5e-148) tmp = v / (u - t1); elseif (t1 <= 1.55e-103) tmp = (v * (t1 / u)) / t1; else tmp = -v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -5e-148], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 1.55e-103], N[(N[(v * N[(t1 / u), $MachinePrecision]), $MachinePrecision] / t1), $MachinePrecision], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -5 \cdot 10^{-148}:\\
\;\;\;\;\frac{v}{u - t1}\\
\mathbf{elif}\;t1 \leq 1.55 \cdot 10^{-103}:\\
\;\;\;\;\frac{v \cdot \frac{t1}{u}}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\end{array}
\end{array}
if t1 < -4.9999999999999999e-148Initial program 68.6%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in t1 around inf 76.2%
*-commutative76.2%
frac-times57.1%
add-sqr-sqrt25.1%
sqrt-unprod61.4%
sqr-neg61.4%
sqrt-unprod32.2%
add-sqr-sqrt57.1%
Applied egg-rr57.1%
Taylor expanded in v around 0 75.3%
if -4.9999999999999999e-148 < t1 < 1.5500000000000001e-103Initial program 79.9%
times-frac95.2%
distribute-frac-neg95.2%
distribute-neg-frac295.2%
+-commutative95.2%
distribute-neg-in95.2%
unsub-neg95.2%
Simplified95.2%
Taylor expanded in t1 around inf 30.8%
Taylor expanded in t1 around 0 23.9%
associate-*r/85.7%
mul-1-neg85.7%
Simplified23.9%
*-commutative23.9%
associate-*l/55.0%
add-sqr-sqrt22.8%
sqrt-unprod52.6%
sqr-neg52.6%
sqrt-unprod32.7%
add-sqr-sqrt55.3%
Applied egg-rr55.3%
if 1.5500000000000001e-103 < t1 Initial program 59.0%
associate-*l/63.3%
*-commutative63.3%
Simplified63.3%
associate-*r/59.0%
*-commutative59.0%
times-frac99.9%
frac-2neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*r/98.9%
add-sqr-sqrt0.0%
sqrt-unprod20.0%
sqr-neg20.0%
sqrt-unprod32.7%
add-sqr-sqrt32.7%
sub-neg32.7%
+-commutative32.7%
add-sqr-sqrt0.0%
sqrt-unprod59.8%
sqr-neg59.8%
sqrt-unprod85.5%
add-sqr-sqrt37.4%
sqrt-unprod82.6%
sqr-neg82.6%
Applied egg-rr98.9%
Taylor expanded in t1 around inf 79.8%
neg-mul-179.8%
Simplified79.8%
(FPCore (u v t1) :precision binary64 (if (<= u -1.65e+101) (/ v u) (if (<= u 1.06e+134) (/ v (- t1)) (/ 1.0 (/ u v)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.65e+101) {
tmp = v / u;
} else if (u <= 1.06e+134) {
tmp = v / -t1;
} else {
tmp = 1.0 / (u / v);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-1.65d+101)) then
tmp = v / u
else if (u <= 1.06d+134) then
tmp = v / -t1
else
tmp = 1.0d0 / (u / v)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -1.65e+101) {
tmp = v / u;
} else if (u <= 1.06e+134) {
tmp = v / -t1;
} else {
tmp = 1.0 / (u / v);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.65e+101: tmp = v / u elif u <= 1.06e+134: tmp = v / -t1 else: tmp = 1.0 / (u / v) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.65e+101) tmp = Float64(v / u); elseif (u <= 1.06e+134) tmp = Float64(v / Float64(-t1)); else tmp = Float64(1.0 / Float64(u / v)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -1.65e+101) tmp = v / u; elseif (u <= 1.06e+134) tmp = v / -t1; else tmp = 1.0 / (u / v); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.65e+101], N[(v / u), $MachinePrecision], If[LessEqual[u, 1.06e+134], N[(v / (-t1)), $MachinePrecision], N[(1.0 / N[(u / v), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.65 \cdot 10^{+101}:\\
\;\;\;\;\frac{v}{u}\\
\mathbf{elif}\;u \leq 1.06 \cdot 10^{+134}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{u}{v}}\\
\end{array}
\end{array}
if u < -1.65000000000000006e101Initial program 82.0%
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 inf 48.6%
*-commutative48.6%
frac-times42.6%
add-sqr-sqrt42.6%
sqrt-unprod71.2%
sqr-neg71.2%
sqrt-unprod0.0%
add-sqr-sqrt42.7%
Applied egg-rr42.7%
Taylor expanded in t1 around 0 34.7%
if -1.65000000000000006e101 < u < 1.05999999999999999e134Initial program 65.6%
associate-*l/71.6%
*-commutative71.6%
Simplified71.6%
Taylor expanded in t1 around inf 70.2%
associate-*r/70.2%
neg-mul-170.2%
Simplified70.2%
if 1.05999999999999999e134 < u Initial program 68.9%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in t1 around inf 50.3%
Taylor expanded in t1 around 0 44.1%
associate-*r/93.8%
mul-1-neg93.8%
Simplified44.1%
*-commutative44.1%
clear-num44.1%
clear-num44.1%
frac-times44.8%
metadata-eval44.8%
add-sqr-sqrt21.8%
sqrt-unprod35.5%
sqr-neg35.5%
sqrt-unprod22.3%
add-sqr-sqrt44.5%
Applied egg-rr44.5%
times-frac38.3%
*-commutative38.3%
times-frac37.0%
*-inverses37.0%
*-lft-identity37.0%
Simplified37.0%
Final simplification57.8%
(FPCore (u v t1) :precision binary64 (if (or (<= u -2.25e+101) (not (<= u 2.15e+201))) (/ v u) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.25e+101) || !(u <= 2.15e+201)) {
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 <= (-2.25d+101)) .or. (.not. (u <= 2.15d+201))) 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 <= -2.25e+101) || !(u <= 2.15e+201)) {
tmp = v / u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -2.25e+101) or not (u <= 2.15e+201): tmp = v / u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -2.25e+101) || !(u <= 2.15e+201)) 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 <= -2.25e+101) || ~((u <= 2.15e+201))) tmp = v / u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2.25e+101], N[Not[LessEqual[u, 2.15e+201]], $MachinePrecision]], N[(v / u), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.25 \cdot 10^{+101} \lor \neg \left(u \leq 2.15 \cdot 10^{+201}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -2.2500000000000001e101 or 2.14999999999999995e201 < u Initial program 79.2%
times-frac97.3%
distribute-frac-neg97.3%
distribute-neg-frac297.3%
+-commutative97.3%
distribute-neg-in97.3%
unsub-neg97.3%
Simplified97.3%
Taylor expanded in t1 around inf 49.1%
*-commutative49.1%
frac-times45.2%
add-sqr-sqrt26.6%
sqrt-unprod72.5%
sqr-neg72.5%
sqrt-unprod18.6%
add-sqr-sqrt45.2%
Applied egg-rr45.2%
Taylor expanded in t1 around 0 39.3%
if -2.2500000000000001e101 < u < 2.14999999999999995e201Initial program 65.2%
associate-*l/70.5%
*-commutative70.5%
Simplified70.5%
Taylor expanded in t1 around inf 65.0%
associate-*r/65.0%
neg-mul-165.0%
Simplified65.0%
Final simplification57.8%
(FPCore (u v t1) :precision binary64 (if (<= u -2.25e+101) (/ v u) (if (<= u 2.45e+200) (/ v (- t1)) (/ v (- u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -2.25e+101) {
tmp = v / u;
} else if (u <= 2.45e+200) {
tmp = v / -t1;
} else {
tmp = v / -u;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-2.25d+101)) then
tmp = v / u
else if (u <= 2.45d+200) then
tmp = v / -t1
else
tmp = v / -u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -2.25e+101) {
tmp = v / u;
} else if (u <= 2.45e+200) {
tmp = v / -t1;
} else {
tmp = v / -u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -2.25e+101: tmp = v / u elif u <= 2.45e+200: tmp = v / -t1 else: tmp = v / -u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -2.25e+101) tmp = Float64(v / u); elseif (u <= 2.45e+200) tmp = Float64(v / Float64(-t1)); else tmp = Float64(v / Float64(-u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -2.25e+101) tmp = v / u; elseif (u <= 2.45e+200) tmp = v / -t1; else tmp = v / -u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -2.25e+101], N[(v / u), $MachinePrecision], If[LessEqual[u, 2.45e+200], N[(v / (-t1)), $MachinePrecision], N[(v / (-u)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.25 \cdot 10^{+101}:\\
\;\;\;\;\frac{v}{u}\\
\mathbf{elif}\;u \leq 2.45 \cdot 10^{+200}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-u}\\
\end{array}
\end{array}
if u < -2.2500000000000001e101Initial program 82.0%
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 inf 48.6%
*-commutative48.6%
frac-times42.6%
add-sqr-sqrt42.6%
sqrt-unprod71.2%
sqr-neg71.2%
sqrt-unprod0.0%
add-sqr-sqrt42.7%
Applied egg-rr42.7%
Taylor expanded in t1 around 0 34.7%
if -2.2500000000000001e101 < u < 2.44999999999999991e200Initial program 65.2%
associate-*l/70.5%
*-commutative70.5%
Simplified70.5%
Taylor expanded in t1 around inf 65.0%
associate-*r/65.0%
neg-mul-165.0%
Simplified65.0%
if 2.44999999999999991e200 < u Initial program 74.6%
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 50.0%
Taylor expanded in t1 around 0 46.9%
associate-*r/46.9%
neg-mul-146.9%
Simplified46.9%
Final simplification57.8%
(FPCore (u v t1) :precision binary64 (if (<= t1 8e+102) (/ v u) (/ v t1)))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= 8e+102) {
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 (t1 <= 8d+102) 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 (t1 <= 8e+102) {
tmp = v / u;
} else {
tmp = v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= 8e+102: tmp = v / u else: tmp = v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= 8e+102) tmp = Float64(v / u); else tmp = Float64(v / t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= 8e+102) tmp = v / u; else tmp = v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, 8e+102], N[(v / u), $MachinePrecision], N[(v / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq 8 \cdot 10^{+102}:\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{t1}\\
\end{array}
\end{array}
if t1 < 7.99999999999999982e102Initial program 76.0%
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 57.0%
*-commutative57.0%
frac-times46.8%
add-sqr-sqrt18.6%
sqrt-unprod59.6%
sqr-neg59.6%
sqrt-unprod28.1%
add-sqr-sqrt47.3%
Applied egg-rr47.3%
Taylor expanded in t1 around 0 19.2%
if 7.99999999999999982e102 < t1 Initial program 38.3%
associate-*l/42.1%
*-commutative42.1%
Simplified42.1%
Taylor expanded in t1 around inf 86.0%
associate-*r/86.0%
neg-mul-186.0%
Simplified86.0%
add-sqr-sqrt25.8%
sqrt-unprod33.2%
sqr-neg33.2%
sqrt-unprod17.9%
add-sqr-sqrt29.1%
div-inv29.1%
Applied egg-rr29.1%
associate-*r/29.1%
*-rgt-identity29.1%
Simplified29.1%
(FPCore (u v t1) :precision binary64 (/ v (- u t1)))
double code(double u, double v, double t1) {
return v / (u - t1);
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = v / (u - t1)
end function
public static double code(double u, double v, double t1) {
return v / (u - t1);
}
def code(u, v, t1): return v / (u - t1)
function code(u, v, t1) return Float64(v / Float64(u - t1)) end
function tmp = code(u, v, t1) tmp = v / (u - t1); end
code[u_, v_, t1_] := N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{u - t1}
\end{array}
Initial program 69.1%
times-frac98.4%
distribute-frac-neg98.4%
distribute-neg-frac298.4%
+-commutative98.4%
distribute-neg-in98.4%
unsub-neg98.4%
Simplified98.4%
Taylor expanded in t1 around inf 62.7%
*-commutative62.7%
frac-times45.2%
add-sqr-sqrt18.6%
sqrt-unprod55.7%
sqr-neg55.7%
sqrt-unprod26.6%
add-sqr-sqrt45.7%
Applied egg-rr45.7%
Taylor expanded in v around 0 60.1%
(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 69.1%
associate-*l/72.7%
*-commutative72.7%
Simplified72.7%
Taylor expanded in t1 around inf 51.1%
associate-*r/51.1%
neg-mul-151.1%
Simplified51.1%
add-sqr-sqrt21.7%
sqrt-unprod28.6%
sqr-neg28.6%
sqrt-unprod6.3%
add-sqr-sqrt12.8%
div-inv12.8%
Applied egg-rr12.8%
associate-*r/12.8%
*-rgt-identity12.8%
Simplified12.8%
herbie shell --seed 2024186
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))