
(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 20 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
(+
(+ (/ t (- b y)) (* (/ x z) (/ y (- b y))))
(- (* (/ y z) (/ (- a t) (pow (- b y) 2.0))) (/ a (- b y)))))
(t_2 (/ (+ (* z (- t a)) (* x y)) (+ y (* z (- b y)))))
(t_3 (/ x (- 1.0 z))))
(if (<= t_2 -5e+249)
(+ (/ 1.0 (/ (* (- 1.0 z) (/ y z)) (- t a))) t_3)
(if (<= t_2 -2e-255)
t_2
(if (<= t_2 0.0)
t_1
(if (<= t_2 2e+306)
t_2
(if (<= t_2 INFINITY) (+ t_3 (/ (- a t) y)) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t / (b - y)) + ((x / z) * (y / (b - y)))) + (((y / z) * ((a - t) / pow((b - y), 2.0))) - (a / (b - y)));
double t_2 = ((z * (t - a)) + (x * y)) / (y + (z * (b - y)));
double t_3 = x / (1.0 - z);
double tmp;
if (t_2 <= -5e+249) {
tmp = (1.0 / (((1.0 - z) * (y / z)) / (t - a))) + t_3;
} else if (t_2 <= -2e-255) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t_1;
} else if (t_2 <= 2e+306) {
tmp = t_2;
} else if (t_2 <= ((double) INFINITY)) {
tmp = t_3 + ((a - t) / y);
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t / (b - y)) + ((x / z) * (y / (b - y)))) + (((y / z) * ((a - t) / Math.pow((b - y), 2.0))) - (a / (b - y)));
double t_2 = ((z * (t - a)) + (x * y)) / (y + (z * (b - y)));
double t_3 = x / (1.0 - z);
double tmp;
if (t_2 <= -5e+249) {
tmp = (1.0 / (((1.0 - z) * (y / z)) / (t - a))) + t_3;
} else if (t_2 <= -2e-255) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t_1;
} else if (t_2 <= 2e+306) {
tmp = t_2;
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = t_3 + ((a - t) / y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((t / (b - y)) + ((x / z) * (y / (b - y)))) + (((y / z) * ((a - t) / math.pow((b - y), 2.0))) - (a / (b - y))) t_2 = ((z * (t - a)) + (x * y)) / (y + (z * (b - y))) t_3 = x / (1.0 - z) tmp = 0 if t_2 <= -5e+249: tmp = (1.0 / (((1.0 - z) * (y / z)) / (t - a))) + t_3 elif t_2 <= -2e-255: tmp = t_2 elif t_2 <= 0.0: tmp = t_1 elif t_2 <= 2e+306: tmp = t_2 elif t_2 <= math.inf: tmp = t_3 + ((a - t) / y) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(t / Float64(b - y)) + Float64(Float64(x / z) * Float64(y / Float64(b - y)))) + Float64(Float64(Float64(y / z) * Float64(Float64(a - t) / (Float64(b - y) ^ 2.0))) - Float64(a / Float64(b - y)))) t_2 = Float64(Float64(Float64(z * Float64(t - a)) + Float64(x * y)) / Float64(y + Float64(z * Float64(b - y)))) t_3 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (t_2 <= -5e+249) tmp = Float64(Float64(1.0 / Float64(Float64(Float64(1.0 - z) * Float64(y / z)) / Float64(t - a))) + t_3); elseif (t_2 <= -2e-255) tmp = t_2; elseif (t_2 <= 0.0) tmp = t_1; elseif (t_2 <= 2e+306) tmp = t_2; elseif (t_2 <= Inf) tmp = Float64(t_3 + Float64(Float64(a - t) / y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((t / (b - y)) + ((x / z) * (y / (b - y)))) + (((y / z) * ((a - t) / ((b - y) ^ 2.0))) - (a / (b - y))); t_2 = ((z * (t - a)) + (x * y)) / (y + (z * (b - y))); t_3 = x / (1.0 - z); tmp = 0.0; if (t_2 <= -5e+249) tmp = (1.0 / (((1.0 - z) * (y / z)) / (t - a))) + t_3; elseif (t_2 <= -2e-255) tmp = t_2; elseif (t_2 <= 0.0) tmp = t_1; elseif (t_2 <= 2e+306) tmp = t_2; elseif (t_2 <= Inf) tmp = t_3 + ((a - t) / y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(x / z), $MachinePrecision] * N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y / z), $MachinePrecision] * N[(N[(a - t), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+249], N[(N[(1.0 / N[(N[(N[(1.0 - z), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision], If[LessEqual[t$95$2, -2e-255], t$95$2, If[LessEqual[t$95$2, 0.0], t$95$1, If[LessEqual[t$95$2, 2e+306], t$95$2, If[LessEqual[t$95$2, Infinity], N[(t$95$3 + N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\frac{t}{b - y} + \frac{x}{z} \cdot \frac{y}{b - y}\right) + \left(\frac{y}{z} \cdot \frac{a - t}{{\left(b - y\right)}^{2}} - \frac{a}{b - y}\right)\\
t_2 := \frac{z \cdot \left(t - a\right) + x \cdot y}{y + z \cdot \left(b - y\right)}\\
t_3 := \frac{x}{1 - z}\\
\mathbf{if}\;t_2 \leq -5 \cdot 10^{+249}:\\
\;\;\;\;\frac{1}{\frac{\left(1 - z\right) \cdot \frac{y}{z}}{t - a}} + t_3\\
\mathbf{elif}\;t_2 \leq -2 \cdot 10^{-255}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_2 \leq 0:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;t_3 + \frac{a - t}{y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -4.9999999999999996e249Initial program 54.8%
Taylor expanded in y around inf 46.3%
mul-1-neg46.3%
unsub-neg46.3%
Simplified46.3%
Taylor expanded in x around 0 70.2%
+-commutative70.2%
times-frac77.7%
Simplified77.7%
clear-num77.7%
clear-num77.7%
frac-times77.7%
metadata-eval77.7%
Applied egg-rr77.7%
*-commutative77.7%
associate-*l/77.7%
Simplified77.7%
if -4.9999999999999996e249 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2e-255 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.00000000000000003e306Initial program 99.6%
if -2e-255 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0 or +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 15.5%
Taylor expanded in z around inf 57.9%
times-frac77.5%
times-frac96.5%
Simplified96.5%
if 2.00000000000000003e306 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 28.3%
Taylor expanded in y around inf 20.1%
mul-1-neg20.1%
unsub-neg20.1%
Simplified20.1%
Taylor expanded in x around 0 61.6%
+-commutative61.6%
times-frac76.7%
Simplified76.7%
clear-num76.6%
clear-num76.6%
frac-times76.6%
metadata-eval76.6%
Applied egg-rr76.6%
*-commutative76.6%
associate-*l/76.6%
Simplified76.6%
Taylor expanded in z around inf 76.7%
div-sub76.7%
distribute-lft-out--76.7%
sub-neg76.7%
mul-1-neg76.7%
remove-double-neg76.7%
+-commutative76.7%
mul-1-neg76.7%
sub-neg76.7%
div-sub76.7%
Simplified76.7%
Final simplification94.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ (* z (- t a)) (* x y)) (+ y (* z (- b y)))))
(t_2 (/ (- t a) (- b y)))
(t_3 (/ x (- 1.0 z))))
(if (<= t_1 -5e+249)
(+ (/ 1.0 (/ (* (- 1.0 z) (/ y z)) (- t a))) t_3)
(if (<= t_1 -2e-255)
t_1
(if (<= t_1 0.0)
(-
(+ (/ (/ (* x y) z) (- b y)) t_2)
(/ (/ y (/ z (- t a))) (pow (- b y) 2.0)))
(if (<= t_1 2e+306)
t_1
(if (<= t_1 INFINITY) (+ t_3 (/ (- a t) y)) t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((z * (t - a)) + (x * y)) / (y + (z * (b - y)));
double t_2 = (t - a) / (b - y);
double t_3 = x / (1.0 - z);
double tmp;
if (t_1 <= -5e+249) {
tmp = (1.0 / (((1.0 - z) * (y / z)) / (t - a))) + t_3;
} else if (t_1 <= -2e-255) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = ((((x * y) / z) / (b - y)) + t_2) - ((y / (z / (t - a))) / pow((b - y), 2.0));
} else if (t_1 <= 2e+306) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_3 + ((a - t) / y);
} else {
tmp = t_2;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((z * (t - a)) + (x * y)) / (y + (z * (b - y)));
double t_2 = (t - a) / (b - y);
double t_3 = x / (1.0 - z);
double tmp;
if (t_1 <= -5e+249) {
tmp = (1.0 / (((1.0 - z) * (y / z)) / (t - a))) + t_3;
} else if (t_1 <= -2e-255) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = ((((x * y) / z) / (b - y)) + t_2) - ((y / (z / (t - a))) / Math.pow((b - y), 2.0));
} else if (t_1 <= 2e+306) {
tmp = t_1;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_3 + ((a - t) / y);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((z * (t - a)) + (x * y)) / (y + (z * (b - y))) t_2 = (t - a) / (b - y) t_3 = x / (1.0 - z) tmp = 0 if t_1 <= -5e+249: tmp = (1.0 / (((1.0 - z) * (y / z)) / (t - a))) + t_3 elif t_1 <= -2e-255: tmp = t_1 elif t_1 <= 0.0: tmp = ((((x * y) / z) / (b - y)) + t_2) - ((y / (z / (t - a))) / math.pow((b - y), 2.0)) elif t_1 <= 2e+306: tmp = t_1 elif t_1 <= math.inf: tmp = t_3 + ((a - t) / y) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(z * Float64(t - a)) + Float64(x * y)) / Float64(y + Float64(z * Float64(b - y)))) t_2 = Float64(Float64(t - a) / Float64(b - y)) t_3 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (t_1 <= -5e+249) tmp = Float64(Float64(1.0 / Float64(Float64(Float64(1.0 - z) * Float64(y / z)) / Float64(t - a))) + t_3); elseif (t_1 <= -2e-255) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(Float64(Float64(Float64(x * y) / z) / Float64(b - y)) + t_2) - Float64(Float64(y / Float64(z / Float64(t - a))) / (Float64(b - y) ^ 2.0))); elseif (t_1 <= 2e+306) tmp = t_1; elseif (t_1 <= Inf) tmp = Float64(t_3 + Float64(Float64(a - t) / y)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((z * (t - a)) + (x * y)) / (y + (z * (b - y))); t_2 = (t - a) / (b - y); t_3 = x / (1.0 - z); tmp = 0.0; if (t_1 <= -5e+249) tmp = (1.0 / (((1.0 - z) * (y / z)) / (t - a))) + t_3; elseif (t_1 <= -2e-255) tmp = t_1; elseif (t_1 <= 0.0) tmp = ((((x * y) / z) / (b - y)) + t_2) - ((y / (z / (t - a))) / ((b - y) ^ 2.0)); elseif (t_1 <= 2e+306) tmp = t_1; elseif (t_1 <= Inf) tmp = t_3 + ((a - t) / y); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+249], N[(N[(1.0 / N[(N[(N[(1.0 - z), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision], If[LessEqual[t$95$1, -2e-255], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(N[(N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision] - N[(N[(y / N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+306], t$95$1, If[LessEqual[t$95$1, Infinity], N[(t$95$3 + N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot \left(t - a\right) + x \cdot y}{y + z \cdot \left(b - y\right)}\\
t_2 := \frac{t - a}{b - y}\\
t_3 := \frac{x}{1 - z}\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{+249}:\\
\;\;\;\;\frac{1}{\frac{\left(1 - z\right) \cdot \frac{y}{z}}{t - a}} + t_3\\
\mathbf{elif}\;t_1 \leq -2 \cdot 10^{-255}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\left(\frac{\frac{x \cdot y}{z}}{b - y} + t_2\right) - \frac{\frac{y}{\frac{z}{t - a}}}{{\left(b - y\right)}^{2}}\\
\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;t_3 + \frac{a - t}{y}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -4.9999999999999996e249Initial program 54.8%
Taylor expanded in y around inf 46.3%
mul-1-neg46.3%
unsub-neg46.3%
Simplified46.3%
Taylor expanded in x around 0 70.2%
+-commutative70.2%
times-frac77.7%
Simplified77.7%
clear-num77.7%
clear-num77.7%
frac-times77.7%
metadata-eval77.7%
Applied egg-rr77.7%
*-commutative77.7%
associate-*l/77.7%
Simplified77.7%
if -4.9999999999999996e249 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2e-255 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.00000000000000003e306Initial program 99.6%
if -2e-255 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0Initial program 34.5%
Taylor expanded in z around inf 75.3%
associate--r+75.3%
+-commutative75.3%
associate--l+75.3%
associate-/r*86.3%
*-commutative86.3%
div-sub86.3%
associate-/r*86.4%
associate-/l*90.2%
Simplified90.2%
if 2.00000000000000003e306 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 28.3%
Taylor expanded in y around inf 20.1%
mul-1-neg20.1%
unsub-neg20.1%
Simplified20.1%
Taylor expanded in x around 0 61.6%
+-commutative61.6%
times-frac76.7%
Simplified76.7%
clear-num76.6%
clear-num76.6%
frac-times76.6%
metadata-eval76.6%
Applied egg-rr76.6%
*-commutative76.6%
associate-*l/76.6%
Simplified76.6%
Taylor expanded in z around inf 76.7%
div-sub76.7%
distribute-lft-out--76.7%
sub-neg76.7%
mul-1-neg76.7%
remove-double-neg76.7%
+-commutative76.7%
mul-1-neg76.7%
sub-neg76.7%
div-sub76.7%
Simplified76.7%
if +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 0.0%
Taylor expanded in z around inf 69.2%
Final simplification90.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y)))
(t_2 (/ (+ (* z (- t a)) (* x y)) (+ y (* z (- b y)))))
(t_3 (/ x (- 1.0 z))))
(if (<= t_2 -5e+249)
(+ t_3 (* (/ z y) (/ (- t a) (- 1.0 z))))
(if (<= t_2 -2e-255)
t_2
(if (<= t_2 0.0)
t_1
(if (<= t_2 2e+306)
t_2
(if (<= t_2 INFINITY) (+ t_3 (/ (- a t) y)) 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 = ((z * (t - a)) + (x * y)) / (y + (z * (b - y)));
double t_3 = x / (1.0 - z);
double tmp;
if (t_2 <= -5e+249) {
tmp = t_3 + ((z / y) * ((t - a) / (1.0 - z)));
} else if (t_2 <= -2e-255) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t_1;
} else if (t_2 <= 2e+306) {
tmp = t_2;
} else if (t_2 <= ((double) INFINITY)) {
tmp = t_3 + ((a - t) / y);
} else {
tmp = t_1;
}
return tmp;
}
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 = ((z * (t - a)) + (x * y)) / (y + (z * (b - y)));
double t_3 = x / (1.0 - z);
double tmp;
if (t_2 <= -5e+249) {
tmp = t_3 + ((z / y) * ((t - a) / (1.0 - z)));
} else if (t_2 <= -2e-255) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t_1;
} else if (t_2 <= 2e+306) {
tmp = t_2;
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = t_3 + ((a - t) / y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) t_2 = ((z * (t - a)) + (x * y)) / (y + (z * (b - y))) t_3 = x / (1.0 - z) tmp = 0 if t_2 <= -5e+249: tmp = t_3 + ((z / y) * ((t - a) / (1.0 - z))) elif t_2 <= -2e-255: tmp = t_2 elif t_2 <= 0.0: tmp = t_1 elif t_2 <= 2e+306: tmp = t_2 elif t_2 <= math.inf: tmp = t_3 + ((a - t) / y) 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(Float64(Float64(z * Float64(t - a)) + Float64(x * y)) / Float64(y + Float64(z * Float64(b - y)))) t_3 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (t_2 <= -5e+249) tmp = Float64(t_3 + Float64(Float64(z / y) * Float64(Float64(t - a) / Float64(1.0 - z)))); elseif (t_2 <= -2e-255) tmp = t_2; elseif (t_2 <= 0.0) tmp = t_1; elseif (t_2 <= 2e+306) tmp = t_2; elseif (t_2 <= Inf) tmp = Float64(t_3 + Float64(Float64(a - t) / y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); t_2 = ((z * (t - a)) + (x * y)) / (y + (z * (b - y))); t_3 = x / (1.0 - z); tmp = 0.0; if (t_2 <= -5e+249) tmp = t_3 + ((z / y) * ((t - a) / (1.0 - z))); elseif (t_2 <= -2e-255) tmp = t_2; elseif (t_2 <= 0.0) tmp = t_1; elseif (t_2 <= 2e+306) tmp = t_2; elseif (t_2 <= Inf) tmp = t_3 + ((a - t) / y); 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[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+249], N[(t$95$3 + N[(N[(z / y), $MachinePrecision] * N[(N[(t - a), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -2e-255], t$95$2, If[LessEqual[t$95$2, 0.0], t$95$1, If[LessEqual[t$95$2, 2e+306], t$95$2, If[LessEqual[t$95$2, Infinity], N[(t$95$3 + N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
t_2 := \frac{z \cdot \left(t - a\right) + x \cdot y}{y + z \cdot \left(b - y\right)}\\
t_3 := \frac{x}{1 - z}\\
\mathbf{if}\;t_2 \leq -5 \cdot 10^{+249}:\\
\;\;\;\;t_3 + \frac{z}{y} \cdot \frac{t - a}{1 - z}\\
\mathbf{elif}\;t_2 \leq -2 \cdot 10^{-255}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_2 \leq 0:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;t_3 + \frac{a - t}{y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -4.9999999999999996e249Initial program 54.8%
Taylor expanded in y around inf 46.3%
mul-1-neg46.3%
unsub-neg46.3%
Simplified46.3%
Taylor expanded in x around 0 70.2%
+-commutative70.2%
times-frac77.7%
Simplified77.7%
if -4.9999999999999996e249 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2e-255 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.00000000000000003e306Initial program 99.6%
if -2e-255 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0 or +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 15.5%
Taylor expanded in z around inf 73.7%
if 2.00000000000000003e306 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 28.3%
Taylor expanded in y around inf 20.1%
mul-1-neg20.1%
unsub-neg20.1%
Simplified20.1%
Taylor expanded in x around 0 61.6%
+-commutative61.6%
times-frac76.7%
Simplified76.7%
clear-num76.6%
clear-num76.6%
frac-times76.6%
metadata-eval76.6%
Applied egg-rr76.6%
*-commutative76.6%
associate-*l/76.6%
Simplified76.6%
Taylor expanded in z around inf 76.7%
div-sub76.7%
distribute-lft-out--76.7%
sub-neg76.7%
mul-1-neg76.7%
remove-double-neg76.7%
+-commutative76.7%
mul-1-neg76.7%
sub-neg76.7%
div-sub76.7%
Simplified76.7%
Final simplification89.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y)))
(t_2 (/ (+ (* z (- t a)) (* x y)) (+ y (* z (- b y)))))
(t_3 (/ x (- 1.0 z))))
(if (<= t_2 -5e+249)
(+ (/ 1.0 (/ (* (- 1.0 z) (/ y z)) (- t a))) t_3)
(if (<= t_2 -2e-255)
t_2
(if (<= t_2 0.0)
t_1
(if (<= t_2 2e+306)
t_2
(if (<= t_2 INFINITY) (+ t_3 (/ (- a t) y)) 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 = ((z * (t - a)) + (x * y)) / (y + (z * (b - y)));
double t_3 = x / (1.0 - z);
double tmp;
if (t_2 <= -5e+249) {
tmp = (1.0 / (((1.0 - z) * (y / z)) / (t - a))) + t_3;
} else if (t_2 <= -2e-255) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t_1;
} else if (t_2 <= 2e+306) {
tmp = t_2;
} else if (t_2 <= ((double) INFINITY)) {
tmp = t_3 + ((a - t) / y);
} else {
tmp = t_1;
}
return tmp;
}
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 = ((z * (t - a)) + (x * y)) / (y + (z * (b - y)));
double t_3 = x / (1.0 - z);
double tmp;
if (t_2 <= -5e+249) {
tmp = (1.0 / (((1.0 - z) * (y / z)) / (t - a))) + t_3;
} else if (t_2 <= -2e-255) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t_1;
} else if (t_2 <= 2e+306) {
tmp = t_2;
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = t_3 + ((a - t) / y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) t_2 = ((z * (t - a)) + (x * y)) / (y + (z * (b - y))) t_3 = x / (1.0 - z) tmp = 0 if t_2 <= -5e+249: tmp = (1.0 / (((1.0 - z) * (y / z)) / (t - a))) + t_3 elif t_2 <= -2e-255: tmp = t_2 elif t_2 <= 0.0: tmp = t_1 elif t_2 <= 2e+306: tmp = t_2 elif t_2 <= math.inf: tmp = t_3 + ((a - t) / y) 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(Float64(Float64(z * Float64(t - a)) + Float64(x * y)) / Float64(y + Float64(z * Float64(b - y)))) t_3 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (t_2 <= -5e+249) tmp = Float64(Float64(1.0 / Float64(Float64(Float64(1.0 - z) * Float64(y / z)) / Float64(t - a))) + t_3); elseif (t_2 <= -2e-255) tmp = t_2; elseif (t_2 <= 0.0) tmp = t_1; elseif (t_2 <= 2e+306) tmp = t_2; elseif (t_2 <= Inf) tmp = Float64(t_3 + Float64(Float64(a - t) / y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); t_2 = ((z * (t - a)) + (x * y)) / (y + (z * (b - y))); t_3 = x / (1.0 - z); tmp = 0.0; if (t_2 <= -5e+249) tmp = (1.0 / (((1.0 - z) * (y / z)) / (t - a))) + t_3; elseif (t_2 <= -2e-255) tmp = t_2; elseif (t_2 <= 0.0) tmp = t_1; elseif (t_2 <= 2e+306) tmp = t_2; elseif (t_2 <= Inf) tmp = t_3 + ((a - t) / y); 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[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+249], N[(N[(1.0 / N[(N[(N[(1.0 - z), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision], If[LessEqual[t$95$2, -2e-255], t$95$2, If[LessEqual[t$95$2, 0.0], t$95$1, If[LessEqual[t$95$2, 2e+306], t$95$2, If[LessEqual[t$95$2, Infinity], N[(t$95$3 + N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
t_2 := \frac{z \cdot \left(t - a\right) + x \cdot y}{y + z \cdot \left(b - y\right)}\\
t_3 := \frac{x}{1 - z}\\
\mathbf{if}\;t_2 \leq -5 \cdot 10^{+249}:\\
\;\;\;\;\frac{1}{\frac{\left(1 - z\right) \cdot \frac{y}{z}}{t - a}} + t_3\\
\mathbf{elif}\;t_2 \leq -2 \cdot 10^{-255}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_2 \leq 0:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;t_3 + \frac{a - t}{y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -4.9999999999999996e249Initial program 54.8%
Taylor expanded in y around inf 46.3%
mul-1-neg46.3%
unsub-neg46.3%
Simplified46.3%
Taylor expanded in x around 0 70.2%
+-commutative70.2%
times-frac77.7%
Simplified77.7%
clear-num77.7%
clear-num77.7%
frac-times77.7%
metadata-eval77.7%
Applied egg-rr77.7%
*-commutative77.7%
associate-*l/77.7%
Simplified77.7%
if -4.9999999999999996e249 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2e-255 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.00000000000000003e306Initial program 99.6%
if -2e-255 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0 or +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 15.5%
Taylor expanded in z around inf 73.7%
if 2.00000000000000003e306 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 28.3%
Taylor expanded in y around inf 20.1%
mul-1-neg20.1%
unsub-neg20.1%
Simplified20.1%
Taylor expanded in x around 0 61.6%
+-commutative61.6%
times-frac76.7%
Simplified76.7%
clear-num76.6%
clear-num76.6%
frac-times76.6%
metadata-eval76.6%
Applied egg-rr76.6%
*-commutative76.6%
associate-*l/76.6%
Simplified76.6%
Taylor expanded in z around inf 76.7%
div-sub76.7%
distribute-lft-out--76.7%
sub-neg76.7%
mul-1-neg76.7%
remove-double-neg76.7%
+-commutative76.7%
mul-1-neg76.7%
sub-neg76.7%
div-sub76.7%
Simplified76.7%
Final simplification89.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ x (- 1.0 z)) (* (/ z y) (/ (- t a) (- 1.0 z))))))
(if (<= y -8.8e-63)
t_1
(if (<= y -2e-150)
(+ (/ (* y (/ x b)) z) (/ (- t a) b))
(if (or (<= y -1.65e-187) (not (<= y 1.02e-53)))
t_1
(/ (- (+ t (/ x (/ z y))) a) b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x / (1.0 - z)) + ((z / y) * ((t - a) / (1.0 - z)));
double tmp;
if (y <= -8.8e-63) {
tmp = t_1;
} else if (y <= -2e-150) {
tmp = ((y * (x / b)) / z) + ((t - a) / b);
} else if ((y <= -1.65e-187) || !(y <= 1.02e-53)) {
tmp = t_1;
} else {
tmp = ((t + (x / (z / y))) - 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 = (x / (1.0d0 - z)) + ((z / y) * ((t - a) / (1.0d0 - z)))
if (y <= (-8.8d-63)) then
tmp = t_1
else if (y <= (-2d-150)) then
tmp = ((y * (x / b)) / z) + ((t - a) / b)
else if ((y <= (-1.65d-187)) .or. (.not. (y <= 1.02d-53))) then
tmp = t_1
else
tmp = ((t + (x / (z / y))) - 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 = (x / (1.0 - z)) + ((z / y) * ((t - a) / (1.0 - z)));
double tmp;
if (y <= -8.8e-63) {
tmp = t_1;
} else if (y <= -2e-150) {
tmp = ((y * (x / b)) / z) + ((t - a) / b);
} else if ((y <= -1.65e-187) || !(y <= 1.02e-53)) {
tmp = t_1;
} else {
tmp = ((t + (x / (z / y))) - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x / (1.0 - z)) + ((z / y) * ((t - a) / (1.0 - z))) tmp = 0 if y <= -8.8e-63: tmp = t_1 elif y <= -2e-150: tmp = ((y * (x / b)) / z) + ((t - a) / b) elif (y <= -1.65e-187) or not (y <= 1.02e-53): tmp = t_1 else: tmp = ((t + (x / (z / y))) - a) / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x / Float64(1.0 - z)) + Float64(Float64(z / y) * Float64(Float64(t - a) / Float64(1.0 - z)))) tmp = 0.0 if (y <= -8.8e-63) tmp = t_1; elseif (y <= -2e-150) tmp = Float64(Float64(Float64(y * Float64(x / b)) / z) + Float64(Float64(t - a) / b)); elseif ((y <= -1.65e-187) || !(y <= 1.02e-53)) tmp = t_1; else tmp = Float64(Float64(Float64(t + Float64(x / Float64(z / y))) - a) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x / (1.0 - z)) + ((z / y) * ((t - a) / (1.0 - z))); tmp = 0.0; if (y <= -8.8e-63) tmp = t_1; elseif (y <= -2e-150) tmp = ((y * (x / b)) / z) + ((t - a) / b); elseif ((y <= -1.65e-187) || ~((y <= 1.02e-53))) tmp = t_1; else tmp = ((t + (x / (z / y))) - a) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + N[(N[(z / y), $MachinePrecision] * N[(N[(t - a), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8.8e-63], t$95$1, If[LessEqual[y, -2e-150], N[(N[(N[(y * N[(x / b), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -1.65e-187], N[Not[LessEqual[y, 1.02e-53]], $MachinePrecision]], t$95$1, N[(N[(N[(t + N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision] / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z} + \frac{z}{y} \cdot \frac{t - a}{1 - z}\\
\mathbf{if}\;y \leq -8.8 \cdot 10^{-63}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -2 \cdot 10^{-150}:\\
\;\;\;\;\frac{y \cdot \frac{x}{b}}{z} + \frac{t - a}{b}\\
\mathbf{elif}\;y \leq -1.65 \cdot 10^{-187} \lor \neg \left(y \leq 1.02 \cdot 10^{-53}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(t + \frac{x}{\frac{z}{y}}\right) - a}{b}\\
\end{array}
\end{array}
if y < -8.7999999999999998e-63 or -2.00000000000000001e-150 < y < -1.65e-187 or 1.02000000000000002e-53 < y Initial program 61.7%
Taylor expanded in y around inf 55.3%
mul-1-neg55.3%
unsub-neg55.3%
Simplified55.3%
Taylor expanded in x around 0 70.1%
+-commutative70.1%
times-frac81.7%
Simplified81.7%
if -8.7999999999999998e-63 < y < -2.00000000000000001e-150Initial program 77.8%
div-inv77.5%
fma-def77.5%
+-commutative77.5%
fma-udef77.5%
Applied egg-rr77.5%
Taylor expanded in b around inf 66.8%
associate-/r*77.0%
Simplified77.0%
Taylor expanded in x around 0 78.8%
+-commutative78.8%
associate--l+78.8%
times-frac78.8%
div-sub78.8%
Simplified78.8%
associate-*r/89.0%
Applied egg-rr89.0%
if -1.65e-187 < y < 1.02000000000000002e-53Initial program 80.4%
div-inv80.3%
fma-def80.3%
+-commutative80.3%
fma-udef80.3%
Applied egg-rr80.3%
Taylor expanded in b around inf 59.8%
associate-/r*59.7%
Simplified59.7%
Taylor expanded in x around 0 75.7%
+-commutative75.7%
associate--l+75.7%
times-frac72.0%
div-sub72.0%
Simplified72.0%
Taylor expanded in b around 0 76.7%
associate-/l*77.3%
Simplified77.3%
Final simplification80.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ (* z (- t a)) (* x y)) y)) (t_2 (/ (- t a) (- b y))))
(if (<= z -1.9e-19)
t_2
(if (<= z -4.5e-93)
t_1
(if (<= z -1.55e-119) (/ (- t a) b) (if (<= z 2.2e-71) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((z * (t - a)) + (x * y)) / y;
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -1.9e-19) {
tmp = t_2;
} else if (z <= -4.5e-93) {
tmp = t_1;
} else if (z <= -1.55e-119) {
tmp = (t - a) / b;
} else if (z <= 2.2e-71) {
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 = ((z * (t - a)) + (x * y)) / y
t_2 = (t - a) / (b - y)
if (z <= (-1.9d-19)) then
tmp = t_2
else if (z <= (-4.5d-93)) then
tmp = t_1
else if (z <= (-1.55d-119)) then
tmp = (t - a) / b
else if (z <= 2.2d-71) 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 = ((z * (t - a)) + (x * y)) / y;
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -1.9e-19) {
tmp = t_2;
} else if (z <= -4.5e-93) {
tmp = t_1;
} else if (z <= -1.55e-119) {
tmp = (t - a) / b;
} else if (z <= 2.2e-71) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((z * (t - a)) + (x * y)) / y t_2 = (t - a) / (b - y) tmp = 0 if z <= -1.9e-19: tmp = t_2 elif z <= -4.5e-93: tmp = t_1 elif z <= -1.55e-119: tmp = (t - a) / b elif z <= 2.2e-71: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(z * Float64(t - a)) + Float64(x * y)) / y) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -1.9e-19) tmp = t_2; elseif (z <= -4.5e-93) tmp = t_1; elseif (z <= -1.55e-119) tmp = Float64(Float64(t - a) / b); elseif (z <= 2.2e-71) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((z * (t - a)) + (x * y)) / y; t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -1.9e-19) tmp = t_2; elseif (z <= -4.5e-93) tmp = t_1; elseif (z <= -1.55e-119) tmp = (t - a) / b; elseif (z <= 2.2e-71) 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[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.9e-19], t$95$2, If[LessEqual[z, -4.5e-93], t$95$1, If[LessEqual[z, -1.55e-119], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 2.2e-71], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot \left(t - a\right) + x \cdot y}{y}\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.9 \cdot 10^{-19}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -4.5 \cdot 10^{-93}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.55 \cdot 10^{-119}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-71}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -1.9e-19 or 2.19999999999999997e-71 < z Initial program 55.4%
Taylor expanded in z around inf 76.0%
if -1.9e-19 < z < -4.5000000000000002e-93 or -1.54999999999999989e-119 < z < 2.19999999999999997e-71Initial program 86.7%
Taylor expanded in z around 0 70.6%
if -4.5000000000000002e-93 < z < -1.54999999999999989e-119Initial program 71.3%
Taylor expanded in y around 0 62.2%
Final simplification73.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ (* z (- t a)) (* x y)) y)) (t_2 (/ (- t a) (- b y))))
(if (<= z -1.15e-21)
t_2
(if (<= z -2.55e-73)
t_1
(if (<= z -5.6e-119)
(/ (- (+ t (/ x (/ z y))) a) b)
(if (<= z 2.2e-71) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((z * (t - a)) + (x * y)) / y;
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -1.15e-21) {
tmp = t_2;
} else if (z <= -2.55e-73) {
tmp = t_1;
} else if (z <= -5.6e-119) {
tmp = ((t + (x / (z / y))) - a) / b;
} else if (z <= 2.2e-71) {
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 = ((z * (t - a)) + (x * y)) / y
t_2 = (t - a) / (b - y)
if (z <= (-1.15d-21)) then
tmp = t_2
else if (z <= (-2.55d-73)) then
tmp = t_1
else if (z <= (-5.6d-119)) then
tmp = ((t + (x / (z / y))) - a) / b
else if (z <= 2.2d-71) 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 = ((z * (t - a)) + (x * y)) / y;
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -1.15e-21) {
tmp = t_2;
} else if (z <= -2.55e-73) {
tmp = t_1;
} else if (z <= -5.6e-119) {
tmp = ((t + (x / (z / y))) - a) / b;
} else if (z <= 2.2e-71) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((z * (t - a)) + (x * y)) / y t_2 = (t - a) / (b - y) tmp = 0 if z <= -1.15e-21: tmp = t_2 elif z <= -2.55e-73: tmp = t_1 elif z <= -5.6e-119: tmp = ((t + (x / (z / y))) - a) / b elif z <= 2.2e-71: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(z * Float64(t - a)) + Float64(x * y)) / y) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -1.15e-21) tmp = t_2; elseif (z <= -2.55e-73) tmp = t_1; elseif (z <= -5.6e-119) tmp = Float64(Float64(Float64(t + Float64(x / Float64(z / y))) - a) / b); elseif (z <= 2.2e-71) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((z * (t - a)) + (x * y)) / y; t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -1.15e-21) tmp = t_2; elseif (z <= -2.55e-73) tmp = t_1; elseif (z <= -5.6e-119) tmp = ((t + (x / (z / y))) - a) / b; elseif (z <= 2.2e-71) 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[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.15e-21], t$95$2, If[LessEqual[z, -2.55e-73], t$95$1, If[LessEqual[z, -5.6e-119], N[(N[(N[(t + N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 2.2e-71], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot \left(t - a\right) + x \cdot y}{y}\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.15 \cdot 10^{-21}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -2.55 \cdot 10^{-73}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -5.6 \cdot 10^{-119}:\\
\;\;\;\;\frac{\left(t + \frac{x}{\frac{z}{y}}\right) - a}{b}\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-71}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -1.15e-21 or 2.19999999999999997e-71 < z Initial program 55.4%
Taylor expanded in z around inf 76.0%
if -1.15e-21 < z < -2.55e-73 or -5.6e-119 < z < 2.19999999999999997e-71Initial program 86.1%
Taylor expanded in z around 0 72.1%
if -2.55e-73 < z < -5.6e-119Initial program 80.6%
div-inv80.7%
fma-def80.7%
+-commutative80.7%
fma-udef80.7%
Applied egg-rr80.7%
Taylor expanded in b around inf 60.3%
associate-/r*60.7%
Simplified60.7%
Taylor expanded in x around 0 60.7%
+-commutative60.7%
associate--l+60.7%
times-frac60.7%
div-sub60.7%
Simplified60.7%
Taylor expanded in b around 0 60.8%
associate-/l*60.8%
Simplified60.8%
Final simplification73.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -5.4e-22) (not (<= z 2.2e-71))) (/ (- t a) (- b y)) (+ (/ x (- 1.0 z)) (/ 1.0 (/ (/ y z) (- t a))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5.4e-22) || !(z <= 2.2e-71)) {
tmp = (t - a) / (b - y);
} else {
tmp = (x / (1.0 - z)) + (1.0 / ((y / z) / (t - a)));
}
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-22)) .or. (.not. (z <= 2.2d-71))) then
tmp = (t - a) / (b - y)
else
tmp = (x / (1.0d0 - z)) + (1.0d0 / ((y / z) / (t - a)))
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-22) || !(z <= 2.2e-71)) {
tmp = (t - a) / (b - y);
} else {
tmp = (x / (1.0 - z)) + (1.0 / ((y / z) / (t - a)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -5.4e-22) or not (z <= 2.2e-71): tmp = (t - a) / (b - y) else: tmp = (x / (1.0 - z)) + (1.0 / ((y / z) / (t - a))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -5.4e-22) || !(z <= 2.2e-71)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(x / Float64(1.0 - z)) + Float64(1.0 / Float64(Float64(y / z) / Float64(t - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -5.4e-22) || ~((z <= 2.2e-71))) tmp = (t - a) / (b - y); else tmp = (x / (1.0 - z)) + (1.0 / ((y / z) / (t - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -5.4e-22], N[Not[LessEqual[z, 2.2e-71]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(N[(y / z), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.4 \cdot 10^{-22} \lor \neg \left(z \leq 2.2 \cdot 10^{-71}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 - z} + \frac{1}{\frac{\frac{y}{z}}{t - a}}\\
\end{array}
\end{array}
if z < -5.4000000000000004e-22 or 2.19999999999999997e-71 < z Initial program 55.4%
Taylor expanded in z around inf 76.0%
if -5.4000000000000004e-22 < z < 2.19999999999999997e-71Initial program 85.4%
Taylor expanded in y around inf 65.8%
mul-1-neg65.8%
unsub-neg65.8%
Simplified65.8%
Taylor expanded in x around 0 77.0%
+-commutative77.0%
times-frac77.0%
Simplified77.0%
clear-num77.0%
clear-num77.0%
frac-times77.0%
metadata-eval77.0%
Applied egg-rr77.0%
*-commutative77.0%
associate-*l/77.1%
Simplified77.1%
Taylor expanded in z around 0 77.1%
Final simplification76.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.3e-19) (not (<= z 2.2e-71))) (/ (- t a) (- b y)) (+ (/ x (- 1.0 z)) (* (- t a) (/ z y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.3e-19) || !(z <= 2.2e-71)) {
tmp = (t - a) / (b - y);
} else {
tmp = (x / (1.0 - z)) + ((t - a) * (z / 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 <= (-2.3d-19)) .or. (.not. (z <= 2.2d-71))) then
tmp = (t - a) / (b - y)
else
tmp = (x / (1.0d0 - z)) + ((t - a) * (z / 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 <= -2.3e-19) || !(z <= 2.2e-71)) {
tmp = (t - a) / (b - y);
} else {
tmp = (x / (1.0 - z)) + ((t - a) * (z / y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.3e-19) or not (z <= 2.2e-71): tmp = (t - a) / (b - y) else: tmp = (x / (1.0 - z)) + ((t - a) * (z / y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.3e-19) || !(z <= 2.2e-71)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(x / Float64(1.0 - z)) + Float64(Float64(t - a) * Float64(z / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -2.3e-19) || ~((z <= 2.2e-71))) tmp = (t - a) / (b - y); else tmp = (x / (1.0 - z)) + ((t - a) * (z / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.3e-19], N[Not[LessEqual[z, 2.2e-71]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{-19} \lor \neg \left(z \leq 2.2 \cdot 10^{-71}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 - z} + \left(t - a\right) \cdot \frac{z}{y}\\
\end{array}
\end{array}
if z < -2.2999999999999998e-19 or 2.19999999999999997e-71 < z Initial program 55.4%
Taylor expanded in z around inf 76.0%
if -2.2999999999999998e-19 < z < 2.19999999999999997e-71Initial program 85.4%
Taylor expanded in y around inf 65.8%
mul-1-neg65.8%
unsub-neg65.8%
Simplified65.8%
Taylor expanded in x around 0 77.0%
+-commutative77.0%
times-frac77.0%
Simplified77.0%
Taylor expanded in z around 0 77.0%
Final simplification76.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -3.8e+175)
t_1
(if (<= y -4e+123)
(/ t (- b y))
(if (or (<= y -2.05e-58) (not (<= y 2.05e-16)))
t_1
(- (/ t b) (/ a b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -3.8e+175) {
tmp = t_1;
} else if (y <= -4e+123) {
tmp = t / (b - y);
} else if ((y <= -2.05e-58) || !(y <= 2.05e-16)) {
tmp = t_1;
} else {
tmp = (t / b) - (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 = x / (1.0d0 - z)
if (y <= (-3.8d+175)) then
tmp = t_1
else if (y <= (-4d+123)) then
tmp = t / (b - y)
else if ((y <= (-2.05d-58)) .or. (.not. (y <= 2.05d-16))) then
tmp = t_1
else
tmp = (t / b) - (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 = x / (1.0 - z);
double tmp;
if (y <= -3.8e+175) {
tmp = t_1;
} else if (y <= -4e+123) {
tmp = t / (b - y);
} else if ((y <= -2.05e-58) || !(y <= 2.05e-16)) {
tmp = t_1;
} else {
tmp = (t / b) - (a / b);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -3.8e+175: tmp = t_1 elif y <= -4e+123: tmp = t / (b - y) elif (y <= -2.05e-58) or not (y <= 2.05e-16): tmp = t_1 else: tmp = (t / b) - (a / b) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -3.8e+175) tmp = t_1; elseif (y <= -4e+123) tmp = Float64(t / Float64(b - y)); elseif ((y <= -2.05e-58) || !(y <= 2.05e-16)) tmp = t_1; else tmp = Float64(Float64(t / b) - Float64(a / b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); tmp = 0.0; if (y <= -3.8e+175) tmp = t_1; elseif (y <= -4e+123) tmp = t / (b - y); elseif ((y <= -2.05e-58) || ~((y <= 2.05e-16))) tmp = t_1; else tmp = (t / b) - (a / b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.8e+175], t$95$1, If[LessEqual[y, -4e+123], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -2.05e-58], N[Not[LessEqual[y, 2.05e-16]], $MachinePrecision]], t$95$1, N[(N[(t / b), $MachinePrecision] - N[(a / b), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -3.8 \cdot 10^{+175}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -4 \cdot 10^{+123}:\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{elif}\;y \leq -2.05 \cdot 10^{-58} \lor \neg \left(y \leq 2.05 \cdot 10^{-16}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b} - \frac{a}{b}\\
\end{array}
\end{array}
if y < -3.7999999999999997e175 or -3.99999999999999991e123 < y < -2.05000000000000014e-58 or 2.05000000000000003e-16 < y Initial program 59.1%
Taylor expanded in y around inf 59.0%
mul-1-neg59.0%
unsub-neg59.0%
Simplified59.0%
if -3.7999999999999997e175 < y < -3.99999999999999991e123Initial program 51.6%
Taylor expanded in t around inf 22.1%
*-commutative22.1%
Simplified22.1%
Taylor expanded in z around inf 50.2%
if -2.05000000000000014e-58 < y < 2.05000000000000003e-16Initial program 81.8%
div-inv81.7%
fma-def81.7%
+-commutative81.7%
fma-udef81.7%
Applied egg-rr81.7%
Taylor expanded in b around inf 55.6%
associate-/r*56.3%
Simplified56.3%
Taylor expanded in x around 0 70.1%
+-commutative70.1%
associate--l+70.1%
times-frac67.2%
div-sub67.2%
Simplified67.2%
Taylor expanded in x around 0 60.4%
Final simplification59.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -1.65e-56)
t_1
(if (<= z -6.5e-93)
(/ (* x y) (+ y (* z (- b y))))
(if (<= z -5.6e-119)
(/ (- t a) b)
(if (<= z 1.5e-71) (+ x (* x z)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -1.65e-56) {
tmp = t_1;
} else if (z <= -6.5e-93) {
tmp = (x * y) / (y + (z * (b - y)));
} else if (z <= -5.6e-119) {
tmp = (t - a) / b;
} else if (z <= 1.5e-71) {
tmp = x + (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 = (t - a) / (b - y)
if (z <= (-1.65d-56)) then
tmp = t_1
else if (z <= (-6.5d-93)) then
tmp = (x * y) / (y + (z * (b - y)))
else if (z <= (-5.6d-119)) then
tmp = (t - a) / b
else if (z <= 1.5d-71) then
tmp = x + (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 = (t - a) / (b - y);
double tmp;
if (z <= -1.65e-56) {
tmp = t_1;
} else if (z <= -6.5e-93) {
tmp = (x * y) / (y + (z * (b - y)));
} else if (z <= -5.6e-119) {
tmp = (t - a) / b;
} else if (z <= 1.5e-71) {
tmp = x + (x * z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -1.65e-56: tmp = t_1 elif z <= -6.5e-93: tmp = (x * y) / (y + (z * (b - y))) elif z <= -5.6e-119: tmp = (t - a) / b elif z <= 1.5e-71: tmp = x + (x * z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -1.65e-56) tmp = t_1; elseif (z <= -6.5e-93) tmp = Float64(Float64(x * y) / Float64(y + Float64(z * Float64(b - y)))); elseif (z <= -5.6e-119) tmp = Float64(Float64(t - a) / b); elseif (z <= 1.5e-71) tmp = Float64(x + Float64(x * z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -1.65e-56) tmp = t_1; elseif (z <= -6.5e-93) tmp = (x * y) / (y + (z * (b - y))); elseif (z <= -5.6e-119) tmp = (t - a) / b; elseif (z <= 1.5e-71) tmp = x + (x * z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.65e-56], t$95$1, If[LessEqual[z, -6.5e-93], N[(N[(x * y), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.6e-119], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[z, 1.5e-71], N[(x + N[(x * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.65 \cdot 10^{-56}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -6.5 \cdot 10^{-93}:\\
\;\;\;\;\frac{x \cdot y}{y + z \cdot \left(b - y\right)}\\
\mathbf{elif}\;z \leq -5.6 \cdot 10^{-119}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{-71}:\\
\;\;\;\;x + x \cdot z\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.64999999999999992e-56 or 1.5000000000000001e-71 < z Initial program 57.5%
Taylor expanded in z around inf 74.0%
if -1.64999999999999992e-56 < z < -6.5e-93Initial program 92.2%
Taylor expanded in x around inf 60.1%
*-commutative60.1%
Simplified60.1%
if -6.5e-93 < z < -5.6e-119Initial program 71.3%
Taylor expanded in y around 0 62.2%
if -5.6e-119 < z < 1.5000000000000001e-71Initial program 84.9%
Taylor expanded in y around inf 62.2%
mul-1-neg62.2%
unsub-neg62.2%
Simplified62.2%
Taylor expanded in z around 0 62.2%
*-commutative62.2%
Simplified62.2%
Final simplification68.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -3.5e+175)
t_1
(if (<= y -4e+123)
(/ t (- b y))
(if (or (<= y -3.8e-57) (not (<= y 2.5e-14))) t_1 (/ (- t a) b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -3.5e+175) {
tmp = t_1;
} else if (y <= -4e+123) {
tmp = t / (b - y);
} else if ((y <= -3.8e-57) || !(y <= 2.5e-14)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x / (1.0d0 - z)
if (y <= (-3.5d+175)) then
tmp = t_1
else if (y <= (-4d+123)) then
tmp = t / (b - y)
else if ((y <= (-3.8d-57)) .or. (.not. (y <= 2.5d-14))) then
tmp = t_1
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 t_1 = x / (1.0 - z);
double tmp;
if (y <= -3.5e+175) {
tmp = t_1;
} else if (y <= -4e+123) {
tmp = t / (b - y);
} else if ((y <= -3.8e-57) || !(y <= 2.5e-14)) {
tmp = t_1;
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -3.5e+175: tmp = t_1 elif y <= -4e+123: tmp = t / (b - y) elif (y <= -3.8e-57) or not (y <= 2.5e-14): tmp = t_1 else: tmp = (t - a) / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -3.5e+175) tmp = t_1; elseif (y <= -4e+123) tmp = Float64(t / Float64(b - y)); elseif ((y <= -3.8e-57) || !(y <= 2.5e-14)) tmp = t_1; else tmp = Float64(Float64(t - a) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); tmp = 0.0; if (y <= -3.5e+175) tmp = t_1; elseif (y <= -4e+123) tmp = t / (b - y); elseif ((y <= -3.8e-57) || ~((y <= 2.5e-14))) tmp = t_1; else tmp = (t - a) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.5e+175], t$95$1, If[LessEqual[y, -4e+123], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -3.8e-57], N[Not[LessEqual[y, 2.5e-14]], $MachinePrecision]], t$95$1, N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -3.5 \cdot 10^{+175}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -4 \cdot 10^{+123}:\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{elif}\;y \leq -3.8 \cdot 10^{-57} \lor \neg \left(y \leq 2.5 \cdot 10^{-14}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -3.5000000000000003e175 or -3.99999999999999991e123 < y < -3.7999999999999997e-57 or 2.5000000000000001e-14 < y Initial program 59.1%
Taylor expanded in y around inf 59.0%
mul-1-neg59.0%
unsub-neg59.0%
Simplified59.0%
if -3.5000000000000003e175 < y < -3.99999999999999991e123Initial program 51.6%
Taylor expanded in t around inf 22.1%
*-commutative22.1%
Simplified22.1%
Taylor expanded in z around inf 50.2%
if -3.7999999999999997e-57 < y < 2.5000000000000001e-14Initial program 81.8%
Taylor expanded in y around 0 60.4%
Final simplification59.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- a) b)))
(if (<= z -1.9e+156)
t_1
(if (<= z -9.5e+55)
(/ a y)
(if (<= z -5.8e-6) (/ t b) (if (<= z 1.35e-71) (+ x (* x z)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -a / b;
double tmp;
if (z <= -1.9e+156) {
tmp = t_1;
} else if (z <= -9.5e+55) {
tmp = a / y;
} else if (z <= -5.8e-6) {
tmp = t / b;
} else if (z <= 1.35e-71) {
tmp = x + (x * z);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = -a / b
if (z <= (-1.9d+156)) then
tmp = t_1
else if (z <= (-9.5d+55)) then
tmp = a / y
else if (z <= (-5.8d-6)) then
tmp = t / b
else if (z <= 1.35d-71) then
tmp = x + (x * z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -a / b;
double tmp;
if (z <= -1.9e+156) {
tmp = t_1;
} else if (z <= -9.5e+55) {
tmp = a / y;
} else if (z <= -5.8e-6) {
tmp = t / b;
} else if (z <= 1.35e-71) {
tmp = x + (x * z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = -a / b tmp = 0 if z <= -1.9e+156: tmp = t_1 elif z <= -9.5e+55: tmp = a / y elif z <= -5.8e-6: tmp = t / b elif z <= 1.35e-71: tmp = x + (x * z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(-a) / b) tmp = 0.0 if (z <= -1.9e+156) tmp = t_1; elseif (z <= -9.5e+55) tmp = Float64(a / y); elseif (z <= -5.8e-6) tmp = Float64(t / b); elseif (z <= 1.35e-71) tmp = Float64(x + Float64(x * z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = -a / b; tmp = 0.0; if (z <= -1.9e+156) tmp = t_1; elseif (z <= -9.5e+55) tmp = a / y; elseif (z <= -5.8e-6) tmp = t / b; elseif (z <= 1.35e-71) tmp = x + (x * z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-a) / b), $MachinePrecision]}, If[LessEqual[z, -1.9e+156], t$95$1, If[LessEqual[z, -9.5e+55], N[(a / y), $MachinePrecision], If[LessEqual[z, -5.8e-6], N[(t / b), $MachinePrecision], If[LessEqual[z, 1.35e-71], N[(x + N[(x * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-a}{b}\\
\mathbf{if}\;z \leq -1.9 \cdot 10^{+156}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -9.5 \cdot 10^{+55}:\\
\;\;\;\;\frac{a}{y}\\
\mathbf{elif}\;z \leq -5.8 \cdot 10^{-6}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{-71}:\\
\;\;\;\;x + x \cdot z\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.90000000000000012e156 or 1.3500000000000001e-71 < z Initial program 46.9%
div-inv46.8%
fma-def46.8%
+-commutative46.8%
fma-udef46.8%
Applied egg-rr46.8%
Taylor expanded in b around inf 30.0%
associate-/r*31.6%
Simplified31.6%
Taylor expanded in a around inf 31.9%
mul-1-neg31.9%
distribute-neg-frac31.9%
Simplified31.9%
if -1.90000000000000012e156 < z < -9.49999999999999989e55Initial program 74.0%
Taylor expanded in y around inf 47.6%
mul-1-neg47.6%
unsub-neg47.6%
Simplified47.6%
Taylor expanded in z around inf 60.7%
associate-*r/60.7%
mul-1-neg60.7%
Simplified60.7%
Taylor expanded in t around 0 47.6%
if -9.49999999999999989e55 < z < -5.8000000000000004e-6Initial program 80.2%
Taylor expanded in t around inf 54.7%
*-commutative54.7%
Simplified54.7%
Taylor expanded in y around 0 42.2%
if -5.8000000000000004e-6 < z < 1.3500000000000001e-71Initial program 86.0%
Taylor expanded in y around inf 54.5%
mul-1-neg54.5%
unsub-neg54.5%
Simplified54.5%
Taylor expanded in z around 0 54.3%
*-commutative54.3%
Simplified54.3%
Final simplification44.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- a) b)))
(if (<= z -3.1e+156)
t_1
(if (<= z -9.2e+55)
(/ a y)
(if (<= z -1.05e-84) (/ t b) (if (<= z 1.9e-71) x t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -a / b;
double tmp;
if (z <= -3.1e+156) {
tmp = t_1;
} else if (z <= -9.2e+55) {
tmp = a / y;
} else if (z <= -1.05e-84) {
tmp = t / b;
} else if (z <= 1.9e-71) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = -a / b
if (z <= (-3.1d+156)) then
tmp = t_1
else if (z <= (-9.2d+55)) then
tmp = a / y
else if (z <= (-1.05d-84)) then
tmp = t / b
else if (z <= 1.9d-71) then
tmp = x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -a / b;
double tmp;
if (z <= -3.1e+156) {
tmp = t_1;
} else if (z <= -9.2e+55) {
tmp = a / y;
} else if (z <= -1.05e-84) {
tmp = t / b;
} else if (z <= 1.9e-71) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = -a / b tmp = 0 if z <= -3.1e+156: tmp = t_1 elif z <= -9.2e+55: tmp = a / y elif z <= -1.05e-84: tmp = t / b elif z <= 1.9e-71: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(-a) / b) tmp = 0.0 if (z <= -3.1e+156) tmp = t_1; elseif (z <= -9.2e+55) tmp = Float64(a / y); elseif (z <= -1.05e-84) tmp = Float64(t / b); elseif (z <= 1.9e-71) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = -a / b; tmp = 0.0; if (z <= -3.1e+156) tmp = t_1; elseif (z <= -9.2e+55) tmp = a / y; elseif (z <= -1.05e-84) tmp = t / b; elseif (z <= 1.9e-71) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-a) / b), $MachinePrecision]}, If[LessEqual[z, -3.1e+156], t$95$1, If[LessEqual[z, -9.2e+55], N[(a / y), $MachinePrecision], If[LessEqual[z, -1.05e-84], N[(t / b), $MachinePrecision], If[LessEqual[z, 1.9e-71], x, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-a}{b}\\
\mathbf{if}\;z \leq -3.1 \cdot 10^{+156}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -9.2 \cdot 10^{+55}:\\
\;\;\;\;\frac{a}{y}\\
\mathbf{elif}\;z \leq -1.05 \cdot 10^{-84}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{-71}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -3.1000000000000002e156 or 1.89999999999999996e-71 < z Initial program 46.9%
div-inv46.8%
fma-def46.8%
+-commutative46.8%
fma-udef46.8%
Applied egg-rr46.8%
Taylor expanded in b around inf 30.0%
associate-/r*31.6%
Simplified31.6%
Taylor expanded in a around inf 31.9%
mul-1-neg31.9%
distribute-neg-frac31.9%
Simplified31.9%
if -3.1000000000000002e156 < z < -9.1999999999999995e55Initial program 74.0%
Taylor expanded in y around inf 47.6%
mul-1-neg47.6%
unsub-neg47.6%
Simplified47.6%
Taylor expanded in z around inf 60.7%
associate-*r/60.7%
mul-1-neg60.7%
Simplified60.7%
Taylor expanded in t around 0 47.6%
if -9.1999999999999995e55 < z < -1.04999999999999999e-84Initial program 89.4%
Taylor expanded in t around inf 47.1%
*-commutative47.1%
Simplified47.1%
Taylor expanded in y around 0 30.8%
if -1.04999999999999999e-84 < z < 1.89999999999999996e-71Initial program 83.8%
Taylor expanded in z around 0 60.9%
Final simplification44.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3.8e-119) (not (<= z 1.2e-71))) (/ (- t a) (- b y)) (+ x (* x z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.8e-119) || !(z <= 1.2e-71)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + (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 ((z <= (-3.8d-119)) .or. (.not. (z <= 1.2d-71))) then
tmp = (t - a) / (b - y)
else
tmp = x + (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 ((z <= -3.8e-119) || !(z <= 1.2e-71)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + (x * z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.8e-119) or not (z <= 1.2e-71): tmp = (t - a) / (b - y) else: tmp = x + (x * z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.8e-119) || !(z <= 1.2e-71)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x + Float64(x * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -3.8e-119) || ~((z <= 1.2e-71))) tmp = (t - a) / (b - y); else tmp = x + (x * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.8e-119], N[Not[LessEqual[z, 1.2e-71]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(x * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{-119} \lor \neg \left(z \leq 1.2 \cdot 10^{-71}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + x \cdot z\\
\end{array}
\end{array}
if z < -3.79999999999999975e-119 or 1.2e-71 < z Initial program 60.8%
Taylor expanded in z around inf 69.6%
if -3.79999999999999975e-119 < z < 1.2e-71Initial program 84.9%
Taylor expanded in y around inf 62.2%
mul-1-neg62.2%
unsub-neg62.2%
Simplified62.2%
Taylor expanded in z around 0 62.2%
*-commutative62.2%
Simplified62.2%
Final simplification67.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3.7e-6) (not (<= z 5.1e-55))) (/ t (- b y)) (+ x (* x z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.7e-6) || !(z <= 5.1e-55)) {
tmp = t / (b - y);
} else {
tmp = x + (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 ((z <= (-3.7d-6)) .or. (.not. (z <= 5.1d-55))) then
tmp = t / (b - y)
else
tmp = x + (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 ((z <= -3.7e-6) || !(z <= 5.1e-55)) {
tmp = t / (b - y);
} else {
tmp = x + (x * z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.7e-6) or not (z <= 5.1e-55): tmp = t / (b - y) else: tmp = x + (x * z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.7e-6) || !(z <= 5.1e-55)) tmp = Float64(t / Float64(b - y)); else tmp = Float64(x + Float64(x * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -3.7e-6) || ~((z <= 5.1e-55))) tmp = t / (b - y); else tmp = x + (x * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.7e-6], N[Not[LessEqual[z, 5.1e-55]], $MachinePrecision]], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(x * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.7 \cdot 10^{-6} \lor \neg \left(z \leq 5.1 \cdot 10^{-55}\right):\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + x \cdot z\\
\end{array}
\end{array}
if z < -3.7000000000000002e-6 or 5.09999999999999995e-55 < z Initial program 52.6%
Taylor expanded in t around inf 28.7%
*-commutative28.7%
Simplified28.7%
Taylor expanded in z around inf 42.3%
if -3.7000000000000002e-6 < z < 5.09999999999999995e-55Initial program 86.3%
Taylor expanded in y around inf 54.0%
mul-1-neg54.0%
unsub-neg54.0%
Simplified54.0%
Taylor expanded in z around 0 53.8%
*-commutative53.8%
Simplified53.8%
Final simplification48.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -4.2e-6) (not (<= z 5.4e-55))) (/ t (- b y)) (/ x (- 1.0 z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4.2e-6) || !(z <= 5.4e-55)) {
tmp = t / (b - y);
} 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) :: tmp
if ((z <= (-4.2d-6)) .or. (.not. (z <= 5.4d-55))) then
tmp = t / (b - y)
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 tmp;
if ((z <= -4.2e-6) || !(z <= 5.4e-55)) {
tmp = t / (b - y);
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -4.2e-6) or not (z <= 5.4e-55): tmp = t / (b - y) else: tmp = x / (1.0 - z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -4.2e-6) || !(z <= 5.4e-55)) tmp = Float64(t / Float64(b - y)); else tmp = Float64(x / Float64(1.0 - z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -4.2e-6) || ~((z <= 5.4e-55))) tmp = t / (b - y); else tmp = x / (1.0 - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -4.2e-6], N[Not[LessEqual[z, 5.4e-55]], $MachinePrecision]], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{-6} \lor \neg \left(z \leq 5.4 \cdot 10^{-55}\right):\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 - z}\\
\end{array}
\end{array}
if z < -4.1999999999999996e-6 or 5.40000000000000008e-55 < z Initial program 52.6%
Taylor expanded in t around inf 28.7%
*-commutative28.7%
Simplified28.7%
Taylor expanded in z around inf 42.3%
if -4.1999999999999996e-6 < z < 5.40000000000000008e-55Initial program 86.3%
Taylor expanded in y around inf 54.0%
mul-1-neg54.0%
unsub-neg54.0%
Simplified54.0%
Final simplification48.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -650.0) (not (<= z 1.2e-32))) (/ a y) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -650.0) || !(z <= 1.2e-32)) {
tmp = a / y;
} 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 <= (-650.0d0)) .or. (.not. (z <= 1.2d-32))) then
tmp = a / y
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 <= -650.0) || !(z <= 1.2e-32)) {
tmp = a / y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -650.0) or not (z <= 1.2e-32): tmp = a / y else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -650.0) || !(z <= 1.2e-32)) tmp = Float64(a / y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -650.0) || ~((z <= 1.2e-32))) tmp = a / y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -650.0], N[Not[LessEqual[z, 1.2e-32]], $MachinePrecision]], N[(a / y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -650 \lor \neg \left(z \leq 1.2 \cdot 10^{-32}\right):\\
\;\;\;\;\frac{a}{y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -650 or 1.2000000000000001e-32 < z Initial program 49.9%
Taylor expanded in y around inf 25.7%
mul-1-neg25.7%
unsub-neg25.7%
Simplified25.7%
Taylor expanded in z around inf 34.5%
associate-*r/34.5%
mul-1-neg34.5%
Simplified34.5%
Taylor expanded in t around 0 17.0%
if -650 < z < 1.2000000000000001e-32Initial program 86.5%
Taylor expanded in z around 0 50.7%
Final simplification34.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.05e-84) (not (<= z 1.85e-36))) (/ t b) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.05e-84) || !(z <= 1.85e-36)) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-1.05d-84)) .or. (.not. (z <= 1.85d-36))) then
tmp = t / b
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.05e-84) || !(z <= 1.85e-36)) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.05e-84) or not (z <= 1.85e-36): tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.05e-84) || !(z <= 1.85e-36)) tmp = Float64(t / b); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.05e-84) || ~((z <= 1.85e-36))) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.05e-84], N[Not[LessEqual[z, 1.85e-36]], $MachinePrecision]], N[(t / b), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{-84} \lor \neg \left(z \leq 1.85 \cdot 10^{-36}\right):\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.04999999999999999e-84 or 1.85000000000000001e-36 < z Initial program 58.4%
Taylor expanded in t around inf 30.7%
*-commutative30.7%
Simplified30.7%
Taylor expanded in y around 0 27.5%
if -1.04999999999999999e-84 < z < 1.85000000000000001e-36Initial program 84.0%
Taylor expanded in z around 0 58.9%
Final simplification40.8%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 69.2%
Taylor expanded in z around 0 28.4%
Final simplification28.4%
(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 2023310
(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)))))