
(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 (- y (* z (- y b)))))
(if (or (<= z -2.2e+30) (not (<= z 3.15e+44)))
(+
(+ (/ (* x (/ y z)) (- b y)) (/ (- t a) (- b y)))
(* y (/ (- a t) (* z (pow (- b y) 2.0)))))
(* 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 * (y - b));
double tmp;
if ((z <= -2.2e+30) || !(z <= 3.15e+44)) {
tmp = (((x * (y / z)) / (b - y)) + ((t - a) / (b - y))) + (y * ((a - t) / (z * pow((b - y), 2.0))));
} 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 * (y - b))
if ((z <= (-2.2d+30)) .or. (.not. (z <= 3.15d+44))) then
tmp = (((x * (y / z)) / (b - y)) + ((t - a) / (b - y))) + (y * ((a - t) / (z * ((b - y) ** 2.0d0))))
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 * (y - b));
double tmp;
if ((z <= -2.2e+30) || !(z <= 3.15e+44)) {
tmp = (((x * (y / z)) / (b - y)) + ((t - a) / (b - y))) + (y * ((a - t) / (z * Math.pow((b - y), 2.0))));
} 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 * (y - b)) tmp = 0 if (z <= -2.2e+30) or not (z <= 3.15e+44): tmp = (((x * (y / z)) / (b - y)) + ((t - a) / (b - y))) + (y * ((a - t) / (z * math.pow((b - y), 2.0)))) 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(y - b))) tmp = 0.0 if ((z <= -2.2e+30) || !(z <= 3.15e+44)) tmp = Float64(Float64(Float64(Float64(x * Float64(y / z)) / Float64(b - y)) + Float64(Float64(t - a) / Float64(b - y))) + Float64(y * Float64(Float64(a - t) / Float64(z * (Float64(b - y) ^ 2.0))))); 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 * (y - b)); tmp = 0.0; if ((z <= -2.2e+30) || ~((z <= 3.15e+44))) tmp = (((x * (y / z)) / (b - y)) + ((t - a) / (b - y))) + (y * ((a - t) / (z * ((b - y) ^ 2.0)))); 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[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -2.2e+30], N[Not[LessEqual[z, 3.15e+44]], $MachinePrecision]], N[(N[(N[(N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(N[(a - t), $MachinePrecision] / N[(z * N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $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(y - b\right)\\
\mathbf{if}\;z \leq -2.2 \cdot 10^{+30} \lor \neg \left(z \leq 3.15 \cdot 10^{+44}\right):\\
\;\;\;\;\left(\frac{x \cdot \frac{y}{z}}{b - y} + \frac{t - a}{b - y}\right) + y \cdot \frac{a - t}{z \cdot {\left(b - y\right)}^{2}}\\
\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 < -2.2e30 or 3.15e44 < z Initial program 33.6%
Taylor expanded in z around inf 66.9%
associate--r+66.9%
+-commutative66.9%
associate--l+66.9%
associate-/r*69.3%
associate-/l*71.6%
div-sub71.5%
associate-/l*92.4%
Simplified92.4%
if -2.2e30 < z < 3.15e44Initial program 86.0%
Taylor expanded in x around inf 89.9%
Final simplification91.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- y (* z (- y b)))))
(if (or (<= z -2.8e+32) (not (<= z 2.4e+21)))
(/ (- 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 * (y - b));
double tmp;
if ((z <= -2.8e+32) || !(z <= 2.4e+21)) {
tmp = (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 * (y - b))
if ((z <= (-2.8d+32)) .or. (.not. (z <= 2.4d+21))) then
tmp = (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 * (y - b));
double tmp;
if ((z <= -2.8e+32) || !(z <= 2.4e+21)) {
tmp = (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 * (y - b)) tmp = 0 if (z <= -2.8e+32) or not (z <= 2.4e+21): tmp = (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(y - b))) tmp = 0.0 if ((z <= -2.8e+32) || !(z <= 2.4e+21)) tmp = 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 * (y - b)); tmp = 0.0; if ((z <= -2.8e+32) || ~((z <= 2.4e+21))) tmp = (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[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -2.8e+32], N[Not[LessEqual[z, 2.4e+21]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $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(y - b\right)\\
\mathbf{if}\;z \leq -2.8 \cdot 10^{+32} \lor \neg \left(z \leq 2.4 \cdot 10^{+21}\right):\\
\;\;\;\;\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 < -2.8e32 or 2.4e21 < z Initial program 34.4%
Taylor expanded in z around inf 82.1%
if -2.8e32 < z < 2.4e21Initial program 86.4%
Taylor expanded in x around inf 90.4%
Final simplification86.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -2.2e+30)
t_1
(if (<= z -2.3e-130)
(/ (* z (- t a)) (- y (* z (- y b))))
(if (<= z 2.8e-53) (/ (+ (* x y) (* z t)) (+ y (* z b))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -2.2e+30) {
tmp = t_1;
} else if (z <= -2.3e-130) {
tmp = (z * (t - a)) / (y - (z * (y - b)));
} else if (z <= 2.8e-53) {
tmp = ((x * y) + (z * t)) / (y + (z * b));
} 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)
if (z <= (-2.2d+30)) then
tmp = t_1
else if (z <= (-2.3d-130)) then
tmp = (z * (t - a)) / (y - (z * (y - b)))
else if (z <= 2.8d-53) then
tmp = ((x * y) + (z * t)) / (y + (z * b))
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);
double tmp;
if (z <= -2.2e+30) {
tmp = t_1;
} else if (z <= -2.3e-130) {
tmp = (z * (t - a)) / (y - (z * (y - b)));
} else if (z <= 2.8e-53) {
tmp = ((x * y) + (z * t)) / (y + (z * b));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -2.2e+30: tmp = t_1 elif z <= -2.3e-130: tmp = (z * (t - a)) / (y - (z * (y - b))) elif z <= 2.8e-53: tmp = ((x * y) + (z * t)) / (y + (z * b)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -2.2e+30) tmp = t_1; elseif (z <= -2.3e-130) tmp = Float64(Float64(z * Float64(t - a)) / Float64(y - Float64(z * Float64(y - b)))); elseif (z <= 2.8e-53) tmp = Float64(Float64(Float64(x * y) + Float64(z * t)) / Float64(y + Float64(z * b))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -2.2e+30) tmp = t_1; elseif (z <= -2.3e-130) tmp = (z * (t - a)) / (y - (z * (y - b))); elseif (z <= 2.8e-53) tmp = ((x * y) + (z * t)) / (y + (z * b)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.2e+30], t$95$1, If[LessEqual[z, -2.3e-130], N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(y - N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.8e-53], N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2.2 \cdot 10^{+30}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.3 \cdot 10^{-130}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right)}{y - z \cdot \left(y - b\right)}\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-53}:\\
\;\;\;\;\frac{x \cdot y + z \cdot t}{y + z \cdot b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.2e30 or 2.79999999999999985e-53 < z Initial program 39.0%
Taylor expanded in z around inf 79.8%
if -2.2e30 < z < -2.3000000000000001e-130Initial program 88.1%
Taylor expanded in x around 0 72.8%
if -2.3000000000000001e-130 < z < 2.79999999999999985e-53Initial program 86.8%
Taylor expanded in t around inf 68.1%
*-commutative68.1%
Simplified68.1%
Taylor expanded in b around inf 68.1%
*-commutative86.8%
Simplified68.1%
Final simplification75.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -2.2e+30)
t_1
(if (<= z -4e-160)
(/ (* z (- t a)) (- y (* z (- y b))))
(if (<= z 1.5e-32) (* x (+ (* z (/ (- t a) (* x y))) 1.0)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -2.2e+30) {
tmp = t_1;
} else if (z <= -4e-160) {
tmp = (z * (t - a)) / (y - (z * (y - b)));
} else if (z <= 1.5e-32) {
tmp = x * ((z * ((t - a) / (x * y))) + 1.0);
} 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)
if (z <= (-2.2d+30)) then
tmp = t_1
else if (z <= (-4d-160)) then
tmp = (z * (t - a)) / (y - (z * (y - b)))
else if (z <= 1.5d-32) then
tmp = x * ((z * ((t - a) / (x * y))) + 1.0d0)
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);
double tmp;
if (z <= -2.2e+30) {
tmp = t_1;
} else if (z <= -4e-160) {
tmp = (z * (t - a)) / (y - (z * (y - b)));
} else if (z <= 1.5e-32) {
tmp = x * ((z * ((t - a) / (x * y))) + 1.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -2.2e+30: tmp = t_1 elif z <= -4e-160: tmp = (z * (t - a)) / (y - (z * (y - b))) elif z <= 1.5e-32: tmp = x * ((z * ((t - a) / (x * y))) + 1.0) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -2.2e+30) tmp = t_1; elseif (z <= -4e-160) tmp = Float64(Float64(z * Float64(t - a)) / Float64(y - Float64(z * Float64(y - b)))); elseif (z <= 1.5e-32) tmp = Float64(x * Float64(Float64(z * Float64(Float64(t - a) / Float64(x * y))) + 1.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -2.2e+30) tmp = t_1; elseif (z <= -4e-160) tmp = (z * (t - a)) / (y - (z * (y - b))); elseif (z <= 1.5e-32) tmp = x * ((z * ((t - a) / (x * y))) + 1.0); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.2e+30], t$95$1, If[LessEqual[z, -4e-160], N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(y - N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.5e-32], N[(x * N[(N[(z * N[(N[(t - a), $MachinePrecision] / N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2.2 \cdot 10^{+30}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -4 \cdot 10^{-160}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right)}{y - z \cdot \left(y - b\right)}\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{-32}:\\
\;\;\;\;x \cdot \left(z \cdot \frac{t - a}{x \cdot y} + 1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.2e30 or 1.5e-32 < z Initial program 39.1%
Taylor expanded in z around inf 80.8%
if -2.2e30 < z < -4e-160Initial program 87.4%
Taylor expanded in x around 0 71.9%
if -4e-160 < z < 1.5e-32Initial program 85.3%
Taylor expanded in x around inf 89.6%
Taylor expanded in z around 0 77.9%
associate-/l*68.9%
*-commutative68.9%
Simplified68.9%
Taylor expanded in z around 0 63.0%
Final simplification73.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -5.6e+17) (not (<= z 4.7e+23))) (/ (- t a) (- b y)) (/ (+ (* z (- t a)) (* x y)) (- y (* z (- y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5.6e+17) || !(z <= 4.7e+23)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((z * (t - a)) + (x * y)) / (y - (z * (y - 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 <= (-5.6d+17)) .or. (.not. (z <= 4.7d+23))) then
tmp = (t - a) / (b - y)
else
tmp = ((z * (t - a)) + (x * y)) / (y - (z * (y - 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 <= -5.6e+17) || !(z <= 4.7e+23)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((z * (t - a)) + (x * y)) / (y - (z * (y - b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -5.6e+17) or not (z <= 4.7e+23): tmp = (t - a) / (b - y) else: tmp = ((z * (t - a)) + (x * y)) / (y - (z * (y - b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -5.6e+17) || !(z <= 4.7e+23)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(Float64(z * Float64(t - a)) + Float64(x * y)) / Float64(y - Float64(z * Float64(y - b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -5.6e+17) || ~((z <= 4.7e+23))) tmp = (t - a) / (b - y); else tmp = ((z * (t - a)) + (x * y)) / (y - (z * (y - b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -5.6e+17], N[Not[LessEqual[z, 4.7e+23]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(y - N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.6 \cdot 10^{+17} \lor \neg \left(z \leq 4.7 \cdot 10^{+23}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right) + x \cdot y}{y - z \cdot \left(y - b\right)}\\
\end{array}
\end{array}
if z < -5.6e17 or 4.6999999999999997e23 < z Initial program 34.7%
Taylor expanded in z around inf 81.6%
if -5.6e17 < z < 4.6999999999999997e23Initial program 86.9%
Final simplification84.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -105000000000.0) (not (<= z 16.0))) (/ (- 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 <= -105000000000.0) || !(z <= 16.0)) {
tmp = (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 <= (-105000000000.0d0)) .or. (.not. (z <= 16.0d0))) then
tmp = (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 <= -105000000000.0) || !(z <= 16.0)) {
tmp = (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 <= -105000000000.0) or not (z <= 16.0): tmp = (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 <= -105000000000.0) || !(z <= 16.0)) tmp = 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 <= -105000000000.0) || ~((z <= 16.0))) tmp = (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, -105000000000.0], N[Not[LessEqual[z, 16.0]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $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 -105000000000 \lor \neg \left(z \leq 16\right):\\
\;\;\;\;\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 < -1.05e11 or 16 < z Initial program 36.7%
Taylor expanded in z around inf 81.6%
if -1.05e11 < z < 16Initial program 86.5%
Taylor expanded in b around inf 85.8%
*-commutative85.8%
Simplified85.8%
Final simplification83.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.1e-37) (not (<= z 2.7e-32))) (/ (- t a) (- b y)) (* x (+ (* z (/ (- t a) (* x y))) 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.1e-37) || !(z <= 2.7e-32)) {
tmp = (t - a) / (b - y);
} else {
tmp = x * ((z * ((t - a) / (x * y))) + 1.0);
}
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.1d-37)) .or. (.not. (z <= 2.7d-32))) then
tmp = (t - a) / (b - y)
else
tmp = x * ((z * ((t - a) / (x * y))) + 1.0d0)
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.1e-37) || !(z <= 2.7e-32)) {
tmp = (t - a) / (b - y);
} else {
tmp = x * ((z * ((t - a) / (x * y))) + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.1e-37) or not (z <= 2.7e-32): tmp = (t - a) / (b - y) else: tmp = x * ((z * ((t - a) / (x * y))) + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.1e-37) || !(z <= 2.7e-32)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x * Float64(Float64(z * Float64(Float64(t - a) / Float64(x * y))) + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.1e-37) || ~((z <= 2.7e-32))) tmp = (t - a) / (b - y); else tmp = x * ((z * ((t - a) / (x * y))) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.1e-37], N[Not[LessEqual[z, 2.7e-32]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(z * N[(N[(t - a), $MachinePrecision] / N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{-37} \lor \neg \left(z \leq 2.7 \cdot 10^{-32}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(z \cdot \frac{t - a}{x \cdot y} + 1\right)\\
\end{array}
\end{array}
if z < -1.10000000000000001e-37 or 2.69999999999999981e-32 < z Initial program 44.7%
Taylor expanded in z around inf 77.9%
if -1.10000000000000001e-37 < z < 2.69999999999999981e-32Initial program 86.2%
Taylor expanded in x around inf 88.6%
Taylor expanded in z around 0 75.3%
associate-/l*67.9%
*-commutative67.9%
Simplified67.9%
Taylor expanded in z around 0 62.2%
Final simplification71.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -5.3e+123) (not (<= y 1.9e+181))) (/ x (- 1.0 z)) (/ (- t a) (- b y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -5.3e+123) || !(y <= 1.9e+181)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / (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 ((y <= (-5.3d+123)) .or. (.not. (y <= 1.9d+181))) then
tmp = x / (1.0d0 - z)
else
tmp = (t - a) / (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 ((y <= -5.3e+123) || !(y <= 1.9e+181)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / (b - y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -5.3e+123) or not (y <= 1.9e+181): tmp = x / (1.0 - z) else: tmp = (t - a) / (b - y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -5.3e+123) || !(y <= 1.9e+181)) tmp = Float64(x / Float64(1.0 - z)); else tmp = Float64(Float64(t - a) / Float64(b - y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -5.3e+123) || ~((y <= 1.9e+181))) tmp = x / (1.0 - z); else tmp = (t - a) / (b - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -5.3e+123], N[Not[LessEqual[y, 1.9e+181]], $MachinePrecision]], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.3 \cdot 10^{+123} \lor \neg \left(y \leq 1.9 \cdot 10^{+181}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b - y}\\
\end{array}
\end{array}
if y < -5.3e123 or 1.9000000000000001e181 < y Initial program 45.4%
Taylor expanded in y around inf 65.3%
mul-1-neg65.3%
unsub-neg65.3%
Simplified65.3%
if -5.3e123 < y < 1.9000000000000001e181Initial program 67.5%
Taylor expanded in z around inf 67.3%
Final simplification66.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.9e+76) (not (<= y 3.35e+43))) (/ 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 <= -2.9e+76) || !(y <= 3.35e+43)) {
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 <= (-2.9d+76)) .or. (.not. (y <= 3.35d+43))) 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 <= -2.9e+76) || !(y <= 3.35e+43)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.9e+76) or not (y <= 3.35e+43): 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 <= -2.9e+76) || !(y <= 3.35e+43)) 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 <= -2.9e+76) || ~((y <= 3.35e+43))) 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, -2.9e+76], N[Not[LessEqual[y, 3.35e+43]], $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 -2.9 \cdot 10^{+76} \lor \neg \left(y \leq 3.35 \cdot 10^{+43}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -2.9000000000000002e76 or 3.34999999999999988e43 < y Initial program 46.3%
Taylor expanded in y around inf 56.4%
mul-1-neg56.4%
unsub-neg56.4%
Simplified56.4%
if -2.9000000000000002e76 < y < 3.34999999999999988e43Initial program 71.6%
Taylor expanded in y around 0 59.8%
Final simplification58.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -8.2e-42) (not (<= z 9.8e-33))) (/ t (- b y)) (+ x (* z x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -8.2e-42) || !(z <= 9.8e-33)) {
tmp = t / (b - y);
} else {
tmp = x + (z * 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 <= (-8.2d-42)) .or. (.not. (z <= 9.8d-33))) then
tmp = t / (b - y)
else
tmp = x + (z * 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 <= -8.2e-42) || !(z <= 9.8e-33)) {
tmp = t / (b - y);
} else {
tmp = x + (z * x);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -8.2e-42) or not (z <= 9.8e-33): tmp = t / (b - y) else: tmp = x + (z * x) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -8.2e-42) || !(z <= 9.8e-33)) tmp = Float64(t / Float64(b - y)); else tmp = Float64(x + Float64(z * x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -8.2e-42) || ~((z <= 9.8e-33))) tmp = t / (b - y); else tmp = x + (z * x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -8.2e-42], N[Not[LessEqual[z, 9.8e-33]], $MachinePrecision]], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.2 \cdot 10^{-42} \lor \neg \left(z \leq 9.8 \cdot 10^{-33}\right):\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot x\\
\end{array}
\end{array}
if z < -8.2000000000000003e-42 or 9.7999999999999996e-33 < z Initial program 45.4%
Taylor expanded in x around 0 41.0%
associate-/l*58.6%
+-commutative58.6%
fma-undefine58.6%
Simplified58.6%
Taylor expanded in t around inf 37.7%
Taylor expanded in z around inf 46.6%
if -8.2000000000000003e-42 < z < 9.7999999999999996e-33Initial program 85.9%
Taylor expanded in y around inf 48.7%
mul-1-neg48.7%
unsub-neg48.7%
Simplified48.7%
Taylor expanded in z around 0 48.7%
Final simplification47.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -5.4e-34) (not (<= z 2.2e-33))) (/ t b) (+ x (* z x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5.4e-34) || !(z <= 2.2e-33)) {
tmp = t / b;
} else {
tmp = x + (z * 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 <= (-5.4d-34)) .or. (.not. (z <= 2.2d-33))) then
tmp = t / b
else
tmp = x + (z * 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 <= -5.4e-34) || !(z <= 2.2e-33)) {
tmp = t / b;
} else {
tmp = x + (z * x);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -5.4e-34) or not (z <= 2.2e-33): tmp = t / b else: tmp = x + (z * x) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -5.4e-34) || !(z <= 2.2e-33)) tmp = Float64(t / b); else tmp = Float64(x + Float64(z * x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -5.4e-34) || ~((z <= 2.2e-33))) tmp = t / b; else tmp = x + (z * x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -5.4e-34], N[Not[LessEqual[z, 2.2e-33]], $MachinePrecision]], N[(t / b), $MachinePrecision], N[(x + N[(z * x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.4 \cdot 10^{-34} \lor \neg \left(z \leq 2.2 \cdot 10^{-33}\right):\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot x\\
\end{array}
\end{array}
if z < -5.40000000000000034e-34 or 2.20000000000000005e-33 < z Initial program 44.4%
Taylor expanded in x around 0 39.8%
associate-/l*57.8%
+-commutative57.8%
fma-undefine57.8%
Simplified57.8%
Taylor expanded in t around inf 37.1%
Taylor expanded in y around 0 33.6%
if -5.40000000000000034e-34 < z < 2.20000000000000005e-33Initial program 86.3%
Taylor expanded in y around inf 47.4%
mul-1-neg47.4%
unsub-neg47.4%
Simplified47.4%
Taylor expanded in z around 0 47.4%
Final simplification39.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.8e-32) (not (<= z 6.2e-34))) (/ t b) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.8e-32) || !(z <= 6.2e-34)) {
tmp = t / 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.8d-32)) .or. (.not. (z <= 6.2d-34))) then
tmp = t / 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.8e-32) || !(z <= 6.2e-34)) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.8e-32) or not (z <= 6.2e-34): tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.8e-32) || !(z <= 6.2e-34)) tmp = Float64(t / b); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -2.8e-32) || ~((z <= 6.2e-34))) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.8e-32], N[Not[LessEqual[z, 6.2e-34]], $MachinePrecision]], N[(t / b), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{-32} \lor \neg \left(z \leq 6.2 \cdot 10^{-34}\right):\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.7999999999999999e-32 or 6.1999999999999996e-34 < z Initial program 44.4%
Taylor expanded in x around 0 39.8%
associate-/l*57.8%
+-commutative57.8%
fma-undefine57.8%
Simplified57.8%
Taylor expanded in t around inf 37.1%
Taylor expanded in y around 0 33.6%
if -2.7999999999999999e-32 < z < 6.1999999999999996e-34Initial program 86.3%
Taylor expanded in z around 0 47.4%
Final simplification39.2%
(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 61.4%
Taylor expanded in z around 0 21.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 2024144
(FPCore (x y z t a b)
:name "Development.Shake.Progress:decay from shake-0.15.5"
:precision binary64
:alt
(! :herbie-platform default (- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z)))))
(/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))