
(FPCore (u v t1) :precision binary64 (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))
double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-t1 * v) / ((t1 + u) * (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
def code(u, v, t1): return (-t1 * v) / ((t1 + u) * (t1 + u))
function code(u, v, t1) return Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (-t1 * v) / ((t1 + u) * (t1 + u)); end
code[u_, v_, t1_] := N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (u v t1) :precision binary64 (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))
double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-t1 * v) / ((t1 + u) * (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
def code(u, v, t1): return (-t1 * v) / ((t1 + u) * (t1 + u))
function code(u, v, t1) return Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (-t1 * v) / ((t1 + u) * (t1 + u)); end
code[u_, v_, t1_] := N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}
\end{array}
(FPCore (u v t1) :precision binary64 (/ (/ (* t1 (/ v (+ t1 u))) -1.0) (+ t1 u)))
double code(double u, double v, double t1) {
return ((t1 * (v / (t1 + u))) / -1.0) / (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))) / (-1.0d0)) / (t1 + u)
end function
public static double code(double u, double v, double t1) {
return ((t1 * (v / (t1 + u))) / -1.0) / (t1 + u);
}
def code(u, v, t1): return ((t1 * (v / (t1 + u))) / -1.0) / (t1 + u)
function code(u, v, t1) return Float64(Float64(Float64(t1 * Float64(v / Float64(t1 + u))) / -1.0) / Float64(t1 + u)) end
function tmp = code(u, v, t1) tmp = ((t1 * (v / (t1 + u))) / -1.0) / (t1 + u); end
code[u_, v_, t1_] := N[(N[(N[(t1 * N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / -1.0), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{t1 \cdot \frac{v}{t1 + u}}{-1}}{t1 + u}
\end{array}
Initial program 74.7%
associate-/l*74.1%
distribute-lft-neg-out74.1%
distribute-rgt-neg-in74.1%
associate-/r*80.3%
distribute-neg-frac280.3%
Simplified80.3%
associate-*r/97.1%
neg-mul-197.1%
associate-/r*97.1%
Applied egg-rr97.1%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ v (+ t1 u))))
(if (<= t1 -8.8e+83)
(/ (- (* u (/ v t1)) v) (+ t1 u))
(if (<= t1 5.2e+163)
(* t1 (/ t_1 (- (- u) t1)))
(* t_1 (+ -1.0 (/ u t1)))))))
double code(double u, double v, double t1) {
double t_1 = v / (t1 + u);
double tmp;
if (t1 <= -8.8e+83) {
tmp = ((u * (v / t1)) - v) / (t1 + u);
} else if (t1 <= 5.2e+163) {
tmp = t1 * (t_1 / (-u - t1));
} else {
tmp = t_1 * (-1.0 + (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 = v / (t1 + u)
if (t1 <= (-8.8d+83)) then
tmp = ((u * (v / t1)) - v) / (t1 + u)
else if (t1 <= 5.2d+163) then
tmp = t1 * (t_1 / (-u - t1))
else
tmp = t_1 * ((-1.0d0) + (u / t1))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = v / (t1 + u);
double tmp;
if (t1 <= -8.8e+83) {
tmp = ((u * (v / t1)) - v) / (t1 + u);
} else if (t1 <= 5.2e+163) {
tmp = t1 * (t_1 / (-u - t1));
} else {
tmp = t_1 * (-1.0 + (u / t1));
}
return tmp;
}
def code(u, v, t1): t_1 = v / (t1 + u) tmp = 0 if t1 <= -8.8e+83: tmp = ((u * (v / t1)) - v) / (t1 + u) elif t1 <= 5.2e+163: tmp = t1 * (t_1 / (-u - t1)) else: tmp = t_1 * (-1.0 + (u / t1)) return tmp
function code(u, v, t1) t_1 = Float64(v / Float64(t1 + u)) tmp = 0.0 if (t1 <= -8.8e+83) tmp = Float64(Float64(Float64(u * Float64(v / t1)) - v) / Float64(t1 + u)); elseif (t1 <= 5.2e+163) tmp = Float64(t1 * Float64(t_1 / Float64(Float64(-u) - t1))); else tmp = Float64(t_1 * Float64(-1.0 + Float64(u / t1))); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = v / (t1 + u); tmp = 0.0; if (t1 <= -8.8e+83) tmp = ((u * (v / t1)) - v) / (t1 + u); elseif (t1 <= 5.2e+163) tmp = t1 * (t_1 / (-u - t1)); else tmp = t_1 * (-1.0 + (u / t1)); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -8.8e+83], N[(N[(N[(u * N[(v / t1), $MachinePrecision]), $MachinePrecision] - v), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 5.2e+163], N[(t1 * N[(t$95$1 / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(-1.0 + N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{v}{t1 + u}\\
\mathbf{if}\;t1 \leq -8.8 \cdot 10^{+83}:\\
\;\;\;\;\frac{u \cdot \frac{v}{t1} - v}{t1 + u}\\
\mathbf{elif}\;t1 \leq 5.2 \cdot 10^{+163}:\\
\;\;\;\;t1 \cdot \frac{t\_1}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(-1 + \frac{u}{t1}\right)\\
\end{array}
\end{array}
if t1 < -8.79999999999999995e83Initial program 55.4%
associate-/l*49.6%
distribute-lft-neg-out49.6%
distribute-rgt-neg-in49.6%
associate-/r*55.9%
distribute-neg-frac255.9%
Simplified55.9%
associate-*r/100.0%
neg-mul-1100.0%
associate-/r*100.0%
Applied egg-rr100.0%
Taylor expanded in t1 around inf 93.8%
+-commutative93.8%
mul-1-neg93.8%
sub-neg93.8%
associate-/l*96.2%
Simplified96.2%
if -8.79999999999999995e83 < t1 < 5.2000000000000003e163Initial program 82.7%
associate-/l*83.0%
distribute-lft-neg-out83.0%
distribute-rgt-neg-in83.0%
associate-/r*87.3%
distribute-neg-frac287.3%
Simplified87.3%
if 5.2000000000000003e163 < t1 Initial program 45.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 94.0%
Final simplification89.4%
(FPCore (u v t1)
:precision binary64
(if (<= t1 -2e-30)
(/ v (- (- u) t1))
(if (<= t1 4.6e-96)
(/ (/ (- t1) (/ u v)) u)
(/ (+ -1.0 (/ u t1)) (/ (+ t1 u) v)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -2e-30) {
tmp = v / (-u - t1);
} else if (t1 <= 4.6e-96) {
tmp = (-t1 / (u / v)) / u;
} else {
tmp = (-1.0 + (u / t1)) / ((t1 + u) / v);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (t1 <= (-2d-30)) then
tmp = v / (-u - t1)
else if (t1 <= 4.6d-96) then
tmp = (-t1 / (u / v)) / u
else
tmp = ((-1.0d0) + (u / t1)) / ((t1 + u) / v)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -2e-30) {
tmp = v / (-u - t1);
} else if (t1 <= 4.6e-96) {
tmp = (-t1 / (u / v)) / u;
} else {
tmp = (-1.0 + (u / t1)) / ((t1 + u) / v);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -2e-30: tmp = v / (-u - t1) elif t1 <= 4.6e-96: tmp = (-t1 / (u / v)) / u else: tmp = (-1.0 + (u / t1)) / ((t1 + u) / v) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -2e-30) tmp = Float64(v / Float64(Float64(-u) - t1)); elseif (t1 <= 4.6e-96) tmp = Float64(Float64(Float64(-t1) / Float64(u / v)) / u); else tmp = Float64(Float64(-1.0 + Float64(u / t1)) / Float64(Float64(t1 + u) / v)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -2e-30) tmp = v / (-u - t1); elseif (t1 <= 4.6e-96) tmp = (-t1 / (u / v)) / u; else tmp = (-1.0 + (u / t1)) / ((t1 + u) / v); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -2e-30], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 4.6e-96], N[(N[((-t1) / N[(u / v), $MachinePrecision]), $MachinePrecision] / u), $MachinePrecision], N[(N[(-1.0 + N[(u / t1), $MachinePrecision]), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] / v), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2 \cdot 10^{-30}:\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{elif}\;t1 \leq 4.6 \cdot 10^{-96}:\\
\;\;\;\;\frac{\frac{-t1}{\frac{u}{v}}}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1 + \frac{u}{t1}}{\frac{t1 + u}{v}}\\
\end{array}
\end{array}
if t1 < -2e-30Initial program 65.8%
associate-/l*64.8%
distribute-lft-neg-out64.8%
distribute-rgt-neg-in64.8%
associate-/r*70.1%
distribute-neg-frac270.1%
Simplified70.1%
associate-*r/100.0%
neg-mul-1100.0%
associate-/r*100.0%
Applied egg-rr100.0%
Taylor expanded in t1 around inf 87.0%
mul-1-neg87.0%
Simplified87.0%
if -2e-30 < t1 < 4.6e-96Initial program 82.5%
times-frac92.3%
distribute-frac-neg92.3%
distribute-neg-frac292.3%
+-commutative92.3%
distribute-neg-in92.3%
unsub-neg92.3%
Simplified92.3%
Taylor expanded in t1 around 0 79.2%
associate-*l/81.2%
frac-2neg81.2%
clear-num81.1%
un-div-inv81.9%
neg-sub081.9%
add-sqr-sqrt37.3%
sqrt-unprod81.9%
sqr-neg81.9%
sqrt-unprod44.5%
add-sqr-sqrt82.1%
add-sqr-sqrt36.1%
sqrt-unprod57.6%
sqr-neg57.6%
sqrt-unprod22.2%
add-sqr-sqrt39.9%
associate-+l-39.9%
neg-sub039.9%
add-sqr-sqrt17.7%
sqrt-unprod58.4%
sqr-neg58.4%
sqrt-unprod45.8%
add-sqr-sqrt82.1%
add-sqr-sqrt44.5%
sqrt-unprod81.9%
sqr-neg81.9%
Applied egg-rr81.9%
distribute-neg-frac81.9%
Simplified81.9%
Taylor expanded in t1 around 0 82.2%
if 4.6e-96 < t1 Initial program 71.0%
times-frac98.7%
distribute-frac-neg98.7%
distribute-neg-frac298.7%
+-commutative98.7%
distribute-neg-in98.7%
unsub-neg98.7%
Simplified98.7%
Taylor expanded in t1 around inf 81.2%
clear-num82.3%
un-div-inv82.3%
sub-neg82.3%
metadata-eval82.3%
Applied egg-rr82.3%
Final simplification83.5%
(FPCore (u v t1) :precision binary64 (if (<= t1 -4e-30) (/ v (- (- u) t1)) (if (<= t1 2.5e-96) (/ (/ (- t1) (/ u v)) u) (/ v (- u t1)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -4e-30) {
tmp = v / (-u - t1);
} else if (t1 <= 2.5e-96) {
tmp = (-t1 / (u / v)) / u;
} else {
tmp = v / (u - t1);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (t1 <= (-4d-30)) then
tmp = v / (-u - t1)
else if (t1 <= 2.5d-96) then
tmp = (-t1 / (u / v)) / u
else
tmp = v / (u - t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -4e-30) {
tmp = v / (-u - t1);
} else if (t1 <= 2.5e-96) {
tmp = (-t1 / (u / v)) / u;
} else {
tmp = v / (u - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -4e-30: tmp = v / (-u - t1) elif t1 <= 2.5e-96: tmp = (-t1 / (u / v)) / u else: tmp = v / (u - t1) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -4e-30) tmp = Float64(v / Float64(Float64(-u) - t1)); elseif (t1 <= 2.5e-96) tmp = Float64(Float64(Float64(-t1) / Float64(u / v)) / u); else tmp = Float64(v / Float64(u - t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -4e-30) tmp = v / (-u - t1); elseif (t1 <= 2.5e-96) tmp = (-t1 / (u / v)) / u; else tmp = v / (u - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -4e-30], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 2.5e-96], N[(N[((-t1) / N[(u / v), $MachinePrecision]), $MachinePrecision] / u), $MachinePrecision], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -4 \cdot 10^{-30}:\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{elif}\;t1 \leq 2.5 \cdot 10^{-96}:\\
\;\;\;\;\frac{\frac{-t1}{\frac{u}{v}}}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u - t1}\\
\end{array}
\end{array}
if t1 < -4e-30Initial program 65.8%
associate-/l*64.8%
distribute-lft-neg-out64.8%
distribute-rgt-neg-in64.8%
associate-/r*70.1%
distribute-neg-frac270.1%
Simplified70.1%
associate-*r/100.0%
neg-mul-1100.0%
associate-/r*100.0%
Applied egg-rr100.0%
Taylor expanded in t1 around inf 87.0%
mul-1-neg87.0%
Simplified87.0%
if -4e-30 < t1 < 2.49999999999999997e-96Initial program 82.5%
times-frac92.3%
distribute-frac-neg92.3%
distribute-neg-frac292.3%
+-commutative92.3%
distribute-neg-in92.3%
unsub-neg92.3%
Simplified92.3%
Taylor expanded in t1 around 0 79.2%
associate-*l/81.2%
frac-2neg81.2%
clear-num81.1%
un-div-inv81.9%
neg-sub081.9%
add-sqr-sqrt37.3%
sqrt-unprod81.9%
sqr-neg81.9%
sqrt-unprod44.5%
add-sqr-sqrt82.1%
add-sqr-sqrt36.1%
sqrt-unprod57.6%
sqr-neg57.6%
sqrt-unprod22.2%
add-sqr-sqrt39.9%
associate-+l-39.9%
neg-sub039.9%
add-sqr-sqrt17.7%
sqrt-unprod58.4%
sqr-neg58.4%
sqrt-unprod45.8%
add-sqr-sqrt82.1%
add-sqr-sqrt44.5%
sqrt-unprod81.9%
sqr-neg81.9%
Applied egg-rr81.9%
distribute-neg-frac81.9%
Simplified81.9%
Taylor expanded in t1 around 0 82.2%
if 2.49999999999999997e-96 < t1 Initial program 71.0%
associate-/l*72.1%
distribute-lft-neg-out72.1%
distribute-rgt-neg-in72.1%
associate-/r*80.2%
distribute-neg-frac280.2%
Simplified80.2%
associate-*r/98.7%
neg-mul-198.7%
associate-/r*98.7%
Applied egg-rr98.7%
Taylor expanded in t1 around inf 82.2%
mul-1-neg82.2%
Simplified82.2%
add-sqr-sqrt34.0%
sqrt-unprod86.1%
sqr-neg86.1%
sqrt-unprod48.5%
add-sqr-sqrt82.2%
sub-neg82.2%
Applied egg-rr82.2%
Final simplification83.5%
(FPCore (u v t1) :precision binary64 (if (<= t1 -6e-31) (/ v (- (- u) t1)) (if (<= t1 4.6e-96) (* (/ (- t1) u) (/ v u)) (/ v (- u t1)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -6e-31) {
tmp = v / (-u - t1);
} else if (t1 <= 4.6e-96) {
tmp = (-t1 / u) * (v / u);
} else {
tmp = v / (u - t1);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (t1 <= (-6d-31)) then
tmp = v / (-u - t1)
else if (t1 <= 4.6d-96) then
tmp = (-t1 / u) * (v / u)
else
tmp = v / (u - t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -6e-31) {
tmp = v / (-u - t1);
} else if (t1 <= 4.6e-96) {
tmp = (-t1 / u) * (v / u);
} else {
tmp = v / (u - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -6e-31: tmp = v / (-u - t1) elif t1 <= 4.6e-96: tmp = (-t1 / u) * (v / u) else: tmp = v / (u - t1) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -6e-31) tmp = Float64(v / Float64(Float64(-u) - t1)); elseif (t1 <= 4.6e-96) tmp = Float64(Float64(Float64(-t1) / u) * Float64(v / u)); else tmp = Float64(v / Float64(u - t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -6e-31) tmp = v / (-u - t1); elseif (t1 <= 4.6e-96) tmp = (-t1 / u) * (v / u); else tmp = v / (u - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -6e-31], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 4.6e-96], N[(N[((-t1) / u), $MachinePrecision] * N[(v / u), $MachinePrecision]), $MachinePrecision], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -6 \cdot 10^{-31}:\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{elif}\;t1 \leq 4.6 \cdot 10^{-96}:\\
\;\;\;\;\frac{-t1}{u} \cdot \frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u - t1}\\
\end{array}
\end{array}
if t1 < -5.99999999999999962e-31Initial program 65.8%
associate-/l*64.8%
distribute-lft-neg-out64.8%
distribute-rgt-neg-in64.8%
associate-/r*70.1%
distribute-neg-frac270.1%
Simplified70.1%
associate-*r/100.0%
neg-mul-1100.0%
associate-/r*100.0%
Applied egg-rr100.0%
Taylor expanded in t1 around inf 87.0%
mul-1-neg87.0%
Simplified87.0%
if -5.99999999999999962e-31 < t1 < 4.6e-96Initial program 82.5%
times-frac92.3%
distribute-frac-neg92.3%
distribute-neg-frac292.3%
+-commutative92.3%
distribute-neg-in92.3%
unsub-neg92.3%
Simplified92.3%
Taylor expanded in t1 around 0 79.2%
Taylor expanded in t1 around 0 79.5%
associate-*r/79.5%
mul-1-neg79.5%
Simplified79.5%
if 4.6e-96 < t1 Initial program 71.0%
associate-/l*72.1%
distribute-lft-neg-out72.1%
distribute-rgt-neg-in72.1%
associate-/r*80.2%
distribute-neg-frac280.2%
Simplified80.2%
associate-*r/98.7%
neg-mul-198.7%
associate-/r*98.7%
Applied egg-rr98.7%
Taylor expanded in t1 around inf 82.2%
mul-1-neg82.2%
Simplified82.2%
add-sqr-sqrt34.0%
sqrt-unprod86.1%
sqr-neg86.1%
sqrt-unprod48.5%
add-sqr-sqrt82.2%
sub-neg82.2%
Applied egg-rr82.2%
Final simplification82.3%
(FPCore (u v t1) :precision binary64 (if (<= t1 -8e-30) (/ v (- (- u) t1)) (if (<= t1 8.5e-94) (* t1 (/ (- v) (* u u))) (/ v (- u t1)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -8e-30) {
tmp = v / (-u - t1);
} else if (t1 <= 8.5e-94) {
tmp = t1 * (-v / (u * u));
} else {
tmp = v / (u - t1);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (t1 <= (-8d-30)) then
tmp = v / (-u - t1)
else if (t1 <= 8.5d-94) then
tmp = t1 * (-v / (u * u))
else
tmp = v / (u - t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -8e-30) {
tmp = v / (-u - t1);
} else if (t1 <= 8.5e-94) {
tmp = t1 * (-v / (u * u));
} else {
tmp = v / (u - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -8e-30: tmp = v / (-u - t1) elif t1 <= 8.5e-94: tmp = t1 * (-v / (u * u)) else: tmp = v / (u - t1) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -8e-30) tmp = Float64(v / Float64(Float64(-u) - t1)); elseif (t1 <= 8.5e-94) tmp = Float64(t1 * Float64(Float64(-v) / Float64(u * u))); else tmp = Float64(v / Float64(u - t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -8e-30) tmp = v / (-u - t1); elseif (t1 <= 8.5e-94) tmp = t1 * (-v / (u * u)); else tmp = v / (u - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -8e-30], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 8.5e-94], N[(t1 * N[((-v) / N[(u * u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -8 \cdot 10^{-30}:\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{elif}\;t1 \leq 8.5 \cdot 10^{-94}:\\
\;\;\;\;t1 \cdot \frac{-v}{u \cdot u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u - t1}\\
\end{array}
\end{array}
if t1 < -8.000000000000001e-30Initial program 65.8%
associate-/l*64.8%
distribute-lft-neg-out64.8%
distribute-rgt-neg-in64.8%
associate-/r*70.1%
distribute-neg-frac270.1%
Simplified70.1%
associate-*r/100.0%
neg-mul-1100.0%
associate-/r*100.0%
Applied egg-rr100.0%
Taylor expanded in t1 around inf 87.0%
mul-1-neg87.0%
Simplified87.0%
if -8.000000000000001e-30 < t1 < 8.50000000000000003e-94Initial program 82.5%
associate-/l*81.1%
Simplified81.1%
Taylor expanded in t1 around 0 72.6%
Taylor expanded in t1 around 0 72.9%
if 8.50000000000000003e-94 < t1 Initial program 71.0%
associate-/l*72.1%
distribute-lft-neg-out72.1%
distribute-rgt-neg-in72.1%
associate-/r*80.2%
distribute-neg-frac280.2%
Simplified80.2%
associate-*r/98.7%
neg-mul-198.7%
associate-/r*98.7%
Applied egg-rr98.7%
Taylor expanded in t1 around inf 82.2%
mul-1-neg82.2%
Simplified82.2%
add-sqr-sqrt34.0%
sqrt-unprod86.1%
sqr-neg86.1%
sqrt-unprod48.5%
add-sqr-sqrt82.2%
sub-neg82.2%
Applied egg-rr82.2%
Final simplification79.4%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.15e+54) (not (<= u 2.35e+67))) (/ t1 (* u (/ u v))) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.15e+54) || !(u <= 2.35e+67)) {
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.15d+54)) .or. (.not. (u <= 2.35d+67))) 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.15e+54) || !(u <= 2.35e+67)) {
tmp = t1 / (u * (u / v));
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.15e+54) or not (u <= 2.35e+67): tmp = t1 / (u * (u / v)) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.15e+54) || !(u <= 2.35e+67)) tmp = Float64(t1 / Float64(u * Float64(u / v))); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -1.15e+54) || ~((u <= 2.35e+67))) tmp = t1 / (u * (u / v)); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.15e+54], N[Not[LessEqual[u, 2.35e+67]], $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.15 \cdot 10^{+54} \lor \neg \left(u \leq 2.35 \cdot 10^{+67}\right):\\
\;\;\;\;\frac{t1}{u \cdot \frac{u}{v}}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -1.14999999999999997e54 or 2.35000000000000009e67 < u Initial program 78.3%
times-frac97.1%
distribute-frac-neg97.1%
distribute-neg-frac297.1%
+-commutative97.1%
distribute-neg-in97.1%
unsub-neg97.1%
Simplified97.1%
Taylor expanded in t1 around 0 85.2%
Taylor expanded in t1 around 0 85.2%
associate-*r/85.2%
mul-1-neg85.2%
Simplified85.2%
*-commutative85.2%
clear-num85.2%
frac-times82.4%
*-un-lft-identity82.4%
add-sqr-sqrt42.3%
sqrt-unprod65.4%
sqr-neg65.4%
sqrt-unprod37.0%
add-sqr-sqrt70.5%
Applied egg-rr70.5%
if -1.14999999999999997e54 < u < 2.35000000000000009e67Initial program 72.5%
associate-/l*71.4%
distribute-lft-neg-out71.4%
distribute-rgt-neg-in71.4%
associate-/r*77.6%
distribute-neg-frac277.6%
Simplified77.6%
Taylor expanded in t1 around inf 70.2%
associate-*r/70.2%
neg-mul-170.2%
Simplified70.2%
Final simplification70.3%
(FPCore (u v t1) :precision binary64 (if (or (<= u -2.3e+148) (not (<= u 3.2e+71))) (* (/ v u) -0.5) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -2.3e+148) || !(u <= 3.2e+71)) {
tmp = (v / u) * -0.5;
} 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.3d+148)) .or. (.not. (u <= 3.2d+71))) then
tmp = (v / u) * (-0.5d0)
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.3e+148) || !(u <= 3.2e+71)) {
tmp = (v / u) * -0.5;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -2.3e+148) or not (u <= 3.2e+71): tmp = (v / u) * -0.5 else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -2.3e+148) || !(u <= 3.2e+71)) tmp = Float64(Float64(v / u) * -0.5); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -2.3e+148) || ~((u <= 3.2e+71))) tmp = (v / u) * -0.5; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -2.3e+148], N[Not[LessEqual[u, 3.2e+71]], $MachinePrecision]], N[(N[(v / u), $MachinePrecision] * -0.5), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.3 \cdot 10^{+148} \lor \neg \left(u \leq 3.2 \cdot 10^{+71}\right):\\
\;\;\;\;\frac{v}{u} \cdot -0.5\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -2.3000000000000001e148 or 3.20000000000000023e71 < u Initial program 77.3%
Taylor expanded in t1 around 0 65.4%
+-commutative65.4%
unpow265.4%
associate-*r*65.4%
distribute-rgt-in77.3%
*-commutative77.3%
Simplified77.3%
Taylor expanded in t1 around inf 37.7%
*-commutative37.7%
Simplified37.7%
if -2.3000000000000001e148 < u < 3.20000000000000023e71Initial program 73.5%
associate-/l*72.5%
distribute-lft-neg-out72.5%
distribute-rgt-neg-in72.5%
associate-/r*78.7%
distribute-neg-frac278.7%
Simplified78.7%
Taylor expanded in t1 around inf 67.0%
associate-*r/67.0%
neg-mul-167.0%
Simplified67.0%
Final simplification58.0%
(FPCore (u v t1) :precision binary64 (if (<= u -2.2e+54) (/ 1.0 (/ u v)) (if (<= u 3.2e+71) (/ v (- t1)) (* (/ v u) -0.5))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -2.2e+54) {
tmp = 1.0 / (u / v);
} else if (u <= 3.2e+71) {
tmp = v / -t1;
} else {
tmp = (v / u) * -0.5;
}
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+54)) then
tmp = 1.0d0 / (u / v)
else if (u <= 3.2d+71) then
tmp = v / -t1
else
tmp = (v / u) * (-0.5d0)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -2.2e+54) {
tmp = 1.0 / (u / v);
} else if (u <= 3.2e+71) {
tmp = v / -t1;
} else {
tmp = (v / u) * -0.5;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -2.2e+54: tmp = 1.0 / (u / v) elif u <= 3.2e+71: tmp = v / -t1 else: tmp = (v / u) * -0.5 return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -2.2e+54) tmp = Float64(1.0 / Float64(u / v)); elseif (u <= 3.2e+71) tmp = Float64(v / Float64(-t1)); else tmp = Float64(Float64(v / u) * -0.5); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -2.2e+54) tmp = 1.0 / (u / v); elseif (u <= 3.2e+71) tmp = v / -t1; else tmp = (v / u) * -0.5; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -2.2e+54], N[(1.0 / N[(u / v), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 3.2e+71], N[(v / (-t1)), $MachinePrecision], N[(N[(v / u), $MachinePrecision] * -0.5), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.2 \cdot 10^{+54}:\\
\;\;\;\;\frac{1}{\frac{u}{v}}\\
\mathbf{elif}\;u \leq 3.2 \cdot 10^{+71}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u} \cdot -0.5\\
\end{array}
\end{array}
if u < -2.1999999999999999e54Initial program 80.8%
associate-/l*81.1%
Simplified81.1%
Taylor expanded in t1 around 0 80.9%
Taylor expanded in t1 around inf 37.4%
associate-*r/37.4%
mul-1-neg37.4%
Simplified37.4%
add-sqr-sqrt18.1%
sqrt-unprod38.5%
sqr-neg38.5%
sqrt-unprod19.0%
add-sqr-sqrt37.4%
clear-num39.4%
inv-pow39.4%
Applied egg-rr39.4%
unpow-139.4%
Simplified39.4%
if -2.1999999999999999e54 < u < 3.20000000000000023e71Initial program 72.5%
associate-/l*71.4%
distribute-lft-neg-out71.4%
distribute-rgt-neg-in71.4%
associate-/r*77.6%
distribute-neg-frac277.6%
Simplified77.6%
Taylor expanded in t1 around inf 70.2%
associate-*r/70.2%
neg-mul-170.2%
Simplified70.2%
if 3.20000000000000023e71 < u Initial program 76.1%
Taylor expanded in t1 around 0 67.5%
+-commutative67.5%
unpow267.5%
associate-*r*67.5%
distribute-rgt-in76.1%
*-commutative76.1%
Simplified76.1%
Taylor expanded in t1 around inf 36.6%
*-commutative36.6%
Simplified36.6%
Final simplification58.1%
(FPCore (u v t1) :precision binary64 (if (or (<= u -9.4e+148) (not (<= u 1.85e+71))) (/ (- v) u) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -9.4e+148) || !(u <= 1.85e+71)) {
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 <= (-9.4d+148)) .or. (.not. (u <= 1.85d+71))) 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 <= -9.4e+148) || !(u <= 1.85e+71)) {
tmp = -v / u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -9.4e+148) or not (u <= 1.85e+71): tmp = -v / u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -9.4e+148) || !(u <= 1.85e+71)) tmp = Float64(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 <= -9.4e+148) || ~((u <= 1.85e+71))) tmp = -v / u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -9.4e+148], N[Not[LessEqual[u, 1.85e+71]], $MachinePrecision]], N[((-v) / u), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -9.4 \cdot 10^{+148} \lor \neg \left(u \leq 1.85 \cdot 10^{+71}\right):\\
\;\;\;\;\frac{-v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -9.3999999999999994e148 or 1.85e71 < u Initial program 77.3%
associate-/l*77.8%
Simplified77.8%
Taylor expanded in t1 around 0 77.8%
Taylor expanded in t1 around inf 37.6%
associate-*r/37.6%
mul-1-neg37.6%
Simplified37.6%
if -9.3999999999999994e148 < u < 1.85e71Initial program 73.5%
associate-/l*72.5%
distribute-lft-neg-out72.5%
distribute-rgt-neg-in72.5%
associate-/r*78.7%
distribute-neg-frac278.7%
Simplified78.7%
Taylor expanded in t1 around inf 67.0%
associate-*r/67.0%
neg-mul-167.0%
Simplified67.0%
Final simplification57.9%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.9e+150) (not (<= u 4.5e+62))) (/ v u) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.9e+150) || !(u <= 4.5e+62)) {
tmp = v / u;
} else {
tmp = v / -t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-1.9d+150)) .or. (.not. (u <= 4.5d+62))) then
tmp = v / u
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.9e+150) || !(u <= 4.5e+62)) {
tmp = v / u;
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.9e+150) or not (u <= 4.5e+62): tmp = v / u else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.9e+150) || !(u <= 4.5e+62)) tmp = Float64(v / u); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -1.9e+150) || ~((u <= 4.5e+62))) tmp = v / u; else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.9e+150], N[Not[LessEqual[u, 4.5e+62]], $MachinePrecision]], N[(v / u), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.9 \cdot 10^{+150} \lor \neg \left(u \leq 4.5 \cdot 10^{+62}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -1.89999999999999995e150 or 4.49999999999999999e62 < u Initial program 77.9%
associate-/l*78.3%
distribute-lft-neg-out78.3%
distribute-rgt-neg-in78.3%
associate-/r*84.2%
distribute-neg-frac284.2%
Simplified84.2%
associate-*r/99.9%
neg-mul-199.9%
associate-/r*99.9%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 44.2%
mul-1-neg44.2%
Simplified44.2%
div-inv44.2%
add-sqr-sqrt20.6%
sqrt-unprod40.0%
sqr-neg40.0%
sqrt-unprod20.0%
add-sqr-sqrt36.6%
Applied egg-rr36.6%
Taylor expanded in t1 around 0 36.6%
if -1.89999999999999995e150 < u < 4.49999999999999999e62Initial program 73.2%
associate-/l*72.2%
distribute-lft-neg-out72.2%
distribute-rgt-neg-in72.2%
associate-/r*78.5%
distribute-neg-frac278.5%
Simplified78.5%
Taylor expanded in t1 around inf 67.7%
associate-*r/67.7%
neg-mul-167.7%
Simplified67.7%
Final simplification57.9%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -2.6e+114) (not (<= t1 1.25e+100))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -2.6e+114) || !(t1 <= 1.25e+100)) {
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 <= (-2.6d+114)) .or. (.not. (t1 <= 1.25d+100))) 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 <= -2.6e+114) || !(t1 <= 1.25e+100)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -2.6e+114) or not (t1 <= 1.25e+100): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -2.6e+114) || !(t1 <= 1.25e+100)) 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 <= -2.6e+114) || ~((t1 <= 1.25e+100))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -2.6e+114], N[Not[LessEqual[t1, 1.25e+100]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2.6 \cdot 10^{+114} \lor \neg \left(t1 \leq 1.25 \cdot 10^{+100}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -2.6e114 or 1.25e100 < t1 Initial program 54.8%
associate-/l*51.0%
distribute-lft-neg-out51.0%
distribute-rgt-neg-in51.0%
associate-/r*62.1%
distribute-neg-frac262.1%
Simplified62.1%
Taylor expanded in t1 around inf 85.9%
associate-*r/85.9%
neg-mul-185.9%
Simplified85.9%
*-un-lft-identity85.9%
*-commutative85.9%
add-sqr-sqrt40.8%
sqrt-unprod51.8%
sqr-neg51.8%
sqrt-unprod17.2%
add-sqr-sqrt36.4%
Applied egg-rr36.4%
*-rgt-identity36.4%
Simplified36.4%
if -2.6e114 < t1 < 1.25e100Initial program 83.2%
associate-/l*84.1%
distribute-lft-neg-out84.1%
distribute-rgt-neg-in84.1%
associate-/r*88.1%
distribute-neg-frac288.1%
Simplified88.1%
associate-*r/95.9%
neg-mul-195.9%
associate-/r*95.9%
Applied egg-rr95.9%
Taylor expanded in t1 around inf 48.0%
mul-1-neg48.0%
Simplified48.0%
div-inv47.9%
add-sqr-sqrt19.2%
sqrt-unprod25.1%
sqr-neg25.1%
sqrt-unprod10.7%
add-sqr-sqrt18.9%
Applied egg-rr18.9%
Taylor expanded in t1 around 0 19.2%
Final simplification24.4%
(FPCore (u v t1) :precision binary64 (/ (* v (/ t1 (- (- u) t1))) (+ t1 u)))
double code(double u, double v, double t1) {
return (v * (t1 / (-u - t1))) / (t1 + u);
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (v * (t1 / (-u - t1))) / (t1 + u)
end function
public static double code(double u, double v, double t1) {
return (v * (t1 / (-u - t1))) / (t1 + u);
}
def code(u, v, t1): return (v * (t1 / (-u - t1))) / (t1 + u)
function code(u, v, t1) return Float64(Float64(v * Float64(t1 / Float64(Float64(-u) - t1))) / Float64(t1 + u)) end
function tmp = code(u, v, t1) tmp = (v * (t1 / (-u - t1))) / (t1 + u); end
code[u_, v_, t1_] := N[(N[(v * N[(t1 / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{v \cdot \frac{t1}{\left(-u\right) - t1}}{t1 + u}
\end{array}
Initial program 74.7%
associate-/l*74.1%
distribute-lft-neg-out74.1%
distribute-rgt-neg-in74.1%
associate-/r*80.3%
distribute-neg-frac280.3%
Simplified80.3%
distribute-frac-neg280.3%
associate-/r*74.1%
distribute-rgt-neg-in74.1%
distribute-lft-neg-out74.1%
associate-*r/74.7%
times-frac96.2%
frac-2neg96.2%
associate-*r/97.1%
add-sqr-sqrt48.7%
sqrt-unprod45.5%
sqr-neg45.5%
sqrt-unprod19.2%
add-sqr-sqrt36.1%
add-sqr-sqrt17.6%
sqrt-unprod56.8%
sqr-neg56.8%
sqrt-prod48.5%
add-sqr-sqrt97.1%
Applied egg-rr97.1%
Final simplification97.1%
(FPCore (u v t1) :precision binary64 (* (/ v (+ t1 u)) (/ t1 (- (- u) t1))))
double code(double u, double v, double t1) {
return (v / (t1 + u)) * (t1 / (-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 / (t1 + u)) * (t1 / (-u - t1))
end function
public static double code(double u, double v, double t1) {
return (v / (t1 + u)) * (t1 / (-u - t1));
}
def code(u, v, t1): return (v / (t1 + u)) * (t1 / (-u - t1))
function code(u, v, t1) return Float64(Float64(v / Float64(t1 + u)) * Float64(t1 / Float64(Float64(-u) - t1))) end
function tmp = code(u, v, t1) tmp = (v / (t1 + u)) * (t1 / (-u - t1)); end
code[u_, v_, t1_] := N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(t1 / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{t1 + u} \cdot \frac{t1}{\left(-u\right) - t1}
\end{array}
Initial program 74.7%
times-frac96.2%
distribute-frac-neg96.2%
distribute-neg-frac296.2%
+-commutative96.2%
distribute-neg-in96.2%
unsub-neg96.2%
Simplified96.2%
Final simplification96.2%
(FPCore (u v t1) :precision binary64 (if (<= v 1.4e+74) (/ v (- (- u) t1)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if (v <= 1.4e+74) {
tmp = v / (-u - t1);
} else {
tmp = v / -t1;
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (v <= 1.4d+74) then
tmp = v / (-u - t1)
else
tmp = v / -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (v <= 1.4e+74) {
tmp = v / (-u - t1);
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if v <= 1.4e+74: tmp = v / (-u - t1) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if (v <= 1.4e+74) tmp = Float64(v / Float64(Float64(-u) - t1)); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (v <= 1.4e+74) tmp = v / (-u - t1); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[v, 1.4e+74], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;v \leq 1.4 \cdot 10^{+74}:\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if v < 1.40000000000000001e74Initial program 74.9%
associate-/l*75.3%
distribute-lft-neg-out75.3%
distribute-rgt-neg-in75.3%
associate-/r*80.9%
distribute-neg-frac280.9%
Simplified80.9%
associate-*r/97.4%
neg-mul-197.4%
associate-/r*97.4%
Applied egg-rr97.4%
Taylor expanded in t1 around inf 62.1%
mul-1-neg62.1%
Simplified62.1%
if 1.40000000000000001e74 < v Initial program 74.0%
associate-/l*69.1%
distribute-lft-neg-out69.1%
distribute-rgt-neg-in69.1%
associate-/r*77.5%
distribute-neg-frac277.5%
Simplified77.5%
Taylor expanded in t1 around inf 54.9%
associate-*r/54.9%
neg-mul-154.9%
Simplified54.9%
Final simplification60.7%
(FPCore (u v t1) :precision binary64 (/ v (- u t1)))
double code(double u, double v, double t1) {
return v / (u - t1);
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = v / (u - t1)
end function
public static double code(double u, double v, double t1) {
return v / (u - t1);
}
def code(u, v, t1): return v / (u - t1)
function code(u, v, t1) return Float64(v / Float64(u - t1)) end
function tmp = code(u, v, t1) tmp = v / (u - t1); end
code[u_, v_, t1_] := N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{v}{u - t1}
\end{array}
Initial program 74.7%
associate-/l*74.1%
distribute-lft-neg-out74.1%
distribute-rgt-neg-in74.1%
associate-/r*80.3%
distribute-neg-frac280.3%
Simplified80.3%
associate-*r/97.1%
neg-mul-197.1%
associate-/r*97.1%
Applied egg-rr97.1%
Taylor expanded in t1 around inf 59.9%
mul-1-neg59.9%
Simplified59.9%
add-sqr-sqrt27.5%
sqrt-unprod68.5%
sqr-neg68.5%
sqrt-unprod32.7%
add-sqr-sqrt60.7%
sub-neg60.7%
Applied egg-rr60.7%
Final simplification60.7%
(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 74.7%
associate-/l*74.1%
distribute-lft-neg-out74.1%
distribute-rgt-neg-in74.1%
associate-/r*80.3%
distribute-neg-frac280.3%
Simplified80.3%
Taylor expanded in t1 around inf 52.6%
associate-*r/52.6%
neg-mul-152.6%
Simplified52.6%
*-un-lft-identity52.6%
*-commutative52.6%
add-sqr-sqrt22.6%
sqrt-unprod30.1%
sqr-neg30.1%
sqrt-unprod6.9%
add-sqr-sqrt13.3%
Applied egg-rr13.3%
*-rgt-identity13.3%
Simplified13.3%
herbie shell --seed 2024141
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))