
(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 (- y b)))))
(if (or (<= z -5.7e+17) (not (<= z 3200000000000.0)))
(+
(/ (- (* x (/ y (- b y))) (* y (/ (- t a) (pow (- b y) 2.0)))) z)
(/ (- t a) (- b y)))
(* x (+ (/ y t_1) (/ (* z (- t a)) (* x t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y - (z * (y - b));
double tmp;
if ((z <= -5.7e+17) || !(z <= 3200000000000.0)) {
tmp = (((x * (y / (b - y))) - (y * ((t - a) / pow((b - y), 2.0)))) / z) + ((t - a) / (b - y));
} else {
tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = y - (z * (y - b))
if ((z <= (-5.7d+17)) .or. (.not. (z <= 3200000000000.0d0))) then
tmp = (((x * (y / (b - y))) - (y * ((t - a) / ((b - y) ** 2.0d0)))) / z) + ((t - a) / (b - y))
else
tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y - (z * (y - b));
double tmp;
if ((z <= -5.7e+17) || !(z <= 3200000000000.0)) {
tmp = (((x * (y / (b - y))) - (y * ((t - a) / Math.pow((b - y), 2.0)))) / z) + ((t - a) / (b - y));
} else {
tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y - (z * (y - b)) tmp = 0 if (z <= -5.7e+17) or not (z <= 3200000000000.0): tmp = (((x * (y / (b - y))) - (y * ((t - a) / math.pow((b - y), 2.0)))) / z) + ((t - a) / (b - y)) else: tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y - Float64(z * Float64(y - b))) tmp = 0.0 if ((z <= -5.7e+17) || !(z <= 3200000000000.0)) tmp = Float64(Float64(Float64(Float64(x * Float64(y / Float64(b - y))) - Float64(y * Float64(Float64(t - a) / (Float64(b - y) ^ 2.0)))) / z) + Float64(Float64(t - a) / Float64(b - y))); else tmp = Float64(x * Float64(Float64(y / t_1) + Float64(Float64(z * Float64(t - a)) / Float64(x * t_1)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y - (z * (y - b)); tmp = 0.0; if ((z <= -5.7e+17) || ~((z <= 3200000000000.0))) tmp = (((x * (y / (b - y))) - (y * ((t - a) / ((b - y) ^ 2.0)))) / z) + ((t - a) / (b - y)); else tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y - N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -5.7e+17], N[Not[LessEqual[z, 3200000000000.0]], $MachinePrecision]], N[(N[(N[(N[(x * N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(N[(t - a), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y / t$95$1), $MachinePrecision] + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(x * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y - z \cdot \left(y - b\right)\\
\mathbf{if}\;z \leq -5.7 \cdot 10^{+17} \lor \neg \left(z \leq 3200000000000\right):\\
\;\;\;\;\frac{x \cdot \frac{y}{b - y} - y \cdot \frac{t - a}{{\left(b - y\right)}^{2}}}{z} + \frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y}{t\_1} + \frac{z \cdot \left(t - a\right)}{x \cdot t\_1}\right)\\
\end{array}
\end{array}
if z < -5.7e17 or 3.2e12 < z Initial program 44.0%
Taylor expanded in z around -inf 70.1%
associate--l+70.1%
mul-1-neg70.1%
distribute-lft-out--70.1%
associate-/l*78.1%
associate-/l*91.2%
div-sub91.2%
Simplified91.2%
if -5.7e17 < z < 3.2e12Initial program 86.0%
Taylor expanded in x around inf 88.3%
Final simplification89.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- y (* z (- y b))))
(t_2 (/ (+ (* z (- t a)) (* x y)) t_1))
(t_3 (/ (- t a) (- b y))))
(if (<= z -1.15e+56)
t_3
(if (<= z 9.8e-154)
t_2
(if (<= z 2.8e-109)
(* x (+ (/ y t_1) (/ (- t a) (* x b))))
(if (<= z 1.1e+55) t_2 t_3))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y - (z * (y - b));
double t_2 = ((z * (t - a)) + (x * y)) / t_1;
double t_3 = (t - a) / (b - y);
double tmp;
if (z <= -1.15e+56) {
tmp = t_3;
} else if (z <= 9.8e-154) {
tmp = t_2;
} else if (z <= 2.8e-109) {
tmp = x * ((y / t_1) + ((t - a) / (x * b)));
} else if (z <= 1.1e+55) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = y - (z * (y - b))
t_2 = ((z * (t - a)) + (x * y)) / t_1
t_3 = (t - a) / (b - y)
if (z <= (-1.15d+56)) then
tmp = t_3
else if (z <= 9.8d-154) then
tmp = t_2
else if (z <= 2.8d-109) then
tmp = x * ((y / t_1) + ((t - a) / (x * b)))
else if (z <= 1.1d+55) then
tmp = t_2
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y - (z * (y - b));
double t_2 = ((z * (t - a)) + (x * y)) / t_1;
double t_3 = (t - a) / (b - y);
double tmp;
if (z <= -1.15e+56) {
tmp = t_3;
} else if (z <= 9.8e-154) {
tmp = t_2;
} else if (z <= 2.8e-109) {
tmp = x * ((y / t_1) + ((t - a) / (x * b)));
} else if (z <= 1.1e+55) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y - (z * (y - b)) t_2 = ((z * (t - a)) + (x * y)) / t_1 t_3 = (t - a) / (b - y) tmp = 0 if z <= -1.15e+56: tmp = t_3 elif z <= 9.8e-154: tmp = t_2 elif z <= 2.8e-109: tmp = x * ((y / t_1) + ((t - a) / (x * b))) elif z <= 1.1e+55: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y - Float64(z * Float64(y - b))) t_2 = Float64(Float64(Float64(z * Float64(t - a)) + Float64(x * y)) / t_1) t_3 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -1.15e+56) tmp = t_3; elseif (z <= 9.8e-154) tmp = t_2; elseif (z <= 2.8e-109) tmp = Float64(x * Float64(Float64(y / t_1) + Float64(Float64(t - a) / Float64(x * b)))); elseif (z <= 1.1e+55) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y - (z * (y - b)); t_2 = ((z * (t - a)) + (x * y)) / t_1; t_3 = (t - a) / (b - y); tmp = 0.0; if (z <= -1.15e+56) tmp = t_3; elseif (z <= 9.8e-154) tmp = t_2; elseif (z <= 2.8e-109) tmp = x * ((y / t_1) + ((t - a) / (x * b))); elseif (z <= 1.1e+55) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y - N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.15e+56], t$95$3, If[LessEqual[z, 9.8e-154], t$95$2, If[LessEqual[z, 2.8e-109], N[(x * N[(N[(y / t$95$1), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(x * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.1e+55], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y - z \cdot \left(y - b\right)\\
t_2 := \frac{z \cdot \left(t - a\right) + x \cdot y}{t\_1}\\
t_3 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.15 \cdot 10^{+56}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq 9.8 \cdot 10^{-154}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-109}:\\
\;\;\;\;x \cdot \left(\frac{y}{t\_1} + \frac{t - a}{x \cdot b}\right)\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{+55}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if z < -1.15000000000000007e56 or 1.10000000000000005e55 < z Initial program 38.7%
Taylor expanded in z around inf 85.3%
if -1.15000000000000007e56 < z < 9.79999999999999993e-154 or 2.79999999999999979e-109 < z < 1.10000000000000005e55Initial program 87.4%
if 9.79999999999999993e-154 < z < 2.79999999999999979e-109Initial program 41.8%
Taylor expanded in x around inf 99.6%
Taylor expanded in y around 0 99.6%
*-commutative99.6%
Simplified99.6%
Final simplification86.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- y (* z (- y b)))))
(if (or (<= z -5.5e+42) (not (<= z 3.4e+33)))
(/ (- t a) (- b y))
(* x (+ (/ y t_1) (/ (* z (- t a)) (* x t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y - (z * (y - b));
double tmp;
if ((z <= -5.5e+42) || !(z <= 3.4e+33)) {
tmp = (t - a) / (b - y);
} else {
tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = y - (z * (y - b))
if ((z <= (-5.5d+42)) .or. (.not. (z <= 3.4d+33))) then
tmp = (t - a) / (b - y)
else
tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y - (z * (y - b));
double tmp;
if ((z <= -5.5e+42) || !(z <= 3.4e+33)) {
tmp = (t - a) / (b - y);
} else {
tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y - (z * (y - b)) tmp = 0 if (z <= -5.5e+42) or not (z <= 3.4e+33): tmp = (t - a) / (b - y) else: tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y - Float64(z * Float64(y - b))) tmp = 0.0 if ((z <= -5.5e+42) || !(z <= 3.4e+33)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x * Float64(Float64(y / t_1) + Float64(Float64(z * Float64(t - a)) / Float64(x * t_1)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y - (z * (y - b)); tmp = 0.0; if ((z <= -5.5e+42) || ~((z <= 3.4e+33))) tmp = (t - a) / (b - y); else tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y - N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -5.5e+42], N[Not[LessEqual[z, 3.4e+33]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y / t$95$1), $MachinePrecision] + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(x * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y - z \cdot \left(y - b\right)\\
\mathbf{if}\;z \leq -5.5 \cdot 10^{+42} \lor \neg \left(z \leq 3.4 \cdot 10^{+33}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y}{t\_1} + \frac{z \cdot \left(t - a\right)}{x \cdot t\_1}\right)\\
\end{array}
\end{array}
if z < -5.50000000000000001e42 or 3.3999999999999999e33 < z Initial program 40.4%
Taylor expanded in z around inf 82.9%
if -5.50000000000000001e42 < z < 3.3999999999999999e33Initial program 86.2%
Taylor expanded in x around inf 87.6%
Final simplification85.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ (* z t) y))) (t_2 (/ a (- y b))))
(if (<= y -9e+16)
t_1
(if (<= y 2.2e-143)
(/ (- t a) b)
(if (<= y 7.5e-66)
(/ t (- b y))
(if (<= y 1.12e-47)
t_2
(if (<= y 7e+29) t_1 (if (<= y 7.2e+87) t_2 (/ x (- 1.0 z))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((z * t) / y);
double t_2 = a / (y - b);
double tmp;
if (y <= -9e+16) {
tmp = t_1;
} else if (y <= 2.2e-143) {
tmp = (t - a) / b;
} else if (y <= 7.5e-66) {
tmp = t / (b - y);
} else if (y <= 1.12e-47) {
tmp = t_2;
} else if (y <= 7e+29) {
tmp = t_1;
} else if (y <= 7.2e+87) {
tmp = t_2;
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + ((z * t) / y)
t_2 = a / (y - b)
if (y <= (-9d+16)) then
tmp = t_1
else if (y <= 2.2d-143) then
tmp = (t - a) / b
else if (y <= 7.5d-66) then
tmp = t / (b - y)
else if (y <= 1.12d-47) then
tmp = t_2
else if (y <= 7d+29) then
tmp = t_1
else if (y <= 7.2d+87) then
tmp = t_2
else
tmp = x / (1.0d0 - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((z * t) / y);
double t_2 = a / (y - b);
double tmp;
if (y <= -9e+16) {
tmp = t_1;
} else if (y <= 2.2e-143) {
tmp = (t - a) / b;
} else if (y <= 7.5e-66) {
tmp = t / (b - y);
} else if (y <= 1.12e-47) {
tmp = t_2;
} else if (y <= 7e+29) {
tmp = t_1;
} else if (y <= 7.2e+87) {
tmp = t_2;
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + ((z * t) / y) t_2 = a / (y - b) tmp = 0 if y <= -9e+16: tmp = t_1 elif y <= 2.2e-143: tmp = (t - a) / b elif y <= 7.5e-66: tmp = t / (b - y) elif y <= 1.12e-47: tmp = t_2 elif y <= 7e+29: tmp = t_1 elif y <= 7.2e+87: tmp = t_2 else: tmp = x / (1.0 - z) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(z * t) / y)) t_2 = Float64(a / Float64(y - b)) tmp = 0.0 if (y <= -9e+16) tmp = t_1; elseif (y <= 2.2e-143) tmp = Float64(Float64(t - a) / b); elseif (y <= 7.5e-66) tmp = Float64(t / Float64(b - y)); elseif (y <= 1.12e-47) tmp = t_2; elseif (y <= 7e+29) tmp = t_1; elseif (y <= 7.2e+87) tmp = t_2; else tmp = Float64(x / Float64(1.0 - z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + ((z * t) / y); t_2 = a / (y - b); tmp = 0.0; if (y <= -9e+16) tmp = t_1; elseif (y <= 2.2e-143) tmp = (t - a) / b; elseif (y <= 7.5e-66) tmp = t / (b - y); elseif (y <= 1.12e-47) tmp = t_2; elseif (y <= 7e+29) tmp = t_1; elseif (y <= 7.2e+87) tmp = t_2; else tmp = x / (1.0 - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(z * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a / N[(y - b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9e+16], t$95$1, If[LessEqual[y, 2.2e-143], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[y, 7.5e-66], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.12e-47], t$95$2, If[LessEqual[y, 7e+29], t$95$1, If[LessEqual[y, 7.2e+87], t$95$2, N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{z \cdot t}{y}\\
t_2 := \frac{a}{y - b}\\
\mathbf{if}\;y \leq -9 \cdot 10^{+16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{-143}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{-66}:\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{elif}\;y \leq 1.12 \cdot 10^{-47}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 7 \cdot 10^{+29}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{+87}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 - z}\\
\end{array}
\end{array}
if y < -9e16 or 1.12000000000000002e-47 < y < 6.99999999999999958e29Initial program 60.9%
Taylor expanded in b around inf 51.7%
*-commutative51.7%
Simplified51.7%
Taylor expanded in y around inf 51.7%
associate-/l*50.5%
Simplified50.5%
Taylor expanded in b around 0 54.5%
Taylor expanded in t around inf 47.2%
if -9e16 < y < 2.19999999999999989e-143Initial program 76.5%
Taylor expanded in y around 0 66.4%
if 2.19999999999999989e-143 < y < 7.49999999999999995e-66Initial program 78.6%
Taylor expanded in t around inf 42.2%
*-commutative42.2%
Simplified42.2%
Taylor expanded in z around inf 63.2%
if 7.49999999999999995e-66 < y < 1.12000000000000002e-47 or 6.99999999999999958e29 < y < 7.19999999999999988e87Initial program 71.9%
Taylor expanded in t around 0 65.0%
+-commutative65.0%
mul-1-neg65.0%
unsub-neg65.0%
*-commutative65.0%
*-commutative65.0%
Simplified65.0%
Taylor expanded in z around inf 58.3%
associate-*r/58.3%
neg-mul-158.3%
Simplified58.3%
if 7.19999999999999988e87 < y Initial program 38.2%
Taylor expanded in y around inf 67.5%
mul-1-neg67.5%
unsub-neg67.5%
Simplified67.5%
Final simplification59.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- x (/ (* z (- a t)) y))) (t_2 (/ (- t a) (- b y))))
(if (<= z -5.8e-11)
t_2
(if (<= z 1.2e-306)
t_1
(if (<= z 8.5e-138)
(/ (* y (- x (* a (/ z y)))) (+ y (* z b)))
(if (<= z 1.98e-22) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x - ((z * (a - t)) / y);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -5.8e-11) {
tmp = t_2;
} else if (z <= 1.2e-306) {
tmp = t_1;
} else if (z <= 8.5e-138) {
tmp = (y * (x - (a * (z / y)))) / (y + (z * b));
} else if (z <= 1.98e-22) {
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 - ((z * (a - t)) / y)
t_2 = (t - a) / (b - y)
if (z <= (-5.8d-11)) then
tmp = t_2
else if (z <= 1.2d-306) then
tmp = t_1
else if (z <= 8.5d-138) then
tmp = (y * (x - (a * (z / y)))) / (y + (z * b))
else if (z <= 1.98d-22) 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 - ((z * (a - t)) / y);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -5.8e-11) {
tmp = t_2;
} else if (z <= 1.2e-306) {
tmp = t_1;
} else if (z <= 8.5e-138) {
tmp = (y * (x - (a * (z / y)))) / (y + (z * b));
} else if (z <= 1.98e-22) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x - ((z * (a - t)) / y) t_2 = (t - a) / (b - y) tmp = 0 if z <= -5.8e-11: tmp = t_2 elif z <= 1.2e-306: tmp = t_1 elif z <= 8.5e-138: tmp = (y * (x - (a * (z / y)))) / (y + (z * b)) elif z <= 1.98e-22: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x - Float64(Float64(z * Float64(a - t)) / y)) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -5.8e-11) tmp = t_2; elseif (z <= 1.2e-306) tmp = t_1; elseif (z <= 8.5e-138) tmp = Float64(Float64(y * Float64(x - Float64(a * Float64(z / y)))) / Float64(y + Float64(z * b))); elseif (z <= 1.98e-22) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x - ((z * (a - t)) / y); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -5.8e-11) tmp = t_2; elseif (z <= 1.2e-306) tmp = t_1; elseif (z <= 8.5e-138) tmp = (y * (x - (a * (z / y)))) / (y + (z * b)); elseif (z <= 1.98e-22) 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[(N[(z * N[(a - t), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.8e-11], t$95$2, If[LessEqual[z, 1.2e-306], t$95$1, If[LessEqual[z, 8.5e-138], N[(N[(y * N[(x - N[(a * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.98e-22], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{z \cdot \left(a - t\right)}{y}\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -5.8 \cdot 10^{-11}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{-306}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-138}:\\
\;\;\;\;\frac{y \cdot \left(x - a \cdot \frac{z}{y}\right)}{y + z \cdot b}\\
\mathbf{elif}\;z \leq 1.98 \cdot 10^{-22}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -5.8e-11 or 1.98000000000000001e-22 < z Initial program 46.7%
Taylor expanded in z around inf 78.0%
if -5.8e-11 < z < 1.2e-306 or 8.50000000000000035e-138 < z < 1.98000000000000001e-22Initial program 85.3%
Taylor expanded in b around inf 85.2%
*-commutative85.2%
Simplified85.2%
Taylor expanded in y around inf 80.8%
associate-/l*75.1%
Simplified75.1%
Taylor expanded in b around 0 73.1%
if 1.2e-306 < z < 8.50000000000000035e-138Initial program 95.5%
Taylor expanded in b around inf 95.5%
*-commutative95.5%
Simplified95.5%
Taylor expanded in y around inf 95.6%
associate-/l*64.4%
Simplified64.4%
Taylor expanded in t around 0 81.3%
mul-1-neg81.3%
unsub-neg81.3%
associate-/l*81.3%
Simplified81.3%
Final simplification76.8%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -7.4e-9)
x
(if (<= y -8.5e-223)
(/ t b)
(if (<= y -5.2e-275)
(/ a (- b))
(if (<= y 7.5e-51) (/ t b) (if (<= y 1.5e+218) x (/ x (- z))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -7.4e-9) {
tmp = x;
} else if (y <= -8.5e-223) {
tmp = t / b;
} else if (y <= -5.2e-275) {
tmp = a / -b;
} else if (y <= 7.5e-51) {
tmp = t / b;
} else if (y <= 1.5e+218) {
tmp = x;
} else {
tmp = x / -z;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-7.4d-9)) then
tmp = x
else if (y <= (-8.5d-223)) then
tmp = t / b
else if (y <= (-5.2d-275)) then
tmp = a / -b
else if (y <= 7.5d-51) then
tmp = t / b
else if (y <= 1.5d+218) then
tmp = x
else
tmp = x / -z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -7.4e-9) {
tmp = x;
} else if (y <= -8.5e-223) {
tmp = t / b;
} else if (y <= -5.2e-275) {
tmp = a / -b;
} else if (y <= 7.5e-51) {
tmp = t / b;
} else if (y <= 1.5e+218) {
tmp = x;
} else {
tmp = x / -z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -7.4e-9: tmp = x elif y <= -8.5e-223: tmp = t / b elif y <= -5.2e-275: tmp = a / -b elif y <= 7.5e-51: tmp = t / b elif y <= 1.5e+218: tmp = x else: tmp = x / -z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -7.4e-9) tmp = x; elseif (y <= -8.5e-223) tmp = Float64(t / b); elseif (y <= -5.2e-275) tmp = Float64(a / Float64(-b)); elseif (y <= 7.5e-51) tmp = Float64(t / b); elseif (y <= 1.5e+218) tmp = x; else tmp = Float64(x / Float64(-z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -7.4e-9) tmp = x; elseif (y <= -8.5e-223) tmp = t / b; elseif (y <= -5.2e-275) tmp = a / -b; elseif (y <= 7.5e-51) tmp = t / b; elseif (y <= 1.5e+218) tmp = x; else tmp = x / -z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -7.4e-9], x, If[LessEqual[y, -8.5e-223], N[(t / b), $MachinePrecision], If[LessEqual[y, -5.2e-275], N[(a / (-b)), $MachinePrecision], If[LessEqual[y, 7.5e-51], N[(t / b), $MachinePrecision], If[LessEqual[y, 1.5e+218], x, N[(x / (-z)), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.4 \cdot 10^{-9}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -8.5 \cdot 10^{-223}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;y \leq -5.2 \cdot 10^{-275}:\\
\;\;\;\;\frac{a}{-b}\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{-51}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{+218}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-z}\\
\end{array}
\end{array}
if y < -7.4e-9 or 7.49999999999999976e-51 < y < 1.5e218Initial program 59.5%
Taylor expanded in z around 0 33.4%
if -7.4e-9 < y < -8.5000000000000003e-223 or -5.19999999999999985e-275 < y < 7.49999999999999976e-51Initial program 77.0%
Taylor expanded in t around inf 37.8%
*-commutative37.8%
Simplified37.8%
Taylor expanded in y around 0 43.8%
if -8.5000000000000003e-223 < y < -5.19999999999999985e-275Initial program 79.8%
Taylor expanded in t around 0 66.1%
+-commutative66.1%
mul-1-neg66.1%
unsub-neg66.1%
*-commutative66.1%
*-commutative66.1%
Simplified66.1%
Taylor expanded in y around 0 60.3%
associate-*r/60.3%
neg-mul-160.3%
Simplified60.3%
if 1.5e218 < y Initial program 19.7%
Taylor expanded in y around inf 73.3%
mul-1-neg73.3%
unsub-neg73.3%
Simplified73.3%
Taylor expanded in z around inf 58.6%
associate-*r/58.6%
mul-1-neg58.6%
Simplified58.6%
Final simplification40.1%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -3e-14)
(not
(or (<= z -8.5e-54) (and (not (<= z -5.7e-103)) (<= z 6.4e-21)))))
(/ (- t a) (- b y))
(- x (/ (* z a) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3e-14) || !((z <= -8.5e-54) || (!(z <= -5.7e-103) && (z <= 6.4e-21)))) {
tmp = (t - a) / (b - y);
} 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) :: tmp
if ((z <= (-3d-14)) .or. (.not. (z <= (-8.5d-54)) .or. (.not. (z <= (-5.7d-103))) .and. (z <= 6.4d-21))) then
tmp = (t - a) / (b - y)
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 tmp;
if ((z <= -3e-14) || !((z <= -8.5e-54) || (!(z <= -5.7e-103) && (z <= 6.4e-21)))) {
tmp = (t - a) / (b - y);
} else {
tmp = x - ((z * a) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3e-14) or not ((z <= -8.5e-54) or (not (z <= -5.7e-103) and (z <= 6.4e-21))): tmp = (t - a) / (b - y) else: tmp = x - ((z * a) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3e-14) || !((z <= -8.5e-54) || (!(z <= -5.7e-103) && (z <= 6.4e-21)))) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x - Float64(Float64(z * a) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -3e-14) || ~(((z <= -8.5e-54) || (~((z <= -5.7e-103)) && (z <= 6.4e-21))))) tmp = (t - a) / (b - y); else tmp = x - ((z * a) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3e-14], N[Not[Or[LessEqual[z, -8.5e-54], And[N[Not[LessEqual[z, -5.7e-103]], $MachinePrecision], LessEqual[z, 6.4e-21]]]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(z * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{-14} \lor \neg \left(z \leq -8.5 \cdot 10^{-54} \lor \neg \left(z \leq -5.7 \cdot 10^{-103}\right) \land z \leq 6.4 \cdot 10^{-21}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{z \cdot a}{y}\\
\end{array}
\end{array}
if z < -2.9999999999999998e-14 or -8.5e-54 < z < -5.6999999999999996e-103 or 6.4000000000000003e-21 < z Initial program 49.3%
Taylor expanded in z around inf 77.4%
if -2.9999999999999998e-14 < z < -8.5e-54 or -5.6999999999999996e-103 < z < 6.4000000000000003e-21Initial program 88.2%
Taylor expanded in b around inf 88.1%
*-commutative88.1%
Simplified88.1%
Taylor expanded in y around inf 85.5%
associate-/l*72.4%
Simplified72.4%
Taylor expanded in b around 0 74.8%
Taylor expanded in t around 0 60.6%
mul-1-neg60.6%
unsub-neg60.6%
Simplified60.6%
Final simplification70.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.9e+55) (not (<= z 3.1e+55))) (/ (- t a) (- b y)) (/ (+ (* z (- t a)) (* x y)) (- y (* z (- y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.9e+55) || !(z <= 3.1e+55)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((z * (t - a)) + (x * y)) / (y - (z * (y - b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-1.9d+55)) .or. (.not. (z <= 3.1d+55))) then
tmp = (t - a) / (b - y)
else
tmp = ((z * (t - a)) + (x * y)) / (y - (z * (y - b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.9e+55) || !(z <= 3.1e+55)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((z * (t - a)) + (x * y)) / (y - (z * (y - b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.9e+55) or not (z <= 3.1e+55): tmp = (t - a) / (b - y) else: tmp = ((z * (t - a)) + (x * y)) / (y - (z * (y - b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.9e+55) || !(z <= 3.1e+55)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(Float64(z * Float64(t - a)) + Float64(x * y)) / Float64(y - Float64(z * Float64(y - b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.9e+55) || ~((z <= 3.1e+55))) tmp = (t - a) / (b - y); else tmp = ((z * (t - a)) + (x * y)) / (y - (z * (y - b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.9e+55], N[Not[LessEqual[z, 3.1e+55]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(y - N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{+55} \lor \neg \left(z \leq 3.1 \cdot 10^{+55}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right) + x \cdot y}{y - z \cdot \left(y - b\right)}\\
\end{array}
\end{array}
if z < -1.9e55 or 3.09999999999999994e55 < z Initial program 38.7%
Taylor expanded in z around inf 85.3%
if -1.9e55 < z < 3.09999999999999994e55Initial program 85.0%
Final simplification85.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -60000000000000.0)
t_1
(if (<= y 4e-137)
(/ (- t a) b)
(if (<= y 4.8e-66)
(/ t (- b y))
(if (<= y 4e-47) (/ a (- y 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 <= -60000000000000.0) {
tmp = t_1;
} else if (y <= 4e-137) {
tmp = (t - a) / b;
} else if (y <= 4.8e-66) {
tmp = t / (b - y);
} else if (y <= 4e-47) {
tmp = a / (y - 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 <= (-60000000000000.0d0)) then
tmp = t_1
else if (y <= 4d-137) then
tmp = (t - a) / b
else if (y <= 4.8d-66) then
tmp = t / (b - y)
else if (y <= 4d-47) then
tmp = a / (y - 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 <= -60000000000000.0) {
tmp = t_1;
} else if (y <= 4e-137) {
tmp = (t - a) / b;
} else if (y <= 4.8e-66) {
tmp = t / (b - y);
} else if (y <= 4e-47) {
tmp = a / (y - 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 <= -60000000000000.0: tmp = t_1 elif y <= 4e-137: tmp = (t - a) / b elif y <= 4.8e-66: tmp = t / (b - y) elif y <= 4e-47: tmp = a / (y - 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 <= -60000000000000.0) tmp = t_1; elseif (y <= 4e-137) tmp = Float64(Float64(t - a) / b); elseif (y <= 4.8e-66) tmp = Float64(t / Float64(b - y)); elseif (y <= 4e-47) tmp = Float64(a / Float64(y - 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 <= -60000000000000.0) tmp = t_1; elseif (y <= 4e-137) tmp = (t - a) / b; elseif (y <= 4.8e-66) tmp = t / (b - y); elseif (y <= 4e-47) tmp = a / (y - 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, -60000000000000.0], t$95$1, If[LessEqual[y, 4e-137], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[y, 4.8e-66], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4e-47], N[(a / N[(y - b), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -60000000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4 \cdot 10^{-137}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{-66}:\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{elif}\;y \leq 4 \cdot 10^{-47}:\\
\;\;\;\;\frac{a}{y - b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -6e13 or 3.9999999999999999e-47 < y Initial program 55.2%
Taylor expanded in y around inf 48.4%
mul-1-neg48.4%
unsub-neg48.4%
Simplified48.4%
if -6e13 < y < 3.99999999999999991e-137Initial program 76.5%
Taylor expanded in y around 0 66.3%
if 3.99999999999999991e-137 < y < 4.80000000000000052e-66Initial program 77.3%
Taylor expanded in t around inf 44.5%
*-commutative44.5%
Simplified44.5%
Taylor expanded in z around inf 66.9%
if 4.80000000000000052e-66 < y < 3.9999999999999999e-47Initial program 99.5%
Taylor expanded in t around 0 99.5%
+-commutative99.5%
mul-1-neg99.5%
unsub-neg99.5%
*-commutative99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in z around inf 64.7%
associate-*r/64.7%
neg-mul-164.7%
Simplified64.7%
Final simplification57.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) b)) (t_2 (/ x (- 1.0 z))))
(if (<= y -7000000000000.0)
t_2
(if (<= y 4e-137)
t_1
(if (<= y 5.8e-94) (/ t (- b y)) (if (<= y 1.6e-45) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / b;
double t_2 = x / (1.0 - z);
double tmp;
if (y <= -7000000000000.0) {
tmp = t_2;
} else if (y <= 4e-137) {
tmp = t_1;
} else if (y <= 5.8e-94) {
tmp = t / (b - y);
} else if (y <= 1.6e-45) {
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 = (t - a) / b
t_2 = x / (1.0d0 - z)
if (y <= (-7000000000000.0d0)) then
tmp = t_2
else if (y <= 4d-137) then
tmp = t_1
else if (y <= 5.8d-94) then
tmp = t / (b - y)
else if (y <= 1.6d-45) 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 = (t - a) / b;
double t_2 = x / (1.0 - z);
double tmp;
if (y <= -7000000000000.0) {
tmp = t_2;
} else if (y <= 4e-137) {
tmp = t_1;
} else if (y <= 5.8e-94) {
tmp = t / (b - y);
} else if (y <= 1.6e-45) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / b t_2 = x / (1.0 - z) tmp = 0 if y <= -7000000000000.0: tmp = t_2 elif y <= 4e-137: tmp = t_1 elif y <= 5.8e-94: tmp = t / (b - y) elif y <= 1.6e-45: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / b) t_2 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -7000000000000.0) tmp = t_2; elseif (y <= 4e-137) tmp = t_1; elseif (y <= 5.8e-94) tmp = Float64(t / Float64(b - y)); elseif (y <= 1.6e-45) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / b; t_2 = x / (1.0 - z); tmp = 0.0; if (y <= -7000000000000.0) tmp = t_2; elseif (y <= 4e-137) tmp = t_1; elseif (y <= 5.8e-94) tmp = t / (b - y); elseif (y <= 1.6e-45) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7000000000000.0], t$95$2, If[LessEqual[y, 4e-137], t$95$1, If[LessEqual[y, 5.8e-94], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.6e-45], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b}\\
t_2 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -7000000000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 4 \cdot 10^{-137}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{-94}:\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{-45}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -7e12 or 1.60000000000000004e-45 < y Initial program 55.2%
Taylor expanded in y around inf 48.4%
mul-1-neg48.4%
unsub-neg48.4%
Simplified48.4%
if -7e12 < y < 3.99999999999999991e-137 or 5.79999999999999991e-94 < y < 1.60000000000000004e-45Initial program 75.8%
Taylor expanded in y around 0 64.8%
if 3.99999999999999991e-137 < y < 5.79999999999999991e-94Initial program 91.0%
Taylor expanded in t around inf 66.6%
*-commutative66.6%
Simplified66.6%
Taylor expanded in z around inf 75.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -1.55e-44)
t_1
(if (<= y -1.12e-221)
(/ t b)
(if (<= y -4.6e-275)
(/ a (- b))
(if (<= y 2.6e-54) (/ t (- b 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.55e-44) {
tmp = t_1;
} else if (y <= -1.12e-221) {
tmp = t / b;
} else if (y <= -4.6e-275) {
tmp = a / -b;
} else if (y <= 2.6e-54) {
tmp = t / (b - y);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (1.0d0 - z)
if (y <= (-1.55d-44)) then
tmp = t_1
else if (y <= (-1.12d-221)) then
tmp = t / b
else if (y <= (-4.6d-275)) then
tmp = a / -b
else if (y <= 2.6d-54) then
tmp = t / (b - y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -1.55e-44) {
tmp = t_1;
} else if (y <= -1.12e-221) {
tmp = t / b;
} else if (y <= -4.6e-275) {
tmp = a / -b;
} else if (y <= 2.6e-54) {
tmp = t / (b - 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.55e-44: tmp = t_1 elif y <= -1.12e-221: tmp = t / b elif y <= -4.6e-275: tmp = a / -b elif y <= 2.6e-54: tmp = t / (b - 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.55e-44) tmp = t_1; elseif (y <= -1.12e-221) tmp = Float64(t / b); elseif (y <= -4.6e-275) tmp = Float64(a / Float64(-b)); elseif (y <= 2.6e-54) tmp = Float64(t / Float64(b - 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.55e-44) tmp = t_1; elseif (y <= -1.12e-221) tmp = t / b; elseif (y <= -4.6e-275) tmp = a / -b; elseif (y <= 2.6e-54) tmp = t / (b - 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.55e-44], t$95$1, If[LessEqual[y, -1.12e-221], N[(t / b), $MachinePrecision], If[LessEqual[y, -4.6e-275], N[(a / (-b)), $MachinePrecision], If[LessEqual[y, 2.6e-54], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -1.55 \cdot 10^{-44}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.12 \cdot 10^{-221}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;y \leq -4.6 \cdot 10^{-275}:\\
\;\;\;\;\frac{a}{-b}\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{-54}:\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.54999999999999992e-44 or 2.60000000000000002e-54 < y Initial program 56.8%
Taylor expanded in y around inf 46.0%
mul-1-neg46.0%
unsub-neg46.0%
Simplified46.0%
if -1.54999999999999992e-44 < y < -1.12000000000000003e-221Initial program 70.3%
Taylor expanded in t around inf 37.5%
*-commutative37.5%
Simplified37.5%
Taylor expanded in y around 0 47.8%
if -1.12000000000000003e-221 < y < -4.59999999999999979e-275Initial program 79.8%
Taylor expanded in t around 0 66.1%
+-commutative66.1%
mul-1-neg66.1%
unsub-neg66.1%
*-commutative66.1%
*-commutative66.1%
Simplified66.1%
Taylor expanded in y around 0 60.3%
associate-*r/60.3%
neg-mul-160.3%
Simplified60.3%
if -4.59999999999999979e-275 < y < 2.60000000000000002e-54Initial program 82.2%
Taylor expanded in t around inf 39.8%
*-commutative39.8%
Simplified39.8%
Taylor expanded in z around inf 49.7%
Final simplification47.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ t (- b y))))
(if (<= z -2.1e-13)
t_1
(if (<= z 4.2e-94)
x
(if (<= z 3.2e-37) (/ t b) (if (<= z 2.85) (/ a (- 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 <= -2.1e-13) {
tmp = t_1;
} else if (z <= 4.2e-94) {
tmp = x;
} else if (z <= 3.2e-37) {
tmp = t / b;
} else if (z <= 2.85) {
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 = t / (b - y)
if (z <= (-2.1d-13)) then
tmp = t_1
else if (z <= 4.2d-94) then
tmp = x
else if (z <= 3.2d-37) then
tmp = t / b
else if (z <= 2.85d0) 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 = t / (b - y);
double tmp;
if (z <= -2.1e-13) {
tmp = t_1;
} else if (z <= 4.2e-94) {
tmp = x;
} else if (z <= 3.2e-37) {
tmp = t / b;
} else if (z <= 2.85) {
tmp = a / -b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t / (b - y) tmp = 0 if z <= -2.1e-13: tmp = t_1 elif z <= 4.2e-94: tmp = x elif z <= 3.2e-37: tmp = t / b elif z <= 2.85: tmp = a / -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 <= -2.1e-13) tmp = t_1; elseif (z <= 4.2e-94) tmp = x; elseif (z <= 3.2e-37) tmp = Float64(t / b); elseif (z <= 2.85) tmp = Float64(a / Float64(-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 <= -2.1e-13) tmp = t_1; elseif (z <= 4.2e-94) tmp = x; elseif (z <= 3.2e-37) tmp = t / b; elseif (z <= 2.85) tmp = a / -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, -2.1e-13], t$95$1, If[LessEqual[z, 4.2e-94], x, If[LessEqual[z, 3.2e-37], N[(t / b), $MachinePrecision], If[LessEqual[z, 2.85], N[(a / (-b)), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{b - y}\\
\mathbf{if}\;z \leq -2.1 \cdot 10^{-13}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-94}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{-37}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 2.85:\\
\;\;\;\;\frac{a}{-b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.09999999999999989e-13 or 2.85000000000000009 < z Initial program 45.8%
Taylor expanded in t around inf 24.2%
*-commutative24.2%
Simplified24.2%
Taylor expanded in z around inf 43.8%
if -2.09999999999999989e-13 < z < 4.2000000000000002e-94Initial program 87.1%
Taylor expanded in z around 0 44.7%
if 4.2000000000000002e-94 < z < 3.1999999999999999e-37Initial program 99.7%
Taylor expanded in t around inf 67.3%
*-commutative67.3%
Simplified67.3%
Taylor expanded in y around 0 43.6%
if 3.1999999999999999e-37 < z < 2.85000000000000009Initial program 80.8%
Taylor expanded in t around 0 73.8%
+-commutative73.8%
mul-1-neg73.8%
unsub-neg73.8%
*-commutative73.8%
*-commutative73.8%
Simplified73.8%
Taylor expanded in y around 0 43.5%
associate-*r/43.5%
neg-mul-143.5%
Simplified43.5%
Final simplification44.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -5.4e+29) (not (<= z 0.0035))) (/ (- t a) (- b y)) (/ (+ (* z (- t a)) (* x y)) (+ y (* z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5.4e+29) || !(z <= 0.0035)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((z * (t - a)) + (x * y)) / (y + (z * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-5.4d+29)) .or. (.not. (z <= 0.0035d0))) then
tmp = (t - a) / (b - y)
else
tmp = ((z * (t - a)) + (x * y)) / (y + (z * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5.4e+29) || !(z <= 0.0035)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((z * (t - a)) + (x * y)) / (y + (z * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -5.4e+29) or not (z <= 0.0035): tmp = (t - a) / (b - y) else: tmp = ((z * (t - a)) + (x * y)) / (y + (z * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -5.4e+29) || !(z <= 0.0035)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(Float64(z * Float64(t - a)) + Float64(x * y)) / Float64(y + Float64(z * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -5.4e+29) || ~((z <= 0.0035))) tmp = (t - a) / (b - y); else tmp = ((z * (t - a)) + (x * y)) / (y + (z * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -5.4e+29], N[Not[LessEqual[z, 0.0035]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.4 \cdot 10^{+29} \lor \neg \left(z \leq 0.0035\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right) + x \cdot y}{y + z \cdot b}\\
\end{array}
\end{array}
if z < -5.4e29 or 0.00350000000000000007 < z Initial program 43.7%
Taylor expanded in z around inf 81.7%
if -5.4e29 < z < 0.00350000000000000007Initial program 86.6%
Taylor expanded in b around inf 84.5%
*-commutative84.5%
Simplified84.5%
Final simplification83.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -1.75e-9)
x
(if (<= y -2.3e-223)
(/ t b)
(if (<= y -5.5e-275) (/ a (- b)) (if (<= y 3.9e-56) (/ t b) x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.75e-9) {
tmp = x;
} else if (y <= -2.3e-223) {
tmp = t / b;
} else if (y <= -5.5e-275) {
tmp = a / -b;
} else if (y <= 3.9e-56) {
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 <= (-1.75d-9)) then
tmp = x
else if (y <= (-2.3d-223)) then
tmp = t / b
else if (y <= (-5.5d-275)) then
tmp = a / -b
else if (y <= 3.9d-56) 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 <= -1.75e-9) {
tmp = x;
} else if (y <= -2.3e-223) {
tmp = t / b;
} else if (y <= -5.5e-275) {
tmp = a / -b;
} else if (y <= 3.9e-56) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.75e-9: tmp = x elif y <= -2.3e-223: tmp = t / b elif y <= -5.5e-275: tmp = a / -b elif y <= 3.9e-56: tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.75e-9) tmp = x; elseif (y <= -2.3e-223) tmp = Float64(t / b); elseif (y <= -5.5e-275) tmp = Float64(a / Float64(-b)); elseif (y <= 3.9e-56) 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 <= -1.75e-9) tmp = x; elseif (y <= -2.3e-223) tmp = t / b; elseif (y <= -5.5e-275) tmp = a / -b; elseif (y <= 3.9e-56) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.75e-9], x, If[LessEqual[y, -2.3e-223], N[(t / b), $MachinePrecision], If[LessEqual[y, -5.5e-275], N[(a / (-b)), $MachinePrecision], If[LessEqual[y, 3.9e-56], N[(t / b), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.75 \cdot 10^{-9}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -2.3 \cdot 10^{-223}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;y \leq -5.5 \cdot 10^{-275}:\\
\;\;\;\;\frac{a}{-b}\\
\mathbf{elif}\;y \leq 3.9 \cdot 10^{-56}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.75e-9 or 3.9e-56 < y Initial program 56.3%
Taylor expanded in z around 0 31.5%
if -1.75e-9 < y < -2.3e-223 or -5.49999999999999988e-275 < y < 3.9e-56Initial program 77.0%
Taylor expanded in t around inf 37.8%
*-commutative37.8%
Simplified37.8%
Taylor expanded in y around 0 43.8%
if -2.3e-223 < y < -5.49999999999999988e-275Initial program 79.8%
Taylor expanded in t around 0 66.1%
+-commutative66.1%
mul-1-neg66.1%
unsub-neg66.1%
*-commutative66.1%
*-commutative66.1%
Simplified66.1%
Taylor expanded in y around 0 60.3%
associate-*r/60.3%
neg-mul-160.3%
Simplified60.3%
Final simplification37.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3.6e-13) (not (<= z 6.7e-21))) (/ (- t a) (- b y)) (- x (/ (* z (- a t)) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.6e-13) || !(z <= 6.7e-21)) {
tmp = (t - a) / (b - y);
} else {
tmp = x - ((z * (a - 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) :: tmp
if ((z <= (-3.6d-13)) .or. (.not. (z <= 6.7d-21))) then
tmp = (t - a) / (b - y)
else
tmp = x - ((z * (a - 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 tmp;
if ((z <= -3.6e-13) || !(z <= 6.7e-21)) {
tmp = (t - a) / (b - y);
} else {
tmp = x - ((z * (a - t)) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.6e-13) or not (z <= 6.7e-21): tmp = (t - a) / (b - y) else: tmp = x - ((z * (a - t)) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.6e-13) || !(z <= 6.7e-21)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x - Float64(Float64(z * Float64(a - t)) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -3.6e-13) || ~((z <= 6.7e-21))) tmp = (t - a) / (b - y); else tmp = x - ((z * (a - t)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.6e-13], N[Not[LessEqual[z, 6.7e-21]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(z * N[(a - t), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.6 \cdot 10^{-13} \lor \neg \left(z \leq 6.7 \cdot 10^{-21}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{z \cdot \left(a - t\right)}{y}\\
\end{array}
\end{array}
if z < -3.5999999999999998e-13 or 6.6999999999999997e-21 < z Initial program 46.7%
Taylor expanded in z around inf 78.0%
if -3.5999999999999998e-13 < z < 6.6999999999999997e-21Initial program 88.2%
Taylor expanded in b around inf 88.1%
*-commutative88.1%
Simplified88.1%
Taylor expanded in y around inf 85.0%
associate-/l*72.1%
Simplified72.1%
Taylor expanded in b around 0 71.3%
Final simplification74.9%
(FPCore (x y z t a b) :precision binary64 (if (<= y -4.6e-9) x (if (<= y 1.9e-58) (/ t b) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -4.6e-9) {
tmp = x;
} else if (y <= 1.9e-58) {
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 <= (-4.6d-9)) then
tmp = x
else if (y <= 1.9d-58) 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 <= -4.6e-9) {
tmp = x;
} else if (y <= 1.9e-58) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -4.6e-9: tmp = x elif y <= 1.9e-58: tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -4.6e-9) tmp = x; elseif (y <= 1.9e-58) 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 <= -4.6e-9) tmp = x; elseif (y <= 1.9e-58) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -4.6e-9], x, If[LessEqual[y, 1.9e-58], N[(t / b), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.6 \cdot 10^{-9}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{-58}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -4.5999999999999998e-9 or 1.8999999999999999e-58 < y Initial program 56.3%
Taylor expanded in z around 0 31.5%
if -4.5999999999999998e-9 < y < 1.8999999999999999e-58Initial program 77.3%
Taylor expanded in t around inf 35.5%
*-commutative35.5%
Simplified35.5%
Taylor expanded in y around 0 40.6%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 66.0%
Taylor expanded in z around 0 21.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 2024085
(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)))))