
(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 12 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) (- (- 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(Float64(t1 / Float64(t1 + u)) * 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[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * v), $MachinePrecision] / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{t1}{t1 + u} \cdot v}{\left(-u\right) - t1}
\end{array}
Initial program 70.5%
associate-*l/75.2%
*-commutative75.2%
Simplified75.2%
associate-*r/70.5%
*-commutative70.5%
times-frac98.4%
frac-2neg98.4%
+-commutative98.4%
distribute-neg-in98.4%
sub-neg98.4%
associate-*r/98.4%
add-sqr-sqrt41.2%
sqrt-unprod38.0%
sqr-neg38.0%
sqrt-unprod16.9%
add-sqr-sqrt32.7%
sub-neg32.7%
+-commutative32.7%
add-sqr-sqrt15.9%
sqrt-unprod50.4%
sqr-neg50.4%
sqrt-unprod43.7%
add-sqr-sqrt73.6%
add-sqr-sqrt36.1%
sqrt-unprod78.2%
Applied egg-rr98.4%
Final simplification98.4%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (- (- u) t1)) (t_2 (* v (/ t1 (* (+ t1 u) t_1)))))
(if (<= t1 -2.5e+157)
(* (/ v (+ t1 u)) (+ (/ u t1) -1.0))
(if (<= t1 -6.2e-160)
t_2
(if (<= t1 8.3e-187)
(* (- v) (/ (/ t1 u) (+ t1 u)))
(if (<= t1 1.36e+104) t_2 (/ v t_1)))))))
double code(double u, double v, double t1) {
double t_1 = -u - t1;
double t_2 = v * (t1 / ((t1 + u) * t_1));
double tmp;
if (t1 <= -2.5e+157) {
tmp = (v / (t1 + u)) * ((u / t1) + -1.0);
} else if (t1 <= -6.2e-160) {
tmp = t_2;
} else if (t1 <= 8.3e-187) {
tmp = -v * ((t1 / u) / (t1 + u));
} else if (t1 <= 1.36e+104) {
tmp = t_2;
} else {
tmp = v / t_1;
}
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) :: t_2
real(8) :: tmp
t_1 = -u - t1
t_2 = v * (t1 / ((t1 + u) * t_1))
if (t1 <= (-2.5d+157)) then
tmp = (v / (t1 + u)) * ((u / t1) + (-1.0d0))
else if (t1 <= (-6.2d-160)) then
tmp = t_2
else if (t1 <= 8.3d-187) then
tmp = -v * ((t1 / u) / (t1 + u))
else if (t1 <= 1.36d+104) then
tmp = t_2
else
tmp = v / t_1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = -u - t1;
double t_2 = v * (t1 / ((t1 + u) * t_1));
double tmp;
if (t1 <= -2.5e+157) {
tmp = (v / (t1 + u)) * ((u / t1) + -1.0);
} else if (t1 <= -6.2e-160) {
tmp = t_2;
} else if (t1 <= 8.3e-187) {
tmp = -v * ((t1 / u) / (t1 + u));
} else if (t1 <= 1.36e+104) {
tmp = t_2;
} else {
tmp = v / t_1;
}
return tmp;
}
def code(u, v, t1): t_1 = -u - t1 t_2 = v * (t1 / ((t1 + u) * t_1)) tmp = 0 if t1 <= -2.5e+157: tmp = (v / (t1 + u)) * ((u / t1) + -1.0) elif t1 <= -6.2e-160: tmp = t_2 elif t1 <= 8.3e-187: tmp = -v * ((t1 / u) / (t1 + u)) elif t1 <= 1.36e+104: tmp = t_2 else: tmp = v / t_1 return tmp
function code(u, v, t1) t_1 = Float64(Float64(-u) - t1) t_2 = Float64(v * Float64(t1 / Float64(Float64(t1 + u) * t_1))) tmp = 0.0 if (t1 <= -2.5e+157) tmp = Float64(Float64(v / Float64(t1 + u)) * Float64(Float64(u / t1) + -1.0)); elseif (t1 <= -6.2e-160) tmp = t_2; elseif (t1 <= 8.3e-187) tmp = Float64(Float64(-v) * Float64(Float64(t1 / u) / Float64(t1 + u))); elseif (t1 <= 1.36e+104) tmp = t_2; else tmp = Float64(v / t_1); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = -u - t1; t_2 = v * (t1 / ((t1 + u) * t_1)); tmp = 0.0; if (t1 <= -2.5e+157) tmp = (v / (t1 + u)) * ((u / t1) + -1.0); elseif (t1 <= -6.2e-160) tmp = t_2; elseif (t1 <= 8.3e-187) tmp = -v * ((t1 / u) / (t1 + u)); elseif (t1 <= 1.36e+104) tmp = t_2; else tmp = v / t_1; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[((-u) - t1), $MachinePrecision]}, Block[{t$95$2 = N[(v * N[(t1 / N[(N[(t1 + u), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -2.5e+157], N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(N[(u / t1), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, -6.2e-160], t$95$2, If[LessEqual[t1, 8.3e-187], N[((-v) * N[(N[(t1 / u), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 1.36e+104], t$95$2, N[(v / t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-u\right) - t1\\
t_2 := v \cdot \frac{t1}{\left(t1 + u\right) \cdot t\_1}\\
\mathbf{if}\;t1 \leq -2.5 \cdot 10^{+157}:\\
\;\;\;\;\frac{v}{t1 + u} \cdot \left(\frac{u}{t1} + -1\right)\\
\mathbf{elif}\;t1 \leq -6.2 \cdot 10^{-160}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t1 \leq 8.3 \cdot 10^{-187}:\\
\;\;\;\;\left(-v\right) \cdot \frac{\frac{t1}{u}}{t1 + u}\\
\mathbf{elif}\;t1 \leq 1.36 \cdot 10^{+104}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{t\_1}\\
\end{array}
\end{array}
if t1 < -2.49999999999999988e157Initial program 41.0%
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 87.5%
if -2.49999999999999988e157 < t1 < -6.2000000000000001e-160 or 8.2999999999999995e-187 < t1 < 1.3599999999999999e104Initial program 88.2%
associate-*l/91.3%
*-commutative91.3%
Simplified91.3%
if -6.2000000000000001e-160 < t1 < 8.2999999999999995e-187Initial program 67.8%
associate-*l/79.1%
*-commutative79.1%
Simplified79.1%
associate-*r/67.8%
*-commutative67.8%
times-frac92.9%
frac-2neg92.9%
+-commutative92.9%
distribute-neg-in92.9%
sub-neg92.9%
associate-*r/94.6%
add-sqr-sqrt41.5%
sqrt-unprod47.4%
sqr-neg47.4%
sqrt-unprod26.1%
add-sqr-sqrt46.6%
sub-neg46.6%
+-commutative46.6%
add-sqr-sqrt20.5%
sqrt-unprod46.9%
sqr-neg46.9%
sqrt-unprod33.8%
add-sqr-sqrt56.1%
add-sqr-sqrt35.2%
sqrt-unprod69.8%
Applied egg-rr94.6%
Taylor expanded in t1 around 0 84.7%
frac-2neg84.7%
distribute-frac-neg84.7%
add-sqr-sqrt33.3%
sqrt-unprod56.5%
sqr-neg56.5%
sqrt-unprod30.2%
add-sqr-sqrt46.9%
remove-double-neg46.9%
distribute-rgt-neg-in46.9%
frac-2neg46.9%
*-commutative46.9%
associate-/l*46.8%
add-sqr-sqrt16.7%
sqrt-unprod54.6%
sqr-neg54.6%
sqrt-unprod53.0%
add-sqr-sqrt88.2%
Applied egg-rr88.2%
if 1.3599999999999999e104 < t1 Initial program 46.7%
associate-*l/50.1%
*-commutative50.1%
Simplified50.1%
associate-*r/46.7%
*-commutative46.7%
times-frac99.9%
frac-2neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*r/99.9%
add-sqr-sqrt0.0%
sqrt-unprod5.9%
sqr-neg5.9%
sqrt-unprod22.6%
add-sqr-sqrt22.6%
sub-neg22.6%
+-commutative22.6%
add-sqr-sqrt0.0%
sqrt-unprod50.2%
sqr-neg50.2%
sqrt-unprod91.3%
add-sqr-sqrt91.8%
add-sqr-sqrt42.7%
sqrt-unprod80.3%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 92.0%
mul-1-neg92.0%
Simplified92.0%
Final simplification90.3%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ v (- (- u) t1))))
(if (<= t1 -3.3e-31)
t_1
(if (<= t1 -3.8e-118)
(/ (/ v u) (- 1.0 (/ u t1)))
(if (<= t1 -6.4e-170)
(* (/ t1 (+ t1 u)) (/ v (- t1)))
(if (<= t1 1.3e-15) (* (/ t1 (- u)) (/ v u)) t_1))))))
double code(double u, double v, double t1) {
double t_1 = v / (-u - t1);
double tmp;
if (t1 <= -3.3e-31) {
tmp = t_1;
} else if (t1 <= -3.8e-118) {
tmp = (v / u) / (1.0 - (u / t1));
} else if (t1 <= -6.4e-170) {
tmp = (t1 / (t1 + u)) * (v / -t1);
} else if (t1 <= 1.3e-15) {
tmp = (t1 / -u) * (v / u);
} else {
tmp = t_1;
}
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 = v / (-u - t1)
if (t1 <= (-3.3d-31)) then
tmp = t_1
else if (t1 <= (-3.8d-118)) then
tmp = (v / u) / (1.0d0 - (u / t1))
else if (t1 <= (-6.4d-170)) then
tmp = (t1 / (t1 + u)) * (v / -t1)
else if (t1 <= 1.3d-15) then
tmp = (t1 / -u) * (v / u)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = v / (-u - t1);
double tmp;
if (t1 <= -3.3e-31) {
tmp = t_1;
} else if (t1 <= -3.8e-118) {
tmp = (v / u) / (1.0 - (u / t1));
} else if (t1 <= -6.4e-170) {
tmp = (t1 / (t1 + u)) * (v / -t1);
} else if (t1 <= 1.3e-15) {
tmp = (t1 / -u) * (v / u);
} else {
tmp = t_1;
}
return tmp;
}
def code(u, v, t1): t_1 = v / (-u - t1) tmp = 0 if t1 <= -3.3e-31: tmp = t_1 elif t1 <= -3.8e-118: tmp = (v / u) / (1.0 - (u / t1)) elif t1 <= -6.4e-170: tmp = (t1 / (t1 + u)) * (v / -t1) elif t1 <= 1.3e-15: tmp = (t1 / -u) * (v / u) else: tmp = t_1 return tmp
function code(u, v, t1) t_1 = Float64(v / Float64(Float64(-u) - t1)) tmp = 0.0 if (t1 <= -3.3e-31) tmp = t_1; elseif (t1 <= -3.8e-118) tmp = Float64(Float64(v / u) / Float64(1.0 - Float64(u / t1))); elseif (t1 <= -6.4e-170) tmp = Float64(Float64(t1 / Float64(t1 + u)) * Float64(v / Float64(-t1))); elseif (t1 <= 1.3e-15) tmp = Float64(Float64(t1 / Float64(-u)) * Float64(v / u)); else tmp = t_1; end return tmp end
function tmp_2 = code(u, v, t1) t_1 = v / (-u - t1); tmp = 0.0; if (t1 <= -3.3e-31) tmp = t_1; elseif (t1 <= -3.8e-118) tmp = (v / u) / (1.0 - (u / t1)); elseif (t1 <= -6.4e-170) tmp = (t1 / (t1 + u)) * (v / -t1); elseif (t1 <= 1.3e-15) tmp = (t1 / -u) * (v / u); else tmp = t_1; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -3.3e-31], t$95$1, If[LessEqual[t1, -3.8e-118], N[(N[(v / u), $MachinePrecision] / N[(1.0 - N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, -6.4e-170], N[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(v / (-t1)), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 1.3e-15], N[(N[(t1 / (-u)), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{v}{\left(-u\right) - t1}\\
\mathbf{if}\;t1 \leq -3.3 \cdot 10^{-31}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t1 \leq -3.8 \cdot 10^{-118}:\\
\;\;\;\;\frac{\frac{v}{u}}{1 - \frac{u}{t1}}\\
\mathbf{elif}\;t1 \leq -6.4 \cdot 10^{-170}:\\
\;\;\;\;\frac{t1}{t1 + u} \cdot \frac{v}{-t1}\\
\mathbf{elif}\;t1 \leq 1.3 \cdot 10^{-15}:\\
\;\;\;\;\frac{t1}{-u} \cdot \frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t1 < -3.2999999999999999e-31 or 1.30000000000000002e-15 < t1 Initial program 60.9%
associate-*l/64.0%
*-commutative64.0%
Simplified64.0%
associate-*r/60.9%
*-commutative60.9%
times-frac99.9%
frac-2neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*r/99.9%
add-sqr-sqrt44.0%
sqrt-unprod23.7%
sqr-neg23.7%
sqrt-unprod10.2%
add-sqr-sqrt26.0%
sub-neg26.0%
+-commutative26.0%
add-sqr-sqrt15.8%
sqrt-unprod49.4%
sqr-neg49.4%
sqrt-unprod48.0%
add-sqr-sqrt84.8%
add-sqr-sqrt41.8%
sqrt-unprod79.8%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 81.2%
mul-1-neg81.2%
Simplified81.2%
if -3.2999999999999999e-31 < t1 < -3.8000000000000001e-118Initial program 84.4%
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 0 82.5%
frac-times67.0%
frac-2neg67.0%
distribute-rgt-neg-out67.0%
add-sqr-sqrt48.8%
sqrt-unprod43.8%
sqr-neg43.8%
sqrt-unprod12.3%
add-sqr-sqrt28.1%
*-commutative28.1%
add-sqr-sqrt7.6%
sqrt-unprod45.4%
sqr-neg45.4%
sqrt-unprod37.9%
add-sqr-sqrt67.9%
Applied egg-rr67.9%
distribute-frac-neg267.9%
associate-/r*78.8%
associate-*r/78.8%
associate-*r/83.5%
*-commutative83.5%
associate-/r/83.3%
distribute-neg-frac283.3%
div-sub83.3%
sub-neg83.3%
*-inverses83.3%
metadata-eval83.3%
+-commutative83.3%
distribute-neg-in83.3%
metadata-eval83.3%
unsub-neg83.3%
Simplified83.3%
if -3.8000000000000001e-118 < t1 < -6.3999999999999999e-170Initial program 69.1%
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 88.5%
if -6.3999999999999999e-170 < t1 < 1.30000000000000002e-15Initial program 81.2%
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 77.4%
Taylor expanded in t1 around 0 79.7%
associate-*r/79.7%
mul-1-neg79.7%
Simplified79.7%
Final simplification81.1%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (* (/ t1 (- u)) (/ v u))))
(if (<= t1 -68000.0)
(* (/ v (+ t1 u)) (+ (/ u t1) -1.0))
(if (<= t1 -7.6e-118)
t_1
(if (<= t1 -7.2e-170)
(* (/ t1 (+ t1 u)) (/ v (- t1)))
(if (<= t1 3.9e-16) t_1 (/ v (- (- u) t1))))))))
double code(double u, double v, double t1) {
double t_1 = (t1 / -u) * (v / u);
double tmp;
if (t1 <= -68000.0) {
tmp = (v / (t1 + u)) * ((u / t1) + -1.0);
} else if (t1 <= -7.6e-118) {
tmp = t_1;
} else if (t1 <= -7.2e-170) {
tmp = (t1 / (t1 + u)) * (v / -t1);
} else if (t1 <= 3.9e-16) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (t1 / -u) * (v / u)
if (t1 <= (-68000.0d0)) then
tmp = (v / (t1 + u)) * ((u / t1) + (-1.0d0))
else if (t1 <= (-7.6d-118)) then
tmp = t_1
else if (t1 <= (-7.2d-170)) then
tmp = (t1 / (t1 + u)) * (v / -t1)
else if (t1 <= 3.9d-16) then
tmp = t_1
else
tmp = v / (-u - t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = (t1 / -u) * (v / u);
double tmp;
if (t1 <= -68000.0) {
tmp = (v / (t1 + u)) * ((u / t1) + -1.0);
} else if (t1 <= -7.6e-118) {
tmp = t_1;
} else if (t1 <= -7.2e-170) {
tmp = (t1 / (t1 + u)) * (v / -t1);
} else if (t1 <= 3.9e-16) {
tmp = t_1;
} else {
tmp = v / (-u - t1);
}
return tmp;
}
def code(u, v, t1): t_1 = (t1 / -u) * (v / u) tmp = 0 if t1 <= -68000.0: tmp = (v / (t1 + u)) * ((u / t1) + -1.0) elif t1 <= -7.6e-118: tmp = t_1 elif t1 <= -7.2e-170: tmp = (t1 / (t1 + u)) * (v / -t1) elif t1 <= 3.9e-16: tmp = t_1 else: tmp = v / (-u - t1) return tmp
function code(u, v, t1) t_1 = Float64(Float64(t1 / Float64(-u)) * Float64(v / u)) tmp = 0.0 if (t1 <= -68000.0) tmp = Float64(Float64(v / Float64(t1 + u)) * Float64(Float64(u / t1) + -1.0)); elseif (t1 <= -7.6e-118) tmp = t_1; elseif (t1 <= -7.2e-170) tmp = Float64(Float64(t1 / Float64(t1 + u)) * Float64(v / Float64(-t1))); elseif (t1 <= 3.9e-16) tmp = t_1; else tmp = Float64(v / Float64(Float64(-u) - t1)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = (t1 / -u) * (v / u); tmp = 0.0; if (t1 <= -68000.0) tmp = (v / (t1 + u)) * ((u / t1) + -1.0); elseif (t1 <= -7.6e-118) tmp = t_1; elseif (t1 <= -7.2e-170) tmp = (t1 / (t1 + u)) * (v / -t1); elseif (t1 <= 3.9e-16) tmp = t_1; else tmp = v / (-u - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(N[(t1 / (-u)), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -68000.0], N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(N[(u / t1), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, -7.6e-118], t$95$1, If[LessEqual[t1, -7.2e-170], N[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(v / (-t1)), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 3.9e-16], t$95$1, N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t1}{-u} \cdot \frac{v}{u}\\
\mathbf{if}\;t1 \leq -68000:\\
\;\;\;\;\frac{v}{t1 + u} \cdot \left(\frac{u}{t1} + -1\right)\\
\mathbf{elif}\;t1 \leq -7.6 \cdot 10^{-118}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t1 \leq -7.2 \cdot 10^{-170}:\\
\;\;\;\;\frac{t1}{t1 + u} \cdot \frac{v}{-t1}\\
\mathbf{elif}\;t1 \leq 3.9 \cdot 10^{-16}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\end{array}
\end{array}
if t1 < -68000Initial program 55.5%
times-frac99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in t1 around inf 79.2%
if -68000 < t1 < -7.6000000000000002e-118 or -7.2000000000000006e-170 < t1 < 3.89999999999999977e-16Initial program 82.4%
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 76.0%
Taylor expanded in t1 around 0 77.9%
associate-*r/77.9%
mul-1-neg77.9%
Simplified77.9%
if -7.6000000000000002e-118 < t1 < -7.2000000000000006e-170Initial program 69.1%
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 88.5%
if 3.89999999999999977e-16 < t1 Initial program 60.3%
associate-*l/64.0%
*-commutative64.0%
Simplified64.0%
associate-*r/60.3%
*-commutative60.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-unprod7.5%
sqr-neg7.5%
sqrt-unprod18.3%
add-sqr-sqrt18.3%
sub-neg18.3%
+-commutative18.3%
add-sqr-sqrt0.0%
sqrt-unprod59.8%
sqr-neg59.8%
sqrt-unprod86.1%
add-sqr-sqrt86.6%
add-sqr-sqrt41.2%
sqrt-unprod80.7%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 86.7%
mul-1-neg86.7%
Simplified86.7%
Final simplification81.1%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -5.5e-32) (not (<= t1 2.15e-15))) (/ v (- (- u) t1)) (* (/ t1 (- u)) (/ v u))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -5.5e-32) || !(t1 <= 2.15e-15)) {
tmp = v / (-u - 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 ((t1 <= (-5.5d-32)) .or. (.not. (t1 <= 2.15d-15))) then
tmp = v / (-u - 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 ((t1 <= -5.5e-32) || !(t1 <= 2.15e-15)) {
tmp = v / (-u - t1);
} else {
tmp = (t1 / -u) * (v / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -5.5e-32) or not (t1 <= 2.15e-15): tmp = v / (-u - t1) else: tmp = (t1 / -u) * (v / u) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -5.5e-32) || !(t1 <= 2.15e-15)) tmp = Float64(v / Float64(Float64(-u) - t1)); else tmp = Float64(Float64(t1 / Float64(-u)) * Float64(v / u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -5.5e-32) || ~((t1 <= 2.15e-15))) tmp = v / (-u - t1); else tmp = (t1 / -u) * (v / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -5.5e-32], N[Not[LessEqual[t1, 2.15e-15]], $MachinePrecision]], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], N[(N[(t1 / (-u)), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -5.5 \cdot 10^{-32} \lor \neg \left(t1 \leq 2.15 \cdot 10^{-15}\right):\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{-u} \cdot \frac{v}{u}\\
\end{array}
\end{array}
if t1 < -5.50000000000000024e-32 or 2.1499999999999998e-15 < t1 Initial program 60.9%
associate-*l/64.0%
*-commutative64.0%
Simplified64.0%
associate-*r/60.9%
*-commutative60.9%
times-frac99.9%
frac-2neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*r/99.9%
add-sqr-sqrt44.0%
sqrt-unprod23.7%
sqr-neg23.7%
sqrt-unprod10.2%
add-sqr-sqrt26.0%
sub-neg26.0%
+-commutative26.0%
add-sqr-sqrt15.8%
sqrt-unprod49.4%
sqr-neg49.4%
sqrt-unprod48.0%
add-sqr-sqrt84.8%
add-sqr-sqrt41.8%
sqrt-unprod79.8%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 81.2%
mul-1-neg81.2%
Simplified81.2%
if -5.50000000000000024e-32 < t1 < 2.1499999999999998e-15Initial program 80.6%
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 75.4%
Taylor expanded in t1 around 0 77.4%
associate-*r/77.4%
mul-1-neg77.4%
Simplified77.4%
Final simplification79.4%
(FPCore (u v t1) :precision binary64 (if (<= u -3.2e+170) (/ v (- u)) (if (<= u 2.2e+171) (/ v (- t1)) (/ 1.0 (/ u v)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -3.2e+170) {
tmp = v / -u;
} else if (u <= 2.2e+171) {
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 <= (-3.2d+170)) then
tmp = v / -u
else if (u <= 2.2d+171) 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 <= -3.2e+170) {
tmp = v / -u;
} else if (u <= 2.2e+171) {
tmp = v / -t1;
} else {
tmp = 1.0 / (u / v);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -3.2e+170: tmp = v / -u elif u <= 2.2e+171: tmp = v / -t1 else: tmp = 1.0 / (u / v) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -3.2e+170) tmp = Float64(v / Float64(-u)); elseif (u <= 2.2e+171) 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 <= -3.2e+170) tmp = v / -u; elseif (u <= 2.2e+171) tmp = v / -t1; else tmp = 1.0 / (u / v); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -3.2e+170], N[(v / (-u)), $MachinePrecision], If[LessEqual[u, 2.2e+171], N[(v / (-t1)), $MachinePrecision], N[(1.0 / N[(u / v), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.2 \cdot 10^{+170}:\\
\;\;\;\;\frac{v}{-u}\\
\mathbf{elif}\;u \leq 2.2 \cdot 10^{+171}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{u}{v}}\\
\end{array}
\end{array}
if u < -3.19999999999999979e170Initial program 64.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 0 95.9%
Taylor expanded in t1 around inf 35.2%
associate-*r/35.2%
mul-1-neg35.2%
Simplified35.2%
if -3.19999999999999979e170 < u < 2.1999999999999999e171Initial program 71.3%
associate-*l/77.0%
*-commutative77.0%
Simplified77.0%
Taylor expanded in t1 around inf 64.0%
associate-*r/64.0%
neg-mul-164.0%
Simplified64.0%
if 2.1999999999999999e171 < u Initial program 70.1%
associate-*l/70.5%
*-commutative70.5%
Simplified70.5%
associate-*r/70.1%
*-commutative70.1%
times-frac99.8%
frac-2neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
sub-neg99.8%
associate-*r/99.9%
add-sqr-sqrt43.3%
sqrt-unprod61.2%
sqr-neg61.2%
sqrt-unprod34.6%
add-sqr-sqrt70.0%
sub-neg70.0%
+-commutative70.0%
add-sqr-sqrt35.4%
sqrt-unprod70.4%
sqr-neg70.4%
sqrt-unprod44.1%
add-sqr-sqrt81.3%
add-sqr-sqrt0.0%
sqrt-unprod70.5%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 47.5%
mul-1-neg47.5%
Simplified47.5%
clear-num51.2%
inv-pow51.2%
add-sqr-sqrt25.4%
sqrt-unprod42.7%
sqr-neg42.7%
sqrt-unprod24.2%
add-sqr-sqrt40.0%
Applied egg-rr40.0%
unpow-140.0%
Simplified40.0%
Taylor expanded in t1 around 0 40.3%
Final simplification58.4%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -9.5e+157) (not (<= t1 1.05e+73))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -9.5e+157) || !(t1 <= 1.05e+73)) {
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 <= (-9.5d+157)) .or. (.not. (t1 <= 1.05d+73))) 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 <= -9.5e+157) || !(t1 <= 1.05e+73)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -9.5e+157) or not (t1 <= 1.05e+73): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -9.5e+157) || !(t1 <= 1.05e+73)) 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 <= -9.5e+157) || ~((t1 <= 1.05e+73))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -9.5e+157], N[Not[LessEqual[t1, 1.05e+73]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -9.5 \cdot 10^{+157} \lor \neg \left(t1 \leq 1.05 \cdot 10^{+73}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -9.4999999999999996e157 or 1.0500000000000001e73 < t1 Initial program 47.3%
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 87.6%
Taylor expanded in u around inf 26.8%
if -9.4999999999999996e157 < t1 < 1.0500000000000001e73Initial program 82.2%
associate-*l/88.1%
*-commutative88.1%
Simplified88.1%
associate-*r/82.2%
*-commutative82.2%
times-frac97.6%
frac-2neg97.6%
+-commutative97.6%
distribute-neg-in97.6%
sub-neg97.6%
associate-*r/97.7%
add-sqr-sqrt44.0%
sqrt-unprod54.5%
sqr-neg54.5%
sqrt-unprod18.4%
add-sqr-sqrt34.8%
sub-neg34.8%
+-commutative34.8%
add-sqr-sqrt16.4%
sqrt-unprod51.3%
sqr-neg51.3%
sqrt-unprod37.5%
add-sqr-sqrt65.9%
add-sqr-sqrt34.3%
sqrt-unprod76.7%
Applied egg-rr97.7%
Taylor expanded in t1 around inf 48.9%
mul-1-neg48.9%
Simplified48.9%
clear-num49.3%
inv-pow49.3%
add-sqr-sqrt25.3%
sqrt-unprod33.6%
sqr-neg33.6%
sqrt-unprod10.1%
add-sqr-sqrt17.1%
Applied egg-rr17.1%
unpow-117.1%
Simplified17.1%
Taylor expanded in t1 around 0 17.1%
Final simplification20.3%
(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 70.5%
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 (<= u -9e+170) (/ v u) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -9e+170) {
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 <= (-9d+170)) 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 <= -9e+170) {
tmp = v / u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -9e+170: tmp = v / u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -9e+170) 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 <= -9e+170) tmp = v / u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -9e+170], N[(v / u), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -9 \cdot 10^{+170}:\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -9.00000000000000044e170Initial program 64.7%
associate-*l/65.9%
*-commutative65.9%
Simplified65.9%
associate-*r/64.7%
*-commutative64.7%
times-frac99.9%
frac-2neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*r/99.8%
add-sqr-sqrt51.7%
sqrt-unprod72.6%
sqr-neg72.6%
sqrt-unprod32.6%
add-sqr-sqrt65.4%
sub-neg65.4%
+-commutative65.4%
add-sqr-sqrt32.8%
sqrt-unprod65.6%
sqr-neg65.6%
sqrt-unprod36.5%
add-sqr-sqrt69.3%
add-sqr-sqrt69.3%
sqrt-unprod65.9%
Applied egg-rr99.8%
Taylor expanded in t1 around inf 39.2%
mul-1-neg39.2%
Simplified39.2%
clear-num39.1%
inv-pow39.1%
add-sqr-sqrt13.5%
sqrt-unprod34.4%
sqr-neg34.4%
sqrt-unprod21.5%
add-sqr-sqrt34.9%
Applied egg-rr34.9%
unpow-134.9%
Simplified34.9%
Taylor expanded in t1 around 0 35.2%
if -9.00000000000000044e170 < u Initial program 71.1%
associate-*l/76.2%
*-commutative76.2%
Simplified76.2%
Taylor expanded in t1 around inf 58.9%
associate-*r/58.9%
neg-mul-158.9%
Simplified58.9%
Final simplification56.5%
(FPCore (u v t1) :precision binary64 (if (<= u -8e+169) (/ v (- u)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -8e+169) {
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 <= (-8d+169)) 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 <= -8e+169) {
tmp = v / -u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -8e+169: tmp = v / -u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -8e+169) 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 <= -8e+169) tmp = v / -u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -8e+169], N[(v / (-u)), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -8 \cdot 10^{+169}:\\
\;\;\;\;\frac{v}{-u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -7.99999999999999947e169Initial program 64.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 0 95.9%
Taylor expanded in t1 around inf 35.2%
associate-*r/35.2%
mul-1-neg35.2%
Simplified35.2%
if -7.99999999999999947e169 < u Initial program 71.1%
associate-*l/76.2%
*-commutative76.2%
Simplified76.2%
Taylor expanded in t1 around inf 58.9%
associate-*r/58.9%
neg-mul-158.9%
Simplified58.9%
Final simplification56.6%
(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(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}{\left(-u\right) - t1}
\end{array}
Initial program 70.5%
associate-*l/75.2%
*-commutative75.2%
Simplified75.2%
associate-*r/70.5%
*-commutative70.5%
times-frac98.4%
frac-2neg98.4%
+-commutative98.4%
distribute-neg-in98.4%
sub-neg98.4%
associate-*r/98.4%
add-sqr-sqrt41.2%
sqrt-unprod38.0%
sqr-neg38.0%
sqrt-unprod16.9%
add-sqr-sqrt32.7%
sub-neg32.7%
+-commutative32.7%
add-sqr-sqrt15.9%
sqrt-unprod50.4%
sqr-neg50.4%
sqrt-unprod43.7%
add-sqr-sqrt73.6%
add-sqr-sqrt36.1%
sqrt-unprod78.2%
Applied egg-rr98.4%
Taylor expanded in t1 around inf 61.8%
mul-1-neg61.8%
Simplified61.8%
Final simplification61.8%
(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 70.5%
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 55.1%
Taylor expanded in u around inf 11.3%
Final simplification11.3%
herbie shell --seed 2024079
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))