
(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 (+ u t1)) t1) (- (+ u t1))))
double code(double u, double v, double t1) {
return ((v / (u + t1)) * 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 / (u + t1)) * t1) / -(u + t1)
end function
public static double code(double u, double v, double t1) {
return ((v / (u + t1)) * t1) / -(u + t1);
}
def code(u, v, t1): return ((v / (u + t1)) * t1) / -(u + t1)
function code(u, v, t1) return Float64(Float64(Float64(v / Float64(u + t1)) * t1) / Float64(-Float64(u + t1))) end
function tmp = code(u, v, t1) tmp = ((v / (u + t1)) * t1) / -(u + t1); end
code[u_, v_, t1_] := N[(N[(N[(v / N[(u + t1), $MachinePrecision]), $MachinePrecision] * t1), $MachinePrecision] / (-N[(u + t1), $MachinePrecision])), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{v}{u + t1} \cdot t1}{-\left(u + t1\right)}
\end{array}
Initial program 69.1%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
*-commutativeN/A
lift-neg.f64N/A
distribute-frac-negN/A
distribute-frac-neg2N/A
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-neg.f6498.4
lift-+.f64N/A
+-commutativeN/A
lower-+.f6498.4
Applied rewrites98.4%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))
(t_2 (/ (* v 1.0) (- (+ u t1)))))
(if (<= t1 -4.8e+75)
t_2
(if (<= t1 -9.4e-145)
t_1
(if (<= t1 6.5e-114)
(/ t1 (* (- u) (/ u v)))
(if (<= t1 2.4e+109) t_1 t_2))))))
double code(double u, double v, double t1) {
double t_1 = (-t1 * v) / ((t1 + u) * (t1 + u));
double t_2 = (v * 1.0) / -(u + t1);
double tmp;
if (t1 <= -4.8e+75) {
tmp = t_2;
} else if (t1 <= -9.4e-145) {
tmp = t_1;
} else if (t1 <= 6.5e-114) {
tmp = t1 / (-u * (u / v));
} else if (t1 <= 2.4e+109) {
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 = (-t1 * v) / ((t1 + u) * (t1 + u))
t_2 = (v * 1.0d0) / -(u + t1)
if (t1 <= (-4.8d+75)) then
tmp = t_2
else if (t1 <= (-9.4d-145)) then
tmp = t_1
else if (t1 <= 6.5d-114) then
tmp = t1 / (-u * (u / v))
else if (t1 <= 2.4d+109) 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 = (-t1 * v) / ((t1 + u) * (t1 + u));
double t_2 = (v * 1.0) / -(u + t1);
double tmp;
if (t1 <= -4.8e+75) {
tmp = t_2;
} else if (t1 <= -9.4e-145) {
tmp = t_1;
} else if (t1 <= 6.5e-114) {
tmp = t1 / (-u * (u / v));
} else if (t1 <= 2.4e+109) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(u, v, t1): t_1 = (-t1 * v) / ((t1 + u) * (t1 + u)) t_2 = (v * 1.0) / -(u + t1) tmp = 0 if t1 <= -4.8e+75: tmp = t_2 elif t1 <= -9.4e-145: tmp = t_1 elif t1 <= 6.5e-114: tmp = t1 / (-u * (u / v)) elif t1 <= 2.4e+109: tmp = t_1 else: tmp = t_2 return tmp
function code(u, v, t1) t_1 = Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u))) t_2 = Float64(Float64(v * 1.0) / Float64(-Float64(u + t1))) tmp = 0.0 if (t1 <= -4.8e+75) tmp = t_2; elseif (t1 <= -9.4e-145) tmp = t_1; elseif (t1 <= 6.5e-114) tmp = Float64(t1 / Float64(Float64(-u) * Float64(u / v))); elseif (t1 <= 2.4e+109) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(u, v, t1) t_1 = (-t1 * v) / ((t1 + u) * (t1 + u)); t_2 = (v * 1.0) / -(u + t1); tmp = 0.0; if (t1 <= -4.8e+75) tmp = t_2; elseif (t1 <= -9.4e-145) tmp = t_1; elseif (t1 <= 6.5e-114) tmp = t1 / (-u * (u / v)); elseif (t1 <= 2.4e+109) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[u_, v_, t1_] := Block[{t$95$1 = N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(v * 1.0), $MachinePrecision] / (-N[(u + t1), $MachinePrecision])), $MachinePrecision]}, If[LessEqual[t1, -4.8e+75], t$95$2, If[LessEqual[t1, -9.4e-145], t$95$1, If[LessEqual[t1, 6.5e-114], N[(t1 / N[((-u) * N[(u / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t1, 2.4e+109], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\
t_2 := \frac{v \cdot 1}{-\left(u + t1\right)}\\
\mathbf{if}\;t1 \leq -4.8 \cdot 10^{+75}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t1 \leq -9.4 \cdot 10^{-145}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t1 \leq 6.5 \cdot 10^{-114}:\\
\;\;\;\;\frac{t1}{\left(-u\right) \cdot \frac{u}{v}}\\
\mathbf{elif}\;t1 \leq 2.4 \cdot 10^{+109}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t1 < -4.8e75 or 2.39999999999999987e109 < t1 Initial program 42.8%
lift-/.f64N/A
frac-2negN/A
distribute-frac-neg2N/A
neg-mul-1N/A
associate-/l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift-*.f64N/A
lift-neg.f64N/A
distribute-lft-neg-outN/A
remove-double-negN/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6499.5
lift-+.f64N/A
+-commutativeN/A
lower-+.f6499.5
Applied rewrites99.5%
Taylor expanded in u around 0
Applied rewrites91.3%
lift-*.f64N/A
lift-+.f64N/A
lift-/.f64N/A
associate-*l/N/A
+-commutativeN/A
lift-+.f64N/A
lower-/.f64N/A
lift-*.f64N/A
associate-*r*N/A
neg-mul-1N/A
lower-*.f64N/A
lower-neg.f6491.7
lift-+.f64N/A
+-commutativeN/A
lift-+.f6491.7
Applied rewrites91.7%
if -4.8e75 < t1 < -9.4000000000000004e-145 or 6.4999999999999998e-114 < t1 < 2.39999999999999987e109Initial program 95.6%
if -9.4000000000000004e-145 < t1 < 6.4999999999999998e-114Initial program 75.8%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
times-fracN/A
clear-numN/A
frac-2negN/A
frac-timesN/A
metadata-evalN/A
lift-neg.f64N/A
remove-double-negN/A
distribute-lft-neg-inN/A
neg-mul-1N/A
remove-double-negN/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-neg.f6492.9
lift-+.f64N/A
+-commutativeN/A
lower-+.f6492.9
Applied rewrites92.9%
Taylor expanded in u around inf
*-commutativeN/A
unpow2N/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f6488.9
Applied rewrites88.9%
Final simplification92.2%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1.65e-123) (not (<= t1 1450.0))) (/ (* v 1.0) (- (+ u t1))) (/ t1 (* (- u) (/ u v)))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.65e-123) || !(t1 <= 1450.0)) {
tmp = (v * 1.0) / -(u + t1);
} else {
tmp = t1 / (-u * (u / v));
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-1.65d-123)) .or. (.not. (t1 <= 1450.0d0))) then
tmp = (v * 1.0d0) / -(u + t1)
else
tmp = t1 / (-u * (u / v))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.65e-123) || !(t1 <= 1450.0)) {
tmp = (v * 1.0) / -(u + t1);
} else {
tmp = t1 / (-u * (u / v));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.65e-123) or not (t1 <= 1450.0): tmp = (v * 1.0) / -(u + t1) else: tmp = t1 / (-u * (u / v)) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.65e-123) || !(t1 <= 1450.0)) tmp = Float64(Float64(v * 1.0) / Float64(-Float64(u + t1))); else tmp = Float64(t1 / Float64(Float64(-u) * Float64(u / v))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -1.65e-123) || ~((t1 <= 1450.0))) tmp = (v * 1.0) / -(u + t1); else tmp = t1 / (-u * (u / v)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.65e-123], N[Not[LessEqual[t1, 1450.0]], $MachinePrecision]], N[(N[(v * 1.0), $MachinePrecision] / (-N[(u + t1), $MachinePrecision])), $MachinePrecision], N[(t1 / N[((-u) * N[(u / v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.65 \cdot 10^{-123} \lor \neg \left(t1 \leq 1450\right):\\
\;\;\;\;\frac{v \cdot 1}{-\left(u + t1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{\left(-u\right) \cdot \frac{u}{v}}\\
\end{array}
\end{array}
if t1 < -1.6500000000000001e-123 or 1450 < t1 Initial program 62.4%
lift-/.f64N/A
frac-2negN/A
distribute-frac-neg2N/A
neg-mul-1N/A
associate-/l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift-*.f64N/A
lift-neg.f64N/A
distribute-lft-neg-outN/A
remove-double-negN/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6499.6
lift-+.f64N/A
+-commutativeN/A
lower-+.f6499.6
Applied rewrites99.6%
Taylor expanded in u around 0
Applied rewrites85.3%
lift-*.f64N/A
lift-+.f64N/A
lift-/.f64N/A
associate-*l/N/A
+-commutativeN/A
lift-+.f64N/A
lower-/.f64N/A
lift-*.f64N/A
associate-*r*N/A
neg-mul-1N/A
lower-*.f64N/A
lower-neg.f6485.6
lift-+.f64N/A
+-commutativeN/A
lift-+.f6485.6
Applied rewrites85.6%
if -1.6500000000000001e-123 < t1 < 1450Initial program 81.1%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
times-fracN/A
clear-numN/A
frac-2negN/A
frac-timesN/A
metadata-evalN/A
lift-neg.f64N/A
remove-double-negN/A
distribute-lft-neg-inN/A
neg-mul-1N/A
remove-double-negN/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-neg.f6492.7
lift-+.f64N/A
+-commutativeN/A
lower-+.f6492.7
Applied rewrites92.7%
Taylor expanded in u around inf
*-commutativeN/A
unpow2N/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f6486.1
Applied rewrites86.1%
Final simplification85.8%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1.65e-123) (not (<= t1 1450.0))) (/ (* v 1.0) (- (+ u t1))) (* (/ (/ v u) u) (- t1))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.65e-123) || !(t1 <= 1450.0)) {
tmp = (v * 1.0) / -(u + t1);
} else {
tmp = ((v / u) / 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 <= (-1.65d-123)) .or. (.not. (t1 <= 1450.0d0))) then
tmp = (v * 1.0d0) / -(u + t1)
else
tmp = ((v / u) / u) * -t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.65e-123) || !(t1 <= 1450.0)) {
tmp = (v * 1.0) / -(u + t1);
} else {
tmp = ((v / u) / u) * -t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.65e-123) or not (t1 <= 1450.0): tmp = (v * 1.0) / -(u + t1) else: tmp = ((v / u) / u) * -t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.65e-123) || !(t1 <= 1450.0)) tmp = Float64(Float64(v * 1.0) / Float64(-Float64(u + t1))); else tmp = Float64(Float64(Float64(v / u) / u) * Float64(-t1)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -1.65e-123) || ~((t1 <= 1450.0))) tmp = (v * 1.0) / -(u + t1); else tmp = ((v / u) / u) * -t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.65e-123], N[Not[LessEqual[t1, 1450.0]], $MachinePrecision]], N[(N[(v * 1.0), $MachinePrecision] / (-N[(u + t1), $MachinePrecision])), $MachinePrecision], N[(N[(N[(v / u), $MachinePrecision] / u), $MachinePrecision] * (-t1)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.65 \cdot 10^{-123} \lor \neg \left(t1 \leq 1450\right):\\
\;\;\;\;\frac{v \cdot 1}{-\left(u + t1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{v}{u}}{u} \cdot \left(-t1\right)\\
\end{array}
\end{array}
if t1 < -1.6500000000000001e-123 or 1450 < t1 Initial program 62.4%
lift-/.f64N/A
frac-2negN/A
distribute-frac-neg2N/A
neg-mul-1N/A
associate-/l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift-*.f64N/A
lift-neg.f64N/A
distribute-lft-neg-outN/A
remove-double-negN/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6499.6
lift-+.f64N/A
+-commutativeN/A
lower-+.f6499.6
Applied rewrites99.6%
Taylor expanded in u around 0
Applied rewrites85.3%
lift-*.f64N/A
lift-+.f64N/A
lift-/.f64N/A
associate-*l/N/A
+-commutativeN/A
lift-+.f64N/A
lower-/.f64N/A
lift-*.f64N/A
associate-*r*N/A
neg-mul-1N/A
lower-*.f64N/A
lower-neg.f6485.6
lift-+.f64N/A
+-commutativeN/A
lift-+.f6485.6
Applied rewrites85.6%
if -1.6500000000000001e-123 < t1 < 1450Initial program 81.1%
Taylor expanded in u around inf
unpow2N/A
lower-*.f6475.4
Applied rewrites75.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6481.0
Applied rewrites81.0%
Taylor expanded in u around inf
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6486.0
Applied rewrites86.0%
Final simplification85.7%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1.65e-123) (not (<= t1 1450.0))) (/ (* v 1.0) (- (+ u t1))) (/ (* (/ v u) t1) (- u))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.65e-123) || !(t1 <= 1450.0)) {
tmp = (v * 1.0) / -(u + t1);
} else {
tmp = ((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 ((t1 <= (-1.65d-123)) .or. (.not. (t1 <= 1450.0d0))) then
tmp = (v * 1.0d0) / -(u + t1)
else
tmp = ((v / u) * t1) / -u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.65e-123) || !(t1 <= 1450.0)) {
tmp = (v * 1.0) / -(u + t1);
} else {
tmp = ((v / u) * t1) / -u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.65e-123) or not (t1 <= 1450.0): tmp = (v * 1.0) / -(u + t1) else: tmp = ((v / u) * t1) / -u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.65e-123) || !(t1 <= 1450.0)) tmp = Float64(Float64(v * 1.0) / Float64(-Float64(u + t1))); else tmp = Float64(Float64(Float64(v / u) * t1) / Float64(-u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -1.65e-123) || ~((t1 <= 1450.0))) tmp = (v * 1.0) / -(u + t1); else tmp = ((v / u) * t1) / -u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.65e-123], N[Not[LessEqual[t1, 1450.0]], $MachinePrecision]], N[(N[(v * 1.0), $MachinePrecision] / (-N[(u + t1), $MachinePrecision])), $MachinePrecision], N[(N[(N[(v / u), $MachinePrecision] * t1), $MachinePrecision] / (-u)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.65 \cdot 10^{-123} \lor \neg \left(t1 \leq 1450\right):\\
\;\;\;\;\frac{v \cdot 1}{-\left(u + t1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{v}{u} \cdot t1}{-u}\\
\end{array}
\end{array}
if t1 < -1.6500000000000001e-123 or 1450 < t1 Initial program 62.4%
lift-/.f64N/A
frac-2negN/A
distribute-frac-neg2N/A
neg-mul-1N/A
associate-/l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift-*.f64N/A
lift-neg.f64N/A
distribute-lft-neg-outN/A
remove-double-negN/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6499.6
lift-+.f64N/A
+-commutativeN/A
lower-+.f6499.6
Applied rewrites99.6%
Taylor expanded in u around 0
Applied rewrites85.3%
lift-*.f64N/A
lift-+.f64N/A
lift-/.f64N/A
associate-*l/N/A
+-commutativeN/A
lift-+.f64N/A
lower-/.f64N/A
lift-*.f64N/A
associate-*r*N/A
neg-mul-1N/A
lower-*.f64N/A
lower-neg.f6485.6
lift-+.f64N/A
+-commutativeN/A
lift-+.f6485.6
Applied rewrites85.6%
if -1.6500000000000001e-123 < t1 < 1450Initial program 81.1%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
*-commutativeN/A
lift-neg.f64N/A
distribute-frac-negN/A
distribute-frac-neg2N/A
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-neg.f6495.6
lift-+.f64N/A
+-commutativeN/A
lower-+.f6495.6
Applied rewrites95.6%
Taylor expanded in u around inf
associate-*r/N/A
unpow2N/A
associate-/r*N/A
associate-*r/N/A
lower-/.f64N/A
associate-*r/N/A
lower-/.f64N/A
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6478.6
Applied rewrites78.6%
Applied rewrites84.6%
Final simplification85.3%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1.65e-123) (not (<= t1 1450.0))) (/ (* v 1.0) (- (+ u t1))) (* (/ t1 u) (/ (- v) u))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.65e-123) || !(t1 <= 1450.0)) {
tmp = (v * 1.0) / -(u + t1);
} else {
tmp = (t1 / u) * (-v / u);
}
return tmp;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-1.65d-123)) .or. (.not. (t1 <= 1450.0d0))) then
tmp = (v * 1.0d0) / -(u + t1)
else
tmp = (t1 / u) * (-v / u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.65e-123) || !(t1 <= 1450.0)) {
tmp = (v * 1.0) / -(u + t1);
} else {
tmp = (t1 / u) * (-v / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.65e-123) or not (t1 <= 1450.0): tmp = (v * 1.0) / -(u + t1) else: tmp = (t1 / u) * (-v / u) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.65e-123) || !(t1 <= 1450.0)) tmp = Float64(Float64(v * 1.0) / Float64(-Float64(u + t1))); else tmp = Float64(Float64(t1 / u) * Float64(Float64(-v) / u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -1.65e-123) || ~((t1 <= 1450.0))) tmp = (v * 1.0) / -(u + t1); else tmp = (t1 / u) * (-v / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.65e-123], N[Not[LessEqual[t1, 1450.0]], $MachinePrecision]], N[(N[(v * 1.0), $MachinePrecision] / (-N[(u + t1), $MachinePrecision])), $MachinePrecision], N[(N[(t1 / u), $MachinePrecision] * N[((-v) / u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.65 \cdot 10^{-123} \lor \neg \left(t1 \leq 1450\right):\\
\;\;\;\;\frac{v \cdot 1}{-\left(u + t1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{t1}{u} \cdot \frac{-v}{u}\\
\end{array}
\end{array}
if t1 < -1.6500000000000001e-123 or 1450 < t1 Initial program 62.4%
lift-/.f64N/A
frac-2negN/A
distribute-frac-neg2N/A
neg-mul-1N/A
associate-/l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift-*.f64N/A
lift-neg.f64N/A
distribute-lft-neg-outN/A
remove-double-negN/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6499.6
lift-+.f64N/A
+-commutativeN/A
lower-+.f6499.6
Applied rewrites99.6%
Taylor expanded in u around 0
Applied rewrites85.3%
lift-*.f64N/A
lift-+.f64N/A
lift-/.f64N/A
associate-*l/N/A
+-commutativeN/A
lift-+.f64N/A
lower-/.f64N/A
lift-*.f64N/A
associate-*r*N/A
neg-mul-1N/A
lower-*.f64N/A
lower-neg.f6485.6
lift-+.f64N/A
+-commutativeN/A
lift-+.f6485.6
Applied rewrites85.6%
if -1.6500000000000001e-123 < t1 < 1450Initial program 81.1%
Taylor expanded in u around inf
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
unpow2N/A
associate-*r*N/A
times-fracN/A
neg-mul-1N/A
lower-*.f64N/A
lower-/.f64N/A
lower-neg.f64N/A
lower-/.f6484.6
Applied rewrites84.6%
Final simplification85.3%
(FPCore (u v t1) :precision binary64 (if (<= v 3.25e+233) (* (/ (/ t1 (+ t1 u)) (+ t1 u)) (- v)) (/ (- t1) (* (/ (+ u t1) v) (+ u t1)))))
double code(double u, double v, double t1) {
double tmp;
if (v <= 3.25e+233) {
tmp = ((t1 / (t1 + u)) / (t1 + u)) * -v;
} else {
tmp = -t1 / (((u + t1) / 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 (v <= 3.25d+233) then
tmp = ((t1 / (t1 + u)) / (t1 + u)) * -v
else
tmp = -t1 / (((u + t1) / v) * (u + t1))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if (v <= 3.25e+233) {
tmp = ((t1 / (t1 + u)) / (t1 + u)) * -v;
} else {
tmp = -t1 / (((u + t1) / v) * (u + t1));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if v <= 3.25e+233: tmp = ((t1 / (t1 + u)) / (t1 + u)) * -v else: tmp = -t1 / (((u + t1) / v) * (u + t1)) return tmp
function code(u, v, t1) tmp = 0.0 if (v <= 3.25e+233) tmp = Float64(Float64(Float64(t1 / Float64(t1 + u)) / Float64(t1 + u)) * Float64(-v)); else tmp = Float64(Float64(-t1) / Float64(Float64(Float64(u + t1) / v) * Float64(u + t1))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if (v <= 3.25e+233) tmp = ((t1 / (t1 + u)) / (t1 + u)) * -v; else tmp = -t1 / (((u + t1) / v) * (u + t1)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[LessEqual[v, 3.25e+233], N[(N[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * (-v)), $MachinePrecision], N[((-t1) / N[(N[(N[(u + t1), $MachinePrecision] / v), $MachinePrecision] * N[(u + t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;v \leq 3.25 \cdot 10^{+233}:\\
\;\;\;\;\frac{\frac{t1}{t1 + u}}{t1 + u} \cdot \left(-v\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{-t1}{\frac{u + t1}{v} \cdot \left(u + t1\right)}\\
\end{array}
\end{array}
if v < 3.25000000000000019e233Initial program 71.3%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
*-commutativeN/A
lift-neg.f64N/A
distribute-frac-negN/A
distribute-frac-neg2N/A
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-neg.f6498.2
lift-+.f64N/A
+-commutativeN/A
lower-+.f6498.2
Applied rewrites98.2%
lift-/.f64N/A
clear-numN/A
metadata-evalN/A
associate-/r/N/A
lift-neg.f64N/A
frac-2negN/A
lift-/.f64N/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
associate-*r/N/A
lift-/.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lift-/.f64N/A
frac-2negN/A
metadata-evalN/A
lift-neg.f64N/A
div-invN/A
Applied rewrites96.7%
if 3.25000000000000019e233 < v Initial program 44.2%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
times-fracN/A
clear-numN/A
frac-2negN/A
frac-timesN/A
metadata-evalN/A
lift-neg.f64N/A
remove-double-negN/A
distribute-lft-neg-inN/A
neg-mul-1N/A
remove-double-negN/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-neg.f6499.6
lift-+.f64N/A
+-commutativeN/A
lower-+.f6499.6
Applied rewrites99.6%
Final simplification96.9%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1.65e-123) (not (<= t1 1450.0))) (/ (* v 1.0) (- (+ u t1))) (* (/ (- v) (* u u)) t1)))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.65e-123) || !(t1 <= 1450.0)) {
tmp = (v * 1.0) / -(u + t1);
} else {
tmp = (-v / (u * 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 <= (-1.65d-123)) .or. (.not. (t1 <= 1450.0d0))) then
tmp = (v * 1.0d0) / -(u + t1)
else
tmp = (-v / (u * u)) * t1
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.65e-123) || !(t1 <= 1450.0)) {
tmp = (v * 1.0) / -(u + t1);
} else {
tmp = (-v / (u * u)) * t1;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.65e-123) or not (t1 <= 1450.0): tmp = (v * 1.0) / -(u + t1) else: tmp = (-v / (u * u)) * t1 return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.65e-123) || !(t1 <= 1450.0)) tmp = Float64(Float64(v * 1.0) / Float64(-Float64(u + t1))); else tmp = Float64(Float64(Float64(-v) / Float64(u * u)) * t1); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -1.65e-123) || ~((t1 <= 1450.0))) tmp = (v * 1.0) / -(u + t1); else tmp = (-v / (u * u)) * t1; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.65e-123], N[Not[LessEqual[t1, 1450.0]], $MachinePrecision]], N[(N[(v * 1.0), $MachinePrecision] / (-N[(u + t1), $MachinePrecision])), $MachinePrecision], N[(N[((-v) / N[(u * u), $MachinePrecision]), $MachinePrecision] * t1), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.65 \cdot 10^{-123} \lor \neg \left(t1 \leq 1450\right):\\
\;\;\;\;\frac{v \cdot 1}{-\left(u + t1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{-v}{u \cdot u} \cdot t1\\
\end{array}
\end{array}
if t1 < -1.6500000000000001e-123 or 1450 < t1 Initial program 62.4%
lift-/.f64N/A
frac-2negN/A
distribute-frac-neg2N/A
neg-mul-1N/A
associate-/l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift-*.f64N/A
lift-neg.f64N/A
distribute-lft-neg-outN/A
remove-double-negN/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6499.6
lift-+.f64N/A
+-commutativeN/A
lower-+.f6499.6
Applied rewrites99.6%
Taylor expanded in u around 0
Applied rewrites85.3%
lift-*.f64N/A
lift-+.f64N/A
lift-/.f64N/A
associate-*l/N/A
+-commutativeN/A
lift-+.f64N/A
lower-/.f64N/A
lift-*.f64N/A
associate-*r*N/A
neg-mul-1N/A
lower-*.f64N/A
lower-neg.f6485.6
lift-+.f64N/A
+-commutativeN/A
lift-+.f6485.6
Applied rewrites85.6%
if -1.6500000000000001e-123 < t1 < 1450Initial program 81.1%
Taylor expanded in u around inf
unpow2N/A
lower-*.f6475.4
Applied rewrites75.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6481.0
Applied rewrites81.0%
Final simplification84.0%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -1.65e-123) (not (<= t1 1450.0))) (/ (* v 1.0) (- (+ u t1))) (* v (/ (- t1) (* u u)))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.65e-123) || !(t1 <= 1450.0)) {
tmp = (v * 1.0) / -(u + t1);
} else {
tmp = v * (-t1 / (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 <= (-1.65d-123)) .or. (.not. (t1 <= 1450.0d0))) then
tmp = (v * 1.0d0) / -(u + t1)
else
tmp = v * (-t1 / (u * u))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -1.65e-123) || !(t1 <= 1450.0)) {
tmp = (v * 1.0) / -(u + t1);
} else {
tmp = v * (-t1 / (u * u));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -1.65e-123) or not (t1 <= 1450.0): tmp = (v * 1.0) / -(u + t1) else: tmp = v * (-t1 / (u * u)) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -1.65e-123) || !(t1 <= 1450.0)) tmp = Float64(Float64(v * 1.0) / Float64(-Float64(u + t1))); else tmp = Float64(v * Float64(Float64(-t1) / Float64(u * u))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -1.65e-123) || ~((t1 <= 1450.0))) tmp = (v * 1.0) / -(u + t1); else tmp = v * (-t1 / (u * u)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -1.65e-123], N[Not[LessEqual[t1, 1450.0]], $MachinePrecision]], N[(N[(v * 1.0), $MachinePrecision] / (-N[(u + t1), $MachinePrecision])), $MachinePrecision], N[(v * N[((-t1) / N[(u * u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -1.65 \cdot 10^{-123} \lor \neg \left(t1 \leq 1450\right):\\
\;\;\;\;\frac{v \cdot 1}{-\left(u + t1\right)}\\
\mathbf{else}:\\
\;\;\;\;v \cdot \frac{-t1}{u \cdot u}\\
\end{array}
\end{array}
if t1 < -1.6500000000000001e-123 or 1450 < t1 Initial program 62.4%
lift-/.f64N/A
frac-2negN/A
distribute-frac-neg2N/A
neg-mul-1N/A
associate-/l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift-*.f64N/A
lift-neg.f64N/A
distribute-lft-neg-outN/A
remove-double-negN/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6499.6
lift-+.f64N/A
+-commutativeN/A
lower-+.f6499.6
Applied rewrites99.6%
Taylor expanded in u around 0
Applied rewrites85.3%
lift-*.f64N/A
lift-+.f64N/A
lift-/.f64N/A
associate-*l/N/A
+-commutativeN/A
lift-+.f64N/A
lower-/.f64N/A
lift-*.f64N/A
associate-*r*N/A
neg-mul-1N/A
lower-*.f64N/A
lower-neg.f6485.6
lift-+.f64N/A
+-commutativeN/A
lift-+.f6485.6
Applied rewrites85.6%
if -1.6500000000000001e-123 < t1 < 1450Initial program 81.1%
Taylor expanded in u around inf
unpow2N/A
lower-*.f6475.4
Applied rewrites75.4%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6472.9
Applied rewrites72.9%
Final simplification81.0%
(FPCore (u v t1) :precision binary64 (/ (* v (/ t1 (+ u t1))) (- (+ u t1))))
double code(double u, double v, double t1) {
return (v * (t1 / (u + t1))) / -(u + t1);
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (v * (t1 / (u + t1))) / -(u + t1)
end function
public static double code(double u, double v, double t1) {
return (v * (t1 / (u + t1))) / -(u + t1);
}
def code(u, v, t1): return (v * (t1 / (u + t1))) / -(u + t1)
function code(u, v, t1) return Float64(Float64(v * Float64(t1 / Float64(u + t1))) / Float64(-Float64(u + t1))) end
function tmp = code(u, v, t1) tmp = (v * (t1 / (u + t1))) / -(u + t1); end
code[u_, v_, t1_] := N[(N[(v * N[(t1 / N[(u + t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-N[(u + t1), $MachinePrecision])), $MachinePrecision]
\begin{array}{l}
\\
\frac{v \cdot \frac{t1}{u + t1}}{-\left(u + t1\right)}
\end{array}
Initial program 69.1%
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
frac-2negN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
associate-/l*N/A
lift-neg.f64N/A
frac-2negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-/.f6497.6
lift-+.f64N/A
+-commutativeN/A
lower-+.f6497.6
lift-+.f64N/A
+-commutativeN/A
lower-+.f6497.6
Applied rewrites97.6%
Final simplification97.6%
(FPCore (u v t1) :precision binary64 (* (/ (/ t1 (+ t1 u)) (+ t1 u)) (- v)))
double code(double u, double v, double t1) {
return ((t1 / (t1 + u)) / (t1 + u)) * -v;
}
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)) / (t1 + u)) * -v
end function
public static double code(double u, double v, double t1) {
return ((t1 / (t1 + u)) / (t1 + u)) * -v;
}
def code(u, v, t1): return ((t1 / (t1 + u)) / (t1 + u)) * -v
function code(u, v, t1) return Float64(Float64(Float64(t1 / Float64(t1 + u)) / Float64(t1 + u)) * Float64(-v)) end
function tmp = code(u, v, t1) tmp = ((t1 / (t1 + u)) / (t1 + u)) * -v; end
code[u_, v_, t1_] := N[(N[(N[(t1 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * (-v)), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{t1}{t1 + u}}{t1 + u} \cdot \left(-v\right)
\end{array}
Initial program 69.1%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
*-commutativeN/A
lift-neg.f64N/A
distribute-frac-negN/A
distribute-frac-neg2N/A
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-neg.f6498.4
lift-+.f64N/A
+-commutativeN/A
lower-+.f6498.4
Applied rewrites98.4%
lift-/.f64N/A
clear-numN/A
metadata-evalN/A
associate-/r/N/A
lift-neg.f64N/A
frac-2negN/A
lift-/.f64N/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
associate-*r/N/A
lift-/.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lift-/.f64N/A
frac-2negN/A
metadata-evalN/A
lift-neg.f64N/A
div-invN/A
Applied rewrites95.8%
Final simplification95.8%
(FPCore (u v t1) :precision binary64 (/ (* v 1.0) (- (+ u t1))))
double code(double u, double v, double t1) {
return (v * 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 * 1.0d0) / -(u + t1)
end function
public static double code(double u, double v, double t1) {
return (v * 1.0) / -(u + t1);
}
def code(u, v, t1): return (v * 1.0) / -(u + t1)
function code(u, v, t1) return Float64(Float64(v * 1.0) / Float64(-Float64(u + t1))) end
function tmp = code(u, v, t1) tmp = (v * 1.0) / -(u + t1); end
code[u_, v_, t1_] := N[(N[(v * 1.0), $MachinePrecision] / (-N[(u + t1), $MachinePrecision])), $MachinePrecision]
\begin{array}{l}
\\
\frac{v \cdot 1}{-\left(u + t1\right)}
\end{array}
Initial program 69.1%
lift-/.f64N/A
frac-2negN/A
distribute-frac-neg2N/A
neg-mul-1N/A
associate-/l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift-*.f64N/A
lift-neg.f64N/A
distribute-lft-neg-outN/A
remove-double-negN/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6497.4
lift-+.f64N/A
+-commutativeN/A
lower-+.f6497.4
Applied rewrites97.4%
Taylor expanded in u around 0
Applied rewrites65.8%
lift-*.f64N/A
lift-+.f64N/A
lift-/.f64N/A
associate-*l/N/A
+-commutativeN/A
lift-+.f64N/A
lower-/.f64N/A
lift-*.f64N/A
associate-*r*N/A
neg-mul-1N/A
lower-*.f64N/A
lower-neg.f6466.0
lift-+.f64N/A
+-commutativeN/A
lift-+.f6466.0
Applied rewrites66.0%
Final simplification66.0%
(FPCore (u v t1) :precision binary64 (* (/ -1.0 (+ t1 u)) v))
double code(double u, double v, double t1) {
return (-1.0 / (t1 + u)) * v;
}
real(8) function code(u, v, t1)
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = ((-1.0d0) / (t1 + u)) * v
end function
public static double code(double u, double v, double t1) {
return (-1.0 / (t1 + u)) * v;
}
def code(u, v, t1): return (-1.0 / (t1 + u)) * v
function code(u, v, t1) return Float64(Float64(-1.0 / Float64(t1 + u)) * v) end
function tmp = code(u, v, t1) tmp = (-1.0 / (t1 + u)) * v; end
code[u_, v_, t1_] := N[(N[(-1.0 / N[(t1 + u), $MachinePrecision]), $MachinePrecision] * v), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1}{t1 + u} \cdot v
\end{array}
Initial program 69.1%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
*-commutativeN/A
lift-neg.f64N/A
distribute-frac-negN/A
distribute-frac-neg2N/A
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-neg.f6498.4
lift-+.f64N/A
+-commutativeN/A
lower-+.f6498.4
Applied rewrites98.4%
lift-/.f64N/A
clear-numN/A
metadata-evalN/A
associate-/r/N/A
lift-neg.f64N/A
frac-2negN/A
lift-/.f64N/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
associate-*r/N/A
lift-/.f64N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lift-/.f64N/A
frac-2negN/A
metadata-evalN/A
lift-neg.f64N/A
div-invN/A
Applied rewrites95.8%
Taylor expanded in u around 0
Applied rewrites65.8%
(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(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 69.1%
Taylor expanded in u around 0
associate-*r/N/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f6459.8
Applied rewrites59.8%
Final simplification59.8%
herbie shell --seed 2024317
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))