
(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 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
def code(x, y, z, t, a, b): return ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2
(+
(+ (* (/ y z) (/ x (- b y))) (/ (- t a) (- b y)))
(* (/ y z) (/ (- a t) (pow (- b y) 2.0)))))
(t_3 (* z (- t a)))
(t_4 (/ (+ (* x y) t_3) t_1))
(t_5 (- (/ (- a t) y) (/ x (+ z -1.0)))))
(if (<= t_4 (- INFINITY))
t_5
(if (<= t_4 -5e-306)
(+ (/ (* x y) t_1) (/ t_3 t_1))
(if (<= t_4 4e-303)
t_2
(if (<= t_4 2e+274) t_4 (if (<= t_4 INFINITY) t_5 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 = (((y / z) * (x / (b - y))) + ((t - a) / (b - y))) + ((y / z) * ((a - t) / pow((b - y), 2.0)));
double t_3 = z * (t - a);
double t_4 = ((x * y) + t_3) / t_1;
double t_5 = ((a - t) / y) - (x / (z + -1.0));
double tmp;
if (t_4 <= -((double) INFINITY)) {
tmp = t_5;
} else if (t_4 <= -5e-306) {
tmp = ((x * y) / t_1) + (t_3 / t_1);
} else if (t_4 <= 4e-303) {
tmp = t_2;
} else if (t_4 <= 2e+274) {
tmp = t_4;
} else if (t_4 <= ((double) INFINITY)) {
tmp = t_5;
} 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 = y + (z * (b - y));
double t_2 = (((y / z) * (x / (b - y))) + ((t - a) / (b - y))) + ((y / z) * ((a - t) / Math.pow((b - y), 2.0)));
double t_3 = z * (t - a);
double t_4 = ((x * y) + t_3) / t_1;
double t_5 = ((a - t) / y) - (x / (z + -1.0));
double tmp;
if (t_4 <= -Double.POSITIVE_INFINITY) {
tmp = t_5;
} else if (t_4 <= -5e-306) {
tmp = ((x * y) / t_1) + (t_3 / t_1);
} else if (t_4 <= 4e-303) {
tmp = t_2;
} else if (t_4 <= 2e+274) {
tmp = t_4;
} else if (t_4 <= Double.POSITIVE_INFINITY) {
tmp = t_5;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = (((y / z) * (x / (b - y))) + ((t - a) / (b - y))) + ((y / z) * ((a - t) / math.pow((b - y), 2.0))) t_3 = z * (t - a) t_4 = ((x * y) + t_3) / t_1 t_5 = ((a - t) / y) - (x / (z + -1.0)) tmp = 0 if t_4 <= -math.inf: tmp = t_5 elif t_4 <= -5e-306: tmp = ((x * y) / t_1) + (t_3 / t_1) elif t_4 <= 4e-303: tmp = t_2 elif t_4 <= 2e+274: tmp = t_4 elif t_4 <= math.inf: tmp = t_5 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(Float64(Float64(Float64(y / z) * Float64(x / Float64(b - y))) + Float64(Float64(t - a) / Float64(b - y))) + Float64(Float64(y / z) * Float64(Float64(a - t) / (Float64(b - y) ^ 2.0)))) t_3 = Float64(z * Float64(t - a)) t_4 = Float64(Float64(Float64(x * y) + t_3) / t_1) t_5 = Float64(Float64(Float64(a - t) / y) - Float64(x / Float64(z + -1.0))) tmp = 0.0 if (t_4 <= Float64(-Inf)) tmp = t_5; elseif (t_4 <= -5e-306) tmp = Float64(Float64(Float64(x * y) / t_1) + Float64(t_3 / t_1)); elseif (t_4 <= 4e-303) tmp = t_2; elseif (t_4 <= 2e+274) tmp = t_4; elseif (t_4 <= Inf) tmp = t_5; 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 = (((y / z) * (x / (b - y))) + ((t - a) / (b - y))) + ((y / z) * ((a - t) / ((b - y) ^ 2.0))); t_3 = z * (t - a); t_4 = ((x * y) + t_3) / t_1; t_5 = ((a - t) / y) - (x / (z + -1.0)); tmp = 0.0; if (t_4 <= -Inf) tmp = t_5; elseif (t_4 <= -5e-306) tmp = ((x * y) / t_1) + (t_3 / t_1); elseif (t_4 <= 4e-303) tmp = t_2; elseif (t_4 <= 2e+274) tmp = t_4; elseif (t_4 <= Inf) tmp = t_5; 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[(N[(N[(N[(y / z), $MachinePrecision] * N[(x / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y / z), $MachinePrecision] * N[(N[(a - t), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(x * y), $MachinePrecision] + t$95$3), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], t$95$5, If[LessEqual[t$95$4, -5e-306], N[(N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(t$95$3 / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 4e-303], t$95$2, If[LessEqual[t$95$4, 2e+274], t$95$4, If[LessEqual[t$95$4, Infinity], t$95$5, t$95$2]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \left(\frac{y}{z} \cdot \frac{x}{b - y} + \frac{t - a}{b - y}\right) + \frac{y}{z} \cdot \frac{a - t}{{\left(b - y\right)}^{2}}\\
t_3 := z \cdot \left(t - a\right)\\
t_4 := \frac{x \cdot y + t_3}{t_1}\\
t_5 := \frac{a - t}{y} - \frac{x}{z + -1}\\
\mathbf{if}\;t_4 \leq -\infty:\\
\;\;\;\;t_5\\
\mathbf{elif}\;t_4 \leq -5 \cdot 10^{-306}:\\
\;\;\;\;\frac{x \cdot y}{t_1} + \frac{t_3}{t_1}\\
\mathbf{elif}\;t_4 \leq 4 \cdot 10^{-303}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_4 \leq 2 \cdot 10^{+274}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t_4 \leq \infty:\\
\;\;\;\;t_5\\
\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)))) < -inf.0 or 1.99999999999999984e274 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 28.8%
Taylor expanded in y around -inf 48.0%
mul-1-neg48.0%
unsub-neg48.0%
associate-*r/48.0%
neg-mul-148.0%
sub-neg48.0%
metadata-eval48.0%
Simplified59.3%
Taylor expanded in z around inf 69.7%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -4.99999999999999998e-306Initial program 99.5%
Taylor expanded in x around 0 99.5%
if -4.99999999999999998e-306 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 3.99999999999999972e-303 or +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 9.0%
Taylor expanded in z around inf 48.6%
associate--r+48.6%
+-commutative48.6%
associate--l+48.6%
*-commutative48.6%
times-frac67.9%
div-sub67.9%
times-frac96.4%
Simplified96.4%
if 3.99999999999999972e-303 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1.99999999999999984e274Initial program 99.8%
Final simplification92.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
(t_2 (- (/ (- a t) y) (/ x (+ z -1.0)))))
(if (<= t_1 (- INFINITY))
t_2
(if (<= t_1 -5e-306)
t_1
(if (<= t_1 4e-303)
(/ (- t a) (- b y))
(if (<= t_1 2e+274) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
double t_2 = ((a - t) / y) - (x / (z + -1.0));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = t_2;
} else if (t_1 <= -5e-306) {
tmp = t_1;
} else if (t_1 <= 4e-303) {
tmp = (t - a) / (b - y);
} else if (t_1 <= 2e+274) {
tmp = t_1;
} 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 = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
double t_2 = ((a - t) / y) - (x / (z + -1.0));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = t_2;
} else if (t_1 <= -5e-306) {
tmp = t_1;
} else if (t_1 <= 4e-303) {
tmp = (t - a) / (b - y);
} else if (t_1 <= 2e+274) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x * y) + (z * (t - a))) / (y + (z * (b - y))) t_2 = ((a - t) / y) - (x / (z + -1.0)) tmp = 0 if t_1 <= -math.inf: tmp = t_2 elif t_1 <= -5e-306: tmp = t_1 elif t_1 <= 4e-303: tmp = (t - a) / (b - y) elif t_1 <= 2e+274: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) t_2 = Float64(Float64(Float64(a - t) / y) - Float64(x / Float64(z + -1.0))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = t_2; elseif (t_1 <= -5e-306) tmp = t_1; elseif (t_1 <= 4e-303) tmp = Float64(Float64(t - a) / Float64(b - y)); elseif (t_1 <= 2e+274) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); t_2 = ((a - t) / y) - (x / (z + -1.0)); tmp = 0.0; if (t_1 <= -Inf) tmp = t_2; elseif (t_1 <= -5e-306) tmp = t_1; elseif (t_1 <= 4e-303) tmp = (t - a) / (b - y); elseif (t_1 <= 2e+274) 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[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$2, If[LessEqual[t$95$1, -5e-306], t$95$1, If[LessEqual[t$95$1, 4e-303], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+274], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
t_2 := \frac{a - t}{y} - \frac{x}{z + -1}\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_1 \leq -5 \cdot 10^{-306}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq 4 \cdot 10^{-303}:\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+274}:\\
\;\;\;\;t_1\\
\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)))) < -inf.0 or 1.99999999999999984e274 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 18.2%
Taylor expanded in y around -inf 30.7%
mul-1-neg30.7%
unsub-neg30.7%
associate-*r/30.7%
neg-mul-130.7%
sub-neg30.7%
metadata-eval30.7%
Simplified48.5%
Taylor expanded in z around inf 68.2%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -4.99999999999999998e-306 or 3.99999999999999972e-303 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1.99999999999999984e274Initial program 99.6%
if -4.99999999999999998e-306 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 3.99999999999999972e-303Initial program 22.8%
Taylor expanded in z around inf 78.2%
Final simplification86.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2 (* z (- t a)))
(t_3 (/ (+ (* x y) t_2) t_1))
(t_4 (- (/ (- a t) y) (/ x (+ z -1.0)))))
(if (<= t_3 (- INFINITY))
t_4
(if (<= t_3 -5e-306)
(+ (/ (* x y) t_1) (/ t_2 t_1))
(if (<= t_3 4e-303)
(/ (- t a) (- b y))
(if (<= t_3 2e+274) t_3 t_4))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = z * (t - a);
double t_3 = ((x * y) + t_2) / t_1;
double t_4 = ((a - t) / y) - (x / (z + -1.0));
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = t_4;
} else if (t_3 <= -5e-306) {
tmp = ((x * y) / t_1) + (t_2 / t_1);
} else if (t_3 <= 4e-303) {
tmp = (t - a) / (b - y);
} else if (t_3 <= 2e+274) {
tmp = t_3;
} else {
tmp = t_4;
}
return tmp;
}
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 = z * (t - a);
double t_3 = ((x * y) + t_2) / t_1;
double t_4 = ((a - t) / y) - (x / (z + -1.0));
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = t_4;
} else if (t_3 <= -5e-306) {
tmp = ((x * y) / t_1) + (t_2 / t_1);
} else if (t_3 <= 4e-303) {
tmp = (t - a) / (b - y);
} else if (t_3 <= 2e+274) {
tmp = t_3;
} else {
tmp = t_4;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = z * (t - a) t_3 = ((x * y) + t_2) / t_1 t_4 = ((a - t) / y) - (x / (z + -1.0)) tmp = 0 if t_3 <= -math.inf: tmp = t_4 elif t_3 <= -5e-306: tmp = ((x * y) / t_1) + (t_2 / t_1) elif t_3 <= 4e-303: tmp = (t - a) / (b - y) elif t_3 <= 2e+274: tmp = t_3 else: tmp = t_4 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(z * Float64(t - a)) t_3 = Float64(Float64(Float64(x * y) + t_2) / t_1) t_4 = Float64(Float64(Float64(a - t) / y) - Float64(x / Float64(z + -1.0))) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = t_4; elseif (t_3 <= -5e-306) tmp = Float64(Float64(Float64(x * y) / t_1) + Float64(t_2 / t_1)); elseif (t_3 <= 4e-303) tmp = Float64(Float64(t - a) / Float64(b - y)); elseif (t_3 <= 2e+274) tmp = t_3; else tmp = t_4; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = z * (t - a); t_3 = ((x * y) + t_2) / t_1; t_4 = ((a - t) / y) - (x / (z + -1.0)); tmp = 0.0; if (t_3 <= -Inf) tmp = t_4; elseif (t_3 <= -5e-306) tmp = ((x * y) / t_1) + (t_2 / t_1); elseif (t_3 <= 4e-303) tmp = (t - a) / (b - y); elseif (t_3 <= 2e+274) tmp = t_3; else tmp = t_4; 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[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(x * y), $MachinePrecision] + t$95$2), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], t$95$4, If[LessEqual[t$95$3, -5e-306], N[(N[(N[(x * y), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(t$95$2 / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 4e-303], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 2e+274], t$95$3, t$95$4]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := z \cdot \left(t - a\right)\\
t_3 := \frac{x \cdot y + t_2}{t_1}\\
t_4 := \frac{a - t}{y} - \frac{x}{z + -1}\\
\mathbf{if}\;t_3 \leq -\infty:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t_3 \leq -5 \cdot 10^{-306}:\\
\;\;\;\;\frac{x \cdot y}{t_1} + \frac{t_2}{t_1}\\
\mathbf{elif}\;t_3 \leq 4 \cdot 10^{-303}:\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{elif}\;t_3 \leq 2 \cdot 10^{+274}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_4\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0 or 1.99999999999999984e274 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 18.2%
Taylor expanded in y around -inf 30.7%
mul-1-neg30.7%
unsub-neg30.7%
associate-*r/30.7%
neg-mul-130.7%
sub-neg30.7%
metadata-eval30.7%
Simplified48.5%
Taylor expanded in z around inf 68.2%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -4.99999999999999998e-306Initial program 99.5%
Taylor expanded in x around 0 99.5%
if -4.99999999999999998e-306 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 3.99999999999999972e-303Initial program 22.8%
Taylor expanded in z around inf 78.2%
if 3.99999999999999972e-303 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1.99999999999999984e274Initial program 99.8%
Final simplification86.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (/ (- a t) y) (/ x (+ z -1.0)))) (t_2 (/ (- t a) (- b y))))
(if (<= z -5e+141)
t_2
(if (<= z -7.5e+19)
t_1
(if (<= z 1.42)
(/ (+ (* x y) (* z (- t a))) (+ y (* z b)))
(if (or (<= z 2e+64) (and (not (<= z 3.9e+80)) (<= z 3e+101)))
t_1
t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((a - t) / y) - (x / (z + -1.0));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -5e+141) {
tmp = t_2;
} else if (z <= -7.5e+19) {
tmp = t_1;
} else if (z <= 1.42) {
tmp = ((x * y) + (z * (t - a))) / (y + (z * b));
} else if ((z <= 2e+64) || (!(z <= 3.9e+80) && (z <= 3e+101))) {
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 = ((a - t) / y) - (x / (z + (-1.0d0)))
t_2 = (t - a) / (b - y)
if (z <= (-5d+141)) then
tmp = t_2
else if (z <= (-7.5d+19)) then
tmp = t_1
else if (z <= 1.42d0) then
tmp = ((x * y) + (z * (t - a))) / (y + (z * b))
else if ((z <= 2d+64) .or. (.not. (z <= 3.9d+80)) .and. (z <= 3d+101)) 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 = ((a - t) / y) - (x / (z + -1.0));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -5e+141) {
tmp = t_2;
} else if (z <= -7.5e+19) {
tmp = t_1;
} else if (z <= 1.42) {
tmp = ((x * y) + (z * (t - a))) / (y + (z * b));
} else if ((z <= 2e+64) || (!(z <= 3.9e+80) && (z <= 3e+101))) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((a - t) / y) - (x / (z + -1.0)) t_2 = (t - a) / (b - y) tmp = 0 if z <= -5e+141: tmp = t_2 elif z <= -7.5e+19: tmp = t_1 elif z <= 1.42: tmp = ((x * y) + (z * (t - a))) / (y + (z * b)) elif (z <= 2e+64) or (not (z <= 3.9e+80) and (z <= 3e+101)): tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(a - t) / y) - Float64(x / Float64(z + -1.0))) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -5e+141) tmp = t_2; elseif (z <= -7.5e+19) tmp = t_1; elseif (z <= 1.42) tmp = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * b))); elseif ((z <= 2e+64) || (!(z <= 3.9e+80) && (z <= 3e+101))) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((a - t) / y) - (x / (z + -1.0)); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -5e+141) tmp = t_2; elseif (z <= -7.5e+19) tmp = t_1; elseif (z <= 1.42) tmp = ((x * y) + (z * (t - a))) / (y + (z * b)); elseif ((z <= 2e+64) || (~((z <= 3.9e+80)) && (z <= 3e+101))) 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[(a - t), $MachinePrecision] / y), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5e+141], t$95$2, If[LessEqual[z, -7.5e+19], t$95$1, If[LessEqual[z, 1.42], N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 2e+64], And[N[Not[LessEqual[z, 3.9e+80]], $MachinePrecision], LessEqual[z, 3e+101]]], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a - t}{y} - \frac{x}{z + -1}\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -5 \cdot 10^{+141}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{+19}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.42:\\
\;\;\;\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot b}\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+64} \lor \neg \left(z \leq 3.9 \cdot 10^{+80}\right) \land z \leq 3 \cdot 10^{+101}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -5.00000000000000025e141 or 2.00000000000000004e64 < z < 3.89999999999999999e80 or 2.99999999999999993e101 < z Initial program 36.9%
Taylor expanded in z around inf 87.1%
if -5.00000000000000025e141 < z < -7.5e19 or 1.4199999999999999 < z < 2.00000000000000004e64 or 3.89999999999999999e80 < z < 2.99999999999999993e101Initial program 50.5%
Taylor expanded in y around -inf 52.0%
mul-1-neg52.0%
unsub-neg52.0%
associate-*r/52.0%
neg-mul-152.0%
sub-neg52.0%
metadata-eval52.0%
Simplified60.0%
Taylor expanded in z around inf 72.7%
if -7.5e19 < z < 1.4199999999999999Initial program 87.0%
Taylor expanded in b around inf 84.7%
*-commutative84.7%
Simplified84.7%
Final simplification83.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))) (t_2 (- (/ (- a t) y) (/ x (+ z -1.0)))))
(if (<= y -0.145)
t_2
(if (<= y 6.2e-88)
t_1
(if (<= y 5.1e+28)
(/ (* x y) (+ y (* z (- b y))))
(if (<= y 7.5e+102)
t_1
(if (<= y 1.9e+120)
(/ x (- 1.0 z))
(if (<= y 9.8e+148) 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 = ((a - t) / y) - (x / (z + -1.0));
double tmp;
if (y <= -0.145) {
tmp = t_2;
} else if (y <= 6.2e-88) {
tmp = t_1;
} else if (y <= 5.1e+28) {
tmp = (x * y) / (y + (z * (b - y)));
} else if (y <= 7.5e+102) {
tmp = t_1;
} else if (y <= 1.9e+120) {
tmp = x / (1.0 - z);
} else if (y <= 9.8e+148) {
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 = ((a - t) / y) - (x / (z + (-1.0d0)))
if (y <= (-0.145d0)) then
tmp = t_2
else if (y <= 6.2d-88) then
tmp = t_1
else if (y <= 5.1d+28) then
tmp = (x * y) / (y + (z * (b - y)))
else if (y <= 7.5d+102) then
tmp = t_1
else if (y <= 1.9d+120) then
tmp = x / (1.0d0 - z)
else if (y <= 9.8d+148) 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 = ((a - t) / y) - (x / (z + -1.0));
double tmp;
if (y <= -0.145) {
tmp = t_2;
} else if (y <= 6.2e-88) {
tmp = t_1;
} else if (y <= 5.1e+28) {
tmp = (x * y) / (y + (z * (b - y)));
} else if (y <= 7.5e+102) {
tmp = t_1;
} else if (y <= 1.9e+120) {
tmp = x / (1.0 - z);
} else if (y <= 9.8e+148) {
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 = ((a - t) / y) - (x / (z + -1.0)) tmp = 0 if y <= -0.145: tmp = t_2 elif y <= 6.2e-88: tmp = t_1 elif y <= 5.1e+28: tmp = (x * y) / (y + (z * (b - y))) elif y <= 7.5e+102: tmp = t_1 elif y <= 1.9e+120: tmp = x / (1.0 - z) elif y <= 9.8e+148: 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(Float64(Float64(a - t) / y) - Float64(x / Float64(z + -1.0))) tmp = 0.0 if (y <= -0.145) tmp = t_2; elseif (y <= 6.2e-88) tmp = t_1; elseif (y <= 5.1e+28) tmp = Float64(Float64(x * y) / Float64(y + Float64(z * Float64(b - y)))); elseif (y <= 7.5e+102) tmp = t_1; elseif (y <= 1.9e+120) tmp = Float64(x / Float64(1.0 - z)); elseif (y <= 9.8e+148) 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 = ((a - t) / y) - (x / (z + -1.0)); tmp = 0.0; if (y <= -0.145) tmp = t_2; elseif (y <= 6.2e-88) tmp = t_1; elseif (y <= 5.1e+28) tmp = (x * y) / (y + (z * (b - y))); elseif (y <= 7.5e+102) tmp = t_1; elseif (y <= 1.9e+120) tmp = x / (1.0 - z); elseif (y <= 9.8e+148) 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[(N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -0.145], t$95$2, If[LessEqual[y, 6.2e-88], t$95$1, If[LessEqual[y, 5.1e+28], N[(N[(x * y), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.5e+102], t$95$1, If[LessEqual[y, 1.9e+120], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.8e+148], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
t_2 := \frac{a - t}{y} - \frac{x}{z + -1}\\
\mathbf{if}\;y \leq -0.145:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{-88}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 5.1 \cdot 10^{+28}:\\
\;\;\;\;\frac{x \cdot y}{y + z \cdot \left(b - y\right)}\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{+102}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{+120}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{elif}\;y \leq 9.8 \cdot 10^{+148}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -0.14499999999999999 or 9.8e148 < y Initial program 49.8%
Taylor expanded in y around -inf 66.1%
mul-1-neg66.1%
unsub-neg66.1%
associate-*r/66.1%
neg-mul-166.1%
sub-neg66.1%
metadata-eval66.1%
Simplified78.8%
Taylor expanded in z around inf 70.6%
if -0.14499999999999999 < y < 6.1999999999999995e-88 or 5.1000000000000004e28 < y < 7.5e102 or 1.8999999999999999e120 < y < 9.8e148Initial program 71.5%
Taylor expanded in z around inf 67.6%
if 6.1999999999999995e-88 < y < 5.1000000000000004e28Initial program 83.0%
Taylor expanded in x around inf 55.3%
*-commutative55.3%
Simplified55.3%
if 7.5e102 < y < 1.8999999999999999e120Initial program 83.3%
Taylor expanded in y around inf 83.7%
mul-1-neg83.7%
unsub-neg83.7%
Simplified83.7%
Final simplification68.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= y -0.155)
(- (/ a y) (/ x (+ z -1.0)))
(if (<= y 8.4e-88)
t_1
(if (<= y 4.2e+28)
(/ (* x y) (+ y (* z (- b y))))
(if (<= y 1.7e+103)
t_1
(if (<= y 1.1e+120)
(/ x (- 1.0 z))
(if (<= y 4.6e+149) t_1 (- (/ (- x) (+ z -1.0)) (/ t y))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (y <= -0.155) {
tmp = (a / y) - (x / (z + -1.0));
} else if (y <= 8.4e-88) {
tmp = t_1;
} else if (y <= 4.2e+28) {
tmp = (x * y) / (y + (z * (b - y)));
} else if (y <= 1.7e+103) {
tmp = t_1;
} else if (y <= 1.1e+120) {
tmp = x / (1.0 - z);
} else if (y <= 4.6e+149) {
tmp = t_1;
} else {
tmp = (-x / (z + -1.0)) - (t / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (y <= (-0.155d0)) then
tmp = (a / y) - (x / (z + (-1.0d0)))
else if (y <= 8.4d-88) then
tmp = t_1
else if (y <= 4.2d+28) then
tmp = (x * y) / (y + (z * (b - y)))
else if (y <= 1.7d+103) then
tmp = t_1
else if (y <= 1.1d+120) then
tmp = x / (1.0d0 - z)
else if (y <= 4.6d+149) then
tmp = t_1
else
tmp = (-x / (z + (-1.0d0))) - (t / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (y <= -0.155) {
tmp = (a / y) - (x / (z + -1.0));
} else if (y <= 8.4e-88) {
tmp = t_1;
} else if (y <= 4.2e+28) {
tmp = (x * y) / (y + (z * (b - y)));
} else if (y <= 1.7e+103) {
tmp = t_1;
} else if (y <= 1.1e+120) {
tmp = x / (1.0 - z);
} else if (y <= 4.6e+149) {
tmp = t_1;
} else {
tmp = (-x / (z + -1.0)) - (t / y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if y <= -0.155: tmp = (a / y) - (x / (z + -1.0)) elif y <= 8.4e-88: tmp = t_1 elif y <= 4.2e+28: tmp = (x * y) / (y + (z * (b - y))) elif y <= 1.7e+103: tmp = t_1 elif y <= 1.1e+120: tmp = x / (1.0 - z) elif y <= 4.6e+149: tmp = t_1 else: tmp = (-x / (z + -1.0)) - (t / y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (y <= -0.155) tmp = Float64(Float64(a / y) - Float64(x / Float64(z + -1.0))); elseif (y <= 8.4e-88) tmp = t_1; elseif (y <= 4.2e+28) tmp = Float64(Float64(x * y) / Float64(y + Float64(z * Float64(b - y)))); elseif (y <= 1.7e+103) tmp = t_1; elseif (y <= 1.1e+120) tmp = Float64(x / Float64(1.0 - z)); elseif (y <= 4.6e+149) tmp = t_1; else tmp = Float64(Float64(Float64(-x) / Float64(z + -1.0)) - Float64(t / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (y <= -0.155) tmp = (a / y) - (x / (z + -1.0)); elseif (y <= 8.4e-88) tmp = t_1; elseif (y <= 4.2e+28) tmp = (x * y) / (y + (z * (b - y))); elseif (y <= 1.7e+103) tmp = t_1; elseif (y <= 1.1e+120) tmp = x / (1.0 - z); elseif (y <= 4.6e+149) tmp = t_1; else tmp = (-x / (z + -1.0)) - (t / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -0.155], N[(N[(a / y), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.4e-88], t$95$1, If[LessEqual[y, 4.2e+28], N[(N[(x * y), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.7e+103], t$95$1, If[LessEqual[y, 1.1e+120], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.6e+149], t$95$1, N[(N[((-x) / N[(z + -1.0), $MachinePrecision]), $MachinePrecision] - N[(t / y), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;y \leq -0.155:\\
\;\;\;\;\frac{a}{y} - \frac{x}{z + -1}\\
\mathbf{elif}\;y \leq 8.4 \cdot 10^{-88}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{+28}:\\
\;\;\;\;\frac{x \cdot y}{y + z \cdot \left(b - y\right)}\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{+103}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{+120}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{+149}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{z + -1} - \frac{t}{y}\\
\end{array}
\end{array}
if y < -0.154999999999999999Initial program 54.8%
Taylor expanded in y around -inf 63.3%
mul-1-neg63.3%
unsub-neg63.3%
associate-*r/63.3%
neg-mul-163.3%
sub-neg63.3%
metadata-eval63.3%
Simplified78.0%
Taylor expanded in z around inf 65.4%
Taylor expanded in t around 0 58.6%
+-commutative58.6%
sub-neg58.6%
metadata-eval58.6%
neg-mul-158.6%
unsub-neg58.6%
+-commutative58.6%
Simplified58.6%
if -0.154999999999999999 < y < 8.3999999999999998e-88 or 4.19999999999999978e28 < y < 1.6999999999999999e103 or 1.1000000000000001e120 < y < 4.5999999999999997e149Initial program 71.5%
Taylor expanded in z around inf 67.6%
if 8.3999999999999998e-88 < y < 4.19999999999999978e28Initial program 83.0%
Taylor expanded in x around inf 55.3%
*-commutative55.3%
Simplified55.3%
if 1.6999999999999999e103 < y < 1.1000000000000001e120Initial program 83.3%
Taylor expanded in y around inf 83.7%
mul-1-neg83.7%
unsub-neg83.7%
Simplified83.7%
if 4.5999999999999997e149 < y Initial program 38.6%
Taylor expanded in y around -inf 72.4%
mul-1-neg72.4%
unsub-neg72.4%
associate-*r/72.4%
neg-mul-172.4%
sub-neg72.4%
metadata-eval72.4%
Simplified80.5%
Taylor expanded in z around inf 82.2%
Taylor expanded in t around inf 81.2%
Final simplification66.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (/ a y) (/ x z))) (t_2 (/ x (- 1.0 z))))
(if (<= y -1.65e+42)
t_2
(if (<= y -3300000000.0)
t_1
(if (<= y -4.6e-49)
t_2
(if (<= y 3.4e+46)
(/ (- t a) b)
(if (<= y 6.8e+102)
(/ t (- (/ y z) y))
(if (or (<= y 3.9e+124) (not (<= y 1.9e+141))) t_2 t_1))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a / y) - (x / z);
double t_2 = x / (1.0 - z);
double tmp;
if (y <= -1.65e+42) {
tmp = t_2;
} else if (y <= -3300000000.0) {
tmp = t_1;
} else if (y <= -4.6e-49) {
tmp = t_2;
} else if (y <= 3.4e+46) {
tmp = (t - a) / b;
} else if (y <= 6.8e+102) {
tmp = t / ((y / z) - y);
} else if ((y <= 3.9e+124) || !(y <= 1.9e+141)) {
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 = (a / y) - (x / z)
t_2 = x / (1.0d0 - z)
if (y <= (-1.65d+42)) then
tmp = t_2
else if (y <= (-3300000000.0d0)) then
tmp = t_1
else if (y <= (-4.6d-49)) then
tmp = t_2
else if (y <= 3.4d+46) then
tmp = (t - a) / b
else if (y <= 6.8d+102) then
tmp = t / ((y / z) - y)
else if ((y <= 3.9d+124) .or. (.not. (y <= 1.9d+141))) 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 = (a / y) - (x / z);
double t_2 = x / (1.0 - z);
double tmp;
if (y <= -1.65e+42) {
tmp = t_2;
} else if (y <= -3300000000.0) {
tmp = t_1;
} else if (y <= -4.6e-49) {
tmp = t_2;
} else if (y <= 3.4e+46) {
tmp = (t - a) / b;
} else if (y <= 6.8e+102) {
tmp = t / ((y / z) - y);
} else if ((y <= 3.9e+124) || !(y <= 1.9e+141)) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a / y) - (x / z) t_2 = x / (1.0 - z) tmp = 0 if y <= -1.65e+42: tmp = t_2 elif y <= -3300000000.0: tmp = t_1 elif y <= -4.6e-49: tmp = t_2 elif y <= 3.4e+46: tmp = (t - a) / b elif y <= 6.8e+102: tmp = t / ((y / z) - y) elif (y <= 3.9e+124) or not (y <= 1.9e+141): tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a / y) - Float64(x / z)) t_2 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -1.65e+42) tmp = t_2; elseif (y <= -3300000000.0) tmp = t_1; elseif (y <= -4.6e-49) tmp = t_2; elseif (y <= 3.4e+46) tmp = Float64(Float64(t - a) / b); elseif (y <= 6.8e+102) tmp = Float64(t / Float64(Float64(y / z) - y)); elseif ((y <= 3.9e+124) || !(y <= 1.9e+141)) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a / y) - (x / z); t_2 = x / (1.0 - z); tmp = 0.0; if (y <= -1.65e+42) tmp = t_2; elseif (y <= -3300000000.0) tmp = t_1; elseif (y <= -4.6e-49) tmp = t_2; elseif (y <= 3.4e+46) tmp = (t - a) / b; elseif (y <= 6.8e+102) tmp = t / ((y / z) - y); elseif ((y <= 3.9e+124) || ~((y <= 1.9e+141))) 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[(a / y), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.65e+42], t$95$2, If[LessEqual[y, -3300000000.0], t$95$1, If[LessEqual[y, -4.6e-49], t$95$2, If[LessEqual[y, 3.4e+46], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[y, 6.8e+102], N[(t / N[(N[(y / z), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 3.9e+124], N[Not[LessEqual[y, 1.9e+141]], $MachinePrecision]], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a}{y} - \frac{x}{z}\\
t_2 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -1.65 \cdot 10^{+42}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -3300000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -4.6 \cdot 10^{-49}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{+46}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{+102}:\\
\;\;\;\;\frac{t}{\frac{y}{z} - y}\\
\mathbf{elif}\;y \leq 3.9 \cdot 10^{+124} \lor \neg \left(y \leq 1.9 \cdot 10^{+141}\right):\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -1.6499999999999999e42 or -3.3e9 < y < -4.5999999999999998e-49 or 6.8000000000000001e102 < y < 3.9e124 or 1.89999999999999988e141 < y Initial program 51.7%
Taylor expanded in y around inf 62.4%
mul-1-neg62.4%
unsub-neg62.4%
Simplified62.4%
if -1.6499999999999999e42 < y < -3.3e9 or 3.9e124 < y < 1.89999999999999988e141Initial program 56.0%
Taylor expanded in y around -inf 33.0%
mul-1-neg33.0%
unsub-neg33.0%
associate-*r/33.0%
neg-mul-133.0%
sub-neg33.0%
metadata-eval33.0%
Simplified59.1%
Taylor expanded in z around inf 77.2%
Taylor expanded in t around 0 76.9%
+-commutative76.9%
sub-neg76.9%
metadata-eval76.9%
neg-mul-176.9%
unsub-neg76.9%
+-commutative76.9%
Simplified76.9%
Taylor expanded in z around inf 77.5%
if -4.5999999999999998e-49 < y < 3.3999999999999998e46Initial program 76.7%
Taylor expanded in y around 0 56.3%
if 3.3999999999999998e46 < y < 6.8000000000000001e102Initial program 61.4%
Taylor expanded in t around inf 36.4%
associate-/l*55.2%
+-commutative55.2%
fma-def55.2%
Simplified55.2%
Taylor expanded in z around 0 55.3%
Taylor expanded in b around 0 46.6%
Final simplification59.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -2.7e+134)
t_1
(if (<= z -7.5e+77)
(- (/ a y) (/ x z))
(if (or (<= z -1.75e-9) (not (<= z 230.0)))
t_1
(- x (/ (/ z (/ y (- t a))) (+ z -1.0))))))))
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.7e+134) {
tmp = t_1;
} else if (z <= -7.5e+77) {
tmp = (a / y) - (x / z);
} else if ((z <= -1.75e-9) || !(z <= 230.0)) {
tmp = t_1;
} else {
tmp = x - ((z / (y / (t - a))) / (z + -1.0));
}
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.7d+134)) then
tmp = t_1
else if (z <= (-7.5d+77)) then
tmp = (a / y) - (x / z)
else if ((z <= (-1.75d-9)) .or. (.not. (z <= 230.0d0))) then
tmp = t_1
else
tmp = x - ((z / (y / (t - a))) / (z + (-1.0d0)))
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.7e+134) {
tmp = t_1;
} else if (z <= -7.5e+77) {
tmp = (a / y) - (x / z);
} else if ((z <= -1.75e-9) || !(z <= 230.0)) {
tmp = t_1;
} else {
tmp = x - ((z / (y / (t - a))) / (z + -1.0));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -2.7e+134: tmp = t_1 elif z <= -7.5e+77: tmp = (a / y) - (x / z) elif (z <= -1.75e-9) or not (z <= 230.0): tmp = t_1 else: tmp = x - ((z / (y / (t - a))) / (z + -1.0)) 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.7e+134) tmp = t_1; elseif (z <= -7.5e+77) tmp = Float64(Float64(a / y) - Float64(x / z)); elseif ((z <= -1.75e-9) || !(z <= 230.0)) tmp = t_1; else tmp = Float64(x - Float64(Float64(z / Float64(y / Float64(t - a))) / Float64(z + -1.0))); 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.7e+134) tmp = t_1; elseif (z <= -7.5e+77) tmp = (a / y) - (x / z); elseif ((z <= -1.75e-9) || ~((z <= 230.0))) tmp = t_1; else tmp = x - ((z / (y / (t - a))) / (z + -1.0)); 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.7e+134], t$95$1, If[LessEqual[z, -7.5e+77], N[(N[(a / y), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -1.75e-9], N[Not[LessEqual[z, 230.0]], $MachinePrecision]], t$95$1, N[(x - N[(N[(z / N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -2.7 \cdot 10^{+134}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{+77}:\\
\;\;\;\;\frac{a}{y} - \frac{x}{z}\\
\mathbf{elif}\;z \leq -1.75 \cdot 10^{-9} \lor \neg \left(z \leq 230\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x - \frac{\frac{z}{\frac{y}{t - a}}}{z + -1}\\
\end{array}
\end{array}
if z < -2.7e134 or -7.49999999999999955e77 < z < -1.75e-9 or 230 < z Initial program 42.9%
Taylor expanded in z around inf 77.3%
if -2.7e134 < z < -7.49999999999999955e77Initial program 44.1%
Taylor expanded in y around -inf 53.7%
mul-1-neg53.7%
unsub-neg53.7%
associate-*r/53.7%
neg-mul-153.7%
sub-neg53.7%
metadata-eval53.7%
Simplified66.7%
Taylor expanded in z around inf 80.1%
Taylor expanded in t around 0 80.4%
+-commutative80.4%
sub-neg80.4%
metadata-eval80.4%
neg-mul-180.4%
unsub-neg80.4%
+-commutative80.4%
Simplified80.4%
Taylor expanded in z around inf 80.4%
if -1.75e-9 < z < 230Initial program 88.0%
Taylor expanded in y around -inf 75.3%
mul-1-neg75.3%
unsub-neg75.3%
associate-*r/75.3%
neg-mul-175.3%
sub-neg75.3%
metadata-eval75.3%
Simplified75.3%
Taylor expanded in x around 0 76.7%
associate-/r*76.7%
associate-/l*70.8%
sub-neg70.8%
metadata-eval70.8%
Simplified70.8%
Taylor expanded in z around 0 70.8%
Final simplification74.5%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= y -5e+49)
(not
(or (<= y -4.2e+22)
(and (not (<= y -1.3e-49))
(or (<= y 3e+103)
(and (not (<= y 3e+119)) (<= y 1.4e+149)))))))
(/ x (- 1.0 z))
(/ (- t a) (- b y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -5e+49) || !((y <= -4.2e+22) || (!(y <= -1.3e-49) && ((y <= 3e+103) || (!(y <= 3e+119) && (y <= 1.4e+149)))))) {
tmp = x / (1.0 - z);
} 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) :: tmp
if ((y <= (-5d+49)) .or. (.not. (y <= (-4.2d+22)) .or. (.not. (y <= (-1.3d-49))) .and. (y <= 3d+103) .or. (.not. (y <= 3d+119)) .and. (y <= 1.4d+149))) then
tmp = x / (1.0d0 - z)
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 tmp;
if ((y <= -5e+49) || !((y <= -4.2e+22) || (!(y <= -1.3e-49) && ((y <= 3e+103) || (!(y <= 3e+119) && (y <= 1.4e+149)))))) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / (b - y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -5e+49) or not ((y <= -4.2e+22) or (not (y <= -1.3e-49) and ((y <= 3e+103) or (not (y <= 3e+119) and (y <= 1.4e+149))))): tmp = x / (1.0 - z) else: tmp = (t - a) / (b - y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -5e+49) || !((y <= -4.2e+22) || (!(y <= -1.3e-49) && ((y <= 3e+103) || (!(y <= 3e+119) && (y <= 1.4e+149)))))) tmp = Float64(x / Float64(1.0 - z)); else tmp = Float64(Float64(t - a) / Float64(b - y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -5e+49) || ~(((y <= -4.2e+22) || (~((y <= -1.3e-49)) && ((y <= 3e+103) || (~((y <= 3e+119)) && (y <= 1.4e+149))))))) tmp = x / (1.0 - z); else tmp = (t - a) / (b - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -5e+49], N[Not[Or[LessEqual[y, -4.2e+22], And[N[Not[LessEqual[y, -1.3e-49]], $MachinePrecision], Or[LessEqual[y, 3e+103], And[N[Not[LessEqual[y, 3e+119]], $MachinePrecision], LessEqual[y, 1.4e+149]]]]]], $MachinePrecision]], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5 \cdot 10^{+49} \lor \neg \left(y \leq -4.2 \cdot 10^{+22} \lor \neg \left(y \leq -1.3 \cdot 10^{-49}\right) \land \left(y \leq 3 \cdot 10^{+103} \lor \neg \left(y \leq 3 \cdot 10^{+119}\right) \land y \leq 1.4 \cdot 10^{+149}\right)\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b - y}\\
\end{array}
\end{array}
if y < -5.0000000000000004e49 or -4.1999999999999996e22 < y < -1.29999999999999997e-49 or 3e103 < y < 3.00000000000000001e119 or 1.4e149 < y Initial program 51.6%
Taylor expanded in y around inf 64.2%
mul-1-neg64.2%
unsub-neg64.2%
Simplified64.2%
if -5.0000000000000004e49 < y < -4.1999999999999996e22 or -1.29999999999999997e-49 < y < 3e103 or 3.00000000000000001e119 < y < 1.4e149Initial program 73.2%
Taylor expanded in z around inf 65.8%
Final simplification65.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= y -0.082)
(- (/ a y) (/ x (+ z -1.0)))
(if (<= y 4e+103)
t_1
(if (<= y 1.06e+120)
(/ x (- 1.0 z))
(if (<= y 1.6e+150) t_1 (- (/ (- x) (+ z -1.0)) (/ t y))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (y <= -0.082) {
tmp = (a / y) - (x / (z + -1.0));
} else if (y <= 4e+103) {
tmp = t_1;
} else if (y <= 1.06e+120) {
tmp = x / (1.0 - z);
} else if (y <= 1.6e+150) {
tmp = t_1;
} else {
tmp = (-x / (z + -1.0)) - (t / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (y <= (-0.082d0)) then
tmp = (a / y) - (x / (z + (-1.0d0)))
else if (y <= 4d+103) then
tmp = t_1
else if (y <= 1.06d+120) then
tmp = x / (1.0d0 - z)
else if (y <= 1.6d+150) then
tmp = t_1
else
tmp = (-x / (z + (-1.0d0))) - (t / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (y <= -0.082) {
tmp = (a / y) - (x / (z + -1.0));
} else if (y <= 4e+103) {
tmp = t_1;
} else if (y <= 1.06e+120) {
tmp = x / (1.0 - z);
} else if (y <= 1.6e+150) {
tmp = t_1;
} else {
tmp = (-x / (z + -1.0)) - (t / y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if y <= -0.082: tmp = (a / y) - (x / (z + -1.0)) elif y <= 4e+103: tmp = t_1 elif y <= 1.06e+120: tmp = x / (1.0 - z) elif y <= 1.6e+150: tmp = t_1 else: tmp = (-x / (z + -1.0)) - (t / y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (y <= -0.082) tmp = Float64(Float64(a / y) - Float64(x / Float64(z + -1.0))); elseif (y <= 4e+103) tmp = t_1; elseif (y <= 1.06e+120) tmp = Float64(x / Float64(1.0 - z)); elseif (y <= 1.6e+150) tmp = t_1; else tmp = Float64(Float64(Float64(-x) / Float64(z + -1.0)) - Float64(t / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (y <= -0.082) tmp = (a / y) - (x / (z + -1.0)); elseif (y <= 4e+103) tmp = t_1; elseif (y <= 1.06e+120) tmp = x / (1.0 - z); elseif (y <= 1.6e+150) tmp = t_1; else tmp = (-x / (z + -1.0)) - (t / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -0.082], N[(N[(a / y), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4e+103], t$95$1, If[LessEqual[y, 1.06e+120], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.6e+150], t$95$1, N[(N[((-x) / N[(z + -1.0), $MachinePrecision]), $MachinePrecision] - N[(t / y), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;y \leq -0.082:\\
\;\;\;\;\frac{a}{y} - \frac{x}{z + -1}\\
\mathbf{elif}\;y \leq 4 \cdot 10^{+103}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.06 \cdot 10^{+120}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{+150}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{z + -1} - \frac{t}{y}\\
\end{array}
\end{array}
if y < -0.0820000000000000034Initial program 54.8%
Taylor expanded in y around -inf 63.3%
mul-1-neg63.3%
unsub-neg63.3%
associate-*r/63.3%
neg-mul-163.3%
sub-neg63.3%
metadata-eval63.3%
Simplified78.0%
Taylor expanded in z around inf 65.4%
Taylor expanded in t around 0 58.6%
+-commutative58.6%
sub-neg58.6%
metadata-eval58.6%
neg-mul-158.6%
unsub-neg58.6%
+-commutative58.6%
Simplified58.6%
if -0.0820000000000000034 < y < 4e103 or 1.05999999999999994e120 < y < 1.60000000000000008e150Initial program 72.9%
Taylor expanded in z around inf 62.9%
if 4e103 < y < 1.05999999999999994e120Initial program 83.3%
Taylor expanded in y around inf 83.7%
mul-1-neg83.7%
unsub-neg83.7%
Simplified83.7%
if 1.60000000000000008e150 < y Initial program 38.6%
Taylor expanded in y around -inf 72.4%
mul-1-neg72.4%
unsub-neg72.4%
associate-*r/72.4%
neg-mul-172.4%
sub-neg72.4%
metadata-eval72.4%
Simplified80.5%
Taylor expanded in z around inf 82.2%
Taylor expanded in t around inf 81.2%
Final simplification64.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))) (t_2 (- (/ a y) (/ x (+ z -1.0)))))
(if (<= y -0.102)
t_2
(if (<= y 8.8e+102)
t_1
(if (<= y 4.2e+119) (/ x (- 1.0 z)) (if (<= y 9.8e+148) 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 = (a / y) - (x / (z + -1.0));
double tmp;
if (y <= -0.102) {
tmp = t_2;
} else if (y <= 8.8e+102) {
tmp = t_1;
} else if (y <= 4.2e+119) {
tmp = x / (1.0 - z);
} else if (y <= 9.8e+148) {
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 = (a / y) - (x / (z + (-1.0d0)))
if (y <= (-0.102d0)) then
tmp = t_2
else if (y <= 8.8d+102) then
tmp = t_1
else if (y <= 4.2d+119) then
tmp = x / (1.0d0 - z)
else if (y <= 9.8d+148) 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 = (a / y) - (x / (z + -1.0));
double tmp;
if (y <= -0.102) {
tmp = t_2;
} else if (y <= 8.8e+102) {
tmp = t_1;
} else if (y <= 4.2e+119) {
tmp = x / (1.0 - z);
} else if (y <= 9.8e+148) {
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 = (a / y) - (x / (z + -1.0)) tmp = 0 if y <= -0.102: tmp = t_2 elif y <= 8.8e+102: tmp = t_1 elif y <= 4.2e+119: tmp = x / (1.0 - z) elif y <= 9.8e+148: 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(Float64(a / y) - Float64(x / Float64(z + -1.0))) tmp = 0.0 if (y <= -0.102) tmp = t_2; elseif (y <= 8.8e+102) tmp = t_1; elseif (y <= 4.2e+119) tmp = Float64(x / Float64(1.0 - z)); elseif (y <= 9.8e+148) 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 = (a / y) - (x / (z + -1.0)); tmp = 0.0; if (y <= -0.102) tmp = t_2; elseif (y <= 8.8e+102) tmp = t_1; elseif (y <= 4.2e+119) tmp = x / (1.0 - z); elseif (y <= 9.8e+148) 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[(N[(a / y), $MachinePrecision] - N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -0.102], t$95$2, If[LessEqual[y, 8.8e+102], t$95$1, If[LessEqual[y, 4.2e+119], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.8e+148], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
t_2 := \frac{a}{y} - \frac{x}{z + -1}\\
\mathbf{if}\;y \leq -0.102:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 8.8 \cdot 10^{+102}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{+119}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{elif}\;y \leq 9.8 \cdot 10^{+148}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -0.101999999999999993 or 9.8e148 < y Initial program 49.8%
Taylor expanded in y around -inf 66.1%
mul-1-neg66.1%
unsub-neg66.1%
associate-*r/66.1%
neg-mul-166.1%
sub-neg66.1%
metadata-eval66.1%
Simplified78.8%
Taylor expanded in z around inf 70.6%
Taylor expanded in t around 0 64.9%
+-commutative64.9%
sub-neg64.9%
metadata-eval64.9%
neg-mul-164.9%
unsub-neg64.9%
+-commutative64.9%
Simplified64.9%
if -0.101999999999999993 < y < 8.8000000000000003e102 or 4.19999999999999966e119 < y < 9.8e148Initial program 72.9%
Taylor expanded in z around inf 62.9%
if 8.8000000000000003e102 < y < 4.19999999999999966e119Initial program 83.3%
Taylor expanded in y around inf 83.7%
mul-1-neg83.7%
unsub-neg83.7%
Simplified83.7%
Final simplification64.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -9.5e+40)
t_1
(if (<= y -1420000000000.0)
(- (/ a y) (/ x z))
(if (or (<= y -5e-49) (not (<= y 1.12e+55))) 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 <= -9.5e+40) {
tmp = t_1;
} else if (y <= -1420000000000.0) {
tmp = (a / y) - (x / z);
} else if ((y <= -5e-49) || !(y <= 1.12e+55)) {
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 <= (-9.5d+40)) then
tmp = t_1
else if (y <= (-1420000000000.0d0)) then
tmp = (a / y) - (x / z)
else if ((y <= (-5d-49)) .or. (.not. (y <= 1.12d+55))) 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 <= -9.5e+40) {
tmp = t_1;
} else if (y <= -1420000000000.0) {
tmp = (a / y) - (x / z);
} else if ((y <= -5e-49) || !(y <= 1.12e+55)) {
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 <= -9.5e+40: tmp = t_1 elif y <= -1420000000000.0: tmp = (a / y) - (x / z) elif (y <= -5e-49) or not (y <= 1.12e+55): 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 <= -9.5e+40) tmp = t_1; elseif (y <= -1420000000000.0) tmp = Float64(Float64(a / y) - Float64(x / z)); elseif ((y <= -5e-49) || !(y <= 1.12e+55)) 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 <= -9.5e+40) tmp = t_1; elseif (y <= -1420000000000.0) tmp = (a / y) - (x / z); elseif ((y <= -5e-49) || ~((y <= 1.12e+55))) 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, -9.5e+40], t$95$1, If[LessEqual[y, -1420000000000.0], N[(N[(a / y), $MachinePrecision] - N[(x / z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -5e-49], N[Not[LessEqual[y, 1.12e+55]], $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 -9.5 \cdot 10^{+40}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1420000000000:\\
\;\;\;\;\frac{a}{y} - \frac{x}{z}\\
\mathbf{elif}\;y \leq -5 \cdot 10^{-49} \lor \neg \left(y \leq 1.12 \cdot 10^{+55}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -9.5000000000000003e40 or -1.42e12 < y < -4.9999999999999999e-49 or 1.12000000000000006e55 < y Initial program 52.4%
Taylor expanded in y around inf 59.0%
mul-1-neg59.0%
unsub-neg59.0%
Simplified59.0%
if -9.5000000000000003e40 < y < -1.42e12Initial program 63.6%
Taylor expanded in y around -inf 40.1%
mul-1-neg40.1%
unsub-neg40.1%
associate-*r/40.1%
neg-mul-140.1%
sub-neg40.1%
metadata-eval40.1%
Simplified63.9%
Taylor expanded in z around inf 76.3%
Taylor expanded in t around 0 75.8%
+-commutative75.8%
sub-neg75.8%
metadata-eval75.8%
neg-mul-175.8%
unsub-neg75.8%
+-commutative75.8%
Simplified75.8%
Taylor expanded in z around inf 76.6%
if -4.9999999999999999e-49 < y < 1.12000000000000006e55Initial program 75.5%
Taylor expanded in y around 0 54.7%
Final simplification57.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- a) b)) (t_2 (/ x (- 1.0 z))))
(if (<= y -2.5e-51)
t_2
(if (<= y 2.5e-267)
t_1
(if (<= y 2e-170) (/ t (- b y)) (if (<= y 7.8) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -a / b;
double t_2 = x / (1.0 - z);
double tmp;
if (y <= -2.5e-51) {
tmp = t_2;
} else if (y <= 2.5e-267) {
tmp = t_1;
} else if (y <= 2e-170) {
tmp = t / (b - y);
} else if (y <= 7.8) {
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 = -a / b
t_2 = x / (1.0d0 - z)
if (y <= (-2.5d-51)) then
tmp = t_2
else if (y <= 2.5d-267) then
tmp = t_1
else if (y <= 2d-170) then
tmp = t / (b - y)
else if (y <= 7.8d0) 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 = -a / b;
double t_2 = x / (1.0 - z);
double tmp;
if (y <= -2.5e-51) {
tmp = t_2;
} else if (y <= 2.5e-267) {
tmp = t_1;
} else if (y <= 2e-170) {
tmp = t / (b - y);
} else if (y <= 7.8) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = -a / b t_2 = x / (1.0 - z) tmp = 0 if y <= -2.5e-51: tmp = t_2 elif y <= 2.5e-267: tmp = t_1 elif y <= 2e-170: tmp = t / (b - y) elif y <= 7.8: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(-a) / b) t_2 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -2.5e-51) tmp = t_2; elseif (y <= 2.5e-267) tmp = t_1; elseif (y <= 2e-170) tmp = Float64(t / Float64(b - y)); elseif (y <= 7.8) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = -a / b; t_2 = x / (1.0 - z); tmp = 0.0; if (y <= -2.5e-51) tmp = t_2; elseif (y <= 2.5e-267) tmp = t_1; elseif (y <= 2e-170) tmp = t / (b - y); elseif (y <= 7.8) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-a) / b), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.5e-51], t$95$2, If[LessEqual[y, 2.5e-267], t$95$1, If[LessEqual[y, 2e-170], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.8], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-a}{b}\\
t_2 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -2.5 \cdot 10^{-51}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{-267}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2 \cdot 10^{-170}:\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{elif}\;y \leq 7.8:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -2.50000000000000002e-51 or 7.79999999999999982 < y Initial program 53.3%
Taylor expanded in y around inf 54.3%
mul-1-neg54.3%
unsub-neg54.3%
Simplified54.3%
if -2.50000000000000002e-51 < y < 2.5e-267 or 1.99999999999999997e-170 < y < 7.79999999999999982Initial program 79.4%
Taylor expanded in a around inf 36.3%
mul-1-neg36.3%
distribute-lft-neg-out36.3%
*-commutative36.3%
Simplified36.3%
Taylor expanded in y around 0 37.4%
associate-*r/37.4%
neg-mul-137.4%
Simplified37.4%
if 2.5e-267 < y < 1.99999999999999997e-170Initial program 74.2%
Taylor expanded in t around inf 38.8%
associate-/l*55.8%
+-commutative55.8%
fma-def55.8%
Simplified55.8%
Taylor expanded in z around inf 51.6%
Final simplification48.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -4e-49) (not (<= y 9.6e+54))) (/ 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 <= -4e-49) || !(y <= 9.6e+54)) {
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 <= (-4d-49)) .or. (.not. (y <= 9.6d+54))) 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 <= -4e-49) || !(y <= 9.6e+54)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -4e-49) or not (y <= 9.6e+54): 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 <= -4e-49) || !(y <= 9.6e+54)) 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 <= -4e-49) || ~((y <= 9.6e+54))) 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, -4e-49], N[Not[LessEqual[y, 9.6e+54]], $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 -4 \cdot 10^{-49} \lor \neg \left(y \leq 9.6 \cdot 10^{+54}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -3.99999999999999975e-49 or 9.59999999999999993e54 < y Initial program 53.1%
Taylor expanded in y around inf 57.1%
mul-1-neg57.1%
unsub-neg57.1%
Simplified57.1%
if -3.99999999999999975e-49 < y < 9.59999999999999993e54Initial program 75.5%
Taylor expanded in y around 0 54.7%
Final simplification56.0%
(FPCore (x y z t a b) :precision binary64 (if (<= z -0.75) (/ (- x) z) (if (<= z 12.0) (+ x (* x z)) (/ t b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -0.75) {
tmp = -x / z;
} else if (z <= 12.0) {
tmp = x + (x * z);
} 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 <= (-0.75d0)) then
tmp = -x / z
else if (z <= 12.0d0) then
tmp = x + (x * z)
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 <= -0.75) {
tmp = -x / z;
} else if (z <= 12.0) {
tmp = x + (x * z);
} else {
tmp = t / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -0.75: tmp = -x / z elif z <= 12.0: tmp = x + (x * z) else: tmp = t / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -0.75) tmp = Float64(Float64(-x) / z); elseif (z <= 12.0) tmp = Float64(x + Float64(x * z)); else tmp = Float64(t / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -0.75) tmp = -x / z; elseif (z <= 12.0) tmp = x + (x * z); else tmp = t / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -0.75], N[((-x) / z), $MachinePrecision], If[LessEqual[z, 12.0], N[(x + N[(x * z), $MachinePrecision]), $MachinePrecision], N[(t / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.75:\\
\;\;\;\;\frac{-x}{z}\\
\mathbf{elif}\;z \leq 12:\\
\;\;\;\;x + x \cdot z\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b}\\
\end{array}
\end{array}
if z < -0.75Initial program 36.9%
Taylor expanded in y around inf 34.5%
mul-1-neg34.5%
unsub-neg34.5%
Simplified34.5%
Taylor expanded in z around inf 32.0%
associate-*r/32.0%
mul-1-neg32.0%
Simplified32.0%
if -0.75 < z < 12Initial program 88.1%
Taylor expanded in y around inf 44.9%
mul-1-neg44.9%
unsub-neg44.9%
Simplified44.9%
Taylor expanded in z around 0 44.9%
*-commutative44.9%
Simplified44.9%
if 12 < z Initial program 47.4%
Taylor expanded in t around inf 22.5%
associate-/l*30.5%
+-commutative30.5%
fma-def30.5%
Simplified30.5%
Taylor expanded in b around inf 30.6%
Final simplification37.6%
(FPCore (x y z t a b) :precision binary64 (if (<= z -0.75) (/ (- x) z) (if (<= z 0.35) (+ x (* x z)) (/ t (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -0.75) {
tmp = -x / z;
} else if (z <= 0.35) {
tmp = x + (x * z);
} else {
tmp = t / (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 <= (-0.75d0)) then
tmp = -x / z
else if (z <= 0.35d0) then
tmp = x + (x * z)
else
tmp = t / (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 <= -0.75) {
tmp = -x / z;
} else if (z <= 0.35) {
tmp = x + (x * z);
} else {
tmp = t / (b - y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -0.75: tmp = -x / z elif z <= 0.35: tmp = x + (x * z) else: tmp = t / (b - y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -0.75) tmp = Float64(Float64(-x) / z); elseif (z <= 0.35) tmp = Float64(x + Float64(x * z)); else tmp = Float64(t / Float64(b - y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -0.75) tmp = -x / z; elseif (z <= 0.35) tmp = x + (x * z); else tmp = t / (b - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -0.75], N[((-x) / z), $MachinePrecision], If[LessEqual[z, 0.35], N[(x + N[(x * z), $MachinePrecision]), $MachinePrecision], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.75:\\
\;\;\;\;\frac{-x}{z}\\
\mathbf{elif}\;z \leq 0.35:\\
\;\;\;\;x + x \cdot z\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b - y}\\
\end{array}
\end{array}
if z < -0.75Initial program 36.9%
Taylor expanded in y around inf 34.5%
mul-1-neg34.5%
unsub-neg34.5%
Simplified34.5%
Taylor expanded in z around inf 32.0%
associate-*r/32.0%
mul-1-neg32.0%
Simplified32.0%
if -0.75 < z < 0.34999999999999998Initial program 88.0%
Taylor expanded in y around inf 45.2%
mul-1-neg45.2%
unsub-neg45.2%
Simplified45.2%
Taylor expanded in z around 0 45.2%
*-commutative45.2%
Simplified45.2%
if 0.34999999999999998 < z Initial program 48.1%
Taylor expanded in t around inf 23.5%
associate-/l*31.4%
+-commutative31.4%
fma-def31.4%
Simplified31.4%
Taylor expanded in z around inf 43.9%
Final simplification41.6%
(FPCore (x y z t a b) :precision binary64 (if (<= z -5.5e+111) (/ (- a t) y) (if (<= z 4e+63) (/ x (- 1.0 z)) (/ t (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -5.5e+111) {
tmp = (a - t) / y;
} else if (z <= 4e+63) {
tmp = x / (1.0 - z);
} else {
tmp = t / (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 <= (-5.5d+111)) then
tmp = (a - t) / y
else if (z <= 4d+63) then
tmp = x / (1.0d0 - z)
else
tmp = t / (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 <= -5.5e+111) {
tmp = (a - t) / y;
} else if (z <= 4e+63) {
tmp = x / (1.0 - z);
} else {
tmp = t / (b - y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -5.5e+111: tmp = (a - t) / y elif z <= 4e+63: tmp = x / (1.0 - z) else: tmp = t / (b - y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -5.5e+111) tmp = Float64(Float64(a - t) / y); elseif (z <= 4e+63) tmp = Float64(x / Float64(1.0 - z)); else tmp = Float64(t / Float64(b - y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -5.5e+111) tmp = (a - t) / y; elseif (z <= 4e+63) tmp = x / (1.0 - z); else tmp = t / (b - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -5.5e+111], N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 4e+63], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{+111}:\\
\;\;\;\;\frac{a - t}{y}\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+63}:\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b - y}\\
\end{array}
\end{array}
if z < -5.4999999999999998e111Initial program 31.6%
Taylor expanded in y around -inf 18.2%
mul-1-neg18.2%
unsub-neg18.2%
associate-*r/18.2%
neg-mul-118.2%
sub-neg18.2%
metadata-eval18.2%
Simplified42.4%
Taylor expanded in z around inf 59.4%
Taylor expanded in x around 0 40.5%
div-sub40.6%
Simplified40.6%
if -5.4999999999999998e111 < z < 4.00000000000000023e63Initial program 78.1%
Taylor expanded in y around inf 45.8%
mul-1-neg45.8%
unsub-neg45.8%
Simplified45.8%
if 4.00000000000000023e63 < z Initial program 44.8%
Taylor expanded in t around inf 23.7%
associate-/l*32.1%
+-commutative32.1%
fma-def32.1%
Simplified32.1%
Taylor expanded in z around inf 49.0%
Final simplification45.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -650.0) (not (<= z 12.0))) (/ a y) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -650.0) || !(z <= 12.0)) {
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 <= 12.0d0))) 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 <= 12.0)) {
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 <= 12.0): tmp = a / y else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -650.0) || !(z <= 12.0)) 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 <= 12.0))) 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, 12.0]], $MachinePrecision]], N[(a / y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -650 \lor \neg \left(z \leq 12\right):\\
\;\;\;\;\frac{a}{y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -650 or 12 < z Initial program 42.5%
Taylor expanded in y around -inf 27.6%
mul-1-neg27.6%
unsub-neg27.6%
associate-*r/27.6%
neg-mul-127.6%
sub-neg27.6%
metadata-eval27.6%
Simplified39.8%
Taylor expanded in z around inf 56.7%
Taylor expanded in a around inf 21.9%
if -650 < z < 12Initial program 87.5%
Taylor expanded in z around 0 44.4%
Final simplification32.5%
(FPCore (x y z t a b) :precision binary64 (if (<= z -32.0) (/ a y) (if (<= z 12.0) x (/ t b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -32.0) {
tmp = a / y;
} else if (z <= 12.0) {
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 <= (-32.0d0)) then
tmp = a / y
else if (z <= 12.0d0) 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 <= -32.0) {
tmp = a / y;
} else if (z <= 12.0) {
tmp = x;
} else {
tmp = t / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -32.0: tmp = a / y elif z <= 12.0: tmp = x else: tmp = t / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -32.0) tmp = Float64(a / y); elseif (z <= 12.0) 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 <= -32.0) tmp = a / y; elseif (z <= 12.0) tmp = x; else tmp = t / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -32.0], N[(a / y), $MachinePrecision], If[LessEqual[z, 12.0], x, N[(t / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -32:\\
\;\;\;\;\frac{a}{y}\\
\mathbf{elif}\;z \leq 12:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b}\\
\end{array}
\end{array}
if z < -32Initial program 36.4%
Taylor expanded in y around -inf 24.9%
mul-1-neg24.9%
unsub-neg24.9%
associate-*r/24.9%
neg-mul-124.9%
sub-neg24.9%
metadata-eval24.9%
Simplified43.9%
Taylor expanded in z around inf 60.5%
Taylor expanded in a around inf 26.2%
if -32 < z < 12Initial program 87.5%
Taylor expanded in z around 0 44.4%
if 12 < z Initial program 47.4%
Taylor expanded in t around inf 22.5%
associate-/l*30.5%
+-commutative30.5%
fma-def30.5%
Simplified30.5%
Taylor expanded in b around inf 30.6%
Final simplification36.1%
(FPCore (x y z t a b) :precision binary64 (if (<= z -6e-11) (/ (- a) b) (if (<= z 12.0) x (/ t b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -6e-11) {
tmp = -a / b;
} else if (z <= 12.0) {
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 <= (-6d-11)) then
tmp = -a / b
else if (z <= 12.0d0) 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 <= -6e-11) {
tmp = -a / b;
} else if (z <= 12.0) {
tmp = x;
} else {
tmp = t / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -6e-11: tmp = -a / b elif z <= 12.0: tmp = x else: tmp = t / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -6e-11) tmp = Float64(Float64(-a) / b); elseif (z <= 12.0) 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 <= -6e-11) tmp = -a / b; elseif (z <= 12.0) tmp = x; else tmp = t / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -6e-11], N[((-a) / b), $MachinePrecision], If[LessEqual[z, 12.0], x, N[(t / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{-11}:\\
\;\;\;\;\frac{-a}{b}\\
\mathbf{elif}\;z \leq 12:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b}\\
\end{array}
\end{array}
if z < -6e-11Initial program 37.9%
Taylor expanded in a around inf 27.6%
mul-1-neg27.6%
distribute-lft-neg-out27.6%
*-commutative27.6%
Simplified27.6%
Taylor expanded in y around 0 26.5%
associate-*r/26.5%
neg-mul-126.5%
Simplified26.5%
if -6e-11 < z < 12Initial program 88.0%
Taylor expanded in z around 0 45.2%
if 12 < z Initial program 47.4%
Taylor expanded in t around inf 22.5%
associate-/l*30.5%
+-commutative30.5%
fma-def30.5%
Simplified30.5%
Taylor expanded in b around inf 30.6%
Final simplification36.3%
(FPCore (x y z t a b) :precision binary64 (if (<= z -1.0) (/ (- x) z) (if (<= z 12.0) x (/ t b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.0) {
tmp = -x / z;
} else if (z <= 12.0) {
tmp = x;
} else {
tmp = t / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-1.0d0)) then
tmp = -x / z
else if (z <= 12.0d0) then
tmp = x
else
tmp = t / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.0) {
tmp = -x / z;
} else if (z <= 12.0) {
tmp = x;
} else {
tmp = t / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.0: tmp = -x / z elif z <= 12.0: tmp = x else: tmp = t / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.0) tmp = Float64(Float64(-x) / z); elseif (z <= 12.0) tmp = x; else tmp = Float64(t / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -1.0) tmp = -x / z; elseif (z <= 12.0) tmp = x; else tmp = t / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.0], N[((-x) / z), $MachinePrecision], If[LessEqual[z, 12.0], x, N[(t / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1:\\
\;\;\;\;\frac{-x}{z}\\
\mathbf{elif}\;z \leq 12:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b}\\
\end{array}
\end{array}
if z < -1Initial program 36.9%
Taylor expanded in y around inf 34.5%
mul-1-neg34.5%
unsub-neg34.5%
Simplified34.5%
Taylor expanded in z around inf 32.0%
associate-*r/32.0%
mul-1-neg32.0%
Simplified32.0%
if -1 < z < 12Initial program 88.1%
Taylor expanded in z around 0 44.9%
if 12 < z Initial program 47.4%
Taylor expanded in t around inf 22.5%
associate-/l*30.5%
+-commutative30.5%
fma-def30.5%
Simplified30.5%
Taylor expanded in b around inf 30.6%
Final simplification37.6%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 63.8%
Taylor expanded in z around 0 22.7%
Final simplification22.7%
(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 2023336
(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)))))