
(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 15 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 (- (- u) t1))) (+ t1 u)))
double code(double u, double v, double t1) {
return (t1 * (v / (-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 = (t1 * (v / (-u - t1))) / (t1 + u)
end function
public static double code(double u, double v, double t1) {
return (t1 * (v / (-u - t1))) / (t1 + u);
}
def code(u, v, t1): return (t1 * (v / (-u - t1))) / (t1 + u)
function code(u, v, t1) return Float64(Float64(t1 * Float64(v / Float64(Float64(-u) - t1))) / Float64(t1 + u)) end
function tmp = code(u, v, t1) tmp = (t1 * (v / (-u - t1))) / (t1 + u); end
code[u_, v_, t1_] := N[(N[(t1 * N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{t1 \cdot \frac{v}{\left(-u\right) - t1}}{t1 + u}
\end{array}
Initial program 72.5%
associate-/l*72.4%
distribute-lft-neg-out72.4%
distribute-rgt-neg-in72.4%
associate-/r*84.6%
distribute-neg-frac284.6%
Simplified84.6%
associate-*r/99.1%
neg-mul-199.1%
associate-/r*99.1%
Applied egg-rr99.1%
frac-2neg99.1%
metadata-eval99.1%
/-rgt-identity99.1%
*-commutative99.1%
distribute-rgt-neg-in99.1%
Applied egg-rr99.1%
Final simplification99.1%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (- (- u) t1)) (t_2 (/ v (+ t1 u))))
(if (<= t1 -2.3e+113)
(* t_2 (+ (/ u t1) -1.0))
(if (<= t1 1.6e+160) (* t1 (/ t_2 t_1)) (/ v t_1)))))
double code(double u, double v, double t1) {
double t_1 = -u - t1;
double t_2 = v / (t1 + u);
double tmp;
if (t1 <= -2.3e+113) {
tmp = t_2 * ((u / t1) + -1.0);
} else if (t1 <= 1.6e+160) {
tmp = t1 * (t_2 / t_1);
} 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 + u)
if (t1 <= (-2.3d+113)) then
tmp = t_2 * ((u / t1) + (-1.0d0))
else if (t1 <= 1.6d+160) then
tmp = t1 * (t_2 / t_1)
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 + u);
double tmp;
if (t1 <= -2.3e+113) {
tmp = t_2 * ((u / t1) + -1.0);
} else if (t1 <= 1.6e+160) {
tmp = t1 * (t_2 / t_1);
} else {
tmp = v / t_1;
}
return tmp;
}
def code(u, v, t1): t_1 = -u - t1 t_2 = v / (t1 + u) tmp = 0 if t1 <= -2.3e+113: tmp = t_2 * ((u / t1) + -1.0) elif t1 <= 1.6e+160: tmp = t1 * (t_2 / t_1) else: tmp = v / t_1 return tmp
function code(u, v, t1) t_1 = Float64(Float64(-u) - t1) t_2 = Float64(v / Float64(t1 + u)) tmp = 0.0 if (t1 <= -2.3e+113) tmp = Float64(t_2 * Float64(Float64(u / t1) + -1.0)); elseif (t1 <= 1.6e+160) tmp = Float64(t1 * Float64(t_2 / t_1)); 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 + u); tmp = 0.0; if (t1 <= -2.3e+113) tmp = t_2 * ((u / t1) + -1.0); elseif (t1 <= 1.6e+160) tmp = t1 * (t_2 / t_1); 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 + u), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -2.3e+113], N[(t$95$2 * N[(N[(u / t1), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 1.6e+160], N[(t1 * N[(t$95$2 / t$95$1), $MachinePrecision]), $MachinePrecision], N[(v / t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-u\right) - t1\\
t_2 := \frac{v}{t1 + u}\\
\mathbf{if}\;t1 \leq -2.3 \cdot 10^{+113}:\\
\;\;\;\;t\_2 \cdot \left(\frac{u}{t1} + -1\right)\\
\mathbf{elif}\;t1 \leq 1.6 \cdot 10^{+160}:\\
\;\;\;\;t1 \cdot \frac{t\_2}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{t\_1}\\
\end{array}
\end{array}
if t1 < -2.29999999999999997e113Initial program 51.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 95.5%
if -2.29999999999999997e113 < t1 < 1.5999999999999999e160Initial program 80.5%
associate-/l*81.2%
distribute-lft-neg-out81.2%
distribute-rgt-neg-in81.2%
associate-/r*90.2%
distribute-neg-frac290.2%
Simplified90.2%
if 1.5999999999999999e160 < t1 Initial program 52.7%
associate-/l*53.8%
distribute-lft-neg-out53.8%
distribute-rgt-neg-in53.8%
associate-/r*69.1%
distribute-neg-frac269.1%
Simplified69.1%
associate-*r/99.9%
neg-mul-199.9%
associate-/r*99.9%
Applied egg-rr99.9%
frac-2neg99.9%
metadata-eval99.9%
/-rgt-identity99.9%
*-commutative99.9%
distribute-rgt-neg-in99.9%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 96.7%
neg-mul-196.7%
Simplified96.7%
Final simplification91.8%
(FPCore (u v t1) :precision binary64 (if (<= u -3.1e-5) (* t1 (/ (/ v (+ t1 u)) (- u))) (if (<= u 2.25e-24) (- (/ v t1)) (/ (* t1 (/ v (- u))) (+ t1 u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -3.1e-5) {
tmp = t1 * ((v / (t1 + u)) / -u);
} else if (u <= 2.25e-24) {
tmp = -(v / t1);
} else {
tmp = (t1 * (v / -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 <= (-3.1d-5)) then
tmp = t1 * ((v / (t1 + u)) / -u)
else if (u <= 2.25d-24) then
tmp = -(v / t1)
else
tmp = (t1 * (v / -u)) / (t1 + u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -3.1e-5) {
tmp = t1 * ((v / (t1 + u)) / -u);
} else if (u <= 2.25e-24) {
tmp = -(v / t1);
} else {
tmp = (t1 * (v / -u)) / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -3.1e-5: tmp = t1 * ((v / (t1 + u)) / -u) elif u <= 2.25e-24: tmp = -(v / t1) else: tmp = (t1 * (v / -u)) / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -3.1e-5) tmp = Float64(t1 * Float64(Float64(v / Float64(t1 + u)) / Float64(-u))); elseif (u <= 2.25e-24) tmp = Float64(-Float64(v / t1)); else tmp = Float64(Float64(t1 * Float64(v / Float64(-u))) / Float64(t1 + u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -3.1e-5) tmp = t1 * ((v / (t1 + u)) / -u); elseif (u <= 2.25e-24) tmp = -(v / t1); else tmp = (t1 * (v / -u)) / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -3.1e-5], N[(t1 * N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 2.25e-24], (-N[(v / t1), $MachinePrecision]), N[(N[(t1 * N[(v / (-u)), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.1 \cdot 10^{-5}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{t1 + u}}{-u}\\
\mathbf{elif}\;u \leq 2.25 \cdot 10^{-24}:\\
\;\;\;\;-\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{-u}}{t1 + u}\\
\end{array}
\end{array}
if u < -3.10000000000000014e-5Initial program 79.2%
associate-/l*79.6%
distribute-lft-neg-out79.6%
distribute-rgt-neg-in79.6%
associate-/r*92.7%
distribute-neg-frac292.7%
Simplified92.7%
Taylor expanded in t1 around 0 85.7%
mul-1-neg85.7%
Simplified85.7%
if -3.10000000000000014e-5 < u < 2.2499999999999999e-24Initial program 67.3%
associate-/l*66.4%
distribute-lft-neg-out66.4%
distribute-rgt-neg-in66.4%
associate-/r*77.7%
distribute-neg-frac277.7%
Simplified77.7%
Taylor expanded in t1 around inf 86.5%
associate-*r/86.5%
neg-mul-186.5%
Simplified86.5%
if 2.2499999999999999e-24 < u Initial program 74.6%
associate-/l*75.5%
distribute-lft-neg-out75.5%
distribute-rgt-neg-in75.5%
associate-/r*88.2%
distribute-neg-frac288.2%
Simplified88.2%
Taylor expanded in t1 around 0 75.5%
mul-1-neg75.5%
Simplified75.5%
Taylor expanded in v around 0 68.0%
mul-1-neg68.0%
associate-/r*74.0%
distribute-neg-frac74.0%
associate-/l*76.9%
distribute-rgt-neg-in76.9%
mul-1-neg76.9%
associate-*r/76.9%
mul-1-neg76.9%
Simplified76.9%
Final simplification83.5%
(FPCore (u v t1) :precision binary64 (if (<= u -5e-7) (* t1 (/ (/ v (+ t1 u)) (- u))) (if (<= u 2.3e-24) (- (/ v t1)) (/ (* t1 (/ v u)) (- t1 u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -5e-7) {
tmp = t1 * ((v / (t1 + u)) / -u);
} else if (u <= 2.3e-24) {
tmp = -(v / t1);
} else {
tmp = (t1 * (v / 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 <= (-5d-7)) then
tmp = t1 * ((v / (t1 + u)) / -u)
else if (u <= 2.3d-24) then
tmp = -(v / t1)
else
tmp = (t1 * (v / u)) / (t1 - u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -5e-7) {
tmp = t1 * ((v / (t1 + u)) / -u);
} else if (u <= 2.3e-24) {
tmp = -(v / t1);
} else {
tmp = (t1 * (v / u)) / (t1 - u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -5e-7: tmp = t1 * ((v / (t1 + u)) / -u) elif u <= 2.3e-24: tmp = -(v / t1) else: tmp = (t1 * (v / u)) / (t1 - u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -5e-7) tmp = Float64(t1 * Float64(Float64(v / Float64(t1 + u)) / Float64(-u))); elseif (u <= 2.3e-24) tmp = Float64(-Float64(v / t1)); else tmp = Float64(Float64(t1 * Float64(v / u)) / Float64(t1 - u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -5e-7) tmp = t1 * ((v / (t1 + u)) / -u); elseif (u <= 2.3e-24) tmp = -(v / t1); else tmp = (t1 * (v / u)) / (t1 - u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -5e-7], N[(t1 * N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / (-u)), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 2.3e-24], (-N[(v / t1), $MachinePrecision]), N[(N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision] / N[(t1 - u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -5 \cdot 10^{-7}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{t1 + u}}{-u}\\
\mathbf{elif}\;u \leq 2.3 \cdot 10^{-24}:\\
\;\;\;\;-\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{u}}{t1 - u}\\
\end{array}
\end{array}
if u < -4.99999999999999977e-7Initial program 79.2%
associate-/l*79.6%
distribute-lft-neg-out79.6%
distribute-rgt-neg-in79.6%
associate-/r*92.7%
distribute-neg-frac292.7%
Simplified92.7%
Taylor expanded in t1 around 0 85.7%
mul-1-neg85.7%
Simplified85.7%
if -4.99999999999999977e-7 < u < 2.3000000000000001e-24Initial program 67.3%
associate-/l*66.4%
distribute-lft-neg-out66.4%
distribute-rgt-neg-in66.4%
associate-/r*77.7%
distribute-neg-frac277.7%
Simplified77.7%
Taylor expanded in t1 around inf 86.5%
associate-*r/86.5%
neg-mul-186.5%
Simplified86.5%
if 2.3000000000000001e-24 < u Initial program 74.6%
associate-/l*75.5%
distribute-lft-neg-out75.5%
distribute-rgt-neg-in75.5%
associate-/r*88.2%
distribute-neg-frac288.2%
Simplified88.2%
Taylor expanded in t1 around 0 75.5%
mul-1-neg75.5%
Simplified75.5%
associate-*r/78.2%
distribute-frac-neg278.2%
add-sqr-sqrt78.2%
sqrt-unprod70.1%
sqr-neg70.1%
sqrt-unprod0.0%
add-sqr-sqrt52.8%
associate-*r/53.4%
clear-num53.5%
un-div-inv53.5%
associate-/r/53.5%
add-sqr-sqrt0.0%
sqrt-unprod69.9%
sqr-neg69.9%
sqrt-unprod75.5%
add-sqr-sqrt75.5%
Applied egg-rr75.5%
distribute-neg-frac275.5%
*-commutative75.5%
distribute-rgt-neg-in75.5%
Simplified75.5%
associate-/r*74.8%
div-inv74.8%
distribute-neg-frac274.8%
clear-num74.8%
times-frac68.0%
associate-/l/74.0%
frac-2neg74.0%
div-inv73.9%
Applied egg-rr74.3%
associate-*r/74.4%
*-rgt-identity74.4%
associate-*r/74.1%
associate-*l/76.9%
*-commutative76.9%
Simplified76.9%
Final simplification83.5%
(FPCore (u v t1) :precision binary64 (if (<= u -2.85e-5) (* t1 (/ (/ v (- u)) u)) (if (<= u 1.55e-24) (- (/ v t1)) (/ (* t1 (/ v u)) (- t1 u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -2.85e-5) {
tmp = t1 * ((v / -u) / u);
} else if (u <= 1.55e-24) {
tmp = -(v / t1);
} else {
tmp = (t1 * (v / 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 <= (-2.85d-5)) then
tmp = t1 * ((v / -u) / u)
else if (u <= 1.55d-24) then
tmp = -(v / t1)
else
tmp = (t1 * (v / u)) / (t1 - u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -2.85e-5) {
tmp = t1 * ((v / -u) / u);
} else if (u <= 1.55e-24) {
tmp = -(v / t1);
} else {
tmp = (t1 * (v / u)) / (t1 - u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -2.85e-5: tmp = t1 * ((v / -u) / u) elif u <= 1.55e-24: tmp = -(v / t1) else: tmp = (t1 * (v / u)) / (t1 - u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -2.85e-5) tmp = Float64(t1 * Float64(Float64(v / Float64(-u)) / u)); elseif (u <= 1.55e-24) tmp = Float64(-Float64(v / t1)); else tmp = Float64(Float64(t1 * Float64(v / u)) / Float64(t1 - u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -2.85e-5) tmp = t1 * ((v / -u) / u); elseif (u <= 1.55e-24) tmp = -(v / t1); else tmp = (t1 * (v / u)) / (t1 - u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -2.85e-5], N[(t1 * N[(N[(v / (-u)), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 1.55e-24], (-N[(v / t1), $MachinePrecision]), N[(N[(t1 * N[(v / u), $MachinePrecision]), $MachinePrecision] / N[(t1 - u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -2.85 \cdot 10^{-5}:\\
\;\;\;\;t1 \cdot \frac{\frac{v}{-u}}{u}\\
\mathbf{elif}\;u \leq 1.55 \cdot 10^{-24}:\\
\;\;\;\;-\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1 \cdot \frac{v}{u}}{t1 - u}\\
\end{array}
\end{array}
if u < -2.8500000000000002e-5Initial program 79.2%
associate-/l*79.6%
distribute-lft-neg-out79.6%
distribute-rgt-neg-in79.6%
associate-/r*92.7%
distribute-neg-frac292.7%
Simplified92.7%
Taylor expanded in t1 around 0 85.7%
mul-1-neg85.7%
Simplified85.7%
Taylor expanded in t1 around 0 85.7%
if -2.8500000000000002e-5 < u < 1.55e-24Initial program 67.3%
associate-/l*66.4%
distribute-lft-neg-out66.4%
distribute-rgt-neg-in66.4%
associate-/r*77.7%
distribute-neg-frac277.7%
Simplified77.7%
Taylor expanded in t1 around inf 86.5%
associate-*r/86.5%
neg-mul-186.5%
Simplified86.5%
if 1.55e-24 < u Initial program 74.6%
associate-/l*75.5%
distribute-lft-neg-out75.5%
distribute-rgt-neg-in75.5%
associate-/r*88.2%
distribute-neg-frac288.2%
Simplified88.2%
Taylor expanded in t1 around 0 75.5%
mul-1-neg75.5%
Simplified75.5%
associate-*r/78.2%
distribute-frac-neg278.2%
add-sqr-sqrt78.2%
sqrt-unprod70.1%
sqr-neg70.1%
sqrt-unprod0.0%
add-sqr-sqrt52.8%
associate-*r/53.4%
clear-num53.5%
un-div-inv53.5%
associate-/r/53.5%
add-sqr-sqrt0.0%
sqrt-unprod69.9%
sqr-neg69.9%
sqrt-unprod75.5%
add-sqr-sqrt75.5%
Applied egg-rr75.5%
distribute-neg-frac275.5%
*-commutative75.5%
distribute-rgt-neg-in75.5%
Simplified75.5%
associate-/r*74.8%
div-inv74.8%
distribute-neg-frac274.8%
clear-num74.8%
times-frac68.0%
associate-/l/74.0%
frac-2neg74.0%
div-inv73.9%
Applied egg-rr74.3%
associate-*r/74.4%
*-rgt-identity74.4%
associate-*r/74.1%
associate-*l/76.9%
*-commutative76.9%
Simplified76.9%
Final simplification83.5%
(FPCore (u v t1) :precision binary64 (if (or (<= u -0.00047) (not (<= u 1e-24))) (* t1 (/ (/ v (- u)) u)) (- (/ v t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -0.00047) || !(u <= 1e-24)) {
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 <= (-0.00047d0)) .or. (.not. (u <= 1d-24))) 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 <= -0.00047) || !(u <= 1e-24)) {
tmp = t1 * ((v / -u) / u);
} else {
tmp = -(v / t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -0.00047) or not (u <= 1e-24): tmp = t1 * ((v / -u) / u) else: tmp = -(v / t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -0.00047) || !(u <= 1e-24)) tmp = Float64(t1 * Float64(Float64(v / Float64(-u)) / u)); else tmp = Float64(-Float64(v / t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -0.00047) || ~((u <= 1e-24))) tmp = t1 * ((v / -u) / u); else tmp = -(v / t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -0.00047], N[Not[LessEqual[u, 1e-24]], $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 -0.00047 \lor \neg \left(u \leq 10^{-24}\right):\\
\;\;\;\;t1 \cdot \frac{\frac{v}{-u}}{u}\\
\mathbf{else}:\\
\;\;\;\;-\frac{v}{t1}\\
\end{array}
\end{array}
if u < -4.69999999999999986e-4 or 9.99999999999999924e-25 < u Initial program 76.7%
associate-/l*77.4%
distribute-lft-neg-out77.4%
distribute-rgt-neg-in77.4%
associate-/r*90.3%
distribute-neg-frac290.3%
Simplified90.3%
Taylor expanded in t1 around 0 80.2%
mul-1-neg80.2%
Simplified80.2%
Taylor expanded in t1 around 0 79.6%
if -4.69999999999999986e-4 < u < 9.99999999999999924e-25Initial program 67.3%
associate-/l*66.4%
distribute-lft-neg-out66.4%
distribute-rgt-neg-in66.4%
associate-/r*77.7%
distribute-neg-frac277.7%
Simplified77.7%
Taylor expanded in t1 around inf 86.5%
associate-*r/86.5%
neg-mul-186.5%
Simplified86.5%
Final simplification82.7%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.05e+53) (not (<= u 2.1e+103))) (/ t1 (* u (/ u v))) (- (/ v t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.05e+53) || !(u <= 2.1e+103)) {
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.05d+53)) .or. (.not. (u <= 2.1d+103))) 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.05e+53) || !(u <= 2.1e+103)) {
tmp = t1 / (u * (u / v));
} else {
tmp = -(v / t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.05e+53) or not (u <= 2.1e+103): tmp = t1 / (u * (u / v)) else: tmp = -(v / t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.05e+53) || !(u <= 2.1e+103)) 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.05e+53) || ~((u <= 2.1e+103))) tmp = t1 / (u * (u / v)); else tmp = -(v / t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.05e+53], N[Not[LessEqual[u, 2.1e+103]], $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.05 \cdot 10^{+53} \lor \neg \left(u \leq 2.1 \cdot 10^{+103}\right):\\
\;\;\;\;\frac{t1}{u \cdot \frac{u}{v}}\\
\mathbf{else}:\\
\;\;\;\;-\frac{v}{t1}\\
\end{array}
\end{array}
if u < -1.0500000000000001e53 or 2.1000000000000002e103 < u Initial program 79.4%
associate-/l*78.9%
distribute-lft-neg-out78.9%
distribute-rgt-neg-in78.9%
associate-/r*90.7%
distribute-neg-frac290.7%
Simplified90.7%
Taylor expanded in t1 around 0 86.6%
mul-1-neg86.6%
Simplified86.6%
associate-*r/89.5%
distribute-frac-neg289.5%
add-sqr-sqrt43.0%
sqrt-unprod75.4%
sqr-neg75.4%
sqrt-unprod38.1%
add-sqr-sqrt71.0%
associate-*r/71.7%
clear-num71.7%
un-div-inv71.7%
associate-/r/71.7%
add-sqr-sqrt38.4%
sqrt-unprod75.3%
sqr-neg75.3%
sqrt-unprod40.8%
add-sqr-sqrt85.8%
Applied egg-rr85.8%
distribute-neg-frac285.8%
*-commutative85.8%
distribute-rgt-neg-in85.8%
Simplified85.8%
Taylor expanded in t1 around 0 85.9%
distribute-rgt-neg-out85.9%
distribute-lft-neg-in85.9%
add-sqr-sqrt45.0%
sqrt-unprod73.6%
sqr-neg73.6%
sqrt-unprod33.1%
add-sqr-sqrt71.4%
clear-num71.4%
un-div-inv71.4%
Applied egg-rr71.4%
associate-/r/71.4%
Simplified71.4%
if -1.0500000000000001e53 < u < 2.1000000000000002e103Initial program 67.5%
associate-/l*67.8%
distribute-lft-neg-out67.8%
distribute-rgt-neg-in67.8%
associate-/r*80.3%
distribute-neg-frac280.3%
Simplified80.3%
Taylor expanded in t1 around inf 77.3%
associate-*r/77.3%
neg-mul-177.3%
Simplified77.3%
Final simplification74.9%
(FPCore (u v t1) :precision binary64 (if (or (<= u -5.3e+152) (not (<= u 4.7e+104))) (* v (/ (/ t1 u) u)) (/ v (- (- u) t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -5.3e+152) || !(u <= 4.7e+104)) {
tmp = v * ((t1 / 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 ((u <= (-5.3d+152)) .or. (.not. (u <= 4.7d+104))) then
tmp = v * ((t1 / 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 ((u <= -5.3e+152) || !(u <= 4.7e+104)) {
tmp = v * ((t1 / u) / u);
} else {
tmp = v / (-u - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -5.3e+152) or not (u <= 4.7e+104): tmp = v * ((t1 / u) / u) else: tmp = v / (-u - t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -5.3e+152) || !(u <= 4.7e+104)) tmp = Float64(v * Float64(Float64(t1 / u) / u)); else tmp = Float64(v / Float64(Float64(-u) - t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -5.3e+152) || ~((u <= 4.7e+104))) tmp = v * ((t1 / u) / u); else tmp = v / (-u - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -5.3e+152], N[Not[LessEqual[u, 4.7e+104]], $MachinePrecision]], N[(v * N[(N[(t1 / u), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision], N[(v / N[((-u) - t1), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -5.3 \cdot 10^{+152} \lor \neg \left(u \leq 4.7 \cdot 10^{+104}\right):\\
\;\;\;\;v \cdot \frac{\frac{t1}{u}}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{\left(-u\right) - t1}\\
\end{array}
\end{array}
if u < -5.29999999999999976e152 or 4.70000000000000017e104 < u Initial program 78.5%
associate-/l*77.8%
distribute-lft-neg-out77.8%
distribute-rgt-neg-in77.8%
associate-/r*92.4%
distribute-neg-frac292.4%
Simplified92.4%
Taylor expanded in t1 around 0 88.4%
mul-1-neg88.4%
Simplified88.4%
associate-*r/91.3%
distribute-frac-neg291.3%
add-sqr-sqrt53.6%
sqrt-unprod77.2%
sqr-neg77.2%
sqrt-unprod30.6%
add-sqr-sqrt71.6%
associate-*r/72.2%
clear-num72.2%
un-div-inv72.2%
associate-/r/72.2%
add-sqr-sqrt30.6%
sqrt-unprod76.7%
sqr-neg76.7%
sqrt-unprod50.9%
add-sqr-sqrt87.5%
Applied egg-rr87.5%
distribute-neg-frac287.5%
*-commutative87.5%
distribute-rgt-neg-in87.5%
Simplified87.5%
Taylor expanded in t1 around 0 87.6%
associate-/r*88.8%
distribute-neg-frac88.8%
associate-/r/77.8%
add-sqr-sqrt33.0%
sqrt-unprod71.8%
sqr-neg71.8%
sqrt-unprod40.9%
add-sqr-sqrt71.6%
Applied egg-rr71.6%
if -5.29999999999999976e152 < u < 4.70000000000000017e104Initial program 69.4%
associate-/l*69.7%
distribute-lft-neg-out69.7%
distribute-rgt-neg-in69.7%
associate-/r*80.7%
distribute-neg-frac280.7%
Simplified80.7%
associate-*r/98.7%
neg-mul-198.7%
associate-/r*98.7%
Applied egg-rr98.7%
frac-2neg98.7%
metadata-eval98.7%
/-rgt-identity98.7%
*-commutative98.7%
distribute-rgt-neg-in98.7%
Applied egg-rr98.7%
Taylor expanded in t1 around inf 75.5%
neg-mul-175.5%
Simplified75.5%
Final simplification74.2%
(FPCore (u v t1) :precision binary64 (if (or (<= u -3.8e+152) (not (<= u 1.55e+156))) (/ v u) (- (/ v t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.8e+152) || !(u <= 1.55e+156)) {
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 <= (-3.8d+152)) .or. (.not. (u <= 1.55d+156))) 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 <= -3.8e+152) || !(u <= 1.55e+156)) {
tmp = v / u;
} else {
tmp = -(v / t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -3.8e+152) or not (u <= 1.55e+156): tmp = v / u else: tmp = -(v / t1) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -3.8e+152) || !(u <= 1.55e+156)) 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 <= -3.8e+152) || ~((u <= 1.55e+156))) tmp = v / u; else tmp = -(v / t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -3.8e+152], N[Not[LessEqual[u, 1.55e+156]], $MachinePrecision]], N[(v / u), $MachinePrecision], (-N[(v / t1), $MachinePrecision])]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.8 \cdot 10^{+152} \lor \neg \left(u \leq 1.55 \cdot 10^{+156}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;-\frac{v}{t1}\\
\end{array}
\end{array}
if u < -3.8e152 or 1.5500000000000001e156 < u Initial program 78.1%
associate-/l*78.4%
distribute-lft-neg-out78.4%
distribute-rgt-neg-in78.4%
associate-/r*95.5%
distribute-neg-frac295.5%
Simplified95.5%
associate-*r/99.9%
neg-mul-199.9%
associate-/r*99.9%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 48.8%
div-inv48.8%
frac-2neg48.8%
metadata-eval48.8%
/-rgt-identity48.8%
add-sqr-sqrt26.6%
sqrt-unprod46.9%
sqr-neg46.9%
sqrt-unprod20.7%
add-sqr-sqrt46.1%
frac-2neg46.1%
metadata-eval46.1%
distribute-neg-in46.1%
add-sqr-sqrt23.8%
sqrt-unprod46.0%
sqr-neg46.0%
sqrt-unprod22.3%
add-sqr-sqrt49.0%
sub-neg49.0%
Applied egg-rr49.0%
associate-*r/49.0%
*-commutative49.0%
neg-mul-149.0%
Simplified49.0%
Taylor expanded in t1 around 0 46.2%
if -3.8e152 < u < 1.5500000000000001e156Initial program 70.4%
associate-/l*70.3%
distribute-lft-neg-out70.3%
distribute-rgt-neg-in70.3%
associate-/r*80.7%
distribute-neg-frac280.7%
Simplified80.7%
Taylor expanded in t1 around inf 69.7%
associate-*r/69.7%
neg-mul-169.7%
Simplified69.7%
Final simplification63.5%
(FPCore (u v t1) :precision binary64 (if (<= u -1.4e+50) (/ 1.0 (/ u v)) (if (<= u 1.05e+156) (- (/ v t1)) (/ v u))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.4e+50) {
tmp = 1.0 / (u / v);
} else if (u <= 1.05e+156) {
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 <= (-1.4d+50)) then
tmp = 1.0d0 / (u / v)
else if (u <= 1.05d+156) 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 <= -1.4e+50) {
tmp = 1.0 / (u / v);
} else if (u <= 1.05e+156) {
tmp = -(v / t1);
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.4e+50: tmp = 1.0 / (u / v) elif u <= 1.05e+156: tmp = -(v / t1) else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.4e+50) tmp = Float64(1.0 / Float64(u / v)); elseif (u <= 1.05e+156) 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 <= -1.4e+50) tmp = 1.0 / (u / v); elseif (u <= 1.05e+156) tmp = -(v / t1); else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.4e+50], N[(1.0 / N[(u / v), $MachinePrecision]), $MachinePrecision], If[LessEqual[u, 1.05e+156], (-N[(v / t1), $MachinePrecision]), N[(v / u), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.4 \cdot 10^{+50}:\\
\;\;\;\;\frac{1}{\frac{u}{v}}\\
\mathbf{elif}\;u \leq 1.05 \cdot 10^{+156}:\\
\;\;\;\;-\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if u < -1.3999999999999999e50Initial program 80.9%
associate-/l*81.2%
distribute-lft-neg-out81.2%
distribute-rgt-neg-in81.2%
associate-/r*91.7%
distribute-neg-frac291.7%
Simplified91.7%
Taylor expanded in t1 around 0 90.0%
mul-1-neg90.0%
Simplified90.0%
Taylor expanded in t1 around inf 46.3%
associate-*r/46.3%
mul-1-neg46.3%
Simplified46.3%
clear-num48.5%
distribute-neg-frac248.5%
inv-pow48.5%
add-sqr-sqrt19.3%
sqrt-unprod69.1%
sqr-neg69.1%
sqrt-unprod29.0%
add-sqr-sqrt48.4%
Applied egg-rr48.4%
unpow-148.4%
Simplified48.4%
if -1.3999999999999999e50 < u < 1.04999999999999991e156Initial program 68.7%
associate-/l*68.4%
distribute-lft-neg-out68.4%
distribute-rgt-neg-in68.4%
associate-/r*80.3%
distribute-neg-frac280.3%
Simplified80.3%
Taylor expanded in t1 around inf 73.1%
associate-*r/73.1%
neg-mul-173.1%
Simplified73.1%
if 1.04999999999999991e156 < u Initial program 77.3%
associate-/l*77.6%
distribute-lft-neg-out77.6%
distribute-rgt-neg-in77.6%
associate-/r*94.3%
distribute-neg-frac294.3%
Simplified94.3%
associate-*r/99.9%
neg-mul-199.9%
associate-/r*99.9%
Applied egg-rr99.9%
Taylor expanded in t1 around inf 43.7%
div-inv43.7%
frac-2neg43.7%
metadata-eval43.7%
/-rgt-identity43.7%
add-sqr-sqrt21.7%
sqrt-unprod40.2%
sqr-neg40.2%
sqrt-unprod19.0%
add-sqr-sqrt41.1%
frac-2neg41.1%
metadata-eval41.1%
distribute-neg-in41.1%
add-sqr-sqrt25.0%
sqrt-unprod40.9%
sqr-neg40.9%
sqrt-unprod16.1%
add-sqr-sqrt44.0%
sub-neg44.0%
Applied egg-rr44.0%
associate-*r/44.0%
*-commutative44.0%
neg-mul-144.0%
Simplified44.0%
Taylor expanded in t1 around 0 41.2%
Final simplification63.6%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -2.9e+99) (not (<= t1 7.5e+72))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -2.9e+99) || !(t1 <= 7.5e+72)) {
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.9d+99)) .or. (.not. (t1 <= 7.5d+72))) 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.9e+99) || !(t1 <= 7.5e+72)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -2.9e+99) or not (t1 <= 7.5e+72): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -2.9e+99) || !(t1 <= 7.5e+72)) 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.9e+99) || ~((t1 <= 7.5e+72))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -2.9e+99], N[Not[LessEqual[t1, 7.5e+72]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2.9 \cdot 10^{+99} \lor \neg \left(t1 \leq 7.5 \cdot 10^{+72}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -2.9000000000000002e99 or 7.50000000000000027e72 < t1 Initial program 54.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 93.4%
Taylor expanded in u around inf 40.0%
if -2.9000000000000002e99 < t1 < 7.50000000000000027e72Initial program 82.0%
associate-/l*81.5%
distribute-lft-neg-out81.5%
distribute-rgt-neg-in81.5%
associate-/r*90.2%
distribute-neg-frac290.2%
Simplified90.2%
associate-*r/98.6%
neg-mul-198.6%
associate-/r*98.6%
Applied egg-rr98.6%
Taylor expanded in t1 around inf 51.0%
div-inv50.8%
frac-2neg50.8%
metadata-eval50.8%
/-rgt-identity50.8%
add-sqr-sqrt27.2%
sqrt-unprod32.1%
sqr-neg32.1%
sqrt-unprod8.8%
add-sqr-sqrt19.7%
frac-2neg19.7%
metadata-eval19.7%
distribute-neg-in19.7%
add-sqr-sqrt10.3%
sqrt-unprod33.4%
sqr-neg33.4%
sqrt-unprod25.3%
add-sqr-sqrt50.8%
sub-neg50.8%
Applied egg-rr50.8%
associate-*r/51.0%
*-commutative51.0%
neg-mul-151.0%
Simplified51.0%
Taylor expanded in t1 around 0 21.8%
Final simplification28.1%
(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 72.5%
associate-/l*72.4%
distribute-lft-neg-out72.4%
distribute-rgt-neg-in72.4%
associate-/r*84.6%
distribute-neg-frac284.6%
Simplified84.6%
distribute-frac-neg284.6%
distribute-rgt-neg-out84.6%
associate-/r*72.4%
distribute-lft-neg-out72.4%
associate-/l*72.5%
times-frac97.9%
frac-2neg97.9%
associate-*r/98.6%
add-sqr-sqrt49.3%
sqrt-unprod46.6%
sqr-neg46.6%
sqrt-unprod23.5%
add-sqr-sqrt41.0%
add-sqr-sqrt19.3%
sqrt-unprod59.1%
sqr-neg59.1%
sqrt-prod50.1%
add-sqr-sqrt98.6%
Applied egg-rr98.6%
Final simplification98.6%
(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 72.5%
times-frac97.9%
distribute-frac-neg97.9%
distribute-neg-frac297.9%
+-commutative97.9%
distribute-neg-in97.9%
unsub-neg97.9%
Simplified97.9%
Final simplification97.9%
(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 72.5%
associate-/l*72.4%
distribute-lft-neg-out72.4%
distribute-rgt-neg-in72.4%
associate-/r*84.6%
distribute-neg-frac284.6%
Simplified84.6%
associate-*r/99.1%
neg-mul-199.1%
associate-/r*99.1%
Applied egg-rr99.1%
Taylor expanded in t1 around inf 65.7%
div-inv65.5%
frac-2neg65.5%
metadata-eval65.5%
/-rgt-identity65.5%
add-sqr-sqrt35.7%
sqrt-unprod41.4%
sqr-neg41.4%
sqrt-unprod12.7%
add-sqr-sqrt27.2%
frac-2neg27.2%
metadata-eval27.2%
distribute-neg-in27.2%
add-sqr-sqrt12.8%
sqrt-unprod38.9%
sqr-neg38.9%
sqrt-unprod32.1%
add-sqr-sqrt65.5%
sub-neg65.5%
Applied egg-rr65.5%
associate-*r/65.7%
*-commutative65.7%
neg-mul-165.7%
Simplified65.7%
frac-2neg65.7%
div-inv65.5%
remove-double-neg65.5%
sub-neg65.5%
distribute-neg-in65.5%
add-sqr-sqrt33.9%
sqrt-unprod72.9%
sqr-neg72.9%
sqrt-unprod31.1%
add-sqr-sqrt65.5%
distribute-neg-in65.5%
+-commutative65.5%
distribute-neg-in65.5%
add-sqr-sqrt34.4%
sqrt-unprod73.7%
sqr-neg73.7%
sqrt-unprod31.6%
add-sqr-sqrt65.5%
Applied egg-rr65.5%
associate-*r/65.7%
*-rgt-identity65.7%
sub-neg65.7%
Simplified65.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 72.5%
times-frac97.9%
distribute-frac-neg97.9%
distribute-neg-frac297.9%
+-commutative97.9%
distribute-neg-in97.9%
unsub-neg97.9%
Simplified97.9%
Taylor expanded in t1 around inf 58.8%
Taylor expanded in u around inf 15.5%
herbie shell --seed 2024116
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))