
(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 12 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 (+ y (* z (- b y)))))
(if (or (<= z -30000000000.0) (not (<= z 0.0038)))
(+ (* x (/ (/ y z) (- b y))) (/ (- t a) (- b y)))
(* x (+ (/ y t_1) (/ (* z (- t a)) (* x t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double tmp;
if ((z <= -30000000000.0) || !(z <= 0.0038)) {
tmp = (x * ((y / z) / (b - y))) + ((t - a) / (b - y));
} else {
tmp = x * ((y / t_1) + ((z * (t - a)) / (x * 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 = y + (z * (b - y))
if ((z <= (-30000000000.0d0)) .or. (.not. (z <= 0.0038d0))) then
tmp = (x * ((y / z) / (b - y))) + ((t - a) / (b - y))
else
tmp = x * ((y / t_1) + ((z * (t - a)) / (x * 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 = y + (z * (b - y));
double tmp;
if ((z <= -30000000000.0) || !(z <= 0.0038)) {
tmp = (x * ((y / z) / (b - y))) + ((t - a) / (b - y));
} else {
tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) tmp = 0 if (z <= -30000000000.0) or not (z <= 0.0038): tmp = (x * ((y / z) / (b - y))) + ((t - a) / (b - y)) else: tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) tmp = 0.0 if ((z <= -30000000000.0) || !(z <= 0.0038)) tmp = Float64(Float64(x * Float64(Float64(y / z) / Float64(b - y))) + Float64(Float64(t - a) / Float64(b - y))); else tmp = Float64(x * Float64(Float64(y / t_1) + Float64(Float64(z * Float64(t - a)) / Float64(x * t_1)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); tmp = 0.0; if ((z <= -30000000000.0) || ~((z <= 0.0038))) tmp = (x * ((y / z) / (b - y))) + ((t - a) / (b - y)); else tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -30000000000.0], N[Not[LessEqual[z, 0.0038]], $MachinePrecision]], N[(N[(x * N[(N[(y / z), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y / t$95$1), $MachinePrecision] + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(x * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
\mathbf{if}\;z \leq -30000000000 \lor \neg \left(z \leq 0.0038\right):\\
\;\;\;\;x \cdot \frac{\frac{y}{z}}{b - y} + \frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y}{t\_1} + \frac{z \cdot \left(t - a\right)}{x \cdot t\_1}\right)\\
\end{array}
\end{array}
if z < -3e10 or 0.00379999999999999999 < z Initial program 47.9%
Taylor expanded in z around -inf 71.3%
associate--l+71.3%
mul-1-neg71.3%
distribute-lft-out--71.3%
associate-/l*75.8%
associate-/l*93.3%
div-sub93.3%
Simplified93.3%
Taylor expanded in x around inf 84.8%
associate-/l*92.2%
associate-/r*98.8%
Simplified98.8%
if -3e10 < z < 0.00379999999999999999Initial program 85.2%
Taylor expanded in x around inf 91.5%
Final simplification95.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* z (- t a)) (+ y (* z (- b y)))))
(t_2 (- (/ (- t a) (- b y)) (/ x z))))
(if (<= z -880000000.0)
t_2
(if (<= z -4.25e-85)
t_1
(if (<= z -1.26e-259)
x
(if (<= z 1.9e-271) t_1 (if (<= z 5e-11) x t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * (t - a)) / (y + (z * (b - y)));
double t_2 = ((t - a) / (b - y)) - (x / z);
double tmp;
if (z <= -880000000.0) {
tmp = t_2;
} else if (z <= -4.25e-85) {
tmp = t_1;
} else if (z <= -1.26e-259) {
tmp = x;
} else if (z <= 1.9e-271) {
tmp = t_1;
} else if (z <= 5e-11) {
tmp = x;
} else {
tmp = t_2;
}
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) :: tmp
t_1 = (z * (t - a)) / (y + (z * (b - y)))
t_2 = ((t - a) / (b - y)) - (x / z)
if (z <= (-880000000.0d0)) then
tmp = t_2
else if (z <= (-4.25d-85)) then
tmp = t_1
else if (z <= (-1.26d-259)) then
tmp = x
else if (z <= 1.9d-271) then
tmp = t_1
else if (z <= 5d-11) then
tmp = x
else
tmp = t_2
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)) / (y + (z * (b - y)));
double t_2 = ((t - a) / (b - y)) - (x / z);
double tmp;
if (z <= -880000000.0) {
tmp = t_2;
} else if (z <= -4.25e-85) {
tmp = t_1;
} else if (z <= -1.26e-259) {
tmp = x;
} else if (z <= 1.9e-271) {
tmp = t_1;
} else if (z <= 5e-11) {
tmp = x;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z * (t - a)) / (y + (z * (b - y))) t_2 = ((t - a) / (b - y)) - (x / z) tmp = 0 if z <= -880000000.0: tmp = t_2 elif z <= -4.25e-85: tmp = t_1 elif z <= -1.26e-259: tmp = x elif z <= 1.9e-271: tmp = t_1 elif z <= 5e-11: tmp = x else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z * Float64(t - a)) / Float64(y + Float64(z * Float64(b - y)))) t_2 = Float64(Float64(Float64(t - a) / Float64(b - y)) - Float64(x / z)) tmp = 0.0 if (z <= -880000000.0) tmp = t_2; elseif (z <= -4.25e-85) tmp = t_1; elseif (z <= -1.26e-259) tmp = x; elseif (z <= 1.9e-271) tmp = t_1; elseif (z <= 5e-11) tmp = x; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z * (t - a)) / (y + (z * (b - y))); t_2 = ((t - a) / (b - y)) - (x / z); tmp = 0.0; if (z <= -880000000.0) tmp = t_2; elseif (z <= -4.25e-85) tmp = t_1; elseif (z <= -1.26e-259) tmp = x; elseif (z <= 1.9e-271) tmp = t_1; elseif (z <= 5e-11) tmp = x; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -880000000.0], t$95$2, If[LessEqual[z, -4.25e-85], t$95$1, If[LessEqual[z, -1.26e-259], x, If[LessEqual[z, 1.9e-271], t$95$1, If[LessEqual[z, 5e-11], x, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
t_2 := \frac{t - a}{b - y} - \frac{x}{z}\\
\mathbf{if}\;z \leq -880000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -4.25 \cdot 10^{-85}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.26 \cdot 10^{-259}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{-271}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-11}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -8.8e8 or 5.00000000000000018e-11 < z Initial program 47.9%
Taylor expanded in z around -inf 71.3%
associate--l+71.3%
mul-1-neg71.3%
distribute-lft-out--71.3%
associate-/l*75.8%
associate-/l*93.3%
div-sub93.3%
Simplified93.3%
Taylor expanded in y around inf 86.9%
associate-*r/86.9%
mul-1-neg86.9%
Simplified86.9%
if -8.8e8 < z < -4.25000000000000026e-85 or -1.25999999999999996e-259 < z < 1.90000000000000005e-271Initial program 93.4%
Taylor expanded in x around 0 71.7%
if -4.25000000000000026e-85 < z < -1.25999999999999996e-259 or 1.90000000000000005e-271 < z < 5.00000000000000018e-11Initial program 82.2%
Taylor expanded in z around 0 62.9%
Final simplification77.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -12500000000.0) (not (<= z 20000000000.0))) (+ (* x (/ (/ y z) (- b y))) (/ (- t a) (- b y))) (/ (+ (* x y) (- (* z t) (* z a))) (+ y (* z (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -12500000000.0) || !(z <= 20000000000.0)) {
tmp = (x * ((y / z) / (b - y))) + ((t - a) / (b - y));
} else {
tmp = ((x * y) + ((z * t) - (z * a))) / (y + (z * (b - 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 <= (-12500000000.0d0)) .or. (.not. (z <= 20000000000.0d0))) then
tmp = (x * ((y / z) / (b - y))) + ((t - a) / (b - y))
else
tmp = ((x * y) + ((z * t) - (z * a))) / (y + (z * (b - 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 <= -12500000000.0) || !(z <= 20000000000.0)) {
tmp = (x * ((y / z) / (b - y))) + ((t - a) / (b - y));
} else {
tmp = ((x * y) + ((z * t) - (z * a))) / (y + (z * (b - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -12500000000.0) or not (z <= 20000000000.0): tmp = (x * ((y / z) / (b - y))) + ((t - a) / (b - y)) else: tmp = ((x * y) + ((z * t) - (z * a))) / (y + (z * (b - y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -12500000000.0) || !(z <= 20000000000.0)) tmp = Float64(Float64(x * Float64(Float64(y / z) / Float64(b - y))) + Float64(Float64(t - a) / Float64(b - y))); else tmp = Float64(Float64(Float64(x * y) + Float64(Float64(z * t) - Float64(z * a))) / Float64(y + Float64(z * Float64(b - y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -12500000000.0) || ~((z <= 20000000000.0))) tmp = (x * ((y / z) / (b - y))) + ((t - a) / (b - y)); else tmp = ((x * y) + ((z * t) - (z * a))) / (y + (z * (b - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -12500000000.0], N[Not[LessEqual[z, 20000000000.0]], $MachinePrecision]], N[(N[(x * N[(N[(y / z), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -12500000000 \lor \neg \left(z \leq 20000000000\right):\\
\;\;\;\;x \cdot \frac{\frac{y}{z}}{b - y} + \frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y + \left(z \cdot t - z \cdot a\right)}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -1.25e10 or 2e10 < z Initial program 46.7%
Taylor expanded in z around -inf 70.9%
associate--l+70.9%
mul-1-neg70.9%
distribute-lft-out--70.9%
associate-/l*75.4%
associate-/l*93.3%
div-sub93.3%
Simplified93.3%
Taylor expanded in x around inf 84.9%
associate-/l*92.4%
associate-/r*99.2%
Simplified99.2%
if -1.25e10 < z < 2e10Initial program 85.6%
sub-neg85.6%
distribute-lft-in85.6%
Applied egg-rr85.6%
Final simplification92.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1050000000.0) (not (<= z 3500000000.0))) (+ (* x (/ (/ y z) (- b y))) (/ (- t a) (- b y))) (/ (+ (* z (- t a)) (* x y)) (+ y (* z (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1050000000.0) || !(z <= 3500000000.0)) {
tmp = (x * ((y / z) / (b - y))) + ((t - a) / (b - y));
} else {
tmp = ((z * (t - a)) + (x * y)) / (y + (z * (b - 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 <= (-1050000000.0d0)) .or. (.not. (z <= 3500000000.0d0))) then
tmp = (x * ((y / z) / (b - y))) + ((t - a) / (b - y))
else
tmp = ((z * (t - a)) + (x * y)) / (y + (z * (b - 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 <= -1050000000.0) || !(z <= 3500000000.0)) {
tmp = (x * ((y / z) / (b - y))) + ((t - a) / (b - y));
} else {
tmp = ((z * (t - a)) + (x * y)) / (y + (z * (b - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1050000000.0) or not (z <= 3500000000.0): tmp = (x * ((y / z) / (b - y))) + ((t - a) / (b - y)) else: tmp = ((z * (t - a)) + (x * y)) / (y + (z * (b - y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1050000000.0) || !(z <= 3500000000.0)) tmp = Float64(Float64(x * Float64(Float64(y / z) / Float64(b - y))) + Float64(Float64(t - a) / Float64(b - y))); else tmp = Float64(Float64(Float64(z * Float64(t - a)) + Float64(x * y)) / Float64(y + Float64(z * Float64(b - y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1050000000.0) || ~((z <= 3500000000.0))) tmp = (x * ((y / z) / (b - y))) + ((t - a) / (b - y)); else tmp = ((z * (t - a)) + (x * y)) / (y + (z * (b - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1050000000.0], N[Not[LessEqual[z, 3500000000.0]], $MachinePrecision]], N[(N[(x * N[(N[(y / z), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1050000000 \lor \neg \left(z \leq 3500000000\right):\\
\;\;\;\;x \cdot \frac{\frac{y}{z}}{b - y} + \frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right) + x \cdot y}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -1.05e9 or 3.5e9 < z Initial program 46.7%
Taylor expanded in z around -inf 70.9%
associate--l+70.9%
mul-1-neg70.9%
distribute-lft-out--70.9%
associate-/l*75.4%
associate-/l*93.3%
div-sub93.3%
Simplified93.3%
Taylor expanded in x around inf 84.9%
associate-/l*92.4%
associate-/r*99.2%
Simplified99.2%
if -1.05e9 < z < 3.5e9Initial program 85.6%
Final simplification92.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3.1e-27) (not (<= z 0.0038))) (+ (* x (/ (/ y z) (- b y))) (/ (- t a) (- b y))) (/ (+ (* z (- t a)) (* x y)) (+ y (* z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.1e-27) || !(z <= 0.0038)) {
tmp = (x * ((y / z) / (b - y))) + ((t - a) / (b - y));
} else {
tmp = ((z * (t - a)) + (x * y)) / (y + (z * 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.1d-27)) .or. (.not. (z <= 0.0038d0))) then
tmp = (x * ((y / z) / (b - y))) + ((t - a) / (b - y))
else
tmp = ((z * (t - a)) + (x * y)) / (y + (z * 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.1e-27) || !(z <= 0.0038)) {
tmp = (x * ((y / z) / (b - y))) + ((t - a) / (b - y));
} else {
tmp = ((z * (t - a)) + (x * y)) / (y + (z * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.1e-27) or not (z <= 0.0038): tmp = (x * ((y / z) / (b - y))) + ((t - a) / (b - y)) else: tmp = ((z * (t - a)) + (x * y)) / (y + (z * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.1e-27) || !(z <= 0.0038)) tmp = Float64(Float64(x * Float64(Float64(y / z) / Float64(b - y))) + Float64(Float64(t - a) / Float64(b - y))); else tmp = Float64(Float64(Float64(z * Float64(t - a)) + Float64(x * y)) / Float64(y + Float64(z * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -3.1e-27) || ~((z <= 0.0038))) tmp = (x * ((y / z) / (b - y))) + ((t - a) / (b - y)); else tmp = ((z * (t - a)) + (x * y)) / (y + (z * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.1e-27], N[Not[LessEqual[z, 0.0038]], $MachinePrecision]], N[(N[(x * N[(N[(y / z), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.1 \cdot 10^{-27} \lor \neg \left(z \leq 0.0038\right):\\
\;\;\;\;x \cdot \frac{\frac{y}{z}}{b - y} + \frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right) + x \cdot y}{y + z \cdot b}\\
\end{array}
\end{array}
if z < -3.0999999999999998e-27 or 0.00379999999999999999 < z Initial program 49.3%
Taylor expanded in z around -inf 71.1%
associate--l+71.1%
mul-1-neg71.1%
distribute-lft-out--71.1%
associate-/l*75.4%
associate-/l*92.3%
div-sub92.3%
Simplified92.3%
Taylor expanded in x around inf 84.5%
associate-/l*91.7%
associate-/r*98.0%
Simplified98.0%
if -3.0999999999999998e-27 < z < 0.00379999999999999999Initial program 85.3%
Taylor expanded in b around inf 85.3%
*-commutative85.3%
Simplified85.3%
Final simplification92.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (/ (- t a) (- b y)) (/ x z))))
(if (<= z -400000.0)
t_1
(if (<= z -4.1e-103)
(/ (+ t (- (* x (/ y z)) a)) b)
(if (<= z 0.00021) (/ x (- 1.0 z)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t - a) / (b - y)) - (x / z);
double tmp;
if (z <= -400000.0) {
tmp = t_1;
} else if (z <= -4.1e-103) {
tmp = (t + ((x * (y / z)) - a)) / b;
} else if (z <= 0.00021) {
tmp = x / (1.0 - z);
} 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 = ((t - a) / (b - y)) - (x / z)
if (z <= (-400000.0d0)) then
tmp = t_1
else if (z <= (-4.1d-103)) then
tmp = (t + ((x * (y / z)) - a)) / b
else if (z <= 0.00021d0) then
tmp = x / (1.0d0 - z)
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 = ((t - a) / (b - y)) - (x / z);
double tmp;
if (z <= -400000.0) {
tmp = t_1;
} else if (z <= -4.1e-103) {
tmp = (t + ((x * (y / z)) - a)) / b;
} else if (z <= 0.00021) {
tmp = x / (1.0 - z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((t - a) / (b - y)) - (x / z) tmp = 0 if z <= -400000.0: tmp = t_1 elif z <= -4.1e-103: tmp = (t + ((x * (y / z)) - a)) / b elif z <= 0.00021: tmp = x / (1.0 - z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(t - a) / Float64(b - y)) - Float64(x / z)) tmp = 0.0 if (z <= -400000.0) tmp = t_1; elseif (z <= -4.1e-103) tmp = Float64(Float64(t + Float64(Float64(x * Float64(y / z)) - a)) / b); elseif (z <= 0.00021) tmp = Float64(x / Float64(1.0 - z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((t - a) / (b - y)) - (x / z); tmp = 0.0; if (z <= -400000.0) tmp = t_1; elseif (z <= -4.1e-103) tmp = (t + ((x * (y / z)) - a)) / b; elseif (z <= 0.00021) tmp = x / (1.0 - z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -400000.0], t$95$1, If[LessEqual[z, -4.1e-103], N[(N[(t + N[(N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 0.00021], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y} - \frac{x}{z}\\
\mathbf{if}\;z \leq -400000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -4.1 \cdot 10^{-103}:\\
\;\;\;\;\frac{t + \left(x \cdot \frac{y}{z} - a\right)}{b}\\
\mathbf{elif}\;z \leq 0.00021:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4e5 or 2.1000000000000001e-4 < z Initial program 48.2%
Taylor expanded in z around -inf 71.5%
associate--l+71.5%
mul-1-neg71.5%
distribute-lft-out--71.5%
associate-/l*75.9%
associate-/l*93.4%
div-sub93.4%
Simplified93.4%
Taylor expanded in y around inf 86.8%
associate-*r/86.8%
mul-1-neg86.8%
Simplified86.8%
if -4e5 < z < -4.09999999999999996e-103Initial program 95.1%
Taylor expanded in z around inf 86.9%
associate--l+86.9%
associate-/l*82.7%
Simplified82.7%
Taylor expanded in b around inf 53.5%
associate--l+53.5%
associate-/l*53.5%
Simplified53.5%
if -4.09999999999999996e-103 < z < 2.1000000000000001e-4Initial program 82.6%
Taylor expanded in y around inf 60.4%
mul-1-neg60.4%
unsub-neg60.4%
Simplified60.4%
Final simplification74.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -22.0) (not (<= z 18500.0))) (- (/ (- t a) (- b y)) (/ x z)) (/ (+ (* z (- t a)) (* x y)) (+ y (* z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -22.0) || !(z <= 18500.0)) {
tmp = ((t - a) / (b - y)) - (x / z);
} else {
tmp = ((z * (t - a)) + (x * y)) / (y + (z * 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 <= (-22.0d0)) .or. (.not. (z <= 18500.0d0))) then
tmp = ((t - a) / (b - y)) - (x / z)
else
tmp = ((z * (t - a)) + (x * y)) / (y + (z * 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 <= -22.0) || !(z <= 18500.0)) {
tmp = ((t - a) / (b - y)) - (x / z);
} else {
tmp = ((z * (t - a)) + (x * y)) / (y + (z * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -22.0) or not (z <= 18500.0): tmp = ((t - a) / (b - y)) - (x / z) else: tmp = ((z * (t - a)) + (x * y)) / (y + (z * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -22.0) || !(z <= 18500.0)) tmp = Float64(Float64(Float64(t - a) / Float64(b - y)) - Float64(x / z)); else tmp = Float64(Float64(Float64(z * Float64(t - a)) + Float64(x * y)) / Float64(y + Float64(z * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -22.0) || ~((z <= 18500.0))) tmp = ((t - a) / (b - y)) - (x / z); else tmp = ((z * (t - a)) + (x * y)) / (y + (z * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -22.0], N[Not[LessEqual[z, 18500.0]], $MachinePrecision]], N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -22 \lor \neg \left(z \leq 18500\right):\\
\;\;\;\;\frac{t - a}{b - y} - \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right) + x \cdot y}{y + z \cdot b}\\
\end{array}
\end{array}
if z < -22 or 18500 < z Initial program 47.5%
Taylor expanded in z around -inf 71.1%
associate--l+71.1%
mul-1-neg71.1%
distribute-lft-out--71.1%
associate-/l*75.6%
associate-/l*93.3%
div-sub93.3%
Simplified93.3%
Taylor expanded in y around inf 87.3%
associate-*r/87.3%
mul-1-neg87.3%
Simplified87.3%
if -22 < z < 18500Initial program 85.3%
Taylor expanded in b around inf 85.3%
*-commutative85.3%
Simplified85.3%
Final simplification86.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -5e-75) (not (<= z 2.15e-9))) (/ (- t a) (- b y)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5e-75) || !(z <= 2.15e-9)) {
tmp = (t - a) / (b - y);
} else {
tmp = x;
}
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 <= (-5d-75)) .or. (.not. (z <= 2.15d-9))) then
tmp = (t - a) / (b - y)
else
tmp = x
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 <= -5e-75) || !(z <= 2.15e-9)) {
tmp = (t - a) / (b - y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -5e-75) or not (z <= 2.15e-9): tmp = (t - a) / (b - y) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -5e-75) || !(z <= 2.15e-9)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -5e-75) || ~((z <= 2.15e-9))) tmp = (t - a) / (b - y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -5e-75], N[Not[LessEqual[z, 2.15e-9]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{-75} \lor \neg \left(z \leq 2.15 \cdot 10^{-9}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -4.99999999999999979e-75 or 2.14999999999999981e-9 < z Initial program 52.9%
Taylor expanded in z around inf 76.4%
if -4.99999999999999979e-75 < z < 2.14999999999999981e-9Initial program 83.8%
Taylor expanded in z around 0 58.4%
Final simplification69.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1e-17) (not (<= y 1.6e-81))) (/ 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 <= -1e-17) || !(y <= 1.6e-81)) {
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 <= (-1d-17)) .or. (.not. (y <= 1.6d-81))) 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 <= -1e-17) || !(y <= 1.6e-81)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1e-17) or not (y <= 1.6e-81): 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 <= -1e-17) || !(y <= 1.6e-81)) 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 <= -1e-17) || ~((y <= 1.6e-81))) 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, -1e-17], N[Not[LessEqual[y, 1.6e-81]], $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 \cdot 10^{-17} \lor \neg \left(y \leq 1.6 \cdot 10^{-81}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -1.00000000000000007e-17 or 1.6e-81 < y Initial program 58.4%
Taylor expanded in y around inf 47.6%
mul-1-neg47.6%
unsub-neg47.6%
Simplified47.6%
if -1.00000000000000007e-17 < y < 1.6e-81Initial program 76.5%
Taylor expanded in y around 0 68.4%
Final simplification55.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -7.8e-33) (not (<= y 3.5e-79))) (/ x (- 1.0 z)) (/ a (- b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -7.8e-33) || !(y <= 3.5e-79)) {
tmp = x / (1.0 - 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 ((y <= (-7.8d-33)) .or. (.not. (y <= 3.5d-79))) then
tmp = x / (1.0d0 - 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 ((y <= -7.8e-33) || !(y <= 3.5e-79)) {
tmp = x / (1.0 - z);
} else {
tmp = a / -b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -7.8e-33) or not (y <= 3.5e-79): tmp = x / (1.0 - z) else: tmp = a / -b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -7.8e-33) || !(y <= 3.5e-79)) tmp = Float64(x / Float64(1.0 - z)); else tmp = Float64(a / Float64(-b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -7.8e-33) || ~((y <= 3.5e-79))) tmp = x / (1.0 - z); else tmp = a / -b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -7.8e-33], N[Not[LessEqual[y, 3.5e-79]], $MachinePrecision]], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(a / (-b)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.8 \cdot 10^{-33} \lor \neg \left(y \leq 3.5 \cdot 10^{-79}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{-b}\\
\end{array}
\end{array}
if y < -7.79999999999999948e-33 or 3.5000000000000003e-79 < y Initial program 58.9%
Taylor expanded in y around inf 47.6%
mul-1-neg47.6%
unsub-neg47.6%
Simplified47.6%
if -7.79999999999999948e-33 < y < 3.5000000000000003e-79Initial program 76.0%
Taylor expanded in a around inf 34.6%
mul-1-neg34.6%
distribute-lft-neg-out34.6%
*-commutative34.6%
Simplified34.6%
Taylor expanded in y around 0 45.3%
associate-*r/45.3%
mul-1-neg45.3%
Simplified45.3%
Final simplification46.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.6e-41) (not (<= z 1.55e-17))) (/ a (- b)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.6e-41) || !(z <= 1.55e-17)) {
tmp = a / -b;
} else {
tmp = x;
}
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.6d-41)) .or. (.not. (z <= 1.55d-17))) then
tmp = a / -b
else
tmp = x
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.6e-41) || !(z <= 1.55e-17)) {
tmp = a / -b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.6e-41) or not (z <= 1.55e-17): tmp = a / -b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.6e-41) || !(z <= 1.55e-17)) tmp = Float64(a / Float64(-b)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -2.6e-41) || ~((z <= 1.55e-17))) tmp = a / -b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.6e-41], N[Not[LessEqual[z, 1.55e-17]], $MachinePrecision]], N[(a / (-b)), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{-41} \lor \neg \left(z \leq 1.55 \cdot 10^{-17}\right):\\
\;\;\;\;\frac{a}{-b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.5999999999999999e-41 or 1.5499999999999999e-17 < z Initial program 50.7%
Taylor expanded in a around inf 23.8%
mul-1-neg23.8%
distribute-lft-neg-out23.8%
*-commutative23.8%
Simplified23.8%
Taylor expanded in y around 0 29.6%
associate-*r/29.6%
mul-1-neg29.6%
Simplified29.6%
if -2.5999999999999999e-41 < z < 1.5499999999999999e-17Initial program 84.8%
Taylor expanded in z around 0 55.7%
Final simplification40.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 64.9%
Taylor expanded in z around 0 26.1%
(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 2024111
(FPCore (x y z t a b)
:name "Development.Shake.Progress:decay from shake-0.15.5"
:precision binary64
:alt
(- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z))))
(/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))