
(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 (/ (* (/ 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(Float64(v / Float64(t1 + u)) * Float64(-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[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * (-t1)), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{v}{t1 + u} \cdot \left(-t1\right)}{t1 + u}
\end{array}
Initial program 74.9%
associate-/l*75.0%
distribute-lft-neg-out75.0%
distribute-rgt-neg-in75.0%
associate-/r*85.4%
distribute-neg-frac285.4%
Simplified85.4%
associate-*r/98.9%
neg-mul-198.9%
associate-/r*98.9%
Applied egg-rr98.9%
Taylor expanded in v around 0 83.6%
*-commutative83.6%
associate-*r/98.9%
associate-*r*98.9%
*-commutative98.9%
associate-*r/98.9%
mul-1-neg98.9%
Simplified98.9%
Final simplification98.9%
(FPCore (u v t1) :precision binary64 (if (<= t1 -2.15e+101) (/ v (- (- t1) (* u 2.0))) (if (<= t1 3e+97) (* t1 (- (/ (/ v (+ t1 u)) (+ t1 u)))) (/ v (- u t1)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -2.15e+101) {
tmp = v / (-t1 - (u * 2.0));
} else if (t1 <= 3e+97) {
tmp = t1 * -((v / (t1 + u)) / (t1 + 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 <= (-2.15d+101)) then
tmp = v / (-t1 - (u * 2.0d0))
else if (t1 <= 3d+97) then
tmp = t1 * -((v / (t1 + u)) / (t1 + 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 <= -2.15e+101) {
tmp = v / (-t1 - (u * 2.0));
} else if (t1 <= 3e+97) {
tmp = t1 * -((v / (t1 + u)) / (t1 + u));
} else {
tmp = v / (u - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -2.15e+101: tmp = v / (-t1 - (u * 2.0)) elif t1 <= 3e+97: tmp = t1 * -((v / (t1 + u)) / (t1 + u)) else: tmp = v / (u - t1) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -2.15e+101) tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); elseif (t1 <= 3e+97) tmp = Float64(t1 * Float64(-Float64(Float64(v / Float64(t1 + u)) / Float64(t1 + u)))); else tmp = Float64(v / Float64(u - t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -2.15e+101) tmp = v / (-t1 - (u * 2.0)); elseif (t1 <= 3e+97) tmp = t1 * -((v / (t1 + u)) / (t1 + u)); else tmp = v / (u - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -2.15e+101], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 3e+97], N[(t1 * (-N[(N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision])), $MachinePrecision], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2.15 \cdot 10^{+101}:\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\mathbf{elif}\;t1 \leq 3 \cdot 10^{+97}:\\
\;\;\;\;t1 \cdot \left(-\frac{\frac{v}{t1 + u}}{t1 + u}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u - t1}\\
\end{array}
\end{array}
if t1 < -2.15e101Initial program 54.2%
associate-/l*51.4%
distribute-lft-neg-out51.4%
distribute-rgt-neg-in51.4%
associate-/r*68.9%
distribute-neg-frac268.9%
Simplified68.9%
associate-*r/99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*l/99.9%
frac-2neg99.9%
clear-num99.8%
frac-times97.9%
*-un-lft-identity97.9%
+-commutative97.9%
distribute-neg-in97.9%
sub-neg97.9%
Applied egg-rr97.9%
Taylor expanded in u around 0 91.7%
*-commutative91.7%
Simplified91.7%
if -2.15e101 < t1 < 2.9999999999999998e97Initial program 85.4%
associate-/l*86.3%
distribute-lft-neg-out86.3%
distribute-rgt-neg-in86.3%
associate-/r*91.9%
distribute-neg-frac291.9%
Simplified91.9%
if 2.9999999999999998e97 < t1 Initial program 45.9%
times-frac100.0%
distribute-frac-neg100.0%
distribute-neg-frac2100.0%
+-commutative100.0%
distribute-neg-in100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in t1 around inf 91.1%
Taylor expanded in v around 0 91.1%
associate-*r/91.1%
mul-1-neg91.1%
Simplified91.1%
frac-2neg91.1%
div-inv90.7%
remove-double-neg90.7%
+-commutative90.7%
distribute-neg-in90.7%
add-sqr-sqrt48.6%
sqrt-unprod88.0%
sqr-neg88.0%
sqrt-unprod42.2%
add-sqr-sqrt91.1%
Applied egg-rr91.1%
associate-*r/91.5%
*-rgt-identity91.5%
sub-neg91.5%
Simplified91.5%
Final simplification91.8%
(FPCore (u v t1)
:precision binary64
(if (<= u -1.32e+90)
(* t1 (- (/ (/ v u) (+ t1 u))))
(if (<= u 3e-39)
(* (/ v (- t1)) (/ t1 (+ t1 u)))
(* (/ (- v) (+ t1 u)) (/ t1 u)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -1.32e+90) {
tmp = t1 * -((v / u) / (t1 + u));
} else if (u <= 3e-39) {
tmp = (v / -t1) * (t1 / (t1 + u));
} else {
tmp = (-v / (t1 + 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 <= (-1.32d+90)) then
tmp = t1 * -((v / u) / (t1 + u))
else if (u <= 3d-39) then
tmp = (v / -t1) * (t1 / (t1 + u))
else
tmp = (-v / (t1 + u)) * (t1 / u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -1.32e+90) {
tmp = t1 * -((v / u) / (t1 + u));
} else if (u <= 3e-39) {
tmp = (v / -t1) * (t1 / (t1 + u));
} else {
tmp = (-v / (t1 + u)) * (t1 / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -1.32e+90: tmp = t1 * -((v / u) / (t1 + u)) elif u <= 3e-39: tmp = (v / -t1) * (t1 / (t1 + u)) else: tmp = (-v / (t1 + u)) * (t1 / u) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -1.32e+90) tmp = Float64(t1 * Float64(-Float64(Float64(v / u) / Float64(t1 + u)))); elseif (u <= 3e-39) tmp = Float64(Float64(v / Float64(-t1)) * Float64(t1 / Float64(t1 + u))); else tmp = Float64(Float64(Float64(-v) / Float64(t1 + u)) * Float64(t1 / u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -1.32e+90) tmp = t1 * -((v / u) / (t1 + u)); elseif (u <= 3e-39) tmp = (v / -t1) * (t1 / (t1 + u)); else tmp = (-v / (t1 + u)) * (t1 / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -1.32e+90], N[(t1 * (-N[(N[(v / u), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision])), $MachinePrecision], If[LessEqual[u, 3e-39], N[(N[(v / (-t1)), $MachinePrecision] * N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * N[(t1 / u), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.32 \cdot 10^{+90}:\\
\;\;\;\;t1 \cdot \left(-\frac{\frac{v}{u}}{t1 + u}\right)\\
\mathbf{elif}\;u \leq 3 \cdot 10^{-39}:\\
\;\;\;\;\frac{v}{-t1} \cdot \frac{t1}{t1 + u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u} \cdot \frac{t1}{u}\\
\end{array}
\end{array}
if u < -1.3199999999999999e90Initial program 81.4%
associate-/l*81.8%
distribute-lft-neg-out81.8%
distribute-rgt-neg-in81.8%
associate-/r*94.7%
distribute-neg-frac294.7%
Simplified94.7%
Taylor expanded in t1 around 0 90.3%
if -1.3199999999999999e90 < u < 3.00000000000000028e-39Initial program 70.5%
times-frac99.2%
distribute-frac-neg99.2%
distribute-neg-frac299.2%
+-commutative99.2%
distribute-neg-in99.2%
unsub-neg99.2%
Simplified99.2%
Taylor expanded in t1 around inf 79.9%
if 3.00000000000000028e-39 < u Initial program 79.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 0 84.6%
associate-*r/84.6%
mul-1-neg84.6%
Simplified84.6%
Final simplification83.0%
(FPCore (u v t1)
:precision binary64
(if (<= t1 -7.2e-32)
(/ v (- (- t1) (* u 2.0)))
(if (<= t1 2.4e-55)
(* (* v (/ t1 u)) (/ -1.0 u))
(* (/ v (- t1)) (/ t1 (+ t1 u))))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -7.2e-32) {
tmp = v / (-t1 - (u * 2.0));
} else if (t1 <= 2.4e-55) {
tmp = (v * (t1 / u)) * (-1.0 / u);
} else {
tmp = (v / -t1) * (t1 / (t1 + u));
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (t1 <= (-7.2d-32)) then
tmp = v / (-t1 - (u * 2.0d0))
else if (t1 <= 2.4d-55) then
tmp = (v * (t1 / u)) * ((-1.0d0) / u)
else
tmp = (v / -t1) * (t1 / (t1 + u))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (t1 <= -7.2e-32) {
tmp = v / (-t1 - (u * 2.0));
} else if (t1 <= 2.4e-55) {
tmp = (v * (t1 / u)) * (-1.0 / u);
} else {
tmp = (v / -t1) * (t1 / (t1 + u));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -7.2e-32: tmp = v / (-t1 - (u * 2.0)) elif t1 <= 2.4e-55: tmp = (v * (t1 / u)) * (-1.0 / u) else: tmp = (v / -t1) * (t1 / (t1 + u)) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -7.2e-32) tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); elseif (t1 <= 2.4e-55) tmp = Float64(Float64(v * Float64(t1 / u)) * Float64(-1.0 / u)); else tmp = Float64(Float64(v / Float64(-t1)) * Float64(t1 / Float64(t1 + u))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (t1 <= -7.2e-32) tmp = v / (-t1 - (u * 2.0)); elseif (t1 <= 2.4e-55) tmp = (v * (t1 / u)) * (-1.0 / u); else tmp = (v / -t1) * (t1 / (t1 + u)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -7.2e-32], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 2.4e-55], N[(N[(v * N[(t1 / u), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / u), $MachinePrecision]), $MachinePrecision], N[(N[(v / (-t1)), $MachinePrecision] * N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -7.2 \cdot 10^{-32}:\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\mathbf{elif}\;t1 \leq 2.4 \cdot 10^{-55}:\\
\;\;\;\;\left(v \cdot \frac{t1}{u}\right) \cdot \frac{-1}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1} \cdot \frac{t1}{t1 + u}\\
\end{array}
\end{array}
if t1 < -7.19999999999999986e-32Initial program 66.2%
associate-/l*67.9%
distribute-lft-neg-out67.9%
distribute-rgt-neg-in67.9%
associate-/r*78.4%
distribute-neg-frac278.4%
Simplified78.4%
associate-*r/99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*l/99.9%
frac-2neg99.9%
clear-num99.8%
frac-times98.7%
*-un-lft-identity98.7%
+-commutative98.7%
distribute-neg-in98.7%
sub-neg98.7%
Applied egg-rr98.7%
Taylor expanded in u around 0 86.0%
*-commutative86.0%
Simplified86.0%
if -7.19999999999999986e-32 < t1 < 2.39999999999999991e-55Initial program 83.4%
Taylor expanded in t1 around 0 73.8%
times-frac81.5%
div-inv81.4%
associate-*r*81.0%
add-sqr-sqrt33.4%
sqrt-unprod52.2%
sqr-neg52.2%
sqrt-unprod29.5%
add-sqr-sqrt48.5%
frac-2neg48.5%
metadata-eval48.5%
add-sqr-sqrt17.5%
sqrt-unprod60.0%
sqr-neg60.0%
sqrt-unprod46.4%
add-sqr-sqrt81.0%
Applied egg-rr81.0%
Taylor expanded in t1 around 0 83.9%
if 2.39999999999999991e-55 < t1 Initial program 70.8%
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 78.0%
Final simplification82.9%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1.8e-32) (not (<= t1 2.95e-55))) (/ v (- (- t1) (* u 2.0))) (* (* v (/ t1 u)) (/ -1.0 u))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.8e-32) || !(t1 <= 2.95e-55)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = (v * (t1 / u)) * (-1.0 / u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-1.8d-32)) .or. (.not. (t1 <= 2.95d-55))) then
tmp = v / (-t1 - (u * 2.0d0))
else
tmp = (v * (t1 / u)) * ((-1.0d0) / u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.8e-32) || !(t1 <= 2.95e-55)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = (v * (t1 / u)) * (-1.0 / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.8e-32) or not (t1 <= 2.95e-55): tmp = v / (-t1 - (u * 2.0)) else: tmp = (v * (t1 / u)) * (-1.0 / u) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.8e-32) || !(t1 <= 2.95e-55)) tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); else tmp = Float64(Float64(v * Float64(t1 / u)) * Float64(-1.0 / u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -1.8e-32) || ~((t1 <= 2.95e-55))) tmp = v / (-t1 - (u * 2.0)); else tmp = (v * (t1 / u)) * (-1.0 / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.8e-32], N[Not[LessEqual[t1, 2.95e-55]], $MachinePrecision]], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(v * N[(t1 / u), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.8 \cdot 10^{-32} \lor \neg \left(t1 \leq 2.95 \cdot 10^{-55}\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\left(v \cdot \frac{t1}{u}\right) \cdot \frac{-1}{u}\\
\end{array}
\end{array}
if t1 < -1.79999999999999996e-32 or 2.9499999999999999e-55 < t1 Initial program 68.4%
associate-/l*68.5%
distribute-lft-neg-out68.5%
distribute-rgt-neg-in68.5%
associate-/r*81.5%
distribute-neg-frac281.5%
Simplified81.5%
associate-*r/99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*l/99.9%
frac-2neg99.9%
clear-num99.8%
frac-times95.4%
*-un-lft-identity95.4%
+-commutative95.4%
distribute-neg-in95.4%
sub-neg95.4%
Applied egg-rr95.4%
Taylor expanded in u around 0 82.1%
*-commutative82.1%
Simplified82.1%
if -1.79999999999999996e-32 < t1 < 2.9499999999999999e-55Initial program 83.4%
Taylor expanded in t1 around 0 73.8%
times-frac81.5%
div-inv81.4%
associate-*r*81.0%
add-sqr-sqrt33.4%
sqrt-unprod52.2%
sqr-neg52.2%
sqrt-unprod29.5%
add-sqr-sqrt48.5%
frac-2neg48.5%
metadata-eval48.5%
add-sqr-sqrt17.5%
sqrt-unprod60.0%
sqr-neg60.0%
sqrt-unprod46.4%
add-sqr-sqrt81.0%
Applied egg-rr81.0%
Taylor expanded in t1 around 0 83.9%
Final simplification82.9%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -8.5e-34) (not (<= t1 2.25e-55))) (/ v (- (- t1) (* u 2.0))) (* (- t1) (/ (/ v u) u))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -8.5e-34) || !(t1 <= 2.25e-55)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = -t1 * ((v / u) / 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 <= (-8.5d-34)) .or. (.not. (t1 <= 2.25d-55))) then
tmp = v / (-t1 - (u * 2.0d0))
else
tmp = -t1 * ((v / u) / u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -8.5e-34) || !(t1 <= 2.25e-55)) {
tmp = v / (-t1 - (u * 2.0));
} else {
tmp = -t1 * ((v / u) / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -8.5e-34) or not (t1 <= 2.25e-55): tmp = v / (-t1 - (u * 2.0)) else: tmp = -t1 * ((v / u) / u) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -8.5e-34) || !(t1 <= 2.25e-55)) tmp = Float64(v / Float64(Float64(-t1) - Float64(u * 2.0))); else tmp = Float64(Float64(-t1) * Float64(Float64(v / u) / u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -8.5e-34) || ~((t1 <= 2.25e-55))) tmp = v / (-t1 - (u * 2.0)); else tmp = -t1 * ((v / u) / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -8.5e-34], N[Not[LessEqual[t1, 2.25e-55]], $MachinePrecision]], N[(v / N[((-t1) - N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-t1) * N[(N[(v / u), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -8.5 \cdot 10^{-34} \lor \neg \left(t1 \leq 2.25 \cdot 10^{-55}\right):\\
\;\;\;\;\frac{v}{\left(-t1\right) - u \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\left(-t1\right) \cdot \frac{\frac{v}{u}}{u}\\
\end{array}
\end{array}
if t1 < -8.5000000000000001e-34 or 2.24999999999999985e-55 < t1 Initial program 68.4%
associate-/l*68.5%
distribute-lft-neg-out68.5%
distribute-rgt-neg-in68.5%
associate-/r*81.5%
distribute-neg-frac281.5%
Simplified81.5%
associate-*r/99.9%
+-commutative99.9%
distribute-neg-in99.9%
sub-neg99.9%
associate-*l/99.9%
frac-2neg99.9%
clear-num99.8%
frac-times95.4%
*-un-lft-identity95.4%
+-commutative95.4%
distribute-neg-in95.4%
sub-neg95.4%
Applied egg-rr95.4%
Taylor expanded in u around 0 82.1%
*-commutative82.1%
Simplified82.1%
if -8.5000000000000001e-34 < t1 < 2.24999999999999985e-55Initial program 83.4%
associate-/l*83.5%
distribute-lft-neg-out83.5%
distribute-rgt-neg-in83.5%
associate-/r*90.6%
distribute-neg-frac290.6%
Simplified90.6%
Taylor expanded in t1 around 0 80.6%
Taylor expanded in t1 around 0 83.5%
Final simplification82.7%
(FPCore (u v t1) :precision binary64 (if (<= t1 -2.2e-33) (/ (- v) (+ t1 u)) (if (<= t1 4e-55) (* (- t1) (/ (/ v u) u)) (/ v (- u t1)))))
double code(double u, double v, double t1) {
double tmp;
if (t1 <= -2.2e-33) {
tmp = -v / (t1 + u);
} else if (t1 <= 4e-55) {
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 <= (-2.2d-33)) then
tmp = -v / (t1 + u)
else if (t1 <= 4d-55) 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 <= -2.2e-33) {
tmp = -v / (t1 + u);
} else if (t1 <= 4e-55) {
tmp = -t1 * ((v / u) / u);
} else {
tmp = v / (u - t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if t1 <= -2.2e-33: tmp = -v / (t1 + u) elif t1 <= 4e-55: tmp = -t1 * ((v / u) / u) else: tmp = v / (u - t1) return tmp
function code(u, v, t1) tmp = 0.0 if (t1 <= -2.2e-33) tmp = Float64(Float64(-v) / Float64(t1 + u)); elseif (t1 <= 4e-55) tmp = Float64(Float64(-t1) * Float64(Float64(v / 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 <= -2.2e-33) tmp = -v / (t1 + u); elseif (t1 <= 4e-55) tmp = -t1 * ((v / u) / u); else tmp = v / (u - t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[t1, -2.2e-33], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 4e-55], N[((-t1) * N[(N[(v / u), $MachinePrecision] / u), $MachinePrecision]), $MachinePrecision], N[(v / N[(u - t1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -2.2 \cdot 10^{-33}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\mathbf{elif}\;t1 \leq 4 \cdot 10^{-55}:\\
\;\;\;\;\left(-t1\right) \cdot \frac{\frac{v}{u}}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u - t1}\\
\end{array}
\end{array}
if t1 < -2.20000000000000005e-33Initial program 66.2%
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 84.6%
Taylor expanded in v around 0 84.6%
associate-*r/84.6%
mul-1-neg84.6%
Simplified84.6%
if -2.20000000000000005e-33 < t1 < 3.99999999999999998e-55Initial program 83.4%
associate-/l*83.5%
distribute-lft-neg-out83.5%
distribute-rgt-neg-in83.5%
associate-/r*90.6%
distribute-neg-frac290.6%
Simplified90.6%
Taylor expanded in t1 around 0 80.6%
Taylor expanded in t1 around 0 83.5%
if 3.99999999999999998e-55 < t1 Initial program 70.8%
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 78.0%
Taylor expanded in v around 0 77.5%
associate-*r/77.5%
mul-1-neg77.5%
Simplified77.5%
frac-2neg77.5%
div-inv77.1%
remove-double-neg77.1%
+-commutative77.1%
distribute-neg-in77.1%
add-sqr-sqrt37.4%
sqrt-unprod77.7%
sqr-neg77.7%
sqrt-unprod39.5%
add-sqr-sqrt77.2%
Applied egg-rr77.2%
associate-*r/77.5%
*-rgt-identity77.5%
sub-neg77.5%
Simplified77.5%
Final simplification82.2%
(FPCore (u v t1) :precision binary64 (if (or (<= u -9.5e+132) (not (<= u 6.8e+41))) (/ (* t1 v) (* u u)) (/ (- v) (+ t1 u))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -9.5e+132) || !(u <= 6.8e+41)) {
tmp = (t1 * v) / (u * u);
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-9.5d+132)) .or. (.not. (u <= 6.8d+41))) then
tmp = (t1 * v) / (u * u)
else
tmp = -v / (t1 + u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -9.5e+132) || !(u <= 6.8e+41)) {
tmp = (t1 * v) / (u * u);
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -9.5e+132) or not (u <= 6.8e+41): tmp = (t1 * v) / (u * u) else: tmp = -v / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -9.5e+132) || !(u <= 6.8e+41)) tmp = Float64(Float64(t1 * v) / Float64(u * u)); else tmp = Float64(Float64(-v) / Float64(t1 + u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -9.5e+132) || ~((u <= 6.8e+41))) tmp = (t1 * v) / (u * u); else tmp = -v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -9.5e+132], N[Not[LessEqual[u, 6.8e+41]], $MachinePrecision]], N[(N[(t1 * v), $MachinePrecision] / N[(u * u), $MachinePrecision]), $MachinePrecision], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -9.5 \cdot 10^{+132} \lor \neg \left(u \leq 6.8 \cdot 10^{+41}\right):\\
\;\;\;\;\frac{t1 \cdot v}{u \cdot u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\end{array}
\end{array}
if u < -9.5000000000000005e132 or 6.79999999999999996e41 < u Initial program 78.0%
Taylor expanded in t1 around 0 78.0%
Taylor expanded in t1 around 0 76.0%
add-sqr-sqrt28.9%
sqrt-unprod58.9%
sqr-neg58.9%
sqrt-unprod38.9%
add-sqr-sqrt64.5%
pow164.5%
Applied egg-rr64.5%
unpow164.5%
Simplified64.5%
if -9.5000000000000005e132 < u < 6.79999999999999996e41Initial program 73.2%
times-frac99.1%
distribute-frac-neg99.1%
distribute-neg-frac299.1%
+-commutative99.1%
distribute-neg-in99.1%
unsub-neg99.1%
Simplified99.1%
Taylor expanded in t1 around inf 73.1%
Taylor expanded in v around 0 72.0%
associate-*r/72.0%
mul-1-neg72.0%
Simplified72.0%
Final simplification69.3%
(FPCore (u v t1) :precision binary64 (if (or (<= u -9.6e+132) (not (<= u 6.8e+41))) (* (/ v u) (/ t1 u)) (/ (- v) (+ t1 u))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -9.6e+132) || !(u <= 6.8e+41)) {
tmp = (v / u) * (t1 / u);
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((u <= (-9.6d+132)) .or. (.not. (u <= 6.8d+41))) then
tmp = (v / u) * (t1 / u)
else
tmp = -v / (t1 + u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((u <= -9.6e+132) || !(u <= 6.8e+41)) {
tmp = (v / u) * (t1 / u);
} else {
tmp = -v / (t1 + u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -9.6e+132) or not (u <= 6.8e+41): tmp = (v / u) * (t1 / u) else: tmp = -v / (t1 + u) return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -9.6e+132) || !(u <= 6.8e+41)) tmp = Float64(Float64(v / u) * Float64(t1 / u)); else tmp = Float64(Float64(-v) / Float64(t1 + u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -9.6e+132) || ~((u <= 6.8e+41))) tmp = (v / u) * (t1 / u); else tmp = -v / (t1 + u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -9.6e+132], N[Not[LessEqual[u, 6.8e+41]], $MachinePrecision]], N[(N[(v / u), $MachinePrecision] * N[(t1 / u), $MachinePrecision]), $MachinePrecision], N[((-v) / N[(t1 + u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -9.6 \cdot 10^{+132} \lor \neg \left(u \leq 6.8 \cdot 10^{+41}\right):\\
\;\;\;\;\frac{v}{u} \cdot \frac{t1}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1 + u}\\
\end{array}
\end{array}
if u < -9.6000000000000004e132 or 6.79999999999999996e41 < u Initial program 78.0%
Taylor expanded in t1 around 0 78.0%
Taylor expanded in t1 around 0 76.0%
*-commutative76.0%
times-frac85.4%
add-sqr-sqrt31.9%
sqrt-unprod62.9%
sqr-neg62.9%
sqrt-unprod38.9%
add-sqr-sqrt62.5%
Applied egg-rr62.5%
if -9.6000000000000004e132 < u < 6.79999999999999996e41Initial program 73.2%
times-frac99.1%
distribute-frac-neg99.1%
distribute-neg-frac299.1%
+-commutative99.1%
distribute-neg-in99.1%
unsub-neg99.1%
Simplified99.1%
Taylor expanded in t1 around inf 73.1%
Taylor expanded in v around 0 72.0%
associate-*r/72.0%
mul-1-neg72.0%
Simplified72.0%
Final simplification68.5%
(FPCore (u v t1) :precision binary64 (if (or (<= u -5.5e+92) (not (<= u 6.8e+41))) (/ v (+ t1 u)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -5.5e+92) || !(u <= 6.8e+41)) {
tmp = v / (t1 + 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+92)) .or. (.not. (u <= 6.8d+41))) then
tmp = v / (t1 + 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+92) || !(u <= 6.8e+41)) {
tmp = v / (t1 + u);
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -5.5e+92) or not (u <= 6.8e+41): tmp = v / (t1 + u) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -5.5e+92) || !(u <= 6.8e+41)) tmp = Float64(v / Float64(t1 + u)); else tmp = Float64(v / Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((u <= -5.5e+92) || ~((u <= 6.8e+41))) tmp = v / (t1 + u); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -5.5e+92], N[Not[LessEqual[u, 6.8e+41]], $MachinePrecision]], N[(v / N[(t1 + u), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -5.5 \cdot 10^{+92} \lor \neg \left(u \leq 6.8 \cdot 10^{+41}\right):\\
\;\;\;\;\frac{v}{t1 + u}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -5.50000000000000053e92 or 6.79999999999999996e41 < u Initial program 80.3%
times-frac97.3%
distribute-frac-neg97.3%
distribute-neg-frac297.3%
+-commutative97.3%
distribute-neg-in97.3%
unsub-neg97.3%
Simplified97.3%
Taylor expanded in t1 around inf 49.6%
frac-2neg49.6%
frac-times38.7%
add-sqr-sqrt19.2%
sqrt-unprod39.9%
sqr-neg39.9%
sqrt-unprod19.3%
add-sqr-sqrt38.6%
sub-neg38.6%
distribute-neg-in38.6%
+-commutative38.6%
remove-double-neg38.6%
Applied egg-rr38.6%
*-commutative38.6%
times-frac35.2%
*-inverses35.2%
*-lft-identity35.2%
Simplified35.2%
if -5.50000000000000053e92 < u < 6.79999999999999996e41Initial program 71.3%
associate-/l*71.3%
distribute-lft-neg-out71.3%
distribute-rgt-neg-in71.3%
associate-/r*81.2%
distribute-neg-frac281.2%
Simplified81.2%
Taylor expanded in t1 around inf 74.3%
associate-*r/74.3%
neg-mul-174.3%
Simplified74.3%
Final simplification58.4%
(FPCore (u v t1) :precision binary64 (if (or (<= u -1.5e+189) (not (<= u 6.8e+41))) (/ 1.0 (/ u v)) (/ v (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -1.5e+189) || !(u <= 6.8e+41)) {
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 <= (-1.5d+189)) .or. (.not. (u <= 6.8d+41))) 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 <= -1.5e+189) || !(u <= 6.8e+41)) {
tmp = 1.0 / (u / v);
} else {
tmp = v / -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -1.5e+189) or not (u <= 6.8e+41): tmp = 1.0 / (u / v) else: tmp = v / -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -1.5e+189) || !(u <= 6.8e+41)) tmp = Float64(1.0 / 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.5e+189) || ~((u <= 6.8e+41))) tmp = 1.0 / (u / v); else tmp = v / -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -1.5e+189], N[Not[LessEqual[u, 6.8e+41]], $MachinePrecision]], N[(1.0 / N[(u / v), $MachinePrecision]), $MachinePrecision], N[(v / (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -1.5 \cdot 10^{+189} \lor \neg \left(u \leq 6.8 \cdot 10^{+41}\right):\\
\;\;\;\;\frac{1}{\frac{u}{v}}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{-t1}\\
\end{array}
\end{array}
if u < -1.4999999999999999e189 or 6.79999999999999996e41 < u Initial program 77.6%
associate-/l*77.8%
distribute-lft-neg-out77.8%
distribute-rgt-neg-in77.8%
associate-/r*89.6%
distribute-neg-frac289.6%
Simplified89.6%
Taylor expanded in t1 around 0 84.8%
Taylor expanded in t1 around inf 32.6%
neg-mul-132.6%
distribute-neg-frac32.6%
Simplified32.6%
clear-num34.8%
inv-pow34.8%
add-sqr-sqrt14.7%
sqrt-unprod37.7%
sqr-neg37.7%
sqrt-unprod20.2%
add-sqr-sqrt35.2%
Applied egg-rr35.2%
unpow-135.2%
Simplified35.2%
if -1.4999999999999999e189 < u < 6.79999999999999996e41Initial program 73.6%
associate-/l*73.7%
distribute-lft-neg-out73.7%
distribute-rgt-neg-in73.7%
associate-/r*83.4%
distribute-neg-frac283.4%
Simplified83.4%
Taylor expanded in t1 around inf 68.0%
associate-*r/68.0%
neg-mul-168.0%
Simplified68.0%
Final simplification57.3%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -8.5e+135) (not (<= t1 3.5e+74))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -8.5e+135) || !(t1 <= 3.5e+74)) {
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 <= (-8.5d+135)) .or. (.not. (t1 <= 3.5d+74))) 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 <= -8.5e+135) || !(t1 <= 3.5e+74)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -8.5e+135) or not (t1 <= 3.5e+74): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -8.5e+135) || !(t1 <= 3.5e+74)) 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 <= -8.5e+135) || ~((t1 <= 3.5e+74))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -8.5e+135], N[Not[LessEqual[t1, 3.5e+74]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -8.5 \cdot 10^{+135} \lor \neg \left(t1 \leq 3.5 \cdot 10^{+74}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -8.49999999999999992e135 or 3.50000000000000014e74 < t1 Initial program 49.9%
associate-/l*48.7%
distribute-lft-neg-out48.7%
distribute-rgt-neg-in48.7%
associate-/r*71.9%
distribute-neg-frac271.9%
Simplified71.9%
Taylor expanded in t1 around inf 87.6%
associate-*r/87.6%
neg-mul-187.6%
Simplified87.6%
distribute-frac-neg87.6%
div-inv87.4%
distribute-rgt-neg-in87.4%
frac-2neg87.4%
metadata-eval87.4%
add-sqr-sqrt42.5%
sqrt-unprod40.5%
sqr-neg40.5%
sqrt-unprod16.4%
add-sqr-sqrt37.0%
Applied egg-rr37.0%
distribute-rgt-neg-out37.0%
associate-*r/37.0%
*-commutative37.0%
mul-1-neg37.0%
distribute-neg-frac37.0%
remove-double-neg37.0%
Simplified37.0%
if -8.49999999999999992e135 < t1 < 3.50000000000000014e74Initial program 84.7%
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 55.2%
Taylor expanded in v around 0 49.5%
associate-*r/49.5%
mul-1-neg49.5%
Simplified49.5%
clear-num49.3%
associate-/r/49.3%
add-sqr-sqrt26.2%
sqrt-unprod31.7%
sqr-neg31.7%
sqrt-unprod6.6%
add-sqr-sqrt15.4%
Applied egg-rr15.4%
Taylor expanded in t1 around 0 16.7%
Final simplification22.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(Float64(-v) / Float64(t1 + u)) * Float64(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 + u), $MachinePrecision]), $MachinePrecision] * N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{-v}{t1 + u} \cdot \frac{t1}{t1 + u}
\end{array}
Initial program 74.9%
times-frac98.5%
distribute-frac-neg98.5%
distribute-neg-frac298.5%
+-commutative98.5%
distribute-neg-in98.5%
unsub-neg98.5%
Simplified98.5%
Final simplification98.5%
(FPCore (u v t1) :precision binary64 (if (<= u 4.5e+108) (/ v (- t1)) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if (u <= 4.5e+108) {
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 <= 4.5d+108) 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 <= 4.5e+108) {
tmp = v / -t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= 4.5e+108: tmp = v / -t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if (u <= 4.5e+108) tmp = Float64(v / Float64(-t1)); else tmp = Float64(v / u); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= 4.5e+108) tmp = v / -t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, 4.5e+108], N[(v / (-t1)), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq 4.5 \cdot 10^{+108}:\\
\;\;\;\;\frac{v}{-t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if u < 4.5e108Initial program 74.3%
associate-/l*74.4%
distribute-lft-neg-out74.4%
distribute-rgt-neg-in74.4%
associate-/r*84.9%
distribute-neg-frac284.9%
Simplified84.9%
Taylor expanded in t1 around inf 59.5%
associate-*r/59.5%
neg-mul-159.5%
Simplified59.5%
if 4.5e108 < u Initial program 77.6%
times-frac97.8%
distribute-frac-neg97.8%
distribute-neg-frac297.8%
+-commutative97.8%
distribute-neg-in97.8%
unsub-neg97.8%
Simplified97.8%
Taylor expanded in t1 around inf 53.9%
Taylor expanded in v around 0 46.0%
associate-*r/46.0%
mul-1-neg46.0%
Simplified46.0%
clear-num47.5%
associate-/r/46.0%
add-sqr-sqrt23.2%
sqrt-unprod44.3%
sqr-neg44.3%
sqrt-unprod20.9%
add-sqr-sqrt40.7%
Applied egg-rr40.7%
Taylor expanded in t1 around 0 37.1%
Final simplification55.5%
(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(Float64(-v) / 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}{t1 + u}
\end{array}
Initial program 74.9%
times-frac98.5%
distribute-frac-neg98.5%
distribute-neg-frac298.5%
+-commutative98.5%
distribute-neg-in98.5%
unsub-neg98.5%
Simplified98.5%
Taylor expanded in t1 around inf 64.7%
Taylor expanded in v around 0 60.6%
associate-*r/60.6%
mul-1-neg60.6%
Simplified60.6%
(FPCore (u v t1) :precision binary64 (/ v (- u t1)))
double code(double u, double v, double t1) {
return v / (u - t1);
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = v / (u - t1)
end function
public static double code(double u, double v, double t1) {
return v / (u - t1);
}
def code(u, v, t1): return v / (u - t1)
function code(u, v, t1) return Float64(v / Float64(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.9%
times-frac98.5%
distribute-frac-neg98.5%
distribute-neg-frac298.5%
+-commutative98.5%
distribute-neg-in98.5%
unsub-neg98.5%
Simplified98.5%
Taylor expanded in t1 around inf 64.7%
Taylor expanded in v around 0 60.6%
associate-*r/60.6%
mul-1-neg60.6%
Simplified60.6%
frac-2neg60.6%
div-inv60.4%
remove-double-neg60.4%
+-commutative60.4%
distribute-neg-in60.4%
add-sqr-sqrt27.5%
sqrt-unprod66.7%
sqr-neg66.7%
sqrt-unprod32.3%
add-sqr-sqrt60.1%
Applied egg-rr60.1%
associate-*r/60.3%
*-rgt-identity60.3%
sub-neg60.3%
Simplified60.3%
(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.9%
associate-/l*75.0%
distribute-lft-neg-out75.0%
distribute-rgt-neg-in75.0%
associate-/r*85.4%
distribute-neg-frac285.4%
Simplified85.4%
Taylor expanded in t1 around inf 52.6%
associate-*r/52.6%
neg-mul-152.6%
Simplified52.6%
distribute-frac-neg52.6%
div-inv52.4%
distribute-rgt-neg-in52.4%
frac-2neg52.4%
metadata-eval52.4%
add-sqr-sqrt28.7%
sqrt-unprod28.3%
sqr-neg28.3%
sqrt-unprod5.9%
add-sqr-sqrt12.7%
Applied egg-rr12.7%
distribute-rgt-neg-out12.7%
associate-*r/12.7%
*-commutative12.7%
mul-1-neg12.7%
distribute-neg-frac12.7%
remove-double-neg12.7%
Simplified12.7%
herbie shell --seed 2024118
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))