
(FPCore (x y z t a b) :precision binary64 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
def code(x, y, z, t, a, b): return ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
def code(x, y, z, t, a, b): return ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y))))))
(if (or (<= t_1 -5e+267)
(and (not (<= t_1 -1e-317))
(or (<= t_1 0.0) (not (<= t_1 1e+308)))))
(/ (- t a) (- b y))
t_1)))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
double tmp;
if ((t_1 <= -5e+267) || (!(t_1 <= -1e-317) && ((t_1 <= 0.0) || !(t_1 <= 1e+308)))) {
tmp = (t - a) / (b - y);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
if ((t_1 <= (-5d+267)) .or. (.not. (t_1 <= (-1d-317))) .and. (t_1 <= 0.0d0) .or. (.not. (t_1 <= 1d+308))) then
tmp = (t - a) / (b - y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
double tmp;
if ((t_1 <= -5e+267) || (!(t_1 <= -1e-317) && ((t_1 <= 0.0) || !(t_1 <= 1e+308)))) {
tmp = (t - a) / (b - y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x * y) + (z * (t - a))) / (y + (z * (b - y))) tmp = 0 if (t_1 <= -5e+267) or (not (t_1 <= -1e-317) and ((t_1 <= 0.0) or not (t_1 <= 1e+308))): tmp = (t - a) / (b - y) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) tmp = 0.0 if ((t_1 <= -5e+267) || (!(t_1 <= -1e-317) && ((t_1 <= 0.0) || !(t_1 <= 1e+308)))) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); tmp = 0.0; if ((t_1 <= -5e+267) || (~((t_1 <= -1e-317)) && ((t_1 <= 0.0) || ~((t_1 <= 1e+308))))) tmp = (t - a) / (b - y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e+267], And[N[Not[LessEqual[t$95$1, -1e-317]], $MachinePrecision], Or[LessEqual[t$95$1, 0.0], N[Not[LessEqual[t$95$1, 1e+308]], $MachinePrecision]]]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], t$95$1]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{+267} \lor \neg \left(t_1 \leq -1 \cdot 10^{-317}\right) \land \left(t_1 \leq 0 \lor \neg \left(t_1 \leq 10^{+308}\right)\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -4.9999999999999999e267 or -1.00000023e-317 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0 or 1e308 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 19.8%
Taylor expanded in z around inf 70.9%
if -4.9999999999999999e267 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -1.00000023e-317 or -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1e308Initial program 99.7%
Final simplification87.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a)))
(t_2 (/ (+ (* x y) t_1) (+ y (* z b))))
(t_3 (/ (- t a) (- b y))))
(if (<= z -6.5e+36)
t_3
(if (<= z -5e-257)
t_2
(if (<= z 3.2e-266) (+ x (/ t_1 y)) (if (<= z 12000.0) t_2 t_3))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = ((x * y) + t_1) / (y + (z * b));
double t_3 = (t - a) / (b - y);
double tmp;
if (z <= -6.5e+36) {
tmp = t_3;
} else if (z <= -5e-257) {
tmp = t_2;
} else if (z <= 3.2e-266) {
tmp = x + (t_1 / y);
} else if (z <= 12000.0) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = z * (t - a)
t_2 = ((x * y) + t_1) / (y + (z * b))
t_3 = (t - a) / (b - y)
if (z <= (-6.5d+36)) then
tmp = t_3
else if (z <= (-5d-257)) then
tmp = t_2
else if (z <= 3.2d-266) then
tmp = x + (t_1 / y)
else if (z <= 12000.0d0) then
tmp = t_2
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = ((x * y) + t_1) / (y + (z * b));
double t_3 = (t - a) / (b - y);
double tmp;
if (z <= -6.5e+36) {
tmp = t_3;
} else if (z <= -5e-257) {
tmp = t_2;
} else if (z <= 3.2e-266) {
tmp = x + (t_1 / y);
} else if (z <= 12000.0) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (t - a) t_2 = ((x * y) + t_1) / (y + (z * b)) t_3 = (t - a) / (b - y) tmp = 0 if z <= -6.5e+36: tmp = t_3 elif z <= -5e-257: tmp = t_2 elif z <= 3.2e-266: tmp = x + (t_1 / y) elif z <= 12000.0: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(t - a)) t_2 = Float64(Float64(Float64(x * y) + t_1) / Float64(y + Float64(z * b))) t_3 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -6.5e+36) tmp = t_3; elseif (z <= -5e-257) tmp = t_2; elseif (z <= 3.2e-266) tmp = Float64(x + Float64(t_1 / y)); elseif (z <= 12000.0) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (t - a); t_2 = ((x * y) + t_1) / (y + (z * b)); t_3 = (t - a) / (b - y); tmp = 0.0; if (z <= -6.5e+36) tmp = t_3; elseif (z <= -5e-257) tmp = t_2; elseif (z <= 3.2e-266) tmp = x + (t_1 / y); elseif (z <= 12000.0) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x * y), $MachinePrecision] + t$95$1), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.5e+36], t$95$3, If[LessEqual[z, -5e-257], t$95$2, If[LessEqual[z, 3.2e-266], N[(x + N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 12000.0], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := \frac{x \cdot y + t_1}{y + z \cdot b}\\
t_3 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -6.5 \cdot 10^{+36}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq -5 \cdot 10^{-257}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{-266}:\\
\;\;\;\;x + \frac{t_1}{y}\\
\mathbf{elif}\;z \leq 12000:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if z < -6.4999999999999998e36 or 12000 < z Initial program 43.1%
Taylor expanded in z around inf 85.7%
if -6.4999999999999998e36 < z < -4.99999999999999989e-257 or 3.2e-266 < z < 12000Initial program 87.4%
Taylor expanded in b around inf 84.7%
if -4.99999999999999989e-257 < z < 3.2e-266Initial program 79.4%
Taylor expanded in b around inf 79.4%
Taylor expanded in y around inf 86.3%
associate--l+86.3%
associate-/l*81.1%
associate-*r*91.2%
Simplified91.2%
Taylor expanded in b around 0 96.5%
Final simplification86.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ t (- b y))))
(if (<= z -4.4e-86)
t_1
(if (<= z 7.5e-5)
(+ x (* x z))
(if (or (<= z 3e+215) (not (<= z 3.8e+268))) t_1 (- (/ a b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t / (b - y);
double tmp;
if (z <= -4.4e-86) {
tmp = t_1;
} else if (z <= 7.5e-5) {
tmp = x + (x * z);
} else if ((z <= 3e+215) || !(z <= 3.8e+268)) {
tmp = t_1;
} else {
tmp = -(a / b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = t / (b - y)
if (z <= (-4.4d-86)) then
tmp = t_1
else if (z <= 7.5d-5) then
tmp = x + (x * z)
else if ((z <= 3d+215) .or. (.not. (z <= 3.8d+268))) then
tmp = t_1
else
tmp = -(a / b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t / (b - y);
double tmp;
if (z <= -4.4e-86) {
tmp = t_1;
} else if (z <= 7.5e-5) {
tmp = x + (x * z);
} else if ((z <= 3e+215) || !(z <= 3.8e+268)) {
tmp = t_1;
} else {
tmp = -(a / b);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t / (b - y) tmp = 0 if z <= -4.4e-86: tmp = t_1 elif z <= 7.5e-5: tmp = x + (x * z) elif (z <= 3e+215) or not (z <= 3.8e+268): tmp = t_1 else: tmp = -(a / b) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t / Float64(b - y)) tmp = 0.0 if (z <= -4.4e-86) tmp = t_1; elseif (z <= 7.5e-5) tmp = Float64(x + Float64(x * z)); elseif ((z <= 3e+215) || !(z <= 3.8e+268)) tmp = t_1; else tmp = Float64(-Float64(a / b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t / (b - y); tmp = 0.0; if (z <= -4.4e-86) tmp = t_1; elseif (z <= 7.5e-5) tmp = x + (x * z); elseif ((z <= 3e+215) || ~((z <= 3.8e+268))) tmp = t_1; else tmp = -(a / b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.4e-86], t$95$1, If[LessEqual[z, 7.5e-5], N[(x + N[(x * z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 3e+215], N[Not[LessEqual[z, 3.8e+268]], $MachinePrecision]], t$95$1, (-N[(a / b), $MachinePrecision])]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{b - y}\\
\mathbf{if}\;z \leq -4.4 \cdot 10^{-86}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{-5}:\\
\;\;\;\;x + x \cdot z\\
\mathbf{elif}\;z \leq 3 \cdot 10^{+215} \lor \neg \left(z \leq 3.8 \cdot 10^{+268}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;-\frac{a}{b}\\
\end{array}
\end{array}
if z < -4.4000000000000003e-86 or 7.49999999999999934e-5 < z < 2.9999999999999999e215 or 3.80000000000000027e268 < z Initial program 51.0%
Taylor expanded in z around inf 78.1%
Taylor expanded in t around inf 50.2%
if -4.4000000000000003e-86 < z < 7.49999999999999934e-5Initial program 86.4%
Taylor expanded in y around inf 55.6%
+-commutative55.6%
mul-1-neg55.6%
unsub-neg55.6%
Simplified55.6%
Taylor expanded in z around 0 55.6%
if 2.9999999999999999e215 < z < 3.80000000000000027e268Initial program 35.4%
Taylor expanded in a around inf 30.4%
mul-1-neg30.4%
distribute-lft-neg-out30.4%
*-commutative30.4%
Simplified30.4%
Taylor expanded in y around 0 62.6%
mul-1-neg62.6%
distribute-neg-frac62.6%
Simplified62.6%
Final simplification53.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ t (- b y))))
(if (<= z -7.2e-85)
t_1
(if (<= z 1.7e+17)
(/ x (- 1.0 z))
(if (or (<= z 4.2e+215) (not (<= z 5.4e+268))) t_1 (- (/ a b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t / (b - y);
double tmp;
if (z <= -7.2e-85) {
tmp = t_1;
} else if (z <= 1.7e+17) {
tmp = x / (1.0 - z);
} else if ((z <= 4.2e+215) || !(z <= 5.4e+268)) {
tmp = t_1;
} else {
tmp = -(a / b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = t / (b - y)
if (z <= (-7.2d-85)) then
tmp = t_1
else if (z <= 1.7d+17) then
tmp = x / (1.0d0 - z)
else if ((z <= 4.2d+215) .or. (.not. (z <= 5.4d+268))) then
tmp = t_1
else
tmp = -(a / b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t / (b - y);
double tmp;
if (z <= -7.2e-85) {
tmp = t_1;
} else if (z <= 1.7e+17) {
tmp = x / (1.0 - z);
} else if ((z <= 4.2e+215) || !(z <= 5.4e+268)) {
tmp = t_1;
} else {
tmp = -(a / b);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t / (b - y) tmp = 0 if z <= -7.2e-85: tmp = t_1 elif z <= 1.7e+17: tmp = x / (1.0 - z) elif (z <= 4.2e+215) or not (z <= 5.4e+268): tmp = t_1 else: tmp = -(a / b) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t / Float64(b - y)) tmp = 0.0 if (z <= -7.2e-85) tmp = t_1; elseif (z <= 1.7e+17) tmp = Float64(x / Float64(1.0 - z)); elseif ((z <= 4.2e+215) || !(z <= 5.4e+268)) tmp = t_1; else tmp = Float64(-Float64(a / b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t / (b - y); tmp = 0.0; if (z <= -7.2e-85) tmp = t_1; elseif (z <= 1.7e+17) tmp = x / (1.0 - z); elseif ((z <= 4.2e+215) || ~((z <= 5.4e+268))) tmp = t_1; else tmp = -(a / b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.2e-85], t$95$1, If[LessEqual[z, 1.7e+17], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 4.2e+215], N[Not[LessEqual[z, 5.4e+268]], $MachinePrecision]], t$95$1, (-N[(a / b), $MachinePrecision])]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{b - y}\\
\mathbf{if}\;z \leq -7.2 \cdot 10^{-85}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{+17}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{+215} \lor \neg \left(z \leq 5.4 \cdot 10^{+268}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;-\frac{a}{b}\\
\end{array}
\end{array}
if z < -7.1999999999999996e-85 or 1.7e17 < z < 4.2000000000000003e215 or 5.40000000000000022e268 < z Initial program 50.5%
Taylor expanded in z around inf 80.1%
Taylor expanded in t around inf 52.5%
if -7.1999999999999996e-85 < z < 1.7e17Initial program 84.4%
Taylor expanded in y around inf 54.0%
+-commutative54.0%
mul-1-neg54.0%
unsub-neg54.0%
Simplified54.0%
if 4.2000000000000003e215 < z < 5.40000000000000022e268Initial program 35.4%
Taylor expanded in a around inf 30.4%
mul-1-neg30.4%
distribute-lft-neg-out30.4%
*-commutative30.4%
Simplified30.4%
Taylor expanded in y around 0 62.6%
mul-1-neg62.6%
distribute-neg-frac62.6%
Simplified62.6%
Final simplification53.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -4.8e-37) (not (<= z 1700.0))) (/ (- t a) (- b y)) (+ x (* z (/ (- t a) y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4.8e-37) || !(z <= 1700.0)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + (z * ((t - a) / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-4.8d-37)) .or. (.not. (z <= 1700.0d0))) then
tmp = (t - a) / (b - y)
else
tmp = x + (z * ((t - a) / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4.8e-37) || !(z <= 1700.0)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + (z * ((t - a) / y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -4.8e-37) or not (z <= 1700.0): tmp = (t - a) / (b - y) else: tmp = x + (z * ((t - a) / y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -4.8e-37) || !(z <= 1700.0)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x + Float64(z * Float64(Float64(t - a) / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -4.8e-37) || ~((z <= 1700.0))) tmp = (t - a) / (b - y); else tmp = x + (z * ((t - a) / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -4.8e-37], N[Not[LessEqual[z, 1700.0]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(N[(t - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{-37} \lor \neg \left(z \leq 1700\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{t - a}{y}\\
\end{array}
\end{array}
if z < -4.79999999999999982e-37 or 1700 < z Initial program 46.9%
Taylor expanded in z around inf 83.4%
if -4.79999999999999982e-37 < z < 1700Initial program 86.0%
Taylor expanded in b around inf 84.8%
Taylor expanded in y around inf 71.4%
associate--l+71.4%
associate-/l*69.8%
associate-*r*73.4%
Simplified73.4%
Taylor expanded in b around 0 76.0%
+-commutative76.0%
associate-/l*74.4%
div-sub74.4%
associate-/r/71.1%
associate-/r/69.3%
distribute-rgt-out--69.2%
div-sub69.3%
Simplified69.3%
Final simplification76.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.6e-35) (not (<= z 1700.0))) (/ (- t a) (- b y)) (+ x (/ (* z (- t a)) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.6e-35) || !(z <= 1700.0)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + ((z * (t - a)) / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-1.6d-35)) .or. (.not. (z <= 1700.0d0))) then
tmp = (t - a) / (b - y)
else
tmp = x + ((z * (t - a)) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.6e-35) || !(z <= 1700.0)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + ((z * (t - a)) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.6e-35) or not (z <= 1700.0): tmp = (t - a) / (b - y) else: tmp = x + ((z * (t - a)) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.6e-35) || !(z <= 1700.0)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x + Float64(Float64(z * Float64(t - a)) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.6e-35) || ~((z <= 1700.0))) tmp = (t - a) / (b - y); else tmp = x + ((z * (t - a)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.6e-35], N[Not[LessEqual[z, 1700.0]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{-35} \lor \neg \left(z \leq 1700\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\
\end{array}
\end{array}
if z < -1.5999999999999999e-35 or 1700 < z Initial program 46.9%
Taylor expanded in z around inf 83.4%
if -1.5999999999999999e-35 < z < 1700Initial program 86.0%
Taylor expanded in b around inf 84.8%
Taylor expanded in y around inf 71.4%
associate--l+71.4%
associate-/l*69.8%
associate-*r*73.4%
Simplified73.4%
Taylor expanded in b around 0 76.0%
Final simplification79.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.05e-85) (not (<= z 1700000000.0))) (/ (- t a) (- b y)) (/ x (- 1.0 z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.05e-85) || !(z <= 1700000000.0)) {
tmp = (t - a) / (b - y);
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-1.05d-85)) .or. (.not. (z <= 1700000000.0d0))) then
tmp = (t - a) / (b - y)
else
tmp = x / (1.0d0 - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.05e-85) || !(z <= 1700000000.0)) {
tmp = (t - a) / (b - y);
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.05e-85) or not (z <= 1700000000.0): tmp = (t - a) / (b - y) else: tmp = x / (1.0 - z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.05e-85) || !(z <= 1700000000.0)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x / Float64(1.0 - z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.05e-85) || ~((z <= 1700000000.0))) tmp = (t - a) / (b - y); else tmp = x / (1.0 - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.05e-85], N[Not[LessEqual[z, 1700000000.0]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{-85} \lor \neg \left(z \leq 1700000000\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 - z}\\
\end{array}
\end{array}
if z < -1.05e-85 or 1.7e9 < z Initial program 49.6%
Taylor expanded in z around inf 81.5%
if -1.05e-85 < z < 1.7e9Initial program 85.2%
Taylor expanded in y around inf 55.1%
+-commutative55.1%
mul-1-neg55.1%
unsub-neg55.1%
Simplified55.1%
Final simplification69.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.02e-26) (not (<= y 2.2e+34))) (/ x (- 1.0 z)) (/ (- t a) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.02e-26) || !(y <= 2.2e+34)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1.02d-26)) .or. (.not. (y <= 2.2d+34))) then
tmp = x / (1.0d0 - z)
else
tmp = (t - a) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.02e-26) || !(y <= 2.2e+34)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.02e-26) or not (y <= 2.2e+34): tmp = x / (1.0 - z) else: tmp = (t - a) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.02e-26) || !(y <= 2.2e+34)) tmp = Float64(x / Float64(1.0 - z)); else tmp = Float64(Float64(t - a) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.02e-26) || ~((y <= 2.2e+34))) tmp = x / (1.0 - z); else tmp = (t - a) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.02e-26], N[Not[LessEqual[y, 2.2e+34]], $MachinePrecision]], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.02 \cdot 10^{-26} \lor \neg \left(y \leq 2.2 \cdot 10^{+34}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -1.02e-26 or 2.2000000000000002e34 < y Initial program 56.1%
Taylor expanded in y around inf 56.3%
+-commutative56.3%
mul-1-neg56.3%
unsub-neg56.3%
Simplified56.3%
if -1.02e-26 < y < 2.2000000000000002e34Initial program 75.2%
Taylor expanded in y around 0 61.3%
Final simplification59.0%
(FPCore (x y z t a b) :precision binary64 (if (<= z -7.2e-85) (/ t b) (if (<= z 1700.0) (+ x (* x z)) (- (/ a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -7.2e-85) {
tmp = t / b;
} else if (z <= 1700.0) {
tmp = x + (x * z);
} else {
tmp = -(a / b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-7.2d-85)) then
tmp = t / b
else if (z <= 1700.0d0) then
tmp = x + (x * z)
else
tmp = -(a / b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -7.2e-85) {
tmp = t / b;
} else if (z <= 1700.0) {
tmp = x + (x * z);
} else {
tmp = -(a / b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -7.2e-85: tmp = t / b elif z <= 1700.0: tmp = x + (x * z) else: tmp = -(a / b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -7.2e-85) tmp = Float64(t / b); elseif (z <= 1700.0) tmp = Float64(x + Float64(x * z)); else tmp = Float64(-Float64(a / b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -7.2e-85) tmp = t / b; elseif (z <= 1700.0) tmp = x + (x * z); else tmp = -(a / b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -7.2e-85], N[(t / b), $MachinePrecision], If[LessEqual[z, 1700.0], N[(x + N[(x * z), $MachinePrecision]), $MachinePrecision], (-N[(a / b), $MachinePrecision])]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.2 \cdot 10^{-85}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 1700:\\
\;\;\;\;x + x \cdot z\\
\mathbf{else}:\\
\;\;\;\;-\frac{a}{b}\\
\end{array}
\end{array}
if z < -7.1999999999999996e-85Initial program 51.7%
div-inv51.6%
fma-def51.6%
+-commutative51.6%
fma-def51.6%
Applied egg-rr51.6%
Taylor expanded in a around 0 37.7%
Taylor expanded in y around 0 32.4%
if -7.1999999999999996e-85 < z < 1700Initial program 85.8%
Taylor expanded in y around inf 54.7%
+-commutative54.7%
mul-1-neg54.7%
unsub-neg54.7%
Simplified54.7%
Taylor expanded in z around 0 54.7%
if 1700 < z Initial program 46.4%
Taylor expanded in a around inf 29.3%
mul-1-neg29.3%
distribute-lft-neg-out29.3%
*-commutative29.3%
Simplified29.3%
Taylor expanded in y around 0 38.3%
mul-1-neg38.3%
distribute-neg-frac38.3%
Simplified38.3%
Final simplification44.2%
(FPCore (x y z t a b) :precision binary64 (if (<= z -3.2e-87) (/ t b) (if (<= z 1.9e-22) x (- (/ a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.2e-87) {
tmp = t / b;
} else if (z <= 1.9e-22) {
tmp = x;
} else {
tmp = -(a / b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-3.2d-87)) then
tmp = t / b
else if (z <= 1.9d-22) then
tmp = x
else
tmp = -(a / b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.2e-87) {
tmp = t / b;
} else if (z <= 1.9e-22) {
tmp = x;
} else {
tmp = -(a / b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -3.2e-87: tmp = t / b elif z <= 1.9e-22: tmp = x else: tmp = -(a / b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -3.2e-87) tmp = Float64(t / b); elseif (z <= 1.9e-22) tmp = x; else tmp = Float64(-Float64(a / b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -3.2e-87) tmp = t / b; elseif (z <= 1.9e-22) tmp = x; else tmp = -(a / b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3.2e-87], N[(t / b), $MachinePrecision], If[LessEqual[z, 1.9e-22], x, (-N[(a / b), $MachinePrecision])]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{-87}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{-22}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;-\frac{a}{b}\\
\end{array}
\end{array}
if z < -3.19999999999999979e-87Initial program 51.7%
div-inv51.6%
fma-def51.6%
+-commutative51.6%
fma-def51.6%
Applied egg-rr51.6%
Taylor expanded in a around 0 37.7%
Taylor expanded in y around 0 32.4%
if -3.19999999999999979e-87 < z < 1.90000000000000012e-22Initial program 85.9%
Taylor expanded in z around 0 56.5%
if 1.90000000000000012e-22 < z Initial program 49.8%
Taylor expanded in a around inf 30.4%
mul-1-neg30.4%
distribute-lft-neg-out30.4%
*-commutative30.4%
Simplified30.4%
Taylor expanded in y around 0 36.5%
mul-1-neg36.5%
distribute-neg-frac36.5%
Simplified36.5%
Final simplification44.1%
(FPCore (x y z t a b) :precision binary64 (if (<= z -2.15e+37) (/ a y) (if (<= z 1.0) x (/ a y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.15e+37) {
tmp = a / y;
} else if (z <= 1.0) {
tmp = x;
} else {
tmp = a / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-2.15d+37)) then
tmp = a / y
else if (z <= 1.0d0) then
tmp = x
else
tmp = a / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.15e+37) {
tmp = a / y;
} else if (z <= 1.0) {
tmp = x;
} else {
tmp = a / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -2.15e+37: tmp = a / y elif z <= 1.0: tmp = x else: tmp = a / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2.15e+37) tmp = Float64(a / y); elseif (z <= 1.0) tmp = x; else tmp = Float64(a / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -2.15e+37) tmp = a / y; elseif (z <= 1.0) tmp = x; else tmp = a / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.15e+37], N[(a / y), $MachinePrecision], If[LessEqual[z, 1.0], x, N[(a / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.15 \cdot 10^{+37}:\\
\;\;\;\;\frac{a}{y}\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{y}\\
\end{array}
\end{array}
if z < -2.1499999999999998e37 or 1 < z Initial program 42.7%
Taylor expanded in z around inf 85.1%
Taylor expanded in t around 0 46.0%
mul-1-neg46.0%
distribute-neg-frac46.0%
Simplified46.0%
Taylor expanded in b around 0 16.8%
if -2.1499999999999998e37 < z < 1Initial program 86.4%
Taylor expanded in z around 0 48.5%
Final simplification33.9%
(FPCore (x y z t a b) :precision binary64 (if (<= z -4.5e-85) (/ t b) (if (<= z 17200000000000.0) x (/ t b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -4.5e-85) {
tmp = t / b;
} else if (z <= 17200000000000.0) {
tmp = x;
} else {
tmp = t / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-4.5d-85)) then
tmp = t / b
else if (z <= 17200000000000.0d0) then
tmp = x
else
tmp = t / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -4.5e-85) {
tmp = t / b;
} else if (z <= 17200000000000.0) {
tmp = x;
} else {
tmp = t / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -4.5e-85: tmp = t / b elif z <= 17200000000000.0: tmp = x else: tmp = t / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -4.5e-85) tmp = Float64(t / b); elseif (z <= 17200000000000.0) tmp = x; else tmp = Float64(t / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -4.5e-85) tmp = t / b; elseif (z <= 17200000000000.0) tmp = x; else tmp = t / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -4.5e-85], N[(t / b), $MachinePrecision], If[LessEqual[z, 17200000000000.0], x, N[(t / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{-85}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 17200000000000:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b}\\
\end{array}
\end{array}
if z < -4.50000000000000004e-85 or 1.72e13 < z Initial program 48.8%
div-inv48.7%
fma-def48.8%
+-commutative48.8%
fma-def48.8%
Applied egg-rr48.8%
Taylor expanded in a around 0 33.0%
Taylor expanded in y around 0 33.2%
if -4.50000000000000004e-85 < z < 1.72e13Initial program 84.9%
Taylor expanded in z around 0 52.4%
Final simplification42.5%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 66.3%
Taylor expanded in z around 0 27.8%
Final simplification27.8%
(FPCore (x y z t a b) :precision binary64 (- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z)))))
double code(double x, double y, double z, double t, double a, double b) {
return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)));
}
def code(x, y, z, t, a, b): return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(z * t) + Float64(y * x)) / Float64(y + Float64(z * Float64(b - y)))) - Float64(a / Float64(Float64(b - y) + Float64(y / z)))) end
function tmp = code(x, y, z, t, a, b) tmp = (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(z * t), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a / N[(N[(b - y), $MachinePrecision] + N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{z \cdot t + y \cdot x}{y + z \cdot \left(b - y\right)} - \frac{a}{\left(b - y\right) + \frac{y}{z}}
\end{array}
herbie shell --seed 2023185
(FPCore (x y z t a b)
:name "Development.Shake.Progress:decay from shake-0.15.5"
:precision binary64
:herbie-target
(- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z))))
(/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))