
(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)))) (t_2 (/ (- a t) (- y b))))
(if (<= z -10000000000000.0)
(- t_2 (/ x z))
(if (<= z 210000.0)
(* x (+ (/ y t_1) (/ (* z (- t a)) (* x t_1))))
(+
t_2
(/ (+ (* x (/ y (- b y))) (* y (/ (- a t) (pow (- b y) 2.0)))) z))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = (a - t) / (y - b);
double tmp;
if (z <= -10000000000000.0) {
tmp = t_2 - (x / z);
} else if (z <= 210000.0) {
tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)));
} else {
tmp = t_2 + (((x * (y / (b - y))) + (y * ((a - t) / pow((b - y), 2.0)))) / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y + (z * (b - y))
t_2 = (a - t) / (y - b)
if (z <= (-10000000000000.0d0)) then
tmp = t_2 - (x / z)
else if (z <= 210000.0d0) then
tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)))
else
tmp = t_2 + (((x * (y / (b - y))) + (y * ((a - t) / ((b - y) ** 2.0d0)))) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = (a - t) / (y - b);
double tmp;
if (z <= -10000000000000.0) {
tmp = t_2 - (x / z);
} else if (z <= 210000.0) {
tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)));
} else {
tmp = t_2 + (((x * (y / (b - y))) + (y * ((a - t) / Math.pow((b - y), 2.0)))) / z);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = (a - t) / (y - b) tmp = 0 if z <= -10000000000000.0: tmp = t_2 - (x / z) elif z <= 210000.0: tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1))) else: tmp = t_2 + (((x * (y / (b - y))) + (y * ((a - t) / math.pow((b - y), 2.0)))) / z) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(Float64(a - t) / Float64(y - b)) tmp = 0.0 if (z <= -10000000000000.0) tmp = Float64(t_2 - Float64(x / z)); elseif (z <= 210000.0) tmp = Float64(x * Float64(Float64(y / t_1) + Float64(Float64(z * Float64(t - a)) / Float64(x * t_1)))); else tmp = Float64(t_2 + Float64(Float64(Float64(x * Float64(y / Float64(b - y))) + Float64(y * Float64(Float64(a - t) / (Float64(b - y) ^ 2.0)))) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = (a - t) / (y - b); tmp = 0.0; if (z <= -10000000000000.0) tmp = t_2 - (x / z); elseif (z <= 210000.0) tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1))); else tmp = t_2 + (((x * (y / (b - y))) + (y * ((a - t) / ((b - y) ^ 2.0)))) / z); 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[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -10000000000000.0], N[(t$95$2 - N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 210000.0], 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], N[(t$95$2 + N[(N[(N[(x * N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(N[(a - t), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \frac{a - t}{y - b}\\
\mathbf{if}\;z \leq -10000000000000:\\
\;\;\;\;t\_2 - \frac{x}{z}\\
\mathbf{elif}\;z \leq 210000:\\
\;\;\;\;x \cdot \left(\frac{y}{t\_1} + \frac{z \cdot \left(t - a\right)}{x \cdot t\_1}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2 + \frac{x \cdot \frac{y}{b - y} + y \cdot \frac{a - t}{{\left(b - y\right)}^{2}}}{z}\\
\end{array}
\end{array}
if z < -1e13Initial program 52.0%
Taylor expanded in z around -inf 65.2%
associate--l+65.2%
mul-1-neg65.2%
distribute-lft-out--65.2%
associate-/l*69.4%
associate-/l*84.0%
div-sub84.1%
Simplified84.1%
Taylor expanded in y around inf 94.2%
if -1e13 < z < 2.1e5Initial program 87.9%
Taylor expanded in x around inf 91.8%
if 2.1e5 < z Initial program 41.5%
Taylor expanded in z around -inf 59.0%
associate--l+59.0%
mul-1-neg59.0%
distribute-lft-out--59.0%
associate-/l*67.6%
associate-/l*87.8%
div-sub89.3%
Simplified89.3%
Final simplification91.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y)))))
(if (or (<= z -1200000000000.0) (not (<= z 1.36e+25)))
(- (/ (- a t) (- y b)) (/ x z))
(* x (+ (/ y t_1) (/ (* z (- t a)) (* x t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double tmp;
if ((z <= -1200000000000.0) || !(z <= 1.36e+25)) {
tmp = ((a - t) / (y - b)) - (x / z);
} else {
tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = y + (z * (b - y))
if ((z <= (-1200000000000.0d0)) .or. (.not. (z <= 1.36d+25))) then
tmp = ((a - t) / (y - b)) - (x / z)
else
tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double tmp;
if ((z <= -1200000000000.0) || !(z <= 1.36e+25)) {
tmp = ((a - t) / (y - b)) - (x / z);
} else {
tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) tmp = 0 if (z <= -1200000000000.0) or not (z <= 1.36e+25): tmp = ((a - t) / (y - b)) - (x / z) else: tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) tmp = 0.0 if ((z <= -1200000000000.0) || !(z <= 1.36e+25)) tmp = Float64(Float64(Float64(a - t) / Float64(y - b)) - Float64(x / z)); else tmp = Float64(x * Float64(Float64(y / t_1) + Float64(Float64(z * Float64(t - a)) / Float64(x * t_1)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); tmp = 0.0; if ((z <= -1200000000000.0) || ~((z <= 1.36e+25))) tmp = ((a - t) / (y - b)) - (x / z); else tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -1200000000000.0], N[Not[LessEqual[z, 1.36e+25]], $MachinePrecision]], N[(N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y / t$95$1), $MachinePrecision] + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(x * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
\mathbf{if}\;z \leq -1200000000000 \lor \neg \left(z \leq 1.36 \cdot 10^{+25}\right):\\
\;\;\;\;\frac{a - t}{y - b} - \frac{x}{z}\\
\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 < -1.2e12 or 1.36e25 < z Initial program 45.0%
Taylor expanded in z around -inf 63.8%
associate--l+63.8%
mul-1-neg63.8%
distribute-lft-out--63.8%
associate-/l*69.8%
associate-/l*86.2%
div-sub86.2%
Simplified86.2%
Taylor expanded in y around inf 89.3%
if -1.2e12 < z < 1.36e25Initial program 87.1%
Taylor expanded in x around inf 90.5%
Final simplification89.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- a t) (- y b))))
(if (<= z -1.9e-44)
t_1
(if (<= z 4.3e-26)
(+ x (/ (* z (- t a)) y))
(if (<= z 1.4e+19)
(/ (- (* x (/ y z)) a) b)
(if (<= z 1.12e+101) (/ x (+ (- (* b (/ z y)) z) 1.0)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a - t) / (y - b);
double tmp;
if (z <= -1.9e-44) {
tmp = t_1;
} else if (z <= 4.3e-26) {
tmp = x + ((z * (t - a)) / y);
} else if (z <= 1.4e+19) {
tmp = ((x * (y / z)) - a) / b;
} else if (z <= 1.12e+101) {
tmp = x / (((b * (z / y)) - z) + 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 = (a - t) / (y - b)
if (z <= (-1.9d-44)) then
tmp = t_1
else if (z <= 4.3d-26) then
tmp = x + ((z * (t - a)) / y)
else if (z <= 1.4d+19) then
tmp = ((x * (y / z)) - a) / b
else if (z <= 1.12d+101) then
tmp = x / (((b * (z / y)) - z) + 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 = (a - t) / (y - b);
double tmp;
if (z <= -1.9e-44) {
tmp = t_1;
} else if (z <= 4.3e-26) {
tmp = x + ((z * (t - a)) / y);
} else if (z <= 1.4e+19) {
tmp = ((x * (y / z)) - a) / b;
} else if (z <= 1.12e+101) {
tmp = x / (((b * (z / y)) - z) + 1.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a - t) / (y - b) tmp = 0 if z <= -1.9e-44: tmp = t_1 elif z <= 4.3e-26: tmp = x + ((z * (t - a)) / y) elif z <= 1.4e+19: tmp = ((x * (y / z)) - a) / b elif z <= 1.12e+101: tmp = x / (((b * (z / y)) - z) + 1.0) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a - t) / Float64(y - b)) tmp = 0.0 if (z <= -1.9e-44) tmp = t_1; elseif (z <= 4.3e-26) tmp = Float64(x + Float64(Float64(z * Float64(t - a)) / y)); elseif (z <= 1.4e+19) tmp = Float64(Float64(Float64(x * Float64(y / z)) - a) / b); elseif (z <= 1.12e+101) tmp = Float64(x / Float64(Float64(Float64(b * Float64(z / y)) - z) + 1.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a - t) / (y - b); tmp = 0.0; if (z <= -1.9e-44) tmp = t_1; elseif (z <= 4.3e-26) tmp = x + ((z * (t - a)) / y); elseif (z <= 1.4e+19) tmp = ((x * (y / z)) - a) / b; elseif (z <= 1.12e+101) tmp = x / (((b * (z / y)) - z) + 1.0); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.9e-44], t$95$1, If[LessEqual[z, 4.3e-26], N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.4e+19], N[(N[(N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 1.12e+101], N[(x / N[(N[(N[(b * N[(z / y), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a - t}{y - b}\\
\mathbf{if}\;z \leq -1.9 \cdot 10^{-44}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.3 \cdot 10^{-26}:\\
\;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{+19}:\\
\;\;\;\;\frac{x \cdot \frac{y}{z} - a}{b}\\
\mathbf{elif}\;z \leq 1.12 \cdot 10^{+101}:\\
\;\;\;\;\frac{x}{\left(b \cdot \frac{z}{y} - z\right) + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.9e-44 or 1.1199999999999999e101 < z Initial program 49.5%
Taylor expanded in z around inf 82.4%
if -1.9e-44 < z < 4.29999999999999988e-26Initial program 87.0%
Taylor expanded in z around 0 62.9%
Taylor expanded in x around 0 74.8%
if 4.29999999999999988e-26 < z < 1.4e19Initial program 84.5%
Taylor expanded in z around inf 84.5%
associate--l+84.5%
associate-/l*84.5%
Simplified84.5%
Taylor expanded in b around inf 60.7%
associate-*r/60.7%
Simplified60.7%
Taylor expanded in t around 0 58.7%
associate-*r/58.7%
Simplified58.7%
if 1.4e19 < z < 1.1199999999999999e101Initial program 42.9%
sub-neg42.9%
distribute-lft-in42.7%
Applied egg-rr42.7%
Taylor expanded in y around inf 37.5%
associate-+r+37.5%
mul-1-neg37.5%
unsub-neg37.5%
associate-/l*32.3%
Simplified32.3%
Taylor expanded in x around inf 49.5%
associate--l+49.5%
associate-*r/64.8%
Simplified64.8%
Final simplification76.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- a t) (- y b))))
(if (<= z -9e-42)
t_1
(if (<= z 1.8e-74)
(+ x (/ (* z (- t a)) y))
(if (<= z 1.9e+19)
(/ (- (+ t (* x (/ y z))) a) b)
(if (<= z 1.12e+101) (/ x (+ (- (* b (/ z y)) z) 1.0)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a - t) / (y - b);
double tmp;
if (z <= -9e-42) {
tmp = t_1;
} else if (z <= 1.8e-74) {
tmp = x + ((z * (t - a)) / y);
} else if (z <= 1.9e+19) {
tmp = ((t + (x * (y / z))) - a) / b;
} else if (z <= 1.12e+101) {
tmp = x / (((b * (z / y)) - z) + 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 = (a - t) / (y - b)
if (z <= (-9d-42)) then
tmp = t_1
else if (z <= 1.8d-74) then
tmp = x + ((z * (t - a)) / y)
else if (z <= 1.9d+19) then
tmp = ((t + (x * (y / z))) - a) / b
else if (z <= 1.12d+101) then
tmp = x / (((b * (z / y)) - z) + 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 = (a - t) / (y - b);
double tmp;
if (z <= -9e-42) {
tmp = t_1;
} else if (z <= 1.8e-74) {
tmp = x + ((z * (t - a)) / y);
} else if (z <= 1.9e+19) {
tmp = ((t + (x * (y / z))) - a) / b;
} else if (z <= 1.12e+101) {
tmp = x / (((b * (z / y)) - z) + 1.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a - t) / (y - b) tmp = 0 if z <= -9e-42: tmp = t_1 elif z <= 1.8e-74: tmp = x + ((z * (t - a)) / y) elif z <= 1.9e+19: tmp = ((t + (x * (y / z))) - a) / b elif z <= 1.12e+101: tmp = x / (((b * (z / y)) - z) + 1.0) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a - t) / Float64(y - b)) tmp = 0.0 if (z <= -9e-42) tmp = t_1; elseif (z <= 1.8e-74) tmp = Float64(x + Float64(Float64(z * Float64(t - a)) / y)); elseif (z <= 1.9e+19) tmp = Float64(Float64(Float64(t + Float64(x * Float64(y / z))) - a) / b); elseif (z <= 1.12e+101) tmp = Float64(x / Float64(Float64(Float64(b * Float64(z / y)) - z) + 1.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a - t) / (y - b); tmp = 0.0; if (z <= -9e-42) tmp = t_1; elseif (z <= 1.8e-74) tmp = x + ((z * (t - a)) / y); elseif (z <= 1.9e+19) tmp = ((t + (x * (y / z))) - a) / b; elseif (z <= 1.12e+101) tmp = x / (((b * (z / y)) - z) + 1.0); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9e-42], t$95$1, If[LessEqual[z, 1.8e-74], N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.9e+19], N[(N[(N[(t + N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 1.12e+101], N[(x / N[(N[(N[(b * N[(z / y), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a - t}{y - b}\\
\mathbf{if}\;z \leq -9 \cdot 10^{-42}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-74}:\\
\;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+19}:\\
\;\;\;\;\frac{\left(t + x \cdot \frac{y}{z}\right) - a}{b}\\
\mathbf{elif}\;z \leq 1.12 \cdot 10^{+101}:\\
\;\;\;\;\frac{x}{\left(b \cdot \frac{z}{y} - z\right) + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -9e-42 or 1.1199999999999999e101 < z Initial program 49.5%
Taylor expanded in z around inf 82.4%
if -9e-42 < z < 1.8000000000000001e-74Initial program 85.8%
Taylor expanded in z around 0 63.5%
Taylor expanded in x around 0 76.5%
if 1.8000000000000001e-74 < z < 1.9e19Initial program 90.7%
Taylor expanded in z around inf 81.9%
associate--l+81.9%
associate-/l*81.9%
Simplified81.9%
Taylor expanded in b around inf 59.1%
associate-*r/59.1%
Simplified59.1%
if 1.9e19 < z < 1.1199999999999999e101Initial program 42.9%
sub-neg42.9%
distribute-lft-in42.7%
Applied egg-rr42.7%
Taylor expanded in y around inf 37.5%
associate-+r+37.5%
mul-1-neg37.5%
unsub-neg37.5%
associate-/l*32.3%
Simplified32.3%
Taylor expanded in x around inf 49.5%
associate--l+49.5%
associate-*r/64.8%
Simplified64.8%
Final simplification76.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ t (- b y))))
(if (<= z -1.8e+253)
t_1
(if (<= z -8.2e+232)
(/ a (- b))
(if (<= z -2.9e-53)
t_1
(if (<= z 1.15e-73) x (if (<= z 7.2e+106) (* a (/ -1.0 b)) 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 <= -1.8e+253) {
tmp = t_1;
} else if (z <= -8.2e+232) {
tmp = a / -b;
} else if (z <= -2.9e-53) {
tmp = t_1;
} else if (z <= 1.15e-73) {
tmp = x;
} else if (z <= 7.2e+106) {
tmp = a * (-1.0 / 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 / (b - y)
if (z <= (-1.8d+253)) then
tmp = t_1
else if (z <= (-8.2d+232)) then
tmp = a / -b
else if (z <= (-2.9d-53)) then
tmp = t_1
else if (z <= 1.15d-73) then
tmp = x
else if (z <= 7.2d+106) then
tmp = a * ((-1.0d0) / 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 / (b - y);
double tmp;
if (z <= -1.8e+253) {
tmp = t_1;
} else if (z <= -8.2e+232) {
tmp = a / -b;
} else if (z <= -2.9e-53) {
tmp = t_1;
} else if (z <= 1.15e-73) {
tmp = x;
} else if (z <= 7.2e+106) {
tmp = a * (-1.0 / b);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t / (b - y) tmp = 0 if z <= -1.8e+253: tmp = t_1 elif z <= -8.2e+232: tmp = a / -b elif z <= -2.9e-53: tmp = t_1 elif z <= 1.15e-73: tmp = x elif z <= 7.2e+106: tmp = a * (-1.0 / b) 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 <= -1.8e+253) tmp = t_1; elseif (z <= -8.2e+232) tmp = Float64(a / Float64(-b)); elseif (z <= -2.9e-53) tmp = t_1; elseif (z <= 1.15e-73) tmp = x; elseif (z <= 7.2e+106) tmp = Float64(a * Float64(-1.0 / b)); 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 <= -1.8e+253) tmp = t_1; elseif (z <= -8.2e+232) tmp = a / -b; elseif (z <= -2.9e-53) tmp = t_1; elseif (z <= 1.15e-73) tmp = x; elseif (z <= 7.2e+106) tmp = a * (-1.0 / b); 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, -1.8e+253], t$95$1, If[LessEqual[z, -8.2e+232], N[(a / (-b)), $MachinePrecision], If[LessEqual[z, -2.9e-53], t$95$1, If[LessEqual[z, 1.15e-73], x, If[LessEqual[z, 7.2e+106], N[(a * N[(-1.0 / b), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{b - y}\\
\mathbf{if}\;z \leq -1.8 \cdot 10^{+253}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -8.2 \cdot 10^{+232}:\\
\;\;\;\;\frac{a}{-b}\\
\mathbf{elif}\;z \leq -2.9 \cdot 10^{-53}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{-73}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{+106}:\\
\;\;\;\;a \cdot \frac{-1}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.8e253 or -8.20000000000000005e232 < z < -2.8999999999999998e-53 or 7.2000000000000002e106 < z Initial program 51.5%
Taylor expanded in z around inf 81.3%
Taylor expanded in t around inf 47.6%
if -1.8e253 < z < -8.20000000000000005e232Initial program 44.9%
Taylor expanded in a around inf 41.0%
mul-1-neg41.0%
associate-/l*41.2%
distribute-rgt-neg-in41.2%
mul-1-neg41.2%
associate-*r/41.2%
mul-1-neg41.2%
+-commutative41.2%
fma-define41.2%
Simplified41.2%
Taylor expanded in b around inf 69.4%
associate-*r/69.4%
mul-1-neg69.4%
Simplified69.4%
if -2.8999999999999998e-53 < z < 1.14999999999999994e-73Initial program 85.4%
Taylor expanded in z around 0 59.0%
if 1.14999999999999994e-73 < z < 7.2000000000000002e106Initial program 66.4%
Taylor expanded in a around inf 30.3%
mul-1-neg30.3%
associate-/l*38.9%
distribute-rgt-neg-in38.9%
mul-1-neg38.9%
associate-*r/38.9%
mul-1-neg38.9%
+-commutative38.9%
fma-define39.0%
Simplified39.0%
Taylor expanded in b around inf 33.6%
Final simplification49.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ a (- b))))
(if (<= z -5.2e+231)
t_1
(if (<= z -2.4e-54)
(/ t b)
(if (<= z 1.15e-73)
x
(if (or (<= z 7.2e+120) (not (<= z 4.4e+223))) t_1 (/ t b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a / -b;
double tmp;
if (z <= -5.2e+231) {
tmp = t_1;
} else if (z <= -2.4e-54) {
tmp = t / b;
} else if (z <= 1.15e-73) {
tmp = x;
} else if ((z <= 7.2e+120) || !(z <= 4.4e+223)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = a / -b
if (z <= (-5.2d+231)) then
tmp = t_1
else if (z <= (-2.4d-54)) then
tmp = t / b
else if (z <= 1.15d-73) then
tmp = x
else if ((z <= 7.2d+120) .or. (.not. (z <= 4.4d+223))) then
tmp = t_1
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 t_1 = a / -b;
double tmp;
if (z <= -5.2e+231) {
tmp = t_1;
} else if (z <= -2.4e-54) {
tmp = t / b;
} else if (z <= 1.15e-73) {
tmp = x;
} else if ((z <= 7.2e+120) || !(z <= 4.4e+223)) {
tmp = t_1;
} else {
tmp = t / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a / -b tmp = 0 if z <= -5.2e+231: tmp = t_1 elif z <= -2.4e-54: tmp = t / b elif z <= 1.15e-73: tmp = x elif (z <= 7.2e+120) or not (z <= 4.4e+223): tmp = t_1 else: tmp = t / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a / Float64(-b)) tmp = 0.0 if (z <= -5.2e+231) tmp = t_1; elseif (z <= -2.4e-54) tmp = Float64(t / b); elseif (z <= 1.15e-73) tmp = x; elseif ((z <= 7.2e+120) || !(z <= 4.4e+223)) tmp = t_1; else tmp = Float64(t / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a / -b; tmp = 0.0; if (z <= -5.2e+231) tmp = t_1; elseif (z <= -2.4e-54) tmp = t / b; elseif (z <= 1.15e-73) tmp = x; elseif ((z <= 7.2e+120) || ~((z <= 4.4e+223))) tmp = t_1; else tmp = t / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a / (-b)), $MachinePrecision]}, If[LessEqual[z, -5.2e+231], t$95$1, If[LessEqual[z, -2.4e-54], N[(t / b), $MachinePrecision], If[LessEqual[z, 1.15e-73], x, If[Or[LessEqual[z, 7.2e+120], N[Not[LessEqual[z, 4.4e+223]], $MachinePrecision]], t$95$1, N[(t / b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a}{-b}\\
\mathbf{if}\;z \leq -5.2 \cdot 10^{+231}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.4 \cdot 10^{-54}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{-73}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{+120} \lor \neg \left(z \leq 4.4 \cdot 10^{+223}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b}\\
\end{array}
\end{array}
if z < -5.1999999999999997e231 or 1.14999999999999994e-73 < z < 7.20000000000000031e120 or 4.3999999999999999e223 < z Initial program 49.2%
Taylor expanded in a around inf 26.2%
mul-1-neg26.2%
associate-/l*34.2%
distribute-rgt-neg-in34.2%
mul-1-neg34.2%
associate-*r/34.2%
mul-1-neg34.2%
+-commutative34.2%
fma-define34.2%
Simplified34.2%
Taylor expanded in b around inf 36.7%
associate-*r/36.7%
mul-1-neg36.7%
Simplified36.7%
if -5.1999999999999997e231 < z < -2.40000000000000013e-54 or 7.20000000000000031e120 < z < 4.3999999999999999e223Initial program 60.2%
Taylor expanded in y around 0 38.8%
Taylor expanded in t around inf 31.4%
if -2.40000000000000013e-54 < z < 1.14999999999999994e-73Initial program 85.4%
Taylor expanded in z around 0 59.0%
Final simplification42.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ a (- b))))
(if (<= z -6e+231)
t_1
(if (<= z -7.6e-55)
(/ t b)
(if (<= z 1.1e-73)
x
(if (<= z 1.45e+109)
(* a (/ -1.0 b))
(if (<= z 5.5e+223) (/ t b) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a / -b;
double tmp;
if (z <= -6e+231) {
tmp = t_1;
} else if (z <= -7.6e-55) {
tmp = t / b;
} else if (z <= 1.1e-73) {
tmp = x;
} else if (z <= 1.45e+109) {
tmp = a * (-1.0 / b);
} else if (z <= 5.5e+223) {
tmp = t / 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 = a / -b
if (z <= (-6d+231)) then
tmp = t_1
else if (z <= (-7.6d-55)) then
tmp = t / b
else if (z <= 1.1d-73) then
tmp = x
else if (z <= 1.45d+109) then
tmp = a * ((-1.0d0) / b)
else if (z <= 5.5d+223) then
tmp = t / 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 = a / -b;
double tmp;
if (z <= -6e+231) {
tmp = t_1;
} else if (z <= -7.6e-55) {
tmp = t / b;
} else if (z <= 1.1e-73) {
tmp = x;
} else if (z <= 1.45e+109) {
tmp = a * (-1.0 / b);
} else if (z <= 5.5e+223) {
tmp = t / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a / -b tmp = 0 if z <= -6e+231: tmp = t_1 elif z <= -7.6e-55: tmp = t / b elif z <= 1.1e-73: tmp = x elif z <= 1.45e+109: tmp = a * (-1.0 / b) elif z <= 5.5e+223: tmp = t / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a / Float64(-b)) tmp = 0.0 if (z <= -6e+231) tmp = t_1; elseif (z <= -7.6e-55) tmp = Float64(t / b); elseif (z <= 1.1e-73) tmp = x; elseif (z <= 1.45e+109) tmp = Float64(a * Float64(-1.0 / b)); elseif (z <= 5.5e+223) tmp = Float64(t / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a / -b; tmp = 0.0; if (z <= -6e+231) tmp = t_1; elseif (z <= -7.6e-55) tmp = t / b; elseif (z <= 1.1e-73) tmp = x; elseif (z <= 1.45e+109) tmp = a * (-1.0 / b); elseif (z <= 5.5e+223) tmp = t / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a / (-b)), $MachinePrecision]}, If[LessEqual[z, -6e+231], t$95$1, If[LessEqual[z, -7.6e-55], N[(t / b), $MachinePrecision], If[LessEqual[z, 1.1e-73], x, If[LessEqual[z, 1.45e+109], N[(a * N[(-1.0 / b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.5e+223], N[(t / b), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a}{-b}\\
\mathbf{if}\;z \leq -6 \cdot 10^{+231}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -7.6 \cdot 10^{-55}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{-73}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{+109}:\\
\;\;\;\;a \cdot \frac{-1}{b}\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{+223}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.0000000000000003e231 or 5.4999999999999999e223 < z Initial program 24.7%
Taylor expanded in a around inf 20.5%
mul-1-neg20.5%
associate-/l*27.5%
distribute-rgt-neg-in27.5%
mul-1-neg27.5%
associate-*r/27.5%
mul-1-neg27.5%
+-commutative27.5%
fma-define27.5%
Simplified27.5%
Taylor expanded in b around inf 41.0%
associate-*r/41.0%
mul-1-neg41.0%
Simplified41.0%
if -6.0000000000000003e231 < z < -7.5999999999999993e-55 or 1.45e109 < z < 5.4999999999999999e223Initial program 60.2%
Taylor expanded in y around 0 38.8%
Taylor expanded in t around inf 31.4%
if -7.5999999999999993e-55 < z < 1.1e-73Initial program 85.4%
Taylor expanded in z around 0 59.0%
if 1.1e-73 < z < 1.45e109Initial program 66.4%
Taylor expanded in a around inf 30.3%
mul-1-neg30.3%
associate-/l*38.9%
distribute-rgt-neg-in38.9%
mul-1-neg38.9%
associate-*r/38.9%
mul-1-neg38.9%
+-commutative38.9%
fma-define39.0%
Simplified39.0%
Taylor expanded in b around inf 33.6%
Final simplification42.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- a t) (- y b))))
(if (<= z -4.8e-41)
t_1
(if (<= z 4.5e-26)
(+ x (/ (* z (- t a)) y))
(if (<= z 1.6e+23)
(/ (- (* x (/ y z)) a) b)
(if (<= z 1.12e+101) (- (/ t (- b y)) (/ x z)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a - t) / (y - b);
double tmp;
if (z <= -4.8e-41) {
tmp = t_1;
} else if (z <= 4.5e-26) {
tmp = x + ((z * (t - a)) / y);
} else if (z <= 1.6e+23) {
tmp = ((x * (y / z)) - a) / b;
} else if (z <= 1.12e+101) {
tmp = (t / (b - y)) - (x / z);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (a - t) / (y - b)
if (z <= (-4.8d-41)) then
tmp = t_1
else if (z <= 4.5d-26) then
tmp = x + ((z * (t - a)) / y)
else if (z <= 1.6d+23) then
tmp = ((x * (y / z)) - a) / b
else if (z <= 1.12d+101) then
tmp = (t / (b - y)) - (x / z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a - t) / (y - b);
double tmp;
if (z <= -4.8e-41) {
tmp = t_1;
} else if (z <= 4.5e-26) {
tmp = x + ((z * (t - a)) / y);
} else if (z <= 1.6e+23) {
tmp = ((x * (y / z)) - a) / b;
} else if (z <= 1.12e+101) {
tmp = (t / (b - y)) - (x / z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a - t) / (y - b) tmp = 0 if z <= -4.8e-41: tmp = t_1 elif z <= 4.5e-26: tmp = x + ((z * (t - a)) / y) elif z <= 1.6e+23: tmp = ((x * (y / z)) - a) / b elif z <= 1.12e+101: tmp = (t / (b - y)) - (x / z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a - t) / Float64(y - b)) tmp = 0.0 if (z <= -4.8e-41) tmp = t_1; elseif (z <= 4.5e-26) tmp = Float64(x + Float64(Float64(z * Float64(t - a)) / y)); elseif (z <= 1.6e+23) tmp = Float64(Float64(Float64(x * Float64(y / z)) - a) / b); elseif (z <= 1.12e+101) tmp = Float64(Float64(t / Float64(b - y)) - Float64(x / z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a - t) / (y - b); tmp = 0.0; if (z <= -4.8e-41) tmp = t_1; elseif (z <= 4.5e-26) tmp = x + ((z * (t - a)) / y); elseif (z <= 1.6e+23) tmp = ((x * (y / z)) - a) / b; elseif (z <= 1.12e+101) tmp = (t / (b - y)) - (x / z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.8e-41], t$95$1, If[LessEqual[z, 4.5e-26], N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e+23], N[(N[(N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 1.12e+101], N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a - t}{y - b}\\
\mathbf{if}\;z \leq -4.8 \cdot 10^{-41}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{-26}:\\
\;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+23}:\\
\;\;\;\;\frac{x \cdot \frac{y}{z} - a}{b}\\
\mathbf{elif}\;z \leq 1.12 \cdot 10^{+101}:\\
\;\;\;\;\frac{t}{b - y} - \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.80000000000000044e-41 or 1.1199999999999999e101 < z Initial program 49.5%
Taylor expanded in z around inf 82.4%
if -4.80000000000000044e-41 < z < 4.4999999999999999e-26Initial program 87.0%
Taylor expanded in z around 0 62.9%
Taylor expanded in x around 0 74.8%
if 4.4999999999999999e-26 < z < 1.6e23Initial program 79.9%
Taylor expanded in z around inf 79.9%
associate--l+79.9%
associate-/l*79.9%
Simplified79.9%
Taylor expanded in b around inf 59.5%
associate-*r/59.5%
Simplified59.5%
Taylor expanded in t around 0 57.8%
associate-*r/57.8%
Simplified57.8%
if 1.6e23 < z < 1.1199999999999999e101Initial program 42.0%
Taylor expanded in z around -inf 47.5%
associate--l+47.5%
mul-1-neg47.5%
distribute-lft-out--47.5%
associate-/l*58.7%
associate-/l*82.8%
div-sub82.8%
Simplified82.8%
Taylor expanded in y around inf 82.1%
Taylor expanded in t around inf 65.0%
Final simplification76.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -7.4e+21) (not (<= z 6.2e+23))) (- (/ (- a t) (- y b)) (/ x z)) (/ (- (* x y) (* z (- a t))) (+ y (* z (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -7.4e+21) || !(z <= 6.2e+23)) {
tmp = ((a - t) / (y - b)) - (x / z);
} else {
tmp = ((x * y) - (z * (a - t))) / (y + (z * (b - y)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-7.4d+21)) .or. (.not. (z <= 6.2d+23))) then
tmp = ((a - t) / (y - b)) - (x / z)
else
tmp = ((x * y) - (z * (a - t))) / (y + (z * (b - y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -7.4e+21) || !(z <= 6.2e+23)) {
tmp = ((a - t) / (y - b)) - (x / z);
} else {
tmp = ((x * y) - (z * (a - t))) / (y + (z * (b - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -7.4e+21) or not (z <= 6.2e+23): tmp = ((a - t) / (y - b)) - (x / z) else: tmp = ((x * y) - (z * (a - t))) / (y + (z * (b - y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -7.4e+21) || !(z <= 6.2e+23)) tmp = Float64(Float64(Float64(a - t) / Float64(y - b)) - Float64(x / z)); else tmp = Float64(Float64(Float64(x * y) - Float64(z * Float64(a - t))) / Float64(y + Float64(z * Float64(b - y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -7.4e+21) || ~((z <= 6.2e+23))) tmp = ((a - t) / (y - b)) - (x / z); else tmp = ((x * y) - (z * (a - t))) / (y + (z * (b - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -7.4e+21], N[Not[LessEqual[z, 6.2e+23]], $MachinePrecision]], N[(N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] - N[(z * N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.4 \cdot 10^{+21} \lor \neg \left(z \leq 6.2 \cdot 10^{+23}\right):\\
\;\;\;\;\frac{a - t}{y - b} - \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y - z \cdot \left(a - t\right)}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -7.4e21 or 6.19999999999999941e23 < z Initial program 42.3%
Taylor expanded in z around -inf 63.7%
associate--l+63.7%
mul-1-neg63.7%
distribute-lft-out--63.7%
associate-/l*70.0%
associate-/l*86.4%
div-sub86.4%
Simplified86.4%
Taylor expanded in y around inf 89.0%
if -7.4e21 < z < 6.19999999999999941e23Initial program 87.7%
Final simplification88.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))) (t_2 (/ t (- b y))))
(if (<= t -5.6e+41)
t_2
(if (<= t -9.6e-204)
t_1
(if (<= t 5.2e-209) (/ a (- b)) (if (<= t 4.4e+104) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double t_2 = t / (b - y);
double tmp;
if (t <= -5.6e+41) {
tmp = t_2;
} else if (t <= -9.6e-204) {
tmp = t_1;
} else if (t <= 5.2e-209) {
tmp = a / -b;
} else if (t <= 4.4e+104) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x / (1.0d0 - z)
t_2 = t / (b - y)
if (t <= (-5.6d+41)) then
tmp = t_2
else if (t <= (-9.6d-204)) then
tmp = t_1
else if (t <= 5.2d-209) then
tmp = a / -b
else if (t <= 4.4d+104) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double t_2 = t / (b - y);
double tmp;
if (t <= -5.6e+41) {
tmp = t_2;
} else if (t <= -9.6e-204) {
tmp = t_1;
} else if (t <= 5.2e-209) {
tmp = a / -b;
} else if (t <= 4.4e+104) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) t_2 = t / (b - y) tmp = 0 if t <= -5.6e+41: tmp = t_2 elif t <= -9.6e-204: tmp = t_1 elif t <= 5.2e-209: tmp = a / -b elif t <= 4.4e+104: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) t_2 = Float64(t / Float64(b - y)) tmp = 0.0 if (t <= -5.6e+41) tmp = t_2; elseif (t <= -9.6e-204) tmp = t_1; elseif (t <= 5.2e-209) tmp = Float64(a / Float64(-b)); elseif (t <= 4.4e+104) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); t_2 = t / (b - y); tmp = 0.0; if (t <= -5.6e+41) tmp = t_2; elseif (t <= -9.6e-204) tmp = t_1; elseif (t <= 5.2e-209) tmp = a / -b; elseif (t <= 4.4e+104) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.6e+41], t$95$2, If[LessEqual[t, -9.6e-204], t$95$1, If[LessEqual[t, 5.2e-209], N[(a / (-b)), $MachinePrecision], If[LessEqual[t, 4.4e+104], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
t_2 := \frac{t}{b - y}\\
\mathbf{if}\;t \leq -5.6 \cdot 10^{+41}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -9.6 \cdot 10^{-204}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{-209}:\\
\;\;\;\;\frac{a}{-b}\\
\mathbf{elif}\;t \leq 4.4 \cdot 10^{+104}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -5.5999999999999999e41 or 4.40000000000000001e104 < t Initial program 63.0%
Taylor expanded in z around inf 64.9%
Taylor expanded in t around inf 56.2%
if -5.5999999999999999e41 < t < -9.6e-204 or 5.19999999999999969e-209 < t < 4.40000000000000001e104Initial program 64.2%
Taylor expanded in y around inf 45.8%
mul-1-neg45.8%
unsub-neg45.8%
Simplified45.8%
if -9.6e-204 < t < 5.19999999999999969e-209Initial program 79.0%
Taylor expanded in a around inf 54.9%
mul-1-neg54.9%
associate-/l*60.2%
distribute-rgt-neg-in60.2%
mul-1-neg60.2%
associate-*r/60.2%
mul-1-neg60.2%
+-commutative60.2%
fma-define60.2%
Simplified60.2%
Taylor expanded in b around inf 49.0%
associate-*r/49.0%
mul-1-neg49.0%
Simplified49.0%
Final simplification49.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -7e-41) (not (<= z 1.1e-16))) (- (/ (- a t) (- y b)) (/ x z)) (+ x (/ (* z (- t a)) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -7e-41) || !(z <= 1.1e-16)) {
tmp = ((a - t) / (y - b)) - (x / z);
} else {
tmp = x + ((z * (t - a)) / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-7d-41)) .or. (.not. (z <= 1.1d-16))) then
tmp = ((a - t) / (y - b)) - (x / z)
else
tmp = x + ((z * (t - a)) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -7e-41) || !(z <= 1.1e-16)) {
tmp = ((a - t) / (y - b)) - (x / z);
} else {
tmp = x + ((z * (t - a)) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -7e-41) or not (z <= 1.1e-16): tmp = ((a - t) / (y - b)) - (x / z) else: tmp = x + ((z * (t - a)) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -7e-41) || !(z <= 1.1e-16)) tmp = Float64(Float64(Float64(a - t) / Float64(y - b)) - Float64(x / z)); else tmp = Float64(x + Float64(Float64(z * Float64(t - a)) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -7e-41) || ~((z <= 1.1e-16))) tmp = ((a - t) / (y - b)) - (x / z); else tmp = x + ((z * (t - a)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -7e-41], N[Not[LessEqual[z, 1.1e-16]], $MachinePrecision]], N[(N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{-41} \lor \neg \left(z \leq 1.1 \cdot 10^{-16}\right):\\
\;\;\;\;\frac{a - t}{y - b} - \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\
\end{array}
\end{array}
if z < -6.9999999999999999e-41 or 1.1e-16 < z Initial program 51.7%
Taylor expanded in z around -inf 60.8%
associate--l+60.8%
mul-1-neg60.8%
distribute-lft-out--60.8%
associate-/l*66.0%
associate-/l*82.5%
div-sub83.2%
Simplified83.2%
Taylor expanded in y around inf 83.5%
if -6.9999999999999999e-41 < z < 1.1e-16Initial program 86.4%
Taylor expanded in z around 0 61.8%
Taylor expanded in x around 0 74.3%
Final simplification79.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -6.2e-40)
t_1
(if (<= y 2.1e-93) (/ (- t a) b) (if (<= y 5.6e+49) (/ (- a t) 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 <= -6.2e-40) {
tmp = t_1;
} else if (y <= 2.1e-93) {
tmp = (t - a) / b;
} else if (y <= 5.6e+49) {
tmp = (a - t) / 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 <= (-6.2d-40)) then
tmp = t_1
else if (y <= 2.1d-93) then
tmp = (t - a) / b
else if (y <= 5.6d+49) then
tmp = (a - t) / 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 <= -6.2e-40) {
tmp = t_1;
} else if (y <= 2.1e-93) {
tmp = (t - a) / b;
} else if (y <= 5.6e+49) {
tmp = (a - t) / 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 <= -6.2e-40: tmp = t_1 elif y <= 2.1e-93: tmp = (t - a) / b elif y <= 5.6e+49: tmp = (a - t) / 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 <= -6.2e-40) tmp = t_1; elseif (y <= 2.1e-93) tmp = Float64(Float64(t - a) / b); elseif (y <= 5.6e+49) tmp = Float64(Float64(a - t) / 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 <= -6.2e-40) tmp = t_1; elseif (y <= 2.1e-93) tmp = (t - a) / b; elseif (y <= 5.6e+49) tmp = (a - t) / 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, -6.2e-40], t$95$1, If[LessEqual[y, 2.1e-93], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[y, 5.6e+49], N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -6.2 \cdot 10^{-40}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{-93}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{elif}\;y \leq 5.6 \cdot 10^{+49}:\\
\;\;\;\;\frac{a - t}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -6.20000000000000021e-40 or 5.5999999999999996e49 < y Initial program 50.5%
Taylor expanded in y around inf 52.5%
mul-1-neg52.5%
unsub-neg52.5%
Simplified52.5%
if -6.20000000000000021e-40 < y < 2.1000000000000001e-93Initial program 81.9%
Taylor expanded in y around 0 63.9%
if 2.1000000000000001e-93 < y < 5.5999999999999996e49Initial program 77.2%
Taylor expanded in z around inf 55.2%
Taylor expanded in b around 0 41.1%
mul-1-neg41.1%
Simplified41.1%
Final simplification55.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -7e-41) (not (<= z 7.4e-17))) (/ (- a t) (- y b)) (+ x (/ (* z (- t a)) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -7e-41) || !(z <= 7.4e-17)) {
tmp = (a - t) / (y - b);
} else {
tmp = x + ((z * (t - a)) / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-7d-41)) .or. (.not. (z <= 7.4d-17))) then
tmp = (a - t) / (y - b)
else
tmp = x + ((z * (t - a)) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -7e-41) || !(z <= 7.4e-17)) {
tmp = (a - t) / (y - b);
} else {
tmp = x + ((z * (t - a)) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -7e-41) or not (z <= 7.4e-17): tmp = (a - t) / (y - b) else: tmp = x + ((z * (t - a)) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -7e-41) || !(z <= 7.4e-17)) tmp = Float64(Float64(a - t) / Float64(y - b)); else tmp = Float64(x + Float64(Float64(z * Float64(t - a)) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -7e-41) || ~((z <= 7.4e-17))) tmp = (a - t) / (y - b); else tmp = x + ((z * (t - a)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -7e-41], N[Not[LessEqual[z, 7.4e-17]], $MachinePrecision]], N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{-41} \lor \neg \left(z \leq 7.4 \cdot 10^{-17}\right):\\
\;\;\;\;\frac{a - t}{y - b}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\
\end{array}
\end{array}
if z < -6.9999999999999999e-41 or 7.3999999999999995e-17 < z Initial program 51.7%
Taylor expanded in z around inf 75.1%
if -6.9999999999999999e-41 < z < 7.3999999999999995e-17Initial program 86.4%
Taylor expanded in z around 0 61.8%
Taylor expanded in x around 0 74.3%
Final simplification74.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -5e-55) (not (<= z 4.8e-76))) (/ (- a t) (- y b)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5e-55) || !(z <= 4.8e-76)) {
tmp = (a - t) / (y - 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 <= (-5d-55)) .or. (.not. (z <= 4.8d-76))) then
tmp = (a - t) / (y - 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 <= -5e-55) || !(z <= 4.8e-76)) {
tmp = (a - t) / (y - b);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -5e-55) or not (z <= 4.8e-76): tmp = (a - t) / (y - b) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -5e-55) || !(z <= 4.8e-76)) tmp = Float64(Float64(a - t) / Float64(y - b)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -5e-55) || ~((z <= 4.8e-76))) tmp = (a - t) / (y - b); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -5e-55], N[Not[LessEqual[z, 4.8e-76]], $MachinePrecision]], N[(N[(a - t), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{-55} \lor \neg \left(z \leq 4.8 \cdot 10^{-76}\right):\\
\;\;\;\;\frac{a - t}{y - b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -5.0000000000000002e-55 or 4.80000000000000026e-76 < z Initial program 55.2%
Taylor expanded in z around inf 72.5%
if -5.0000000000000002e-55 < z < 4.80000000000000026e-76Initial program 85.4%
Taylor expanded in z around 0 59.0%
Final simplification67.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.15e-38) (not (<= y 1.12e-26))) (/ x (- 1.0 z)) (/ (- t a) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.15e-38) || !(y <= 1.12e-26)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1.15d-38)) .or. (.not. (y <= 1.12d-26))) then
tmp = x / (1.0d0 - z)
else
tmp = (t - a) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.15e-38) || !(y <= 1.12e-26)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.15e-38) or not (y <= 1.12e-26): tmp = x / (1.0 - z) else: tmp = (t - a) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.15e-38) || !(y <= 1.12e-26)) tmp = Float64(x / Float64(1.0 - z)); else tmp = Float64(Float64(t - a) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.15e-38) || ~((y <= 1.12e-26))) tmp = x / (1.0 - z); else tmp = (t - a) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.15e-38], N[Not[LessEqual[y, 1.12e-26]], $MachinePrecision]], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{-38} \lor \neg \left(y \leq 1.12 \cdot 10^{-26}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -1.15000000000000001e-38 or 1.12e-26 < y Initial program 54.0%
Taylor expanded in y around inf 48.9%
mul-1-neg48.9%
unsub-neg48.9%
Simplified48.9%
if -1.15000000000000001e-38 < y < 1.12e-26Initial program 80.7%
Taylor expanded in y around 0 59.9%
Final simplification53.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.3e-53) (not (<= z 5.2e+20))) (/ t b) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.3e-53) || !(z <= 5.2e+20)) {
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.3d-53)) .or. (.not. (z <= 5.2d+20))) 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.3e-53) || !(z <= 5.2e+20)) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.3e-53) or not (z <= 5.2e+20): tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.3e-53) || !(z <= 5.2e+20)) 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.3e-53) || ~((z <= 5.2e+20))) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.3e-53], N[Not[LessEqual[z, 5.2e+20]], $MachinePrecision]], N[(t / b), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{-53} \lor \neg \left(z \leq 5.2 \cdot 10^{+20}\right):\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.3000000000000001e-53 or 5.2e20 < z Initial program 50.1%
Taylor expanded in y around 0 40.9%
Taylor expanded in t around inf 25.2%
if -2.3000000000000001e-53 < z < 5.2e20Initial program 85.6%
Taylor expanded in z around 0 51.2%
Final simplification36.8%
(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 65.9%
Taylor expanded in z around 0 25.0%
Final simplification25.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 2024067
(FPCore (x y z t a b)
:name "Development.Shake.Progress:decay from shake-0.15.5"
:precision binary64
:alt
(- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z))))
(/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))