
(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 (+ x (/ (* y z) t)))
(t_2 (/ t_1 (+ (/ (* y b) t) (+ a 1.0))))
(t_3 (+ (fma y (/ b t) a) 1.0)))
(if (<= t_2 (- INFINITY))
(* z (+ (/ x (* z t_3)) (/ (/ y t) t_3)))
(if (<= t_2 5e+305) (/ t_1 (+ (* b (/ y t)) (+ a 1.0))) (/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = t_1 / (((y * b) / t) + (a + 1.0));
double t_3 = fma(y, (b / t), a) + 1.0;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = z * ((x / (z * t_3)) + ((y / t) / t_3));
} else if (t_2 <= 5e+305) {
tmp = t_1 / ((b * (y / t)) + (a + 1.0));
} else {
tmp = z / b;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(y * z) / t)) t_2 = Float64(t_1 / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))) 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_3)) + Float64(Float64(y / t) / t_3))); elseif (t_2 <= 5e+305) tmp = Float64(t_1 / Float64(Float64(b * Float64(y / t)) + Float64(a + 1.0))); else tmp = Float64(z / b); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $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$3), $MachinePrecision]), $MachinePrecision] + N[(N[(y / t), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+305], N[(t$95$1 / N[(N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot z}{t}\\
t_2 := \frac{t\_1}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
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\_3} + \frac{\frac{y}{t}}{t\_3}\right)\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+305}:\\
\;\;\;\;\frac{t\_1}{b \cdot \frac{y}{t} + \left(a + 1\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 27.3%
associate-/l*68.3%
associate-/l*68.1%
Simplified68.1%
Taylor expanded in z around inf 81.1%
associate-*r/81.1%
+-commutative81.1%
associate-*r/81.1%
associate-*l/81.1%
*-commutative81.1%
fma-define81.1%
associate-/r*92.5%
associate-*r/77.8%
+-commutative77.8%
associate-*r/92.5%
associate-*l/87.8%
*-commutative87.8%
fma-define87.8%
Simplified87.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.00000000000000009e305Initial program 91.6%
*-commutative91.6%
associate-/l*91.6%
Applied egg-rr91.6%
if 5.00000000000000009e305 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 11.9%
associate-/l*19.8%
associate-/l*32.4%
Simplified32.4%
Taylor expanded in y around inf 87.2%
Final simplification90.6%
(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 (- INFINITY))
(* y (/ z (* t t_1)))
(if (<= t_3 5e+305) (/ t_2 (+ (* b (/ y t)) (+ a 1.0))) (/ 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 <= -((double) INFINITY)) {
tmp = y * (z / (t * t_1));
} else if (t_3 <= 5e+305) {
tmp = t_2 / ((b * (y / t)) + (a + 1.0));
} 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 tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = y * (z / (t * t_1));
} else if (t_3 <= 5e+305) {
tmp = t_2 / ((b * (y / t)) + (a + 1.0));
} 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 <= -math.inf: tmp = y * (z / (t * t_1)) elif t_3 <= 5e+305: tmp = t_2 / ((b * (y / t)) + (a + 1.0)) 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 <= Float64(-Inf)) tmp = Float64(y * Float64(z / Float64(t * t_1))); elseif (t_3 <= 5e+305) tmp = Float64(t_2 / Float64(Float64(b * Float64(y / t)) + Float64(a + 1.0))); 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 <= -Inf) tmp = y * (z / (t * t_1)); elseif (t_3 <= 5e+305) tmp = t_2 / ((b * (y / t)) + (a + 1.0)); 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, (-Infinity)], N[(y * N[(z / N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 5e+305], N[(t$95$2 / N[(N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $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 -\infty:\\
\;\;\;\;y \cdot \frac{z}{t \cdot t\_1}\\
\mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+305}:\\
\;\;\;\;\frac{t\_2}{b \cdot \frac{y}{t} + \left(a + 1\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 27.3%
associate-/l*68.3%
associate-/l*68.1%
Simplified68.1%
Taylor expanded in x around 0 39.8%
associate-/l*72.2%
associate-+r+72.2%
*-commutative72.2%
Simplified72.2%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 5.00000000000000009e305Initial program 91.6%
*-commutative91.6%
associate-/l*91.6%
Applied egg-rr91.6%
if 5.00000000000000009e305 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 11.9%
associate-/l*19.8%
associate-/l*32.4%
Simplified32.4%
Taylor expanded in y around inf 87.2%
Final simplification89.3%
(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 (- INFINITY))
(* z (+ (/ x (* z t_1)) (/ y (* t t_1))))
(if (<= t_3 5e+305) (/ t_2 (+ (* b (/ y t)) (+ a 1.0))) (/ 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 <= -((double) INFINITY)) {
tmp = z * ((x / (z * t_1)) + (y / (t * t_1)));
} else if (t_3 <= 5e+305) {
tmp = t_2 / ((b * (y / t)) + (a + 1.0));
} 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 tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = z * ((x / (z * t_1)) + (y / (t * t_1)));
} else if (t_3 <= 5e+305) {
tmp = t_2 / ((b * (y / t)) + (a + 1.0));
} 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 <= -math.inf: tmp = z * ((x / (z * t_1)) + (y / (t * t_1))) elif t_3 <= 5e+305: tmp = t_2 / ((b * (y / t)) + (a + 1.0)) 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 <= Float64(-Inf)) tmp = Float64(z * Float64(Float64(x / Float64(z * t_1)) + Float64(y / Float64(t * t_1)))); elseif (t_3 <= 5e+305) tmp = Float64(t_2 / Float64(Float64(b * Float64(y / t)) + Float64(a + 1.0))); 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 <= -Inf) tmp = z * ((x / (z * t_1)) + (y / (t * t_1))); elseif (t_3 <= 5e+305) tmp = t_2 / ((b * (y / t)) + (a + 1.0)); 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, (-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$3, 5e+305], N[(t$95$2 / N[(N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $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 -\infty:\\
\;\;\;\;z \cdot \left(\frac{x}{z \cdot t\_1} + \frac{y}{t \cdot t\_1}\right)\\
\mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+305}:\\
\;\;\;\;\frac{t\_2}{b \cdot \frac{y}{t} + \left(a + 1\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 27.3%
associate-/l*68.3%
associate-/l*68.1%
Simplified68.1%
Taylor expanded in z around inf 81.1%
associate-+r+81.1%
*-commutative81.1%
associate-+r+81.1%
*-commutative81.1%
Simplified81.1%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 5.00000000000000009e305Initial program 91.6%
*-commutative91.6%
associate-/l*91.6%
Applied egg-rr91.6%
if 5.00000000000000009e305 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 11.9%
associate-/l*19.8%
associate-/l*32.4%
Simplified32.4%
Taylor expanded in y around inf 87.2%
Final simplification90.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ z b) (* t (/ x (* y b)))))
(t_2 (+ (* y (/ (/ z a) t)) (/ x a)))
(t_3 (+ x (/ (* y z) t))))
(if (<= a -88000000.0)
t_2
(if (<= a -1e-52)
t_1
(if (<= a -2.2e-193)
t_3
(if (<= a -3.6e-294)
t_1
(if (<= a 4e-181) t_3 (if (<= a 7000000.0) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z / b) + (t * (x / (y * b)));
double t_2 = (y * ((z / a) / t)) + (x / a);
double t_3 = x + ((y * z) / t);
double tmp;
if (a <= -88000000.0) {
tmp = t_2;
} else if (a <= -1e-52) {
tmp = t_1;
} else if (a <= -2.2e-193) {
tmp = t_3;
} else if (a <= -3.6e-294) {
tmp = t_1;
} else if (a <= 4e-181) {
tmp = t_3;
} else if (a <= 7000000.0) {
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) :: t_3
real(8) :: tmp
t_1 = (z / b) + (t * (x / (y * b)))
t_2 = (y * ((z / a) / t)) + (x / a)
t_3 = x + ((y * z) / t)
if (a <= (-88000000.0d0)) then
tmp = t_2
else if (a <= (-1d-52)) then
tmp = t_1
else if (a <= (-2.2d-193)) then
tmp = t_3
else if (a <= (-3.6d-294)) then
tmp = t_1
else if (a <= 4d-181) then
tmp = t_3
else if (a <= 7000000.0d0) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z / b) + (t * (x / (y * b)));
double t_2 = (y * ((z / a) / t)) + (x / a);
double t_3 = x + ((y * z) / t);
double tmp;
if (a <= -88000000.0) {
tmp = t_2;
} else if (a <= -1e-52) {
tmp = t_1;
} else if (a <= -2.2e-193) {
tmp = t_3;
} else if (a <= -3.6e-294) {
tmp = t_1;
} else if (a <= 4e-181) {
tmp = t_3;
} else if (a <= 7000000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z / b) + (t * (x / (y * b))) t_2 = (y * ((z / a) / t)) + (x / a) t_3 = x + ((y * z) / t) tmp = 0 if a <= -88000000.0: tmp = t_2 elif a <= -1e-52: tmp = t_1 elif a <= -2.2e-193: tmp = t_3 elif a <= -3.6e-294: tmp = t_1 elif a <= 4e-181: tmp = t_3 elif a <= 7000000.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z / b) + Float64(t * Float64(x / Float64(y * b)))) t_2 = Float64(Float64(y * Float64(Float64(z / a) / t)) + Float64(x / a)) t_3 = Float64(x + Float64(Float64(y * z) / t)) tmp = 0.0 if (a <= -88000000.0) tmp = t_2; elseif (a <= -1e-52) tmp = t_1; elseif (a <= -2.2e-193) tmp = t_3; elseif (a <= -3.6e-294) tmp = t_1; elseif (a <= 4e-181) tmp = t_3; elseif (a <= 7000000.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z / b) + (t * (x / (y * b))); t_2 = (y * ((z / a) / t)) + (x / a); t_3 = x + ((y * z) / t); tmp = 0.0; if (a <= -88000000.0) tmp = t_2; elseif (a <= -1e-52) tmp = t_1; elseif (a <= -2.2e-193) tmp = t_3; elseif (a <= -3.6e-294) tmp = t_1; elseif (a <= 4e-181) tmp = t_3; elseif (a <= 7000000.0) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z / b), $MachinePrecision] + N[(t * N[(x / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * N[(N[(z / a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + N[(x / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -88000000.0], t$95$2, If[LessEqual[a, -1e-52], t$95$1, If[LessEqual[a, -2.2e-193], t$95$3, If[LessEqual[a, -3.6e-294], t$95$1, If[LessEqual[a, 4e-181], t$95$3, If[LessEqual[a, 7000000.0], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{b} + t \cdot \frac{x}{y \cdot b}\\
t_2 := y \cdot \frac{\frac{z}{a}}{t} + \frac{x}{a}\\
t_3 := x + \frac{y \cdot z}{t}\\
\mathbf{if}\;a \leq -88000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -1 \cdot 10^{-52}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -2.2 \cdot 10^{-193}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;a \leq -3.6 \cdot 10^{-294}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 4 \cdot 10^{-181}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;a \leq 7000000:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -8.8e7 or 7e6 < a Initial program 74.9%
associate-/l*76.0%
associate-/l*76.7%
Simplified76.7%
Taylor expanded in a around inf 58.3%
Taylor expanded in x around 0 56.5%
+-commutative56.5%
associate-/l*62.6%
associate-/r*67.3%
Simplified67.3%
if -8.8e7 < a < -1e-52 or -2.19999999999999977e-193 < a < -3.6000000000000001e-294 or 4.00000000000000019e-181 < a < 7e6Initial program 68.7%
associate-/l*68.7%
associate-/l*71.5%
Simplified71.5%
Taylor expanded in b around inf 41.7%
Taylor expanded in t around 0 66.7%
associate-/l*65.9%
*-commutative65.9%
Simplified65.9%
if -1e-52 < a < -2.19999999999999977e-193 or -3.6000000000000001e-294 < a < 4.00000000000000019e-181Initial program 79.1%
associate-/l*75.2%
associate-/l*75.2%
Simplified75.2%
Taylor expanded in b around 0 64.0%
associate-*r/60.1%
*-commutative60.1%
div-inv60.1%
associate-*l*64.1%
Applied egg-rr64.1%
Taylor expanded in a around 0 64.0%
Final simplification66.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 -2.2e-108)
t_1
(if (<= t -6.5e-264)
(+ (/ z b) (/ (/ (* x t) b) y))
(if (<= t 8e-308)
(* z (+ (/ x (* z (+ a 1.0))) (/ y (* t (+ a 1.0)))))
(if (<= t 6.2e-128) (+ (/ z b) (* t (/ x (* y b)))) 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 <= -2.2e-108) {
tmp = t_1;
} else if (t <= -6.5e-264) {
tmp = (z / b) + (((x * t) / b) / y);
} else if (t <= 8e-308) {
tmp = z * ((x / (z * (a + 1.0))) + (y / (t * (a + 1.0))));
} else if (t <= 6.2e-128) {
tmp = (z / b) + (t * (x / (y * 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 + (y * (z / t))) / ((a + 1.0d0) + (y * (b / t)))
if (t <= (-2.2d-108)) then
tmp = t_1
else if (t <= (-6.5d-264)) then
tmp = (z / b) + (((x * t) / b) / y)
else if (t <= 8d-308) then
tmp = z * ((x / (z * (a + 1.0d0))) + (y / (t * (a + 1.0d0))))
else if (t <= 6.2d-128) then
tmp = (z / b) + (t * (x / (y * 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 + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
double tmp;
if (t <= -2.2e-108) {
tmp = t_1;
} else if (t <= -6.5e-264) {
tmp = (z / b) + (((x * t) / b) / y);
} else if (t <= 8e-308) {
tmp = z * ((x / (z * (a + 1.0))) + (y / (t * (a + 1.0))));
} else if (t <= 6.2e-128) {
tmp = (z / b) + (t * (x / (y * b)));
} 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 <= -2.2e-108: tmp = t_1 elif t <= -6.5e-264: tmp = (z / b) + (((x * t) / b) / y) elif t <= 8e-308: tmp = z * ((x / (z * (a + 1.0))) + (y / (t * (a + 1.0)))) elif t <= 6.2e-128: tmp = (z / b) + (t * (x / (y * b))) 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 <= -2.2e-108) tmp = t_1; elseif (t <= -6.5e-264) tmp = Float64(Float64(z / b) + Float64(Float64(Float64(x * t) / b) / y)); elseif (t <= 8e-308) tmp = Float64(z * Float64(Float64(x / Float64(z * Float64(a + 1.0))) + Float64(y / Float64(t * Float64(a + 1.0))))); elseif (t <= 6.2e-128) tmp = Float64(Float64(z / b) + Float64(t * Float64(x / Float64(y * b)))); 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 <= -2.2e-108) tmp = t_1; elseif (t <= -6.5e-264) tmp = (z / b) + (((x * t) / b) / y); elseif (t <= 8e-308) tmp = z * ((x / (z * (a + 1.0))) + (y / (t * (a + 1.0)))); elseif (t <= 6.2e-128) tmp = (z / b) + (t * (x / (y * b))); 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, -2.2e-108], t$95$1, If[LessEqual[t, -6.5e-264], N[(N[(z / b), $MachinePrecision] + N[(N[(N[(x * t), $MachinePrecision] / b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8e-308], N[(z * N[(N[(x / N[(z * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y / N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.2e-128], N[(N[(z / b), $MachinePrecision] + N[(t * N[(x / N[(y * b), $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 -2.2 \cdot 10^{-108}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -6.5 \cdot 10^{-264}:\\
\;\;\;\;\frac{z}{b} + \frac{\frac{x \cdot t}{b}}{y}\\
\mathbf{elif}\;t \leq 8 \cdot 10^{-308}:\\
\;\;\;\;z \cdot \left(\frac{x}{z \cdot \left(a + 1\right)} + \frac{y}{t \cdot \left(a + 1\right)}\right)\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{-128}:\\
\;\;\;\;\frac{z}{b} + t \cdot \frac{x}{y \cdot b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.2000000000000001e-108 or 6.20000000000000005e-128 < t Initial program 79.4%
associate-/l*85.0%
associate-/l*89.3%
Simplified89.3%
if -2.2000000000000001e-108 < t < -6.5000000000000001e-264Initial program 65.4%
associate-/l*46.0%
associate-/l*40.9%
Simplified40.9%
Taylor expanded in y around -inf 50.1%
Taylor expanded in x around inf 75.4%
mul-1-neg75.4%
*-commutative75.4%
distribute-frac-neg75.4%
distribute-lft-neg-in75.4%
Simplified75.4%
if -6.5000000000000001e-264 < t < 8.00000000000000026e-308Initial program 65.0%
associate-/l*39.4%
associate-/l*39.1%
Simplified39.1%
Taylor expanded in b around 0 56.6%
Taylor expanded in z around inf 82.1%
if 8.00000000000000026e-308 < t < 6.20000000000000005e-128Initial program 60.9%
associate-/l*50.2%
associate-/l*41.4%
Simplified41.4%
Taylor expanded in b around inf 50.0%
Taylor expanded in t around 0 79.1%
associate-/l*80.2%
*-commutative80.2%
Simplified80.2%
Final simplification86.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -1.05e+74)
(+ (/ z b) (* t (/ x (* y b))))
(if (or (<= b 1.4e-14) (and (not (<= b 3800.0)) (<= b 3.4e+57)))
(/ (+ x (* z (/ y t))) (+ a 1.0))
(+ (/ z b) (/ (* t (/ x b)) y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.05e+74) {
tmp = (z / b) + (t * (x / (y * b)));
} else if ((b <= 1.4e-14) || (!(b <= 3800.0) && (b <= 3.4e+57))) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else {
tmp = (z / b) + ((t * (x / b)) / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-1.05d+74)) then
tmp = (z / b) + (t * (x / (y * b)))
else if ((b <= 1.4d-14) .or. (.not. (b <= 3800.0d0)) .and. (b <= 3.4d+57)) then
tmp = (x + (z * (y / t))) / (a + 1.0d0)
else
tmp = (z / b) + ((t * (x / b)) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.05e+74) {
tmp = (z / b) + (t * (x / (y * b)));
} else if ((b <= 1.4e-14) || (!(b <= 3800.0) && (b <= 3.4e+57))) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else {
tmp = (z / b) + ((t * (x / b)) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.05e+74: tmp = (z / b) + (t * (x / (y * b))) elif (b <= 1.4e-14) or (not (b <= 3800.0) and (b <= 3.4e+57)): tmp = (x + (z * (y / t))) / (a + 1.0) else: tmp = (z / b) + ((t * (x / b)) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.05e+74) tmp = Float64(Float64(z / b) + Float64(t * Float64(x / Float64(y * b)))); elseif ((b <= 1.4e-14) || (!(b <= 3800.0) && (b <= 3.4e+57))) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0)); else tmp = Float64(Float64(z / b) + Float64(Float64(t * Float64(x / b)) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.05e+74) tmp = (z / b) + (t * (x / (y * b))); elseif ((b <= 1.4e-14) || (~((b <= 3800.0)) && (b <= 3.4e+57))) tmp = (x + (z * (y / t))) / (a + 1.0); else tmp = (z / b) + ((t * (x / b)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.05e+74], N[(N[(z / b), $MachinePrecision] + N[(t * N[(x / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[b, 1.4e-14], And[N[Not[LessEqual[b, 3800.0]], $MachinePrecision], LessEqual[b, 3.4e+57]]], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(z / b), $MachinePrecision] + N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.05 \cdot 10^{+74}:\\
\;\;\;\;\frac{z}{b} + t \cdot \frac{x}{y \cdot b}\\
\mathbf{elif}\;b \leq 1.4 \cdot 10^{-14} \lor \neg \left(b \leq 3800\right) \land b \leq 3.4 \cdot 10^{+57}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + \frac{t \cdot \frac{x}{b}}{y}\\
\end{array}
\end{array}
if b < -1.0499999999999999e74Initial program 57.7%
associate-/l*53.2%
associate-/l*53.0%
Simplified53.0%
Taylor expanded in b around inf 48.7%
Taylor expanded in t around 0 72.3%
associate-/l*73.6%
*-commutative73.6%
Simplified73.6%
if -1.0499999999999999e74 < b < 1.4e-14 or 3800 < b < 3.39999999999999992e57Initial program 83.3%
associate-/l*84.2%
associate-/l*84.1%
Simplified84.1%
Taylor expanded in b around 0 72.7%
*-commutative83.3%
associate-/l*85.7%
Applied egg-rr77.5%
if 1.4e-14 < b < 3800 or 3.39999999999999992e57 < b Initial program 63.1%
associate-/l*61.5%
associate-/l*66.5%
Simplified66.5%
Taylor expanded in y around -inf 60.6%
Taylor expanded in x around inf 74.3%
mul-1-neg74.3%
associate-*r/79.5%
distribute-rgt-neg-in79.5%
distribute-neg-frac279.5%
Simplified79.5%
Final simplification77.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (* z (/ y t))) (+ a 1.0))))
(if (<= b -8e+73)
(+ (/ z b) (* t (/ x (* y b))))
(if (<= b 1.45e-14)
t_1
(if (<= b 5000.0)
(+ (/ z b) (/ (/ (* x t) b) y))
(if (<= b 1.35e+57) t_1 (+ (/ z b) (/ (* t (/ x b)) y))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (z * (y / t))) / (a + 1.0);
double tmp;
if (b <= -8e+73) {
tmp = (z / b) + (t * (x / (y * b)));
} else if (b <= 1.45e-14) {
tmp = t_1;
} else if (b <= 5000.0) {
tmp = (z / b) + (((x * t) / b) / y);
} else if (b <= 1.35e+57) {
tmp = t_1;
} else {
tmp = (z / b) + ((t * (x / b)) / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (x + (z * (y / t))) / (a + 1.0d0)
if (b <= (-8d+73)) then
tmp = (z / b) + (t * (x / (y * b)))
else if (b <= 1.45d-14) then
tmp = t_1
else if (b <= 5000.0d0) then
tmp = (z / b) + (((x * t) / b) / y)
else if (b <= 1.35d+57) then
tmp = t_1
else
tmp = (z / b) + ((t * (x / b)) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (z * (y / t))) / (a + 1.0);
double tmp;
if (b <= -8e+73) {
tmp = (z / b) + (t * (x / (y * b)));
} else if (b <= 1.45e-14) {
tmp = t_1;
} else if (b <= 5000.0) {
tmp = (z / b) + (((x * t) / b) / y);
} else if (b <= 1.35e+57) {
tmp = t_1;
} else {
tmp = (z / b) + ((t * (x / b)) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + (z * (y / t))) / (a + 1.0) tmp = 0 if b <= -8e+73: tmp = (z / b) + (t * (x / (y * b))) elif b <= 1.45e-14: tmp = t_1 elif b <= 5000.0: tmp = (z / b) + (((x * t) / b) / y) elif b <= 1.35e+57: tmp = t_1 else: tmp = (z / b) + ((t * (x / b)) / y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0)) tmp = 0.0 if (b <= -8e+73) tmp = Float64(Float64(z / b) + Float64(t * Float64(x / Float64(y * b)))); elseif (b <= 1.45e-14) tmp = t_1; elseif (b <= 5000.0) tmp = Float64(Float64(z / b) + Float64(Float64(Float64(x * t) / b) / y)); elseif (b <= 1.35e+57) tmp = t_1; else tmp = Float64(Float64(z / b) + Float64(Float64(t * Float64(x / b)) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + (z * (y / t))) / (a + 1.0); tmp = 0.0; if (b <= -8e+73) tmp = (z / b) + (t * (x / (y * b))); elseif (b <= 1.45e-14) tmp = t_1; elseif (b <= 5000.0) tmp = (z / b) + (((x * t) / b) / y); elseif (b <= 1.35e+57) tmp = t_1; else tmp = (z / b) + ((t * (x / b)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -8e+73], N[(N[(z / b), $MachinePrecision] + N[(t * N[(x / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.45e-14], t$95$1, If[LessEqual[b, 5000.0], N[(N[(z / b), $MachinePrecision] + N[(N[(N[(x * t), $MachinePrecision] / b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.35e+57], t$95$1, N[(N[(z / b), $MachinePrecision] + N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + z \cdot \frac{y}{t}}{a + 1}\\
\mathbf{if}\;b \leq -8 \cdot 10^{+73}:\\
\;\;\;\;\frac{z}{b} + t \cdot \frac{x}{y \cdot b}\\
\mathbf{elif}\;b \leq 1.45 \cdot 10^{-14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 5000:\\
\;\;\;\;\frac{z}{b} + \frac{\frac{x \cdot t}{b}}{y}\\
\mathbf{elif}\;b \leq 1.35 \cdot 10^{+57}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + \frac{t \cdot \frac{x}{b}}{y}\\
\end{array}
\end{array}
if b < -7.99999999999999986e73Initial program 57.7%
associate-/l*53.2%
associate-/l*53.0%
Simplified53.0%
Taylor expanded in b around inf 48.7%
Taylor expanded in t around 0 72.3%
associate-/l*73.6%
*-commutative73.6%
Simplified73.6%
if -7.99999999999999986e73 < b < 1.4500000000000001e-14 or 5e3 < b < 1.3499999999999999e57Initial program 83.3%
associate-/l*84.2%
associate-/l*84.1%
Simplified84.1%
Taylor expanded in b around 0 72.7%
*-commutative83.3%
associate-/l*85.7%
Applied egg-rr77.5%
if 1.4500000000000001e-14 < b < 5e3Initial program 58.8%
associate-/l*57.8%
associate-/l*58.0%
Simplified58.0%
Taylor expanded in y around -inf 66.6%
Taylor expanded in x around inf 79.8%
mul-1-neg79.8%
*-commutative79.8%
distribute-frac-neg79.8%
distribute-lft-neg-in79.8%
Simplified79.8%
if 1.3499999999999999e57 < b Initial program 63.7%
associate-/l*62.0%
associate-/l*67.8%
Simplified67.8%
Taylor expanded in y around -inf 59.8%
Taylor expanded in x around inf 73.5%
mul-1-neg73.5%
associate-*r/79.4%
distribute-rgt-neg-in79.4%
distribute-neg-frac279.4%
Simplified79.4%
Final simplification77.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -3.8e+239)
(/ z b)
(if (<= y 3.8e+261)
(/ (+ x (* z (/ y t))) (+ (* b (/ y t)) (+ a 1.0)))
(+ (/ z b) (* t (/ x (* y b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -3.8e+239) {
tmp = z / b;
} else if (y <= 3.8e+261) {
tmp = (x + (z * (y / t))) / ((b * (y / t)) + (a + 1.0));
} else {
tmp = (z / b) + (t * (x / (y * 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.8d+239)) then
tmp = z / b
else if (y <= 3.8d+261) then
tmp = (x + (z * (y / t))) / ((b * (y / t)) + (a + 1.0d0))
else
tmp = (z / b) + (t * (x / (y * 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.8e+239) {
tmp = z / b;
} else if (y <= 3.8e+261) {
tmp = (x + (z * (y / t))) / ((b * (y / t)) + (a + 1.0));
} else {
tmp = (z / b) + (t * (x / (y * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -3.8e+239: tmp = z / b elif y <= 3.8e+261: tmp = (x + (z * (y / t))) / ((b * (y / t)) + (a + 1.0)) else: tmp = (z / b) + (t * (x / (y * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -3.8e+239) tmp = Float64(z / b); elseif (y <= 3.8e+261) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(Float64(b * Float64(y / t)) + Float64(a + 1.0))); else tmp = Float64(Float64(z / b) + Float64(t * Float64(x / Float64(y * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -3.8e+239) tmp = z / b; elseif (y <= 3.8e+261) tmp = (x + (z * (y / t))) / ((b * (y / t)) + (a + 1.0)); else tmp = (z / b) + (t * (x / (y * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -3.8e+239], N[(z / b), $MachinePrecision], If[LessEqual[y, 3.8e+261], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z / b), $MachinePrecision] + N[(t * N[(x / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{+239}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{+261}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{b \cdot \frac{y}{t} + \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + t \cdot \frac{x}{y \cdot b}\\
\end{array}
\end{array}
if y < -3.8000000000000001e239Initial program 39.9%
associate-/l*49.2%
associate-/l*53.8%
Simplified53.8%
Taylor expanded in y around inf 72.5%
if -3.8000000000000001e239 < y < 3.8000000000000002e261Initial program 79.1%
*-commutative79.1%
associate-/l*82.5%
Applied egg-rr82.5%
*-commutative79.1%
associate-/l*79.5%
Applied egg-rr84.6%
if 3.8000000000000002e261 < y Initial program 45.3%
associate-/l*40.5%
associate-/l*49.3%
Simplified49.3%
Taylor expanded in b around inf 28.2%
Taylor expanded in t around 0 82.5%
associate-/l*82.4%
*-commutative82.4%
Simplified82.4%
Final simplification83.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* y (/ (/ z a) t)) (/ x a))))
(if (<= a -2.3e-10)
t_1
(if (<= a 4.2e-178)
(+ x (/ (* y z) t))
(if (<= a 32500.0) (/ z b) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * ((z / a) / t)) + (x / a);
double tmp;
if (a <= -2.3e-10) {
tmp = t_1;
} else if (a <= 4.2e-178) {
tmp = x + ((y * z) / t);
} else if (a <= 32500.0) {
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 = (y * ((z / a) / t)) + (x / a)
if (a <= (-2.3d-10)) then
tmp = t_1
else if (a <= 4.2d-178) then
tmp = x + ((y * z) / t)
else if (a <= 32500.0d0) 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 = (y * ((z / a) / t)) + (x / a);
double tmp;
if (a <= -2.3e-10) {
tmp = t_1;
} else if (a <= 4.2e-178) {
tmp = x + ((y * z) / t);
} else if (a <= 32500.0) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * ((z / a) / t)) + (x / a) tmp = 0 if a <= -2.3e-10: tmp = t_1 elif a <= 4.2e-178: tmp = x + ((y * z) / t) elif a <= 32500.0: tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * Float64(Float64(z / a) / t)) + Float64(x / a)) tmp = 0.0 if (a <= -2.3e-10) tmp = t_1; elseif (a <= 4.2e-178) tmp = Float64(x + Float64(Float64(y * z) / t)); elseif (a <= 32500.0) tmp = Float64(z / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y * ((z / a) / t)) + (x / a); tmp = 0.0; if (a <= -2.3e-10) tmp = t_1; elseif (a <= 4.2e-178) tmp = x + ((y * z) / t); elseif (a <= 32500.0) tmp = z / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(N[(z / a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + N[(x / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.3e-10], t$95$1, If[LessEqual[a, 4.2e-178], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 32500.0], N[(z / b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{\frac{z}{a}}{t} + \frac{x}{a}\\
\mathbf{if}\;a \leq -2.3 \cdot 10^{-10}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 4.2 \cdot 10^{-178}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\mathbf{elif}\;a \leq 32500:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.30000000000000007e-10 or 32500 < a Initial program 74.1%
associate-/l*75.2%
associate-/l*75.0%
Simplified75.0%
Taylor expanded in a around inf 56.9%
Taylor expanded in x around 0 55.2%
+-commutative55.2%
associate-/l*61.0%
associate-/r*65.6%
Simplified65.6%
if -2.30000000000000007e-10 < a < 4.2e-178Initial program 78.1%
associate-/l*74.5%
associate-/l*75.5%
Simplified75.5%
Taylor expanded in b around 0 53.9%
associate-*r/50.3%
*-commutative50.3%
div-inv50.3%
associate-*l*53.9%
Applied egg-rr53.9%
Taylor expanded in a around 0 53.3%
if 4.2e-178 < a < 32500Initial program 62.9%
associate-/l*66.2%
associate-/l*72.6%
Simplified72.6%
Taylor expanded in y around inf 52.7%
Final simplification59.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -1.4e+69)
(/ z b)
(if (<= y -1.85e-15)
(* t (/ x (* y b)))
(if (or (<= y -3.6e-21) (not (<= y 5.8e+96))) (/ z b) (/ x (+ a 1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.4e+69) {
tmp = z / b;
} else if (y <= -1.85e-15) {
tmp = t * (x / (y * b));
} else if ((y <= -3.6e-21) || !(y <= 5.8e+96)) {
tmp = z / b;
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-1.4d+69)) then
tmp = z / b
else if (y <= (-1.85d-15)) then
tmp = t * (x / (y * b))
else if ((y <= (-3.6d-21)) .or. (.not. (y <= 5.8d+96))) then
tmp = z / b
else
tmp = x / (a + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.4e+69) {
tmp = z / b;
} else if (y <= -1.85e-15) {
tmp = t * (x / (y * b));
} else if ((y <= -3.6e-21) || !(y <= 5.8e+96)) {
tmp = z / b;
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.4e+69: tmp = z / b elif y <= -1.85e-15: tmp = t * (x / (y * b)) elif (y <= -3.6e-21) or not (y <= 5.8e+96): tmp = z / b else: tmp = x / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.4e+69) tmp = Float64(z / b); elseif (y <= -1.85e-15) tmp = Float64(t * Float64(x / Float64(y * b))); elseif ((y <= -3.6e-21) || !(y <= 5.8e+96)) tmp = Float64(z / b); else tmp = Float64(x / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.4e+69) tmp = z / b; elseif (y <= -1.85e-15) tmp = t * (x / (y * b)); elseif ((y <= -3.6e-21) || ~((y <= 5.8e+96))) tmp = z / b; else tmp = x / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.4e+69], N[(z / b), $MachinePrecision], If[LessEqual[y, -1.85e-15], N[(t * N[(x / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -3.6e-21], N[Not[LessEqual[y, 5.8e+96]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{+69}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq -1.85 \cdot 10^{-15}:\\
\;\;\;\;t \cdot \frac{x}{y \cdot b}\\
\mathbf{elif}\;y \leq -3.6 \cdot 10^{-21} \lor \neg \left(y \leq 5.8 \cdot 10^{+96}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a + 1}\\
\end{array}
\end{array}
if y < -1.39999999999999991e69 or -1.85000000000000008e-15 < y < -3.59999999999999989e-21 or 5.79999999999999955e96 < y Initial program 51.1%
associate-/l*60.4%
associate-/l*68.2%
Simplified68.2%
Taylor expanded in y around inf 58.4%
if -1.39999999999999991e69 < y < -1.85000000000000008e-15Initial program 76.1%
associate-/l*76.1%
associate-/l*76.0%
Simplified76.0%
Taylor expanded in x around inf 58.8%
Taylor expanded in y around inf 51.3%
associate-/l*51.5%
*-commutative51.5%
Simplified51.5%
if -3.59999999999999989e-21 < y < 5.79999999999999955e96Initial program 90.8%
associate-/l*83.2%
associate-/l*79.5%
Simplified79.5%
Taylor expanded in y around 0 53.6%
Final simplification55.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -4.5e+68)
(/ z b)
(if (<= y -5e-16)
(/ x (+ (* b (/ y t)) 1.0))
(if (or (<= y -3.5e-21) (not (<= y 5.5e+96))) (/ z b) (/ x (+ a 1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -4.5e+68) {
tmp = z / b;
} else if (y <= -5e-16) {
tmp = x / ((b * (y / t)) + 1.0);
} else if ((y <= -3.5e-21) || !(y <= 5.5e+96)) {
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 <= (-4.5d+68)) then
tmp = z / b
else if (y <= (-5d-16)) then
tmp = x / ((b * (y / t)) + 1.0d0)
else if ((y <= (-3.5d-21)) .or. (.not. (y <= 5.5d+96))) 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 <= -4.5e+68) {
tmp = z / b;
} else if (y <= -5e-16) {
tmp = x / ((b * (y / t)) + 1.0);
} else if ((y <= -3.5e-21) || !(y <= 5.5e+96)) {
tmp = z / b;
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -4.5e+68: tmp = z / b elif y <= -5e-16: tmp = x / ((b * (y / t)) + 1.0) elif (y <= -3.5e-21) or not (y <= 5.5e+96): tmp = z / b else: tmp = x / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -4.5e+68) tmp = Float64(z / b); elseif (y <= -5e-16) tmp = Float64(x / Float64(Float64(b * Float64(y / t)) + 1.0)); elseif ((y <= -3.5e-21) || !(y <= 5.5e+96)) 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 <= -4.5e+68) tmp = z / b; elseif (y <= -5e-16) tmp = x / ((b * (y / t)) + 1.0); elseif ((y <= -3.5e-21) || ~((y <= 5.5e+96))) tmp = z / b; else tmp = x / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -4.5e+68], N[(z / b), $MachinePrecision], If[LessEqual[y, -5e-16], N[(x / N[(N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -3.5e-21], N[Not[LessEqual[y, 5.5e+96]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.5 \cdot 10^{+68}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq -5 \cdot 10^{-16}:\\
\;\;\;\;\frac{x}{b \cdot \frac{y}{t} + 1}\\
\mathbf{elif}\;y \leq -3.5 \cdot 10^{-21} \lor \neg \left(y \leq 5.5 \cdot 10^{+96}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a + 1}\\
\end{array}
\end{array}
if y < -4.5000000000000003e68 or -5.0000000000000004e-16 < y < -3.5000000000000003e-21 or 5.5000000000000002e96 < y Initial program 51.1%
associate-/l*60.4%
associate-/l*68.2%
Simplified68.2%
Taylor expanded in y around inf 58.4%
if -4.5000000000000003e68 < y < -5.0000000000000004e-16Initial program 76.1%
associate-/l*76.1%
associate-/l*76.0%
Simplified76.0%
Taylor expanded in x around inf 58.8%
Taylor expanded in a around 0 56.8%
associate-/l*56.7%
Simplified56.7%
if -3.5000000000000003e-21 < y < 5.5000000000000002e96Initial program 90.8%
associate-/l*83.2%
associate-/l*79.5%
Simplified79.5%
Taylor expanded in y around 0 53.6%
Final simplification55.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -2.5e+69)
(/ z b)
(if (<= y -4.25e-16)
(/ x (+ (/ (* y b) t) 1.0))
(if (or (<= y -3.6e-21) (not (<= y 5.5e+96))) (/ z b) (/ x (+ a 1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.5e+69) {
tmp = z / b;
} else if (y <= -4.25e-16) {
tmp = x / (((y * b) / t) + 1.0);
} else if ((y <= -3.6e-21) || !(y <= 5.5e+96)) {
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 <= (-2.5d+69)) then
tmp = z / b
else if (y <= (-4.25d-16)) then
tmp = x / (((y * b) / t) + 1.0d0)
else if ((y <= (-3.6d-21)) .or. (.not. (y <= 5.5d+96))) 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 <= -2.5e+69) {
tmp = z / b;
} else if (y <= -4.25e-16) {
tmp = x / (((y * b) / t) + 1.0);
} else if ((y <= -3.6e-21) || !(y <= 5.5e+96)) {
tmp = z / b;
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.5e+69: tmp = z / b elif y <= -4.25e-16: tmp = x / (((y * b) / t) + 1.0) elif (y <= -3.6e-21) or not (y <= 5.5e+96): tmp = z / b else: tmp = x / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.5e+69) tmp = Float64(z / b); elseif (y <= -4.25e-16) tmp = Float64(x / Float64(Float64(Float64(y * b) / t) + 1.0)); elseif ((y <= -3.6e-21) || !(y <= 5.5e+96)) 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 <= -2.5e+69) tmp = z / b; elseif (y <= -4.25e-16) tmp = x / (((y * b) / t) + 1.0); elseif ((y <= -3.6e-21) || ~((y <= 5.5e+96))) tmp = z / b; else tmp = x / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.5e+69], N[(z / b), $MachinePrecision], If[LessEqual[y, -4.25e-16], N[(x / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -3.6e-21], N[Not[LessEqual[y, 5.5e+96]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.5 \cdot 10^{+69}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq -4.25 \cdot 10^{-16}:\\
\;\;\;\;\frac{x}{\frac{y \cdot b}{t} + 1}\\
\mathbf{elif}\;y \leq -3.6 \cdot 10^{-21} \lor \neg \left(y \leq 5.5 \cdot 10^{+96}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a + 1}\\
\end{array}
\end{array}
if y < -2.50000000000000018e69 or -4.25e-16 < y < -3.59999999999999989e-21 or 5.5000000000000002e96 < y Initial program 51.1%
associate-/l*60.4%
associate-/l*68.2%
Simplified68.2%
Taylor expanded in y around inf 58.4%
if -2.50000000000000018e69 < y < -4.25e-16Initial program 76.1%
associate-/l*76.1%
associate-/l*76.0%
Simplified76.0%
Taylor expanded in x around inf 58.8%
Taylor expanded in a around 0 56.8%
if -3.59999999999999989e-21 < y < 5.5000000000000002e96Initial program 90.8%
associate-/l*83.2%
associate-/l*79.5%
Simplified79.5%
Taylor expanded in y around 0 53.6%
Final simplification55.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (* y (/ z t))) a)))
(if (<= a -2.3e-10)
t_1
(if (<= a 4.2e-178)
(+ x (/ (* y z) t))
(if (<= a 310000.0) (/ z b) 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 <= -2.3e-10) {
tmp = t_1;
} else if (a <= 4.2e-178) {
tmp = x + ((y * z) / t);
} else if (a <= 310000.0) {
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 + (y * (z / t))) / a
if (a <= (-2.3d-10)) then
tmp = t_1
else if (a <= 4.2d-178) then
tmp = x + ((y * z) / t)
else if (a <= 310000.0d0) 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 + (y * (z / t))) / a;
double tmp;
if (a <= -2.3e-10) {
tmp = t_1;
} else if (a <= 4.2e-178) {
tmp = x + ((y * z) / t);
} else if (a <= 310000.0) {
tmp = z / b;
} 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 <= -2.3e-10: tmp = t_1 elif a <= 4.2e-178: tmp = x + ((y * z) / t) elif a <= 310000.0: tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(y * Float64(z / t))) / a) tmp = 0.0 if (a <= -2.3e-10) tmp = t_1; elseif (a <= 4.2e-178) tmp = Float64(x + Float64(Float64(y * z) / t)); elseif (a <= 310000.0) 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 + (y * (z / t))) / a; tmp = 0.0; if (a <= -2.3e-10) tmp = t_1; elseif (a <= 4.2e-178) tmp = x + ((y * z) / t); elseif (a <= 310000.0) tmp = z / b; 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] / a), $MachinePrecision]}, If[LessEqual[a, -2.3e-10], t$95$1, If[LessEqual[a, 4.2e-178], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 310000.0], N[(z / b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + y \cdot \frac{z}{t}}{a}\\
\mathbf{if}\;a \leq -2.3 \cdot 10^{-10}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 4.2 \cdot 10^{-178}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\mathbf{elif}\;a \leq 310000:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.30000000000000007e-10 or 3.1e5 < a Initial program 74.1%
associate-/l*75.2%
associate-/l*75.0%
Simplified75.0%
Taylor expanded in a around inf 56.9%
associate-*r/60.2%
*-commutative60.2%
Applied egg-rr60.2%
if -2.30000000000000007e-10 < a < 4.2e-178Initial program 78.1%
associate-/l*74.5%
associate-/l*75.5%
Simplified75.5%
Taylor expanded in b around 0 53.9%
associate-*r/50.3%
*-commutative50.3%
div-inv50.3%
associate-*l*53.9%
Applied egg-rr53.9%
Taylor expanded in a around 0 53.3%
if 4.2e-178 < a < 3.1e5Initial program 62.9%
associate-/l*66.2%
associate-/l*72.6%
Simplified72.6%
Taylor expanded in y around inf 52.7%
Final simplification56.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ (* y z) t))))
(if (<= a -2.3e-10)
(/ t_1 a)
(if (<= a 1.8e-179)
t_1
(if (<= a 220000.0) (/ z b) (/ (+ x (* y (/ z t))) a))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double tmp;
if (a <= -2.3e-10) {
tmp = t_1 / a;
} else if (a <= 1.8e-179) {
tmp = t_1;
} else if (a <= 220000.0) {
tmp = z / b;
} 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 * z) / t)
if (a <= (-2.3d-10)) then
tmp = t_1 / a
else if (a <= 1.8d-179) then
tmp = t_1
else if (a <= 220000.0d0) then
tmp = z / b
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 * z) / t);
double tmp;
if (a <= -2.3e-10) {
tmp = t_1 / a;
} else if (a <= 1.8e-179) {
tmp = t_1;
} else if (a <= 220000.0) {
tmp = z / b;
} else {
tmp = (x + (y * (z / t))) / a;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + ((y * z) / t) tmp = 0 if a <= -2.3e-10: tmp = t_1 / a elif a <= 1.8e-179: tmp = t_1 elif a <= 220000.0: tmp = z / b else: tmp = (x + (y * (z / t))) / a return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(y * z) / t)) tmp = 0.0 if (a <= -2.3e-10) tmp = Float64(t_1 / a); elseif (a <= 1.8e-179) tmp = t_1; elseif (a <= 220000.0) tmp = Float64(z / b); 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 * z) / t); tmp = 0.0; if (a <= -2.3e-10) tmp = t_1 / a; elseif (a <= 1.8e-179) tmp = t_1; elseif (a <= 220000.0) tmp = z / b; 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 * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.3e-10], N[(t$95$1 / a), $MachinePrecision], If[LessEqual[a, 1.8e-179], t$95$1, If[LessEqual[a, 220000.0], N[(z / b), $MachinePrecision], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot z}{t}\\
\mathbf{if}\;a \leq -2.3 \cdot 10^{-10}:\\
\;\;\;\;\frac{t\_1}{a}\\
\mathbf{elif}\;a \leq 1.8 \cdot 10^{-179}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 220000:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a}\\
\end{array}
\end{array}
if a < -2.30000000000000007e-10Initial program 75.0%
associate-/l*69.4%
associate-/l*72.9%
Simplified72.9%
Taylor expanded in a around inf 59.6%
if -2.30000000000000007e-10 < a < 1.80000000000000004e-179Initial program 78.1%
associate-/l*74.5%
associate-/l*75.5%
Simplified75.5%
Taylor expanded in b around 0 53.9%
associate-*r/50.3%
*-commutative50.3%
div-inv50.3%
associate-*l*53.9%
Applied egg-rr53.9%
Taylor expanded in a around 0 53.3%
if 1.80000000000000004e-179 < a < 2.2e5Initial program 62.9%
associate-/l*66.2%
associate-/l*72.6%
Simplified72.6%
Taylor expanded in y around inf 52.7%
if 2.2e5 < a Initial program 73.5%
associate-/l*79.2%
associate-/l*76.5%
Simplified76.5%
Taylor expanded in a around inf 54.9%
associate-*r/62.0%
*-commutative62.0%
Applied egg-rr62.0%
Final simplification57.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -5.1e+32) (not (<= y 5.5e+96))) (+ (/ z b) (* t (/ x (* y b)))) (/ x (+ (/ (* y b) t) (+ a 1.0)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -5.1e+32) || !(y <= 5.5e+96)) {
tmp = (z / b) + (t * (x / (y * b)));
} else {
tmp = x / (((y * b) / t) + (a + 1.0));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-5.1d+32)) .or. (.not. (y <= 5.5d+96))) then
tmp = (z / b) + (t * (x / (y * b)))
else
tmp = x / (((y * b) / t) + (a + 1.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -5.1e+32) || !(y <= 5.5e+96)) {
tmp = (z / b) + (t * (x / (y * b)));
} else {
tmp = x / (((y * b) / t) + (a + 1.0));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -5.1e+32) or not (y <= 5.5e+96): tmp = (z / b) + (t * (x / (y * b))) else: tmp = x / (((y * b) / t) + (a + 1.0)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -5.1e+32) || !(y <= 5.5e+96)) tmp = Float64(Float64(z / b) + Float64(t * Float64(x / Float64(y * b)))); else tmp = Float64(x / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -5.1e+32) || ~((y <= 5.5e+96))) tmp = (z / b) + (t * (x / (y * b))); else tmp = x / (((y * b) / t) + (a + 1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -5.1e+32], N[Not[LessEqual[y, 5.5e+96]], $MachinePrecision]], N[(N[(z / b), $MachinePrecision] + N[(t * N[(x / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.1 \cdot 10^{+32} \lor \neg \left(y \leq 5.5 \cdot 10^{+96}\right):\\
\;\;\;\;\frac{z}{b} + t \cdot \frac{x}{y \cdot b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\end{array}
\end{array}
if y < -5.10000000000000004e32 or 5.5000000000000002e96 < y Initial program 50.8%
associate-/l*59.7%
associate-/l*67.3%
Simplified67.3%
Taylor expanded in b around inf 32.9%
Taylor expanded in t around 0 61.9%
associate-/l*62.0%
*-commutative62.0%
Simplified62.0%
if -5.10000000000000004e32 < y < 5.5000000000000002e96Initial program 89.9%
associate-/l*83.1%
associate-/l*79.9%
Simplified79.9%
Taylor expanded in x around inf 64.8%
associate-+r+64.8%
*-commutative64.8%
Simplified64.8%
Final simplification63.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -6.2e+32) (not (<= y 2.25e+170))) (+ (/ z b) (* t (/ x (* y b)))) (/ x (+ (* b (/ y t)) (+ a 1.0)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -6.2e+32) || !(y <= 2.25e+170)) {
tmp = (z / b) + (t * (x / (y * b)));
} else {
tmp = x / ((b * (y / t)) + (a + 1.0));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-6.2d+32)) .or. (.not. (y <= 2.25d+170))) then
tmp = (z / b) + (t * (x / (y * b)))
else
tmp = x / ((b * (y / t)) + (a + 1.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -6.2e+32) || !(y <= 2.25e+170)) {
tmp = (z / b) + (t * (x / (y * b)));
} else {
tmp = x / ((b * (y / t)) + (a + 1.0));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -6.2e+32) or not (y <= 2.25e+170): tmp = (z / b) + (t * (x / (y * b))) else: tmp = x / ((b * (y / t)) + (a + 1.0)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -6.2e+32) || !(y <= 2.25e+170)) tmp = Float64(Float64(z / b) + Float64(t * Float64(x / Float64(y * b)))); else tmp = Float64(x / Float64(Float64(b * Float64(y / t)) + Float64(a + 1.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -6.2e+32) || ~((y <= 2.25e+170))) tmp = (z / b) + (t * (x / (y * b))); else tmp = x / ((b * (y / t)) + (a + 1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -6.2e+32], N[Not[LessEqual[y, 2.25e+170]], $MachinePrecision]], N[(N[(z / b), $MachinePrecision] + N[(t * N[(x / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{+32} \lor \neg \left(y \leq 2.25 \cdot 10^{+170}\right):\\
\;\;\;\;\frac{z}{b} + t \cdot \frac{x}{y \cdot b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{b \cdot \frac{y}{t} + \left(a + 1\right)}\\
\end{array}
\end{array}
if y < -6.19999999999999986e32 or 2.25000000000000011e170 < y Initial program 51.7%
associate-/l*58.2%
associate-/l*64.1%
Simplified64.1%
Taylor expanded in b around inf 35.5%
Taylor expanded in t around 0 65.8%
associate-/l*67.0%
*-commutative67.0%
Simplified67.0%
if -6.19999999999999986e32 < y < 2.25000000000000011e170Initial program 85.0%
*-commutative85.0%
associate-/l*87.1%
Applied egg-rr87.1%
*-commutative85.0%
associate-/l*86.7%
Applied egg-rr89.4%
Taylor expanded in x around inf 62.8%
Final simplification64.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -9.2e+72) (not (<= b 8e+56))) (+ (/ z b) (* t (/ x (* y b)))) (/ (+ x (* z (/ y t))) (+ a 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -9.2e+72) || !(b <= 8e+56)) {
tmp = (z / b) + (t * (x / (y * b)));
} else {
tmp = (x + (z * (y / t))) / (a + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-9.2d+72)) .or. (.not. (b <= 8d+56))) then
tmp = (z / b) + (t * (x / (y * b)))
else
tmp = (x + (z * (y / t))) / (a + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -9.2e+72) || !(b <= 8e+56)) {
tmp = (z / b) + (t * (x / (y * b)));
} else {
tmp = (x + (z * (y / t))) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -9.2e+72) or not (b <= 8e+56): tmp = (z / b) + (t * (x / (y * b))) else: tmp = (x + (z * (y / t))) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -9.2e+72) || !(b <= 8e+56)) tmp = Float64(Float64(z / b) + Float64(t * Float64(x / Float64(y * b)))); else tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -9.2e+72) || ~((b <= 8e+56))) tmp = (z / b) + (t * (x / (y * b))); else tmp = (x + (z * (y / t))) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -9.2e+72], N[Not[LessEqual[b, 8e+56]], $MachinePrecision]], N[(N[(z / b), $MachinePrecision] + N[(t * N[(x / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -9.2 \cdot 10^{+72} \lor \neg \left(b \leq 8 \cdot 10^{+56}\right):\\
\;\;\;\;\frac{z}{b} + t \cdot \frac{x}{y \cdot b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\
\end{array}
\end{array}
if b < -9.199999999999999e72 or 8.00000000000000074e56 < b Initial program 60.9%
associate-/l*57.9%
associate-/l*60.8%
Simplified60.8%
Taylor expanded in b around inf 45.8%
Taylor expanded in t around 0 71.9%
associate-/l*74.6%
*-commutative74.6%
Simplified74.6%
if -9.199999999999999e72 < b < 8.00000000000000074e56Initial program 82.2%
associate-/l*83.0%
associate-/l*83.0%
Simplified83.0%
Taylor expanded in b around 0 70.3%
*-commutative82.2%
associate-/l*85.1%
Applied egg-rr74.9%
Final simplification74.8%
(FPCore (x y z t a b) :precision binary64 (if (<= a -1.0) (/ x a) (if (<= a -2.5e-201) x (if (<= a 310000.0) (/ z b) (/ x a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.0) {
tmp = x / a;
} else if (a <= -2.5e-201) {
tmp = x;
} else if (a <= 310000.0) {
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 (a <= (-1.0d0)) then
tmp = x / a
else if (a <= (-2.5d-201)) then
tmp = x
else if (a <= 310000.0d0) 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 (a <= -1.0) {
tmp = x / a;
} else if (a <= -2.5e-201) {
tmp = x;
} else if (a <= 310000.0) {
tmp = z / b;
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.0: tmp = x / a elif a <= -2.5e-201: tmp = x elif a <= 310000.0: tmp = z / b else: tmp = x / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.0) tmp = Float64(x / a); elseif (a <= -2.5e-201) tmp = x; elseif (a <= 310000.0) 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 (a <= -1.0) tmp = x / a; elseif (a <= -2.5e-201) tmp = x; elseif (a <= 310000.0) tmp = z / b; else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.0], N[(x / a), $MachinePrecision], If[LessEqual[a, -2.5e-201], x, If[LessEqual[a, 310000.0], N[(z / b), $MachinePrecision], N[(x / a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;a \leq -2.5 \cdot 10^{-201}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 310000:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if a < -1 or 3.1e5 < a Initial program 74.7%
associate-/l*75.8%
associate-/l*75.7%
Simplified75.7%
Taylor expanded in y around 0 45.2%
Taylor expanded in a around inf 45.2%
if -1 < a < -2.5e-201Initial program 82.4%
associate-/l*82.5%
associate-/l*80.7%
Simplified80.7%
Taylor expanded in y around 0 40.7%
Taylor expanded in a around 0 39.5%
if -2.5e-201 < a < 3.1e5Initial program 69.3%
associate-/l*65.9%
associate-/l*70.4%
Simplified70.4%
Taylor expanded in y around inf 44.5%
Final simplification43.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -4e+33) (not (<= y 6.5e+96))) (/ z b) (/ x (+ a 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -4e+33) || !(y <= 6.5e+96)) {
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 <= (-4d+33)) .or. (.not. (y <= 6.5d+96))) 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 <= -4e+33) || !(y <= 6.5e+96)) {
tmp = z / b;
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -4e+33) or not (y <= 6.5e+96): tmp = z / b else: tmp = x / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -4e+33) || !(y <= 6.5e+96)) 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 <= -4e+33) || ~((y <= 6.5e+96))) 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, -4e+33], N[Not[LessEqual[y, 6.5e+96]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4 \cdot 10^{+33} \lor \neg \left(y \leq 6.5 \cdot 10^{+96}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a + 1}\\
\end{array}
\end{array}
if y < -3.9999999999999998e33 or 6.5e96 < y Initial program 51.2%
associate-/l*60.3%
associate-/l*68.0%
Simplified68.0%
Taylor expanded in y around inf 55.3%
if -3.9999999999999998e33 < y < 6.5e96Initial program 89.4%
associate-/l*82.6%
associate-/l*79.4%
Simplified79.4%
Taylor expanded in y around 0 52.1%
Final simplification53.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -1.0) (not (<= a 660000.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 <= 660000.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 <= 660000.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 <= 660000.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 <= 660000.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 <= 660000.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 <= 660000.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, 660000.0]], $MachinePrecision]], N[(x / a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1 \lor \neg \left(a \leq 660000\right):\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1 or 6.6e5 < a Initial program 74.5%
associate-/l*75.6%
associate-/l*75.5%
Simplified75.5%
Taylor expanded in y around 0 45.6%
Taylor expanded in a around inf 45.5%
if -1 < a < 6.6e5Initial program 74.4%
associate-/l*72.4%
associate-/l*74.5%
Simplified74.5%
Taylor expanded in y around 0 31.0%
Taylor expanded in a around 0 30.2%
Final simplification37.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 74.5%
associate-/l*73.9%
associate-/l*74.9%
Simplified74.9%
Taylor expanded in y around 0 37.9%
Taylor expanded in a around 0 17.7%
Final simplification17.7%
(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 2024076
(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))))