
(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 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x + ((y * z) / t)) / ((a + 1.0d0) + ((y * b) / t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
def code(x, y, z, t, a, b): return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
function code(x, y, z, t, a, b) return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* y b) t))
(t_2 (+ 1.0 (+ a t_1)))
(t_3 (+ x (/ (* y z) t)))
(t_4 (/ t_3 (+ t_1 (+ a 1.0))))
(t_5 (* z (+ (/ x (* z t_2)) (/ y (* t t_2))))))
(if (<= t_4 (- INFINITY))
t_5
(if (<= t_4 2e+272)
(/ t_3 (+ (* b (/ y t)) (+ a 1.0)))
(if (<= t_4 INFINITY) t_5 (+ (/ z b) (* t (/ (/ x b) y))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = 1.0 + (a + t_1);
double t_3 = x + ((y * z) / t);
double t_4 = t_3 / (t_1 + (a + 1.0));
double t_5 = z * ((x / (z * t_2)) + (y / (t * t_2)));
double tmp;
if (t_4 <= -((double) INFINITY)) {
tmp = t_5;
} else if (t_4 <= 2e+272) {
tmp = t_3 / ((b * (y / t)) + (a + 1.0));
} else if (t_4 <= ((double) INFINITY)) {
tmp = t_5;
} else {
tmp = (z / b) + (t * ((x / b) / y));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = 1.0 + (a + t_1);
double t_3 = x + ((y * z) / t);
double t_4 = t_3 / (t_1 + (a + 1.0));
double t_5 = z * ((x / (z * t_2)) + (y / (t * t_2)));
double tmp;
if (t_4 <= -Double.POSITIVE_INFINITY) {
tmp = t_5;
} else if (t_4 <= 2e+272) {
tmp = t_3 / ((b * (y / t)) + (a + 1.0));
} else if (t_4 <= Double.POSITIVE_INFINITY) {
tmp = t_5;
} else {
tmp = (z / b) + (t * ((x / b) / y));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * b) / t t_2 = 1.0 + (a + t_1) t_3 = x + ((y * z) / t) t_4 = t_3 / (t_1 + (a + 1.0)) t_5 = z * ((x / (z * t_2)) + (y / (t * t_2))) tmp = 0 if t_4 <= -math.inf: tmp = t_5 elif t_4 <= 2e+272: tmp = t_3 / ((b * (y / t)) + (a + 1.0)) elif t_4 <= math.inf: tmp = t_5 else: tmp = (z / b) + (t * ((x / b) / y)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * b) / t) t_2 = Float64(1.0 + Float64(a + t_1)) t_3 = Float64(x + Float64(Float64(y * z) / t)) t_4 = Float64(t_3 / Float64(t_1 + Float64(a + 1.0))) t_5 = Float64(z * Float64(Float64(x / Float64(z * t_2)) + Float64(y / Float64(t * t_2)))) tmp = 0.0 if (t_4 <= Float64(-Inf)) tmp = t_5; elseif (t_4 <= 2e+272) tmp = Float64(t_3 / Float64(Float64(b * Float64(y / t)) + Float64(a + 1.0))); elseif (t_4 <= Inf) tmp = t_5; else tmp = Float64(Float64(z / b) + Float64(t * Float64(Float64(x / b) / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y * b) / t; t_2 = 1.0 + (a + t_1); t_3 = x + ((y * z) / t); t_4 = t_3 / (t_1 + (a + 1.0)); t_5 = z * ((x / (z * t_2)) + (y / (t * t_2))); tmp = 0.0; if (t_4 <= -Inf) tmp = t_5; elseif (t_4 <= 2e+272) tmp = t_3 / ((b * (y / t)) + (a + 1.0)); elseif (t_4 <= Inf) tmp = t_5; 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[(y * b), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 / N[(t$95$1 + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(z * N[(N[(x / N[(z * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(y / N[(t * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], t$95$5, If[LessEqual[t$95$4, 2e+272], N[(t$95$3 / N[(N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, Infinity], t$95$5, N[(N[(z / b), $MachinePrecision] + N[(t * N[(N[(x / b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t}\\
t_2 := 1 + \left(a + t\_1\right)\\
t_3 := x + \frac{y \cdot z}{t}\\
t_4 := \frac{t\_3}{t\_1 + \left(a + 1\right)}\\
t_5 := z \cdot \left(\frac{x}{z \cdot t\_2} + \frac{y}{t \cdot t\_2}\right)\\
\mathbf{if}\;t\_4 \leq -\infty:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+272}:\\
\;\;\;\;\frac{t\_3}{b \cdot \frac{y}{t} + \left(a + 1\right)}\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;t\_5\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + t \cdot \frac{\frac{x}{b}}{y}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -inf.0 or 2.0000000000000001e272 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 48.6%
associate-/l*57.4%
associate-/l*57.4%
Simplified57.4%
Taylor expanded in z around inf 93.9%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 2.0000000000000001e272Initial program 90.5%
*-commutative90.5%
associate-/l*92.7%
Applied egg-rr92.7%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 0.0%
associate-/l*1.0%
associate-/l*27.1%
Simplified27.1%
Taylor expanded in x around inf 7.3%
associate-*l/7.3%
*-commutative7.3%
associate-/l*9.4%
*-commutative9.4%
associate-*l/16.8%
*-commutative16.8%
Simplified16.8%
Taylor expanded in y around inf 72.5%
associate-/r*87.6%
Simplified87.6%
Taylor expanded in y around inf 92.6%
associate-/l*94.9%
associate-/r*96.5%
Simplified96.5%
Final simplification93.3%
(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)))))
(if (<= t_2 (- INFINITY))
(* (/ y t) (/ z (+ 1.0 (+ a (* y (/ b t))))))
(if (<= t_2 1e+299) (/ 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 tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = (y / t) * (z / (1.0 + (a + (y * (b / t)))));
} else if (t_2 <= 1e+299) {
tmp = t_1 / ((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 = x + ((y * z) / t);
double t_2 = t_1 / (((y * b) / t) + (a + 1.0));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = (y / t) * (z / (1.0 + (a + (y * (b / t)))));
} else if (t_2 <= 1e+299) {
tmp = t_1 / ((b * (y / t)) + (a + 1.0));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + ((y * z) / t) t_2 = t_1 / (((y * b) / t) + (a + 1.0)) tmp = 0 if t_2 <= -math.inf: tmp = (y / t) * (z / (1.0 + (a + (y * (b / t))))) elif t_2 <= 1e+299: 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))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(Float64(y / t) * Float64(z / Float64(1.0 + Float64(a + Float64(y * Float64(b / t)))))); elseif (t_2 <= 1e+299) tmp = Float64(t_1 / 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 = x + ((y * z) / t); t_2 = t_1 / (((y * b) / t) + (a + 1.0)); tmp = 0.0; if (t_2 <= -Inf) tmp = (y / t) * (z / (1.0 + (a + (y * (b / t))))); elseif (t_2 <= 1e+299) tmp = t_1 / ((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[(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]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(y / t), $MachinePrecision] * N[(z / N[(1.0 + N[(a + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+299], 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)}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{1 + \left(a + y \cdot \frac{b}{t}\right)}\\
\mathbf{elif}\;t\_2 \leq 10^{+299}:\\
\;\;\;\;\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 1) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 53.0%
associate-/l*53.0%
associate-/l*53.0%
Simplified53.0%
Taylor expanded in x around 0 79.1%
times-frac86.3%
associate-*l/86.2%
*-commutative86.2%
Simplified86.2%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 1.0000000000000001e299Initial program 90.6%
*-commutative90.6%
associate-/l*92.9%
Applied egg-rr92.9%
if 1.0000000000000001e299 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 13.4%
associate-/l*23.0%
associate-/l*39.2%
Simplified39.2%
Taylor expanded in y around inf 85.6%
Final simplification91.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* x (/ (+ (/ t y) (/ z x)) b))))
(if (<= y -5e+58)
t_1
(if (<= y -6.6e+38)
(/ (+ x (* y (/ z t))) a)
(if (<= y -20000000.0)
t_1
(if (<= y 420.0)
(/ x (+ a 1.0))
(if (<= y 4.2e+72)
t_1
(if (<= y 1.3e+94)
(/ x a)
(if (<= y 7.7e+118) (/ z b) t_1)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x * (((t / y) + (z / x)) / b);
double tmp;
if (y <= -5e+58) {
tmp = t_1;
} else if (y <= -6.6e+38) {
tmp = (x + (y * (z / t))) / a;
} else if (y <= -20000000.0) {
tmp = t_1;
} else if (y <= 420.0) {
tmp = x / (a + 1.0);
} else if (y <= 4.2e+72) {
tmp = t_1;
} else if (y <= 1.3e+94) {
tmp = x / a;
} else if (y <= 7.7e+118) {
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 * (((t / y) + (z / x)) / b)
if (y <= (-5d+58)) then
tmp = t_1
else if (y <= (-6.6d+38)) then
tmp = (x + (y * (z / t))) / a
else if (y <= (-20000000.0d0)) then
tmp = t_1
else if (y <= 420.0d0) then
tmp = x / (a + 1.0d0)
else if (y <= 4.2d+72) then
tmp = t_1
else if (y <= 1.3d+94) then
tmp = x / a
else if (y <= 7.7d+118) 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 * (((t / y) + (z / x)) / b);
double tmp;
if (y <= -5e+58) {
tmp = t_1;
} else if (y <= -6.6e+38) {
tmp = (x + (y * (z / t))) / a;
} else if (y <= -20000000.0) {
tmp = t_1;
} else if (y <= 420.0) {
tmp = x / (a + 1.0);
} else if (y <= 4.2e+72) {
tmp = t_1;
} else if (y <= 1.3e+94) {
tmp = x / a;
} else if (y <= 7.7e+118) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x * (((t / y) + (z / x)) / b) tmp = 0 if y <= -5e+58: tmp = t_1 elif y <= -6.6e+38: tmp = (x + (y * (z / t))) / a elif y <= -20000000.0: tmp = t_1 elif y <= 420.0: tmp = x / (a + 1.0) elif y <= 4.2e+72: tmp = t_1 elif y <= 1.3e+94: tmp = x / a elif y <= 7.7e+118: tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x * Float64(Float64(Float64(t / y) + Float64(z / x)) / b)) tmp = 0.0 if (y <= -5e+58) tmp = t_1; elseif (y <= -6.6e+38) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / a); elseif (y <= -20000000.0) tmp = t_1; elseif (y <= 420.0) tmp = Float64(x / Float64(a + 1.0)); elseif (y <= 4.2e+72) tmp = t_1; elseif (y <= 1.3e+94) tmp = Float64(x / a); elseif (y <= 7.7e+118) 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 * (((t / y) + (z / x)) / b); tmp = 0.0; if (y <= -5e+58) tmp = t_1; elseif (y <= -6.6e+38) tmp = (x + (y * (z / t))) / a; elseif (y <= -20000000.0) tmp = t_1; elseif (y <= 420.0) tmp = x / (a + 1.0); elseif (y <= 4.2e+72) tmp = t_1; elseif (y <= 1.3e+94) tmp = x / a; elseif (y <= 7.7e+118) 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[(N[(t / y), $MachinePrecision] + N[(z / x), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5e+58], t$95$1, If[LessEqual[y, -6.6e+38], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, -20000000.0], t$95$1, If[LessEqual[y, 420.0], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.2e+72], t$95$1, If[LessEqual[y, 1.3e+94], N[(x / a), $MachinePrecision], If[LessEqual[y, 7.7e+118], N[(z / b), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{\frac{t}{y} + \frac{z}{x}}{b}\\
\mathbf{if}\;y \leq -5 \cdot 10^{+58}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -6.6 \cdot 10^{+38}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a}\\
\mathbf{elif}\;y \leq -20000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 420:\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{+72}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{+94}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;y \leq 7.7 \cdot 10^{+118}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.99999999999999986e58 or -6.5999999999999998e38 < y < -2e7 or 420 < y < 4.2000000000000003e72 or 7.6999999999999997e118 < y Initial program 57.0%
associate-/l*60.2%
associate-/l*70.0%
Simplified70.0%
Taylor expanded in x around inf 56.6%
associate-*l/60.7%
*-commutative60.7%
associate-/l*60.5%
*-commutative60.5%
associate-*l/61.3%
*-commutative61.3%
Simplified61.3%
Taylor expanded in y around inf 66.5%
associate-/r*71.1%
Simplified71.1%
Taylor expanded in b around inf 67.7%
associate-/l*62.5%
Simplified62.5%
if -4.99999999999999986e58 < y < -6.5999999999999998e38Initial program 67.1%
associate-/l*67.1%
associate-/l*83.3%
Simplified83.3%
Taylor expanded in a around inf 84.0%
if -2e7 < y < 420Initial program 97.6%
associate-/l*91.4%
associate-/l*88.8%
Simplified88.8%
Taylor expanded in y around 0 68.5%
if 4.2000000000000003e72 < y < 1.3e94Initial program 100.0%
associate-/l*100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in x around inf 100.0%
Taylor expanded in a around inf 100.0%
if 1.3e94 < y < 7.6999999999999997e118Initial program 64.2%
associate-/l*64.6%
associate-/l*76.7%
Simplified76.7%
Taylor expanded in y around inf 64.0%
Final simplification66.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ z b) (* t (/ (/ x b) y)))))
(if (<= y -3.8e+50)
t_1
(if (<= y -1.85e+41)
(/ x a)
(if (<= y -20000.0)
t_1
(if (<= y 3500.0)
(/ x (+ a 1.0))
(if (or (<= y 4.2e+72) (not (<= y 6.8e+107)))
t_1
(/ (+ x (/ y (/ t z))) a))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z / b) + (t * ((x / b) / y));
double tmp;
if (y <= -3.8e+50) {
tmp = t_1;
} else if (y <= -1.85e+41) {
tmp = x / a;
} else if (y <= -20000.0) {
tmp = t_1;
} else if (y <= 3500.0) {
tmp = x / (a + 1.0);
} else if ((y <= 4.2e+72) || !(y <= 6.8e+107)) {
tmp = t_1;
} else {
tmp = (x + (y / (t / z))) / 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 = (z / b) + (t * ((x / b) / y))
if (y <= (-3.8d+50)) then
tmp = t_1
else if (y <= (-1.85d+41)) then
tmp = x / a
else if (y <= (-20000.0d0)) then
tmp = t_1
else if (y <= 3500.0d0) then
tmp = x / (a + 1.0d0)
else if ((y <= 4.2d+72) .or. (.not. (y <= 6.8d+107))) then
tmp = t_1
else
tmp = (x + (y / (t / z))) / 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 = (z / b) + (t * ((x / b) / y));
double tmp;
if (y <= -3.8e+50) {
tmp = t_1;
} else if (y <= -1.85e+41) {
tmp = x / a;
} else if (y <= -20000.0) {
tmp = t_1;
} else if (y <= 3500.0) {
tmp = x / (a + 1.0);
} else if ((y <= 4.2e+72) || !(y <= 6.8e+107)) {
tmp = t_1;
} else {
tmp = (x + (y / (t / z))) / a;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z / b) + (t * ((x / b) / y)) tmp = 0 if y <= -3.8e+50: tmp = t_1 elif y <= -1.85e+41: tmp = x / a elif y <= -20000.0: tmp = t_1 elif y <= 3500.0: tmp = x / (a + 1.0) elif (y <= 4.2e+72) or not (y <= 6.8e+107): tmp = t_1 else: tmp = (x + (y / (t / z))) / a return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z / b) + Float64(t * Float64(Float64(x / b) / y))) tmp = 0.0 if (y <= -3.8e+50) tmp = t_1; elseif (y <= -1.85e+41) tmp = Float64(x / a); elseif (y <= -20000.0) tmp = t_1; elseif (y <= 3500.0) tmp = Float64(x / Float64(a + 1.0)); elseif ((y <= 4.2e+72) || !(y <= 6.8e+107)) tmp = t_1; else tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z / b) + (t * ((x / b) / y)); tmp = 0.0; if (y <= -3.8e+50) tmp = t_1; elseif (y <= -1.85e+41) tmp = x / a; elseif (y <= -20000.0) tmp = t_1; elseif (y <= 3500.0) tmp = x / (a + 1.0); elseif ((y <= 4.2e+72) || ~((y <= 6.8e+107))) tmp = t_1; else tmp = (x + (y / (t / z))) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z / b), $MachinePrecision] + N[(t * N[(N[(x / b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.8e+50], t$95$1, If[LessEqual[y, -1.85e+41], N[(x / a), $MachinePrecision], If[LessEqual[y, -20000.0], t$95$1, If[LessEqual[y, 3500.0], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 4.2e+72], N[Not[LessEqual[y, 6.8e+107]], $MachinePrecision]], t$95$1, N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{b} + t \cdot \frac{\frac{x}{b}}{y}\\
\mathbf{if}\;y \leq -3.8 \cdot 10^{+50}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.85 \cdot 10^{+41}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;y \leq -20000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3500:\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{+72} \lor \neg \left(y \leq 6.8 \cdot 10^{+107}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a}\\
\end{array}
\end{array}
if y < -3.79999999999999987e50 or -1.84999999999999991e41 < y < -2e4 or 3500 < y < 4.2000000000000003e72 or 6.7999999999999994e107 < y Initial program 55.7%
associate-/l*58.8%
associate-/l*68.4%
Simplified68.4%
Taylor expanded in x around inf 55.3%
associate-*l/59.3%
*-commutative59.3%
associate-/l*59.2%
*-commutative59.2%
associate-*l/59.9%
*-commutative59.9%
Simplified59.9%
Taylor expanded in y around inf 67.2%
associate-/r*71.8%
Simplified71.8%
Taylor expanded in y around inf 65.7%
associate-/l*67.1%
associate-/r*69.6%
Simplified69.6%
if -3.79999999999999987e50 < y < -1.84999999999999991e41Initial program 80.5%
associate-/l*80.5%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in x around inf 80.5%
Taylor expanded in a around inf 100.0%
if -2e4 < y < 3500Initial program 98.4%
associate-/l*92.2%
associate-/l*89.6%
Simplified89.6%
Taylor expanded in y around 0 69.1%
if 4.2000000000000003e72 < y < 6.7999999999999994e107Initial program 83.1%
associate-/l*83.4%
associate-/l*92.2%
Simplified92.2%
clear-num92.3%
un-div-inv92.2%
Applied egg-rr92.2%
Taylor expanded in a around inf 66.5%
Final simplification69.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ 1.0 (+ a (* y (/ b t))))))
(if (<= y -1.6e+120)
(/ (* x (+ (/ t y) (/ z x))) b)
(if (<= y -8.2e+25)
(/ x t_1)
(if (<= y -9.2e-41)
(* (/ y t) (/ z t_1))
(if (<= y 2.5e+15)
(/ (+ x (/ (* y z) t)) (+ a 1.0))
(if (or (<= y 2.15e+71) (not (<= y 9.4e+108)))
(+ (/ z b) (* t (/ (/ x b) y)))
(/ (+ x (* y (/ z t))) (+ a 1.0)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 + (a + (y * (b / t)));
double tmp;
if (y <= -1.6e+120) {
tmp = (x * ((t / y) + (z / x))) / b;
} else if (y <= -8.2e+25) {
tmp = x / t_1;
} else if (y <= -9.2e-41) {
tmp = (y / t) * (z / t_1);
} else if (y <= 2.5e+15) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else if ((y <= 2.15e+71) || !(y <= 9.4e+108)) {
tmp = (z / b) + (t * ((x / b) / y));
} else {
tmp = (x + (y * (z / t))) / (a + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = 1.0d0 + (a + (y * (b / t)))
if (y <= (-1.6d+120)) then
tmp = (x * ((t / y) + (z / x))) / b
else if (y <= (-8.2d+25)) then
tmp = x / t_1
else if (y <= (-9.2d-41)) then
tmp = (y / t) * (z / t_1)
else if (y <= 2.5d+15) then
tmp = (x + ((y * z) / t)) / (a + 1.0d0)
else if ((y <= 2.15d+71) .or. (.not. (y <= 9.4d+108))) then
tmp = (z / b) + (t * ((x / b) / y))
else
tmp = (x + (y * (z / t))) / (a + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 + (a + (y * (b / t)));
double tmp;
if (y <= -1.6e+120) {
tmp = (x * ((t / y) + (z / x))) / b;
} else if (y <= -8.2e+25) {
tmp = x / t_1;
} else if (y <= -9.2e-41) {
tmp = (y / t) * (z / t_1);
} else if (y <= 2.5e+15) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else if ((y <= 2.15e+71) || !(y <= 9.4e+108)) {
tmp = (z / b) + (t * ((x / b) / y));
} else {
tmp = (x + (y * (z / t))) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = 1.0 + (a + (y * (b / t))) tmp = 0 if y <= -1.6e+120: tmp = (x * ((t / y) + (z / x))) / b elif y <= -8.2e+25: tmp = x / t_1 elif y <= -9.2e-41: tmp = (y / t) * (z / t_1) elif y <= 2.5e+15: tmp = (x + ((y * z) / t)) / (a + 1.0) elif (y <= 2.15e+71) or not (y <= 9.4e+108): tmp = (z / b) + (t * ((x / b) / y)) else: tmp = (x + (y * (z / t))) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(1.0 + Float64(a + Float64(y * Float64(b / t)))) tmp = 0.0 if (y <= -1.6e+120) tmp = Float64(Float64(x * Float64(Float64(t / y) + Float64(z / x))) / b); elseif (y <= -8.2e+25) tmp = Float64(x / t_1); elseif (y <= -9.2e-41) tmp = Float64(Float64(y / t) * Float64(z / t_1)); elseif (y <= 2.5e+15) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)); elseif ((y <= 2.15e+71) || !(y <= 9.4e+108)) tmp = Float64(Float64(z / b) + Float64(t * Float64(Float64(x / b) / y))); else tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = 1.0 + (a + (y * (b / t))); tmp = 0.0; if (y <= -1.6e+120) tmp = (x * ((t / y) + (z / x))) / b; elseif (y <= -8.2e+25) tmp = x / t_1; elseif (y <= -9.2e-41) tmp = (y / t) * (z / t_1); elseif (y <= 2.5e+15) tmp = (x + ((y * z) / t)) / (a + 1.0); elseif ((y <= 2.15e+71) || ~((y <= 9.4e+108))) tmp = (z / b) + (t * ((x / b) / y)); else tmp = (x + (y * (z / t))) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(1.0 + N[(a + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.6e+120], N[(N[(x * N[(N[(t / y), $MachinePrecision] + N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[y, -8.2e+25], N[(x / t$95$1), $MachinePrecision], If[LessEqual[y, -9.2e-41], N[(N[(y / t), $MachinePrecision] * N[(z / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.5e+15], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 2.15e+71], N[Not[LessEqual[y, 9.4e+108]], $MachinePrecision]], N[(N[(z / b), $MachinePrecision] + N[(t * N[(N[(x / b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 + \left(a + y \cdot \frac{b}{t}\right)\\
\mathbf{if}\;y \leq -1.6 \cdot 10^{+120}:\\
\;\;\;\;\frac{x \cdot \left(\frac{t}{y} + \frac{z}{x}\right)}{b}\\
\mathbf{elif}\;y \leq -8.2 \cdot 10^{+25}:\\
\;\;\;\;\frac{x}{t\_1}\\
\mathbf{elif}\;y \leq -9.2 \cdot 10^{-41}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{t\_1}\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{+15}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\mathbf{elif}\;y \leq 2.15 \cdot 10^{+71} \lor \neg \left(y \leq 9.4 \cdot 10^{+108}\right):\\
\;\;\;\;\frac{z}{b} + t \cdot \frac{\frac{x}{b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\
\end{array}
\end{array}
if y < -1.59999999999999991e120Initial program 48.8%
associate-/l*51.5%
associate-/l*62.8%
Simplified62.8%
Taylor expanded in x around inf 50.1%
associate-*l/51.4%
*-commutative51.4%
associate-/l*52.4%
*-commutative52.4%
associate-*l/54.7%
*-commutative54.7%
Simplified54.7%
Taylor expanded in y around inf 63.2%
associate-/r*74.6%
Simplified74.6%
Taylor expanded in b around inf 72.5%
if -1.59999999999999991e120 < y < -8.19999999999999933e25Initial program 88.4%
associate-/l*88.4%
associate-/l*94.1%
Simplified94.1%
Taylor expanded in x around inf 71.4%
associate-*l/77.1%
*-commutative77.1%
Simplified77.1%
if -8.19999999999999933e25 < y < -9.20000000000000041e-41Initial program 67.5%
associate-/l*67.9%
associate-/l*67.6%
Simplified67.6%
Taylor expanded in x around 0 67.5%
times-frac67.5%
associate-*l/67.5%
*-commutative67.5%
Simplified67.5%
if -9.20000000000000041e-41 < y < 2.5e15Initial program 99.3%
associate-/l*93.0%
associate-/l*90.3%
Simplified90.3%
Taylor expanded in b around 0 87.4%
if 2.5e15 < y < 2.14999999999999992e71 or 9.3999999999999991e108 < y Initial program 51.1%
associate-/l*55.7%
associate-/l*67.3%
Simplified67.3%
Taylor expanded in x around inf 52.5%
associate-*l/59.5%
*-commutative59.5%
associate-/l*58.6%
*-commutative58.6%
associate-*l/58.7%
*-commutative58.7%
Simplified58.7%
Taylor expanded in y around inf 69.3%
associate-/r*71.0%
Simplified71.0%
Taylor expanded in y around inf 62.7%
associate-/l*65.2%
associate-/r*71.7%
Simplified71.7%
if 2.14999999999999992e71 < y < 9.3999999999999991e108Initial program 83.1%
associate-/l*83.4%
associate-/l*92.2%
Simplified92.2%
Taylor expanded in y around 0 66.5%
Final simplification78.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -5.8e+117)
(* x (/ (+ (/ t y) (/ z x)) b))
(if (<= y 2.2e+15)
(/ x (+ 1.0 (+ a (* y (/ b t)))))
(if (or (<= y 1.3e+72) (not (<= y 2.9e+107)))
(+ (/ z b) (* t (/ (/ x b) y)))
(/ (+ x (/ y (/ t z))) a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -5.8e+117) {
tmp = x * (((t / y) + (z / x)) / b);
} else if (y <= 2.2e+15) {
tmp = x / (1.0 + (a + (y * (b / t))));
} else if ((y <= 1.3e+72) || !(y <= 2.9e+107)) {
tmp = (z / b) + (t * ((x / b) / y));
} else {
tmp = (x + (y / (t / z))) / 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 <= (-5.8d+117)) then
tmp = x * (((t / y) + (z / x)) / b)
else if (y <= 2.2d+15) then
tmp = x / (1.0d0 + (a + (y * (b / t))))
else if ((y <= 1.3d+72) .or. (.not. (y <= 2.9d+107))) then
tmp = (z / b) + (t * ((x / b) / y))
else
tmp = (x + (y / (t / z))) / 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 <= -5.8e+117) {
tmp = x * (((t / y) + (z / x)) / b);
} else if (y <= 2.2e+15) {
tmp = x / (1.0 + (a + (y * (b / t))));
} else if ((y <= 1.3e+72) || !(y <= 2.9e+107)) {
tmp = (z / b) + (t * ((x / b) / y));
} else {
tmp = (x + (y / (t / z))) / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -5.8e+117: tmp = x * (((t / y) + (z / x)) / b) elif y <= 2.2e+15: tmp = x / (1.0 + (a + (y * (b / t)))) elif (y <= 1.3e+72) or not (y <= 2.9e+107): tmp = (z / b) + (t * ((x / b) / y)) else: tmp = (x + (y / (t / z))) / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -5.8e+117) tmp = Float64(x * Float64(Float64(Float64(t / y) + Float64(z / x)) / b)); elseif (y <= 2.2e+15) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(y * Float64(b / t))))); elseif ((y <= 1.3e+72) || !(y <= 2.9e+107)) tmp = Float64(Float64(z / b) + Float64(t * Float64(Float64(x / b) / y))); else tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -5.8e+117) tmp = x * (((t / y) + (z / x)) / b); elseif (y <= 2.2e+15) tmp = x / (1.0 + (a + (y * (b / t)))); elseif ((y <= 1.3e+72) || ~((y <= 2.9e+107))) tmp = (z / b) + (t * ((x / b) / y)); else tmp = (x + (y / (t / z))) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -5.8e+117], N[(x * N[(N[(N[(t / y), $MachinePrecision] + N[(z / x), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.2e+15], N[(x / N[(1.0 + N[(a + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 1.3e+72], N[Not[LessEqual[y, 2.9e+107]], $MachinePrecision]], N[(N[(z / b), $MachinePrecision] + N[(t * N[(N[(x / b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.8 \cdot 10^{+117}:\\
\;\;\;\;x \cdot \frac{\frac{t}{y} + \frac{z}{x}}{b}\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{+15}:\\
\;\;\;\;\frac{x}{1 + \left(a + y \cdot \frac{b}{t}\right)}\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{+72} \lor \neg \left(y \leq 2.9 \cdot 10^{+107}\right):\\
\;\;\;\;\frac{z}{b} + t \cdot \frac{\frac{x}{b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a}\\
\end{array}
\end{array}
if y < -5.80000000000000055e117Initial program 48.8%
associate-/l*51.5%
associate-/l*62.8%
Simplified62.8%
Taylor expanded in x around inf 50.1%
associate-*l/51.4%
*-commutative51.4%
associate-/l*52.4%
*-commutative52.4%
associate-*l/54.7%
*-commutative54.7%
Simplified54.7%
Taylor expanded in y around inf 63.2%
associate-/r*74.6%
Simplified74.6%
Taylor expanded in b around inf 72.5%
associate-/l*69.1%
Simplified69.1%
if -5.80000000000000055e117 < y < 2.2e15Initial program 95.2%
associate-/l*90.2%
associate-/l*88.8%
Simplified88.8%
Taylor expanded in x around inf 71.5%
associate-*l/70.1%
*-commutative70.1%
Simplified70.1%
if 2.2e15 < y < 1.29999999999999991e72 or 2.89999999999999988e107 < y Initial program 51.1%
associate-/l*55.7%
associate-/l*67.3%
Simplified67.3%
Taylor expanded in x around inf 52.5%
associate-*l/59.5%
*-commutative59.5%
associate-/l*58.6%
*-commutative58.6%
associate-*l/58.7%
*-commutative58.7%
Simplified58.7%
Taylor expanded in y around inf 69.3%
associate-/r*71.0%
Simplified71.0%
Taylor expanded in y around inf 62.7%
associate-/l*65.2%
associate-/r*71.7%
Simplified71.7%
if 1.29999999999999991e72 < y < 2.89999999999999988e107Initial program 83.1%
associate-/l*83.4%
associate-/l*92.2%
Simplified92.2%
clear-num92.3%
un-div-inv92.2%
Applied egg-rr92.2%
Taylor expanded in a around inf 66.5%
Final simplification70.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -4.9e+115)
(* x (/ (+ (/ t y) (/ z x)) b))
(if (<= y 3.4e+17)
(/ x (+ 1.0 (+ a (/ (* y b) t))))
(if (or (<= y 3.8e+71) (not (<= y 2.9e+107)))
(+ (/ z b) (* t (/ (/ x b) y)))
(/ (+ x (/ y (/ t z))) a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -4.9e+115) {
tmp = x * (((t / y) + (z / x)) / b);
} else if (y <= 3.4e+17) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else if ((y <= 3.8e+71) || !(y <= 2.9e+107)) {
tmp = (z / b) + (t * ((x / b) / y));
} else {
tmp = (x + (y / (t / z))) / 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 <= (-4.9d+115)) then
tmp = x * (((t / y) + (z / x)) / b)
else if (y <= 3.4d+17) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
else if ((y <= 3.8d+71) .or. (.not. (y <= 2.9d+107))) then
tmp = (z / b) + (t * ((x / b) / y))
else
tmp = (x + (y / (t / z))) / 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 <= -4.9e+115) {
tmp = x * (((t / y) + (z / x)) / b);
} else if (y <= 3.4e+17) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else if ((y <= 3.8e+71) || !(y <= 2.9e+107)) {
tmp = (z / b) + (t * ((x / b) / y));
} else {
tmp = (x + (y / (t / z))) / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -4.9e+115: tmp = x * (((t / y) + (z / x)) / b) elif y <= 3.4e+17: tmp = x / (1.0 + (a + ((y * b) / t))) elif (y <= 3.8e+71) or not (y <= 2.9e+107): tmp = (z / b) + (t * ((x / b) / y)) else: tmp = (x + (y / (t / z))) / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -4.9e+115) tmp = Float64(x * Float64(Float64(Float64(t / y) + Float64(z / x)) / b)); elseif (y <= 3.4e+17) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); elseif ((y <= 3.8e+71) || !(y <= 2.9e+107)) tmp = Float64(Float64(z / b) + Float64(t * Float64(Float64(x / b) / y))); else tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -4.9e+115) tmp = x * (((t / y) + (z / x)) / b); elseif (y <= 3.4e+17) tmp = x / (1.0 + (a + ((y * b) / t))); elseif ((y <= 3.8e+71) || ~((y <= 2.9e+107))) tmp = (z / b) + (t * ((x / b) / y)); else tmp = (x + (y / (t / z))) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -4.9e+115], N[(x * N[(N[(N[(t / y), $MachinePrecision] + N[(z / x), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.4e+17], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 3.8e+71], N[Not[LessEqual[y, 2.9e+107]], $MachinePrecision]], N[(N[(z / b), $MachinePrecision] + N[(t * N[(N[(x / b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.9 \cdot 10^{+115}:\\
\;\;\;\;x \cdot \frac{\frac{t}{y} + \frac{z}{x}}{b}\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{+17}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{+71} \lor \neg \left(y \leq 2.9 \cdot 10^{+107}\right):\\
\;\;\;\;\frac{z}{b} + t \cdot \frac{\frac{x}{b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a}\\
\end{array}
\end{array}
if y < -4.89999999999999964e115Initial program 48.8%
associate-/l*51.5%
associate-/l*62.8%
Simplified62.8%
Taylor expanded in x around inf 50.1%
associate-*l/51.4%
*-commutative51.4%
associate-/l*52.4%
*-commutative52.4%
associate-*l/54.7%
*-commutative54.7%
Simplified54.7%
Taylor expanded in y around inf 63.2%
associate-/r*74.6%
Simplified74.6%
Taylor expanded in b around inf 72.5%
associate-/l*69.1%
Simplified69.1%
if -4.89999999999999964e115 < y < 3.4e17Initial program 95.2%
associate-/l*90.2%
associate-/l*88.8%
Simplified88.8%
Taylor expanded in x around inf 71.5%
if 3.4e17 < y < 3.8000000000000001e71 or 2.89999999999999988e107 < y Initial program 51.1%
associate-/l*55.7%
associate-/l*67.3%
Simplified67.3%
Taylor expanded in x around inf 52.5%
associate-*l/59.5%
*-commutative59.5%
associate-/l*58.6%
*-commutative58.6%
associate-*l/58.7%
*-commutative58.7%
Simplified58.7%
Taylor expanded in y around inf 69.3%
associate-/r*71.0%
Simplified71.0%
Taylor expanded in y around inf 62.7%
associate-/l*65.2%
associate-/r*71.7%
Simplified71.7%
if 3.8000000000000001e71 < y < 2.89999999999999988e107Initial program 83.1%
associate-/l*83.4%
associate-/l*92.2%
Simplified92.2%
clear-num92.3%
un-div-inv92.2%
Applied egg-rr92.2%
Taylor expanded in a around inf 66.5%
Final simplification70.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -5.8e+113)
(/ (* x (+ (/ t y) (/ z x))) b)
(if (<= y 6.5e+16)
(/ x (+ 1.0 (+ a (/ (* y b) t))))
(if (or (<= y 2.2e+72) (not (<= y 2.9e+107)))
(+ (/ z b) (* t (/ (/ x b) y)))
(/ (+ x (/ y (/ t z))) a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -5.8e+113) {
tmp = (x * ((t / y) + (z / x))) / b;
} else if (y <= 6.5e+16) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else if ((y <= 2.2e+72) || !(y <= 2.9e+107)) {
tmp = (z / b) + (t * ((x / b) / y));
} else {
tmp = (x + (y / (t / z))) / 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 <= (-5.8d+113)) then
tmp = (x * ((t / y) + (z / x))) / b
else if (y <= 6.5d+16) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
else if ((y <= 2.2d+72) .or. (.not. (y <= 2.9d+107))) then
tmp = (z / b) + (t * ((x / b) / y))
else
tmp = (x + (y / (t / z))) / 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 <= -5.8e+113) {
tmp = (x * ((t / y) + (z / x))) / b;
} else if (y <= 6.5e+16) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else if ((y <= 2.2e+72) || !(y <= 2.9e+107)) {
tmp = (z / b) + (t * ((x / b) / y));
} else {
tmp = (x + (y / (t / z))) / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -5.8e+113: tmp = (x * ((t / y) + (z / x))) / b elif y <= 6.5e+16: tmp = x / (1.0 + (a + ((y * b) / t))) elif (y <= 2.2e+72) or not (y <= 2.9e+107): tmp = (z / b) + (t * ((x / b) / y)) else: tmp = (x + (y / (t / z))) / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -5.8e+113) tmp = Float64(Float64(x * Float64(Float64(t / y) + Float64(z / x))) / b); elseif (y <= 6.5e+16) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); elseif ((y <= 2.2e+72) || !(y <= 2.9e+107)) tmp = Float64(Float64(z / b) + Float64(t * Float64(Float64(x / b) / y))); else tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -5.8e+113) tmp = (x * ((t / y) + (z / x))) / b; elseif (y <= 6.5e+16) tmp = x / (1.0 + (a + ((y * b) / t))); elseif ((y <= 2.2e+72) || ~((y <= 2.9e+107))) tmp = (z / b) + (t * ((x / b) / y)); else tmp = (x + (y / (t / z))) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -5.8e+113], N[(N[(x * N[(N[(t / y), $MachinePrecision] + N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[y, 6.5e+16], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 2.2e+72], N[Not[LessEqual[y, 2.9e+107]], $MachinePrecision]], N[(N[(z / b), $MachinePrecision] + N[(t * N[(N[(x / b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.8 \cdot 10^{+113}:\\
\;\;\;\;\frac{x \cdot \left(\frac{t}{y} + \frac{z}{x}\right)}{b}\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{+16}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{+72} \lor \neg \left(y \leq 2.9 \cdot 10^{+107}\right):\\
\;\;\;\;\frac{z}{b} + t \cdot \frac{\frac{x}{b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a}\\
\end{array}
\end{array}
if y < -5.79999999999999968e113Initial program 48.8%
associate-/l*51.5%
associate-/l*62.8%
Simplified62.8%
Taylor expanded in x around inf 50.1%
associate-*l/51.4%
*-commutative51.4%
associate-/l*52.4%
*-commutative52.4%
associate-*l/54.7%
*-commutative54.7%
Simplified54.7%
Taylor expanded in y around inf 63.2%
associate-/r*74.6%
Simplified74.6%
Taylor expanded in b around inf 72.5%
if -5.79999999999999968e113 < y < 6.5e16Initial program 95.2%
associate-/l*90.2%
associate-/l*88.8%
Simplified88.8%
Taylor expanded in x around inf 71.5%
if 6.5e16 < y < 2.2e72 or 2.89999999999999988e107 < y Initial program 51.1%
associate-/l*55.7%
associate-/l*67.3%
Simplified67.3%
Taylor expanded in x around inf 52.5%
associate-*l/59.5%
*-commutative59.5%
associate-/l*58.6%
*-commutative58.6%
associate-*l/58.7%
*-commutative58.7%
Simplified58.7%
Taylor expanded in y around inf 69.3%
associate-/r*71.0%
Simplified71.0%
Taylor expanded in y around inf 62.7%
associate-/l*65.2%
associate-/r*71.7%
Simplified71.7%
if 2.2e72 < y < 2.89999999999999988e107Initial program 83.1%
associate-/l*83.4%
associate-/l*92.2%
Simplified92.2%
clear-num92.3%
un-div-inv92.2%
Applied egg-rr92.2%
Taylor expanded in a around inf 66.5%
Final simplification71.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -1.55e+59)
(/ (* x (+ (/ t y) (/ z x))) b)
(if (or (<= y 4.7e+17) (and (not (<= y 2.4e+72)) (<= y 7.5e+110)))
(/ (+ x (* y (/ z 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 (y <= -1.55e+59) {
tmp = (x * ((t / y) + (z / x))) / b;
} else if ((y <= 4.7e+17) || (!(y <= 2.4e+72) && (y <= 7.5e+110))) {
tmp = (x + (y * (z / 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 (y <= (-1.55d+59)) then
tmp = (x * ((t / y) + (z / x))) / b
else if ((y <= 4.7d+17) .or. (.not. (y <= 2.4d+72)) .and. (y <= 7.5d+110)) then
tmp = (x + (y * (z / 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 (y <= -1.55e+59) {
tmp = (x * ((t / y) + (z / x))) / b;
} else if ((y <= 4.7e+17) || (!(y <= 2.4e+72) && (y <= 7.5e+110))) {
tmp = (x + (y * (z / 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 y <= -1.55e+59: tmp = (x * ((t / y) + (z / x))) / b elif (y <= 4.7e+17) or (not (y <= 2.4e+72) and (y <= 7.5e+110)): tmp = (x + (y * (z / 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 (y <= -1.55e+59) tmp = Float64(Float64(x * Float64(Float64(t / y) + Float64(z / x))) / b); elseif ((y <= 4.7e+17) || (!(y <= 2.4e+72) && (y <= 7.5e+110))) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0)); else tmp = Float64(Float64(z / b) + Float64(t * Float64(Float64(x / b) / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.55e+59) tmp = (x * ((t / y) + (z / x))) / b; elseif ((y <= 4.7e+17) || (~((y <= 2.4e+72)) && (y <= 7.5e+110))) tmp = (x + (y * (z / 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[y, -1.55e+59], N[(N[(x * N[(N[(t / y), $MachinePrecision] + N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[Or[LessEqual[y, 4.7e+17], And[N[Not[LessEqual[y, 2.4e+72]], $MachinePrecision], LessEqual[y, 7.5e+110]]], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(z / b), $MachinePrecision] + N[(t * N[(N[(x / b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.55 \cdot 10^{+59}:\\
\;\;\;\;\frac{x \cdot \left(\frac{t}{y} + \frac{z}{x}\right)}{b}\\
\mathbf{elif}\;y \leq 4.7 \cdot 10^{+17} \lor \neg \left(y \leq 2.4 \cdot 10^{+72}\right) \land y \leq 7.5 \cdot 10^{+110}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + t \cdot \frac{\frac{x}{b}}{y}\\
\end{array}
\end{array}
if y < -1.55000000000000007e59Initial program 58.7%
associate-/l*60.8%
associate-/l*70.0%
Simplified70.0%
Taylor expanded in x around inf 57.9%
associate-*l/58.9%
*-commutative58.9%
associate-/l*59.7%
*-commutative59.7%
associate-*l/61.6%
*-commutative61.6%
Simplified61.6%
Taylor expanded in y around inf 62.9%
associate-/r*72.1%
Simplified72.1%
Taylor expanded in b around inf 69.1%
if -1.55000000000000007e59 < y < 4.7e17 or 2.4000000000000001e72 < y < 7.5e110Initial program 93.9%
associate-/l*89.0%
associate-/l*88.3%
Simplified88.3%
Taylor expanded in y around 0 78.2%
if 4.7e17 < y < 2.4000000000000001e72 or 7.5e110 < y Initial program 51.1%
associate-/l*55.7%
associate-/l*67.3%
Simplified67.3%
Taylor expanded in x around inf 52.5%
associate-*l/59.5%
*-commutative59.5%
associate-/l*58.6%
*-commutative58.6%
associate-*l/58.7%
*-commutative58.7%
Simplified58.7%
Taylor expanded in y around inf 69.3%
associate-/r*71.0%
Simplified71.0%
Taylor expanded in y around inf 62.7%
associate-/l*65.2%
associate-/r*71.7%
Simplified71.7%
Final simplification74.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -1.6e+59)
(/ (* x (+ (/ t y) (/ z x))) b)
(if (<= y 4.4e+17)
(/ (+ x (* z (/ y t))) (+ a 1.0))
(if (or (<= y 1.8e+72) (not (<= y 3.2e+107)))
(+ (/ z b) (* t (/ (/ x b) y)))
(/ (+ x (* y (/ z t))) (+ a 1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.6e+59) {
tmp = (x * ((t / y) + (z / x))) / b;
} else if (y <= 4.4e+17) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else if ((y <= 1.8e+72) || !(y <= 3.2e+107)) {
tmp = (z / b) + (t * ((x / b) / y));
} else {
tmp = (x + (y * (z / t))) / (a + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-1.6d+59)) then
tmp = (x * ((t / y) + (z / x))) / b
else if (y <= 4.4d+17) then
tmp = (x + (z * (y / t))) / (a + 1.0d0)
else if ((y <= 1.8d+72) .or. (.not. (y <= 3.2d+107))) then
tmp = (z / b) + (t * ((x / b) / y))
else
tmp = (x + (y * (z / t))) / (a + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.6e+59) {
tmp = (x * ((t / y) + (z / x))) / b;
} else if (y <= 4.4e+17) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else if ((y <= 1.8e+72) || !(y <= 3.2e+107)) {
tmp = (z / b) + (t * ((x / b) / y));
} else {
tmp = (x + (y * (z / t))) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.6e+59: tmp = (x * ((t / y) + (z / x))) / b elif y <= 4.4e+17: tmp = (x + (z * (y / t))) / (a + 1.0) elif (y <= 1.8e+72) or not (y <= 3.2e+107): tmp = (z / b) + (t * ((x / b) / y)) else: tmp = (x + (y * (z / t))) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.6e+59) tmp = Float64(Float64(x * Float64(Float64(t / y) + Float64(z / x))) / b); elseif (y <= 4.4e+17) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0)); elseif ((y <= 1.8e+72) || !(y <= 3.2e+107)) tmp = Float64(Float64(z / b) + Float64(t * Float64(Float64(x / b) / y))); else tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.6e+59) tmp = (x * ((t / y) + (z / x))) / b; elseif (y <= 4.4e+17) tmp = (x + (z * (y / t))) / (a + 1.0); elseif ((y <= 1.8e+72) || ~((y <= 3.2e+107))) tmp = (z / b) + (t * ((x / b) / y)); else tmp = (x + (y * (z / t))) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.6e+59], N[(N[(x * N[(N[(t / y), $MachinePrecision] + N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[y, 4.4e+17], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 1.8e+72], N[Not[LessEqual[y, 3.2e+107]], $MachinePrecision]], N[(N[(z / b), $MachinePrecision] + N[(t * N[(N[(x / b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.6 \cdot 10^{+59}:\\
\;\;\;\;\frac{x \cdot \left(\frac{t}{y} + \frac{z}{x}\right)}{b}\\
\mathbf{elif}\;y \leq 4.4 \cdot 10^{+17}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{+72} \lor \neg \left(y \leq 3.2 \cdot 10^{+107}\right):\\
\;\;\;\;\frac{z}{b} + t \cdot \frac{\frac{x}{b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\
\end{array}
\end{array}
if y < -1.59999999999999991e59Initial program 58.7%
associate-/l*60.8%
associate-/l*70.0%
Simplified70.0%
Taylor expanded in x around inf 57.9%
associate-*l/58.9%
*-commutative58.9%
associate-/l*59.7%
*-commutative59.7%
associate-*l/61.6%
*-commutative61.6%
Simplified61.6%
Taylor expanded in y around inf 62.9%
associate-/r*72.1%
Simplified72.1%
Taylor expanded in b around inf 69.1%
if -1.59999999999999991e59 < y < 4.4e17Initial program 94.8%
associate-/l*89.5%
associate-/l*88.0%
Simplified88.0%
clear-num87.9%
un-div-inv89.0%
Applied egg-rr89.0%
associate-/r/90.0%
Applied egg-rr90.0%
Taylor expanded in y around 0 79.8%
if 4.4e17 < y < 1.80000000000000017e72 or 3.20000000000000029e107 < y Initial program 51.1%
associate-/l*55.7%
associate-/l*67.3%
Simplified67.3%
Taylor expanded in x around inf 52.5%
associate-*l/59.5%
*-commutative59.5%
associate-/l*58.6%
*-commutative58.6%
associate-*l/58.7%
*-commutative58.7%
Simplified58.7%
Taylor expanded in y around inf 69.3%
associate-/r*71.0%
Simplified71.0%
Taylor expanded in y around inf 62.7%
associate-/l*65.2%
associate-/r*71.7%
Simplified71.7%
if 1.80000000000000017e72 < y < 3.20000000000000029e107Initial program 83.1%
associate-/l*83.4%
associate-/l*92.2%
Simplified92.2%
Taylor expanded in y around 0 66.5%
Final simplification75.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -1.4e+59)
(/ (* x (+ (/ t y) (/ z x))) b)
(if (<= y 2.3e+16)
(/ (+ x (/ (* y z) t)) (+ a 1.0))
(if (or (<= y 5e+70) (not (<= y 4.6e+111)))
(+ (/ z b) (* t (/ (/ x b) y)))
(/ (+ x (* y (/ z t))) (+ a 1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.4e+59) {
tmp = (x * ((t / y) + (z / x))) / b;
} else if (y <= 2.3e+16) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else if ((y <= 5e+70) || !(y <= 4.6e+111)) {
tmp = (z / b) + (t * ((x / b) / y));
} else {
tmp = (x + (y * (z / t))) / (a + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-1.4d+59)) then
tmp = (x * ((t / y) + (z / x))) / b
else if (y <= 2.3d+16) then
tmp = (x + ((y * z) / t)) / (a + 1.0d0)
else if ((y <= 5d+70) .or. (.not. (y <= 4.6d+111))) then
tmp = (z / b) + (t * ((x / b) / y))
else
tmp = (x + (y * (z / t))) / (a + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.4e+59) {
tmp = (x * ((t / y) + (z / x))) / b;
} else if (y <= 2.3e+16) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else if ((y <= 5e+70) || !(y <= 4.6e+111)) {
tmp = (z / b) + (t * ((x / b) / y));
} else {
tmp = (x + (y * (z / t))) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.4e+59: tmp = (x * ((t / y) + (z / x))) / b elif y <= 2.3e+16: tmp = (x + ((y * z) / t)) / (a + 1.0) elif (y <= 5e+70) or not (y <= 4.6e+111): tmp = (z / b) + (t * ((x / b) / y)) else: tmp = (x + (y * (z / t))) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.4e+59) tmp = Float64(Float64(x * Float64(Float64(t / y) + Float64(z / x))) / b); elseif (y <= 2.3e+16) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)); elseif ((y <= 5e+70) || !(y <= 4.6e+111)) tmp = Float64(Float64(z / b) + Float64(t * Float64(Float64(x / b) / y))); else tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.4e+59) tmp = (x * ((t / y) + (z / x))) / b; elseif (y <= 2.3e+16) tmp = (x + ((y * z) / t)) / (a + 1.0); elseif ((y <= 5e+70) || ~((y <= 4.6e+111))) tmp = (z / b) + (t * ((x / b) / y)); else tmp = (x + (y * (z / t))) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.4e+59], N[(N[(x * N[(N[(t / y), $MachinePrecision] + N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[y, 2.3e+16], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 5e+70], N[Not[LessEqual[y, 4.6e+111]], $MachinePrecision]], N[(N[(z / b), $MachinePrecision] + N[(t * N[(N[(x / b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{+59}:\\
\;\;\;\;\frac{x \cdot \left(\frac{t}{y} + \frac{z}{x}\right)}{b}\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{+16}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\mathbf{elif}\;y \leq 5 \cdot 10^{+70} \lor \neg \left(y \leq 4.6 \cdot 10^{+111}\right):\\
\;\;\;\;\frac{z}{b} + t \cdot \frac{\frac{x}{b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\
\end{array}
\end{array}
if y < -1.3999999999999999e59Initial program 58.7%
associate-/l*60.8%
associate-/l*70.0%
Simplified70.0%
Taylor expanded in x around inf 57.9%
associate-*l/58.9%
*-commutative58.9%
associate-/l*59.7%
*-commutative59.7%
associate-*l/61.6%
*-commutative61.6%
Simplified61.6%
Taylor expanded in y around inf 62.9%
associate-/r*72.1%
Simplified72.1%
Taylor expanded in b around inf 69.1%
if -1.3999999999999999e59 < y < 2.3e16Initial program 94.8%
associate-/l*89.5%
associate-/l*88.0%
Simplified88.0%
Taylor expanded in b around 0 82.2%
if 2.3e16 < y < 5.0000000000000002e70 or 4.60000000000000004e111 < y Initial program 51.1%
associate-/l*55.7%
associate-/l*67.3%
Simplified67.3%
Taylor expanded in x around inf 52.5%
associate-*l/59.5%
*-commutative59.5%
associate-/l*58.6%
*-commutative58.6%
associate-*l/58.7%
*-commutative58.7%
Simplified58.7%
Taylor expanded in y around inf 69.3%
associate-/r*71.0%
Simplified71.0%
Taylor expanded in y around inf 62.7%
associate-/l*65.2%
associate-/r*71.7%
Simplified71.7%
if 5.0000000000000002e70 < y < 4.60000000000000004e111Initial program 83.1%
associate-/l*83.4%
associate-/l*92.2%
Simplified92.2%
Taylor expanded in y around 0 66.5%
Final simplification76.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -5.1e-244) (not (<= t 1.45e-205))) (/ (+ x (* y (/ z t))) (+ (* y (/ b 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 ((t <= -5.1e-244) || !(t <= 1.45e-205)) {
tmp = (x + (y * (z / t))) / ((y * (b / 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 ((t <= (-5.1d-244)) .or. (.not. (t <= 1.45d-205))) then
tmp = (x + (y * (z / t))) / ((y * (b / 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 ((t <= -5.1e-244) || !(t <= 1.45e-205)) {
tmp = (x + (y * (z / t))) / ((y * (b / 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 (t <= -5.1e-244) or not (t <= 1.45e-205): tmp = (x + (y * (z / t))) / ((y * (b / 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 ((t <= -5.1e-244) || !(t <= 1.45e-205)) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(y * Float64(b / t)) + Float64(a + 1.0))); else tmp = Float64(Float64(z / b) + Float64(t * Float64(Float64(x / b) / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -5.1e-244) || ~((t <= 1.45e-205))) tmp = (x + (y * (z / t))) / ((y * (b / 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[Or[LessEqual[t, -5.1e-244], N[Not[LessEqual[t, 1.45e-205]], $MachinePrecision]], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z / b), $MachinePrecision] + N[(t * N[(N[(x / b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.1 \cdot 10^{-244} \lor \neg \left(t \leq 1.45 \cdot 10^{-205}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{y \cdot \frac{b}{t} + \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + t \cdot \frac{\frac{x}{b}}{y}\\
\end{array}
\end{array}
if t < -5.09999999999999981e-244 or 1.45000000000000009e-205 < t Initial program 79.5%
associate-/l*79.6%
associate-/l*85.3%
Simplified85.3%
if -5.09999999999999981e-244 < t < 1.45000000000000009e-205Initial program 43.7%
associate-/l*32.6%
associate-/l*25.2%
Simplified25.2%
Taylor expanded in x around inf 44.0%
associate-*l/36.9%
*-commutative36.9%
associate-/l*35.9%
*-commutative35.9%
associate-*l/32.3%
*-commutative32.3%
Simplified32.3%
Taylor expanded in y around inf 72.5%
associate-/r*80.0%
Simplified80.0%
Taylor expanded in y around inf 85.0%
associate-/l*85.1%
associate-/r*85.1%
Simplified85.1%
Final simplification85.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* y (/ b t)) (+ a 1.0))))
(if (<= t -3.7e-244)
(/ (+ x (* y (/ z t))) t_1)
(if (<= t 2.1e-206)
(+ (/ z b) (* t (/ (/ x b) y)))
(/ (+ x (* z (/ y t))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * (b / t)) + (a + 1.0);
double tmp;
if (t <= -3.7e-244) {
tmp = (x + (y * (z / t))) / t_1;
} else if (t <= 2.1e-206) {
tmp = (z / b) + (t * ((x / b) / y));
} else {
tmp = (x + (z * (y / t))) / t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (y * (b / t)) + (a + 1.0d0)
if (t <= (-3.7d-244)) then
tmp = (x + (y * (z / t))) / t_1
else if (t <= 2.1d-206) then
tmp = (z / b) + (t * ((x / b) / y))
else
tmp = (x + (z * (y / t))) / t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * (b / t)) + (a + 1.0);
double tmp;
if (t <= -3.7e-244) {
tmp = (x + (y * (z / t))) / t_1;
} else if (t <= 2.1e-206) {
tmp = (z / b) + (t * ((x / b) / y));
} else {
tmp = (x + (z * (y / t))) / t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * (b / t)) + (a + 1.0) tmp = 0 if t <= -3.7e-244: tmp = (x + (y * (z / t))) / t_1 elif t <= 2.1e-206: tmp = (z / b) + (t * ((x / b) / y)) else: tmp = (x + (z * (y / t))) / t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * Float64(b / t)) + Float64(a + 1.0)) tmp = 0.0 if (t <= -3.7e-244) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / t_1); elseif (t <= 2.1e-206) tmp = Float64(Float64(z / b) + Float64(t * Float64(Float64(x / b) / y))); else tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y * (b / t)) + (a + 1.0); tmp = 0.0; if (t <= -3.7e-244) tmp = (x + (y * (z / t))) / t_1; elseif (t <= 2.1e-206) tmp = (z / b) + (t * ((x / b) / y)); else tmp = (x + (z * (y / t))) / t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.7e-244], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t, 2.1e-206], N[(N[(z / b), $MachinePrecision] + N[(t * N[(N[(x / b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{b}{t} + \left(a + 1\right)\\
\mathbf{if}\;t \leq -3.7 \cdot 10^{-244}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{t\_1}\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{-206}:\\
\;\;\;\;\frac{z}{b} + t \cdot \frac{\frac{x}{b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{t\_1}\\
\end{array}
\end{array}
if t < -3.7000000000000002e-244Initial program 82.8%
associate-/l*85.1%
associate-/l*89.2%
Simplified89.2%
if -3.7000000000000002e-244 < t < 2.1000000000000001e-206Initial program 43.7%
associate-/l*32.6%
associate-/l*25.2%
Simplified25.2%
Taylor expanded in x around inf 44.0%
associate-*l/36.9%
*-commutative36.9%
associate-/l*35.9%
*-commutative35.9%
associate-*l/32.3%
*-commutative32.3%
Simplified32.3%
Taylor expanded in y around inf 72.5%
associate-/r*80.0%
Simplified80.0%
Taylor expanded in y around inf 85.0%
associate-/l*85.1%
associate-/r*85.1%
Simplified85.1%
if 2.1000000000000001e-206 < t Initial program 76.1%
associate-/l*73.8%
associate-/l*81.3%
Simplified81.3%
clear-num81.3%
un-div-inv81.3%
Applied egg-rr81.3%
associate-/r/82.4%
Applied egg-rr82.4%
Final simplification85.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* y (/ b t)) (+ a 1.0))))
(if (<= t -5.1e-244)
(/ (+ x (/ y (/ t z))) t_1)
(if (<= t 1.95e-205)
(+ (/ z b) (* t (/ (/ x b) y)))
(/ (+ x (* z (/ y t))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * (b / t)) + (a + 1.0);
double tmp;
if (t <= -5.1e-244) {
tmp = (x + (y / (t / z))) / t_1;
} else if (t <= 1.95e-205) {
tmp = (z / b) + (t * ((x / b) / y));
} else {
tmp = (x + (z * (y / t))) / t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (y * (b / t)) + (a + 1.0d0)
if (t <= (-5.1d-244)) then
tmp = (x + (y / (t / z))) / t_1
else if (t <= 1.95d-205) then
tmp = (z / b) + (t * ((x / b) / y))
else
tmp = (x + (z * (y / t))) / t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * (b / t)) + (a + 1.0);
double tmp;
if (t <= -5.1e-244) {
tmp = (x + (y / (t / z))) / t_1;
} else if (t <= 1.95e-205) {
tmp = (z / b) + (t * ((x / b) / y));
} else {
tmp = (x + (z * (y / t))) / t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * (b / t)) + (a + 1.0) tmp = 0 if t <= -5.1e-244: tmp = (x + (y / (t / z))) / t_1 elif t <= 1.95e-205: tmp = (z / b) + (t * ((x / b) / y)) else: tmp = (x + (z * (y / t))) / t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * Float64(b / t)) + Float64(a + 1.0)) tmp = 0.0 if (t <= -5.1e-244) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / t_1); elseif (t <= 1.95e-205) tmp = Float64(Float64(z / b) + Float64(t * Float64(Float64(x / b) / y))); else tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y * (b / t)) + (a + 1.0); tmp = 0.0; if (t <= -5.1e-244) tmp = (x + (y / (t / z))) / t_1; elseif (t <= 1.95e-205) tmp = (z / b) + (t * ((x / b) / y)); else tmp = (x + (z * (y / t))) / t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.1e-244], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t, 1.95e-205], N[(N[(z / b), $MachinePrecision] + N[(t * N[(N[(x / b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{b}{t} + \left(a + 1\right)\\
\mathbf{if}\;t \leq -5.1 \cdot 10^{-244}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{t\_1}\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{-205}:\\
\;\;\;\;\frac{z}{b} + t \cdot \frac{\frac{x}{b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{t\_1}\\
\end{array}
\end{array}
if t < -5.09999999999999981e-244Initial program 82.8%
associate-/l*85.1%
associate-/l*89.2%
Simplified89.2%
clear-num89.2%
un-div-inv89.6%
Applied egg-rr89.6%
if -5.09999999999999981e-244 < t < 1.95000000000000009e-205Initial program 43.7%
associate-/l*32.6%
associate-/l*25.2%
Simplified25.2%
Taylor expanded in x around inf 44.0%
associate-*l/36.9%
*-commutative36.9%
associate-/l*35.9%
*-commutative35.9%
associate-*l/32.3%
*-commutative32.3%
Simplified32.3%
Taylor expanded in y around inf 72.5%
associate-/r*80.0%
Simplified80.0%
Taylor expanded in y around inf 85.0%
associate-/l*85.1%
associate-/r*85.1%
Simplified85.1%
if 1.95000000000000009e-205 < t Initial program 76.1%
associate-/l*73.8%
associate-/l*81.3%
Simplified81.3%
clear-num81.3%
un-div-inv81.3%
Applied egg-rr81.3%
associate-/r/82.4%
Applied egg-rr82.4%
Final simplification86.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= a -2.1e+83)
(/ x a)
(if (<= a -1.6e-235)
(/ z b)
(if (<= a 3e-153) x (if (<= a 1.2e+217) (/ z b) (/ x a))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -2.1e+83) {
tmp = x / a;
} else if (a <= -1.6e-235) {
tmp = z / b;
} else if (a <= 3e-153) {
tmp = x;
} else if (a <= 1.2e+217) {
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 <= (-2.1d+83)) then
tmp = x / a
else if (a <= (-1.6d-235)) then
tmp = z / b
else if (a <= 3d-153) then
tmp = x
else if (a <= 1.2d+217) 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 <= -2.1e+83) {
tmp = x / a;
} else if (a <= -1.6e-235) {
tmp = z / b;
} else if (a <= 3e-153) {
tmp = x;
} else if (a <= 1.2e+217) {
tmp = z / b;
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -2.1e+83: tmp = x / a elif a <= -1.6e-235: tmp = z / b elif a <= 3e-153: tmp = x elif a <= 1.2e+217: tmp = z / b else: tmp = x / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -2.1e+83) tmp = Float64(x / a); elseif (a <= -1.6e-235) tmp = Float64(z / b); elseif (a <= 3e-153) tmp = x; elseif (a <= 1.2e+217) 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 <= -2.1e+83) tmp = x / a; elseif (a <= -1.6e-235) tmp = z / b; elseif (a <= 3e-153) tmp = x; elseif (a <= 1.2e+217) tmp = z / b; else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -2.1e+83], N[(x / a), $MachinePrecision], If[LessEqual[a, -1.6e-235], N[(z / b), $MachinePrecision], If[LessEqual[a, 3e-153], x, If[LessEqual[a, 1.2e+217], N[(z / b), $MachinePrecision], N[(x / a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.1 \cdot 10^{+83}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;a \leq -1.6 \cdot 10^{-235}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 3 \cdot 10^{-153}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.2 \cdot 10^{+217}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if a < -2.10000000000000002e83 or 1.1999999999999999e217 < a Initial program 79.6%
associate-/l*79.8%
associate-/l*85.6%
Simplified85.6%
Taylor expanded in x around inf 61.7%
Taylor expanded in a around inf 59.8%
if -2.10000000000000002e83 < a < -1.6000000000000001e-235 or 3e-153 < a < 1.1999999999999999e217Initial program 71.5%
associate-/l*69.5%
associate-/l*74.0%
Simplified74.0%
Taylor expanded in y around inf 42.9%
if -1.6000000000000001e-235 < a < 3e-153Initial program 84.5%
associate-/l*84.7%
associate-/l*86.9%
Simplified86.9%
Taylor expanded in a around 0 84.7%
associate-*l/86.9%
*-commutative86.9%
Simplified86.9%
Taylor expanded in y around 0 52.5%
Final simplification49.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.62e+111) (not (<= y 4.7e+17))) (/ 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.62e+111) || !(y <= 4.7e+17)) {
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.62d+111)) .or. (.not. (y <= 4.7d+17))) 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.62e+111) || !(y <= 4.7e+17)) {
tmp = z / b;
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.62e+111) or not (y <= 4.7e+17): 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.62e+111) || !(y <= 4.7e+17)) 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.62e+111) || ~((y <= 4.7e+17))) tmp = z / b; else tmp = x / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.62e+111], N[Not[LessEqual[y, 4.7e+17]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.62 \cdot 10^{+111} \lor \neg \left(y \leq 4.7 \cdot 10^{+17}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a + 1}\\
\end{array}
\end{array}
if y < -1.61999999999999999e111 or 4.7e17 < y Initial program 53.3%
associate-/l*56.8%
associate-/l*68.0%
Simplified68.0%
Taylor expanded in y around inf 57.0%
if -1.61999999999999999e111 < y < 4.7e17Initial program 95.2%
associate-/l*90.2%
associate-/l*88.8%
Simplified88.8%
Taylor expanded in y around 0 63.9%
Final simplification60.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -1.0) (not (<= a 1.0))) (/ x a) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.0) || !(a <= 1.0)) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-1.0d0)) .or. (.not. (a <= 1.0d0))) then
tmp = x / a
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.0) || !(a <= 1.0)) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -1.0) or not (a <= 1.0): tmp = x / a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1.0) || !(a <= 1.0)) tmp = Float64(x / a); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -1.0) || ~((a <= 1.0))) tmp = x / a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.0], N[Not[LessEqual[a, 1.0]], $MachinePrecision]], N[(x / a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1 \lor \neg \left(a \leq 1\right):\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1 or 1 < a Initial program 77.4%
associate-/l*75.3%
associate-/l*80.5%
Simplified80.5%
Taylor expanded in x around inf 56.2%
Taylor expanded in a around inf 48.6%
if -1 < a < 1Initial program 74.3%
associate-/l*74.3%
associate-/l*77.9%
Simplified77.9%
Taylor expanded in a around 0 73.4%
associate-*l/77.1%
*-commutative77.1%
Simplified77.1%
Taylor expanded in y around 0 35.6%
Final simplification42.1%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 75.9%
associate-/l*74.8%
associate-/l*79.2%
Simplified79.2%
Taylor expanded in a around 0 46.4%
associate-*l/49.9%
*-commutative49.9%
Simplified49.9%
Taylor expanded in y around 0 19.6%
Final simplification19.6%
(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 2024080
(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))))