
(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 17 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 (+ (+ a 1.0) (/ (* y b) t)))
(t_2 (/ (+ x (/ (* y z) t)) t_1))
(t_3 (+ (fma y (/ b t) a) 1.0)))
(if (<= t_2 (- INFINITY))
(* z (+ (/ x (* z t_1)) (/ y (* t t_1))))
(if (<= t_2 -5e-313)
t_2
(if (<= t_2 0.0)
(+ (/ z b) (/ (* t (- (/ x b) (/ (* z (+ a 1.0)) (pow b 2.0)))) y))
(if (<= t_2 5e+248)
t_2
(if (<= t_2 INFINITY)
(* z (+ (/ x (* z t_3)) (/ (/ y t) t_3)))
(/ z b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a + 1.0) + ((y * b) / t);
double t_2 = (x + ((y * z) / t)) / t_1;
double t_3 = fma(y, (b / t), a) + 1.0;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = z * ((x / (z * t_1)) + (y / (t * t_1)));
} else if (t_2 <= -5e-313) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = (z / b) + ((t * ((x / b) - ((z * (a + 1.0)) / pow(b, 2.0)))) / y);
} else if (t_2 <= 5e+248) {
tmp = t_2;
} else if (t_2 <= ((double) INFINITY)) {
tmp = z * ((x / (z * t_3)) + ((y / t) / t_3));
} else {
tmp = z / b;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t)) t_2 = Float64(Float64(x + Float64(Float64(y * z) / t)) / t_1) t_3 = Float64(fma(y, Float64(b / t), a) + 1.0) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(z * Float64(Float64(x / Float64(z * t_1)) + Float64(y / Float64(t * t_1)))); elseif (t_2 <= -5e-313) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(Float64(z / b) + Float64(Float64(t * Float64(Float64(x / b) - Float64(Float64(z * Float64(a + 1.0)) / (b ^ 2.0)))) / y)); elseif (t_2 <= 5e+248) tmp = t_2; elseif (t_2 <= Inf) tmp = Float64(z * Float64(Float64(x / Float64(z * t_3)) + Float64(Float64(y / t) / t_3))); else tmp = Float64(z / b); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(z * N[(N[(x / N[(z * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(y / N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -5e-313], t$95$2, If[LessEqual[t$95$2, 0.0], N[(N[(z / b), $MachinePrecision] + N[(N[(t * N[(N[(x / b), $MachinePrecision] - N[(N[(z * N[(a + 1.0), $MachinePrecision]), $MachinePrecision] / N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+248], t$95$2, If[LessEqual[t$95$2, Infinity], N[(z * N[(N[(x / N[(z * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(N[(y / t), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a + 1\right) + \frac{y \cdot b}{t}\\
t_2 := \frac{x + \frac{y \cdot z}{t}}{t\_1}\\
t_3 := \mathsf{fma}\left(y, \frac{b}{t}, a\right) + 1\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;z \cdot \left(\frac{x}{z \cdot t\_1} + \frac{y}{t \cdot t\_1}\right)\\
\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-313}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\frac{z}{b} + \frac{t \cdot \left(\frac{x}{b} - \frac{z \cdot \left(a + 1\right)}{{b}^{2}}\right)}{y}\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+248}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;z \cdot \left(\frac{x}{z \cdot t\_3} + \frac{\frac{y}{t}}{t\_3}\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))) < -inf.0Initial program 40.4%
associate-/l*52.0%
associate-/l*51.8%
Simplified51.8%
Taylor expanded in z around inf 99.8%
associate-+r+99.8%
*-commutative99.8%
associate-+r+99.8%
*-commutative99.8%
Simplified99.8%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -5.00000000002e-313 or 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 4.9999999999999996e248Initial program 99.3%
if -5.00000000002e-313 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 0.0Initial program 57.5%
associate-/l*57.4%
associate-/l*72.4%
Simplified72.4%
Taylor expanded in y around -inf 68.7%
+-commutative68.7%
mul-1-neg68.7%
unsub-neg68.7%
distribute-lft-out--68.7%
mul-1-neg68.7%
associate-/l*73.8%
associate-/l*81.8%
distribute-lft-out--81.8%
Simplified81.8%
if 4.9999999999999996e248 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 56.0%
associate-/l*92.7%
associate-/l*92.7%
Simplified92.7%
Taylor expanded in z around inf 99.8%
associate-*r/99.8%
+-commutative99.8%
associate-*r/99.8%
associate-*l/99.8%
*-commutative99.8%
fma-define99.8%
associate-/r*99.8%
associate-*r/69.0%
+-commutative69.0%
associate-*r/99.8%
associate-*l/99.9%
*-commutative99.9%
fma-define99.9%
Simplified99.9%
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.2%
associate-/l*0.5%
Simplified0.5%
Taylor expanded in y around inf 96.3%
Final simplification96.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ a 1.0) (/ (* y b) t)))
(t_2 (/ (+ x (/ (* y z) t)) t_1))
(t_3 (* z (+ (/ x (* z t_1)) (/ y (* t t_1))))))
(if (<= t_2 (- INFINITY))
t_3
(if (<= t_2 -5e-313)
t_2
(if (<= t_2 0.0)
(+ (/ z b) (/ (* t (- (/ x b) (/ (* z (+ a 1.0)) (pow b 2.0)))) y))
(if (<= t_2 5e+248) t_2 (if (<= t_2 INFINITY) t_3 (/ z b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a + 1.0) + ((y * b) / t);
double t_2 = (x + ((y * z) / t)) / t_1;
double t_3 = z * ((x / (z * t_1)) + (y / (t * t_1)));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_3;
} else if (t_2 <= -5e-313) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = (z / b) + ((t * ((x / b) - ((z * (a + 1.0)) / pow(b, 2.0)))) / y);
} else if (t_2 <= 5e+248) {
tmp = t_2;
} else if (t_2 <= ((double) INFINITY)) {
tmp = t_3;
} 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 = (a + 1.0) + ((y * b) / t);
double t_2 = (x + ((y * z) / t)) / t_1;
double t_3 = z * ((x / (z * t_1)) + (y / (t * t_1)));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_3;
} else if (t_2 <= -5e-313) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = (z / b) + ((t * ((x / b) - ((z * (a + 1.0)) / Math.pow(b, 2.0)))) / y);
} else if (t_2 <= 5e+248) {
tmp = t_2;
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = t_3;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a + 1.0) + ((y * b) / t) t_2 = (x + ((y * z) / t)) / t_1 t_3 = z * ((x / (z * t_1)) + (y / (t * t_1))) tmp = 0 if t_2 <= -math.inf: tmp = t_3 elif t_2 <= -5e-313: tmp = t_2 elif t_2 <= 0.0: tmp = (z / b) + ((t * ((x / b) - ((z * (a + 1.0)) / math.pow(b, 2.0)))) / y) elif t_2 <= 5e+248: tmp = t_2 elif t_2 <= math.inf: tmp = t_3 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t)) t_2 = Float64(Float64(x + Float64(Float64(y * z) / t)) / t_1) t_3 = Float64(z * Float64(Float64(x / Float64(z * t_1)) + Float64(y / Float64(t * t_1)))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_3; elseif (t_2 <= -5e-313) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(Float64(z / b) + Float64(Float64(t * Float64(Float64(x / b) - Float64(Float64(z * Float64(a + 1.0)) / (b ^ 2.0)))) / y)); elseif (t_2 <= 5e+248) tmp = t_2; elseif (t_2 <= Inf) tmp = t_3; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a + 1.0) + ((y * b) / t); t_2 = (x + ((y * z) / t)) / t_1; t_3 = z * ((x / (z * t_1)) + (y / (t * t_1))); tmp = 0.0; if (t_2 <= -Inf) tmp = t_3; elseif (t_2 <= -5e-313) tmp = t_2; elseif (t_2 <= 0.0) tmp = (z / b) + ((t * ((x / b) - ((z * (a + 1.0)) / (b ^ 2.0)))) / y); elseif (t_2 <= 5e+248) tmp = t_2; elseif (t_2 <= Inf) tmp = t_3; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(N[(x / N[(z * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(y / N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$3, If[LessEqual[t$95$2, -5e-313], t$95$2, If[LessEqual[t$95$2, 0.0], N[(N[(z / b), $MachinePrecision] + N[(N[(t * N[(N[(x / b), $MachinePrecision] - N[(N[(z * N[(a + 1.0), $MachinePrecision]), $MachinePrecision] / N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+248], t$95$2, If[LessEqual[t$95$2, Infinity], t$95$3, N[(z / b), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a + 1\right) + \frac{y \cdot b}{t}\\
t_2 := \frac{x + \frac{y \cdot z}{t}}{t\_1}\\
t_3 := z \cdot \left(\frac{x}{z \cdot t\_1} + \frac{y}{t \cdot t\_1}\right)\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-313}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\frac{z}{b} + \frac{t \cdot \left(\frac{x}{b} - \frac{z \cdot \left(a + 1\right)}{{b}^{2}}\right)}{y}\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+248}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;t\_3\\
\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.0 or 4.9999999999999996e248 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 50.1%
associate-/l*77.2%
associate-/l*77.1%
Simplified77.1%
Taylor expanded in z around inf 99.8%
associate-+r+99.8%
*-commutative99.8%
associate-+r+99.8%
*-commutative99.8%
Simplified99.8%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -5.00000000002e-313 or 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 4.9999999999999996e248Initial program 99.3%
if -5.00000000002e-313 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 0.0Initial program 57.5%
associate-/l*57.4%
associate-/l*72.4%
Simplified72.4%
Taylor expanded in y around -inf 68.7%
+-commutative68.7%
mul-1-neg68.7%
unsub-neg68.7%
distribute-lft-out--68.7%
mul-1-neg68.7%
associate-/l*73.8%
associate-/l*81.8%
distribute-lft-out--81.8%
Simplified81.8%
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.2%
associate-/l*0.5%
Simplified0.5%
Taylor expanded in y around inf 96.3%
Final simplification96.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ a 1.0) (/ (* y b) t)))
(t_2 (/ (+ x (/ (* y z) t)) t_1))
(t_3 (* z (+ (/ x (* z t_1)) (/ y (* t t_1))))))
(if (<= t_2 (- INFINITY))
t_3
(if (<= t_2 -5e-313)
t_2
(if (<= t_2 0.0)
(/ z b)
(if (<= t_2 5e+248) t_2 (if (<= t_2 INFINITY) t_3 (/ z b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a + 1.0) + ((y * b) / t);
double t_2 = (x + ((y * z) / t)) / t_1;
double t_3 = z * ((x / (z * t_1)) + (y / (t * t_1)));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_3;
} else if (t_2 <= -5e-313) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = z / b;
} else if (t_2 <= 5e+248) {
tmp = t_2;
} else if (t_2 <= ((double) INFINITY)) {
tmp = t_3;
} 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 = (a + 1.0) + ((y * b) / t);
double t_2 = (x + ((y * z) / t)) / t_1;
double t_3 = z * ((x / (z * t_1)) + (y / (t * t_1)));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_3;
} else if (t_2 <= -5e-313) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = z / b;
} else if (t_2 <= 5e+248) {
tmp = t_2;
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = t_3;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a + 1.0) + ((y * b) / t) t_2 = (x + ((y * z) / t)) / t_1 t_3 = z * ((x / (z * t_1)) + (y / (t * t_1))) tmp = 0 if t_2 <= -math.inf: tmp = t_3 elif t_2 <= -5e-313: tmp = t_2 elif t_2 <= 0.0: tmp = z / b elif t_2 <= 5e+248: tmp = t_2 elif t_2 <= math.inf: tmp = t_3 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t)) t_2 = Float64(Float64(x + Float64(Float64(y * z) / t)) / t_1) t_3 = Float64(z * Float64(Float64(x / Float64(z * t_1)) + Float64(y / Float64(t * t_1)))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_3; elseif (t_2 <= -5e-313) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(z / b); elseif (t_2 <= 5e+248) tmp = t_2; elseif (t_2 <= Inf) tmp = t_3; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a + 1.0) + ((y * b) / t); t_2 = (x + ((y * z) / t)) / t_1; t_3 = z * ((x / (z * t_1)) + (y / (t * t_1))); tmp = 0.0; if (t_2 <= -Inf) tmp = t_3; elseif (t_2 <= -5e-313) tmp = t_2; elseif (t_2 <= 0.0) tmp = z / b; elseif (t_2 <= 5e+248) tmp = t_2; elseif (t_2 <= Inf) tmp = t_3; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(N[(x / N[(z * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(y / N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$3, If[LessEqual[t$95$2, -5e-313], t$95$2, If[LessEqual[t$95$2, 0.0], N[(z / b), $MachinePrecision], If[LessEqual[t$95$2, 5e+248], t$95$2, If[LessEqual[t$95$2, Infinity], t$95$3, N[(z / b), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a + 1\right) + \frac{y \cdot b}{t}\\
t_2 := \frac{x + \frac{y \cdot z}{t}}{t\_1}\\
t_3 := z \cdot \left(\frac{x}{z \cdot t\_1} + \frac{y}{t \cdot t\_1}\right)\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-313}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+248}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;t\_3\\
\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.0 or 4.9999999999999996e248 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 50.1%
associate-/l*77.2%
associate-/l*77.1%
Simplified77.1%
Taylor expanded in z around inf 99.8%
associate-+r+99.8%
*-commutative99.8%
associate-+r+99.8%
*-commutative99.8%
Simplified99.8%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -5.00000000002e-313 or 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 4.9999999999999996e248Initial program 99.3%
if -5.00000000002e-313 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 0.0 or +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 34.1%
associate-/l*34.1%
associate-/l*43.2%
Simplified43.2%
Taylor expanded in y around inf 82.2%
Final simplification95.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* y b) t))
(t_2 (+ (+ a t_1) 1.0))
(t_3 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) t_1)))
(t_4 (+ (/ x t_2) (/ (* y z) (* t t_2)))))
(if (<= t_3 -5e-246)
t_4
(if (<= t_3 4e-277)
(/ (+ x (* y (/ z t))) (+ (+ a 1.0) (/ y (/ t b))))
(if (<= t_3 5e+248) t_4 (/ 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 = (a + t_1) + 1.0;
double t_3 = (x + ((y * z) / t)) / ((a + 1.0) + t_1);
double t_4 = (x / t_2) + ((y * z) / (t * t_2));
double tmp;
if (t_3 <= -5e-246) {
tmp = t_4;
} else if (t_3 <= 4e-277) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b)));
} else if (t_3 <= 5e+248) {
tmp = t_4;
} 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) :: t_4
real(8) :: tmp
t_1 = (y * b) / t
t_2 = (a + t_1) + 1.0d0
t_3 = (x + ((y * z) / t)) / ((a + 1.0d0) + t_1)
t_4 = (x / t_2) + ((y * z) / (t * t_2))
if (t_3 <= (-5d-246)) then
tmp = t_4
else if (t_3 <= 4d-277) then
tmp = (x + (y * (z / t))) / ((a + 1.0d0) + (y / (t / b)))
else if (t_3 <= 5d+248) then
tmp = t_4
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;
double t_2 = (a + t_1) + 1.0;
double t_3 = (x + ((y * z) / t)) / ((a + 1.0) + t_1);
double t_4 = (x / t_2) + ((y * z) / (t * t_2));
double tmp;
if (t_3 <= -5e-246) {
tmp = t_4;
} else if (t_3 <= 4e-277) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b)));
} else if (t_3 <= 5e+248) {
tmp = t_4;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * b) / t t_2 = (a + t_1) + 1.0 t_3 = (x + ((y * z) / t)) / ((a + 1.0) + t_1) t_4 = (x / t_2) + ((y * z) / (t * t_2)) tmp = 0 if t_3 <= -5e-246: tmp = t_4 elif t_3 <= 4e-277: tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b))) elif t_3 <= 5e+248: tmp = t_4 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(a + t_1) + 1.0) t_3 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + t_1)) t_4 = Float64(Float64(x / t_2) + Float64(Float64(y * z) / Float64(t * t_2))) tmp = 0.0 if (t_3 <= -5e-246) tmp = t_4; elseif (t_3 <= 4e-277) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))); elseif (t_3 <= 5e+248) tmp = 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; t_2 = (a + t_1) + 1.0; t_3 = (x + ((y * z) / t)) / ((a + 1.0) + t_1); t_4 = (x / t_2) + ((y * z) / (t * t_2)); tmp = 0.0; if (t_3 <= -5e-246) tmp = t_4; elseif (t_3 <= 4e-277) tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b))); elseif (t_3 <= 5e+248) tmp = t_4; 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[(a + t$95$1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = 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$4 = N[(N[(x / t$95$2), $MachinePrecision] + N[(N[(y * z), $MachinePrecision] / N[(t * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -5e-246], t$95$4, If[LessEqual[t$95$3, 4e-277], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 5e+248], t$95$4, N[(z / b), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t}\\
t_2 := \left(a + t\_1\right) + 1\\
t_3 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + t\_1}\\
t_4 := \frac{x}{t\_2} + \frac{y \cdot z}{t \cdot t\_2}\\
\mathbf{if}\;t\_3 \leq -5 \cdot 10^{-246}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_3 \leq 4 \cdot 10^{-277}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+248}:\\
\;\;\;\;t\_4\\
\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.9999999999999997e-246 or 3.99999999999999988e-277 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 4.9999999999999996e248Initial program 96.8%
associate-/l*92.2%
associate-/l*85.8%
Simplified85.8%
Taylor expanded in x around 0 97.5%
if -4.9999999999999997e-246 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 3.99999999999999988e-277Initial program 67.1%
associate-/l*68.1%
associate-/l*77.6%
Simplified77.6%
clear-num77.6%
un-div-inv77.6%
Applied egg-rr77.6%
if 4.9999999999999996e248 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 18.7%
associate-/l*31.0%
associate-/l*31.3%
Simplified31.3%
Taylor expanded in y around inf 85.2%
Final simplification91.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t)))))
(if (or (<= t_1 -5e-313) (and (not (<= t_1 0.0)) (<= t_1 5e+248)))
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 <= -5e-313) || (!(t_1 <= 0.0) && (t_1 <= 5e+248))) {
tmp = t_1;
} 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) :: tmp
t_1 = (x + ((y * z) / t)) / ((a + 1.0d0) + ((y * b) / t))
if ((t_1 <= (-5d-313)) .or. (.not. (t_1 <= 0.0d0)) .and. (t_1 <= 5d+248)) then
tmp = t_1
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 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
double tmp;
if ((t_1 <= -5e-313) || (!(t_1 <= 0.0) && (t_1 <= 5e+248))) {
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 <= -5e-313) or (not (t_1 <= 0.0) and (t_1 <= 5e+248)): 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 <= -5e-313) || (!(t_1 <= 0.0) && (t_1 <= 5e+248))) 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 <= -5e-313) || (~((t_1 <= 0.0)) && (t_1 <= 5e+248))) 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[Or[LessEqual[t$95$1, -5e-313], And[N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision], LessEqual[t$95$1, 5e+248]]], 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 -5 \cdot 10^{-313} \lor \neg \left(t\_1 \leq 0\right) \land t\_1 \leq 5 \cdot 10^{+248}:\\
\;\;\;\;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))) < -5.00000000002e-313 or 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 4.9999999999999996e248Initial program 96.7%
if -5.00000000002e-313 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 0.0 or 4.9999999999999996e248 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 37.8%
associate-/l*44.0%
associate-/l*51.6%
Simplified51.6%
Taylor expanded in y around inf 79.0%
Final simplification91.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ a 1.0)))
(t_2 (* z (/ (+ (* (/ t y) (/ x z)) 1.0) b))))
(if (<= b -2.5e+84)
t_2
(if (<= b 3.7e+56)
t_1
(if (<= b 4.8e+97)
t_2
(if (<= b 4.35e+148)
t_1
(if (<= b 3.1e+280) t_2 (/ x (+ (+ a 1.0) (/ (* y b) t))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / (a + 1.0);
double t_2 = z * ((((t / y) * (x / z)) + 1.0) / b);
double tmp;
if (b <= -2.5e+84) {
tmp = t_2;
} else if (b <= 3.7e+56) {
tmp = t_1;
} else if (b <= 4.8e+97) {
tmp = t_2;
} else if (b <= 4.35e+148) {
tmp = t_1;
} else if (b <= 3.1e+280) {
tmp = t_2;
} else {
tmp = x / ((a + 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x + ((y * z) / t)) / (a + 1.0d0)
t_2 = z * ((((t / y) * (x / z)) + 1.0d0) / b)
if (b <= (-2.5d+84)) then
tmp = t_2
else if (b <= 3.7d+56) then
tmp = t_1
else if (b <= 4.8d+97) then
tmp = t_2
else if (b <= 4.35d+148) then
tmp = t_1
else if (b <= 3.1d+280) then
tmp = t_2
else
tmp = x / ((a + 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 t_1 = (x + ((y * z) / t)) / (a + 1.0);
double t_2 = z * ((((t / y) * (x / z)) + 1.0) / b);
double tmp;
if (b <= -2.5e+84) {
tmp = t_2;
} else if (b <= 3.7e+56) {
tmp = t_1;
} else if (b <= 4.8e+97) {
tmp = t_2;
} else if (b <= 4.35e+148) {
tmp = t_1;
} else if (b <= 3.1e+280) {
tmp = t_2;
} else {
tmp = x / ((a + 1.0) + ((y * b) / t));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / (a + 1.0) t_2 = z * ((((t / y) * (x / z)) + 1.0) / b) tmp = 0 if b <= -2.5e+84: tmp = t_2 elif b <= 3.7e+56: tmp = t_1 elif b <= 4.8e+97: tmp = t_2 elif b <= 4.35e+148: tmp = t_1 elif b <= 3.1e+280: tmp = t_2 else: tmp = x / ((a + 1.0) + ((y * b) / t)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)) t_2 = Float64(z * Float64(Float64(Float64(Float64(t / y) * Float64(x / z)) + 1.0) / b)) tmp = 0.0 if (b <= -2.5e+84) tmp = t_2; elseif (b <= 3.7e+56) tmp = t_1; elseif (b <= 4.8e+97) tmp = t_2; elseif (b <= 4.35e+148) tmp = t_1; elseif (b <= 3.1e+280) tmp = t_2; else tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + ((y * z) / t)) / (a + 1.0); t_2 = z * ((((t / y) * (x / z)) + 1.0) / b); tmp = 0.0; if (b <= -2.5e+84) tmp = t_2; elseif (b <= 3.7e+56) tmp = t_1; elseif (b <= 4.8e+97) tmp = t_2; elseif (b <= 4.35e+148) tmp = t_1; elseif (b <= 3.1e+280) tmp = t_2; else tmp = x / ((a + 1.0) + ((y * b) / t)); 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[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(N[(N[(N[(t / y), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.5e+84], t$95$2, If[LessEqual[b, 3.7e+56], t$95$1, If[LessEqual[b, 4.8e+97], t$95$2, If[LessEqual[b, 4.35e+148], t$95$1, If[LessEqual[b, 3.1e+280], t$95$2, N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{a + 1}\\
t_2 := z \cdot \frac{\frac{t}{y} \cdot \frac{x}{z} + 1}{b}\\
\mathbf{if}\;b \leq -2.5 \cdot 10^{+84}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq 3.7 \cdot 10^{+56}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 4.8 \cdot 10^{+97}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq 4.35 \cdot 10^{+148}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 3.1 \cdot 10^{+280}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\end{array}
\end{array}
if b < -2.5e84 or 3.69999999999999997e56 < b < 4.8e97 or 4.34999999999999996e148 < b < 3.0999999999999999e280Initial program 64.5%
associate-/l*62.0%
associate-/l*58.0%
Simplified58.0%
Taylor expanded in z around inf 66.3%
associate-+r+66.3%
*-commutative66.3%
associate-+r+66.3%
*-commutative66.3%
Simplified66.3%
Taylor expanded in b around inf 64.2%
associate-/l*64.1%
times-frac66.0%
Simplified66.0%
if -2.5e84 < b < 3.69999999999999997e56 or 4.8e97 < b < 4.34999999999999996e148Initial program 87.3%
associate-/l*87.3%
associate-/l*86.7%
Simplified86.7%
Taylor expanded in b around 0 79.3%
if 3.0999999999999999e280 < b Initial program 86.1%
associate-/l*86.1%
associate-/l*72.7%
Simplified72.7%
Taylor expanded in x around inf 86.1%
associate-+r+86.1%
*-commutative86.1%
Simplified86.1%
Final simplification74.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -5e-177)
(/ (+ x (/ y (/ t z))) (+ (+ a 1.0) (* y (/ b t))))
(if (<= t -1.65e-208)
(* z (/ (+ (* (/ t y) (/ x z)) 1.0) b))
(if (<= t -5.2e-227)
(/ x (+ (+ a 1.0) (/ (* y b) t)))
(if (<= t 8.5e-127)
(/ (* y z) (+ (* y b) (* t (+ a 1.0))))
(/ (+ x (* y (/ z t))) (+ (+ a 1.0) (/ y (/ t b)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -5e-177) {
tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t)));
} else if (t <= -1.65e-208) {
tmp = z * ((((t / y) * (x / z)) + 1.0) / b);
} else if (t <= -5.2e-227) {
tmp = x / ((a + 1.0) + ((y * b) / t));
} else if (t <= 8.5e-127) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (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 (t <= (-5d-177)) then
tmp = (x + (y / (t / z))) / ((a + 1.0d0) + (y * (b / t)))
else if (t <= (-1.65d-208)) then
tmp = z * ((((t / y) * (x / z)) + 1.0d0) / b)
else if (t <= (-5.2d-227)) then
tmp = x / ((a + 1.0d0) + ((y * b) / t))
else if (t <= 8.5d-127) then
tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
else
tmp = (x + (y * (z / t))) / ((a + 1.0d0) + (y / (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 (t <= -5e-177) {
tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t)));
} else if (t <= -1.65e-208) {
tmp = z * ((((t / y) * (x / z)) + 1.0) / b);
} else if (t <= -5.2e-227) {
tmp = x / ((a + 1.0) + ((y * b) / t));
} else if (t <= 8.5e-127) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -5e-177: tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t))) elif t <= -1.65e-208: tmp = z * ((((t / y) * (x / z)) + 1.0) / b) elif t <= -5.2e-227: tmp = x / ((a + 1.0) + ((y * b) / t)) elif t <= 8.5e-127: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) else: tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -5e-177) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); elseif (t <= -1.65e-208) tmp = Float64(z * Float64(Float64(Float64(Float64(t / y) * Float64(x / z)) + 1.0) / b)); elseif (t <= -5.2e-227) tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))); elseif (t <= 8.5e-127) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); else tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -5e-177) tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t))); elseif (t <= -1.65e-208) tmp = z * ((((t / y) * (x / z)) + 1.0) / b); elseif (t <= -5.2e-227) tmp = x / ((a + 1.0) + ((y * b) / t)); elseif (t <= 8.5e-127) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); else tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -5e-177], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.65e-208], N[(z * N[(N[(N[(N[(t / y), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.2e-227], N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.5e-127], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-177}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{elif}\;t \leq -1.65 \cdot 10^{-208}:\\
\;\;\;\;z \cdot \frac{\frac{t}{y} \cdot \frac{x}{z} + 1}{b}\\
\mathbf{elif}\;t \leq -5.2 \cdot 10^{-227}:\\
\;\;\;\;\frac{x}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{-127}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\end{array}
\end{array}
if t < -5e-177Initial program 82.3%
associate-/l*83.7%
associate-/l*85.6%
Simplified85.6%
clear-num85.6%
un-div-inv86.6%
Applied egg-rr86.6%
if -5e-177 < t < -1.65000000000000003e-208Initial program 51.5%
associate-/l*51.5%
associate-/l*39.3%
Simplified39.3%
Taylor expanded in z around inf 52.7%
associate-+r+52.7%
*-commutative52.7%
associate-+r+52.7%
*-commutative52.7%
Simplified52.7%
Taylor expanded in b around inf 75.3%
associate-/l*75.1%
times-frac99.8%
Simplified99.8%
if -1.65000000000000003e-208 < t < -5.20000000000000023e-227Initial program 87.7%
associate-/l*75.8%
associate-/l*52.3%
Simplified52.3%
Taylor expanded in x around inf 75.8%
associate-+r+75.8%
*-commutative75.8%
Simplified75.8%
if -5.20000000000000023e-227 < t < 8.5e-127Initial program 66.8%
associate-/l*57.4%
associate-/l*46.0%
Simplified46.0%
Taylor expanded in x around 0 53.9%
Taylor expanded in t around 0 73.0%
if 8.5e-127 < t Initial program 84.2%
associate-/l*86.6%
associate-/l*87.8%
Simplified87.8%
clear-num87.8%
un-div-inv88.2%
Applied egg-rr88.2%
Final simplification84.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* y (/ z t)))))
(if (<= t -3.05e-176)
(/ t_1 (+ (+ a 1.0) (* y (/ b t))))
(if (<= t -1.08e-207)
(* z (/ (+ (* (/ t y) (/ x z)) 1.0) b))
(if (<= t -4.7e-228)
(/ x (+ (+ a 1.0) (/ (* y b) t)))
(if (<= t 3.9e-126)
(/ (* y z) (+ (* y b) (* t (+ a 1.0))))
(/ t_1 (+ (+ a 1.0) (/ y (/ t b))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * (z / t));
double tmp;
if (t <= -3.05e-176) {
tmp = t_1 / ((a + 1.0) + (y * (b / t)));
} else if (t <= -1.08e-207) {
tmp = z * ((((t / y) * (x / z)) + 1.0) / b);
} else if (t <= -4.7e-228) {
tmp = x / ((a + 1.0) + ((y * b) / t));
} else if (t <= 3.9e-126) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = t_1 / ((a + 1.0) + (y / (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) :: t_1
real(8) :: tmp
t_1 = x + (y * (z / t))
if (t <= (-3.05d-176)) then
tmp = t_1 / ((a + 1.0d0) + (y * (b / t)))
else if (t <= (-1.08d-207)) then
tmp = z * ((((t / y) * (x / z)) + 1.0d0) / b)
else if (t <= (-4.7d-228)) then
tmp = x / ((a + 1.0d0) + ((y * b) / t))
else if (t <= 3.9d-126) then
tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
else
tmp = t_1 / ((a + 1.0d0) + (y / (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 t_1 = x + (y * (z / t));
double tmp;
if (t <= -3.05e-176) {
tmp = t_1 / ((a + 1.0) + (y * (b / t)));
} else if (t <= -1.08e-207) {
tmp = z * ((((t / y) * (x / z)) + 1.0) / b);
} else if (t <= -4.7e-228) {
tmp = x / ((a + 1.0) + ((y * b) / t));
} else if (t <= 3.9e-126) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = t_1 / ((a + 1.0) + (y / (t / b)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y * (z / t)) tmp = 0 if t <= -3.05e-176: tmp = t_1 / ((a + 1.0) + (y * (b / t))) elif t <= -1.08e-207: tmp = z * ((((t / y) * (x / z)) + 1.0) / b) elif t <= -4.7e-228: tmp = x / ((a + 1.0) + ((y * b) / t)) elif t <= 3.9e-126: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) else: tmp = t_1 / ((a + 1.0) + (y / (t / b))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y * Float64(z / t))) tmp = 0.0 if (t <= -3.05e-176) tmp = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); elseif (t <= -1.08e-207) tmp = Float64(z * Float64(Float64(Float64(Float64(t / y) * Float64(x / z)) + 1.0) / b)); elseif (t <= -4.7e-228) tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))); elseif (t <= 3.9e-126) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); else tmp = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y * (z / t)); tmp = 0.0; if (t <= -3.05e-176) tmp = t_1 / ((a + 1.0) + (y * (b / t))); elseif (t <= -1.08e-207) tmp = z * ((((t / y) * (x / z)) + 1.0) / b); elseif (t <= -4.7e-228) tmp = x / ((a + 1.0) + ((y * b) / t)); elseif (t <= 3.9e-126) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); else tmp = t_1 / ((a + 1.0) + (y / (t / b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.05e-176], N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.08e-207], N[(z * N[(N[(N[(N[(t / y), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.7e-228], N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.9e-126], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{t}\\
\mathbf{if}\;t \leq -3.05 \cdot 10^{-176}:\\
\;\;\;\;\frac{t\_1}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{elif}\;t \leq -1.08 \cdot 10^{-207}:\\
\;\;\;\;z \cdot \frac{\frac{t}{y} \cdot \frac{x}{z} + 1}{b}\\
\mathbf{elif}\;t \leq -4.7 \cdot 10^{-228}:\\
\;\;\;\;\frac{x}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\mathbf{elif}\;t \leq 3.9 \cdot 10^{-126}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\end{array}
\end{array}
if t < -3.0500000000000001e-176Initial program 82.3%
associate-/l*83.7%
associate-/l*85.6%
Simplified85.6%
if -3.0500000000000001e-176 < t < -1.08e-207Initial program 51.5%
associate-/l*51.5%
associate-/l*39.3%
Simplified39.3%
Taylor expanded in z around inf 52.7%
associate-+r+52.7%
*-commutative52.7%
associate-+r+52.7%
*-commutative52.7%
Simplified52.7%
Taylor expanded in b around inf 75.3%
associate-/l*75.1%
times-frac99.8%
Simplified99.8%
if -1.08e-207 < t < -4.7000000000000002e-228Initial program 87.7%
associate-/l*75.8%
associate-/l*52.3%
Simplified52.3%
Taylor expanded in x around inf 75.8%
associate-+r+75.8%
*-commutative75.8%
Simplified75.8%
if -4.7000000000000002e-228 < t < 3.8999999999999998e-126Initial program 66.8%
associate-/l*57.4%
associate-/l*46.0%
Simplified46.0%
Taylor expanded in x around 0 53.9%
Taylor expanded in t around 0 73.0%
if 3.8999999999999998e-126 < t Initial program 84.2%
associate-/l*86.6%
associate-/l*87.8%
Simplified87.8%
clear-num87.8%
un-div-inv88.2%
Applied egg-rr88.2%
Final simplification84.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t))))))
(if (<= t -3.4e-179)
t_1
(if (<= t -8.6e-207)
(* z (/ (+ (* (/ t y) (/ x z)) 1.0) b))
(if (<= t -5.2e-227)
(/ x (+ (+ a 1.0) (/ (* y b) t)))
(if (<= t 1.7e-126) (/ (* y z) (+ (* y b) (* t (+ a 1.0)))) t_1))))))
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 <= -3.4e-179) {
tmp = t_1;
} else if (t <= -8.6e-207) {
tmp = z * ((((t / y) * (x / z)) + 1.0) / b);
} else if (t <= -5.2e-227) {
tmp = x / ((a + 1.0) + ((y * b) / t));
} else if (t <= 1.7e-126) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} 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 + (y * (z / t))) / ((a + 1.0d0) + (y * (b / t)))
if (t <= (-3.4d-179)) then
tmp = t_1
else if (t <= (-8.6d-207)) then
tmp = z * ((((t / y) * (x / z)) + 1.0d0) / b)
else if (t <= (-5.2d-227)) then
tmp = x / ((a + 1.0d0) + ((y * b) / t))
else if (t <= 1.7d-126) then
tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
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 + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
double tmp;
if (t <= -3.4e-179) {
tmp = t_1;
} else if (t <= -8.6e-207) {
tmp = z * ((((t / y) * (x / z)) + 1.0) / b);
} else if (t <= -5.2e-227) {
tmp = x / ((a + 1.0) + ((y * b) / t));
} else if (t <= 1.7e-126) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = t_1;
}
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 <= -3.4e-179: tmp = t_1 elif t <= -8.6e-207: tmp = z * ((((t / y) * (x / z)) + 1.0) / b) elif t <= -5.2e-227: tmp = x / ((a + 1.0) + ((y * b) / t)) elif t <= 1.7e-126: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))) tmp = 0.0 if (t <= -3.4e-179) tmp = t_1; elseif (t <= -8.6e-207) tmp = Float64(z * Float64(Float64(Float64(Float64(t / y) * Float64(x / z)) + 1.0) / b)); elseif (t <= -5.2e-227) tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))); elseif (t <= 1.7e-126) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); else tmp = t_1; 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 <= -3.4e-179) tmp = t_1; elseif (t <= -8.6e-207) tmp = z * ((((t / y) * (x / z)) + 1.0) / b); elseif (t <= -5.2e-227) tmp = x / ((a + 1.0) + ((y * b) / t)); elseif (t <= 1.7e-126) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, If[LessEqual[t, -3.4e-179], t$95$1, If[LessEqual[t, -8.6e-207], N[(z * N[(N[(N[(N[(t / y), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.2e-227], N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.7e-126], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{if}\;t \leq -3.4 \cdot 10^{-179}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -8.6 \cdot 10^{-207}:\\
\;\;\;\;z \cdot \frac{\frac{t}{y} \cdot \frac{x}{z} + 1}{b}\\
\mathbf{elif}\;t \leq -5.2 \cdot 10^{-227}:\\
\;\;\;\;\frac{x}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{-126}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.3999999999999997e-179 or 1.7e-126 < t Initial program 83.1%
associate-/l*84.9%
associate-/l*86.5%
Simplified86.5%
if -3.3999999999999997e-179 < t < -8.6000000000000005e-207Initial program 51.5%
associate-/l*51.5%
associate-/l*39.3%
Simplified39.3%
Taylor expanded in z around inf 52.7%
associate-+r+52.7%
*-commutative52.7%
associate-+r+52.7%
*-commutative52.7%
Simplified52.7%
Taylor expanded in b around inf 75.3%
associate-/l*75.1%
times-frac99.8%
Simplified99.8%
if -8.6000000000000005e-207 < t < -5.20000000000000023e-227Initial program 87.7%
associate-/l*75.8%
associate-/l*52.3%
Simplified52.3%
Taylor expanded in x around inf 75.8%
associate-+r+75.8%
*-commutative75.8%
Simplified75.8%
if -5.20000000000000023e-227 < t < 1.7e-126Initial program 66.8%
associate-/l*57.4%
associate-/l*46.0%
Simplified46.0%
Taylor expanded in x around 0 53.9%
Taylor expanded in t around 0 73.0%
Final simplification83.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (* b (+ (/ y t) (/ (+ a 1.0) b))))))
(if (<= b -1e+78)
t_1
(if (<= b 2.4e+56)
(/ (+ x (/ (* y z) t)) (+ a 1.0))
(if (<= b 4e+97) (* z (/ (+ (* (/ t y) (/ x z)) 1.0) b)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (b * ((y / t) + ((a + 1.0) / b)));
double tmp;
if (b <= -1e+78) {
tmp = t_1;
} else if (b <= 2.4e+56) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else if (b <= 4e+97) {
tmp = z * ((((t / y) * (x / z)) + 1.0) / 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 / (b * ((y / t) + ((a + 1.0d0) / b)))
if (b <= (-1d+78)) then
tmp = t_1
else if (b <= 2.4d+56) then
tmp = (x + ((y * z) / t)) / (a + 1.0d0)
else if (b <= 4d+97) then
tmp = z * ((((t / y) * (x / z)) + 1.0d0) / 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 / (b * ((y / t) + ((a + 1.0) / b)));
double tmp;
if (b <= -1e+78) {
tmp = t_1;
} else if (b <= 2.4e+56) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else if (b <= 4e+97) {
tmp = z * ((((t / y) * (x / z)) + 1.0) / b);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (b * ((y / t) + ((a + 1.0) / b))) tmp = 0 if b <= -1e+78: tmp = t_1 elif b <= 2.4e+56: tmp = (x + ((y * z) / t)) / (a + 1.0) elif b <= 4e+97: tmp = z * ((((t / y) * (x / z)) + 1.0) / b) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(b * Float64(Float64(y / t) + Float64(Float64(a + 1.0) / b)))) tmp = 0.0 if (b <= -1e+78) tmp = t_1; elseif (b <= 2.4e+56) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)); elseif (b <= 4e+97) tmp = Float64(z * Float64(Float64(Float64(Float64(t / y) * Float64(x / z)) + 1.0) / b)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (b * ((y / t) + ((a + 1.0) / b))); tmp = 0.0; if (b <= -1e+78) tmp = t_1; elseif (b <= 2.4e+56) tmp = (x + ((y * z) / t)) / (a + 1.0); elseif (b <= 4e+97) tmp = z * ((((t / y) * (x / z)) + 1.0) / b); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(b * N[(N[(y / t), $MachinePrecision] + N[(N[(a + 1.0), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1e+78], t$95$1, If[LessEqual[b, 2.4e+56], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4e+97], N[(z * N[(N[(N[(N[(t / y), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{b \cdot \left(\frac{y}{t} + \frac{a + 1}{b}\right)}\\
\mathbf{if}\;b \leq -1 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 2.4 \cdot 10^{+56}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\mathbf{elif}\;b \leq 4 \cdot 10^{+97}:\\
\;\;\;\;z \cdot \frac{\frac{t}{y} \cdot \frac{x}{z} + 1}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.00000000000000001e78 or 4.0000000000000003e97 < b Initial program 69.0%
associate-/l*65.8%
associate-/l*60.2%
Simplified60.2%
Taylor expanded in x around inf 56.4%
Taylor expanded in b around -inf 64.6%
associate-*r*64.6%
neg-mul-164.6%
mul-1-neg64.6%
unsub-neg64.6%
associate-*r/64.6%
mul-1-neg64.6%
Simplified64.6%
if -1.00000000000000001e78 < b < 2.40000000000000013e56Initial program 88.9%
associate-/l*88.9%
associate-/l*88.9%
Simplified88.9%
Taylor expanded in b around 0 80.8%
if 2.40000000000000013e56 < b < 4.0000000000000003e97Initial program 40.9%
associate-/l*50.2%
associate-/l*51.2%
Simplified51.2%
Taylor expanded in z around inf 51.2%
associate-+r+51.2%
*-commutative51.2%
associate-+r+51.2%
*-commutative51.2%
Simplified51.2%
Taylor expanded in b around inf 76.5%
associate-/l*76.2%
times-frac76.7%
Simplified76.7%
Final simplification74.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ (+ a 1.0) (/ (* y b) t)))))
(if (<= b -2.5e+78)
t_1
(if (<= b 3.7e+56)
(/ (+ x (/ (* y z) t)) (+ a 1.0))
(if (<= b 9.5e+97) (/ z b) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / ((a + 1.0) + ((y * b) / t));
double tmp;
if (b <= -2.5e+78) {
tmp = t_1;
} else if (b <= 3.7e+56) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else if (b <= 9.5e+97) {
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 + 1.0d0) + ((y * b) / t))
if (b <= (-2.5d+78)) then
tmp = t_1
else if (b <= 3.7d+56) then
tmp = (x + ((y * z) / t)) / (a + 1.0d0)
else if (b <= 9.5d+97) 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 + 1.0) + ((y * b) / t));
double tmp;
if (b <= -2.5e+78) {
tmp = t_1;
} else if (b <= 3.7e+56) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else if (b <= 9.5e+97) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / ((a + 1.0) + ((y * b) / t)) tmp = 0 if b <= -2.5e+78: tmp = t_1 elif b <= 3.7e+56: tmp = (x + ((y * z) / t)) / (a + 1.0) elif b <= 9.5e+97: tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) tmp = 0.0 if (b <= -2.5e+78) tmp = t_1; elseif (b <= 3.7e+56) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)); elseif (b <= 9.5e+97) 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 + 1.0) + ((y * b) / t)); tmp = 0.0; if (b <= -2.5e+78) tmp = t_1; elseif (b <= 3.7e+56) tmp = (x + ((y * z) / t)) / (a + 1.0); elseif (b <= 9.5e+97) 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 + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.5e+78], t$95$1, If[LessEqual[b, 3.7e+56], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 9.5e+97], N[(z / b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\mathbf{if}\;b \leq -2.5 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 3.7 \cdot 10^{+56}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\mathbf{elif}\;b \leq 9.5 \cdot 10^{+97}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -2.49999999999999992e78 or 9.49999999999999975e97 < b Initial program 69.0%
associate-/l*65.8%
associate-/l*60.2%
Simplified60.2%
Taylor expanded in x around inf 61.2%
associate-+r+61.2%
*-commutative61.2%
Simplified61.2%
if -2.49999999999999992e78 < b < 3.69999999999999997e56Initial program 88.9%
associate-/l*88.9%
associate-/l*88.9%
Simplified88.9%
Taylor expanded in b around 0 80.8%
if 3.69999999999999997e56 < b < 9.49999999999999975e97Initial program 40.9%
associate-/l*50.2%
associate-/l*51.2%
Simplified51.2%
Taylor expanded in y around inf 73.2%
Final simplification72.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ (+ a 1.0) (/ (* y b) t)))))
(if (<= b -9e+77)
t_1
(if (<= b 8.4e+55)
(/ (+ x (* y (/ z t))) (+ a 1.0))
(if (<= b 4.3e+97) (/ z b) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / ((a + 1.0) + ((y * b) / t));
double tmp;
if (b <= -9e+77) {
tmp = t_1;
} else if (b <= 8.4e+55) {
tmp = (x + (y * (z / t))) / (a + 1.0);
} else if (b <= 4.3e+97) {
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 + 1.0d0) + ((y * b) / t))
if (b <= (-9d+77)) then
tmp = t_1
else if (b <= 8.4d+55) then
tmp = (x + (y * (z / t))) / (a + 1.0d0)
else if (b <= 4.3d+97) 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 + 1.0) + ((y * b) / t));
double tmp;
if (b <= -9e+77) {
tmp = t_1;
} else if (b <= 8.4e+55) {
tmp = (x + (y * (z / t))) / (a + 1.0);
} else if (b <= 4.3e+97) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / ((a + 1.0) + ((y * b) / t)) tmp = 0 if b <= -9e+77: tmp = t_1 elif b <= 8.4e+55: tmp = (x + (y * (z / t))) / (a + 1.0) elif b <= 4.3e+97: tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) tmp = 0.0 if (b <= -9e+77) tmp = t_1; elseif (b <= 8.4e+55) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0)); elseif (b <= 4.3e+97) 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 + 1.0) + ((y * b) / t)); tmp = 0.0; if (b <= -9e+77) tmp = t_1; elseif (b <= 8.4e+55) tmp = (x + (y * (z / t))) / (a + 1.0); elseif (b <= 4.3e+97) 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 + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -9e+77], t$95$1, If[LessEqual[b, 8.4e+55], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.3e+97], N[(z / b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\mathbf{if}\;b \leq -9 \cdot 10^{+77}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 8.4 \cdot 10^{+55}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\
\mathbf{elif}\;b \leq 4.3 \cdot 10^{+97}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -9.00000000000000049e77 or 4.2999999999999998e97 < b Initial program 69.0%
associate-/l*65.8%
associate-/l*60.2%
Simplified60.2%
Taylor expanded in x around inf 61.2%
associate-+r+61.2%
*-commutative61.2%
Simplified61.2%
if -9.00000000000000049e77 < b < 8.4000000000000002e55Initial program 88.9%
associate-/l*88.9%
associate-/l*88.9%
Simplified88.9%
Taylor expanded in b around 0 80.8%
associate-*r/80.2%
*-commutative80.2%
Applied egg-rr80.2%
if 8.4000000000000002e55 < b < 4.2999999999999998e97Initial program 40.9%
associate-/l*50.2%
associate-/l*51.2%
Simplified51.2%
Taylor expanded in y around inf 73.2%
Final simplification72.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) a)))
(if (<= a -1.02e+62)
t_1
(if (<= a -1.1e-27)
(/ z b)
(if (<= a 530000.0) (/ x (+ (/ (* y b) t) 1.0)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / a;
double tmp;
if (a <= -1.02e+62) {
tmp = t_1;
} else if (a <= -1.1e-27) {
tmp = z / b;
} else if (a <= 530000.0) {
tmp = x / (((y * b) / t) + 1.0);
} 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 + ((y * z) / t)) / a
if (a <= (-1.02d+62)) then
tmp = t_1
else if (a <= (-1.1d-27)) then
tmp = z / b
else if (a <= 530000.0d0) then
tmp = x / (((y * b) / t) + 1.0d0)
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 + ((y * z) / t)) / a;
double tmp;
if (a <= -1.02e+62) {
tmp = t_1;
} else if (a <= -1.1e-27) {
tmp = z / b;
} else if (a <= 530000.0) {
tmp = x / (((y * b) / t) + 1.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / a tmp = 0 if a <= -1.02e+62: tmp = t_1 elif a <= -1.1e-27: tmp = z / b elif a <= 530000.0: tmp = x / (((y * b) / t) + 1.0) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / a) tmp = 0.0 if (a <= -1.02e+62) tmp = t_1; elseif (a <= -1.1e-27) tmp = Float64(z / b); elseif (a <= 530000.0) tmp = Float64(x / Float64(Float64(Float64(y * b) / t) + 1.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + ((y * z) / t)) / a; tmp = 0.0; if (a <= -1.02e+62) tmp = t_1; elseif (a <= -1.1e-27) tmp = z / b; elseif (a <= 530000.0) tmp = x / (((y * b) / t) + 1.0); else tmp = t_1; 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] / a), $MachinePrecision]}, If[LessEqual[a, -1.02e+62], t$95$1, If[LessEqual[a, -1.1e-27], N[(z / b), $MachinePrecision], If[LessEqual[a, 530000.0], N[(x / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{a}\\
\mathbf{if}\;a \leq -1.02 \cdot 10^{+62}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -1.1 \cdot 10^{-27}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 530000:\\
\;\;\;\;\frac{x}{\frac{y \cdot b}{t} + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.02000000000000002e62 or 5.3e5 < a Initial program 76.4%
associate-/l*74.0%
associate-/l*75.6%
Simplified75.6%
Taylor expanded in a around inf 66.7%
if -1.02000000000000002e62 < a < -1.09999999999999993e-27Initial program 78.6%
associate-/l*74.5%
associate-/l*75.1%
Simplified75.1%
Taylor expanded in y around inf 50.3%
if -1.09999999999999993e-27 < a < 5.3e5Initial program 81.7%
associate-/l*82.9%
associate-/l*76.4%
Simplified76.4%
Taylor expanded in x around inf 58.1%
Taylor expanded in a around 0 61.9%
Final simplification63.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -9200000000.0) (not (<= y 1.2e+130))) (/ z b) (/ x (+ (+ a 1.0) (/ (* y b) t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -9200000000.0) || !(y <= 1.2e+130)) {
tmp = z / b;
} else {
tmp = x / ((a + 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 ((y <= (-9200000000.0d0)) .or. (.not. (y <= 1.2d+130))) then
tmp = z / b
else
tmp = x / ((a + 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 ((y <= -9200000000.0) || !(y <= 1.2e+130)) {
tmp = z / b;
} else {
tmp = x / ((a + 1.0) + ((y * b) / t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -9200000000.0) or not (y <= 1.2e+130): tmp = z / b else: tmp = x / ((a + 1.0) + ((y * b) / t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -9200000000.0) || !(y <= 1.2e+130)) tmp = Float64(z / b); else tmp = Float64(x / Float64(Float64(a + 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 ((y <= -9200000000.0) || ~((y <= 1.2e+130))) tmp = z / b; else tmp = x / ((a + 1.0) + ((y * b) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -9200000000.0], N[Not[LessEqual[y, 1.2e+130]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9200000000 \lor \neg \left(y \leq 1.2 \cdot 10^{+130}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\end{array}
\end{array}
if y < -9.2e9 or 1.20000000000000012e130 < y Initial program 49.9%
associate-/l*54.2%
associate-/l*60.7%
Simplified60.7%
Taylor expanded in y around inf 63.4%
if -9.2e9 < y < 1.20000000000000012e130Initial program 94.8%
associate-/l*91.1%
associate-/l*84.1%
Simplified84.1%
Taylor expanded in x around inf 69.3%
associate-+r+69.3%
*-commutative69.3%
Simplified69.3%
Final simplification67.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -4.4e-73) (not (<= t 5.8e-89))) (/ x (+ a 1.0)) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -4.4e-73) || !(t <= 5.8e-89)) {
tmp = x / (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 ((t <= (-4.4d-73)) .or. (.not. (t <= 5.8d-89))) then
tmp = x / (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 ((t <= -4.4e-73) || !(t <= 5.8e-89)) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -4.4e-73) or not (t <= 5.8e-89): tmp = x / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -4.4e-73) || !(t <= 5.8e-89)) tmp = Float64(x / 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 ((t <= -4.4e-73) || ~((t <= 5.8e-89))) tmp = x / (a + 1.0); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -4.4e-73], N[Not[LessEqual[t, 5.8e-89]], $MachinePrecision]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.4 \cdot 10^{-73} \lor \neg \left(t \leq 5.8 \cdot 10^{-89}\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -4.4e-73 or 5.79999999999999984e-89 < t Initial program 86.0%
associate-/l*89.3%
associate-/l*93.3%
Simplified93.3%
Taylor expanded in y around 0 61.2%
if -4.4e-73 < t < 5.79999999999999984e-89Initial program 69.5%
associate-/l*63.0%
associate-/l*52.4%
Simplified52.4%
Taylor expanded in y around inf 55.4%
Final simplification58.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -300000.0) (not (<= y 9e-93))) (/ z b) (/ x a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -300000.0) || !(y <= 9e-93)) {
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 <= (-300000.0d0)) .or. (.not. (y <= 9d-93))) 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 <= -300000.0) || !(y <= 9e-93)) {
tmp = z / b;
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -300000.0) or not (y <= 9e-93): tmp = z / b else: tmp = x / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -300000.0) || !(y <= 9e-93)) 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 <= -300000.0) || ~((y <= 9e-93))) tmp = z / b; else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -300000.0], N[Not[LessEqual[y, 9e-93]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -300000 \lor \neg \left(y \leq 9 \cdot 10^{-93}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if y < -3e5 or 9.0000000000000004e-93 < y Initial program 63.5%
associate-/l*67.0%
associate-/l*70.6%
Simplified70.6%
Taylor expanded in y around inf 51.4%
if -3e5 < y < 9.0000000000000004e-93Initial program 96.9%
associate-/l*90.8%
associate-/l*82.0%
Simplified82.0%
Taylor expanded in x around inf 64.2%
Taylor expanded in a around inf 31.0%
Final simplification42.0%
(FPCore (x y z t a b) :precision binary64 (/ x a))
double code(double x, double y, double z, double t, double a, double b) {
return x / a;
}
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 / a
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / a;
}
def code(x, y, z, t, a, b): return x / a
function code(x, y, z, t, a, b) return Float64(x / a) end
function tmp = code(x, y, z, t, a, b) tmp = x / a; end
code[x_, y_, z_, t_, a_, b_] := N[(x / a), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{a}
\end{array}
Initial program 79.0%
associate-/l*78.1%
associate-/l*75.9%
Simplified75.9%
Taylor expanded in x around inf 55.2%
Taylor expanded in a around inf 24.3%
(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 2024101
(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))))