
(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 17 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 -1.52e+35) (not (<= z 2.2e+28)))
(-
(+ (/ (/ y (/ z x)) (- b y)) (/ (- t a) (- b y)))
(/ y (/ (pow (- b y) 2.0) (/ (- t a) z))))
(+ (/ (* y x) t_1) (/ (* z (- t a)) 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 <= -1.52e+35) || !(z <= 2.2e+28)) {
tmp = (((y / (z / x)) / (b - y)) + ((t - a) / (b - y))) - (y / (pow((b - y), 2.0) / ((t - a) / z)));
} else {
tmp = ((y * x) / t_1) + ((z * (t - a)) / 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 <= (-1.52d+35)) .or. (.not. (z <= 2.2d+28))) then
tmp = (((y / (z / x)) / (b - y)) + ((t - a) / (b - y))) - (y / (((b - y) ** 2.0d0) / ((t - a) / z)))
else
tmp = ((y * x) / t_1) + ((z * (t - a)) / 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 <= -1.52e+35) || !(z <= 2.2e+28)) {
tmp = (((y / (z / x)) / (b - y)) + ((t - a) / (b - y))) - (y / (Math.pow((b - y), 2.0) / ((t - a) / z)));
} else {
tmp = ((y * x) / t_1) + ((z * (t - a)) / t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) tmp = 0 if (z <= -1.52e+35) or not (z <= 2.2e+28): tmp = (((y / (z / x)) / (b - y)) + ((t - a) / (b - y))) - (y / (math.pow((b - y), 2.0) / ((t - a) / z))) else: tmp = ((y * x) / t_1) + ((z * (t - a)) / 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 <= -1.52e+35) || !(z <= 2.2e+28)) tmp = Float64(Float64(Float64(Float64(y / Float64(z / x)) / Float64(b - y)) + Float64(Float64(t - a) / Float64(b - y))) - Float64(y / Float64((Float64(b - y) ^ 2.0) / Float64(Float64(t - a) / z)))); else tmp = Float64(Float64(Float64(y * x) / t_1) + Float64(Float64(z * Float64(t - a)) / 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 <= -1.52e+35) || ~((z <= 2.2e+28))) tmp = (((y / (z / x)) / (b - y)) + ((t - a) / (b - y))) - (y / (((b - y) ^ 2.0) / ((t - a) / z))); else tmp = ((y * x) / t_1) + ((z * (t - a)) / 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, -1.52e+35], N[Not[LessEqual[z, 2.2e+28]], $MachinePrecision]], N[(N[(N[(N[(y / N[(z / x), $MachinePrecision]), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y / N[(N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision] / N[(N[(t - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * x), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
\mathbf{if}\;z \leq -1.52 \cdot 10^{+35} \lor \neg \left(z \leq 2.2 \cdot 10^{+28}\right):\\
\;\;\;\;\left(\frac{\frac{y}{\frac{z}{x}}}{b - y} + \frac{t - a}{b - y}\right) - \frac{y}{\frac{{\left(b - y\right)}^{2}}{\frac{t - a}{z}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x}{t\_1} + \frac{z \cdot \left(t - a\right)}{t\_1}\\
\end{array}
\end{array}
if z < -1.5200000000000001e35 or 2.19999999999999986e28 < z Initial program 39.3%
Taylor expanded in z around inf 65.2%
associate--r+65.2%
+-commutative65.2%
associate--l+65.2%
associate-/r*68.9%
*-commutative68.9%
associate-/l*74.2%
div-sub75.0%
associate-/l*90.7%
*-commutative90.7%
associate-/l*90.7%
Simplified90.7%
if -1.5200000000000001e35 < z < 2.19999999999999986e28Initial program 89.4%
Taylor expanded in x around 0 89.4%
Final simplification90.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a)))
(t_2 (+ y (* z (- b y))))
(t_3 (/ (- t a) (- b y))))
(if (<= z -2.6e+208)
t_3
(if (<= z -1.85e+202)
(/ x (- 1.0 z))
(if (<= z -9.5e+95)
t_3
(if (<= z -1.06e-19)
(+ (/ t_1 t_2) (* (/ x z) (/ y (- b y))))
(if (<= z -1.95e-66)
(+ x (* z (/ (- t a) y)))
(if (<= z 1.75e+28) (/ (+ (* y x) t_1) 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 = y + (z * (b - y));
double t_3 = (t - a) / (b - y);
double tmp;
if (z <= -2.6e+208) {
tmp = t_3;
} else if (z <= -1.85e+202) {
tmp = x / (1.0 - z);
} else if (z <= -9.5e+95) {
tmp = t_3;
} else if (z <= -1.06e-19) {
tmp = (t_1 / t_2) + ((x / z) * (y / (b - y)));
} else if (z <= -1.95e-66) {
tmp = x + (z * ((t - a) / y));
} else if (z <= 1.75e+28) {
tmp = ((y * x) + t_1) / 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 = y + (z * (b - y))
t_3 = (t - a) / (b - y)
if (z <= (-2.6d+208)) then
tmp = t_3
else if (z <= (-1.85d+202)) then
tmp = x / (1.0d0 - z)
else if (z <= (-9.5d+95)) then
tmp = t_3
else if (z <= (-1.06d-19)) then
tmp = (t_1 / t_2) + ((x / z) * (y / (b - y)))
else if (z <= (-1.95d-66)) then
tmp = x + (z * ((t - a) / y))
else if (z <= 1.75d+28) then
tmp = ((y * x) + t_1) / 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 = y + (z * (b - y));
double t_3 = (t - a) / (b - y);
double tmp;
if (z <= -2.6e+208) {
tmp = t_3;
} else if (z <= -1.85e+202) {
tmp = x / (1.0 - z);
} else if (z <= -9.5e+95) {
tmp = t_3;
} else if (z <= -1.06e-19) {
tmp = (t_1 / t_2) + ((x / z) * (y / (b - y)));
} else if (z <= -1.95e-66) {
tmp = x + (z * ((t - a) / y));
} else if (z <= 1.75e+28) {
tmp = ((y * x) + t_1) / t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (t - a) t_2 = y + (z * (b - y)) t_3 = (t - a) / (b - y) tmp = 0 if z <= -2.6e+208: tmp = t_3 elif z <= -1.85e+202: tmp = x / (1.0 - z) elif z <= -9.5e+95: tmp = t_3 elif z <= -1.06e-19: tmp = (t_1 / t_2) + ((x / z) * (y / (b - y))) elif z <= -1.95e-66: tmp = x + (z * ((t - a) / y)) elif z <= 1.75e+28: tmp = ((y * x) + t_1) / 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(y + Float64(z * Float64(b - y))) t_3 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -2.6e+208) tmp = t_3; elseif (z <= -1.85e+202) tmp = Float64(x / Float64(1.0 - z)); elseif (z <= -9.5e+95) tmp = t_3; elseif (z <= -1.06e-19) tmp = Float64(Float64(t_1 / t_2) + Float64(Float64(x / z) * Float64(y / Float64(b - y)))); elseif (z <= -1.95e-66) tmp = Float64(x + Float64(z * Float64(Float64(t - a) / y))); elseif (z <= 1.75e+28) tmp = Float64(Float64(Float64(y * x) + t_1) / 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 = y + (z * (b - y)); t_3 = (t - a) / (b - y); tmp = 0.0; if (z <= -2.6e+208) tmp = t_3; elseif (z <= -1.85e+202) tmp = x / (1.0 - z); elseif (z <= -9.5e+95) tmp = t_3; elseif (z <= -1.06e-19) tmp = (t_1 / t_2) + ((x / z) * (y / (b - y))); elseif (z <= -1.95e-66) tmp = x + (z * ((t - a) / y)); elseif (z <= 1.75e+28) tmp = ((y * x) + t_1) / 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[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.6e+208], t$95$3, If[LessEqual[z, -1.85e+202], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -9.5e+95], t$95$3, If[LessEqual[z, -1.06e-19], N[(N[(t$95$1 / t$95$2), $MachinePrecision] + N[(N[(x / z), $MachinePrecision] * N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.95e-66], N[(x + N[(z * N[(N[(t - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.75e+28], N[(N[(N[(y * x), $MachinePrecision] + t$95$1), $MachinePrecision] / t$95$2), $MachinePrecision], t$95$3]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := y + z \cdot \left(b - y\right)\\
t_3 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2.6 \cdot 10^{+208}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq -1.85 \cdot 10^{+202}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{elif}\;z \leq -9.5 \cdot 10^{+95}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq -1.06 \cdot 10^{-19}:\\
\;\;\;\;\frac{t\_1}{t\_2} + \frac{x}{z} \cdot \frac{y}{b - y}\\
\mathbf{elif}\;z \leq -1.95 \cdot 10^{-66}:\\
\;\;\;\;x + z \cdot \frac{t - a}{y}\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{+28}:\\
\;\;\;\;\frac{y \cdot x + t\_1}{t\_2}\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if z < -2.6e208 or -1.8499999999999999e202 < z < -9.5000000000000004e95 or 1.75e28 < z Initial program 36.8%
Taylor expanded in z around inf 85.7%
if -2.6e208 < z < -1.8499999999999999e202Initial program 0.7%
Taylor expanded in y around inf 90.1%
mul-1-neg90.1%
unsub-neg90.1%
Simplified90.1%
if -9.5000000000000004e95 < z < -1.06e-19Initial program 76.7%
Taylor expanded in x around 0 76.7%
Taylor expanded in z around inf 74.9%
times-frac87.8%
Simplified87.8%
if -1.06e-19 < z < -1.94999999999999991e-66Initial program 76.3%
Taylor expanded in z around 0 72.1%
Taylor expanded in x around 0 96.7%
div-sub96.8%
Simplified96.8%
if -1.94999999999999991e-66 < z < 1.75e28Initial program 89.8%
Final simplification88.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y)))) (t_2 (/ (- t a) (- b y))))
(if (<= z -2.6e+208)
t_2
(if (<= z -1.85e+202)
(/ x (- 1.0 z))
(if (or (<= z -1.1e+36) (not (<= z 1.95e+28)))
t_2
(+ (/ (* y x) t_1) (/ (* z (- t a)) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -2.6e+208) {
tmp = t_2;
} else if (z <= -1.85e+202) {
tmp = x / (1.0 - z);
} else if ((z <= -1.1e+36) || !(z <= 1.95e+28)) {
tmp = t_2;
} else {
tmp = ((y * x) / t_1) + ((z * (t - a)) / 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) :: t_2
real(8) :: tmp
t_1 = y + (z * (b - y))
t_2 = (t - a) / (b - y)
if (z <= (-2.6d+208)) then
tmp = t_2
else if (z <= (-1.85d+202)) then
tmp = x / (1.0d0 - z)
else if ((z <= (-1.1d+36)) .or. (.not. (z <= 1.95d+28))) then
tmp = t_2
else
tmp = ((y * x) / t_1) + ((z * (t - a)) / 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 t_2 = (t - a) / (b - y);
double tmp;
if (z <= -2.6e+208) {
tmp = t_2;
} else if (z <= -1.85e+202) {
tmp = x / (1.0 - z);
} else if ((z <= -1.1e+36) || !(z <= 1.95e+28)) {
tmp = t_2;
} else {
tmp = ((y * x) / t_1) + ((z * (t - a)) / t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = (t - a) / (b - y) tmp = 0 if z <= -2.6e+208: tmp = t_2 elif z <= -1.85e+202: tmp = x / (1.0 - z) elif (z <= -1.1e+36) or not (z <= 1.95e+28): tmp = t_2 else: tmp = ((y * x) / t_1) + ((z * (t - a)) / t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -2.6e+208) tmp = t_2; elseif (z <= -1.85e+202) tmp = Float64(x / Float64(1.0 - z)); elseif ((z <= -1.1e+36) || !(z <= 1.95e+28)) tmp = t_2; else tmp = Float64(Float64(Float64(y * x) / t_1) + Float64(Float64(z * Float64(t - a)) / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -2.6e+208) tmp = t_2; elseif (z <= -1.85e+202) tmp = x / (1.0 - z); elseif ((z <= -1.1e+36) || ~((z <= 1.95e+28))) tmp = t_2; else tmp = ((y * x) / t_1) + ((z * (t - a)) / 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]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.6e+208], t$95$2, If[LessEqual[z, -1.85e+202], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -1.1e+36], N[Not[LessEqual[z, 1.95e+28]], $MachinePrecision]], t$95$2, N[(N[(N[(y * x), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2.6 \cdot 10^{+208}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.85 \cdot 10^{+202}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{elif}\;z \leq -1.1 \cdot 10^{+36} \lor \neg \left(z \leq 1.95 \cdot 10^{+28}\right):\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x}{t\_1} + \frac{z \cdot \left(t - a\right)}{t\_1}\\
\end{array}
\end{array}
if z < -2.6e208 or -1.8499999999999999e202 < z < -1.1e36 or 1.9499999999999999e28 < z Initial program 41.4%
Taylor expanded in z around inf 83.4%
if -2.6e208 < z < -1.8499999999999999e202Initial program 0.7%
Taylor expanded in y around inf 90.1%
mul-1-neg90.1%
unsub-neg90.1%
Simplified90.1%
if -1.1e36 < z < 1.9499999999999999e28Initial program 89.3%
Taylor expanded in x around 0 89.3%
Final simplification86.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))) (t_2 (- x (* z (/ a y)))))
(if (<= z -2.6e+208)
t_1
(if (<= z -1.85e+202)
(/ x (- 1.0 z))
(if (<= z -1.8e-18)
t_1
(if (<= z 4.4e-197)
t_2
(if (<= z 6e-134)
(/ (- t a) (/ y z))
(if (<= z 8.5e-11) t_2 t_1))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double t_2 = x - (z * (a / y));
double tmp;
if (z <= -2.6e+208) {
tmp = t_1;
} else if (z <= -1.85e+202) {
tmp = x / (1.0 - z);
} else if (z <= -1.8e-18) {
tmp = t_1;
} else if (z <= 4.4e-197) {
tmp = t_2;
} else if (z <= 6e-134) {
tmp = (t - a) / (y / z);
} else if (z <= 8.5e-11) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = (t - a) / (b - y)
t_2 = x - (z * (a / y))
if (z <= (-2.6d+208)) then
tmp = t_1
else if (z <= (-1.85d+202)) then
tmp = x / (1.0d0 - z)
else if (z <= (-1.8d-18)) then
tmp = t_1
else if (z <= 4.4d-197) then
tmp = t_2
else if (z <= 6d-134) then
tmp = (t - a) / (y / z)
else if (z <= 8.5d-11) then
tmp = t_2
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 t_2 = x - (z * (a / y));
double tmp;
if (z <= -2.6e+208) {
tmp = t_1;
} else if (z <= -1.85e+202) {
tmp = x / (1.0 - z);
} else if (z <= -1.8e-18) {
tmp = t_1;
} else if (z <= 4.4e-197) {
tmp = t_2;
} else if (z <= 6e-134) {
tmp = (t - a) / (y / z);
} else if (z <= 8.5e-11) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) t_2 = x - (z * (a / y)) tmp = 0 if z <= -2.6e+208: tmp = t_1 elif z <= -1.85e+202: tmp = x / (1.0 - z) elif z <= -1.8e-18: tmp = t_1 elif z <= 4.4e-197: tmp = t_2 elif z <= 6e-134: tmp = (t - a) / (y / z) elif z <= 8.5e-11: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) t_2 = Float64(x - Float64(z * Float64(a / y))) tmp = 0.0 if (z <= -2.6e+208) tmp = t_1; elseif (z <= -1.85e+202) tmp = Float64(x / Float64(1.0 - z)); elseif (z <= -1.8e-18) tmp = t_1; elseif (z <= 4.4e-197) tmp = t_2; elseif (z <= 6e-134) tmp = Float64(Float64(t - a) / Float64(y / z)); elseif (z <= 8.5e-11) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); t_2 = x - (z * (a / y)); tmp = 0.0; if (z <= -2.6e+208) tmp = t_1; elseif (z <= -1.85e+202) tmp = x / (1.0 - z); elseif (z <= -1.8e-18) tmp = t_1; elseif (z <= 4.4e-197) tmp = t_2; elseif (z <= 6e-134) tmp = (t - a) / (y / z); elseif (z <= 8.5e-11) tmp = t_2; 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]}, Block[{t$95$2 = N[(x - N[(z * N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.6e+208], t$95$1, If[LessEqual[z, -1.85e+202], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.8e-18], t$95$1, If[LessEqual[z, 4.4e-197], t$95$2, If[LessEqual[z, 6e-134], N[(N[(t - a), $MachinePrecision] / N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.5e-11], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
t_2 := x - z \cdot \frac{a}{y}\\
\mathbf{if}\;z \leq -2.6 \cdot 10^{+208}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.85 \cdot 10^{+202}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{elif}\;z \leq -1.8 \cdot 10^{-18}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-197}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-134}:\\
\;\;\;\;\frac{t - a}{\frac{y}{z}}\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-11}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.6e208 or -1.8499999999999999e202 < z < -1.80000000000000005e-18 or 8.50000000000000037e-11 < z Initial program 48.9%
Taylor expanded in z around inf 78.6%
if -2.6e208 < z < -1.8499999999999999e202Initial program 0.7%
Taylor expanded in y around inf 90.1%
mul-1-neg90.1%
unsub-neg90.1%
Simplified90.1%
if -1.80000000000000005e-18 < z < 4.4000000000000001e-197 or 6e-134 < z < 8.50000000000000037e-11Initial program 87.6%
Taylor expanded in z around 0 63.4%
Taylor expanded in a around inf 68.1%
associate-*r/68.1%
neg-mul-168.1%
Simplified68.1%
if 4.4000000000000001e-197 < z < 6e-134Initial program 99.5%
Taylor expanded in x around 0 77.7%
*-commutative77.7%
+-commutative77.7%
fma-def77.7%
associate-/l*77.6%
Simplified77.6%
Taylor expanded in z around 0 54.3%
Final simplification73.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -2.6e+208)
t_1
(if (<= z -1.85e+202)
(/ x (- 1.0 z))
(if (or (<= z -4.5e+35) (not (<= z 2.1e+28)))
t_1
(/ (+ (* y x) (* z (- t a))) (+ y (* z (- b y)))))))))
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.6e+208) {
tmp = t_1;
} else if (z <= -1.85e+202) {
tmp = x / (1.0 - z);
} else if ((z <= -4.5e+35) || !(z <= 2.1e+28)) {
tmp = t_1;
} else {
tmp = ((y * x) + (z * (t - 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) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-2.6d+208)) then
tmp = t_1
else if (z <= (-1.85d+202)) then
tmp = x / (1.0d0 - z)
else if ((z <= (-4.5d+35)) .or. (.not. (z <= 2.1d+28))) then
tmp = t_1
else
tmp = ((y * x) + (z * (t - 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 t_1 = (t - a) / (b - y);
double tmp;
if (z <= -2.6e+208) {
tmp = t_1;
} else if (z <= -1.85e+202) {
tmp = x / (1.0 - z);
} else if ((z <= -4.5e+35) || !(z <= 2.1e+28)) {
tmp = t_1;
} else {
tmp = ((y * x) + (z * (t - a))) / (y + (z * (b - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -2.6e+208: tmp = t_1 elif z <= -1.85e+202: tmp = x / (1.0 - z) elif (z <= -4.5e+35) or not (z <= 2.1e+28): tmp = t_1 else: tmp = ((y * x) + (z * (t - a))) / (y + (z * (b - y))) 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.6e+208) tmp = t_1; elseif (z <= -1.85e+202) tmp = Float64(x / Float64(1.0 - z)); elseif ((z <= -4.5e+35) || !(z <= 2.1e+28)) tmp = t_1; else tmp = Float64(Float64(Float64(y * x) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))); 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.6e+208) tmp = t_1; elseif (z <= -1.85e+202) tmp = x / (1.0 - z); elseif ((z <= -4.5e+35) || ~((z <= 2.1e+28))) tmp = t_1; else tmp = ((y * x) + (z * (t - a))) / (y + (z * (b - y))); 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.6e+208], t$95$1, If[LessEqual[z, -1.85e+202], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -4.5e+35], N[Not[LessEqual[z, 2.1e+28]], $MachinePrecision]], t$95$1, N[(N[(N[(y * x), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2.6 \cdot 10^{+208}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.85 \cdot 10^{+202}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{elif}\;z \leq -4.5 \cdot 10^{+35} \lor \neg \left(z \leq 2.1 \cdot 10^{+28}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -2.6e208 or -1.8499999999999999e202 < z < -4.4999999999999997e35 or 2.09999999999999989e28 < z Initial program 41.4%
Taylor expanded in z around inf 83.4%
if -2.6e208 < z < -1.8499999999999999e202Initial program 0.7%
Taylor expanded in y around inf 90.1%
mul-1-neg90.1%
unsub-neg90.1%
Simplified90.1%
if -4.4999999999999997e35 < z < 2.09999999999999989e28Initial program 89.3%
Final simplification86.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -2.6e+208)
t_1
(if (<= z -1.85e+202)
(/ x (- 1.0 z))
(if (or (<= z -3.1e+16) (not (<= z 1.55)))
t_1
(/ (+ (* y x) (* z (- t a))) (+ y (* z b))))))))
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.6e+208) {
tmp = t_1;
} else if (z <= -1.85e+202) {
tmp = x / (1.0 - z);
} else if ((z <= -3.1e+16) || !(z <= 1.55)) {
tmp = t_1;
} else {
tmp = ((y * x) + (z * (t - a))) / (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) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-2.6d+208)) then
tmp = t_1
else if (z <= (-1.85d+202)) then
tmp = x / (1.0d0 - z)
else if ((z <= (-3.1d+16)) .or. (.not. (z <= 1.55d0))) then
tmp = t_1
else
tmp = ((y * x) + (z * (t - a))) / (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 t_1 = (t - a) / (b - y);
double tmp;
if (z <= -2.6e+208) {
tmp = t_1;
} else if (z <= -1.85e+202) {
tmp = x / (1.0 - z);
} else if ((z <= -3.1e+16) || !(z <= 1.55)) {
tmp = t_1;
} else {
tmp = ((y * x) + (z * (t - a))) / (y + (z * b));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -2.6e+208: tmp = t_1 elif z <= -1.85e+202: tmp = x / (1.0 - z) elif (z <= -3.1e+16) or not (z <= 1.55): tmp = t_1 else: tmp = ((y * x) + (z * (t - a))) / (y + (z * b)) 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.6e+208) tmp = t_1; elseif (z <= -1.85e+202) tmp = Float64(x / Float64(1.0 - z)); elseif ((z <= -3.1e+16) || !(z <= 1.55)) tmp = t_1; else tmp = Float64(Float64(Float64(y * x) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * b))); 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.6e+208) tmp = t_1; elseif (z <= -1.85e+202) tmp = x / (1.0 - z); elseif ((z <= -3.1e+16) || ~((z <= 1.55))) tmp = t_1; else tmp = ((y * x) + (z * (t - a))) / (y + (z * b)); 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.6e+208], t$95$1, If[LessEqual[z, -1.85e+202], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -3.1e+16], N[Not[LessEqual[z, 1.55]], $MachinePrecision]], t$95$1, N[(N[(N[(y * x), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2.6 \cdot 10^{+208}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.85 \cdot 10^{+202}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{elif}\;z \leq -3.1 \cdot 10^{+16} \lor \neg \left(z \leq 1.55\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x + z \cdot \left(t - a\right)}{y + z \cdot b}\\
\end{array}
\end{array}
if z < -2.6e208 or -1.8499999999999999e202 < z < -3.1e16 or 1.55000000000000004 < z Initial program 45.1%
Taylor expanded in z around inf 80.4%
if -2.6e208 < z < -1.8499999999999999e202Initial program 0.7%
Taylor expanded in y around inf 90.1%
mul-1-neg90.1%
unsub-neg90.1%
Simplified90.1%
if -3.1e16 < z < 1.55000000000000004Initial program 89.9%
Taylor expanded in b around inf 87.1%
*-commutative87.1%
Simplified87.1%
Final simplification83.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ t (- b y))))
(if (<= z -3.5e+204)
t_1
(if (<= z -4.5e-13)
(/ (- a) b)
(if (<= z 4.4e-197)
x
(if (<= z 1.55e-147)
(/ t b)
(if (<= z 0.00145) (+ x (* z x)) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t / (b - y);
double tmp;
if (z <= -3.5e+204) {
tmp = t_1;
} else if (z <= -4.5e-13) {
tmp = -a / b;
} else if (z <= 4.4e-197) {
tmp = x;
} else if (z <= 1.55e-147) {
tmp = t / b;
} else if (z <= 0.00145) {
tmp = x + (z * x);
} 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 / (b - y)
if (z <= (-3.5d+204)) then
tmp = t_1
else if (z <= (-4.5d-13)) then
tmp = -a / b
else if (z <= 4.4d-197) then
tmp = x
else if (z <= 1.55d-147) then
tmp = t / b
else if (z <= 0.00145d0) then
tmp = x + (z * x)
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 / (b - y);
double tmp;
if (z <= -3.5e+204) {
tmp = t_1;
} else if (z <= -4.5e-13) {
tmp = -a / b;
} else if (z <= 4.4e-197) {
tmp = x;
} else if (z <= 1.55e-147) {
tmp = t / b;
} else if (z <= 0.00145) {
tmp = x + (z * x);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t / (b - y) tmp = 0 if z <= -3.5e+204: tmp = t_1 elif z <= -4.5e-13: tmp = -a / b elif z <= 4.4e-197: tmp = x elif z <= 1.55e-147: tmp = t / b elif z <= 0.00145: tmp = x + (z * x) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t / Float64(b - y)) tmp = 0.0 if (z <= -3.5e+204) tmp = t_1; elseif (z <= -4.5e-13) tmp = Float64(Float64(-a) / b); elseif (z <= 4.4e-197) tmp = x; elseif (z <= 1.55e-147) tmp = Float64(t / b); elseif (z <= 0.00145) tmp = Float64(x + Float64(z * x)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t / (b - y); tmp = 0.0; if (z <= -3.5e+204) tmp = t_1; elseif (z <= -4.5e-13) tmp = -a / b; elseif (z <= 4.4e-197) tmp = x; elseif (z <= 1.55e-147) tmp = t / b; elseif (z <= 0.00145) tmp = x + (z * x); else tmp = t_1; 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, -3.5e+204], t$95$1, If[LessEqual[z, -4.5e-13], N[((-a) / b), $MachinePrecision], If[LessEqual[z, 4.4e-197], x, If[LessEqual[z, 1.55e-147], N[(t / b), $MachinePrecision], If[LessEqual[z, 0.00145], N[(x + N[(z * x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{b - y}\\
\mathbf{if}\;z \leq -3.5 \cdot 10^{+204}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -4.5 \cdot 10^{-13}:\\
\;\;\;\;\frac{-a}{b}\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-197}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{-147}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 0.00145:\\
\;\;\;\;x + z \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.49999999999999989e204 or 0.00145 < z Initial program 36.1%
Taylor expanded in t around inf 24.9%
*-commutative24.9%
Simplified24.9%
Taylor expanded in z around inf 51.3%
if -3.49999999999999989e204 < z < -4.5e-13Initial program 64.5%
Taylor expanded in a around inf 42.1%
mul-1-neg42.1%
distribute-lft-neg-out42.1%
*-commutative42.1%
Simplified42.1%
Taylor expanded in y around 0 34.1%
mul-1-neg34.1%
distribute-neg-frac34.1%
Simplified34.1%
if -4.5e-13 < z < 4.4000000000000001e-197Initial program 86.1%
Taylor expanded in z around 0 55.5%
if 4.4000000000000001e-197 < z < 1.5500000000000001e-147Initial program 99.4%
Taylor expanded in t around inf 55.5%
*-commutative55.5%
Simplified55.5%
Taylor expanded in y around 0 39.2%
if 1.5500000000000001e-147 < z < 0.00145Initial program 95.0%
Taylor expanded in z around 0 67.9%
Taylor expanded in y around inf 40.2%
*-commutative40.2%
Simplified40.2%
Final simplification47.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -2.6e+208)
t_1
(if (<= z -1.85e+202)
(/ x (- 1.0 z))
(if (or (<= z -3.8e-18) (not (<= z 5.2e-8)))
t_1
(+ x (* z (/ (- t a) y))))))))
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.6e+208) {
tmp = t_1;
} else if (z <= -1.85e+202) {
tmp = x / (1.0 - z);
} else if ((z <= -3.8e-18) || !(z <= 5.2e-8)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-2.6d+208)) then
tmp = t_1
else if (z <= (-1.85d+202)) then
tmp = x / (1.0d0 - z)
else if ((z <= (-3.8d-18)) .or. (.not. (z <= 5.2d-8))) then
tmp = t_1
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 t_1 = (t - a) / (b - y);
double tmp;
if (z <= -2.6e+208) {
tmp = t_1;
} else if (z <= -1.85e+202) {
tmp = x / (1.0 - z);
} else if ((z <= -3.8e-18) || !(z <= 5.2e-8)) {
tmp = t_1;
} else {
tmp = x + (z * ((t - a) / y));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -2.6e+208: tmp = t_1 elif z <= -1.85e+202: tmp = x / (1.0 - z) elif (z <= -3.8e-18) or not (z <= 5.2e-8): tmp = t_1 else: tmp = x + (z * ((t - a) / y)) 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.6e+208) tmp = t_1; elseif (z <= -1.85e+202) tmp = Float64(x / Float64(1.0 - z)); elseif ((z <= -3.8e-18) || !(z <= 5.2e-8)) tmp = t_1; 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) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -2.6e+208) tmp = t_1; elseif (z <= -1.85e+202) tmp = x / (1.0 - z); elseif ((z <= -3.8e-18) || ~((z <= 5.2e-8))) tmp = t_1; else tmp = x + (z * ((t - a) / y)); 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.6e+208], t$95$1, If[LessEqual[z, -1.85e+202], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -3.8e-18], N[Not[LessEqual[z, 5.2e-8]], $MachinePrecision]], t$95$1, N[(x + N[(z * N[(N[(t - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2.6 \cdot 10^{+208}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.85 \cdot 10^{+202}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{-18} \lor \neg \left(z \leq 5.2 \cdot 10^{-8}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{t - a}{y}\\
\end{array}
\end{array}
if z < -2.6e208 or -1.8499999999999999e202 < z < -3.7999999999999998e-18 or 5.2000000000000002e-8 < z Initial program 48.9%
Taylor expanded in z around inf 78.6%
if -2.6e208 < z < -1.8499999999999999e202Initial program 0.7%
Taylor expanded in y around inf 90.1%
mul-1-neg90.1%
unsub-neg90.1%
Simplified90.1%
if -3.7999999999999998e-18 < z < 5.2000000000000002e-8Initial program 89.0%
Taylor expanded in z around 0 61.0%
Taylor expanded in x around 0 71.8%
div-sub72.8%
Simplified72.8%
Final simplification76.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -2.6e+208)
t_1
(if (<= z -1.85e+202)
(/ x (- 1.0 z))
(if (or (<= z -8.5e-30) (not (<= z 8.8e-10)))
t_1
(+ x (* z (/ t y))))))))
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.6e+208) {
tmp = t_1;
} else if (z <= -1.85e+202) {
tmp = x / (1.0 - z);
} else if ((z <= -8.5e-30) || !(z <= 8.8e-10)) {
tmp = t_1;
} else {
tmp = x + (z * (t / 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) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-2.6d+208)) then
tmp = t_1
else if (z <= (-1.85d+202)) then
tmp = x / (1.0d0 - z)
else if ((z <= (-8.5d-30)) .or. (.not. (z <= 8.8d-10))) then
tmp = t_1
else
tmp = x + (z * (t / y))
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.6e+208) {
tmp = t_1;
} else if (z <= -1.85e+202) {
tmp = x / (1.0 - z);
} else if ((z <= -8.5e-30) || !(z <= 8.8e-10)) {
tmp = t_1;
} else {
tmp = x + (z * (t / y));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -2.6e+208: tmp = t_1 elif z <= -1.85e+202: tmp = x / (1.0 - z) elif (z <= -8.5e-30) or not (z <= 8.8e-10): tmp = t_1 else: tmp = x + (z * (t / y)) 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.6e+208) tmp = t_1; elseif (z <= -1.85e+202) tmp = Float64(x / Float64(1.0 - z)); elseif ((z <= -8.5e-30) || !(z <= 8.8e-10)) tmp = t_1; else tmp = Float64(x + Float64(z * Float64(t / y))); 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.6e+208) tmp = t_1; elseif (z <= -1.85e+202) tmp = x / (1.0 - z); elseif ((z <= -8.5e-30) || ~((z <= 8.8e-10))) tmp = t_1; else tmp = x + (z * (t / y)); 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.6e+208], t$95$1, If[LessEqual[z, -1.85e+202], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -8.5e-30], N[Not[LessEqual[z, 8.8e-10]], $MachinePrecision]], t$95$1, N[(x + N[(z * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2.6 \cdot 10^{+208}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.85 \cdot 10^{+202}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{elif}\;z \leq -8.5 \cdot 10^{-30} \lor \neg \left(z \leq 8.8 \cdot 10^{-10}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{t}{y}\\
\end{array}
\end{array}
if z < -2.6e208 or -1.8499999999999999e202 < z < -8.49999999999999931e-30 or 8.7999999999999996e-10 < z Initial program 49.9%
Taylor expanded in z around inf 77.2%
if -2.6e208 < z < -1.8499999999999999e202Initial program 0.7%
Taylor expanded in y around inf 90.1%
mul-1-neg90.1%
unsub-neg90.1%
Simplified90.1%
if -8.49999999999999931e-30 < z < 8.7999999999999996e-10Initial program 88.7%
Taylor expanded in z around 0 59.9%
Taylor expanded in t around inf 59.7%
Final simplification70.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -2.6e+208)
t_1
(if (<= z -1.85e+202)
(/ x (- 1.0 z))
(if (or (<= z -2.3e-19) (not (<= z 3.2e-10)))
t_1
(- x (/ (* z a) y)))))))
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.6e+208) {
tmp = t_1;
} else if (z <= -1.85e+202) {
tmp = x / (1.0 - z);
} else if ((z <= -2.3e-19) || !(z <= 3.2e-10)) {
tmp = t_1;
} else {
tmp = x - ((z * 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) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-2.6d+208)) then
tmp = t_1
else if (z <= (-1.85d+202)) then
tmp = x / (1.0d0 - z)
else if ((z <= (-2.3d-19)) .or. (.not. (z <= 3.2d-10))) then
tmp = t_1
else
tmp = x - ((z * 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 t_1 = (t - a) / (b - y);
double tmp;
if (z <= -2.6e+208) {
tmp = t_1;
} else if (z <= -1.85e+202) {
tmp = x / (1.0 - z);
} else if ((z <= -2.3e-19) || !(z <= 3.2e-10)) {
tmp = t_1;
} else {
tmp = x - ((z * a) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -2.6e+208: tmp = t_1 elif z <= -1.85e+202: tmp = x / (1.0 - z) elif (z <= -2.3e-19) or not (z <= 3.2e-10): tmp = t_1 else: tmp = x - ((z * a) / y) 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.6e+208) tmp = t_1; elseif (z <= -1.85e+202) tmp = Float64(x / Float64(1.0 - z)); elseif ((z <= -2.3e-19) || !(z <= 3.2e-10)) tmp = t_1; else tmp = Float64(x - Float64(Float64(z * a) / y)); 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.6e+208) tmp = t_1; elseif (z <= -1.85e+202) tmp = x / (1.0 - z); elseif ((z <= -2.3e-19) || ~((z <= 3.2e-10))) tmp = t_1; else tmp = x - ((z * a) / y); 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.6e+208], t$95$1, If[LessEqual[z, -1.85e+202], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -2.3e-19], N[Not[LessEqual[z, 3.2e-10]], $MachinePrecision]], t$95$1, N[(x - N[(N[(z * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2.6 \cdot 10^{+208}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.85 \cdot 10^{+202}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{elif}\;z \leq -2.3 \cdot 10^{-19} \lor \neg \left(z \leq 3.2 \cdot 10^{-10}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x - \frac{z \cdot a}{y}\\
\end{array}
\end{array}
if z < -2.6e208 or -1.8499999999999999e202 < z < -2.2999999999999998e-19 or 3.19999999999999981e-10 < z Initial program 48.9%
Taylor expanded in z around inf 78.6%
if -2.6e208 < z < -1.8499999999999999e202Initial program 0.7%
Taylor expanded in y around inf 90.1%
mul-1-neg90.1%
unsub-neg90.1%
Simplified90.1%
if -2.2999999999999998e-19 < z < 3.19999999999999981e-10Initial program 89.0%
Taylor expanded in z around 0 61.0%
Taylor expanded in a around inf 64.2%
Final simplification72.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -1.12e-29)
t_1
(if (<= y 2.2e-141)
(/ (- t a) b)
(if (<= y 2.1e+68)
(+ x (* z (/ t y)))
(if (<= y 1.26e+150) (/ (- t a) (- y)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -1.12e-29) {
tmp = t_1;
} else if (y <= 2.2e-141) {
tmp = (t - a) / b;
} else if (y <= 2.1e+68) {
tmp = x + (z * (t / y));
} else if (y <= 1.26e+150) {
tmp = (t - a) / -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 / (1.0d0 - z)
if (y <= (-1.12d-29)) then
tmp = t_1
else if (y <= 2.2d-141) then
tmp = (t - a) / b
else if (y <= 2.1d+68) then
tmp = x + (z * (t / y))
else if (y <= 1.26d+150) then
tmp = (t - a) / -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 / (1.0 - z);
double tmp;
if (y <= -1.12e-29) {
tmp = t_1;
} else if (y <= 2.2e-141) {
tmp = (t - a) / b;
} else if (y <= 2.1e+68) {
tmp = x + (z * (t / y));
} else if (y <= 1.26e+150) {
tmp = (t - a) / -y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -1.12e-29: tmp = t_1 elif y <= 2.2e-141: tmp = (t - a) / b elif y <= 2.1e+68: tmp = x + (z * (t / y)) elif y <= 1.26e+150: tmp = (t - a) / -y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -1.12e-29) tmp = t_1; elseif (y <= 2.2e-141) tmp = Float64(Float64(t - a) / b); elseif (y <= 2.1e+68) tmp = Float64(x + Float64(z * Float64(t / y))); elseif (y <= 1.26e+150) tmp = Float64(Float64(t - a) / Float64(-y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); tmp = 0.0; if (y <= -1.12e-29) tmp = t_1; elseif (y <= 2.2e-141) tmp = (t - a) / b; elseif (y <= 2.1e+68) tmp = x + (z * (t / y)); elseif (y <= 1.26e+150) tmp = (t - a) / -y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.12e-29], t$95$1, If[LessEqual[y, 2.2e-141], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[y, 2.1e+68], N[(x + N[(z * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.26e+150], N[(N[(t - a), $MachinePrecision] / (-y)), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -1.12 \cdot 10^{-29}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{-141}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{+68}:\\
\;\;\;\;x + z \cdot \frac{t}{y}\\
\mathbf{elif}\;y \leq 1.26 \cdot 10^{+150}:\\
\;\;\;\;\frac{t - a}{-y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.11999999999999995e-29 or 1.26e150 < y Initial program 55.9%
Taylor expanded in y around inf 57.5%
mul-1-neg57.5%
unsub-neg57.5%
Simplified57.5%
if -1.11999999999999995e-29 < y < 2.20000000000000009e-141Initial program 71.7%
Taylor expanded in y around 0 70.0%
if 2.20000000000000009e-141 < y < 2.10000000000000001e68Initial program 87.1%
Taylor expanded in z around 0 50.7%
Taylor expanded in t around inf 35.8%
if 2.10000000000000001e68 < y < 1.26e150Initial program 43.4%
Taylor expanded in x around 0 27.9%
*-commutative27.9%
+-commutative27.9%
fma-def27.9%
associate-/l*33.7%
Simplified33.7%
Taylor expanded in b around 0 23.8%
mul-1-neg23.8%
*-rgt-identity23.8%
distribute-rgt-neg-in23.8%
mul-1-neg23.8%
distribute-lft-in23.8%
mul-1-neg23.8%
unsub-neg23.8%
Simplified23.8%
Taylor expanded in z around inf 49.3%
neg-mul-149.3%
Simplified49.3%
Final simplification58.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -4.4e-15)
(/ (- a) b)
(if (<= z 4.4e-197)
x
(if (or (<= z 6.2e-144) (not (<= z 2e-6))) (/ t b) (+ x (* z x))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -4.4e-15) {
tmp = -a / b;
} else if (z <= 4.4e-197) {
tmp = x;
} else if ((z <= 6.2e-144) || !(z <= 2e-6)) {
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 <= (-4.4d-15)) then
tmp = -a / b
else if (z <= 4.4d-197) then
tmp = x
else if ((z <= 6.2d-144) .or. (.not. (z <= 2d-6))) 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 <= -4.4e-15) {
tmp = -a / b;
} else if (z <= 4.4e-197) {
tmp = x;
} else if ((z <= 6.2e-144) || !(z <= 2e-6)) {
tmp = t / b;
} else {
tmp = x + (z * x);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -4.4e-15: tmp = -a / b elif z <= 4.4e-197: tmp = x elif (z <= 6.2e-144) or not (z <= 2e-6): tmp = t / b else: tmp = x + (z * x) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -4.4e-15) tmp = Float64(Float64(-a) / b); elseif (z <= 4.4e-197) tmp = x; elseif ((z <= 6.2e-144) || !(z <= 2e-6)) 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 <= -4.4e-15) tmp = -a / b; elseif (z <= 4.4e-197) tmp = x; elseif ((z <= 6.2e-144) || ~((z <= 2e-6))) tmp = t / b; else tmp = x + (z * x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -4.4e-15], N[((-a) / b), $MachinePrecision], If[LessEqual[z, 4.4e-197], x, If[Or[LessEqual[z, 6.2e-144], N[Not[LessEqual[z, 2e-6]], $MachinePrecision]], N[(t / b), $MachinePrecision], N[(x + N[(z * x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.4 \cdot 10^{-15}:\\
\;\;\;\;\frac{-a}{b}\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-197}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{-144} \lor \neg \left(z \leq 2 \cdot 10^{-6}\right):\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot x\\
\end{array}
\end{array}
if z < -4.39999999999999971e-15Initial program 49.7%
Taylor expanded in a around inf 31.8%
mul-1-neg31.8%
distribute-lft-neg-out31.8%
*-commutative31.8%
Simplified31.8%
Taylor expanded in y around 0 29.6%
mul-1-neg29.6%
distribute-neg-frac29.6%
Simplified29.6%
if -4.39999999999999971e-15 < z < 4.4000000000000001e-197Initial program 86.1%
Taylor expanded in z around 0 55.5%
if 4.4000000000000001e-197 < z < 6.2000000000000001e-144 or 1.99999999999999991e-6 < z Initial program 50.8%
Taylor expanded in t around inf 30.7%
*-commutative30.7%
Simplified30.7%
Taylor expanded in y around 0 31.2%
if 6.2000000000000001e-144 < z < 1.99999999999999991e-6Initial program 95.0%
Taylor expanded in z around 0 67.9%
Taylor expanded in y around inf 40.2%
*-commutative40.2%
Simplified40.2%
Final simplification38.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -1.8e-11)
(/ (- a) b)
(if (or (<= z 4.4e-197) (and (not (<= z 1.55e-147)) (<= z 4.5e-6)))
x
(/ t b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.8e-11) {
tmp = -a / b;
} else if ((z <= 4.4e-197) || (!(z <= 1.55e-147) && (z <= 4.5e-6))) {
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 <= (-1.8d-11)) then
tmp = -a / b
else if ((z <= 4.4d-197) .or. (.not. (z <= 1.55d-147)) .and. (z <= 4.5d-6)) 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 <= -1.8e-11) {
tmp = -a / b;
} else if ((z <= 4.4e-197) || (!(z <= 1.55e-147) && (z <= 4.5e-6))) {
tmp = x;
} else {
tmp = t / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.8e-11: tmp = -a / b elif (z <= 4.4e-197) or (not (z <= 1.55e-147) and (z <= 4.5e-6)): tmp = x else: tmp = t / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.8e-11) tmp = Float64(Float64(-a) / b); elseif ((z <= 4.4e-197) || (!(z <= 1.55e-147) && (z <= 4.5e-6))) 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 <= -1.8e-11) tmp = -a / b; elseif ((z <= 4.4e-197) || (~((z <= 1.55e-147)) && (z <= 4.5e-6))) tmp = x; else tmp = t / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.8e-11], N[((-a) / b), $MachinePrecision], If[Or[LessEqual[z, 4.4e-197], And[N[Not[LessEqual[z, 1.55e-147]], $MachinePrecision], LessEqual[z, 4.5e-6]]], x, N[(t / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{-11}:\\
\;\;\;\;\frac{-a}{b}\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-197} \lor \neg \left(z \leq 1.55 \cdot 10^{-147}\right) \land z \leq 4.5 \cdot 10^{-6}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b}\\
\end{array}
\end{array}
if z < -1.79999999999999992e-11Initial program 49.7%
Taylor expanded in a around inf 31.8%
mul-1-neg31.8%
distribute-lft-neg-out31.8%
*-commutative31.8%
Simplified31.8%
Taylor expanded in y around 0 29.6%
mul-1-neg29.6%
distribute-neg-frac29.6%
Simplified29.6%
if -1.79999999999999992e-11 < z < 4.4000000000000001e-197 or 1.5500000000000001e-147 < z < 4.50000000000000011e-6Initial program 88.0%
Taylor expanded in z around 0 52.0%
if 4.4000000000000001e-197 < z < 1.5500000000000001e-147 or 4.50000000000000011e-6 < z Initial program 50.8%
Taylor expanded in t around inf 30.7%
*-commutative30.7%
Simplified30.7%
Taylor expanded in y around 0 31.2%
Final simplification38.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -3.1e-38)
t_1
(if (<= y 3.7e-235)
(/ t (- b y))
(if (<= y 1.35e-137) (/ (- a) b) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -3.1e-38) {
tmp = t_1;
} else if (y <= 3.7e-235) {
tmp = t / (b - y);
} else if (y <= 1.35e-137) {
tmp = -a / 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 = x / (1.0d0 - z)
if (y <= (-3.1d-38)) then
tmp = t_1
else if (y <= 3.7d-235) then
tmp = t / (b - y)
else if (y <= 1.35d-137) then
tmp = -a / 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 = x / (1.0 - z);
double tmp;
if (y <= -3.1e-38) {
tmp = t_1;
} else if (y <= 3.7e-235) {
tmp = t / (b - y);
} else if (y <= 1.35e-137) {
tmp = -a / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -3.1e-38: tmp = t_1 elif y <= 3.7e-235: tmp = t / (b - y) elif y <= 1.35e-137: tmp = -a / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -3.1e-38) tmp = t_1; elseif (y <= 3.7e-235) tmp = Float64(t / Float64(b - y)); elseif (y <= 1.35e-137) tmp = Float64(Float64(-a) / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); tmp = 0.0; if (y <= -3.1e-38) tmp = t_1; elseif (y <= 3.7e-235) tmp = t / (b - y); elseif (y <= 1.35e-137) tmp = -a / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.1e-38], t$95$1, If[LessEqual[y, 3.7e-235], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.35e-137], N[((-a) / b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -3.1 \cdot 10^{-38}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3.7 \cdot 10^{-235}:\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{-137}:\\
\;\;\;\;\frac{-a}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -3.09999999999999983e-38 or 1.34999999999999996e-137 < y Initial program 60.3%
Taylor expanded in y around inf 47.3%
mul-1-neg47.3%
unsub-neg47.3%
Simplified47.3%
if -3.09999999999999983e-38 < y < 3.7000000000000001e-235Initial program 69.7%
Taylor expanded in t around inf 34.6%
*-commutative34.6%
Simplified34.6%
Taylor expanded in z around inf 53.9%
if 3.7000000000000001e-235 < y < 1.34999999999999996e-137Initial program 81.7%
Taylor expanded in a around inf 45.6%
mul-1-neg45.6%
distribute-lft-neg-out45.6%
*-commutative45.6%
Simplified45.6%
Taylor expanded in y around 0 59.3%
mul-1-neg59.3%
distribute-neg-frac59.3%
Simplified59.3%
Final simplification50.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -8.5e-30) (not (<= y 2.4e-137))) (/ 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 <= -8.5e-30) || !(y <= 2.4e-137)) {
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 <= (-8.5d-30)) .or. (.not. (y <= 2.4d-137))) 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 <= -8.5e-30) || !(y <= 2.4e-137)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -8.5e-30) or not (y <= 2.4e-137): 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 <= -8.5e-30) || !(y <= 2.4e-137)) 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 <= -8.5e-30) || ~((y <= 2.4e-137))) 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, -8.5e-30], N[Not[LessEqual[y, 2.4e-137]], $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 -8.5 \cdot 10^{-30} \lor \neg \left(y \leq 2.4 \cdot 10^{-137}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -8.49999999999999931e-30 or 2.4e-137 < y Initial program 59.9%
Taylor expanded in y around inf 47.9%
mul-1-neg47.9%
unsub-neg47.9%
Simplified47.9%
if -8.49999999999999931e-30 < y < 2.4e-137Initial program 72.0%
Taylor expanded in y around 0 70.4%
Final simplification56.1%
(FPCore (x y z t a b) :precision binary64 (if (<= y -6.4e-46) x (if (<= y 2.05e-137) (/ t b) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -6.4e-46) {
tmp = x;
} else if (y <= 2.05e-137) {
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 (y <= (-6.4d-46)) then
tmp = x
else if (y <= 2.05d-137) 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 (y <= -6.4e-46) {
tmp = x;
} else if (y <= 2.05e-137) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -6.4e-46: tmp = x elif y <= 2.05e-137: tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -6.4e-46) tmp = x; elseif (y <= 2.05e-137) 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 (y <= -6.4e-46) tmp = x; elseif (y <= 2.05e-137) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -6.4e-46], x, If[LessEqual[y, 2.05e-137], N[(t / b), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.4 \cdot 10^{-46}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 2.05 \cdot 10^{-137}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -6.3999999999999998e-46 or 2.0499999999999999e-137 < y Initial program 60.5%
Taylor expanded in z around 0 29.8%
if -6.3999999999999998e-46 < y < 2.0499999999999999e-137Initial program 71.5%
Taylor expanded in t around inf 35.8%
*-commutative35.8%
Simplified35.8%
Taylor expanded in y around 0 45.4%
Final simplification35.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 64.4%
Taylor expanded in z around 0 22.0%
Final simplification22.0%
(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 2024036
(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)))))