
(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 16 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.3%
associate-/l*71.3%
distribute-lft-neg-out71.3%
distribute-rgt-neg-in71.3%
associate-/r*81.3%
distribute-neg-frac281.3%
Simplified81.3%
distribute-frac-neg281.3%
distribute-rgt-neg-out81.3%
associate-/r*71.3%
distribute-lft-neg-out71.3%
associate-/l*71.3%
times-frac98.1%
frac-2neg98.1%
associate-*r/99.4%
add-sqr-sqrt51.2%
sqrt-unprod49.4%
sqr-neg49.4%
sqrt-unprod22.6%
add-sqr-sqrt39.5%
add-sqr-sqrt23.9%
sqrt-unprod57.5%
sqr-neg57.5%
sqrt-prod39.5%
add-sqr-sqrt99.4%
Applied egg-rr99.4%
(FPCore (u v t1) :precision binary64 (if (<= u -6e-13) (/ (* t1 (/ v u)) (- u)) (if (<= u 1.4e+63) (- (/ v t1)) (/ (/ v (- 1.0 (/ u t1))) u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -6e-13) {
tmp = (t1 * (v / u)) / -u;
} else if (u <= 1.4e+63) {
tmp = -(v / t1);
} else {
tmp = (v / (1.0 - (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 <= (-6d-13)) then
tmp = (t1 * (v / u)) / -u
else if (u <= 1.4d+63) then
tmp = -(v / t1)
else
tmp = (v / (1.0d0 - (u / t1))) / u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -6e-13) {
tmp = (t1 * (v / u)) / -u;
} else if (u <= 1.4e+63) {
tmp = -(v / t1);
} else {
tmp = (v / (1.0 - (u / t1))) / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -6e-13: tmp = (t1 * (v / u)) / -u elif u <= 1.4e+63: tmp = -(v / t1) else: tmp = (v / (1.0 - (u / t1))) / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -6e-13) tmp = Float64(Float64(t1 * Float64(v / u)) / Float64(-u)); elseif (u <= 1.4e+63) tmp = Float64(-Float64(v / t1)); else tmp = Float64(Float64(v / Float64(1.0 - Float64(u / t1))) / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -6e-13) tmp = (t1 * (v / u)) / -u; elseif (u <= 1.4e+63) tmp = -(v / t1); else tmp = (v / (1.0 - (u / t1))) / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -6e-13], N[(N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision], If[LessEqual[u, 1.4e+63], (-N[(v / t1), $MachinePrecision]), N[(N[(v / N[(1.0 - N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -6 \cdot 10^{-13}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{u}}{-u}\\
\mathbf{elif}\;u \leq 1.4 \cdot 10^{+63}:\\
\;\;\;\;-\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{v}{1 - \frac{u}{t1}}}{u}\\
\end{array}
\end{array}
if u < -5.99999999999999968e-13Initial program 77.8%
associate-/l*77.7%
distribute-lft-neg-out77.7%
distribute-rgt-neg-in77.7%
associate-/r*86.1%
distribute-neg-frac286.1%
Simplified86.1%
Taylor expanded in t1 around 0 81.8%
Taylor expanded in t1 around 0 81.7%
associate-*r/86.2%
clear-num86.1%
un-div-inv86.1%
add-sqr-sqrt86.0%
sqrt-unprod75.8%
sqr-neg75.8%
sqrt-unprod0.0%
add-sqr-sqrt62.6%
Applied egg-rr62.6%
add-sqr-sqrt34.2%
sqrt-unprod67.0%
sqr-neg67.0%
sqrt-unprod41.3%
add-sqr-sqrt86.1%
distribute-neg-frac86.1%
div-inv86.1%
clear-num86.2%
Applied egg-rr86.2%
if -5.99999999999999968e-13 < u < 1.39999999999999993e63Initial program 63.9%
associate-/l*64.4%
distribute-lft-neg-out64.4%
distribute-rgt-neg-in64.4%
associate-/r*76.2%
distribute-neg-frac276.2%
Simplified76.2%
Taylor expanded in t1 around inf 79.9%
associate-*r/79.9%
neg-mul-179.9%
Simplified79.9%
if 1.39999999999999993e63 < u Initial program 81.4%
associate-/l*80.3%
distribute-lft-neg-out80.3%
distribute-rgt-neg-in80.3%
associate-/r*87.7%
distribute-neg-frac287.7%
Simplified87.7%
Taylor expanded in t1 around 0 82.3%
associate-*r/86.7%
associate-*r/81.3%
associate-*l/84.4%
remove-double-neg84.4%
distribute-rgt-neg-out84.4%
neg-mul-184.4%
metadata-eval84.4%
associate-/r*84.4%
Applied egg-rr87.4%
metadata-eval87.4%
distribute-neg-frac287.4%
/-rgt-identity87.4%
*-commutative87.4%
associate-/r/85.1%
distribute-neg-frac285.1%
div-sub85.1%
*-inverses85.1%
sub-neg85.1%
metadata-eval85.1%
distribute-neg-in85.1%
metadata-eval85.1%
+-commutative85.1%
unsub-neg85.1%
Simplified85.1%
Final simplification82.8%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.6e-13) (not (<= u 5.8e+83))) (/ (* t1 (/ v u)) (- u)) (- (/ v t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.6e-13) || !(u <= 5.8e+83)) {
tmp = (t1 * (v / u)) / -u;
} else {
tmp = -(v / t1);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-1.6d-13)) .or. (.not. (u <= 5.8d+83))) then
tmp = (t1 * (v / u)) / -u
else
tmp = -(v / t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.6e-13) || !(u <= 5.8e+83)) {
tmp = (t1 * (v / u)) / -u;
} else {
tmp = -(v / t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.6e-13) or not (u <= 5.8e+83): tmp = (t1 * (v / u)) / -u else: tmp = -(v / t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.6e-13) || !(u <= 5.8e+83)) tmp = Float64(Float64(t1 * Float64(v / u)) / Float64(-u)); else tmp = Float64(-Float64(v / t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -1.6e-13) || ~((u <= 5.8e+83))) tmp = (t1 * (v / u)) / -u; else tmp = -(v / t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.6e-13], N[Not[LessEqual[u, 5.8e+83]], $MachinePrecision]], N[(N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision], (-N[(v / t1), $MachinePrecision])]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.6 \cdot 10^{-13} \lor \neg \left(u \leq 5.8 \cdot 10^{+83}\right):\\
\;\;\;\;\frac{t1 \cdot \frac{v}{u}}{-u}\\
\mathbf{else}:\\
\;\;\;\;-\frac{v}{t1}\\
\end{array}
\end{array}
if u < -1.6e-13 or 5.79999999999999999e83 < u Initial program 78.8%
associate-/l*78.9%
distribute-lft-neg-out78.9%
distribute-rgt-neg-in78.9%
associate-/r*86.5%
distribute-neg-frac286.5%
Simplified86.5%
Taylor expanded in t1 around 0 82.4%
Taylor expanded in t1 around 0 82.5%
associate-*r/87.5%
clear-num87.5%
un-div-inv87.5%
add-sqr-sqrt60.0%
sqrt-unprod73.5%
sqr-neg73.5%
sqrt-unprod20.6%
add-sqr-sqrt64.2%
Applied egg-rr64.2%
add-sqr-sqrt35.0%
sqrt-unprod66.5%
sqr-neg66.5%
sqrt-unprod41.1%
add-sqr-sqrt87.5%
distribute-neg-frac87.5%
div-inv87.5%
clear-num87.5%
Applied egg-rr87.5%
if -1.6e-13 < u < 5.79999999999999999e83Initial program 64.7%
associate-/l*64.8%
distribute-lft-neg-out64.8%
distribute-rgt-neg-in64.8%
associate-/r*76.7%
distribute-neg-frac276.7%
Simplified76.7%
Taylor expanded in t1 around inf 78.7%
associate-*r/78.7%
neg-mul-178.7%
Simplified78.7%
Final simplification82.8%
(FPCore (u v t1) :precision binary64 (if (or (<= u -5.5e-17) (not (<= u 2.7e+84))) (* t1 (/ (/ v u) (- u))) (- (/ v t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -5.5e-17) || !(u <= 2.7e+84)) {
tmp = t1 * ((v / u) / -u);
} else {
tmp = -(v / t1);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-5.5d-17)) .or. (.not. (u <= 2.7d+84))) then
tmp = t1 * ((v / u) / -u)
else
tmp = -(v / t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -5.5e-17) || !(u <= 2.7e+84)) {
tmp = t1 * ((v / u) / -u);
} else {
tmp = -(v / t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -5.5e-17) or not (u <= 2.7e+84): tmp = t1 * ((v / u) / -u) else: tmp = -(v / t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -5.5e-17) || !(u <= 2.7e+84)) tmp = Float64(t1 * Float64(Float64(v / u) / Float64(-u))); else tmp = Float64(-Float64(v / t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -5.5e-17) || ~((u <= 2.7e+84))) tmp = t1 * ((v / u) / -u); else tmp = -(v / t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -5.5e-17], N[Not[LessEqual[u, 2.7e+84]], $MachinePrecision]], N[(t1 * N[(N[(v / u), $MachinePrecision] / (-u)), $MachinePrecision]), $MachinePrecision], (-N[(v / t1), $MachinePrecision])]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -5.5 \cdot 10^{-17} \lor \neg \left(u \leq 2.7 \cdot 10^{+84}\right):\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{-u}\\
\mathbf{else}:\\
\;\;\;\;-\frac{v}{t1}\\
\end{array}
\end{array}
if u < -5.50000000000000001e-17 or 2.7e84 < u Initial program 78.8%
associate-/l*78.9%
distribute-lft-neg-out78.9%
distribute-rgt-neg-in78.9%
associate-/r*86.5%
distribute-neg-frac286.5%
Simplified86.5%
Taylor expanded in t1 around 0 82.4%
Taylor expanded in t1 around 0 82.5%
if -5.50000000000000001e-17 < u < 2.7e84Initial program 64.7%
associate-/l*64.8%
distribute-lft-neg-out64.8%
distribute-rgt-neg-in64.8%
associate-/r*76.7%
distribute-neg-frac276.7%
Simplified76.7%
Taylor expanded in t1 around inf 78.7%
associate-*r/78.7%
neg-mul-178.7%
Simplified78.7%
Final simplification80.5%
(FPCore (u v t1) :precision binary64 (if (<= u -2.6e-12) (/ (* t1 (/ v u)) (- u)) (if (<= u 1.45e+64) (- (/ v t1)) (/ (/ t1 (/ u v)) (- u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -2.6e-12) {
tmp = (t1 * (v / u)) / -u;
} else if (u <= 1.45e+64) {
tmp = -(v / 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 <= (-2.6d-12)) then
tmp = (t1 * (v / u)) / -u
else if (u <= 1.45d+64) then
tmp = -(v / 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 <= -2.6e-12) {
tmp = (t1 * (v / u)) / -u;
} else if (u <= 1.45e+64) {
tmp = -(v / t1);
} else {
tmp = (t1 / (u / v)) / -u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -2.6e-12: tmp = (t1 * (v / u)) / -u elif u <= 1.45e+64: tmp = -(v / t1) else: tmp = (t1 / (u / v)) / -u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -2.6e-12) tmp = Float64(Float64(t1 * Float64(v / u)) / Float64(-u)); elseif (u <= 1.45e+64) tmp = Float64(-Float64(v / t1)); else tmp = Float64(Float64(t1 / Float64(u / v)) / Float64(-u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -2.6e-12) tmp = (t1 * (v / u)) / -u; elseif (u <= 1.45e+64) tmp = -(v / t1); else tmp = (t1 / (u / v)) / -u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -2.6e-12], N[(N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision], If[LessEqual[u, 1.45e+64], (-N[(v / t1), $MachinePrecision]), N[(N[(t1 / N[(u / v), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.6 \cdot 10^{-12}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{u}}{-u}\\
\mathbf{elif}\;u \leq 1.45 \cdot 10^{+64}:\\
\;\;\;\;-\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t1}{\frac{u}{v}}}{-u}\\
\end{array}
\end{array}
if u < -2.59999999999999983e-12Initial program 77.8%
associate-/l*77.7%
distribute-lft-neg-out77.7%
distribute-rgt-neg-in77.7%
associate-/r*86.1%
distribute-neg-frac286.1%
Simplified86.1%
Taylor expanded in t1 around 0 81.8%
Taylor expanded in t1 around 0 81.7%
associate-*r/86.2%
clear-num86.1%
un-div-inv86.1%
add-sqr-sqrt86.0%
sqrt-unprod75.8%
sqr-neg75.8%
sqrt-unprod0.0%
add-sqr-sqrt62.6%
Applied egg-rr62.6%
add-sqr-sqrt34.2%
sqrt-unprod67.0%
sqr-neg67.0%
sqrt-unprod41.3%
add-sqr-sqrt86.1%
distribute-neg-frac86.1%
div-inv86.1%
clear-num86.2%
Applied egg-rr86.2%
if -2.59999999999999983e-12 < u < 1.44999999999999997e64Initial program 63.9%
associate-/l*64.4%
distribute-lft-neg-out64.4%
distribute-rgt-neg-in64.4%
associate-/r*76.2%
distribute-neg-frac276.2%
Simplified76.2%
Taylor expanded in t1 around inf 79.9%
associate-*r/79.9%
neg-mul-179.9%
Simplified79.9%
if 1.44999999999999997e64 < u Initial program 81.4%
associate-/l*80.3%
distribute-lft-neg-out80.3%
distribute-rgt-neg-in80.3%
associate-/r*87.7%
distribute-neg-frac287.7%
Simplified87.7%
Taylor expanded in t1 around 0 82.3%
Taylor expanded in t1 around 0 79.7%
associate-*r/85.0%
frac-2neg85.0%
clear-num85.0%
un-div-inv85.0%
remove-double-neg85.0%
Applied egg-rr85.0%
Final simplification82.8%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.4e+99) (not (<= u 5e+84))) (/ t1 (* u (/ u v))) (- (/ v t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.4e+99) || !(u <= 5e+84)) {
tmp = t1 / (u * (u / v));
} 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.4d+99)) .or. (.not. (u <= 5d+84))) then
tmp = t1 / (u * (u / v))
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.4e+99) || !(u <= 5e+84)) {
tmp = t1 / (u * (u / v));
} else {
tmp = -(v / t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.4e+99) or not (u <= 5e+84): tmp = t1 / (u * (u / v)) else: tmp = -(v / t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.4e+99) || !(u <= 5e+84)) tmp = Float64(t1 / Float64(u * Float64(u / v))); else tmp = Float64(-Float64(v / t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -1.4e+99) || ~((u <= 5e+84))) tmp = t1 / (u * (u / v)); else tmp = -(v / t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.4e+99], N[Not[LessEqual[u, 5e+84]], $MachinePrecision]], N[(t1 / N[(u * N[(u / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], (-N[(v / t1), $MachinePrecision])]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.4 \cdot 10^{+99} \lor \neg \left(u \leq 5 \cdot 10^{+84}\right):\\
\;\;\;\;\frac{t1}{u \cdot \frac{u}{v}}\\
\mathbf{else}:\\
\;\;\;\;-\frac{v}{t1}\\
\end{array}
\end{array}
if u < -1.4e99 or 5.0000000000000001e84 < u Initial program 79.9%
associate-/l*80.3%
distribute-lft-neg-out80.3%
distribute-rgt-neg-in80.3%
associate-/r*88.3%
distribute-neg-frac288.3%
Simplified88.3%
Taylor expanded in t1 around 0 86.0%
Taylor expanded in t1 around 0 86.1%
clear-num86.0%
un-div-inv86.0%
div-inv86.0%
clear-num86.0%
add-sqr-sqrt55.9%
sqrt-unprod75.5%
sqr-neg75.5%
sqrt-unprod24.3%
add-sqr-sqrt71.6%
Applied egg-rr71.6%
if -1.4e99 < u < 5.0000000000000001e84Initial program 65.7%
associate-/l*65.5%
distribute-lft-neg-out65.5%
distribute-rgt-neg-in65.5%
associate-/r*76.7%
distribute-neg-frac276.7%
Simplified76.7%
Taylor expanded in t1 around inf 74.4%
associate-*r/74.4%
neg-mul-174.4%
Simplified74.4%
Final simplification73.3%
(FPCore (u v t1) :precision binary64 (if (or (<= u -2.1e+99) (not (<= u 1.36e+84))) (* t1 (/ (/ v u) u)) (- (/ v t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.1e+99) || !(u <= 1.36e+84)) {
tmp = t1 * ((v / u) / u);
} else {
tmp = -(v / t1);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-2.1d+99)) .or. (.not. (u <= 1.36d+84))) then
tmp = t1 * ((v / u) / u)
else
tmp = -(v / t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.1e+99) || !(u <= 1.36e+84)) {
tmp = t1 * ((v / u) / u);
} else {
tmp = -(v / t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -2.1e+99) or not (u <= 1.36e+84): tmp = t1 * ((v / u) / u) else: tmp = -(v / t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -2.1e+99) || !(u <= 1.36e+84)) tmp = Float64(t1 * Float64(Float64(v / u) / u)); else tmp = Float64(-Float64(v / t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -2.1e+99) || ~((u <= 1.36e+84))) tmp = t1 * ((v / u) / u); else tmp = -(v / t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2.1e+99], N[Not[LessEqual[u, 1.36e+84]], $MachinePrecision]], N[(t1 * N[(N[(v / u), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision], (-N[(v / t1), $MachinePrecision])]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.1 \cdot 10^{+99} \lor \neg \left(u \leq 1.36 \cdot 10^{+84}\right):\\
\;\;\;\;t1 \cdot \frac{\frac{v}{u}}{u}\\
\mathbf{else}:\\
\;\;\;\;-\frac{v}{t1}\\
\end{array}
\end{array}
if u < -2.1000000000000001e99 or 1.3599999999999999e84 < u Initial program 79.9%
associate-/l*80.3%
distribute-lft-neg-out80.3%
distribute-rgt-neg-in80.3%
associate-/r*88.3%
distribute-neg-frac288.3%
Simplified88.3%
Taylor expanded in t1 around 0 86.0%
Taylor expanded in t1 around 0 86.1%
associate-*r/92.0%
clear-num92.0%
un-div-inv91.9%
add-sqr-sqrt59.6%
sqrt-unprod75.5%
sqr-neg75.5%
sqrt-unprod24.2%
add-sqr-sqrt70.5%
Applied egg-rr70.5%
div-inv70.5%
clear-num70.5%
associate-/l*71.6%
Applied egg-rr71.6%
if -2.1000000000000001e99 < u < 1.3599999999999999e84Initial program 65.7%
associate-/l*65.5%
distribute-lft-neg-out65.5%
distribute-rgt-neg-in65.5%
associate-/r*76.7%
distribute-neg-frac276.7%
Simplified76.7%
Taylor expanded in t1 around inf 74.4%
associate-*r/74.4%
neg-mul-174.4%
Simplified74.4%
Final simplification73.3%
(FPCore (u v t1) :precision binary64 (if (or (<= u -2.2e+99) (not (<= u 2.1e+196))) (/ 1.0 (/ u v)) (- (/ v t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.2e+99) || !(u <= 2.1e+196)) {
tmp = 1.0 / (u / v);
} 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.2d+99)) .or. (.not. (u <= 2.1d+196))) then
tmp = 1.0d0 / (u / v)
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.2e+99) || !(u <= 2.1e+196)) {
tmp = 1.0 / (u / v);
} else {
tmp = -(v / t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -2.2e+99) or not (u <= 2.1e+196): tmp = 1.0 / (u / v) else: tmp = -(v / t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -2.2e+99) || !(u <= 2.1e+196)) tmp = Float64(1.0 / Float64(u / v)); else tmp = Float64(-Float64(v / t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -2.2e+99) || ~((u <= 2.1e+196))) tmp = 1.0 / (u / v); else tmp = -(v / t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2.2e+99], N[Not[LessEqual[u, 2.1e+196]], $MachinePrecision]], N[(1.0 / N[(u / v), $MachinePrecision]), $MachinePrecision], (-N[(v / t1), $MachinePrecision])]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.2 \cdot 10^{+99} \lor \neg \left(u \leq 2.1 \cdot 10^{+196}\right):\\
\;\;\;\;\frac{1}{\frac{u}{v}}\\
\mathbf{else}:\\
\;\;\;\;-\frac{v}{t1}\\
\end{array}
\end{array}
if u < -2.19999999999999978e99 or 2.10000000000000015e196 < u Initial program 78.4%
associate-/l*78.9%
distribute-lft-neg-out78.9%
distribute-rgt-neg-in78.9%
associate-/r*87.0%
distribute-neg-frac287.0%
Simplified87.0%
Taylor expanded in t1 around 0 85.8%
Taylor expanded in t1 around inf 43.4%
associate-*r/43.4%
mul-1-neg43.4%
Simplified43.4%
add-sqr-sqrt21.9%
sqrt-unprod42.9%
sqr-neg42.9%
sqrt-unprod21.4%
add-sqr-sqrt43.3%
clear-num45.2%
inv-pow45.2%
Applied egg-rr45.2%
unpow-145.2%
Simplified45.2%
if -2.19999999999999978e99 < u < 2.10000000000000015e196Initial program 67.7%
associate-/l*67.6%
distribute-lft-neg-out67.6%
distribute-rgt-neg-in67.6%
associate-/r*78.5%
distribute-neg-frac278.5%
Simplified78.5%
Taylor expanded in t1 around inf 68.4%
associate-*r/68.4%
neg-mul-168.4%
Simplified68.4%
Final simplification60.7%
(FPCore (u v t1) :precision binary64 (if (or (<= u -2.5e+99) (not (<= u 2.8e+196))) (/ v u) (- (/ v t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.5e+99) || !(u <= 2.8e+196)) {
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.5d+99)) .or. (.not. (u <= 2.8d+196))) 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.5e+99) || !(u <= 2.8e+196)) {
tmp = v / u;
} else {
tmp = -(v / t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -2.5e+99) or not (u <= 2.8e+196): tmp = v / u else: tmp = -(v / t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -2.5e+99) || !(u <= 2.8e+196)) tmp = Float64(v / u); else tmp = Float64(-Float64(v / t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -2.5e+99) || ~((u <= 2.8e+196))) tmp = v / u; else tmp = -(v / t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2.5e+99], N[Not[LessEqual[u, 2.8e+196]], $MachinePrecision]], N[(v / u), $MachinePrecision], (-N[(v / t1), $MachinePrecision])]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.5 \cdot 10^{+99} \lor \neg \left(u \leq 2.8 \cdot 10^{+196}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;-\frac{v}{t1}\\
\end{array}
\end{array}
if u < -2.50000000000000004e99 or 2.8000000000000002e196 < u Initial program 78.4%
associate-/l*78.9%
distribute-lft-neg-out78.9%
distribute-rgt-neg-in78.9%
associate-/r*87.0%
distribute-neg-frac287.0%
Simplified87.0%
Taylor expanded in t1 around 0 85.8%
Taylor expanded in t1 around inf 43.4%
associate-*r/43.4%
mul-1-neg43.4%
Simplified43.4%
neg-sub043.4%
sub-neg43.4%
add-sqr-sqrt21.9%
sqrt-unprod42.9%
sqr-neg42.9%
sqrt-unprod21.4%
add-sqr-sqrt43.3%
Applied egg-rr43.3%
+-lft-identity43.3%
Simplified43.3%
if -2.50000000000000004e99 < u < 2.8000000000000002e196Initial program 67.7%
associate-/l*67.6%
distribute-lft-neg-out67.6%
distribute-rgt-neg-in67.6%
associate-/r*78.5%
distribute-neg-frac278.5%
Simplified78.5%
Taylor expanded in t1 around inf 68.4%
associate-*r/68.4%
neg-mul-168.4%
Simplified68.4%
Final simplification60.0%
(FPCore (u v t1) :precision binary64 (if (<= u -2.5e+99) (/ v (- u)) (if (<= u 2.05e+196) (- (/ v t1)) (/ v u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -2.5e+99) {
tmp = v / -u;
} else if (u <= 2.05e+196) {
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.5d+99)) then
tmp = v / -u
else if (u <= 2.05d+196) 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.5e+99) {
tmp = v / -u;
} else if (u <= 2.05e+196) {
tmp = -(v / t1);
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -2.5e+99: tmp = v / -u elif u <= 2.05e+196: tmp = -(v / t1) else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -2.5e+99) tmp = Float64(v / Float64(-u)); elseif (u <= 2.05e+196) tmp = Float64(-Float64(v / t1)); else tmp = Float64(v / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -2.5e+99) tmp = v / -u; elseif (u <= 2.05e+196) tmp = -(v / t1); else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -2.5e+99], N[(v / (-u)), $MachinePrecision], If[LessEqual[u, 2.05e+196], (-N[(v / t1), $MachinePrecision]), N[(v / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.5 \cdot 10^{+99}:\\
\;\;\;\;\frac{v}{-u}\\
\mathbf{elif}\;u \leq 2.05 \cdot 10^{+196}:\\
\;\;\;\;-\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if u < -2.50000000000000004e99Initial program 79.2%
associate-/l*79.6%
distribute-lft-neg-out79.6%
distribute-rgt-neg-in79.6%
associate-/r*88.8%
distribute-neg-frac288.8%
Simplified88.8%
Taylor expanded in t1 around 0 87.2%
Taylor expanded in t1 around inf 41.7%
associate-*r/41.7%
mul-1-neg41.7%
Simplified41.7%
if -2.50000000000000004e99 < u < 2.0499999999999998e196Initial program 67.7%
associate-/l*67.6%
distribute-lft-neg-out67.6%
distribute-rgt-neg-in67.6%
associate-/r*78.5%
distribute-neg-frac278.5%
Simplified78.5%
Taylor expanded in t1 around inf 68.4%
associate-*r/68.4%
neg-mul-168.4%
Simplified68.4%
if 2.0499999999999998e196 < u Initial program 75.8%
associate-/l*76.6%
distribute-lft-neg-out76.6%
distribute-rgt-neg-in76.6%
associate-/r*81.2%
distribute-neg-frac281.2%
Simplified81.2%
Taylor expanded in t1 around 0 81.2%
Taylor expanded in t1 around inf 49.1%
associate-*r/49.1%
mul-1-neg49.1%
Simplified49.1%
neg-sub049.1%
sub-neg49.1%
add-sqr-sqrt38.2%
sqrt-unprod48.8%
sqr-neg48.8%
sqrt-unprod11.2%
add-sqr-sqrt50.0%
Applied egg-rr50.0%
+-lft-identity50.0%
Simplified50.0%
Final simplification60.2%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -4.3e+82) (not (<= t1 1.05e+141))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -4.3e+82) || !(t1 <= 1.05e+141)) {
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 <= (-4.3d+82)) .or. (.not. (t1 <= 1.05d+141))) 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 <= -4.3e+82) || !(t1 <= 1.05e+141)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -4.3e+82) or not (t1 <= 1.05e+141): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -4.3e+82) || !(t1 <= 1.05e+141)) 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 <= -4.3e+82) || ~((t1 <= 1.05e+141))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -4.3e+82], N[Not[LessEqual[t1, 1.05e+141]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -4.3 \cdot 10^{+82} \lor \neg \left(t1 \leq 1.05 \cdot 10^{+141}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -4.30000000000000015e82 or 1.0499999999999999e141 < t1 Initial program 47.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 85.9%
Taylor expanded in u around inf 33.4%
if -4.30000000000000015e82 < t1 < 1.0499999999999999e141Initial program 81.6%
associate-/l*80.4%
distribute-lft-neg-out80.4%
distribute-rgt-neg-in80.4%
associate-/r*86.9%
distribute-neg-frac286.9%
Simplified86.9%
Taylor expanded in t1 around 0 61.5%
Taylor expanded in t1 around inf 20.2%
associate-*r/20.2%
mul-1-neg20.2%
Simplified20.2%
neg-sub020.2%
sub-neg20.2%
add-sqr-sqrt9.4%
sqrt-unprod24.8%
sqr-neg24.8%
sqrt-unprod11.3%
add-sqr-sqrt21.4%
Applied egg-rr21.4%
+-lft-identity21.4%
Simplified21.4%
Final simplification25.0%
(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) * Float64(v / 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) * N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-t1\right) \cdot \frac{v}{t1 + u}}{t1 + u}
\end{array}
Initial program 71.3%
associate-/l*71.3%
distribute-lft-neg-out71.3%
distribute-rgt-neg-in71.3%
associate-/r*81.3%
distribute-neg-frac281.3%
Simplified81.3%
distribute-frac-neg281.3%
distribute-rgt-neg-out81.3%
associate-/r*71.3%
distribute-lft-neg-out71.3%
associate-/l*71.3%
times-frac98.1%
frac-2neg98.1%
associate-*r/99.4%
add-sqr-sqrt51.2%
sqrt-unprod49.4%
sqr-neg49.4%
sqrt-unprod22.6%
add-sqr-sqrt39.5%
add-sqr-sqrt23.9%
sqrt-unprod57.5%
sqr-neg57.5%
sqrt-prod39.5%
add-sqr-sqrt99.4%
Applied egg-rr99.4%
Taylor expanded in v around 0 83.9%
mul-1-neg83.9%
associate-/l*98.3%
distribute-lft-neg-in98.3%
Simplified98.3%
(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(t1 / Float64(t1 + u)) * Float64(v / Float64(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}{\left(-t1\right) - u}
\end{array}
Initial program 71.3%
associate-/l*71.3%
distribute-lft-neg-out71.3%
distribute-rgt-neg-in71.3%
associate-/r*81.3%
distribute-neg-frac281.3%
Simplified81.3%
distribute-frac-neg281.3%
distribute-rgt-neg-out81.3%
associate-/r*71.3%
distribute-lft-neg-out71.3%
associate-/l*71.3%
times-frac98.1%
frac-2neg98.1%
associate-*r/99.4%
add-sqr-sqrt51.2%
sqrt-unprod49.4%
sqr-neg49.4%
sqrt-unprod22.6%
add-sqr-sqrt39.5%
add-sqr-sqrt23.9%
sqrt-unprod57.5%
sqr-neg57.5%
sqrt-prod39.5%
add-sqr-sqrt99.4%
Applied egg-rr99.4%
Taylor expanded in v around 0 83.9%
mul-1-neg83.9%
associate-/l*98.3%
distribute-lft-neg-in98.3%
Simplified98.3%
clear-num97.9%
inv-pow97.9%
Applied egg-rr97.9%
unpow-197.9%
Simplified97.9%
associate-/l*81.2%
distribute-lft-neg-out81.2%
add-sqr-sqrt42.3%
sqrt-unprod44.9%
sqr-neg44.9%
sqrt-unprod17.0%
add-sqr-sqrt39.6%
associate-/l*39.5%
*-commutative39.5%
associate-/l*39.5%
clear-num39.5%
add-sqr-sqrt16.9%
sqrt-unprod47.0%
sqr-neg47.0%
sqrt-unprod47.9%
add-sqr-sqrt98.1%
Applied egg-rr98.1%
Final simplification98.1%
(FPCore (u v t1) :precision binary64 (/ v (- (- t1) u)))
double code(double u, double v, double t1) {
return v / (-t1 - u);
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = v / (-t1 - u)
end function
public static double code(double u, double v, double t1) {
return v / (-t1 - u);
}
def code(u, v, t1): return v / (-t1 - u)
function code(u, v, t1) return Float64(v / Float64(Float64(-t1) - u)) end
function tmp = code(u, v, t1) tmp = v / (-t1 - u); end
code[u_, v_, t1_] := N[(v / N[((-t1) - u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{\left(-t1\right) - u}
\end{array}
Initial program 71.3%
associate-/l*71.3%
distribute-lft-neg-out71.3%
distribute-rgt-neg-in71.3%
associate-/r*81.3%
distribute-neg-frac281.3%
Simplified81.3%
distribute-frac-neg281.3%
distribute-rgt-neg-out81.3%
associate-/r*71.3%
distribute-lft-neg-out71.3%
associate-/l*71.3%
times-frac98.1%
frac-2neg98.1%
associate-*r/99.4%
add-sqr-sqrt51.2%
sqrt-unprod49.4%
sqr-neg49.4%
sqrt-unprod22.6%
add-sqr-sqrt39.5%
add-sqr-sqrt23.9%
sqrt-unprod57.5%
sqr-neg57.5%
sqrt-prod39.5%
add-sqr-sqrt99.4%
Applied egg-rr99.4%
Taylor expanded in t1 around inf 61.5%
mul-1-neg61.5%
Simplified61.5%
Final simplification61.5%
(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.3%
associate-/l*71.3%
distribute-lft-neg-out71.3%
distribute-rgt-neg-in71.3%
associate-/r*81.3%
distribute-neg-frac281.3%
Simplified81.3%
distribute-frac-neg281.3%
distribute-rgt-neg-out81.3%
associate-/r*71.3%
distribute-lft-neg-out71.3%
associate-/l*71.3%
times-frac98.1%
frac-2neg98.1%
associate-*r/99.4%
add-sqr-sqrt51.2%
sqrt-unprod49.4%
sqr-neg49.4%
sqrt-unprod22.6%
add-sqr-sqrt39.5%
add-sqr-sqrt23.9%
sqrt-unprod57.5%
sqr-neg57.5%
sqrt-prod39.5%
add-sqr-sqrt99.4%
Applied egg-rr99.4%
Taylor expanded in t1 around inf 61.5%
mul-1-neg61.5%
Simplified61.5%
add-sqr-sqrt29.2%
sqrt-unprod70.1%
sqr-neg70.1%
sqrt-unprod32.6%
add-sqr-sqrt61.6%
sub-neg61.6%
Applied egg-rr61.6%
Final simplification61.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.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 54.5%
Taylor expanded in u around inf 13.0%
herbie shell --seed 2024131
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))