
(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 19 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 (if (or (<= z -1700000.0) (not (<= z 1.45e+15))) (+ (/ (* (/ y (- b y)) x) z) (/ (- t a) (- b y))) (/ (+ (* z (- t a)) (* y x)) (+ y (* z (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1700000.0) || !(z <= 1.45e+15)) {
tmp = (((y / (b - y)) * x) / z) + ((t - a) / (b - y));
} else {
tmp = ((z * (t - a)) + (y * x)) / (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 <= (-1700000.0d0)) .or. (.not. (z <= 1.45d+15))) then
tmp = (((y / (b - y)) * x) / z) + ((t - a) / (b - y))
else
tmp = ((z * (t - a)) + (y * x)) / (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 <= -1700000.0) || !(z <= 1.45e+15)) {
tmp = (((y / (b - y)) * x) / z) + ((t - a) / (b - y));
} else {
tmp = ((z * (t - a)) + (y * x)) / (y + (z * (b - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1700000.0) or not (z <= 1.45e+15): tmp = (((y / (b - y)) * x) / z) + ((t - a) / (b - y)) else: tmp = ((z * (t - a)) + (y * x)) / (y + (z * (b - y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1700000.0) || !(z <= 1.45e+15)) tmp = Float64(Float64(Float64(Float64(y / Float64(b - y)) * x) / z) + Float64(Float64(t - a) / Float64(b - y))); else tmp = Float64(Float64(Float64(z * Float64(t - a)) + Float64(y * x)) / 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 <= -1700000.0) || ~((z <= 1.45e+15))) tmp = (((y / (b - y)) * x) / z) + ((t - a) / (b - y)); else tmp = ((z * (t - a)) + (y * x)) / (y + (z * (b - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1700000.0], N[Not[LessEqual[z, 1.45e+15]], $MachinePrecision]], N[(N[(N[(N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] / z), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1700000 \lor \neg \left(z \leq 1.45 \cdot 10^{+15}\right):\\
\;\;\;\;\frac{\frac{y}{b - y} \cdot x}{z} + \frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -1.7e6 or 1.45e15 < z Initial program 48.6%
Taylor expanded in z around -inf 67.7%
+-commutative67.7%
associate--l+67.7%
Simplified89.8%
Taylor expanded in x around inf 80.7%
times-frac98.6%
Simplified98.6%
associate-*r/98.6%
Applied egg-rr98.6%
if -1.7e6 < z < 1.45e15Initial program 89.5%
Final simplification94.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ (- t a) (- b y)) (* (/ y (- b y)) (/ x z))))
(t_2 (+ y (* z (- b y))))
(t_3 (/ (+ (* y x) (* z t)) t_2)))
(if (<= z -0.35)
t_1
(if (<= z -1.6e-284)
t_3
(if (<= z 9e-267)
(/ (- (* y x) (* z a)) t_2)
(if (<= z 5.6e-83)
t_3
(if (<= z 1.35e-29)
(/ (* z (- t a)) t_2)
(if (<= z 1.1e-22) (/ (* y x) t_2) t_1))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t - a) / (b - y)) + ((y / (b - y)) * (x / z));
double t_2 = y + (z * (b - y));
double t_3 = ((y * x) + (z * t)) / t_2;
double tmp;
if (z <= -0.35) {
tmp = t_1;
} else if (z <= -1.6e-284) {
tmp = t_3;
} else if (z <= 9e-267) {
tmp = ((y * x) - (z * a)) / t_2;
} else if (z <= 5.6e-83) {
tmp = t_3;
} else if (z <= 1.35e-29) {
tmp = (z * (t - a)) / t_2;
} else if (z <= 1.1e-22) {
tmp = (y * x) / t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = ((t - a) / (b - y)) + ((y / (b - y)) * (x / z))
t_2 = y + (z * (b - y))
t_3 = ((y * x) + (z * t)) / t_2
if (z <= (-0.35d0)) then
tmp = t_1
else if (z <= (-1.6d-284)) then
tmp = t_3
else if (z <= 9d-267) then
tmp = ((y * x) - (z * a)) / t_2
else if (z <= 5.6d-83) then
tmp = t_3
else if (z <= 1.35d-29) then
tmp = (z * (t - a)) / t_2
else if (z <= 1.1d-22) then
tmp = (y * x) / t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t - a) / (b - y)) + ((y / (b - y)) * (x / z));
double t_2 = y + (z * (b - y));
double t_3 = ((y * x) + (z * t)) / t_2;
double tmp;
if (z <= -0.35) {
tmp = t_1;
} else if (z <= -1.6e-284) {
tmp = t_3;
} else if (z <= 9e-267) {
tmp = ((y * x) - (z * a)) / t_2;
} else if (z <= 5.6e-83) {
tmp = t_3;
} else if (z <= 1.35e-29) {
tmp = (z * (t - a)) / t_2;
} else if (z <= 1.1e-22) {
tmp = (y * x) / t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((t - a) / (b - y)) + ((y / (b - y)) * (x / z)) t_2 = y + (z * (b - y)) t_3 = ((y * x) + (z * t)) / t_2 tmp = 0 if z <= -0.35: tmp = t_1 elif z <= -1.6e-284: tmp = t_3 elif z <= 9e-267: tmp = ((y * x) - (z * a)) / t_2 elif z <= 5.6e-83: tmp = t_3 elif z <= 1.35e-29: tmp = (z * (t - a)) / t_2 elif z <= 1.1e-22: tmp = (y * x) / t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(t - a) / Float64(b - y)) + Float64(Float64(y / Float64(b - y)) * Float64(x / z))) t_2 = Float64(y + Float64(z * Float64(b - y))) t_3 = Float64(Float64(Float64(y * x) + Float64(z * t)) / t_2) tmp = 0.0 if (z <= -0.35) tmp = t_1; elseif (z <= -1.6e-284) tmp = t_3; elseif (z <= 9e-267) tmp = Float64(Float64(Float64(y * x) - Float64(z * a)) / t_2); elseif (z <= 5.6e-83) tmp = t_3; elseif (z <= 1.35e-29) tmp = Float64(Float64(z * Float64(t - a)) / t_2); elseif (z <= 1.1e-22) tmp = Float64(Float64(y * x) / t_2); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((t - a) / (b - y)) + ((y / (b - y)) * (x / z)); t_2 = y + (z * (b - y)); t_3 = ((y * x) + (z * t)) / t_2; tmp = 0.0; if (z <= -0.35) tmp = t_1; elseif (z <= -1.6e-284) tmp = t_3; elseif (z <= 9e-267) tmp = ((y * x) - (z * a)) / t_2; elseif (z <= 5.6e-83) tmp = t_3; elseif (z <= 1.35e-29) tmp = (z * (t - a)) / t_2; elseif (z <= 1.1e-22) tmp = (y * x) / t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(y * x), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]}, If[LessEqual[z, -0.35], t$95$1, If[LessEqual[z, -1.6e-284], t$95$3, If[LessEqual[z, 9e-267], N[(N[(N[(y * x), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[z, 5.6e-83], t$95$3, If[LessEqual[z, 1.35e-29], N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[z, 1.1e-22], N[(N[(y * x), $MachinePrecision] / t$95$2), $MachinePrecision], t$95$1]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y} + \frac{y}{b - y} \cdot \frac{x}{z}\\
t_2 := y + z \cdot \left(b - y\right)\\
t_3 := \frac{y \cdot x + z \cdot t}{t_2}\\
\mathbf{if}\;z \leq -0.35:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.6 \cdot 10^{-284}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq 9 \cdot 10^{-267}:\\
\;\;\;\;\frac{y \cdot x - z \cdot a}{t_2}\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{-83}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{-29}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right)}{t_2}\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{-22}:\\
\;\;\;\;\frac{y \cdot x}{t_2}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -0.34999999999999998 or 1.1e-22 < z Initial program 50.2%
Taylor expanded in z around -inf 68.7%
+-commutative68.7%
associate--l+68.7%
Simplified90.1%
Taylor expanded in x around inf 81.3%
times-frac98.6%
Simplified98.6%
if -0.34999999999999998 < z < -1.60000000000000012e-284 or 8.9999999999999999e-267 < z < 5.6000000000000002e-83Initial program 90.2%
Taylor expanded in a around 0 75.1%
if -1.60000000000000012e-284 < z < 8.9999999999999999e-267Initial program 86.0%
Taylor expanded in t around 0 79.6%
*-commutative79.6%
mul-1-neg79.6%
unsub-neg79.6%
*-commutative79.6%
Simplified79.6%
if 5.6000000000000002e-83 < z < 1.35000000000000011e-29Initial program 90.8%
Taylor expanded in x around 0 82.0%
if 1.35000000000000011e-29 < z < 1.1e-22Initial program 76.5%
Taylor expanded in x around inf 76.5%
Final simplification87.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ (* (/ y (- b y)) x) z) (/ (- t a) (- b y))))
(t_2 (+ y (* z (- b y))))
(t_3 (/ (+ (* y x) (* z t)) t_2)))
(if (<= z -2.8e-5)
t_1
(if (<= z -1.6e-284)
t_3
(if (<= z 7.2e-267)
(/ (- (* y x) (* z a)) t_2)
(if (<= z 8.5e-82)
t_3
(if (<= z 6e-27)
(/ (* z (- t a)) t_2)
(if (<= z 1.5e-22) (/ (* y x) t_2) t_1))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (((y / (b - y)) * x) / z) + ((t - a) / (b - y));
double t_2 = y + (z * (b - y));
double t_3 = ((y * x) + (z * t)) / t_2;
double tmp;
if (z <= -2.8e-5) {
tmp = t_1;
} else if (z <= -1.6e-284) {
tmp = t_3;
} else if (z <= 7.2e-267) {
tmp = ((y * x) - (z * a)) / t_2;
} else if (z <= 8.5e-82) {
tmp = t_3;
} else if (z <= 6e-27) {
tmp = (z * (t - a)) / t_2;
} else if (z <= 1.5e-22) {
tmp = (y * x) / t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (((y / (b - y)) * x) / z) + ((t - a) / (b - y))
t_2 = y + (z * (b - y))
t_3 = ((y * x) + (z * t)) / t_2
if (z <= (-2.8d-5)) then
tmp = t_1
else if (z <= (-1.6d-284)) then
tmp = t_3
else if (z <= 7.2d-267) then
tmp = ((y * x) - (z * a)) / t_2
else if (z <= 8.5d-82) then
tmp = t_3
else if (z <= 6d-27) then
tmp = (z * (t - a)) / t_2
else if (z <= 1.5d-22) then
tmp = (y * x) / t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (((y / (b - y)) * x) / z) + ((t - a) / (b - y));
double t_2 = y + (z * (b - y));
double t_3 = ((y * x) + (z * t)) / t_2;
double tmp;
if (z <= -2.8e-5) {
tmp = t_1;
} else if (z <= -1.6e-284) {
tmp = t_3;
} else if (z <= 7.2e-267) {
tmp = ((y * x) - (z * a)) / t_2;
} else if (z <= 8.5e-82) {
tmp = t_3;
} else if (z <= 6e-27) {
tmp = (z * (t - a)) / t_2;
} else if (z <= 1.5e-22) {
tmp = (y * x) / t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (((y / (b - y)) * x) / z) + ((t - a) / (b - y)) t_2 = y + (z * (b - y)) t_3 = ((y * x) + (z * t)) / t_2 tmp = 0 if z <= -2.8e-5: tmp = t_1 elif z <= -1.6e-284: tmp = t_3 elif z <= 7.2e-267: tmp = ((y * x) - (z * a)) / t_2 elif z <= 8.5e-82: tmp = t_3 elif z <= 6e-27: tmp = (z * (t - a)) / t_2 elif z <= 1.5e-22: tmp = (y * x) / t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(Float64(y / Float64(b - y)) * x) / z) + Float64(Float64(t - a) / Float64(b - y))) t_2 = Float64(y + Float64(z * Float64(b - y))) t_3 = Float64(Float64(Float64(y * x) + Float64(z * t)) / t_2) tmp = 0.0 if (z <= -2.8e-5) tmp = t_1; elseif (z <= -1.6e-284) tmp = t_3; elseif (z <= 7.2e-267) tmp = Float64(Float64(Float64(y * x) - Float64(z * a)) / t_2); elseif (z <= 8.5e-82) tmp = t_3; elseif (z <= 6e-27) tmp = Float64(Float64(z * Float64(t - a)) / t_2); elseif (z <= 1.5e-22) tmp = Float64(Float64(y * x) / t_2); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (((y / (b - y)) * x) / z) + ((t - a) / (b - y)); t_2 = y + (z * (b - y)); t_3 = ((y * x) + (z * t)) / t_2; tmp = 0.0; if (z <= -2.8e-5) tmp = t_1; elseif (z <= -1.6e-284) tmp = t_3; elseif (z <= 7.2e-267) tmp = ((y * x) - (z * a)) / t_2; elseif (z <= 8.5e-82) tmp = t_3; elseif (z <= 6e-27) tmp = (z * (t - a)) / t_2; elseif (z <= 1.5e-22) tmp = (y * x) / t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] / z), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(y * x), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]}, If[LessEqual[z, -2.8e-5], t$95$1, If[LessEqual[z, -1.6e-284], t$95$3, If[LessEqual[z, 7.2e-267], N[(N[(N[(y * x), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[z, 8.5e-82], t$95$3, If[LessEqual[z, 6e-27], N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[z, 1.5e-22], N[(N[(y * x), $MachinePrecision] / t$95$2), $MachinePrecision], t$95$1]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{y}{b - y} \cdot x}{z} + \frac{t - a}{b - y}\\
t_2 := y + z \cdot \left(b - y\right)\\
t_3 := \frac{y \cdot x + z \cdot t}{t_2}\\
\mathbf{if}\;z \leq -2.8 \cdot 10^{-5}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.6 \cdot 10^{-284}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{-267}:\\
\;\;\;\;\frac{y \cdot x - z \cdot a}{t_2}\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-82}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-27}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right)}{t_2}\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{-22}:\\
\;\;\;\;\frac{y \cdot x}{t_2}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -2.79999999999999996e-5 or 1.5e-22 < z Initial program 50.2%
Taylor expanded in z around -inf 68.7%
+-commutative68.7%
associate--l+68.7%
Simplified90.1%
Taylor expanded in x around inf 81.3%
times-frac98.6%
Simplified98.6%
associate-*r/98.6%
Applied egg-rr98.6%
if -2.79999999999999996e-5 < z < -1.60000000000000012e-284 or 7.2000000000000002e-267 < z < 8.4999999999999997e-82Initial program 90.2%
Taylor expanded in a around 0 75.1%
if -1.60000000000000012e-284 < z < 7.2000000000000002e-267Initial program 86.0%
Taylor expanded in t around 0 79.6%
*-commutative79.6%
mul-1-neg79.6%
unsub-neg79.6%
*-commutative79.6%
Simplified79.6%
if 8.4999999999999997e-82 < z < 6.0000000000000002e-27Initial program 90.8%
Taylor expanded in x around 0 82.0%
if 6.0000000000000002e-27 < z < 1.5e-22Initial program 76.5%
Taylor expanded in x around inf 76.5%
Final simplification87.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2 (/ x (- 1.0 z)))
(t_3 (/ (- t a) (- b y))))
(if (<= y -3.05e+122)
t_2
(if (<= y -5e-6)
(/ (+ (* y x) (* z t)) t_1)
(if (<= y 5.9e+62)
(+ t_3 (/ (/ y (/ b x)) z))
(if (<= y 1e+219)
(/ (- (* y x) (* z a)) t_1)
(if (<= y 3.3e+255) t_3 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = x / (1.0 - z);
double t_3 = (t - a) / (b - y);
double tmp;
if (y <= -3.05e+122) {
tmp = t_2;
} else if (y <= -5e-6) {
tmp = ((y * x) + (z * t)) / t_1;
} else if (y <= 5.9e+62) {
tmp = t_3 + ((y / (b / x)) / z);
} else if (y <= 1e+219) {
tmp = ((y * x) - (z * a)) / t_1;
} else if (y <= 3.3e+255) {
tmp = t_3;
} 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) :: t_3
real(8) :: tmp
t_1 = y + (z * (b - y))
t_2 = x / (1.0d0 - z)
t_3 = (t - a) / (b - y)
if (y <= (-3.05d+122)) then
tmp = t_2
else if (y <= (-5d-6)) then
tmp = ((y * x) + (z * t)) / t_1
else if (y <= 5.9d+62) then
tmp = t_3 + ((y / (b / x)) / z)
else if (y <= 1d+219) then
tmp = ((y * x) - (z * a)) / t_1
else if (y <= 3.3d+255) then
tmp = t_3
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 = y + (z * (b - y));
double t_2 = x / (1.0 - z);
double t_3 = (t - a) / (b - y);
double tmp;
if (y <= -3.05e+122) {
tmp = t_2;
} else if (y <= -5e-6) {
tmp = ((y * x) + (z * t)) / t_1;
} else if (y <= 5.9e+62) {
tmp = t_3 + ((y / (b / x)) / z);
} else if (y <= 1e+219) {
tmp = ((y * x) - (z * a)) / t_1;
} else if (y <= 3.3e+255) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = x / (1.0 - z) t_3 = (t - a) / (b - y) tmp = 0 if y <= -3.05e+122: tmp = t_2 elif y <= -5e-6: tmp = ((y * x) + (z * t)) / t_1 elif y <= 5.9e+62: tmp = t_3 + ((y / (b / x)) / z) elif y <= 1e+219: tmp = ((y * x) - (z * a)) / t_1 elif y <= 3.3e+255: tmp = t_3 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(x / Float64(1.0 - z)) t_3 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (y <= -3.05e+122) tmp = t_2; elseif (y <= -5e-6) tmp = Float64(Float64(Float64(y * x) + Float64(z * t)) / t_1); elseif (y <= 5.9e+62) tmp = Float64(t_3 + Float64(Float64(y / Float64(b / x)) / z)); elseif (y <= 1e+219) tmp = Float64(Float64(Float64(y * x) - Float64(z * a)) / t_1); elseif (y <= 3.3e+255) tmp = t_3; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = x / (1.0 - z); t_3 = (t - a) / (b - y); tmp = 0.0; if (y <= -3.05e+122) tmp = t_2; elseif (y <= -5e-6) tmp = ((y * x) + (z * t)) / t_1; elseif (y <= 5.9e+62) tmp = t_3 + ((y / (b / x)) / z); elseif (y <= 1e+219) tmp = ((y * x) - (z * a)) / t_1; elseif (y <= 3.3e+255) tmp = t_3; else tmp = t_2; 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[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.05e+122], t$95$2, If[LessEqual[y, -5e-6], N[(N[(N[(y * x), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[y, 5.9e+62], N[(t$95$3 + N[(N[(y / N[(b / x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1e+219], N[(N[(N[(y * x), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[y, 3.3e+255], t$95$3, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \frac{x}{1 - z}\\
t_3 := \frac{t - a}{b - y}\\
\mathbf{if}\;y \leq -3.05 \cdot 10^{+122}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -5 \cdot 10^{-6}:\\
\;\;\;\;\frac{y \cdot x + z \cdot t}{t_1}\\
\mathbf{elif}\;y \leq 5.9 \cdot 10^{+62}:\\
\;\;\;\;t_3 + \frac{\frac{y}{\frac{b}{x}}}{z}\\
\mathbf{elif}\;y \leq 10^{+219}:\\
\;\;\;\;\frac{y \cdot x - z \cdot a}{t_1}\\
\mathbf{elif}\;y \leq 3.3 \cdot 10^{+255}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -3.0499999999999999e122 or 3.29999999999999982e255 < y Initial program 29.7%
Taylor expanded in y around inf 70.3%
+-commutative70.3%
mul-1-neg70.3%
unsub-neg70.3%
Simplified70.3%
if -3.0499999999999999e122 < y < -5.00000000000000041e-6Initial program 82.5%
Taylor expanded in a around 0 76.1%
if -5.00000000000000041e-6 < y < 5.9000000000000003e62Initial program 78.5%
Taylor expanded in z around -inf 68.5%
+-commutative68.5%
associate--l+68.5%
Simplified68.6%
Taylor expanded in x around inf 76.2%
times-frac71.5%
Simplified71.5%
associate-*r/75.0%
Applied egg-rr75.0%
Taylor expanded in y around 0 75.2%
associate-/l*72.4%
Simplified72.4%
if 5.9000000000000003e62 < y < 9.99999999999999965e218Initial program 78.5%
Taylor expanded in t around 0 69.8%
*-commutative69.8%
mul-1-neg69.8%
unsub-neg69.8%
*-commutative69.8%
Simplified69.8%
if 9.99999999999999965e218 < y < 3.29999999999999982e255Initial program 29.4%
Taylor expanded in z around inf 86.1%
Final simplification72.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -1.65e+117)
t_1
(if (<= y -3.4e-6)
(/ (+ (* y x) (* z t)) (+ y (* z (- b y))))
(if (<= y 1.4e+79) (+ (/ (- t a) (- b y)) (/ (/ y (/ b x)) z)) 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.65e+117) {
tmp = t_1;
} else if (y <= -3.4e-6) {
tmp = ((y * x) + (z * t)) / (y + (z * (b - y)));
} else if (y <= 1.4e+79) {
tmp = ((t - a) / (b - y)) + ((y / (b / 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 = x / (1.0d0 - z)
if (y <= (-1.65d+117)) then
tmp = t_1
else if (y <= (-3.4d-6)) then
tmp = ((y * x) + (z * t)) / (y + (z * (b - y)))
else if (y <= 1.4d+79) then
tmp = ((t - a) / (b - y)) + ((y / (b / 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 = x / (1.0 - z);
double tmp;
if (y <= -1.65e+117) {
tmp = t_1;
} else if (y <= -3.4e-6) {
tmp = ((y * x) + (z * t)) / (y + (z * (b - y)));
} else if (y <= 1.4e+79) {
tmp = ((t - a) / (b - y)) + ((y / (b / x)) / z);
} 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.65e+117: tmp = t_1 elif y <= -3.4e-6: tmp = ((y * x) + (z * t)) / (y + (z * (b - y))) elif y <= 1.4e+79: tmp = ((t - a) / (b - y)) + ((y / (b / x)) / z) 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.65e+117) tmp = t_1; elseif (y <= -3.4e-6) tmp = Float64(Float64(Float64(y * x) + Float64(z * t)) / Float64(y + Float64(z * Float64(b - y)))); elseif (y <= 1.4e+79) tmp = Float64(Float64(Float64(t - a) / Float64(b - y)) + Float64(Float64(y / Float64(b / x)) / z)); 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.65e+117) tmp = t_1; elseif (y <= -3.4e-6) tmp = ((y * x) + (z * t)) / (y + (z * (b - y))); elseif (y <= 1.4e+79) tmp = ((t - a) / (b - y)) + ((y / (b / x)) / z); 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.65e+117], t$95$1, If[LessEqual[y, -3.4e-6], N[(N[(N[(y * x), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.4e+79], N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(y / N[(b / x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -1.65 \cdot 10^{+117}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -3.4 \cdot 10^{-6}:\\
\;\;\;\;\frac{y \cdot x + z \cdot t}{y + z \cdot \left(b - y\right)}\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{+79}:\\
\;\;\;\;\frac{t - a}{b - y} + \frac{\frac{y}{\frac{b}{x}}}{z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -1.6499999999999999e117 or 1.4000000000000001e79 < y Initial program 46.8%
Taylor expanded in y around inf 62.8%
+-commutative62.8%
mul-1-neg62.8%
unsub-neg62.8%
Simplified62.8%
if -1.6499999999999999e117 < y < -3.40000000000000006e-6Initial program 82.5%
Taylor expanded in a around 0 76.1%
if -3.40000000000000006e-6 < y < 1.4000000000000001e79Initial program 78.9%
Taylor expanded in z around -inf 68.5%
+-commutative68.5%
associate--l+68.5%
Simplified68.6%
Taylor expanded in x around inf 76.0%
times-frac71.4%
Simplified71.4%
associate-*r/74.8%
Applied egg-rr74.8%
Taylor expanded in y around 0 75.0%
associate-/l*72.3%
Simplified72.3%
Final simplification69.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ t (- b y))) (t_2 (/ (- a) b)) (t_3 (/ x (- 1.0 z))))
(if (<= y -2.4e-6)
t_3
(if (<= y -2.7e-216)
t_1
(if (<= y -8.3e-286)
t_2
(if (<= y 1.35e-233)
(/ t b)
(if (<= y 1.4e-29)
t_2
(if (<= y 8.7e+64) t_1 (if (<= y 6.8e+68) t_2 t_3)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t / (b - y);
double t_2 = -a / b;
double t_3 = x / (1.0 - z);
double tmp;
if (y <= -2.4e-6) {
tmp = t_3;
} else if (y <= -2.7e-216) {
tmp = t_1;
} else if (y <= -8.3e-286) {
tmp = t_2;
} else if (y <= 1.35e-233) {
tmp = t / b;
} else if (y <= 1.4e-29) {
tmp = t_2;
} else if (y <= 8.7e+64) {
tmp = t_1;
} else if (y <= 6.8e+68) {
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 = t / (b - y)
t_2 = -a / b
t_3 = x / (1.0d0 - z)
if (y <= (-2.4d-6)) then
tmp = t_3
else if (y <= (-2.7d-216)) then
tmp = t_1
else if (y <= (-8.3d-286)) then
tmp = t_2
else if (y <= 1.35d-233) then
tmp = t / b
else if (y <= 1.4d-29) then
tmp = t_2
else if (y <= 8.7d+64) then
tmp = t_1
else if (y <= 6.8d+68) 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 = t / (b - y);
double t_2 = -a / b;
double t_3 = x / (1.0 - z);
double tmp;
if (y <= -2.4e-6) {
tmp = t_3;
} else if (y <= -2.7e-216) {
tmp = t_1;
} else if (y <= -8.3e-286) {
tmp = t_2;
} else if (y <= 1.35e-233) {
tmp = t / b;
} else if (y <= 1.4e-29) {
tmp = t_2;
} else if (y <= 8.7e+64) {
tmp = t_1;
} else if (y <= 6.8e+68) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t / (b - y) t_2 = -a / b t_3 = x / (1.0 - z) tmp = 0 if y <= -2.4e-6: tmp = t_3 elif y <= -2.7e-216: tmp = t_1 elif y <= -8.3e-286: tmp = t_2 elif y <= 1.35e-233: tmp = t / b elif y <= 1.4e-29: tmp = t_2 elif y <= 8.7e+64: tmp = t_1 elif y <= 6.8e+68: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t / Float64(b - y)) t_2 = Float64(Float64(-a) / b) t_3 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -2.4e-6) tmp = t_3; elseif (y <= -2.7e-216) tmp = t_1; elseif (y <= -8.3e-286) tmp = t_2; elseif (y <= 1.35e-233) tmp = Float64(t / b); elseif (y <= 1.4e-29) tmp = t_2; elseif (y <= 8.7e+64) tmp = t_1; elseif (y <= 6.8e+68) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t / (b - y); t_2 = -a / b; t_3 = x / (1.0 - z); tmp = 0.0; if (y <= -2.4e-6) tmp = t_3; elseif (y <= -2.7e-216) tmp = t_1; elseif (y <= -8.3e-286) tmp = t_2; elseif (y <= 1.35e-233) tmp = t / b; elseif (y <= 1.4e-29) tmp = t_2; elseif (y <= 8.7e+64) tmp = t_1; elseif (y <= 6.8e+68) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[((-a) / b), $MachinePrecision]}, Block[{t$95$3 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.4e-6], t$95$3, If[LessEqual[y, -2.7e-216], t$95$1, If[LessEqual[y, -8.3e-286], t$95$2, If[LessEqual[y, 1.35e-233], N[(t / b), $MachinePrecision], If[LessEqual[y, 1.4e-29], t$95$2, If[LessEqual[y, 8.7e+64], t$95$1, If[LessEqual[y, 6.8e+68], t$95$2, t$95$3]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{b - y}\\
t_2 := \frac{-a}{b}\\
t_3 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -2.4 \cdot 10^{-6}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y \leq -2.7 \cdot 10^{-216}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -8.3 \cdot 10^{-286}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{-233}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{-29}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 8.7 \cdot 10^{+64}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{+68}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if y < -2.3999999999999999e-6 or 6.8000000000000003e68 < y Initial program 55.6%
Taylor expanded in y around inf 60.9%
+-commutative60.9%
mul-1-neg60.9%
unsub-neg60.9%
Simplified60.9%
if -2.3999999999999999e-6 < y < -2.6999999999999999e-216 or 1.4000000000000001e-29 < y < 8.70000000000000038e64Initial program 74.0%
Taylor expanded in z around -inf 66.6%
+-commutative66.6%
associate--l+66.6%
Simplified68.1%
Taylor expanded in x around inf 69.8%
times-frac65.1%
Simplified65.1%
Taylor expanded in t around inf 41.8%
if -2.6999999999999999e-216 < y < -8.30000000000000022e-286 or 1.35e-233 < y < 1.4000000000000001e-29 or 8.70000000000000038e64 < y < 6.8000000000000003e68Initial program 79.3%
Taylor expanded in b around inf 49.0%
Taylor expanded in a around inf 52.1%
associate-*r/52.1%
mul-1-neg52.1%
Simplified52.1%
if -8.30000000000000022e-286 < y < 1.35e-233Initial program 92.4%
Taylor expanded in b around inf 85.3%
Taylor expanded in t around inf 53.8%
Final simplification53.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))) (t_2 (/ x (- 1.0 z))))
(if (<= y -16.5)
t_2
(if (<= y -1.45e-207)
(+ t_1 (* (/ y z) (/ x b)))
(if (<= y 2.05e-160)
(/ (- (+ t (/ (* y x) z)) a) b)
(if (or (<= y 1.25e+75) (and (not (<= y 8e+220)) (<= y 3.3e+255)))
t_1
t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double t_2 = x / (1.0 - z);
double tmp;
if (y <= -16.5) {
tmp = t_2;
} else if (y <= -1.45e-207) {
tmp = t_1 + ((y / z) * (x / b));
} else if (y <= 2.05e-160) {
tmp = ((t + ((y * x) / z)) - a) / b;
} else if ((y <= 1.25e+75) || (!(y <= 8e+220) && (y <= 3.3e+255))) {
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 - y)
t_2 = x / (1.0d0 - z)
if (y <= (-16.5d0)) then
tmp = t_2
else if (y <= (-1.45d-207)) then
tmp = t_1 + ((y / z) * (x / b))
else if (y <= 2.05d-160) then
tmp = ((t + ((y * x) / z)) - a) / b
else if ((y <= 1.25d+75) .or. (.not. (y <= 8d+220)) .and. (y <= 3.3d+255)) 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 - y);
double t_2 = x / (1.0 - z);
double tmp;
if (y <= -16.5) {
tmp = t_2;
} else if (y <= -1.45e-207) {
tmp = t_1 + ((y / z) * (x / b));
} else if (y <= 2.05e-160) {
tmp = ((t + ((y * x) / z)) - a) / b;
} else if ((y <= 1.25e+75) || (!(y <= 8e+220) && (y <= 3.3e+255))) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) t_2 = x / (1.0 - z) tmp = 0 if y <= -16.5: tmp = t_2 elif y <= -1.45e-207: tmp = t_1 + ((y / z) * (x / b)) elif y <= 2.05e-160: tmp = ((t + ((y * x) / z)) - a) / b elif (y <= 1.25e+75) or (not (y <= 8e+220) and (y <= 3.3e+255)): tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) t_2 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -16.5) tmp = t_2; elseif (y <= -1.45e-207) tmp = Float64(t_1 + Float64(Float64(y / z) * Float64(x / b))); elseif (y <= 2.05e-160) tmp = Float64(Float64(Float64(t + Float64(Float64(y * x) / z)) - a) / b); elseif ((y <= 1.25e+75) || (!(y <= 8e+220) && (y <= 3.3e+255))) 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 - y); t_2 = x / (1.0 - z); tmp = 0.0; if (y <= -16.5) tmp = t_2; elseif (y <= -1.45e-207) tmp = t_1 + ((y / z) * (x / b)); elseif (y <= 2.05e-160) tmp = ((t + ((y * x) / z)) - a) / b; elseif ((y <= 1.25e+75) || (~((y <= 8e+220)) && (y <= 3.3e+255))) 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] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -16.5], t$95$2, If[LessEqual[y, -1.45e-207], N[(t$95$1 + N[(N[(y / z), $MachinePrecision] * N[(x / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.05e-160], N[(N[(N[(t + N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision] / b), $MachinePrecision], If[Or[LessEqual[y, 1.25e+75], And[N[Not[LessEqual[y, 8e+220]], $MachinePrecision], LessEqual[y, 3.3e+255]]], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
t_2 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -16.5:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -1.45 \cdot 10^{-207}:\\
\;\;\;\;t_1 + \frac{y}{z} \cdot \frac{x}{b}\\
\mathbf{elif}\;y \leq 2.05 \cdot 10^{-160}:\\
\;\;\;\;\frac{\left(t + \frac{y \cdot x}{z}\right) - a}{b}\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{+75} \lor \neg \left(y \leq 8 \cdot 10^{+220}\right) \land y \leq 3.3 \cdot 10^{+255}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -16.5 or 1.2500000000000001e75 < y < 8e220 or 3.29999999999999982e255 < y Initial program 57.2%
Taylor expanded in y around inf 65.2%
+-commutative65.2%
mul-1-neg65.2%
unsub-neg65.2%
Simplified65.2%
if -16.5 < y < -1.45000000000000006e-207Initial program 80.4%
Taylor expanded in z around -inf 69.2%
+-commutative69.2%
associate--l+69.2%
Simplified69.2%
Taylor expanded in b around inf 72.6%
*-commutative72.6%
times-frac76.9%
Simplified76.9%
if -1.45000000000000006e-207 < y < 2.05000000000000001e-160Initial program 84.7%
Taylor expanded in z around -inf 70.0%
+-commutative70.0%
associate--l+70.0%
Simplified68.5%
Taylor expanded in x around inf 80.2%
times-frac73.8%
Simplified73.8%
Taylor expanded in b around inf 80.5%
if 2.05000000000000001e-160 < y < 1.2500000000000001e75 or 8e220 < y < 3.29999999999999982e255Initial program 65.3%
Taylor expanded in z around inf 69.3%
Final simplification71.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -5500.0)
t_1
(if (<= y 23000000.0)
(/ (- (+ t (/ (* y x) z)) a) b)
(if (<= y 6.4e+69)
(/ (* z (- t a)) (+ y (* z (- b y))))
(if (or (<= y 7.4e+220) (not (<= y 3.3e+255)))
t_1
(/ (- t a) (- b y))))))))
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 <= -5500.0) {
tmp = t_1;
} else if (y <= 23000000.0) {
tmp = ((t + ((y * x) / z)) - a) / b;
} else if (y <= 6.4e+69) {
tmp = (z * (t - a)) / (y + (z * (b - y)));
} else if ((y <= 7.4e+220) || !(y <= 3.3e+255)) {
tmp = t_1;
} else {
tmp = (t - a) / (b - y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (1.0d0 - z)
if (y <= (-5500.0d0)) then
tmp = t_1
else if (y <= 23000000.0d0) then
tmp = ((t + ((y * x) / z)) - a) / b
else if (y <= 6.4d+69) then
tmp = (z * (t - a)) / (y + (z * (b - y)))
else if ((y <= 7.4d+220) .or. (.not. (y <= 3.3d+255))) then
tmp = t_1
else
tmp = (t - a) / (b - y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -5500.0) {
tmp = t_1;
} else if (y <= 23000000.0) {
tmp = ((t + ((y * x) / z)) - a) / b;
} else if (y <= 6.4e+69) {
tmp = (z * (t - a)) / (y + (z * (b - y)));
} else if ((y <= 7.4e+220) || !(y <= 3.3e+255)) {
tmp = t_1;
} else {
tmp = (t - a) / (b - y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -5500.0: tmp = t_1 elif y <= 23000000.0: tmp = ((t + ((y * x) / z)) - a) / b elif y <= 6.4e+69: tmp = (z * (t - a)) / (y + (z * (b - y))) elif (y <= 7.4e+220) or not (y <= 3.3e+255): tmp = t_1 else: tmp = (t - a) / (b - y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -5500.0) tmp = t_1; elseif (y <= 23000000.0) tmp = Float64(Float64(Float64(t + Float64(Float64(y * x) / z)) - a) / b); elseif (y <= 6.4e+69) tmp = Float64(Float64(z * Float64(t - a)) / Float64(y + Float64(z * Float64(b - y)))); elseif ((y <= 7.4e+220) || !(y <= 3.3e+255)) tmp = t_1; else tmp = Float64(Float64(t - a) / Float64(b - y)); 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 <= -5500.0) tmp = t_1; elseif (y <= 23000000.0) tmp = ((t + ((y * x) / z)) - a) / b; elseif (y <= 6.4e+69) tmp = (z * (t - a)) / (y + (z * (b - y))); elseif ((y <= 7.4e+220) || ~((y <= 3.3e+255))) tmp = t_1; else tmp = (t - a) / (b - y); 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, -5500.0], t$95$1, If[LessEqual[y, 23000000.0], N[(N[(N[(t + N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[y, 6.4e+69], N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 7.4e+220], N[Not[LessEqual[y, 3.3e+255]], $MachinePrecision]], t$95$1, N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -5500:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 23000000:\\
\;\;\;\;\frac{\left(t + \frac{y \cdot x}{z}\right) - a}{b}\\
\mathbf{elif}\;y \leq 6.4 \cdot 10^{+69}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
\mathbf{elif}\;y \leq 7.4 \cdot 10^{+220} \lor \neg \left(y \leq 3.3 \cdot 10^{+255}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b - y}\\
\end{array}
\end{array}
if y < -5500 or 6.3999999999999997e69 < y < 7.4e220 or 3.29999999999999982e255 < y Initial program 56.7%
Taylor expanded in y around inf 65.9%
+-commutative65.9%
mul-1-neg65.9%
unsub-neg65.9%
Simplified65.9%
if -5500 < y < 2.3e7Initial program 80.2%
Taylor expanded in z around -inf 69.9%
+-commutative69.9%
associate--l+69.9%
Simplified69.3%
Taylor expanded in x around inf 78.5%
times-frac72.1%
Simplified72.1%
Taylor expanded in b around inf 73.2%
if 2.3e7 < y < 6.3999999999999997e69Initial program 72.0%
Taylor expanded in x around 0 62.5%
if 7.4e220 < y < 3.29999999999999982e255Initial program 29.4%
Taylor expanded in z around inf 86.1%
Final simplification70.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))) (t_2 (/ x (- 1.0 z))))
(if (<= y -27.5)
t_2
(if (<= y 1.06e+77)
(+ t_1 (/ (/ y (/ b x)) z))
(if (or (<= y 8e+220) (not (<= y 3.3e+255))) t_2 t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double t_2 = x / (1.0 - z);
double tmp;
if (y <= -27.5) {
tmp = t_2;
} else if (y <= 1.06e+77) {
tmp = t_1 + ((y / (b / x)) / z);
} else if ((y <= 8e+220) || !(y <= 3.3e+255)) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (t - a) / (b - y)
t_2 = x / (1.0d0 - z)
if (y <= (-27.5d0)) then
tmp = t_2
else if (y <= 1.06d+77) then
tmp = t_1 + ((y / (b / x)) / z)
else if ((y <= 8d+220) .or. (.not. (y <= 3.3d+255))) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double t_2 = x / (1.0 - z);
double tmp;
if (y <= -27.5) {
tmp = t_2;
} else if (y <= 1.06e+77) {
tmp = t_1 + ((y / (b / x)) / z);
} else if ((y <= 8e+220) || !(y <= 3.3e+255)) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) t_2 = x / (1.0 - z) tmp = 0 if y <= -27.5: tmp = t_2 elif y <= 1.06e+77: tmp = t_1 + ((y / (b / x)) / z) elif (y <= 8e+220) or not (y <= 3.3e+255): tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) t_2 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -27.5) tmp = t_2; elseif (y <= 1.06e+77) tmp = Float64(t_1 + Float64(Float64(y / Float64(b / x)) / z)); elseif ((y <= 8e+220) || !(y <= 3.3e+255)) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); t_2 = x / (1.0 - z); tmp = 0.0; if (y <= -27.5) tmp = t_2; elseif (y <= 1.06e+77) tmp = t_1 + ((y / (b / x)) / z); elseif ((y <= 8e+220) || ~((y <= 3.3e+255))) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -27.5], t$95$2, If[LessEqual[y, 1.06e+77], N[(t$95$1 + N[(N[(y / N[(b / x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 8e+220], N[Not[LessEqual[y, 3.3e+255]], $MachinePrecision]], t$95$2, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
t_2 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -27.5:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 1.06 \cdot 10^{+77}:\\
\;\;\;\;t_1 + \frac{\frac{y}{\frac{b}{x}}}{z}\\
\mathbf{elif}\;y \leq 8 \cdot 10^{+220} \lor \neg \left(y \leq 3.3 \cdot 10^{+255}\right):\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -27.5 or 1.06000000000000003e77 < y < 8e220 or 3.29999999999999982e255 < y Initial program 57.2%
Taylor expanded in y around inf 65.2%
+-commutative65.2%
mul-1-neg65.2%
unsub-neg65.2%
Simplified65.2%
if -27.5 < y < 1.06000000000000003e77Initial program 79.1%
Taylor expanded in z around -inf 68.9%
+-commutative68.9%
associate--l+68.9%
Simplified69.0%
Taylor expanded in x around inf 76.3%
times-frac71.8%
Simplified71.8%
associate-*r/75.2%
Applied egg-rr75.2%
Taylor expanded in y around 0 74.8%
associate-/l*72.1%
Simplified72.1%
if 8e220 < y < 3.29999999999999982e255Initial program 29.4%
Taylor expanded in z around inf 86.1%
Final simplification69.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -460000000.0)
t_1
(if (<= y 2.55e-160)
(/ (- (+ t (/ (* y x) z)) a) b)
(if (or (<= y 1.55e+74) (and (not (<= y 7.9e+220)) (<= y 3.3e+255)))
(/ (- t a) (- 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 <= -460000000.0) {
tmp = t_1;
} else if (y <= 2.55e-160) {
tmp = ((t + ((y * x) / z)) - a) / b;
} else if ((y <= 1.55e+74) || (!(y <= 7.9e+220) && (y <= 3.3e+255))) {
tmp = (t - a) / (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 <= (-460000000.0d0)) then
tmp = t_1
else if (y <= 2.55d-160) then
tmp = ((t + ((y * x) / z)) - a) / b
else if ((y <= 1.55d+74) .or. (.not. (y <= 7.9d+220)) .and. (y <= 3.3d+255)) then
tmp = (t - a) / (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 <= -460000000.0) {
tmp = t_1;
} else if (y <= 2.55e-160) {
tmp = ((t + ((y * x) / z)) - a) / b;
} else if ((y <= 1.55e+74) || (!(y <= 7.9e+220) && (y <= 3.3e+255))) {
tmp = (t - a) / (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 <= -460000000.0: tmp = t_1 elif y <= 2.55e-160: tmp = ((t + ((y * x) / z)) - a) / b elif (y <= 1.55e+74) or (not (y <= 7.9e+220) and (y <= 3.3e+255)): tmp = (t - a) / (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 <= -460000000.0) tmp = t_1; elseif (y <= 2.55e-160) tmp = Float64(Float64(Float64(t + Float64(Float64(y * x) / z)) - a) / b); elseif ((y <= 1.55e+74) || (!(y <= 7.9e+220) && (y <= 3.3e+255))) tmp = Float64(Float64(t - a) / 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 <= -460000000.0) tmp = t_1; elseif (y <= 2.55e-160) tmp = ((t + ((y * x) / z)) - a) / b; elseif ((y <= 1.55e+74) || (~((y <= 7.9e+220)) && (y <= 3.3e+255))) tmp = (t - a) / (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, -460000000.0], t$95$1, If[LessEqual[y, 2.55e-160], N[(N[(N[(t + N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision] / b), $MachinePrecision], If[Or[LessEqual[y, 1.55e+74], And[N[Not[LessEqual[y, 7.9e+220]], $MachinePrecision], LessEqual[y, 3.3e+255]]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -460000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.55 \cdot 10^{-160}:\\
\;\;\;\;\frac{\left(t + \frac{y \cdot x}{z}\right) - a}{b}\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{+74} \lor \neg \left(y \leq 7.9 \cdot 10^{+220}\right) \land y \leq 3.3 \cdot 10^{+255}:\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -4.6e8 or 1.55000000000000011e74 < y < 7.8999999999999996e220 or 3.29999999999999982e255 < y Initial program 56.7%
Taylor expanded in y around inf 65.9%
+-commutative65.9%
mul-1-neg65.9%
unsub-neg65.9%
Simplified65.9%
if -4.6e8 < y < 2.55e-160Initial program 83.0%
Taylor expanded in z around -inf 69.0%
+-commutative69.0%
associate--l+69.0%
Simplified68.2%
Taylor expanded in x around inf 78.0%
times-frac68.8%
Simplified68.8%
Taylor expanded in b around inf 74.0%
if 2.55e-160 < y < 1.55000000000000011e74 or 7.8999999999999996e220 < y < 3.29999999999999982e255Initial program 65.3%
Taylor expanded in z around inf 69.3%
Final simplification70.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -2.2e+195)
t_1
(if (<= z -4.7e+108)
(/ (+ (- t a) (/ y (/ z x))) b)
(if (or (<= z -4.2e-50) (not (<= z 1.7e-125)))
t_1
(+ x (/ t (/ y z))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -2.2e+195) {
tmp = t_1;
} else if (z <= -4.7e+108) {
tmp = ((t - a) + (y / (z / x))) / b;
} else if ((z <= -4.2e-50) || !(z <= 1.7e-125)) {
tmp = t_1;
} else {
tmp = x + (t / (y / 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) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-2.2d+195)) then
tmp = t_1
else if (z <= (-4.7d+108)) then
tmp = ((t - a) + (y / (z / x))) / b
else if ((z <= (-4.2d-50)) .or. (.not. (z <= 1.7d-125))) then
tmp = t_1
else
tmp = x + (t / (y / 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 = (t - a) / (b - y);
double tmp;
if (z <= -2.2e+195) {
tmp = t_1;
} else if (z <= -4.7e+108) {
tmp = ((t - a) + (y / (z / x))) / b;
} else if ((z <= -4.2e-50) || !(z <= 1.7e-125)) {
tmp = t_1;
} else {
tmp = x + (t / (y / z));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -2.2e+195: tmp = t_1 elif z <= -4.7e+108: tmp = ((t - a) + (y / (z / x))) / b elif (z <= -4.2e-50) or not (z <= 1.7e-125): tmp = t_1 else: tmp = x + (t / (y / z)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -2.2e+195) tmp = t_1; elseif (z <= -4.7e+108) tmp = Float64(Float64(Float64(t - a) + Float64(y / Float64(z / x))) / b); elseif ((z <= -4.2e-50) || !(z <= 1.7e-125)) tmp = t_1; else tmp = Float64(x + Float64(t / Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -2.2e+195) tmp = t_1; elseif (z <= -4.7e+108) tmp = ((t - a) + (y / (z / x))) / b; elseif ((z <= -4.2e-50) || ~((z <= 1.7e-125))) tmp = t_1; else tmp = x + (t / (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.2e+195], t$95$1, If[LessEqual[z, -4.7e+108], N[(N[(N[(t - a), $MachinePrecision] + N[(y / N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[Or[LessEqual[z, -4.2e-50], N[Not[LessEqual[z, 1.7e-125]], $MachinePrecision]], t$95$1, N[(x + N[(t / N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2.2 \cdot 10^{+195}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -4.7 \cdot 10^{+108}:\\
\;\;\;\;\frac{\left(t - a\right) + \frac{y}{\frac{z}{x}}}{b}\\
\mathbf{elif}\;z \leq -4.2 \cdot 10^{-50} \lor \neg \left(z \leq 1.7 \cdot 10^{-125}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{\frac{y}{z}}\\
\end{array}
\end{array}
if z < -2.2e195 or -4.6999999999999996e108 < z < -4.2000000000000002e-50 or 1.69999999999999988e-125 < z Initial program 61.2%
Taylor expanded in z around inf 74.7%
if -2.2e195 < z < -4.6999999999999996e108Initial program 35.2%
Taylor expanded in z around -inf 60.2%
+-commutative60.2%
associate--l+60.2%
Simplified80.4%
Taylor expanded in x around inf 41.9%
times-frac93.7%
Simplified93.7%
Taylor expanded in b around inf 61.3%
associate--l+61.3%
associate-/l*67.5%
Simplified67.5%
if -4.2000000000000002e-50 < z < 1.69999999999999988e-125Initial program 87.7%
Taylor expanded in z around 0 54.3%
Taylor expanded in t around inf 69.6%
associate-/l*67.7%
Simplified67.7%
Final simplification71.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -4.1e+165)
(/ t b)
(if (<= z -3.8e+24)
(/ (- x) z)
(if (or (<= z -0.0012) (not (<= z 1.1e+28))) (/ (- a) b) (+ x (* z x))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -4.1e+165) {
tmp = t / b;
} else if (z <= -3.8e+24) {
tmp = -x / z;
} else if ((z <= -0.0012) || !(z <= 1.1e+28)) {
tmp = -a / b;
} else {
tmp = x + (z * x);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-4.1d+165)) then
tmp = t / b
else if (z <= (-3.8d+24)) then
tmp = -x / z
else if ((z <= (-0.0012d0)) .or. (.not. (z <= 1.1d+28))) then
tmp = -a / b
else
tmp = x + (z * x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -4.1e+165) {
tmp = t / b;
} else if (z <= -3.8e+24) {
tmp = -x / z;
} else if ((z <= -0.0012) || !(z <= 1.1e+28)) {
tmp = -a / b;
} else {
tmp = x + (z * x);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -4.1e+165: tmp = t / b elif z <= -3.8e+24: tmp = -x / z elif (z <= -0.0012) or not (z <= 1.1e+28): tmp = -a / b else: tmp = x + (z * x) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -4.1e+165) tmp = Float64(t / b); elseif (z <= -3.8e+24) tmp = Float64(Float64(-x) / z); elseif ((z <= -0.0012) || !(z <= 1.1e+28)) tmp = Float64(Float64(-a) / b); else tmp = Float64(x + Float64(z * x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -4.1e+165) tmp = t / b; elseif (z <= -3.8e+24) tmp = -x / z; elseif ((z <= -0.0012) || ~((z <= 1.1e+28))) tmp = -a / b; else tmp = x + (z * x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -4.1e+165], N[(t / b), $MachinePrecision], If[LessEqual[z, -3.8e+24], N[((-x) / z), $MachinePrecision], If[Or[LessEqual[z, -0.0012], N[Not[LessEqual[z, 1.1e+28]], $MachinePrecision]], N[((-a) / b), $MachinePrecision], N[(x + N[(z * x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.1 \cdot 10^{+165}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{+24}:\\
\;\;\;\;\frac{-x}{z}\\
\mathbf{elif}\;z \leq -0.0012 \lor \neg \left(z \leq 1.1 \cdot 10^{+28}\right):\\
\;\;\;\;\frac{-a}{b}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot x\\
\end{array}
\end{array}
if z < -4.1000000000000003e165Initial program 41.0%
Taylor expanded in b around inf 37.0%
Taylor expanded in t around inf 36.9%
if -4.1000000000000003e165 < z < -3.80000000000000015e24Initial program 59.1%
Taylor expanded in y around inf 31.7%
+-commutative31.7%
mul-1-neg31.7%
unsub-neg31.7%
Simplified31.7%
Taylor expanded in z around inf 31.7%
associate-*r/31.7%
mul-1-neg31.7%
Simplified31.7%
if -3.80000000000000015e24 < z < -0.00119999999999999989 or 1.09999999999999993e28 < z Initial program 45.8%
Taylor expanded in b around inf 33.8%
Taylor expanded in a around inf 41.2%
associate-*r/41.2%
mul-1-neg41.2%
Simplified41.2%
if -0.00119999999999999989 < z < 1.09999999999999993e28Initial program 89.6%
Taylor expanded in y around inf 50.6%
+-commutative50.6%
mul-1-neg50.6%
unsub-neg50.6%
Simplified50.6%
Taylor expanded in z around 0 50.4%
Final simplification44.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ t (- b y))))
(if (<= z -7600000000000.0)
t_1
(if (<= z 5.8e-18)
(+ x (* z x))
(if (or (<= z 2.75e+79) (not (<= z 4.6e+186))) t_1 (/ (- a) b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t / (b - y);
double tmp;
if (z <= -7600000000000.0) {
tmp = t_1;
} else if (z <= 5.8e-18) {
tmp = x + (z * x);
} else if ((z <= 2.75e+79) || !(z <= 4.6e+186)) {
tmp = t_1;
} else {
tmp = -a / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = t / (b - y)
if (z <= (-7600000000000.0d0)) then
tmp = t_1
else if (z <= 5.8d-18) then
tmp = x + (z * x)
else if ((z <= 2.75d+79) .or. (.not. (z <= 4.6d+186))) then
tmp = t_1
else
tmp = -a / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t / (b - y);
double tmp;
if (z <= -7600000000000.0) {
tmp = t_1;
} else if (z <= 5.8e-18) {
tmp = x + (z * x);
} else if ((z <= 2.75e+79) || !(z <= 4.6e+186)) {
tmp = t_1;
} else {
tmp = -a / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t / (b - y) tmp = 0 if z <= -7600000000000.0: tmp = t_1 elif z <= 5.8e-18: tmp = x + (z * x) elif (z <= 2.75e+79) or not (z <= 4.6e+186): tmp = t_1 else: tmp = -a / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t / Float64(b - y)) tmp = 0.0 if (z <= -7600000000000.0) tmp = t_1; elseif (z <= 5.8e-18) tmp = Float64(x + Float64(z * x)); elseif ((z <= 2.75e+79) || !(z <= 4.6e+186)) tmp = t_1; else tmp = Float64(Float64(-a) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t / (b - y); tmp = 0.0; if (z <= -7600000000000.0) tmp = t_1; elseif (z <= 5.8e-18) tmp = x + (z * x); elseif ((z <= 2.75e+79) || ~((z <= 4.6e+186))) tmp = t_1; else tmp = -a / b; 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, -7600000000000.0], t$95$1, If[LessEqual[z, 5.8e-18], N[(x + N[(z * x), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 2.75e+79], N[Not[LessEqual[z, 4.6e+186]], $MachinePrecision]], t$95$1, N[((-a) / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{b - y}\\
\mathbf{if}\;z \leq -7600000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{-18}:\\
\;\;\;\;x + z \cdot x\\
\mathbf{elif}\;z \leq 2.75 \cdot 10^{+79} \lor \neg \left(z \leq 4.6 \cdot 10^{+186}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{-a}{b}\\
\end{array}
\end{array}
if z < -7.6e12 or 5.8e-18 < z < 2.75000000000000003e79 or 4.60000000000000027e186 < z Initial program 50.8%
Taylor expanded in z around -inf 71.7%
+-commutative71.7%
associate--l+71.7%
Simplified91.3%
Taylor expanded in x around inf 81.9%
times-frac98.2%
Simplified98.2%
Taylor expanded in t around inf 44.1%
if -7.6e12 < z < 5.8e-18Initial program 88.7%
Taylor expanded in y around inf 51.2%
+-commutative51.2%
mul-1-neg51.2%
unsub-neg51.2%
Simplified51.2%
Taylor expanded in z around 0 51.8%
if 2.75000000000000003e79 < z < 4.60000000000000027e186Initial program 45.6%
Taylor expanded in b around inf 30.2%
Taylor expanded in a around inf 42.2%
associate-*r/42.2%
mul-1-neg42.2%
Simplified42.2%
Final simplification47.8%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -6.5e+161)
(/ t b)
(if (<= z -2.6e+23)
(/ (- x) z)
(if (or (<= z -9.6e-40) (not (<= z 1.1e+28))) (/ (- a) b) x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -6.5e+161) {
tmp = t / b;
} else if (z <= -2.6e+23) {
tmp = -x / z;
} else if ((z <= -9.6e-40) || !(z <= 1.1e+28)) {
tmp = -a / b;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-6.5d+161)) then
tmp = t / b
else if (z <= (-2.6d+23)) then
tmp = -x / z
else if ((z <= (-9.6d-40)) .or. (.not. (z <= 1.1d+28))) then
tmp = -a / b
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -6.5e+161) {
tmp = t / b;
} else if (z <= -2.6e+23) {
tmp = -x / z;
} else if ((z <= -9.6e-40) || !(z <= 1.1e+28)) {
tmp = -a / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -6.5e+161: tmp = t / b elif z <= -2.6e+23: tmp = -x / z elif (z <= -9.6e-40) or not (z <= 1.1e+28): tmp = -a / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -6.5e+161) tmp = Float64(t / b); elseif (z <= -2.6e+23) tmp = Float64(Float64(-x) / z); elseif ((z <= -9.6e-40) || !(z <= 1.1e+28)) tmp = Float64(Float64(-a) / b); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -6.5e+161) tmp = t / b; elseif (z <= -2.6e+23) tmp = -x / z; elseif ((z <= -9.6e-40) || ~((z <= 1.1e+28))) tmp = -a / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -6.5e+161], N[(t / b), $MachinePrecision], If[LessEqual[z, -2.6e+23], N[((-x) / z), $MachinePrecision], If[Or[LessEqual[z, -9.6e-40], N[Not[LessEqual[z, 1.1e+28]], $MachinePrecision]], N[((-a) / b), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+161}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{+23}:\\
\;\;\;\;\frac{-x}{z}\\
\mathbf{elif}\;z \leq -9.6 \cdot 10^{-40} \lor \neg \left(z \leq 1.1 \cdot 10^{+28}\right):\\
\;\;\;\;\frac{-a}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -6.5e161Initial program 41.0%
Taylor expanded in b around inf 37.0%
Taylor expanded in t around inf 36.9%
if -6.5e161 < z < -2.59999999999999992e23Initial program 59.1%
Taylor expanded in y around inf 31.7%
+-commutative31.7%
mul-1-neg31.7%
unsub-neg31.7%
Simplified31.7%
Taylor expanded in z around inf 31.7%
associate-*r/31.7%
mul-1-neg31.7%
Simplified31.7%
if -2.59999999999999992e23 < z < -9.59999999999999965e-40 or 1.09999999999999993e28 < z Initial program 53.0%
Taylor expanded in b around inf 36.6%
Taylor expanded in a around inf 39.7%
associate-*r/39.7%
mul-1-neg39.7%
Simplified39.7%
if -9.59999999999999965e-40 < z < 1.09999999999999993e28Initial program 88.7%
Taylor expanded in z around 0 51.8%
Final simplification44.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -4.8e-50) (not (<= z 1.7e-125))) (/ (- t a) (- b y)) (+ x (/ t (/ y z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4.8e-50) || !(z <= 1.7e-125)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + (t / (y / 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 ((z <= (-4.8d-50)) .or. (.not. (z <= 1.7d-125))) then
tmp = (t - a) / (b - y)
else
tmp = x + (t / (y / 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 ((z <= -4.8e-50) || !(z <= 1.7e-125)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + (t / (y / z));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -4.8e-50) or not (z <= 1.7e-125): tmp = (t - a) / (b - y) else: tmp = x + (t / (y / z)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -4.8e-50) || !(z <= 1.7e-125)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x + Float64(t / Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -4.8e-50) || ~((z <= 1.7e-125))) tmp = (t - a) / (b - y); else tmp = x + (t / (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -4.8e-50], N[Not[LessEqual[z, 1.7e-125]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(t / N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{-50} \lor \neg \left(z \leq 1.7 \cdot 10^{-125}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{\frac{y}{z}}\\
\end{array}
\end{array}
if z < -4.80000000000000004e-50 or 1.69999999999999988e-125 < z Initial program 58.8%
Taylor expanded in z around inf 71.2%
if -4.80000000000000004e-50 < z < 1.69999999999999988e-125Initial program 87.7%
Taylor expanded in z around 0 54.3%
Taylor expanded in t around inf 69.6%
associate-/l*67.7%
Simplified67.7%
Final simplification69.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -115000000.0) (not (<= y 4.5e+38))) (/ 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 <= -115000000.0) || !(y <= 4.5e+38)) {
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 <= (-115000000.0d0)) .or. (.not. (y <= 4.5d+38))) 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 <= -115000000.0) || !(y <= 4.5e+38)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -115000000.0) or not (y <= 4.5e+38): 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 <= -115000000.0) || !(y <= 4.5e+38)) 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 <= -115000000.0) || ~((y <= 4.5e+38))) 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, -115000000.0], N[Not[LessEqual[y, 4.5e+38]], $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 -115000000 \lor \neg \left(y \leq 4.5 \cdot 10^{+38}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -1.15e8 or 4.4999999999999998e38 < y Initial program 56.8%
Taylor expanded in y around inf 59.8%
+-commutative59.8%
mul-1-neg59.8%
unsub-neg59.8%
Simplified59.8%
if -1.15e8 < y < 4.4999999999999998e38Initial program 79.3%
Taylor expanded in y around 0 61.2%
Final simplification60.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -9.2e-40) (not (<= z 1.1e+28))) (/ (- a) b) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -9.2e-40) || !(z <= 1.1e+28)) {
tmp = -a / b;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-9.2d-40)) .or. (.not. (z <= 1.1d+28))) then
tmp = -a / b
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -9.2e-40) || !(z <= 1.1e+28)) {
tmp = -a / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -9.2e-40) or not (z <= 1.1e+28): tmp = -a / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -9.2e-40) || !(z <= 1.1e+28)) tmp = Float64(Float64(-a) / b); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -9.2e-40) || ~((z <= 1.1e+28))) tmp = -a / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -9.2e-40], N[Not[LessEqual[z, 1.1e+28]], $MachinePrecision]], N[((-a) / b), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.2 \cdot 10^{-40} \lor \neg \left(z \leq 1.1 \cdot 10^{+28}\right):\\
\;\;\;\;\frac{-a}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -9.2e-40 or 1.09999999999999993e28 < z Initial program 52.3%
Taylor expanded in b around inf 34.0%
Taylor expanded in a around inf 33.9%
associate-*r/33.9%
mul-1-neg33.9%
Simplified33.9%
if -9.2e-40 < z < 1.09999999999999993e28Initial program 88.7%
Taylor expanded in z around 0 51.8%
Final simplification42.3%
(FPCore (x y z t a b) :precision binary64 (if (<= z -8.2e-17) (/ t b) (if (<= z 3.5e-18) x (/ t b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -8.2e-17) {
tmp = t / b;
} else if (z <= 3.5e-18) {
tmp = x;
} else {
tmp = t / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-8.2d-17)) then
tmp = t / b
else if (z <= 3.5d-18) then
tmp = x
else
tmp = t / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -8.2e-17) {
tmp = t / b;
} else if (z <= 3.5e-18) {
tmp = x;
} else {
tmp = t / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -8.2e-17: tmp = t / b elif z <= 3.5e-18: tmp = x else: tmp = t / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -8.2e-17) tmp = Float64(t / b); elseif (z <= 3.5e-18) tmp = x; else tmp = Float64(t / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -8.2e-17) tmp = t / b; elseif (z <= 3.5e-18) tmp = x; else tmp = t / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -8.2e-17], N[(t / b), $MachinePrecision], If[LessEqual[z, 3.5e-18], x, N[(t / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.2 \cdot 10^{-17}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{-18}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b}\\
\end{array}
\end{array}
if z < -8.2000000000000001e-17 or 3.4999999999999999e-18 < z Initial program 52.7%
Taylor expanded in b around inf 33.8%
Taylor expanded in t around inf 26.4%
if -8.2000000000000001e-17 < z < 3.4999999999999999e-18Initial program 88.6%
Taylor expanded in z around 0 52.9%
Final simplification38.7%
(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 69.4%
Taylor expanded in z around 0 27.1%
Final simplification27.1%
(FPCore (x y z t a b) :precision binary64 (- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z)))))
double code(double x, double y, double z, double t, double a, double b) {
return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)));
}
def code(x, y, z, t, a, b): return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(z * t) + Float64(y * x)) / Float64(y + Float64(z * Float64(b - y)))) - Float64(a / Float64(Float64(b - y) + Float64(y / z)))) end
function tmp = code(x, y, z, t, a, b) tmp = (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(z * t), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a / N[(N[(b - y), $MachinePrecision] + N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{z \cdot t + y \cdot x}{y + z \cdot \left(b - y\right)} - \frac{a}{\left(b - y\right) + \frac{y}{z}}
\end{array}
herbie shell --seed 2023192
(FPCore (x y z t a b)
:name "Development.Shake.Progress:decay from shake-0.15.5"
:precision binary64
:herbie-target
(- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z))))
(/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))