
(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 14 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 (- -1.0 (/ u t1))) (+ u t1)))
double code(double u, double v, double t1) {
return (v / (-1.0 - (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 / ((-1.0d0) - (u / t1))) / (u + t1)
end function
public static double code(double u, double v, double t1) {
return (v / (-1.0 - (u / t1))) / (u + t1);
}
def code(u, v, t1): return (v / (-1.0 - (u / t1))) / (u + t1)
function code(u, v, t1) return Float64(Float64(v / Float64(-1.0 - Float64(u / t1))) / Float64(u + t1)) end
function tmp = code(u, v, t1) tmp = (v / (-1.0 - (u / t1))) / (u + t1); end
code[u_, v_, t1_] := N[(N[(v / N[(-1.0 - N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(u + t1), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{v}{-1 - \frac{u}{t1}}}{u + t1}
\end{array}
Initial program 75.3%
times-frac97.7%
neg-mul-197.7%
associate-/l*97.6%
associate-*l/97.7%
neg-mul-197.7%
distribute-frac-neg97.7%
+-commutative97.7%
remove-double-neg97.7%
unsub-neg97.7%
div-sub97.7%
sub-neg97.7%
distribute-frac-neg97.7%
remove-double-neg97.7%
*-inverses97.7%
Simplified97.7%
Taylor expanded in v around 0 96.5%
mul-1-neg96.5%
+-commutative96.5%
*-commutative96.5%
distribute-neg-frac96.5%
Simplified96.5%
neg-mul-196.5%
times-frac97.8%
Applied egg-rr97.8%
associate-*l/98.0%
associate-*r/98.0%
neg-mul-198.0%
+-commutative98.0%
Applied egg-rr98.0%
frac-2neg98.0%
div-inv97.9%
remove-double-neg97.9%
+-commutative97.9%
distribute-neg-in97.9%
metadata-eval97.9%
Applied egg-rr97.9%
associate-*r/98.0%
*-rgt-identity98.0%
unsub-neg98.0%
Simplified98.0%
Final simplification98.0%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (* v (/ (/ t1 u) (- t1 u)))) (t_2 (/ (- v) (+ t1 (* u 2.0)))))
(if (<= t1 -1.05e-38)
t_2
(if (<= t1 2.6e-130)
t_1
(if (<= t1 3.5e-91)
(* (/ (- v) t1) (/ t1 (+ u t1)))
(if (<= t1 4.5e-33) t_1 t_2))))))
double code(double u, double v, double t1) {
double t_1 = v * ((t1 / u) / (t1 - u));
double t_2 = -v / (t1 + (u * 2.0));
double tmp;
if (t1 <= -1.05e-38) {
tmp = t_2;
} else if (t1 <= 2.6e-130) {
tmp = t_1;
} else if (t1 <= 3.5e-91) {
tmp = (-v / t1) * (t1 / (u + t1));
} else if (t1 <= 4.5e-33) {
tmp = t_1;
} else {
tmp = t_2;
}
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 = v * ((t1 / u) / (t1 - u))
t_2 = -v / (t1 + (u * 2.0d0))
if (t1 <= (-1.05d-38)) then
tmp = t_2
else if (t1 <= 2.6d-130) then
tmp = t_1
else if (t1 <= 3.5d-91) then
tmp = (-v / t1) * (t1 / (u + t1))
else if (t1 <= 4.5d-33) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = v * ((t1 / u) / (t1 - u));
double t_2 = -v / (t1 + (u * 2.0));
double tmp;
if (t1 <= -1.05e-38) {
tmp = t_2;
} else if (t1 <= 2.6e-130) {
tmp = t_1;
} else if (t1 <= 3.5e-91) {
tmp = (-v / t1) * (t1 / (u + t1));
} else if (t1 <= 4.5e-33) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(u, v, t1): t_1 = v * ((t1 / u) / (t1 - u)) t_2 = -v / (t1 + (u * 2.0)) tmp = 0 if t1 <= -1.05e-38: tmp = t_2 elif t1 <= 2.6e-130: tmp = t_1 elif t1 <= 3.5e-91: tmp = (-v / t1) * (t1 / (u + t1)) elif t1 <= 4.5e-33: tmp = t_1 else: tmp = t_2 return tmp
function code(u, v, t1) t_1 = Float64(v * Float64(Float64(t1 / u) / Float64(t1 - u))) t_2 = Float64(Float64(-v) / Float64(t1 + Float64(u * 2.0))) tmp = 0.0 if (t1 <= -1.05e-38) tmp = t_2; elseif (t1 <= 2.6e-130) tmp = t_1; elseif (t1 <= 3.5e-91) tmp = Float64(Float64(Float64(-v) / t1) * Float64(t1 / Float64(u + t1))); elseif (t1 <= 4.5e-33) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(u, v, t1) t_1 = v * ((t1 / u) / (t1 - u)); t_2 = -v / (t1 + (u * 2.0)); tmp = 0.0; if (t1 <= -1.05e-38) tmp = t_2; elseif (t1 <= 2.6e-130) tmp = t_1; elseif (t1 <= 3.5e-91) tmp = (-v / t1) * (t1 / (u + t1)); elseif (t1 <= 4.5e-33) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(v * N[(N[(t1 / u), $MachinePrecision] / N[(t1 - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[((-v) / N[(t1 + N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -1.05e-38], t$95$2, If[LessEqual[t1, 2.6e-130], t$95$1, If[LessEqual[t1, 3.5e-91], N[(N[((-v) / t1), $MachinePrecision] * N[(t1 / N[(u + t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 4.5e-33], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := v \cdot \frac{\frac{t1}{u}}{t1 - u}\\
t_2 := \frac{-v}{t1 + u \cdot 2}\\
\mathbf{if}\;t1 \leq -1.05 \cdot 10^{-38}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t1 \leq 2.6 \cdot 10^{-130}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t1 \leq 3.5 \cdot 10^{-91}:\\
\;\;\;\;\frac{-v}{t1} \cdot \frac{t1}{u + t1}\\
\mathbf{elif}\;t1 \leq 4.5 \cdot 10^{-33}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t1 < -1.05000000000000006e-38 or 4.49999999999999991e-33 < t1 Initial program 68.7%
times-frac99.9%
neg-mul-199.9%
associate-/l*99.9%
associate-*l/99.9%
neg-mul-199.9%
distribute-frac-neg99.9%
+-commutative99.9%
remove-double-neg99.9%
unsub-neg99.9%
div-sub99.9%
sub-neg99.9%
distribute-frac-neg99.9%
remove-double-neg99.9%
*-inverses99.9%
Simplified99.9%
Taylor expanded in v around 0 96.9%
mul-1-neg96.9%
+-commutative96.9%
*-commutative96.9%
distribute-neg-frac96.9%
Simplified96.9%
Taylor expanded in t1 around inf 79.6%
*-commutative79.6%
Simplified79.6%
if -1.05000000000000006e-38 < t1 < 2.6000000000000001e-130 or 3.4999999999999999e-91 < t1 < 4.49999999999999991e-33Initial program 81.7%
times-frac95.0%
Simplified95.0%
clear-num95.0%
frac-2neg95.0%
frac-times95.8%
*-un-lft-identity95.8%
add-sqr-sqrt47.7%
sqrt-unprod50.2%
sqr-neg50.2%
sqrt-unprod18.6%
add-sqr-sqrt33.1%
add-sqr-sqrt15.4%
sqrt-unprod45.4%
sqr-neg45.4%
sqrt-unprod43.6%
add-sqr-sqrt95.8%
distribute-neg-in95.8%
add-sqr-sqrt52.1%
sqrt-unprod85.8%
sqr-neg85.8%
sqrt-unprod35.6%
add-sqr-sqrt80.6%
sub-neg80.6%
Applied egg-rr80.6%
Taylor expanded in t1 around 0 83.0%
clear-num83.0%
associate-/r/82.9%
*-un-lft-identity82.9%
associate-/r*83.3%
clear-num83.3%
*-un-lft-identity83.3%
Applied egg-rr83.3%
if 2.6000000000000001e-130 < t1 < 3.4999999999999999e-91Initial program 80.7%
times-frac99.8%
Simplified99.8%
Taylor expanded in t1 around inf 74.4%
Final simplification81.0%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ v (+ u t1))))
(if (<= u -2.6e-60)
(* (/ (- t1) u) t_1)
(if (<= u 1.26e-141) (/ (- v) t1) (/ (* t1 t_1) (- t1 u))))))
double code(double u, double v, double t1) {
double t_1 = v / (u + t1);
double tmp;
if (u <= -2.6e-60) {
tmp = (-t1 / u) * t_1;
} else if (u <= 1.26e-141) {
tmp = -v / t1;
} else {
tmp = (t1 * t_1) / (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) :: t_1
real(8) :: tmp
t_1 = v / (u + t1)
if (u <= (-2.6d-60)) then
tmp = (-t1 / u) * t_1
else if (u <= 1.26d-141) then
tmp = -v / t1
else
tmp = (t1 * t_1) / (t1 - u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double t_1 = v / (u + t1);
double tmp;
if (u <= -2.6e-60) {
tmp = (-t1 / u) * t_1;
} else if (u <= 1.26e-141) {
tmp = -v / t1;
} else {
tmp = (t1 * t_1) / (t1 - u);
}
return tmp;
}
def code(u, v, t1): t_1 = v / (u + t1) tmp = 0 if u <= -2.6e-60: tmp = (-t1 / u) * t_1 elif u <= 1.26e-141: tmp = -v / t1 else: tmp = (t1 * t_1) / (t1 - u) return tmp
function code(u, v, t1) t_1 = Float64(v / Float64(u + t1)) tmp = 0.0 if (u <= -2.6e-60) tmp = Float64(Float64(Float64(-t1) / u) * t_1); elseif (u <= 1.26e-141) tmp = Float64(Float64(-v) / t1); else tmp = Float64(Float64(t1 * t_1) / Float64(t1 - u)); end return tmp end
function tmp_2 = code(u, v, t1) t_1 = v / (u + t1); tmp = 0.0; if (u <= -2.6e-60) tmp = (-t1 / u) * t_1; elseif (u <= 1.26e-141) tmp = -v / t1; else tmp = (t1 * t_1) / (t1 - u); end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(v / N[(u + t1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[u, -2.6e-60], N[(N[((-t1) / u), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[u, 1.26e-141], N[((-v) / t1), $MachinePrecision], N[(N[(t1 * t$95$1), $MachinePrecision] / N[(t1 - u), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{v}{u + t1}\\
\mathbf{if}\;u \leq -2.6 \cdot 10^{-60}:\\
\;\;\;\;\frac{-t1}{u} \cdot t_1\\
\mathbf{elif}\;u \leq 1.26 \cdot 10^{-141}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1 \cdot t_1}{t1 - u}\\
\end{array}
\end{array}
if u < -2.5999999999999998e-60Initial program 78.8%
times-frac98.6%
Simplified98.6%
Taylor expanded in t1 around 0 79.9%
mul-1-neg30.5%
distribute-neg-frac30.5%
Simplified79.9%
if -2.5999999999999998e-60 < u < 1.26e-141Initial program 65.0%
times-frac95.5%
Simplified95.5%
Taylor expanded in t1 around inf 80.1%
associate-*r/80.1%
neg-mul-180.1%
Simplified80.1%
if 1.26e-141 < u Initial program 81.7%
times-frac98.8%
Simplified98.8%
frac-2neg98.8%
remove-double-neg98.8%
associate-*l/98.8%
distribute-neg-in98.8%
add-sqr-sqrt37.0%
sqrt-unprod80.1%
sqr-neg80.1%
sqrt-unprod48.3%
add-sqr-sqrt78.1%
sub-neg78.1%
Applied egg-rr78.1%
Final simplification79.4%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1.2e-38) (not (<= t1 6.8e-32))) (/ (- v) (+ t1 (* u 2.0))) (* (/ t1 u) (/ v (- t1 u)))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.2e-38) || !(t1 <= 6.8e-32)) {
tmp = -v / (t1 + (u * 2.0));
} else {
tmp = (t1 / u) * (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 ((t1 <= (-1.2d-38)) .or. (.not. (t1 <= 6.8d-32))) then
tmp = -v / (t1 + (u * 2.0d0))
else
tmp = (t1 / u) * (v / (t1 - u))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.2e-38) || !(t1 <= 6.8e-32)) {
tmp = -v / (t1 + (u * 2.0));
} else {
tmp = (t1 / u) * (v / (t1 - u));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.2e-38) or not (t1 <= 6.8e-32): tmp = -v / (t1 + (u * 2.0)) else: tmp = (t1 / u) * (v / (t1 - u)) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.2e-38) || !(t1 <= 6.8e-32)) tmp = Float64(Float64(-v) / Float64(t1 + Float64(u * 2.0))); else tmp = Float64(Float64(t1 / u) * Float64(v / Float64(t1 - u))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -1.2e-38) || ~((t1 <= 6.8e-32))) tmp = -v / (t1 + (u * 2.0)); else tmp = (t1 / u) * (v / (t1 - u)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.2e-38], N[Not[LessEqual[t1, 6.8e-32]], $MachinePrecision]], N[((-v) / N[(t1 + N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t1 / u), $MachinePrecision] * N[(v / N[(t1 - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.2 \cdot 10^{-38} \lor \neg \left(t1 \leq 6.8 \cdot 10^{-32}\right):\\
\;\;\;\;\frac{-v}{t1 + u \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{u} \cdot \frac{v}{t1 - u}\\
\end{array}
\end{array}
if t1 < -1.20000000000000011e-38 or 6.79999999999999956e-32 < t1 Initial program 68.7%
times-frac99.9%
neg-mul-199.9%
associate-/l*99.9%
associate-*l/99.9%
neg-mul-199.9%
distribute-frac-neg99.9%
+-commutative99.9%
remove-double-neg99.9%
unsub-neg99.9%
div-sub99.9%
sub-neg99.9%
distribute-frac-neg99.9%
remove-double-neg99.9%
*-inverses99.9%
Simplified99.9%
Taylor expanded in v around 0 96.9%
mul-1-neg96.9%
+-commutative96.9%
*-commutative96.9%
distribute-neg-frac96.9%
Simplified96.9%
Taylor expanded in t1 around inf 79.6%
*-commutative79.6%
Simplified79.6%
if -1.20000000000000011e-38 < t1 < 6.79999999999999956e-32Initial program 81.6%
times-frac95.6%
Simplified95.6%
clear-num95.5%
frac-2neg95.5%
frac-times96.1%
*-un-lft-identity96.1%
add-sqr-sqrt45.3%
sqrt-unprod48.2%
sqr-neg48.2%
sqrt-unprod17.9%
add-sqr-sqrt31.6%
add-sqr-sqrt13.7%
sqrt-unprod51.4%
sqr-neg51.4%
sqrt-unprod49.7%
add-sqr-sqrt96.1%
distribute-neg-in96.1%
add-sqr-sqrt46.2%
sqrt-unprod80.5%
sqr-neg80.5%
sqrt-unprod36.0%
add-sqr-sqrt75.9%
sub-neg75.9%
Applied egg-rr75.9%
Taylor expanded in t1 around 0 78.8%
*-un-lft-identity78.8%
*-un-lft-identity78.8%
times-frac78.3%
clear-num78.3%
*-un-lft-identity78.3%
Applied egg-rr78.3%
Final simplification78.9%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1.45e-39) (not (<= t1 1.75e-33))) (/ (- v) (+ t1 (* u 2.0))) (* v (/ (/ t1 u) (- t1 u)))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.45e-39) || !(t1 <= 1.75e-33)) {
tmp = -v / (t1 + (u * 2.0));
} 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 ((t1 <= (-1.45d-39)) .or. (.not. (t1 <= 1.75d-33))) then
tmp = -v / (t1 + (u * 2.0d0))
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 ((t1 <= -1.45e-39) || !(t1 <= 1.75e-33)) {
tmp = -v / (t1 + (u * 2.0));
} else {
tmp = v * ((t1 / u) / (t1 - u));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.45e-39) or not (t1 <= 1.75e-33): tmp = -v / (t1 + (u * 2.0)) else: tmp = v * ((t1 / u) / (t1 - u)) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.45e-39) || !(t1 <= 1.75e-33)) tmp = Float64(Float64(-v) / Float64(t1 + Float64(u * 2.0))); else tmp = Float64(v * Float64(Float64(t1 / u) / Float64(t1 - u))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -1.45e-39) || ~((t1 <= 1.75e-33))) tmp = -v / (t1 + (u * 2.0)); else tmp = v * ((t1 / u) / (t1 - u)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.45e-39], N[Not[LessEqual[t1, 1.75e-33]], $MachinePrecision]], N[((-v) / N[(t1 + N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(v * N[(N[(t1 / u), $MachinePrecision] / N[(t1 - u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.45 \cdot 10^{-39} \lor \neg \left(t1 \leq 1.75 \cdot 10^{-33}\right):\\
\;\;\;\;\frac{-v}{t1 + u \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;v \cdot \frac{\frac{t1}{u}}{t1 - u}\\
\end{array}
\end{array}
if t1 < -1.44999999999999994e-39 or 1.7499999999999999e-33 < t1 Initial program 68.7%
times-frac99.9%
neg-mul-199.9%
associate-/l*99.9%
associate-*l/99.9%
neg-mul-199.9%
distribute-frac-neg99.9%
+-commutative99.9%
remove-double-neg99.9%
unsub-neg99.9%
div-sub99.9%
sub-neg99.9%
distribute-frac-neg99.9%
remove-double-neg99.9%
*-inverses99.9%
Simplified99.9%
Taylor expanded in v around 0 96.9%
mul-1-neg96.9%
+-commutative96.9%
*-commutative96.9%
distribute-neg-frac96.9%
Simplified96.9%
Taylor expanded in t1 around inf 79.6%
*-commutative79.6%
Simplified79.6%
if -1.44999999999999994e-39 < t1 < 1.7499999999999999e-33Initial program 81.6%
times-frac95.6%
Simplified95.6%
clear-num95.5%
frac-2neg95.5%
frac-times96.1%
*-un-lft-identity96.1%
add-sqr-sqrt45.3%
sqrt-unprod48.2%
sqr-neg48.2%
sqrt-unprod17.9%
add-sqr-sqrt31.6%
add-sqr-sqrt13.7%
sqrt-unprod51.4%
sqr-neg51.4%
sqrt-unprod49.7%
add-sqr-sqrt96.1%
distribute-neg-in96.1%
add-sqr-sqrt46.2%
sqrt-unprod80.5%
sqr-neg80.5%
sqrt-unprod36.0%
add-sqr-sqrt75.9%
sub-neg75.9%
Applied egg-rr75.9%
Taylor expanded in t1 around 0 78.8%
clear-num78.8%
associate-/r/78.7%
*-un-lft-identity78.7%
associate-/r*79.1%
clear-num79.1%
*-un-lft-identity79.1%
Applied egg-rr79.1%
Final simplification79.3%
(FPCore (u v t1) :precision binary64 (/ (/ v (+ u t1)) (- -1.0 (/ u t1))))
double code(double u, double v, double t1) {
return (v / (u + t1)) / (-1.0 - (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)) / ((-1.0d0) - (u / t1))
end function
public static double code(double u, double v, double t1) {
return (v / (u + t1)) / (-1.0 - (u / t1));
}
def code(u, v, t1): return (v / (u + t1)) / (-1.0 - (u / t1))
function code(u, v, t1) return Float64(Float64(v / Float64(u + t1)) / Float64(-1.0 - Float64(u / t1))) end
function tmp = code(u, v, t1) tmp = (v / (u + t1)) / (-1.0 - (u / t1)); end
code[u_, v_, t1_] := N[(N[(v / N[(u + t1), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - N[(u / t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{v}{u + t1}}{-1 - \frac{u}{t1}}
\end{array}
Initial program 75.3%
times-frac97.7%
neg-mul-197.7%
associate-/l*97.6%
associate-*l/97.7%
neg-mul-197.7%
distribute-frac-neg97.7%
+-commutative97.7%
remove-double-neg97.7%
unsub-neg97.7%
div-sub97.7%
sub-neg97.7%
distribute-frac-neg97.7%
remove-double-neg97.7%
*-inverses97.7%
Simplified97.7%
Taylor expanded in v around 0 96.5%
mul-1-neg96.5%
+-commutative96.5%
*-commutative96.5%
distribute-neg-frac96.5%
Simplified96.5%
neg-mul-196.5%
times-frac97.8%
Applied egg-rr97.8%
Taylor expanded in v around 0 96.5%
*-commutative96.5%
associate-/r*98.0%
+-commutative98.0%
+-commutative98.0%
metadata-eval98.0%
times-frac98.0%
*-rgt-identity98.0%
associate-/l/96.5%
associate-*l*96.5%
neg-mul-196.5%
+-commutative96.5%
distribute-neg-in96.5%
metadata-eval96.5%
associate-/r*97.7%
unsub-neg97.7%
Simplified97.7%
Final simplification97.7%
(FPCore (u v t1) :precision binary64 (if (<= u -5.6e+246) (/ (- v) u) (if (<= u 9e+144) (/ (- v) t1) (/ 1.0 (/ (- u) v)))))
double code(double u, double v, double t1) {
double tmp;
if (u <= -5.6e+246) {
tmp = -v / u;
} else if (u <= 9e+144) {
tmp = -v / t1;
} else {
tmp = 1.0 / (-u / v);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if (u <= (-5.6d+246)) then
tmp = -v / u
else if (u <= 9d+144) then
tmp = -v / t1
else
tmp = 1.0d0 / (-u / v)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= -5.6e+246) {
tmp = -v / u;
} else if (u <= 9e+144) {
tmp = -v / t1;
} else {
tmp = 1.0 / (-u / v);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= -5.6e+246: tmp = -v / u elif u <= 9e+144: tmp = -v / t1 else: tmp = 1.0 / (-u / v) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= -5.6e+246) tmp = Float64(Float64(-v) / u); elseif (u <= 9e+144) tmp = Float64(Float64(-v) / t1); else tmp = Float64(1.0 / Float64(Float64(-u) / v)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= -5.6e+246) tmp = -v / u; elseif (u <= 9e+144) tmp = -v / t1; else tmp = 1.0 / (-u / v); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, -5.6e+246], N[((-v) / u), $MachinePrecision], If[LessEqual[u, 9e+144], N[((-v) / t1), $MachinePrecision], N[(1.0 / N[((-u) / v), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -5.6 \cdot 10^{+246}:\\
\;\;\;\;\frac{-v}{u}\\
\mathbf{elif}\;u \leq 9 \cdot 10^{+144}:\\
\;\;\;\;\frac{-v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{-u}{v}}\\
\end{array}
\end{array}
if u < -5.59999999999999976e246Initial program 94.6%
times-frac99.9%
Simplified99.9%
Taylor expanded in t1 around inf 57.8%
Taylor expanded in t1 around 0 42.5%
associate-*r/42.5%
neg-mul-142.5%
Simplified42.5%
if -5.59999999999999976e246 < u < 8.99999999999999935e144Initial program 72.4%
times-frac97.1%
Simplified97.1%
Taylor expanded in t1 around inf 55.7%
associate-*r/55.7%
neg-mul-155.7%
Simplified55.7%
if 8.99999999999999935e144 < u Initial program 84.1%
times-frac99.8%
Simplified99.8%
clear-num99.9%
frac-2neg99.9%
frac-times90.8%
*-un-lft-identity90.8%
add-sqr-sqrt49.9%
sqrt-unprod84.3%
sqr-neg84.3%
sqrt-unprod37.7%
add-sqr-sqrt81.3%
add-sqr-sqrt23.3%
sqrt-unprod77.3%
sqr-neg77.3%
sqrt-unprod67.5%
add-sqr-sqrt90.8%
distribute-neg-in90.8%
add-sqr-sqrt23.3%
sqrt-unprod87.7%
sqr-neg87.7%
sqrt-unprod67.5%
add-sqr-sqrt90.8%
sub-neg90.8%
Applied egg-rr90.8%
Taylor expanded in t1 around inf 52.8%
clear-num53.4%
inv-pow53.4%
*-un-lft-identity53.4%
Applied egg-rr53.4%
unpow-153.4%
Simplified53.4%
Taylor expanded in t1 around 0 53.4%
neg-mul-153.4%
distribute-neg-frac53.4%
Simplified53.4%
Final simplification54.5%
(FPCore (u v t1) :precision binary64 (if (<= u 5.2e+147) (/ (- v) (+ u t1)) (* (/ (- t1) u) (/ v t1))))
double code(double u, double v, double t1) {
double tmp;
if (u <= 5.2e+147) {
tmp = -v / (u + t1);
} else {
tmp = (-t1 / u) * (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.2d+147) then
tmp = -v / (u + t1)
else
tmp = (-t1 / u) * (v / t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= 5.2e+147) {
tmp = -v / (u + t1);
} else {
tmp = (-t1 / u) * (v / t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= 5.2e+147: tmp = -v / (u + t1) else: tmp = (-t1 / u) * (v / t1) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= 5.2e+147) tmp = Float64(Float64(-v) / Float64(u + t1)); else tmp = Float64(Float64(Float64(-t1) / u) * Float64(v / t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= 5.2e+147) tmp = -v / (u + t1); else tmp = (-t1 / u) * (v / t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, 5.2e+147], N[((-v) / N[(u + t1), $MachinePrecision]), $MachinePrecision], N[(N[((-t1) / u), $MachinePrecision] * N[(v / t1), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq 5.2 \cdot 10^{+147}:\\
\;\;\;\;\frac{-v}{u + t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{-t1}{u} \cdot \frac{v}{t1}\\
\end{array}
\end{array}
if u < 5.1999999999999997e147Initial program 74.4%
times-frac97.4%
Simplified97.4%
Taylor expanded in t1 around inf 58.6%
Taylor expanded in v around 0 55.4%
associate-*r/55.4%
neg-mul-155.4%
+-commutative55.4%
Simplified55.4%
if 5.1999999999999997e147 < u Initial program 83.1%
times-frac99.8%
Simplified99.8%
Taylor expanded in t1 around inf 73.0%
Taylor expanded in t1 around 0 73.0%
mul-1-neg73.0%
distribute-neg-frac73.0%
Simplified73.0%
Final simplification57.3%
(FPCore (u v t1) :precision binary64 (if (<= u 1e+154) (/ (- v) (+ t1 (* u 2.0))) (* (/ (- t1) u) (/ v t1))))
double code(double u, double v, double t1) {
double tmp;
if (u <= 1e+154) {
tmp = -v / (t1 + (u * 2.0));
} else {
tmp = (-t1 / u) * (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 <= 1d+154) then
tmp = -v / (t1 + (u * 2.0d0))
else
tmp = (-t1 / u) * (v / t1)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (u <= 1e+154) {
tmp = -v / (t1 + (u * 2.0));
} else {
tmp = (-t1 / u) * (v / t1);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if u <= 1e+154: tmp = -v / (t1 + (u * 2.0)) else: tmp = (-t1 / u) * (v / t1) return tmp
function code(u, v, t1) tmp = 0.0 if (u <= 1e+154) tmp = Float64(Float64(-v) / Float64(t1 + Float64(u * 2.0))); else tmp = Float64(Float64(Float64(-t1) / u) * Float64(v / t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (u <= 1e+154) tmp = -v / (t1 + (u * 2.0)); else tmp = (-t1 / u) * (v / t1); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[u, 1e+154], N[((-v) / N[(t1 + N[(u * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[((-t1) / u), $MachinePrecision] * N[(v / t1), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq 10^{+154}:\\
\;\;\;\;\frac{-v}{t1 + u \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{-t1}{u} \cdot \frac{v}{t1}\\
\end{array}
\end{array}
if u < 1.00000000000000004e154Initial program 74.5%
times-frac97.4%
neg-mul-197.4%
associate-/l*97.4%
associate-*l/97.4%
neg-mul-197.4%
distribute-frac-neg97.4%
+-commutative97.4%
remove-double-neg97.4%
unsub-neg97.4%
div-sub97.4%
sub-neg97.4%
distribute-frac-neg97.4%
remove-double-neg97.4%
*-inverses97.4%
Simplified97.4%
Taylor expanded in v around 0 97.2%
mul-1-neg97.2%
+-commutative97.2%
*-commutative97.2%
distribute-neg-frac97.2%
Simplified97.2%
Taylor expanded in t1 around inf 56.1%
*-commutative56.1%
Simplified56.1%
if 1.00000000000000004e154 < u Initial program 82.4%
times-frac99.8%
Simplified99.8%
Taylor expanded in t1 around inf 75.5%
Taylor expanded in t1 around 0 75.5%
mul-1-neg75.5%
distribute-neg-frac75.5%
Simplified75.5%
Final simplification58.1%
(FPCore (u v t1) :precision binary64 (if (or (<= u -5.6e+246) (not (<= u 6.6e+146))) (/ v u) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -5.6e+246) || !(u <= 6.6e+146)) {
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 <= (-5.6d+246)) .or. (.not. (u <= 6.6d+146))) 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 <= -5.6e+246) || !(u <= 6.6e+146)) {
tmp = v / u;
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -5.6e+246) or not (u <= 6.6e+146): tmp = v / u else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -5.6e+246) || !(u <= 6.6e+146)) 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 <= -5.6e+246) || ~((u <= 6.6e+146))) tmp = v / u; else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -5.6e+246], N[Not[LessEqual[u, 6.6e+146]], $MachinePrecision]], N[(v / u), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -5.6 \cdot 10^{+246} \lor \neg \left(u \leq 6.6 \cdot 10^{+146}\right):\\
\;\;\;\;\frac{v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -5.59999999999999976e246 or 6.60000000000000032e146 < u Initial program 87.9%
times-frac99.9%
Simplified99.9%
clear-num99.9%
frac-2neg99.9%
frac-times92.1%
*-un-lft-identity92.1%
add-sqr-sqrt46.8%
sqrt-unprod85.8%
sqr-neg85.8%
sqrt-unprod43.2%
add-sqr-sqrt88.0%
add-sqr-sqrt36.4%
sqrt-unprod79.3%
sqr-neg79.3%
sqrt-unprod55.7%
add-sqr-sqrt92.1%
distribute-neg-in92.1%
add-sqr-sqrt36.4%
sqrt-unprod90.1%
sqr-neg90.1%
sqrt-unprod55.7%
add-sqr-sqrt92.1%
sub-neg92.1%
Applied egg-rr92.1%
Taylor expanded in t1 around 0 92.1%
Taylor expanded in u around 0 49.6%
if -5.59999999999999976e246 < u < 6.60000000000000032e146Initial program 72.5%
times-frac97.2%
Simplified97.2%
Taylor expanded in t1 around inf 55.5%
associate-*r/55.5%
neg-mul-155.5%
Simplified55.5%
Final simplification54.4%
(FPCore (u v t1) :precision binary64 (if (or (<= u -3.2e+248) (not (<= u 8e+144))) (/ (- v) u) (/ (- v) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((u <= -3.2e+248) || !(u <= 8e+144)) {
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.2d+248)) .or. (.not. (u <= 8d+144))) 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.2e+248) || !(u <= 8e+144)) {
tmp = -v / u;
} else {
tmp = -v / t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (u <= -3.2e+248) or not (u <= 8e+144): tmp = -v / u else: tmp = -v / t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((u <= -3.2e+248) || !(u <= 8e+144)) tmp = Float64(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.2e+248) || ~((u <= 8e+144))) tmp = -v / u; else tmp = -v / t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[u, -3.2e+248], N[Not[LessEqual[u, 8e+144]], $MachinePrecision]], N[((-v) / u), $MachinePrecision], N[((-v) / t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;u \leq -3.2 \cdot 10^{+248} \lor \neg \left(u \leq 8 \cdot 10^{+144}\right):\\
\;\;\;\;\frac{-v}{u}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{t1}\\
\end{array}
\end{array}
if u < -3.19999999999999985e248 or 8.00000000000000019e144 < u Initial program 88.1%
times-frac99.9%
Simplified99.9%
Taylor expanded in t1 around inf 64.4%
Taylor expanded in t1 around 0 48.9%
associate-*r/48.9%
neg-mul-148.9%
Simplified48.9%
if -3.19999999999999985e248 < u < 8.00000000000000019e144Initial program 72.4%
times-frac97.1%
Simplified97.1%
Taylor expanded in t1 around inf 55.7%
associate-*r/55.7%
neg-mul-155.7%
Simplified55.7%
Final simplification54.5%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -6.8e+66) (not (<= t1 1.4e+111))) (/ v t1) (/ v u)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -6.8e+66) || !(t1 <= 1.4e+111)) {
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 <= (-6.8d+66)) .or. (.not. (t1 <= 1.4d+111))) 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 <= -6.8e+66) || !(t1 <= 1.4e+111)) {
tmp = v / t1;
} else {
tmp = v / u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -6.8e+66) or not (t1 <= 1.4e+111): tmp = v / t1 else: tmp = v / u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -6.8e+66) || !(t1 <= 1.4e+111)) 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 <= -6.8e+66) || ~((t1 <= 1.4e+111))) tmp = v / t1; else tmp = v / u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -6.8e+66], N[Not[LessEqual[t1, 1.4e+111]], $MachinePrecision]], N[(v / t1), $MachinePrecision], N[(v / u), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -6.8 \cdot 10^{+66} \lor \neg \left(t1 \leq 1.4 \cdot 10^{+111}\right):\\
\;\;\;\;\frac{v}{t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u}\\
\end{array}
\end{array}
if t1 < -6.8000000000000006e66 or 1.4e111 < t1 Initial program 56.9%
times-frac99.9%
Simplified99.9%
clear-num99.9%
frac-2neg99.9%
frac-times96.5%
*-un-lft-identity96.5%
add-sqr-sqrt37.0%
sqrt-unprod55.1%
sqr-neg55.1%
sqrt-unprod26.4%
add-sqr-sqrt44.3%
add-sqr-sqrt19.0%
sqrt-unprod23.6%
sqr-neg23.6%
sqrt-unprod58.0%
add-sqr-sqrt96.5%
distribute-neg-in96.5%
add-sqr-sqrt38.1%
sqrt-unprod50.9%
sqr-neg50.9%
sqrt-unprod29.1%
add-sqr-sqrt50.3%
sub-neg50.3%
Applied egg-rr50.3%
Taylor expanded in t1 around inf 40.6%
if -6.8000000000000006e66 < t1 < 1.4e111Initial program 83.9%
times-frac96.6%
Simplified96.6%
clear-num96.6%
frac-2neg96.6%
frac-times96.4%
*-un-lft-identity96.4%
add-sqr-sqrt43.8%
sqrt-unprod47.0%
sqr-neg47.0%
sqrt-unprod17.7%
add-sqr-sqrt32.1%
add-sqr-sqrt13.1%
sqrt-unprod55.8%
sqr-neg55.8%
sqrt-unprod51.7%
add-sqr-sqrt96.4%
distribute-neg-in96.4%
add-sqr-sqrt44.5%
sqrt-unprod78.2%
sqr-neg78.2%
sqrt-unprod34.9%
add-sqr-sqrt69.4%
sub-neg69.4%
Applied egg-rr69.4%
Taylor expanded in t1 around 0 71.2%
Taylor expanded in u around 0 17.6%
Final simplification24.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(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 75.3%
times-frac97.7%
Simplified97.7%
Taylor expanded in t1 around inf 60.2%
Taylor expanded in v around 0 55.5%
associate-*r/55.5%
neg-mul-155.5%
+-commutative55.5%
Simplified55.5%
Final simplification55.5%
(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 75.3%
times-frac97.7%
Simplified97.7%
clear-num97.6%
frac-2neg97.6%
frac-times96.5%
*-un-lft-identity96.5%
add-sqr-sqrt41.7%
sqrt-unprod49.6%
sqr-neg49.6%
sqrt-unprod20.5%
add-sqr-sqrt36.0%
add-sqr-sqrt15.0%
sqrt-unprod45.6%
sqr-neg45.6%
sqrt-unprod53.7%
add-sqr-sqrt96.5%
distribute-neg-in96.5%
add-sqr-sqrt42.4%
sqrt-unprod69.6%
sqr-neg69.6%
sqrt-unprod33.1%
add-sqr-sqrt63.3%
sub-neg63.3%
Applied egg-rr63.3%
Taylor expanded in t1 around inf 14.8%
Final simplification14.8%
herbie shell --seed 2023314
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))