
(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 21 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) (+ a 1.0)))
(t_2 (+ (+ a (* y (/ b t))) 1.0))
(t_3 (/ (+ x (/ (* y z) t)) t_1)))
(if (<= t_3 -5e-324)
(/ (+ x (* z (/ y t))) t_1)
(if (<= t_3 0.0)
(+ (/ z b) (/ (* t (+ (/ x b) (/ (* z (- -1.0 a)) (pow b 2.0)))) y))
(if (<= t_3 1e+260)
t_3
(if (<= t_3 INFINITY)
(* z (+ (/ x (* z t_2)) (/ y (* t t_2))))
(/ z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((y * b) / t) + (a + 1.0);
double t_2 = (a + (y * (b / t))) + 1.0;
double t_3 = (x + ((y * z) / t)) / t_1;
double tmp;
if (t_3 <= -5e-324) {
tmp = (x + (z * (y / t))) / t_1;
} else if (t_3 <= 0.0) {
tmp = (z / b) + ((t * ((x / b) + ((z * (-1.0 - a)) / pow(b, 2.0)))) / y);
} else if (t_3 <= 1e+260) {
tmp = t_3;
} else if (t_3 <= ((double) INFINITY)) {
tmp = z * ((x / (z * t_2)) + (y / (t * 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) + (a + 1.0);
double t_2 = (a + (y * (b / t))) + 1.0;
double t_3 = (x + ((y * z) / t)) / t_1;
double tmp;
if (t_3 <= -5e-324) {
tmp = (x + (z * (y / t))) / t_1;
} else if (t_3 <= 0.0) {
tmp = (z / b) + ((t * ((x / b) + ((z * (-1.0 - a)) / Math.pow(b, 2.0)))) / y);
} else if (t_3 <= 1e+260) {
tmp = t_3;
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = z * ((x / (z * t_2)) + (y / (t * t_2)));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((y * b) / t) + (a + 1.0) t_2 = (a + (y * (b / t))) + 1.0 t_3 = (x + ((y * z) / t)) / t_1 tmp = 0 if t_3 <= -5e-324: tmp = (x + (z * (y / t))) / t_1 elif t_3 <= 0.0: tmp = (z / b) + ((t * ((x / b) + ((z * (-1.0 - a)) / math.pow(b, 2.0)))) / y) elif t_3 <= 1e+260: tmp = t_3 elif t_3 <= math.inf: tmp = z * ((x / (z * t_2)) + (y / (t * t_2))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0)) t_2 = Float64(Float64(a + Float64(y * Float64(b / t))) + 1.0) t_3 = Float64(Float64(x + Float64(Float64(y * z) / t)) / t_1) tmp = 0.0 if (t_3 <= -5e-324) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / t_1); elseif (t_3 <= 0.0) tmp = Float64(Float64(z / b) + Float64(Float64(t * Float64(Float64(x / b) + Float64(Float64(z * Float64(-1.0 - a)) / (b ^ 2.0)))) / y)); elseif (t_3 <= 1e+260) tmp = t_3; elseif (t_3 <= Inf) tmp = Float64(z * Float64(Float64(x / Float64(z * t_2)) + Float64(y / Float64(t * 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) + (a + 1.0); t_2 = (a + (y * (b / t))) + 1.0; t_3 = (x + ((y * z) / t)) / t_1; tmp = 0.0; if (t_3 <= -5e-324) tmp = (x + (z * (y / t))) / t_1; elseif (t_3 <= 0.0) tmp = (z / b) + ((t * ((x / b) + ((z * (-1.0 - a)) / (b ^ 2.0)))) / y); elseif (t_3 <= 1e+260) tmp = t_3; elseif (t_3 <= Inf) tmp = z * ((x / (z * t_2)) + (y / (t * t_2))); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$3, -5e-324], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$3, 0.0], N[(N[(z / b), $MachinePrecision] + N[(N[(t * N[(N[(x / b), $MachinePrecision] + N[(N[(z * N[(-1.0 - a), $MachinePrecision]), $MachinePrecision] / N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 1e+260], t$95$3, If[LessEqual[t$95$3, Infinity], N[(z * N[(N[(x / N[(z * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(y / N[(t * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t} + \left(a + 1\right)\\
t_2 := \left(a + y \cdot \frac{b}{t}\right) + 1\\
t_3 := \frac{x + \frac{y \cdot z}{t}}{t\_1}\\
\mathbf{if}\;t\_3 \leq -5 \cdot 10^{-324}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{t\_1}\\
\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;\frac{z}{b} + \frac{t \cdot \left(\frac{x}{b} + \frac{z \cdot \left(-1 - a\right)}{{b}^{2}}\right)}{y}\\
\mathbf{elif}\;t\_3 \leq 10^{+260}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;z \cdot \left(\frac{x}{z \cdot t\_2} + \frac{y}{t \cdot t\_2}\right)\\
\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))) < -4.94066e-324Initial program 93.7%
*-commutative93.7%
associate-/l*98.7%
Applied egg-rr98.7%
if -4.94066e-324 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 0.0Initial program 56.4%
associate-/l*56.4%
associate-/l*70.1%
Simplified70.1%
Taylor expanded in y around -inf 66.4%
+-commutative66.4%
mul-1-neg66.4%
unsub-neg66.4%
distribute-lft-out--66.4%
mul-1-neg66.4%
associate-/l*66.8%
associate-/l*76.1%
distribute-lft-out--76.1%
Simplified76.1%
if 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1.00000000000000007e260Initial program 99.8%
if 1.00000000000000007e260 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 52.5%
associate-/l*57.4%
associate-/l*57.4%
Simplified57.4%
Taylor expanded in z around inf 87.7%
associate-*l/87.7%
*-commutative87.7%
associate-*l/87.7%
*-commutative87.7%
Simplified87.7%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 0.0%
associate-/l*0.4%
associate-/l*4.4%
Simplified4.4%
Taylor expanded in y around inf 100.0%
Final simplification94.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ (* y b) t) (+ a 1.0)))
(t_2 (+ x (/ (* y z) t)))
(t_3 (/ t_2 t_1))
(t_4 (+ (+ a (* y (/ b t))) 1.0)))
(if (<= t_3 -2e-189)
(/ (+ x (* z (/ y t))) t_1)
(if (<= t_3 1e+260)
(/ t_2 (+ (+ a 1.0) (* b (/ y t))))
(if (<= t_3 INFINITY)
(* z (+ (/ x (* z t_4)) (/ y (* t t_4))))
(/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((y * b) / t) + (a + 1.0);
double t_2 = x + ((y * z) / t);
double t_3 = t_2 / t_1;
double t_4 = (a + (y * (b / t))) + 1.0;
double tmp;
if (t_3 <= -2e-189) {
tmp = (x + (z * (y / t))) / t_1;
} else if (t_3 <= 1e+260) {
tmp = t_2 / ((a + 1.0) + (b * (y / t)));
} else if (t_3 <= ((double) INFINITY)) {
tmp = z * ((x / (z * t_4)) + (y / (t * t_4)));
} 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) + (a + 1.0);
double t_2 = x + ((y * z) / t);
double t_3 = t_2 / t_1;
double t_4 = (a + (y * (b / t))) + 1.0;
double tmp;
if (t_3 <= -2e-189) {
tmp = (x + (z * (y / t))) / t_1;
} else if (t_3 <= 1e+260) {
tmp = t_2 / ((a + 1.0) + (b * (y / t)));
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = z * ((x / (z * t_4)) + (y / (t * t_4)));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((y * b) / t) + (a + 1.0) t_2 = x + ((y * z) / t) t_3 = t_2 / t_1 t_4 = (a + (y * (b / t))) + 1.0 tmp = 0 if t_3 <= -2e-189: tmp = (x + (z * (y / t))) / t_1 elif t_3 <= 1e+260: tmp = t_2 / ((a + 1.0) + (b * (y / t))) elif t_3 <= math.inf: tmp = z * ((x / (z * t_4)) + (y / (t * t_4))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0)) t_2 = Float64(x + Float64(Float64(y * z) / t)) t_3 = Float64(t_2 / t_1) t_4 = Float64(Float64(a + Float64(y * Float64(b / t))) + 1.0) tmp = 0.0 if (t_3 <= -2e-189) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / t_1); elseif (t_3 <= 1e+260) tmp = Float64(t_2 / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))); elseif (t_3 <= Inf) tmp = Float64(z * Float64(Float64(x / Float64(z * t_4)) + Float64(y / Float64(t * t_4)))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((y * b) / t) + (a + 1.0); t_2 = x + ((y * z) / t); t_3 = t_2 / t_1; t_4 = (a + (y * (b / t))) + 1.0; tmp = 0.0; if (t_3 <= -2e-189) tmp = (x + (z * (y / t))) / t_1; elseif (t_3 <= 1e+260) tmp = t_2 / ((a + 1.0) + (b * (y / t))); elseif (t_3 <= Inf) tmp = z * ((x / (z * t_4)) + (y / (t * t_4))); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(N[(a + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[t$95$3, -2e-189], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$3, 1e+260], N[(t$95$2 / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[(z * N[(N[(x / N[(z * t$95$4), $MachinePrecision]), $MachinePrecision] + N[(y / N[(t * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t} + \left(a + 1\right)\\
t_2 := x + \frac{y \cdot z}{t}\\
t_3 := \frac{t\_2}{t\_1}\\
t_4 := \left(a + y \cdot \frac{b}{t}\right) + 1\\
\mathbf{if}\;t\_3 \leq -2 \cdot 10^{-189}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{t\_1}\\
\mathbf{elif}\;t\_3 \leq 10^{+260}:\\
\;\;\;\;\frac{t\_2}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;z \cdot \left(\frac{x}{z \cdot t\_4} + \frac{y}{t \cdot t\_4}\right)\\
\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))) < -2.00000000000000014e-189Initial program 92.9%
*-commutative92.9%
associate-/l*98.6%
Applied egg-rr98.6%
if -2.00000000000000014e-189 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1.00000000000000007e260Initial program 85.5%
*-commutative85.5%
associate-/l*88.4%
Applied egg-rr88.4%
if 1.00000000000000007e260 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 52.5%
associate-/l*57.4%
associate-/l*57.4%
Simplified57.4%
Taylor expanded in z around inf 87.7%
associate-*l/87.7%
*-commutative87.7%
associate-*l/87.7%
*-commutative87.7%
Simplified87.7%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 0.0%
associate-/l*0.4%
associate-/l*4.4%
Simplified4.4%
Taylor expanded in y around inf 100.0%
Final simplification92.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ (* y b) t) (+ a 1.0)))
(t_2 (+ x (/ (* y z) t)))
(t_3 (/ t_2 t_1)))
(if (<= t_3 -2e-189)
(/ (+ x (* z (/ y t))) t_1)
(if (<= t_3 5e+301) (/ t_2 (+ (+ a 1.0) (* b (/ y t)))) (/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((y * b) / t) + (a + 1.0);
double t_2 = x + ((y * z) / t);
double t_3 = t_2 / t_1;
double tmp;
if (t_3 <= -2e-189) {
tmp = (x + (z * (y / t))) / t_1;
} else if (t_3 <= 5e+301) {
tmp = t_2 / ((a + 1.0) + (b * (y / 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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = ((y * b) / t) + (a + 1.0d0)
t_2 = x + ((y * z) / t)
t_3 = t_2 / t_1
if (t_3 <= (-2d-189)) then
tmp = (x + (z * (y / t))) / t_1
else if (t_3 <= 5d+301) then
tmp = t_2 / ((a + 1.0d0) + (b * (y / 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 t_1 = ((y * b) / t) + (a + 1.0);
double t_2 = x + ((y * z) / t);
double t_3 = t_2 / t_1;
double tmp;
if (t_3 <= -2e-189) {
tmp = (x + (z * (y / t))) / t_1;
} else if (t_3 <= 5e+301) {
tmp = t_2 / ((a + 1.0) + (b * (y / t)));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((y * b) / t) + (a + 1.0) t_2 = x + ((y * z) / t) t_3 = t_2 / t_1 tmp = 0 if t_3 <= -2e-189: tmp = (x + (z * (y / t))) / t_1 elif t_3 <= 5e+301: tmp = t_2 / ((a + 1.0) + (b * (y / t))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0)) t_2 = Float64(x + Float64(Float64(y * z) / t)) t_3 = Float64(t_2 / t_1) tmp = 0.0 if (t_3 <= -2e-189) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / t_1); elseif (t_3 <= 5e+301) tmp = Float64(t_2 / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((y * b) / t) + (a + 1.0); t_2 = x + ((y * z) / t); t_3 = t_2 / t_1; tmp = 0.0; if (t_3 <= -2e-189) tmp = (x + (z * (y / t))) / t_1; elseif (t_3 <= 5e+301) tmp = t_2 / ((a + 1.0) + (b * (y / t))); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$3, -2e-189], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$3, 5e+301], N[(t$95$2 / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t} + \left(a + 1\right)\\
t_2 := x + \frac{y \cdot z}{t}\\
t_3 := \frac{t\_2}{t\_1}\\
\mathbf{if}\;t\_3 \leq -2 \cdot 10^{-189}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{t\_1}\\
\mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+301}:\\
\;\;\;\;\frac{t\_2}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\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))) < -2.00000000000000014e-189Initial program 92.9%
*-commutative92.9%
associate-/l*98.6%
Applied egg-rr98.6%
if -2.00000000000000014e-189 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 5.0000000000000004e301Initial program 86.3%
*-commutative86.3%
associate-/l*89.1%
Applied egg-rr89.1%
if 5.0000000000000004e301 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 11.6%
associate-/l*23.8%
associate-/l*26.2%
Simplified26.2%
Taylor expanded in y around inf 78.5%
Final simplification90.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ (+ a (/ (* y b) t)) 1.0))))
(if (<= b -4.6e+77)
t_1
(if (<= b -4.6e+22)
(/ z b)
(if (<= b 3.6e+103)
(/ (+ x (* y (/ z t))) (+ a 1.0))
(if (or (<= b 8.8e+133) (not (<= b 1.66e+165))) (/ z b) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / ((a + ((y * b) / t)) + 1.0);
double tmp;
if (b <= -4.6e+77) {
tmp = t_1;
} else if (b <= -4.6e+22) {
tmp = z / b;
} else if (b <= 3.6e+103) {
tmp = (x + (y * (z / t))) / (a + 1.0);
} else if ((b <= 8.8e+133) || !(b <= 1.66e+165)) {
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 = x / ((a + ((y * b) / t)) + 1.0d0)
if (b <= (-4.6d+77)) then
tmp = t_1
else if (b <= (-4.6d+22)) then
tmp = z / b
else if (b <= 3.6d+103) then
tmp = (x + (y * (z / t))) / (a + 1.0d0)
else if ((b <= 8.8d+133) .or. (.not. (b <= 1.66d+165))) 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 = x / ((a + ((y * b) / t)) + 1.0);
double tmp;
if (b <= -4.6e+77) {
tmp = t_1;
} else if (b <= -4.6e+22) {
tmp = z / b;
} else if (b <= 3.6e+103) {
tmp = (x + (y * (z / t))) / (a + 1.0);
} else if ((b <= 8.8e+133) || !(b <= 1.66e+165)) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / ((a + ((y * b) / t)) + 1.0) tmp = 0 if b <= -4.6e+77: tmp = t_1 elif b <= -4.6e+22: tmp = z / b elif b <= 3.6e+103: tmp = (x + (y * (z / t))) / (a + 1.0) elif (b <= 8.8e+133) or not (b <= 1.66e+165): tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(Float64(a + Float64(Float64(y * b) / t)) + 1.0)) tmp = 0.0 if (b <= -4.6e+77) tmp = t_1; elseif (b <= -4.6e+22) tmp = Float64(z / b); elseif (b <= 3.6e+103) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0)); elseif ((b <= 8.8e+133) || !(b <= 1.66e+165)) tmp = Float64(z / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / ((a + ((y * b) / t)) + 1.0); tmp = 0.0; if (b <= -4.6e+77) tmp = t_1; elseif (b <= -4.6e+22) tmp = z / b; elseif (b <= 3.6e+103) tmp = (x + (y * (z / t))) / (a + 1.0); elseif ((b <= 8.8e+133) || ~((b <= 1.66e+165))) tmp = z / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -4.6e+77], t$95$1, If[LessEqual[b, -4.6e+22], N[(z / b), $MachinePrecision], If[LessEqual[b, 3.6e+103], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[b, 8.8e+133], N[Not[LessEqual[b, 1.66e+165]], $MachinePrecision]], N[(z / b), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\left(a + \frac{y \cdot b}{t}\right) + 1}\\
\mathbf{if}\;b \leq -4.6 \cdot 10^{+77}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -4.6 \cdot 10^{+22}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;b \leq 3.6 \cdot 10^{+103}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\
\mathbf{elif}\;b \leq 8.8 \cdot 10^{+133} \lor \neg \left(b \leq 1.66 \cdot 10^{+165}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -4.5999999999999999e77 or 8.8e133 < b < 1.66e165Initial program 69.7%
associate-/l*69.6%
associate-/l*65.3%
Simplified65.3%
Taylor expanded in x around inf 70.5%
if -4.5999999999999999e77 < b < -4.6000000000000004e22 or 3.60000000000000017e103 < b < 8.8e133 or 1.66e165 < b Initial program 58.8%
associate-/l*54.0%
associate-/l*53.6%
Simplified53.6%
Taylor expanded in y around inf 67.4%
if -4.6000000000000004e22 < b < 3.60000000000000017e103Initial program 85.9%
associate-/l*86.6%
associate-/l*86.6%
Simplified86.6%
Taylor expanded in y around 0 76.5%
Final simplification73.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ (+ a (/ (* y b) t)) 1.0))))
(if (<= b -2.35e+79)
t_1
(if (<= b -6.5e+22)
(/ z b)
(if (<= b 1.25e+105)
(/ (+ x (* z (/ y t))) (+ a 1.0))
(if (or (<= b 4.4e+134) (not (<= b 1.4e+165))) (/ z b) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / ((a + ((y * b) / t)) + 1.0);
double tmp;
if (b <= -2.35e+79) {
tmp = t_1;
} else if (b <= -6.5e+22) {
tmp = z / b;
} else if (b <= 1.25e+105) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else if ((b <= 4.4e+134) || !(b <= 1.4e+165)) {
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 = x / ((a + ((y * b) / t)) + 1.0d0)
if (b <= (-2.35d+79)) then
tmp = t_1
else if (b <= (-6.5d+22)) then
tmp = z / b
else if (b <= 1.25d+105) then
tmp = (x + (z * (y / t))) / (a + 1.0d0)
else if ((b <= 4.4d+134) .or. (.not. (b <= 1.4d+165))) 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 = x / ((a + ((y * b) / t)) + 1.0);
double tmp;
if (b <= -2.35e+79) {
tmp = t_1;
} else if (b <= -6.5e+22) {
tmp = z / b;
} else if (b <= 1.25e+105) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else if ((b <= 4.4e+134) || !(b <= 1.4e+165)) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / ((a + ((y * b) / t)) + 1.0) tmp = 0 if b <= -2.35e+79: tmp = t_1 elif b <= -6.5e+22: tmp = z / b elif b <= 1.25e+105: tmp = (x + (z * (y / t))) / (a + 1.0) elif (b <= 4.4e+134) or not (b <= 1.4e+165): tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(Float64(a + Float64(Float64(y * b) / t)) + 1.0)) tmp = 0.0 if (b <= -2.35e+79) tmp = t_1; elseif (b <= -6.5e+22) tmp = Float64(z / b); elseif (b <= 1.25e+105) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0)); elseif ((b <= 4.4e+134) || !(b <= 1.4e+165)) tmp = Float64(z / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / ((a + ((y * b) / t)) + 1.0); tmp = 0.0; if (b <= -2.35e+79) tmp = t_1; elseif (b <= -6.5e+22) tmp = z / b; elseif (b <= 1.25e+105) tmp = (x + (z * (y / t))) / (a + 1.0); elseif ((b <= 4.4e+134) || ~((b <= 1.4e+165))) tmp = z / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.35e+79], t$95$1, If[LessEqual[b, -6.5e+22], N[(z / b), $MachinePrecision], If[LessEqual[b, 1.25e+105], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[b, 4.4e+134], N[Not[LessEqual[b, 1.4e+165]], $MachinePrecision]], N[(z / b), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\left(a + \frac{y \cdot b}{t}\right) + 1}\\
\mathbf{if}\;b \leq -2.35 \cdot 10^{+79}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -6.5 \cdot 10^{+22}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;b \leq 1.25 \cdot 10^{+105}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\
\mathbf{elif}\;b \leq 4.4 \cdot 10^{+134} \lor \neg \left(b \leq 1.4 \cdot 10^{+165}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -2.35000000000000011e79 or 4.4e134 < b < 1.3999999999999999e165Initial program 69.7%
associate-/l*69.6%
associate-/l*65.3%
Simplified65.3%
Taylor expanded in x around inf 70.5%
if -2.35000000000000011e79 < b < -6.49999999999999979e22 or 1.25000000000000011e105 < b < 4.4e134 or 1.3999999999999999e165 < b Initial program 58.8%
associate-/l*54.0%
associate-/l*53.6%
Simplified53.6%
Taylor expanded in y around inf 67.4%
if -6.49999999999999979e22 < b < 1.25000000000000011e105Initial program 85.9%
*-commutative85.9%
associate-/l*89.5%
Applied egg-rr89.5%
Taylor expanded in y around 0 80.3%
Final simplification75.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ (+ a (/ (* y b) t)) 1.0))))
(if (<= b -8.5e+77)
t_1
(if (<= b -2.8e+20)
(/ z b)
(if (<= b 6.2e+103)
(/ (+ x (/ z (/ t y))) (+ a 1.0))
(if (or (<= b 1.75e+134) (not (<= b 3.1e+156))) (/ z b) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / ((a + ((y * b) / t)) + 1.0);
double tmp;
if (b <= -8.5e+77) {
tmp = t_1;
} else if (b <= -2.8e+20) {
tmp = z / b;
} else if (b <= 6.2e+103) {
tmp = (x + (z / (t / y))) / (a + 1.0);
} else if ((b <= 1.75e+134) || !(b <= 3.1e+156)) {
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 = x / ((a + ((y * b) / t)) + 1.0d0)
if (b <= (-8.5d+77)) then
tmp = t_1
else if (b <= (-2.8d+20)) then
tmp = z / b
else if (b <= 6.2d+103) then
tmp = (x + (z / (t / y))) / (a + 1.0d0)
else if ((b <= 1.75d+134) .or. (.not. (b <= 3.1d+156))) 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 = x / ((a + ((y * b) / t)) + 1.0);
double tmp;
if (b <= -8.5e+77) {
tmp = t_1;
} else if (b <= -2.8e+20) {
tmp = z / b;
} else if (b <= 6.2e+103) {
tmp = (x + (z / (t / y))) / (a + 1.0);
} else if ((b <= 1.75e+134) || !(b <= 3.1e+156)) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / ((a + ((y * b) / t)) + 1.0) tmp = 0 if b <= -8.5e+77: tmp = t_1 elif b <= -2.8e+20: tmp = z / b elif b <= 6.2e+103: tmp = (x + (z / (t / y))) / (a + 1.0) elif (b <= 1.75e+134) or not (b <= 3.1e+156): tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(Float64(a + Float64(Float64(y * b) / t)) + 1.0)) tmp = 0.0 if (b <= -8.5e+77) tmp = t_1; elseif (b <= -2.8e+20) tmp = Float64(z / b); elseif (b <= 6.2e+103) tmp = Float64(Float64(x + Float64(z / Float64(t / y))) / Float64(a + 1.0)); elseif ((b <= 1.75e+134) || !(b <= 3.1e+156)) tmp = Float64(z / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / ((a + ((y * b) / t)) + 1.0); tmp = 0.0; if (b <= -8.5e+77) tmp = t_1; elseif (b <= -2.8e+20) tmp = z / b; elseif (b <= 6.2e+103) tmp = (x + (z / (t / y))) / (a + 1.0); elseif ((b <= 1.75e+134) || ~((b <= 3.1e+156))) tmp = z / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -8.5e+77], t$95$1, If[LessEqual[b, -2.8e+20], N[(z / b), $MachinePrecision], If[LessEqual[b, 6.2e+103], N[(N[(x + N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[b, 1.75e+134], N[Not[LessEqual[b, 3.1e+156]], $MachinePrecision]], N[(z / b), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\left(a + \frac{y \cdot b}{t}\right) + 1}\\
\mathbf{if}\;b \leq -8.5 \cdot 10^{+77}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -2.8 \cdot 10^{+20}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;b \leq 6.2 \cdot 10^{+103}:\\
\;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{a + 1}\\
\mathbf{elif}\;b \leq 1.75 \cdot 10^{+134} \lor \neg \left(b \leq 3.1 \cdot 10^{+156}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -8.50000000000000018e77 or 1.75000000000000001e134 < b < 3.1000000000000002e156Initial program 69.7%
associate-/l*69.6%
associate-/l*65.3%
Simplified65.3%
Taylor expanded in x around inf 70.5%
if -8.50000000000000018e77 < b < -2.8e20 or 6.2000000000000003e103 < b < 1.75000000000000001e134 or 3.1000000000000002e156 < b Initial program 58.8%
associate-/l*54.0%
associate-/l*53.6%
Simplified53.6%
Taylor expanded in y around inf 67.4%
if -2.8e20 < b < 6.2000000000000003e103Initial program 85.9%
*-commutative85.9%
associate-/l*89.5%
Applied egg-rr89.5%
Taylor expanded in y around 0 80.3%
clear-num80.2%
un-div-inv80.9%
Applied egg-rr80.9%
Final simplification75.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -4.8e-84)
(/ x (+ (+ a (* y (/ b t))) 1.0))
(if (<= t 3.7e-209)
(/ z b)
(if (<= t 7e-125)
(/ x (+ (+ a (/ (* y b) t)) 1.0))
(if (<= t 5.8e-66) (/ z b) (/ x (+ (+ a (/ y (/ t b))) 1.0)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -4.8e-84) {
tmp = x / ((a + (y * (b / t))) + 1.0);
} else if (t <= 3.7e-209) {
tmp = z / b;
} else if (t <= 7e-125) {
tmp = x / ((a + ((y * b) / t)) + 1.0);
} else if (t <= 5.8e-66) {
tmp = z / b;
} else {
tmp = x / ((a + (y / (t / b))) + 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 (t <= (-4.8d-84)) then
tmp = x / ((a + (y * (b / t))) + 1.0d0)
else if (t <= 3.7d-209) then
tmp = z / b
else if (t <= 7d-125) then
tmp = x / ((a + ((y * b) / t)) + 1.0d0)
else if (t <= 5.8d-66) then
tmp = z / b
else
tmp = x / ((a + (y / (t / b))) + 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 (t <= -4.8e-84) {
tmp = x / ((a + (y * (b / t))) + 1.0);
} else if (t <= 3.7e-209) {
tmp = z / b;
} else if (t <= 7e-125) {
tmp = x / ((a + ((y * b) / t)) + 1.0);
} else if (t <= 5.8e-66) {
tmp = z / b;
} else {
tmp = x / ((a + (y / (t / b))) + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -4.8e-84: tmp = x / ((a + (y * (b / t))) + 1.0) elif t <= 3.7e-209: tmp = z / b elif t <= 7e-125: tmp = x / ((a + ((y * b) / t)) + 1.0) elif t <= 5.8e-66: tmp = z / b else: tmp = x / ((a + (y / (t / b))) + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -4.8e-84) tmp = Float64(x / Float64(Float64(a + Float64(y * Float64(b / t))) + 1.0)); elseif (t <= 3.7e-209) tmp = Float64(z / b); elseif (t <= 7e-125) tmp = Float64(x / Float64(Float64(a + Float64(Float64(y * b) / t)) + 1.0)); elseif (t <= 5.8e-66) tmp = Float64(z / b); else tmp = Float64(x / Float64(Float64(a + Float64(y / Float64(t / b))) + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -4.8e-84) tmp = x / ((a + (y * (b / t))) + 1.0); elseif (t <= 3.7e-209) tmp = z / b; elseif (t <= 7e-125) tmp = x / ((a + ((y * b) / t)) + 1.0); elseif (t <= 5.8e-66) tmp = z / b; else tmp = x / ((a + (y / (t / b))) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -4.8e-84], N[(x / N[(N[(a + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.7e-209], N[(z / b), $MachinePrecision], If[LessEqual[t, 7e-125], N[(x / N[(N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.8e-66], N[(z / b), $MachinePrecision], N[(x / N[(N[(a + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.8 \cdot 10^{-84}:\\
\;\;\;\;\frac{x}{\left(a + y \cdot \frac{b}{t}\right) + 1}\\
\mathbf{elif}\;t \leq 3.7 \cdot 10^{-209}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 7 \cdot 10^{-125}:\\
\;\;\;\;\frac{x}{\left(a + \frac{y \cdot b}{t}\right) + 1}\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{-66}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(a + \frac{y}{\frac{t}{b}}\right) + 1}\\
\end{array}
\end{array}
if t < -4.80000000000000035e-84Initial program 83.9%
associate-/l*88.4%
associate-/l*90.4%
Simplified90.4%
Taylor expanded in x around inf 67.5%
associate-*l/68.5%
*-commutative68.5%
Simplified68.5%
if -4.80000000000000035e-84 < t < 3.6999999999999998e-209 or 6.99999999999999995e-125 < t < 5.80000000000000023e-66Initial program 56.8%
associate-/l*47.7%
associate-/l*43.7%
Simplified43.7%
Taylor expanded in y around inf 60.8%
if 3.6999999999999998e-209 < t < 6.99999999999999995e-125Initial program 88.4%
associate-/l*71.5%
associate-/l*48.9%
Simplified48.9%
Taylor expanded in x around inf 60.4%
if 5.80000000000000023e-66 < t Initial program 85.0%
associate-/l*90.0%
associate-/l*93.6%
Simplified93.6%
Taylor expanded in x around inf 65.6%
associate-*l/68.0%
*-commutative68.0%
Simplified68.0%
clear-num42.3%
un-div-inv43.1%
Applied egg-rr68.8%
Final simplification65.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -3.2e-85)
(/ x (+ (+ a (* y (/ b t))) 1.0))
(if (<= t 3.7e-209)
(/ z b)
(if (<= t 1.9e-108)
(/ x (+ (/ 1.0 (/ t (* y b))) 1.0))
(if (<= t 3.5e-68) (/ z b) (/ x (+ (+ a (/ y (/ t b))) 1.0)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -3.2e-85) {
tmp = x / ((a + (y * (b / t))) + 1.0);
} else if (t <= 3.7e-209) {
tmp = z / b;
} else if (t <= 1.9e-108) {
tmp = x / ((1.0 / (t / (y * b))) + 1.0);
} else if (t <= 3.5e-68) {
tmp = z / b;
} else {
tmp = x / ((a + (y / (t / b))) + 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 (t <= (-3.2d-85)) then
tmp = x / ((a + (y * (b / t))) + 1.0d0)
else if (t <= 3.7d-209) then
tmp = z / b
else if (t <= 1.9d-108) then
tmp = x / ((1.0d0 / (t / (y * b))) + 1.0d0)
else if (t <= 3.5d-68) then
tmp = z / b
else
tmp = x / ((a + (y / (t / b))) + 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 (t <= -3.2e-85) {
tmp = x / ((a + (y * (b / t))) + 1.0);
} else if (t <= 3.7e-209) {
tmp = z / b;
} else if (t <= 1.9e-108) {
tmp = x / ((1.0 / (t / (y * b))) + 1.0);
} else if (t <= 3.5e-68) {
tmp = z / b;
} else {
tmp = x / ((a + (y / (t / b))) + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -3.2e-85: tmp = x / ((a + (y * (b / t))) + 1.0) elif t <= 3.7e-209: tmp = z / b elif t <= 1.9e-108: tmp = x / ((1.0 / (t / (y * b))) + 1.0) elif t <= 3.5e-68: tmp = z / b else: tmp = x / ((a + (y / (t / b))) + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -3.2e-85) tmp = Float64(x / Float64(Float64(a + Float64(y * Float64(b / t))) + 1.0)); elseif (t <= 3.7e-209) tmp = Float64(z / b); elseif (t <= 1.9e-108) tmp = Float64(x / Float64(Float64(1.0 / Float64(t / Float64(y * b))) + 1.0)); elseif (t <= 3.5e-68) tmp = Float64(z / b); else tmp = Float64(x / Float64(Float64(a + Float64(y / Float64(t / b))) + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -3.2e-85) tmp = x / ((a + (y * (b / t))) + 1.0); elseif (t <= 3.7e-209) tmp = z / b; elseif (t <= 1.9e-108) tmp = x / ((1.0 / (t / (y * b))) + 1.0); elseif (t <= 3.5e-68) tmp = z / b; else tmp = x / ((a + (y / (t / b))) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -3.2e-85], N[(x / N[(N[(a + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.7e-209], N[(z / b), $MachinePrecision], If[LessEqual[t, 1.9e-108], N[(x / N[(N[(1.0 / N[(t / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.5e-68], N[(z / b), $MachinePrecision], N[(x / N[(N[(a + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.2 \cdot 10^{-85}:\\
\;\;\;\;\frac{x}{\left(a + y \cdot \frac{b}{t}\right) + 1}\\
\mathbf{elif}\;t \leq 3.7 \cdot 10^{-209}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-108}:\\
\;\;\;\;\frac{x}{\frac{1}{\frac{t}{y \cdot b}} + 1}\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{-68}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(a + \frac{y}{\frac{t}{b}}\right) + 1}\\
\end{array}
\end{array}
if t < -3.20000000000000027e-85Initial program 83.9%
associate-/l*88.4%
associate-/l*90.4%
Simplified90.4%
Taylor expanded in x around inf 67.5%
associate-*l/68.5%
*-commutative68.5%
Simplified68.5%
if -3.20000000000000027e-85 < t < 3.6999999999999998e-209 or 1.89999999999999987e-108 < t < 3.50000000000000013e-68Initial program 55.6%
associate-/l*46.3%
associate-/l*42.1%
Simplified42.1%
Taylor expanded in y around inf 62.4%
if 3.6999999999999998e-209 < t < 1.89999999999999987e-108Initial program 89.5%
associate-/l*74.4%
associate-/l*54.2%
Simplified54.2%
Taylor expanded in x around inf 54.3%
associate-*l/29.1%
*-commutative29.1%
Simplified29.1%
Taylor expanded in a around 0 54.5%
*-commutative54.5%
associate-*r/29.1%
Simplified29.1%
associate-*r/54.5%
clear-num54.5%
Applied egg-rr54.5%
if 3.50000000000000013e-68 < t Initial program 85.0%
associate-/l*90.0%
associate-/l*93.6%
Simplified93.6%
Taylor expanded in x around inf 65.6%
associate-*l/68.0%
*-commutative68.0%
Simplified68.0%
clear-num42.3%
un-div-inv43.1%
Applied egg-rr68.8%
Final simplification65.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ (/ y (/ t b)) 1.0))) (t_2 (/ (+ x (* y (/ z t))) a)))
(if (<= a -62000.0)
t_2
(if (<= a 1.56e-273)
t_1
(if (<= a 1.6e-212) (/ z b) (if (<= a 7e-12) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / ((y / (t / b)) + 1.0);
double t_2 = (x + (y * (z / t))) / a;
double tmp;
if (a <= -62000.0) {
tmp = t_2;
} else if (a <= 1.56e-273) {
tmp = t_1;
} else if (a <= 1.6e-212) {
tmp = z / b;
} else if (a <= 7e-12) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x / ((y / (t / b)) + 1.0d0)
t_2 = (x + (y * (z / t))) / a
if (a <= (-62000.0d0)) then
tmp = t_2
else if (a <= 1.56d-273) then
tmp = t_1
else if (a <= 1.6d-212) then
tmp = z / b
else if (a <= 7d-12) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / ((y / (t / b)) + 1.0);
double t_2 = (x + (y * (z / t))) / a;
double tmp;
if (a <= -62000.0) {
tmp = t_2;
} else if (a <= 1.56e-273) {
tmp = t_1;
} else if (a <= 1.6e-212) {
tmp = z / b;
} else if (a <= 7e-12) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / ((y / (t / b)) + 1.0) t_2 = (x + (y * (z / t))) / a tmp = 0 if a <= -62000.0: tmp = t_2 elif a <= 1.56e-273: tmp = t_1 elif a <= 1.6e-212: tmp = z / b elif a <= 7e-12: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(Float64(y / Float64(t / b)) + 1.0)) t_2 = Float64(Float64(x + Float64(y * Float64(z / t))) / a) tmp = 0.0 if (a <= -62000.0) tmp = t_2; elseif (a <= 1.56e-273) tmp = t_1; elseif (a <= 1.6e-212) tmp = Float64(z / b); elseif (a <= 7e-12) 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 / (t / b)) + 1.0); t_2 = (x + (y * (z / t))) / a; tmp = 0.0; if (a <= -62000.0) tmp = t_2; elseif (a <= 1.56e-273) tmp = t_1; elseif (a <= 1.6e-212) tmp = z / b; elseif (a <= 7e-12) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[a, -62000.0], t$95$2, If[LessEqual[a, 1.56e-273], t$95$1, If[LessEqual[a, 1.6e-212], N[(z / b), $MachinePrecision], If[LessEqual[a, 7e-12], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\frac{y}{\frac{t}{b}} + 1}\\
t_2 := \frac{x + y \cdot \frac{z}{t}}{a}\\
\mathbf{if}\;a \leq -62000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 1.56 \cdot 10^{-273}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.6 \cdot 10^{-212}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 7 \cdot 10^{-12}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -62000 or 7.0000000000000001e-12 < a Initial program 79.7%
associate-/l*78.3%
associate-/l*76.6%
Simplified76.6%
Taylor expanded in a around inf 68.0%
if -62000 < a < 1.55999999999999994e-273 or 1.5999999999999999e-212 < a < 7.0000000000000001e-12Initial program 76.3%
associate-/l*76.3%
associate-/l*75.2%
Simplified75.2%
Taylor expanded in x around inf 61.3%
associate-*l/57.8%
*-commutative57.8%
Simplified57.8%
Taylor expanded in a around 0 60.8%
*-commutative60.8%
associate-*r/57.2%
Simplified57.2%
clear-num57.2%
un-div-inv57.8%
Applied egg-rr57.8%
if 1.55999999999999994e-273 < a < 1.5999999999999999e-212Initial program 62.4%
associate-/l*62.7%
associate-/l*67.4%
Simplified67.4%
Taylor expanded in y around inf 51.8%
Final simplification62.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ (/ y (/ t b)) 1.0))))
(if (<= a -86.0)
(/ (+ x (/ (* y z) t)) a)
(if (<= a 2.3e-273)
t_1
(if (<= a 1.8e-212)
(/ z b)
(if (<= a 7e-12) t_1 (/ (+ x (* y (/ z t))) a)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / ((y / (t / b)) + 1.0);
double tmp;
if (a <= -86.0) {
tmp = (x + ((y * z) / t)) / a;
} else if (a <= 2.3e-273) {
tmp = t_1;
} else if (a <= 1.8e-212) {
tmp = z / b;
} else if (a <= 7e-12) {
tmp = t_1;
} else {
tmp = (x + (y * (z / t))) / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / ((y / (t / b)) + 1.0d0)
if (a <= (-86.0d0)) then
tmp = (x + ((y * z) / t)) / a
else if (a <= 2.3d-273) then
tmp = t_1
else if (a <= 1.8d-212) then
tmp = z / b
else if (a <= 7d-12) then
tmp = t_1
else
tmp = (x + (y * (z / t))) / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / ((y / (t / b)) + 1.0);
double tmp;
if (a <= -86.0) {
tmp = (x + ((y * z) / t)) / a;
} else if (a <= 2.3e-273) {
tmp = t_1;
} else if (a <= 1.8e-212) {
tmp = z / b;
} else if (a <= 7e-12) {
tmp = t_1;
} else {
tmp = (x + (y * (z / t))) / a;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / ((y / (t / b)) + 1.0) tmp = 0 if a <= -86.0: tmp = (x + ((y * z) / t)) / a elif a <= 2.3e-273: tmp = t_1 elif a <= 1.8e-212: tmp = z / b elif a <= 7e-12: tmp = t_1 else: tmp = (x + (y * (z / t))) / a return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(Float64(y / Float64(t / b)) + 1.0)) tmp = 0.0 if (a <= -86.0) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / a); elseif (a <= 2.3e-273) tmp = t_1; elseif (a <= 1.8e-212) tmp = Float64(z / b); elseif (a <= 7e-12) tmp = t_1; else tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / ((y / (t / b)) + 1.0); tmp = 0.0; if (a <= -86.0) tmp = (x + ((y * z) / t)) / a; elseif (a <= 2.3e-273) tmp = t_1; elseif (a <= 1.8e-212) tmp = z / b; elseif (a <= 7e-12) tmp = t_1; else tmp = (x + (y * (z / t))) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -86.0], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[a, 2.3e-273], t$95$1, If[LessEqual[a, 1.8e-212], N[(z / b), $MachinePrecision], If[LessEqual[a, 7e-12], t$95$1, N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\frac{y}{\frac{t}{b}} + 1}\\
\mathbf{if}\;a \leq -86:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\
\mathbf{elif}\;a \leq 2.3 \cdot 10^{-273}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.8 \cdot 10^{-212}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 7 \cdot 10^{-12}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a}\\
\end{array}
\end{array}
if a < -86Initial program 83.4%
associate-/l*77.9%
associate-/l*76.0%
Simplified76.0%
Taylor expanded in a around inf 67.1%
if -86 < a < 2.29999999999999981e-273 or 1.8e-212 < a < 7.0000000000000001e-12Initial program 76.1%
associate-/l*77.0%
associate-/l*75.9%
Simplified75.9%
Taylor expanded in x around inf 61.0%
associate-*l/58.3%
*-commutative58.3%
Simplified58.3%
Taylor expanded in a around 0 60.4%
*-commutative60.4%
associate-*r/57.7%
Simplified57.7%
clear-num57.7%
un-div-inv58.3%
Applied egg-rr58.3%
if 2.29999999999999981e-273 < a < 1.8e-212Initial program 62.4%
associate-/l*62.7%
associate-/l*67.4%
Simplified67.4%
Taylor expanded in y around inf 51.8%
if 7.0000000000000001e-12 < a Initial program 77.2%
associate-/l*77.4%
associate-/l*76.0%
Simplified76.0%
Taylor expanded in a around inf 69.3%
Final simplification62.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -4.6e+77)
(/ x (+ (+ a (/ (* y b) t)) 1.0))
(if (<= b -6.5e+22)
(/ z b)
(if (<= b 5.5e+100)
(/ (+ x (/ z (/ t y))) (+ a 1.0))
(* t (+ (/ x (* y b)) (/ z (* t b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -4.6e+77) {
tmp = x / ((a + ((y * b) / t)) + 1.0);
} else if (b <= -6.5e+22) {
tmp = z / b;
} else if (b <= 5.5e+100) {
tmp = (x + (z / (t / y))) / (a + 1.0);
} else {
tmp = t * ((x / (y * b)) + (z / (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 (b <= (-4.6d+77)) then
tmp = x / ((a + ((y * b) / t)) + 1.0d0)
else if (b <= (-6.5d+22)) then
tmp = z / b
else if (b <= 5.5d+100) then
tmp = (x + (z / (t / y))) / (a + 1.0d0)
else
tmp = t * ((x / (y * b)) + (z / (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 (b <= -4.6e+77) {
tmp = x / ((a + ((y * b) / t)) + 1.0);
} else if (b <= -6.5e+22) {
tmp = z / b;
} else if (b <= 5.5e+100) {
tmp = (x + (z / (t / y))) / (a + 1.0);
} else {
tmp = t * ((x / (y * b)) + (z / (t * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -4.6e+77: tmp = x / ((a + ((y * b) / t)) + 1.0) elif b <= -6.5e+22: tmp = z / b elif b <= 5.5e+100: tmp = (x + (z / (t / y))) / (a + 1.0) else: tmp = t * ((x / (y * b)) + (z / (t * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -4.6e+77) tmp = Float64(x / Float64(Float64(a + Float64(Float64(y * b) / t)) + 1.0)); elseif (b <= -6.5e+22) tmp = Float64(z / b); elseif (b <= 5.5e+100) tmp = Float64(Float64(x + Float64(z / Float64(t / y))) / Float64(a + 1.0)); else tmp = Float64(t * Float64(Float64(x / Float64(y * b)) + Float64(z / Float64(t * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -4.6e+77) tmp = x / ((a + ((y * b) / t)) + 1.0); elseif (b <= -6.5e+22) tmp = z / b; elseif (b <= 5.5e+100) tmp = (x + (z / (t / y))) / (a + 1.0); else tmp = t * ((x / (y * b)) + (z / (t * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -4.6e+77], N[(x / N[(N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -6.5e+22], N[(z / b), $MachinePrecision], If[LessEqual[b, 5.5e+100], N[(N[(x + N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(x / N[(y * b), $MachinePrecision]), $MachinePrecision] + N[(z / N[(t * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.6 \cdot 10^{+77}:\\
\;\;\;\;\frac{x}{\left(a + \frac{y \cdot b}{t}\right) + 1}\\
\mathbf{elif}\;b \leq -6.5 \cdot 10^{+22}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;b \leq 5.5 \cdot 10^{+100}:\\
\;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\frac{x}{y \cdot b} + \frac{z}{t \cdot b}\right)\\
\end{array}
\end{array}
if b < -4.5999999999999999e77Initial program 68.3%
associate-/l*65.8%
associate-/l*63.4%
Simplified63.4%
Taylor expanded in x around inf 66.8%
if -4.5999999999999999e77 < b < -6.49999999999999979e22Initial program 53.3%
associate-/l*58.3%
associate-/l*58.1%
Simplified58.1%
Taylor expanded in y around inf 66.8%
if -6.49999999999999979e22 < b < 5.5000000000000002e100Initial program 85.9%
*-commutative85.9%
associate-/l*89.5%
Applied egg-rr89.5%
Taylor expanded in y around 0 80.3%
clear-num80.2%
un-div-inv80.9%
Applied egg-rr80.9%
if 5.5000000000000002e100 < b Initial program 63.7%
associate-/l*57.4%
associate-/l*54.7%
Simplified54.7%
Taylor expanded in b around inf 39.7%
Taylor expanded in t around inf 65.5%
Final simplification74.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -9.5e-188) (not (<= t 2.05e-170))) (/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t)))) (* z (+ (/ 1.0 b) (/ (/ (* x t) b) (* y z))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -9.5e-188) || !(t <= 2.05e-170)) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else {
tmp = z * ((1.0 / b) + (((x * t) / b) / (y * z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-9.5d-188)) .or. (.not. (t <= 2.05d-170))) then
tmp = (x + (y * (z / t))) / ((a + 1.0d0) + (y * (b / t)))
else
tmp = z * ((1.0d0 / b) + (((x * t) / b) / (y * z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -9.5e-188) || !(t <= 2.05e-170)) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else {
tmp = z * ((1.0 / b) + (((x * t) / b) / (y * z)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -9.5e-188) or not (t <= 2.05e-170): tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))) else: tmp = z * ((1.0 / b) + (((x * t) / b) / (y * z))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -9.5e-188) || !(t <= 2.05e-170)) 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 / b) + Float64(Float64(Float64(x * t) / b) / Float64(y * z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -9.5e-188) || ~((t <= 2.05e-170))) tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))); else tmp = z * ((1.0 / b) + (((x * t) / b) / (y * z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -9.5e-188], N[Not[LessEqual[t, 2.05e-170]], $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 / b), $MachinePrecision] + N[(N[(N[(x * t), $MachinePrecision] / b), $MachinePrecision] / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.5 \cdot 10^{-188} \lor \neg \left(t \leq 2.05 \cdot 10^{-170}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(\frac{1}{b} + \frac{\frac{x \cdot t}{b}}{y \cdot z}\right)\\
\end{array}
\end{array}
if t < -9.50000000000000063e-188 or 2.04999999999999983e-170 < t Initial program 82.3%
associate-/l*84.5%
associate-/l*85.3%
Simplified85.3%
if -9.50000000000000063e-188 < t < 2.04999999999999983e-170Initial program 49.8%
associate-/l*34.5%
associate-/l*25.4%
Simplified25.4%
Taylor expanded in b around inf 50.7%
Taylor expanded in z around inf 71.8%
associate-/r*76.3%
Simplified76.3%
Final simplification83.8%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -3.1e+205)
(* z (+ (/ 1.0 b) (/ (/ (* x t) b) (* y z))))
(if (<= y 1.06e+164)
(/ (+ x (* z (/ y t))) (+ (/ (* y b) t) (+ a 1.0)))
(* z (/ (+ (* (/ t y) (/ x z)) 1.0) b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -3.1e+205) {
tmp = z * ((1.0 / b) + (((x * t) / b) / (y * z)));
} else if (y <= 1.06e+164) {
tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0));
} else {
tmp = z * ((((t / y) * (x / z)) + 1.0) / 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 <= (-3.1d+205)) then
tmp = z * ((1.0d0 / b) + (((x * t) / b) / (y * z)))
else if (y <= 1.06d+164) then
tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0d0))
else
tmp = z * ((((t / y) * (x / z)) + 1.0d0) / 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 <= -3.1e+205) {
tmp = z * ((1.0 / b) + (((x * t) / b) / (y * z)));
} else if (y <= 1.06e+164) {
tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0));
} else {
tmp = z * ((((t / y) * (x / z)) + 1.0) / b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -3.1e+205: tmp = z * ((1.0 / b) + (((x * t) / b) / (y * z))) elif y <= 1.06e+164: tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0)) else: tmp = z * ((((t / y) * (x / z)) + 1.0) / b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -3.1e+205) tmp = Float64(z * Float64(Float64(1.0 / b) + Float64(Float64(Float64(x * t) / b) / Float64(y * z)))); elseif (y <= 1.06e+164) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))); else tmp = Float64(z * Float64(Float64(Float64(Float64(t / y) * Float64(x / z)) + 1.0) / b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -3.1e+205) tmp = z * ((1.0 / b) + (((x * t) / b) / (y * z))); elseif (y <= 1.06e+164) tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0)); else tmp = z * ((((t / y) * (x / z)) + 1.0) / b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -3.1e+205], N[(z * N[(N[(1.0 / b), $MachinePrecision] + N[(N[(N[(x * t), $MachinePrecision] / b), $MachinePrecision] / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.06e+164], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(N[(N[(t / y), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.1 \cdot 10^{+205}:\\
\;\;\;\;z \cdot \left(\frac{1}{b} + \frac{\frac{x \cdot t}{b}}{y \cdot z}\right)\\
\mathbf{elif}\;y \leq 1.06 \cdot 10^{+164}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{\frac{t}{y} \cdot \frac{x}{z} + 1}{b}\\
\end{array}
\end{array}
if y < -3.10000000000000017e205Initial program 50.4%
associate-/l*55.9%
associate-/l*61.0%
Simplified61.0%
Taylor expanded in b around inf 40.5%
Taylor expanded in z around inf 78.2%
associate-/r*78.3%
Simplified78.3%
if -3.10000000000000017e205 < y < 1.05999999999999997e164Initial program 85.8%
*-commutative85.8%
associate-/l*88.9%
Applied egg-rr88.9%
if 1.05999999999999997e164 < y Initial program 33.7%
*-commutative33.7%
associate-/l*37.0%
Applied egg-rr37.0%
Taylor expanded in z around inf 35.5%
Taylor expanded in b around inf 75.6%
associate-/l*72.5%
times-frac75.6%
Simplified75.6%
Final simplification86.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -1150.0)
(/ z b)
(if (<= y 1.8e+40)
(/ x (+ a 1.0))
(if (<= y 1.4e+142) (* y (/ (/ z t) (+ a 1.0))) (/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1150.0) {
tmp = z / b;
} else if (y <= 1.8e+40) {
tmp = x / (a + 1.0);
} else if (y <= 1.4e+142) {
tmp = y * ((z / t) / (a + 1.0));
} 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 <= (-1150.0d0)) then
tmp = z / b
else if (y <= 1.8d+40) then
tmp = x / (a + 1.0d0)
else if (y <= 1.4d+142) then
tmp = y * ((z / t) / (a + 1.0d0))
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 <= -1150.0) {
tmp = z / b;
} else if (y <= 1.8e+40) {
tmp = x / (a + 1.0);
} else if (y <= 1.4e+142) {
tmp = y * ((z / t) / (a + 1.0));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1150.0: tmp = z / b elif y <= 1.8e+40: tmp = x / (a + 1.0) elif y <= 1.4e+142: tmp = y * ((z / t) / (a + 1.0)) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1150.0) tmp = Float64(z / b); elseif (y <= 1.8e+40) tmp = Float64(x / Float64(a + 1.0)); elseif (y <= 1.4e+142) tmp = Float64(y * Float64(Float64(z / t) / Float64(a + 1.0))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1150.0) tmp = z / b; elseif (y <= 1.8e+40) tmp = x / (a + 1.0); elseif (y <= 1.4e+142) tmp = y * ((z / t) / (a + 1.0)); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1150.0], N[(z / b), $MachinePrecision], If[LessEqual[y, 1.8e+40], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.4e+142], N[(y * N[(N[(z / t), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1150:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{+40}:\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{+142}:\\
\;\;\;\;y \cdot \frac{\frac{z}{t}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -1150 or 1.4e142 < y Initial program 50.1%
associate-/l*56.6%
associate-/l*62.8%
Simplified62.8%
Taylor expanded in y around inf 54.3%
if -1150 < y < 1.79999999999999998e40Initial program 96.3%
associate-/l*88.7%
associate-/l*82.3%
Simplified82.3%
Taylor expanded in y around 0 60.3%
if 1.79999999999999998e40 < y < 1.4e142Initial program 86.0%
*-commutative86.0%
associate-/l*99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 79.1%
Taylor expanded in x around 0 51.7%
associate-/l*51.9%
associate-/r*65.8%
Simplified65.8%
Final simplification58.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -6.5e+22)
(* x (+ (/ (/ z b) x) (/ (/ t y) b)))
(if (<= b 8.5e+104)
(/ (+ x (/ z (/ t y))) (+ a 1.0))
(* t (+ (/ x (* y b)) (/ z (* t b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -6.5e+22) {
tmp = x * (((z / b) / x) + ((t / y) / b));
} else if (b <= 8.5e+104) {
tmp = (x + (z / (t / y))) / (a + 1.0);
} else {
tmp = t * ((x / (y * b)) + (z / (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 (b <= (-6.5d+22)) then
tmp = x * (((z / b) / x) + ((t / y) / b))
else if (b <= 8.5d+104) then
tmp = (x + (z / (t / y))) / (a + 1.0d0)
else
tmp = t * ((x / (y * b)) + (z / (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 (b <= -6.5e+22) {
tmp = x * (((z / b) / x) + ((t / y) / b));
} else if (b <= 8.5e+104) {
tmp = (x + (z / (t / y))) / (a + 1.0);
} else {
tmp = t * ((x / (y * b)) + (z / (t * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -6.5e+22: tmp = x * (((z / b) / x) + ((t / y) / b)) elif b <= 8.5e+104: tmp = (x + (z / (t / y))) / (a + 1.0) else: tmp = t * ((x / (y * b)) + (z / (t * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -6.5e+22) tmp = Float64(x * Float64(Float64(Float64(z / b) / x) + Float64(Float64(t / y) / b))); elseif (b <= 8.5e+104) tmp = Float64(Float64(x + Float64(z / Float64(t / y))) / Float64(a + 1.0)); else tmp = Float64(t * Float64(Float64(x / Float64(y * b)) + Float64(z / Float64(t * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -6.5e+22) tmp = x * (((z / b) / x) + ((t / y) / b)); elseif (b <= 8.5e+104) tmp = (x + (z / (t / y))) / (a + 1.0); else tmp = t * ((x / (y * b)) + (z / (t * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -6.5e+22], N[(x * N[(N[(N[(z / b), $MachinePrecision] / x), $MachinePrecision] + N[(N[(t / y), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 8.5e+104], N[(N[(x + N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(x / N[(y * b), $MachinePrecision]), $MachinePrecision] + N[(z / N[(t * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.5 \cdot 10^{+22}:\\
\;\;\;\;x \cdot \left(\frac{\frac{z}{b}}{x} + \frac{\frac{t}{y}}{b}\right)\\
\mathbf{elif}\;b \leq 8.5 \cdot 10^{+104}:\\
\;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\frac{x}{y \cdot b} + \frac{z}{t \cdot b}\right)\\
\end{array}
\end{array}
if b < -6.49999999999999979e22Initial program 63.4%
associate-/l*63.4%
associate-/l*61.7%
Simplified61.7%
Taylor expanded in b around inf 42.4%
Taylor expanded in x around inf 61.9%
+-commutative61.9%
associate-/r*63.7%
*-commutative63.7%
associate-/r*66.9%
Simplified66.9%
if -6.49999999999999979e22 < b < 8.4999999999999999e104Initial program 85.9%
*-commutative85.9%
associate-/l*89.5%
Applied egg-rr89.5%
Taylor expanded in y around 0 80.3%
clear-num80.2%
un-div-inv80.9%
Applied egg-rr80.9%
if 8.4999999999999999e104 < b Initial program 63.7%
associate-/l*57.4%
associate-/l*54.7%
Simplified54.7%
Taylor expanded in b around inf 39.7%
Taylor expanded in t around inf 65.5%
Final simplification74.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1e-83) (not (<= t 5.8e-67))) (/ x (+ (+ a (* y (/ b t))) 1.0)) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1e-83) || !(t <= 5.8e-67)) {
tmp = x / ((a + (y * (b / t))) + 1.0);
} 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 <= (-1d-83)) .or. (.not. (t <= 5.8d-67))) then
tmp = x / ((a + (y * (b / t))) + 1.0d0)
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 <= -1e-83) || !(t <= 5.8e-67)) {
tmp = x / ((a + (y * (b / t))) + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1e-83) or not (t <= 5.8e-67): tmp = x / ((a + (y * (b / t))) + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1e-83) || !(t <= 5.8e-67)) tmp = Float64(x / Float64(Float64(a + Float64(y * Float64(b / t))) + 1.0)); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -1e-83) || ~((t <= 5.8e-67))) tmp = x / ((a + (y * (b / t))) + 1.0); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1e-83], N[Not[LessEqual[t, 5.8e-67]], $MachinePrecision]], N[(x / N[(N[(a + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-83} \lor \neg \left(t \leq 5.8 \cdot 10^{-67}\right):\\
\;\;\;\;\frac{x}{\left(a + y \cdot \frac{b}{t}\right) + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -1e-83 or 5.8000000000000001e-67 < t Initial program 84.4%
associate-/l*89.1%
associate-/l*91.9%
Simplified91.9%
Taylor expanded in x around inf 66.6%
associate-*l/68.3%
*-commutative68.3%
Simplified68.3%
if -1e-83 < t < 5.8000000000000001e-67Initial program 62.8%
associate-/l*52.2%
associate-/l*44.7%
Simplified44.7%
Taylor expanded in y around inf 55.2%
Final simplification63.7%
(FPCore (x y z t a b) :precision binary64 (if (<= t -2e-85) (/ x (+ (+ a (* y (/ b t))) 1.0)) (if (<= t 7.2e-70) (/ z b) (/ x (+ (+ a (/ y (/ t b))) 1.0)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2e-85) {
tmp = x / ((a + (y * (b / t))) + 1.0);
} else if (t <= 7.2e-70) {
tmp = z / b;
} else {
tmp = x / ((a + (y / (t / b))) + 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 (t <= (-2d-85)) then
tmp = x / ((a + (y * (b / t))) + 1.0d0)
else if (t <= 7.2d-70) then
tmp = z / b
else
tmp = x / ((a + (y / (t / b))) + 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 (t <= -2e-85) {
tmp = x / ((a + (y * (b / t))) + 1.0);
} else if (t <= 7.2e-70) {
tmp = z / b;
} else {
tmp = x / ((a + (y / (t / b))) + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -2e-85: tmp = x / ((a + (y * (b / t))) + 1.0) elif t <= 7.2e-70: tmp = z / b else: tmp = x / ((a + (y / (t / b))) + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -2e-85) tmp = Float64(x / Float64(Float64(a + Float64(y * Float64(b / t))) + 1.0)); elseif (t <= 7.2e-70) tmp = Float64(z / b); else tmp = Float64(x / Float64(Float64(a + Float64(y / Float64(t / b))) + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -2e-85) tmp = x / ((a + (y * (b / t))) + 1.0); elseif (t <= 7.2e-70) tmp = z / b; else tmp = x / ((a + (y / (t / b))) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2e-85], N[(x / N[(N[(a + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.2e-70], N[(z / b), $MachinePrecision], N[(x / N[(N[(a + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-85}:\\
\;\;\;\;\frac{x}{\left(a + y \cdot \frac{b}{t}\right) + 1}\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{-70}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(a + \frac{y}{\frac{t}{b}}\right) + 1}\\
\end{array}
\end{array}
if t < -2e-85Initial program 83.9%
associate-/l*88.4%
associate-/l*90.4%
Simplified90.4%
Taylor expanded in x around inf 67.5%
associate-*l/68.5%
*-commutative68.5%
Simplified68.5%
if -2e-85 < t < 7.2000000000000004e-70Initial program 62.8%
associate-/l*52.2%
associate-/l*44.7%
Simplified44.7%
Taylor expanded in y around inf 55.2%
if 7.2000000000000004e-70 < t Initial program 85.0%
associate-/l*90.0%
associate-/l*93.6%
Simplified93.6%
Taylor expanded in x around inf 65.6%
associate-*l/68.0%
*-commutative68.0%
Simplified68.0%
clear-num42.3%
un-div-inv43.1%
Applied egg-rr68.8%
Final simplification63.9%
(FPCore (x y z t a b) :precision binary64 (if (<= t -1.08e+79) (/ x a) (if (<= t 4.8e+57) (/ z b) (if (<= t 5.8e+270) (/ x a) x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.08e+79) {
tmp = x / a;
} else if (t <= 4.8e+57) {
tmp = z / b;
} else if (t <= 5.8e+270) {
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 (t <= (-1.08d+79)) then
tmp = x / a
else if (t <= 4.8d+57) then
tmp = z / b
else if (t <= 5.8d+270) 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 (t <= -1.08e+79) {
tmp = x / a;
} else if (t <= 4.8e+57) {
tmp = z / b;
} else if (t <= 5.8e+270) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.08e+79: tmp = x / a elif t <= 4.8e+57: tmp = z / b elif t <= 5.8e+270: tmp = x / a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.08e+79) tmp = Float64(x / a); elseif (t <= 4.8e+57) tmp = Float64(z / b); elseif (t <= 5.8e+270) 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 (t <= -1.08e+79) tmp = x / a; elseif (t <= 4.8e+57) tmp = z / b; elseif (t <= 5.8e+270) tmp = x / a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.08e+79], N[(x / a), $MachinePrecision], If[LessEqual[t, 4.8e+57], N[(z / b), $MachinePrecision], If[LessEqual[t, 5.8e+270], N[(x / a), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.08 \cdot 10^{+79}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;t \leq 4.8 \cdot 10^{+57}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{+270}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -1.08000000000000002e79 or 4.80000000000000009e57 < t < 5.7999999999999998e270Initial program 82.7%
associate-/l*90.9%
associate-/l*96.9%
Simplified96.9%
Taylor expanded in x around inf 74.1%
associate-*l/78.0%
*-commutative78.0%
Simplified78.0%
Taylor expanded in a around inf 43.5%
if -1.08000000000000002e79 < t < 4.80000000000000009e57Initial program 72.2%
associate-/l*65.2%
associate-/l*60.0%
Simplified60.0%
Taylor expanded in y around inf 48.0%
if 5.7999999999999998e270 < t Initial program 90.5%
associate-/l*100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in x around inf 80.4%
associate-*l/80.4%
*-commutative80.4%
Simplified80.4%
Taylor expanded in a around 0 69.6%
*-commutative69.6%
associate-*r/69.6%
Simplified69.6%
Taylor expanded in y around 0 69.6%
Final simplification47.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1150.0) (not (<= y 2.4e+54))) (/ z b) (/ x (+ a 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1150.0) || !(y <= 2.4e+54)) {
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 <= (-1150.0d0)) .or. (.not. (y <= 2.4d+54))) 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 <= -1150.0) || !(y <= 2.4e+54)) {
tmp = z / b;
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1150.0) or not (y <= 2.4e+54): tmp = z / b else: tmp = x / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1150.0) || !(y <= 2.4e+54)) 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 <= -1150.0) || ~((y <= 2.4e+54))) 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, -1150.0], N[Not[LessEqual[y, 2.4e+54]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1150 \lor \neg \left(y \leq 2.4 \cdot 10^{+54}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a + 1}\\
\end{array}
\end{array}
if y < -1150 or 2.39999999999999998e54 < y Initial program 53.6%
associate-/l*60.4%
associate-/l*66.0%
Simplified66.0%
Taylor expanded in y around inf 51.5%
if -1150 < y < 2.39999999999999998e54Initial program 95.8%
associate-/l*89.0%
associate-/l*82.8%
Simplified82.8%
Taylor expanded in y around 0 60.1%
Final simplification56.2%
(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 79.5%
associate-/l*78.0%
associate-/l*76.4%
Simplified76.4%
Taylor expanded in x around inf 52.7%
associate-*l/51.1%
*-commutative51.1%
Simplified51.1%
Taylor expanded in a around inf 47.3%
if -1 < a < 1Initial program 74.3%
associate-/l*74.4%
associate-/l*74.2%
Simplified74.2%
Taylor expanded in x around inf 54.6%
associate-*l/53.1%
*-commutative53.1%
Simplified53.1%
Taylor expanded in a around 0 54.1%
*-commutative54.1%
associate-*r/52.7%
Simplified52.7%
Taylor expanded in y around 0 36.1%
Final simplification41.5%
(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 76.8%
associate-/l*76.1%
associate-/l*75.3%
Simplified75.3%
Taylor expanded in x around inf 53.7%
associate-*l/52.2%
*-commutative52.2%
Simplified52.2%
Taylor expanded in a around 0 33.7%
*-commutative33.7%
associate-*r/32.2%
Simplified32.2%
Taylor expanded in y around 0 20.8%
Final simplification20.8%
(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 2024115
(FPCore (x y z t a b)
:name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B"
:precision binary64
:alt
(if (< t -1.3659085366310088e-271) (* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b))))) (if (< t 3.036967103737246e-130) (/ z b) (* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b)))))))
(/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))