
(FPCore (x y z t a b) :precision binary64 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
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 + 1.0d0) + ((y * b) / t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
def code(x, y, z, t, a, b): return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
function code(x, y, z, t, a, b) return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
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 + 1.0d0) + ((y * b) / t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
def code(x, y, z, t, a, b): return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
function code(x, y, z, t, a, b) return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* y b) t))
(t_2 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) t_1)))
(t_3 (+ 1.0 (+ a t_1))))
(if (<= t_2 (- INFINITY))
(* z (+ (/ x (* z t_3)) (/ y (* t t_3))))
(if (<= t_2 -2e-307)
t_2
(if (<= t_2 0.0)
(+ (/ z b) (- (* t (/ (/ x b) y)) (* t (/ z (* y (pow b 2.0))))))
(if (<= t_2 2e+263) t_2 (/ z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = (x + ((y * z) / t)) / ((a + 1.0) + t_1);
double t_3 = 1.0 + (a + t_1);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = z * ((x / (z * t_3)) + (y / (t * t_3)));
} else if (t_2 <= -2e-307) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = (z / b) + ((t * ((x / b) / y)) - (t * (z / (y * pow(b, 2.0)))));
} else if (t_2 <= 2e+263) {
tmp = t_2;
} else {
tmp = z / b;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = (x + ((y * z) / t)) / ((a + 1.0) + t_1);
double t_3 = 1.0 + (a + t_1);
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = z * ((x / (z * t_3)) + (y / (t * t_3)));
} else if (t_2 <= -2e-307) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = (z / b) + ((t * ((x / b) / y)) - (t * (z / (y * Math.pow(b, 2.0)))));
} else if (t_2 <= 2e+263) {
tmp = t_2;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * b) / t t_2 = (x + ((y * z) / t)) / ((a + 1.0) + t_1) t_3 = 1.0 + (a + t_1) tmp = 0 if t_2 <= -math.inf: tmp = z * ((x / (z * t_3)) + (y / (t * t_3))) elif t_2 <= -2e-307: tmp = t_2 elif t_2 <= 0.0: tmp = (z / b) + ((t * ((x / b) / y)) - (t * (z / (y * math.pow(b, 2.0))))) elif t_2 <= 2e+263: tmp = t_2 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * b) / t) t_2 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + t_1)) t_3 = Float64(1.0 + Float64(a + t_1)) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(z * Float64(Float64(x / Float64(z * t_3)) + Float64(y / Float64(t * t_3)))); elseif (t_2 <= -2e-307) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(Float64(z / b) + Float64(Float64(t * Float64(Float64(x / b) / y)) - Float64(t * Float64(z / Float64(y * (b ^ 2.0)))))); elseif (t_2 <= 2e+263) tmp = t_2; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y * b) / t; t_2 = (x + ((y * z) / t)) / ((a + 1.0) + t_1); t_3 = 1.0 + (a + t_1); tmp = 0.0; if (t_2 <= -Inf) tmp = z * ((x / (z * t_3)) + (y / (t * t_3))); elseif (t_2 <= -2e-307) tmp = t_2; elseif (t_2 <= 0.0) tmp = (z / b) + ((t * ((x / b) / y)) - (t * (z / (y * (b ^ 2.0))))); elseif (t_2 <= 2e+263) tmp = t_2; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(1.0 + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(z * N[(N[(x / N[(z * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(y / N[(t * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -2e-307], t$95$2, If[LessEqual[t$95$2, 0.0], N[(N[(z / b), $MachinePrecision] + N[(N[(t * N[(N[(x / b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] - N[(t * N[(z / N[(y * N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+263], t$95$2, N[(z / b), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t}\\
t_2 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + t\_1}\\
t_3 := 1 + \left(a + t\_1\right)\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;z \cdot \left(\frac{x}{z \cdot t\_3} + \frac{y}{t \cdot t\_3}\right)\\
\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-307}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\frac{z}{b} + \left(t \cdot \frac{\frac{x}{b}}{y} - t \cdot \frac{z}{y \cdot {b}^{2}}\right)\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+263}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 24.9%
associate-/l*55.1%
associate-/l*55.1%
Simplified55.1%
Taylor expanded in z around inf 79.4%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -1.99999999999999982e-307 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 2.00000000000000003e263Initial program 99.7%
if -1.99999999999999982e-307 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -0.0Initial program 53.7%
Taylor expanded in a around 0 32.5%
Taylor expanded in y around inf 64.3%
associate--l+64.3%
associate-/l*65.7%
associate-/r*77.4%
associate-/l*77.5%
*-commutative77.5%
Simplified77.5%
if 2.00000000000000003e263 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 14.4%
associate-/l*29.8%
associate-/l*33.0%
Simplified33.0%
Taylor expanded in y around inf 90.6%
Final simplification92.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* y b) t))
(t_2 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) t_1)))
(t_3 (+ 1.0 (+ a t_1))))
(if (<= t_2 (- INFINITY))
(* z (+ (/ x (* z t_3)) (/ y (* t t_3))))
(if (<= t_2 2e+263) t_2 (/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = (x + ((y * z) / t)) / ((a + 1.0) + t_1);
double t_3 = 1.0 + (a + t_1);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = z * ((x / (z * t_3)) + (y / (t * t_3)));
} else if (t_2 <= 2e+263) {
tmp = t_2;
} else {
tmp = z / b;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = (x + ((y * z) / t)) / ((a + 1.0) + t_1);
double t_3 = 1.0 + (a + t_1);
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = z * ((x / (z * t_3)) + (y / (t * t_3)));
} else if (t_2 <= 2e+263) {
tmp = t_2;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * b) / t t_2 = (x + ((y * z) / t)) / ((a + 1.0) + t_1) t_3 = 1.0 + (a + t_1) tmp = 0 if t_2 <= -math.inf: tmp = z * ((x / (z * t_3)) + (y / (t * t_3))) elif t_2 <= 2e+263: tmp = t_2 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * b) / t) t_2 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + t_1)) t_3 = Float64(1.0 + Float64(a + t_1)) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(z * Float64(Float64(x / Float64(z * t_3)) + Float64(y / Float64(t * t_3)))); elseif (t_2 <= 2e+263) tmp = t_2; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y * b) / t; t_2 = (x + ((y * z) / t)) / ((a + 1.0) + t_1); t_3 = 1.0 + (a + t_1); tmp = 0.0; if (t_2 <= -Inf) tmp = z * ((x / (z * t_3)) + (y / (t * t_3))); elseif (t_2 <= 2e+263) tmp = t_2; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(1.0 + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(z * N[(N[(x / N[(z * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(y / N[(t * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+263], t$95$2, N[(z / b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t}\\
t_2 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + t\_1}\\
t_3 := 1 + \left(a + t\_1\right)\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;z \cdot \left(\frac{x}{z \cdot t\_3} + \frac{y}{t \cdot t\_3}\right)\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+263}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 24.9%
associate-/l*55.1%
associate-/l*55.1%
Simplified55.1%
Taylor expanded in z around inf 79.4%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 2.00000000000000003e263Initial program 88.7%
if 2.00000000000000003e263 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 14.4%
associate-/l*29.8%
associate-/l*33.0%
Simplified33.0%
Taylor expanded in y around inf 90.6%
Final simplification88.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t)))))
(if (<= t_1 (- INFINITY))
(* y (/ z (* t (+ 1.0 (+ a (/ y (/ t b)))))))
(if (<= t_1 2e+263) t_1 (/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = y * (z / (t * (1.0 + (a + (y / (t / b))))));
} else if (t_1 <= 2e+263) {
tmp = t_1;
} else {
tmp = z / b;
}
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 + 1.0) + ((y * b) / t));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = y * (z / (t * (1.0 + (a + (y / (t / b))))));
} else if (t_1 <= 2e+263) {
tmp = t_1;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)) tmp = 0 if t_1 <= -math.inf: tmp = y * (z / (t * (1.0 + (a + (y / (t / b)))))) elif t_1 <= 2e+263: tmp = t_1 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(y * Float64(z / Float64(t * Float64(1.0 + Float64(a + Float64(y / Float64(t / b))))))); elseif (t_1 <= 2e+263) tmp = t_1; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); tmp = 0.0; if (t_1 <= -Inf) tmp = y * (z / (t * (1.0 + (a + (y / (t / b)))))); elseif (t_1 <= 2e+263) tmp = t_1; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(y * N[(z / N[(t * N[(1.0 + N[(a + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+263], t$95$1, N[(z / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;y \cdot \frac{z}{t \cdot \left(1 + \left(a + \frac{y}{\frac{t}{b}}\right)\right)}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+263}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 24.9%
associate-/l*55.1%
associate-/l*55.1%
Simplified55.1%
Taylor expanded in x around 0 49.0%
associate-/l*74.6%
associate-*r/58.9%
*-commutative58.9%
associate-/r/74.5%
Simplified74.5%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 2.00000000000000003e263Initial program 88.7%
if 2.00000000000000003e263 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 14.4%
associate-/l*29.8%
associate-/l*33.0%
Simplified33.0%
Taylor expanded in y around inf 90.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (/ b t))) (t_2 (+ x (* y (/ z t)))) (t_3 (/ t_2 (+ a t_1))))
(if (<= (+ a 1.0) -2.0)
t_3
(if (<= (+ a 1.0) 2.0)
(/ t_2 (+ 1.0 t_1))
(if (<= (+ a 1.0) 1e+31)
(* z (/ (+ 1.0 (/ (* x t) (* y z))) b))
t_3)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b / t);
double t_2 = x + (y * (z / t));
double t_3 = t_2 / (a + t_1);
double tmp;
if ((a + 1.0) <= -2.0) {
tmp = t_3;
} else if ((a + 1.0) <= 2.0) {
tmp = t_2 / (1.0 + t_1);
} else if ((a + 1.0) <= 1e+31) {
tmp = z * ((1.0 + ((x * t) / (y * z))) / b);
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = y * (b / t)
t_2 = x + (y * (z / t))
t_3 = t_2 / (a + t_1)
if ((a + 1.0d0) <= (-2.0d0)) then
tmp = t_3
else if ((a + 1.0d0) <= 2.0d0) then
tmp = t_2 / (1.0d0 + t_1)
else if ((a + 1.0d0) <= 1d+31) then
tmp = z * ((1.0d0 + ((x * t) / (y * z))) / b)
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b / t);
double t_2 = x + (y * (z / t));
double t_3 = t_2 / (a + t_1);
double tmp;
if ((a + 1.0) <= -2.0) {
tmp = t_3;
} else if ((a + 1.0) <= 2.0) {
tmp = t_2 / (1.0 + t_1);
} else if ((a + 1.0) <= 1e+31) {
tmp = z * ((1.0 + ((x * t) / (y * z))) / b);
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (b / t) t_2 = x + (y * (z / t)) t_3 = t_2 / (a + t_1) tmp = 0 if (a + 1.0) <= -2.0: tmp = t_3 elif (a + 1.0) <= 2.0: tmp = t_2 / (1.0 + t_1) elif (a + 1.0) <= 1e+31: tmp = z * ((1.0 + ((x * t) / (y * z))) / b) else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(b / t)) t_2 = Float64(x + Float64(y * Float64(z / t))) t_3 = Float64(t_2 / Float64(a + t_1)) tmp = 0.0 if (Float64(a + 1.0) <= -2.0) tmp = t_3; elseif (Float64(a + 1.0) <= 2.0) tmp = Float64(t_2 / Float64(1.0 + t_1)); elseif (Float64(a + 1.0) <= 1e+31) tmp = Float64(z * Float64(Float64(1.0 + Float64(Float64(x * t) / Float64(y * z))) / b)); else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * (b / t); t_2 = x + (y * (z / t)); t_3 = t_2 / (a + t_1); tmp = 0.0; if ((a + 1.0) <= -2.0) tmp = t_3; elseif ((a + 1.0) <= 2.0) tmp = t_2 / (1.0 + t_1); elseif ((a + 1.0) <= 1e+31) tmp = z * ((1.0 + ((x * t) / (y * z))) / b); else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a + 1.0), $MachinePrecision], -2.0], t$95$3, If[LessEqual[N[(a + 1.0), $MachinePrecision], 2.0], N[(t$95$2 / N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a + 1.0), $MachinePrecision], 1e+31], N[(z * N[(N[(1.0 + N[(N[(x * t), $MachinePrecision] / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{b}{t}\\
t_2 := x + y \cdot \frac{z}{t}\\
t_3 := \frac{t\_2}{a + t\_1}\\
\mathbf{if}\;a + 1 \leq -2:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;a + 1 \leq 2:\\
\;\;\;\;\frac{t\_2}{1 + t\_1}\\
\mathbf{elif}\;a + 1 \leq 10^{+31}:\\
\;\;\;\;z \cdot \frac{1 + \frac{x \cdot t}{y \cdot z}}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if (+.f64 a #s(literal 1 binary64)) < -2 or 9.9999999999999996e30 < (+.f64 a #s(literal 1 binary64)) Initial program 77.5%
associate-/l*78.2%
associate-/l*79.0%
Simplified79.0%
Taylor expanded in a around inf 77.8%
if -2 < (+.f64 a #s(literal 1 binary64)) < 2Initial program 73.0%
associate-/l*72.2%
associate-/l*72.9%
Simplified72.9%
Taylor expanded in a around 0 71.9%
if 2 < (+.f64 a #s(literal 1 binary64)) < 9.9999999999999996e30Initial program 69.5%
associate-/l*42.5%
associate-/l*42.2%
Simplified42.2%
Taylor expanded in z around inf 83.5%
associate-/r*83.5%
associate-*r/83.6%
*-commutative83.6%
associate-/r/69.9%
associate-*r/69.9%
*-commutative69.9%
associate-/r/56.0%
Simplified56.0%
Taylor expanded in b around inf 99.8%
Final simplification75.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -2.1e+179)
(* z (/ (+ 1.0 (/ (* x t) (* y z))) b))
(if (<= y 9e-120)
(/ (+ x (* z (/ y t))) (+ (+ a 1.0) (/ (* y b) t)))
(if (<= y 4.6e+174)
(/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t))))
(/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.1e+179) {
tmp = z * ((1.0 + ((x * t) / (y * z))) / b);
} else if (y <= 9e-120) {
tmp = (x + (z * (y / t))) / ((a + 1.0) + ((y * b) / t));
} else if (y <= 4.6e+174) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-2.1d+179)) then
tmp = z * ((1.0d0 + ((x * t) / (y * z))) / b)
else if (y <= 9d-120) then
tmp = (x + (z * (y / t))) / ((a + 1.0d0) + ((y * b) / t))
else if (y <= 4.6d+174) then
tmp = (x + (y * (z / t))) / ((a + 1.0d0) + (y * (b / t)))
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.1e+179) {
tmp = z * ((1.0 + ((x * t) / (y * z))) / b);
} else if (y <= 9e-120) {
tmp = (x + (z * (y / t))) / ((a + 1.0) + ((y * b) / t));
} else if (y <= 4.6e+174) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.1e+179: tmp = z * ((1.0 + ((x * t) / (y * z))) / b) elif y <= 9e-120: tmp = (x + (z * (y / t))) / ((a + 1.0) + ((y * b) / t)) elif y <= 4.6e+174: tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.1e+179) tmp = Float64(z * Float64(Float64(1.0 + Float64(Float64(x * t) / Float64(y * z))) / b)); elseif (y <= 9e-120) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))); elseif (y <= 4.6e+174) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -2.1e+179) tmp = z * ((1.0 + ((x * t) / (y * z))) / b); elseif (y <= 9e-120) tmp = (x + (z * (y / t))) / ((a + 1.0) + ((y * b) / t)); elseif (y <= 4.6e+174) tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.1e+179], N[(z * N[(N[(1.0 + N[(N[(x * t), $MachinePrecision] / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9e-120], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.6e+174], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.1 \cdot 10^{+179}:\\
\;\;\;\;z \cdot \frac{1 + \frac{x \cdot t}{y \cdot z}}{b}\\
\mathbf{elif}\;y \leq 9 \cdot 10^{-120}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{+174}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -2.0999999999999999e179Initial program 42.9%
associate-/l*52.6%
associate-/l*56.0%
Simplified56.0%
Taylor expanded in z around inf 56.6%
associate-/r*53.0%
associate-*r/56.3%
*-commutative56.3%
associate-/r/56.3%
associate-*r/49.6%
*-commutative49.6%
associate-/r/56.2%
Simplified56.2%
Taylor expanded in b around inf 76.9%
if -2.0999999999999999e179 < y < 9e-120Initial program 89.0%
*-commutative89.0%
associate-/l*91.3%
Applied egg-rr91.3%
if 9e-120 < y < 4.5999999999999996e174Initial program 80.5%
associate-/l*81.8%
associate-/l*85.9%
Simplified85.9%
if 4.5999999999999996e174 < y Initial program 36.9%
associate-/l*42.9%
associate-/l*46.0%
Simplified46.0%
Taylor expanded in y around inf 70.0%
Final simplification85.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (/ b t))))
(if (or (<= (+ a 1.0) -2.0) (not (<= (+ a 1.0) 2e+27)))
(/ (+ x (* y (/ z t))) (+ a t_1))
(/ (+ x (/ y (/ t z))) (+ 1.0 t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b / t);
double tmp;
if (((a + 1.0) <= -2.0) || !((a + 1.0) <= 2e+27)) {
tmp = (x + (y * (z / t))) / (a + t_1);
} else {
tmp = (x + (y / (t / z))) / (1.0 + t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = y * (b / t)
if (((a + 1.0d0) <= (-2.0d0)) .or. (.not. ((a + 1.0d0) <= 2d+27))) then
tmp = (x + (y * (z / t))) / (a + t_1)
else
tmp = (x + (y / (t / z))) / (1.0d0 + t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b / t);
double tmp;
if (((a + 1.0) <= -2.0) || !((a + 1.0) <= 2e+27)) {
tmp = (x + (y * (z / t))) / (a + t_1);
} else {
tmp = (x + (y / (t / z))) / (1.0 + t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (b / t) tmp = 0 if ((a + 1.0) <= -2.0) or not ((a + 1.0) <= 2e+27): tmp = (x + (y * (z / t))) / (a + t_1) else: tmp = (x + (y / (t / z))) / (1.0 + t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(b / t)) tmp = 0.0 if ((Float64(a + 1.0) <= -2.0) || !(Float64(a + 1.0) <= 2e+27)) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + t_1)); else tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(1.0 + t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * (b / t); tmp = 0.0; if (((a + 1.0) <= -2.0) || ~(((a + 1.0) <= 2e+27))) tmp = (x + (y * (z / t))) / (a + t_1); else tmp = (x + (y / (t / z))) / (1.0 + t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[N[(a + 1.0), $MachinePrecision], -2.0], N[Not[LessEqual[N[(a + 1.0), $MachinePrecision], 2e+27]], $MachinePrecision]], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{b}{t}\\
\mathbf{if}\;a + 1 \leq -2 \lor \neg \left(a + 1 \leq 2 \cdot 10^{+27}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{1 + t\_1}\\
\end{array}
\end{array}
if (+.f64 a #s(literal 1 binary64)) < -2 or 2e27 < (+.f64 a #s(literal 1 binary64)) Initial program 77.2%
associate-/l*77.9%
associate-/l*77.9%
Simplified77.9%
Taylor expanded in a around inf 76.8%
if -2 < (+.f64 a #s(literal 1 binary64)) < 2e27Initial program 72.9%
associate-/l*70.7%
associate-/l*72.1%
Simplified72.1%
clear-num72.1%
un-div-inv72.4%
Applied egg-rr72.4%
Taylor expanded in a around 0 71.5%
Final simplification74.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -3e-139) (not (<= t 1.15e-74))) (/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t)))) (* z (/ (+ 1.0 (/ (* x t) (* y z))) b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -3e-139) || !(t <= 1.15e-74)) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else {
tmp = z * ((1.0 + ((x * t) / (y * z))) / b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-3d-139)) .or. (.not. (t <= 1.15d-74))) then
tmp = (x + (y * (z / t))) / ((a + 1.0d0) + (y * (b / t)))
else
tmp = z * ((1.0d0 + ((x * t) / (y * z))) / b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -3e-139) || !(t <= 1.15e-74)) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else {
tmp = z * ((1.0 + ((x * t) / (y * z))) / b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -3e-139) or not (t <= 1.15e-74): tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))) else: tmp = z * ((1.0 + ((x * t) / (y * z))) / b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -3e-139) || !(t <= 1.15e-74)) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); else tmp = Float64(z * Float64(Float64(1.0 + Float64(Float64(x * t) / Float64(y * z))) / b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -3e-139) || ~((t <= 1.15e-74))) tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))); else tmp = z * ((1.0 + ((x * t) / (y * z))) / b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -3e-139], N[Not[LessEqual[t, 1.15e-74]], $MachinePrecision]], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(1.0 + N[(N[(x * t), $MachinePrecision] / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3 \cdot 10^{-139} \lor \neg \left(t \leq 1.15 \cdot 10^{-74}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{1 + \frac{x \cdot t}{y \cdot z}}{b}\\
\end{array}
\end{array}
if t < -2.9999999999999999e-139 or 1.1499999999999999e-74 < t Initial program 82.3%
associate-/l*86.9%
associate-/l*89.8%
Simplified89.8%
if -2.9999999999999999e-139 < t < 1.1499999999999999e-74Initial program 62.0%
associate-/l*51.6%
associate-/l*48.3%
Simplified48.3%
Taylor expanded in z around inf 68.7%
associate-/r*65.0%
associate-*r/65.1%
*-commutative65.1%
associate-/r/60.9%
associate-*r/49.4%
*-commutative49.4%
associate-/r/57.7%
Simplified57.7%
Taylor expanded in b around inf 70.1%
Final simplification82.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -6.8e-16) (not (<= a 2.25e+18))) (/ (+ x (* y (/ z t))) (+ a (* y (/ b t)))) (/ (+ x (/ (* y z) t)) (+ 1.0 (/ (* y b) t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -6.8e-16) || !(a <= 2.25e+18)) {
tmp = (x + (y * (z / t))) / (a + (y * (b / t)));
} else {
tmp = (x + ((y * z) / t)) / (1.0 + ((y * b) / t));
}
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 ((a <= (-6.8d-16)) .or. (.not. (a <= 2.25d+18))) then
tmp = (x + (y * (z / t))) / (a + (y * (b / t)))
else
tmp = (x + ((y * z) / t)) / (1.0d0 + ((y * b) / t))
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 ((a <= -6.8e-16) || !(a <= 2.25e+18)) {
tmp = (x + (y * (z / t))) / (a + (y * (b / t)));
} else {
tmp = (x + ((y * z) / t)) / (1.0 + ((y * b) / t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -6.8e-16) or not (a <= 2.25e+18): tmp = (x + (y * (z / t))) / (a + (y * (b / t))) else: tmp = (x + ((y * z) / t)) / (1.0 + ((y * b) / t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -6.8e-16) || !(a <= 2.25e+18)) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + Float64(y * Float64(b / t)))); else tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(1.0 + Float64(Float64(y * b) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -6.8e-16) || ~((a <= 2.25e+18))) tmp = (x + (y * (z / t))) / (a + (y * (b / t))); else tmp = (x + ((y * z) / t)) / (1.0 + ((y * b) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -6.8e-16], N[Not[LessEqual[a, 2.25e+18]], $MachinePrecision]], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.8 \cdot 10^{-16} \lor \neg \left(a \leq 2.25 \cdot 10^{+18}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + y \cdot \frac{b}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{1 + \frac{y \cdot b}{t}}\\
\end{array}
\end{array}
if a < -6.8e-16 or 2.25e18 < a Initial program 77.0%
associate-/l*77.6%
associate-/l*78.4%
Simplified78.4%
Taylor expanded in a around inf 77.3%
if -6.8e-16 < a < 2.25e18Initial program 73.1%
Taylor expanded in a around 0 72.1%
Final simplification74.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -5.2e+47) (not (<= y 1.95e+59))) (* z (/ (+ 1.0 (/ (* x t) (* y z))) b)) (/ (+ x (/ (* y z) t)) (+ a 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -5.2e+47) || !(y <= 1.95e+59)) {
tmp = z * ((1.0 + ((x * t) / (y * z))) / b);
} else {
tmp = (x + ((y * z) / t)) / (a + 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) :: tmp
if ((y <= (-5.2d+47)) .or. (.not. (y <= 1.95d+59))) then
tmp = z * ((1.0d0 + ((x * t) / (y * z))) / b)
else
tmp = (x + ((y * z) / t)) / (a + 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 tmp;
if ((y <= -5.2e+47) || !(y <= 1.95e+59)) {
tmp = z * ((1.0 + ((x * t) / (y * z))) / b);
} else {
tmp = (x + ((y * z) / t)) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -5.2e+47) or not (y <= 1.95e+59): tmp = z * ((1.0 + ((x * t) / (y * z))) / b) else: tmp = (x + ((y * z) / t)) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -5.2e+47) || !(y <= 1.95e+59)) tmp = Float64(z * Float64(Float64(1.0 + Float64(Float64(x * t) / Float64(y * z))) / b)); else tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -5.2e+47) || ~((y <= 1.95e+59))) tmp = z * ((1.0 + ((x * t) / (y * z))) / b); else tmp = (x + ((y * z) / t)) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -5.2e+47], N[Not[LessEqual[y, 1.95e+59]], $MachinePrecision]], N[(z * N[(N[(1.0 + N[(N[(x * t), $MachinePrecision] / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{+47} \lor \neg \left(y \leq 1.95 \cdot 10^{+59}\right):\\
\;\;\;\;z \cdot \frac{1 + \frac{x \cdot t}{y \cdot z}}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\end{array}
\end{array}
if y < -5.20000000000000007e47 or 1.95000000000000011e59 < y Initial program 45.4%
associate-/l*55.2%
associate-/l*58.9%
Simplified58.9%
Taylor expanded in z around inf 60.1%
associate-/r*55.1%
associate-*r/56.0%
*-commutative56.0%
associate-/r/56.0%
associate-*r/46.0%
*-commutative46.0%
associate-/r/56.0%
Simplified56.0%
Taylor expanded in b around inf 65.5%
if -5.20000000000000007e47 < y < 1.95000000000000011e59Initial program 96.0%
associate-/l*87.6%
associate-/l*86.2%
Simplified86.2%
Taylor expanded in b around 0 77.3%
Final simplification72.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -4e+43) (not (<= y 1.2e+59))) (/ z b) (/ (+ x (/ (* y z) t)) (+ a 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -4e+43) || !(y <= 1.2e+59)) {
tmp = z / b;
} else {
tmp = (x + ((y * z) / t)) / (a + 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) :: tmp
if ((y <= (-4d+43)) .or. (.not. (y <= 1.2d+59))) then
tmp = z / b
else
tmp = (x + ((y * z) / t)) / (a + 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 tmp;
if ((y <= -4e+43) || !(y <= 1.2e+59)) {
tmp = z / b;
} else {
tmp = (x + ((y * z) / t)) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -4e+43) or not (y <= 1.2e+59): tmp = z / b else: tmp = (x + ((y * z) / t)) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -4e+43) || !(y <= 1.2e+59)) tmp = Float64(z / b); else tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -4e+43) || ~((y <= 1.2e+59))) tmp = z / b; else tmp = (x + ((y * z) / t)) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -4e+43], N[Not[LessEqual[y, 1.2e+59]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4 \cdot 10^{+43} \lor \neg \left(y \leq 1.2 \cdot 10^{+59}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\end{array}
\end{array}
if y < -4.00000000000000006e43 or 1.2000000000000001e59 < y Initial program 45.4%
associate-/l*55.2%
associate-/l*58.9%
Simplified58.9%
Taylor expanded in y around inf 62.8%
if -4.00000000000000006e43 < y < 1.2000000000000001e59Initial program 96.0%
associate-/l*87.6%
associate-/l*86.2%
Simplified86.2%
Taylor expanded in b around 0 77.3%
Final simplification71.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -8e+48) (not (<= y 2.1e+60))) (/ z b) (/ (+ x (* z (/ y t))) (+ a 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -8e+48) || !(y <= 2.1e+60)) {
tmp = z / b;
} else {
tmp = (x + (z * (y / t))) / (a + 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) :: tmp
if ((y <= (-8d+48)) .or. (.not. (y <= 2.1d+60))) then
tmp = z / b
else
tmp = (x + (z * (y / t))) / (a + 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 tmp;
if ((y <= -8e+48) || !(y <= 2.1e+60)) {
tmp = z / b;
} else {
tmp = (x + (z * (y / t))) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -8e+48) or not (y <= 2.1e+60): tmp = z / b else: tmp = (x + (z * (y / t))) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -8e+48) || !(y <= 2.1e+60)) tmp = Float64(z / b); else tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -8e+48) || ~((y <= 2.1e+60))) tmp = z / b; else tmp = (x + (z * (y / t))) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -8e+48], N[Not[LessEqual[y, 2.1e+60]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+48} \lor \neg \left(y \leq 2.1 \cdot 10^{+60}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\
\end{array}
\end{array}
if y < -8.00000000000000035e48 or 2.1000000000000001e60 < y Initial program 45.4%
associate-/l*55.2%
associate-/l*58.9%
Simplified58.9%
Taylor expanded in y around inf 62.8%
if -8.00000000000000035e48 < y < 2.1000000000000001e60Initial program 96.0%
associate-/l*87.6%
associate-/l*86.2%
Simplified86.2%
Taylor expanded in b around 0 77.3%
*-commutative96.0%
associate-/l*94.6%
Applied egg-rr76.0%
Final simplification70.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -8.2e-17) (not (<= t 1.08e-38))) (/ x (+ 1.0 (+ a (/ y (/ t b))))) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -8.2e-17) || !(t <= 1.08e-38)) {
tmp = x / (1.0 + (a + (y / (t / b))));
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-8.2d-17)) .or. (.not. (t <= 1.08d-38))) then
tmp = x / (1.0d0 + (a + (y / (t / b))))
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -8.2e-17) || !(t <= 1.08e-38)) {
tmp = x / (1.0 + (a + (y / (t / b))));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -8.2e-17) or not (t <= 1.08e-38): tmp = x / (1.0 + (a + (y / (t / b)))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -8.2e-17) || !(t <= 1.08e-38)) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(y / Float64(t / b))))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -8.2e-17) || ~((t <= 1.08e-38))) tmp = x / (1.0 + (a + (y / (t / b)))); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -8.2e-17], N[Not[LessEqual[t, 1.08e-38]], $MachinePrecision]], N[(x / N[(1.0 + N[(a + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.2 \cdot 10^{-17} \lor \neg \left(t \leq 1.08 \cdot 10^{-38}\right):\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y}{\frac{t}{b}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -8.2000000000000001e-17 or 1.08e-38 < t Initial program 82.4%
associate-/l*89.7%
associate-/l*93.1%
Simplified93.1%
Taylor expanded in x around inf 69.0%
associate-*r/71.0%
*-commutative71.0%
associate-/r/71.1%
Simplified71.1%
if -8.2000000000000001e-17 < t < 1.08e-38Initial program 65.7%
associate-/l*54.6%
associate-/l*51.9%
Simplified51.9%
Taylor expanded in y around inf 58.0%
Final simplification65.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.5e+41) (not (<= y 1.2e-13))) (/ z b) (/ x (+ a 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.5e+41) || !(y <= 1.2e-13)) {
tmp = z / b;
} else {
tmp = x / (a + 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) :: tmp
if ((y <= (-1.5d+41)) .or. (.not. (y <= 1.2d-13))) then
tmp = z / b
else
tmp = x / (a + 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 tmp;
if ((y <= -1.5e+41) || !(y <= 1.2e-13)) {
tmp = z / b;
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.5e+41) or not (y <= 1.2e-13): tmp = z / b else: tmp = x / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.5e+41) || !(y <= 1.2e-13)) tmp = Float64(z / b); else tmp = Float64(x / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.5e+41) || ~((y <= 1.2e-13))) tmp = z / b; else tmp = x / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.5e+41], N[Not[LessEqual[y, 1.2e-13]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.5 \cdot 10^{+41} \lor \neg \left(y \leq 1.2 \cdot 10^{-13}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a + 1}\\
\end{array}
\end{array}
if y < -1.4999999999999999e41 or 1.1999999999999999e-13 < y Initial program 50.6%
associate-/l*59.1%
associate-/l*63.0%
Simplified63.0%
Taylor expanded in y around inf 59.2%
if -1.4999999999999999e41 < y < 1.1999999999999999e-13Initial program 97.6%
associate-/l*88.2%
associate-/l*85.9%
Simplified85.9%
Taylor expanded in y around 0 60.9%
Final simplification60.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.15e+37) (not (<= y 1.15e-17))) (/ z b) (/ x a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.15e+37) || !(y <= 1.15e-17)) {
tmp = z / b;
} else {
tmp = x / 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 ((y <= (-1.15d+37)) .or. (.not. (y <= 1.15d-17))) then
tmp = z / b
else
tmp = x / 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 ((y <= -1.15e+37) || !(y <= 1.15e-17)) {
tmp = z / b;
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.15e+37) or not (y <= 1.15e-17): tmp = z / b else: tmp = x / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.15e+37) || !(y <= 1.15e-17)) tmp = Float64(z / b); else tmp = Float64(x / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.15e+37) || ~((y <= 1.15e-17))) tmp = z / b; else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.15e+37], N[Not[LessEqual[y, 1.15e-17]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{+37} \lor \neg \left(y \leq 1.15 \cdot 10^{-17}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if y < -1.15000000000000001e37 or 1.15000000000000004e-17 < y Initial program 51.0%
associate-/l*59.4%
associate-/l*63.3%
Simplified63.3%
Taylor expanded in y around inf 58.8%
if -1.15000000000000001e37 < y < 1.15000000000000004e-17Initial program 97.6%
associate-/l*88.1%
associate-/l*85.8%
Simplified85.8%
Taylor expanded in a around inf 47.5%
Taylor expanded in x around inf 39.9%
Final simplification49.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -1.0) (not (<= a 1.0))) (/ x a) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.0) || !(a <= 1.0)) {
tmp = x / a;
} 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 ((a <= (-1.0d0)) .or. (.not. (a <= 1.0d0))) then
tmp = x / a
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 ((a <= -1.0) || !(a <= 1.0)) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -1.0) or not (a <= 1.0): tmp = x / a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1.0) || !(a <= 1.0)) tmp = Float64(x / a); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -1.0) || ~((a <= 1.0))) tmp = x / a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.0], N[Not[LessEqual[a, 1.0]], $MachinePrecision]], N[(x / a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1 \lor \neg \left(a \leq 1\right):\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1 or 1 < a Initial program 77.0%
associate-/l*76.2%
associate-/l*76.9%
Simplified76.9%
Taylor expanded in a around inf 62.4%
Taylor expanded in x around inf 47.7%
if -1 < a < 1Initial program 73.0%
Taylor expanded in a around 0 72.0%
Taylor expanded in x around inf 46.7%
Taylor expanded in y around 0 30.2%
Final simplification38.9%
(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 75.0%
Taylor expanded in a around 0 45.4%
Taylor expanded in x around inf 29.9%
Taylor expanded in y around 0 17.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b)))))))
(if (< t -1.3659085366310088e-271)
t_1
(if (< t 3.036967103737246e-130) (/ z b) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b))));
double tmp;
if (t < -1.3659085366310088e-271) {
tmp = t_1;
} else if (t < 3.036967103737246e-130) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = 1.0d0 * ((x + ((y / t) * z)) * (1.0d0 / ((a + 1.0d0) + ((y / t) * b))))
if (t < (-1.3659085366310088d-271)) then
tmp = t_1
else if (t < 3.036967103737246d-130) then
tmp = z / b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b))));
double tmp;
if (t < -1.3659085366310088e-271) {
tmp = t_1;
} else if (t < 3.036967103737246e-130) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b)))) tmp = 0 if t < -1.3659085366310088e-271: tmp = t_1 elif t < 3.036967103737246e-130: tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(1.0 * Float64(Float64(x + Float64(Float64(y / t) * z)) * Float64(1.0 / Float64(Float64(a + 1.0) + Float64(Float64(y / t) * b))))) tmp = 0.0 if (t < -1.3659085366310088e-271) tmp = t_1; elseif (t < 3.036967103737246e-130) tmp = Float64(z / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b)))); tmp = 0.0; if (t < -1.3659085366310088e-271) tmp = t_1; elseif (t < 3.036967103737246e-130) tmp = z / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(1.0 * N[(N[(x + N[(N[(y / t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y / t), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.3659085366310088e-271], t$95$1, If[Less[t, 3.036967103737246e-130], N[(z / b), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 \cdot \left(\left(x + \frac{y}{t} \cdot z\right) \cdot \frac{1}{\left(a + 1\right) + \frac{y}{t} \cdot b}\right)\\
\mathbf{if}\;t < -1.3659085366310088 \cdot 10^{-271}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t < 3.036967103737246 \cdot 10^{-130}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024163
(FPCore (x y z t a b)
:name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B"
:precision binary64
:alt
(! :herbie-platform default (if (< t -1707385670788761/12500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (* 1 (* (+ x (* (/ y t) z)) (/ 1 (+ (+ a 1) (* (/ y t) b))))) (if (< t 1518483551868623/5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ z b) (* 1 (* (+ x (* (/ y t) z)) (/ 1 (+ (+ a 1) (* (/ y t) b))))))))
(/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))