
(FPCore (x y z t a b) :precision binary64 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x + ((y * z) / t)) / ((a + 1.0d0) + ((y * b) / t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
def code(x, y, z, t, a, b): return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
function code(x, y, z, t, a, b) return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x + ((y * z) / t)) / ((a + 1.0d0) + ((y * b) / t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
def code(x, y, z, t, a, b): return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
function code(x, y, z, t, a, b) return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* y b) t))
(t_2 (/ (+ x (/ (* y z) t)) (+ t_1 (+ a 1.0))))
(t_3 (+ 1.0 (+ a t_1))))
(if (<= t_2 -2e-307)
t_2
(if (<= t_2 0.0)
(+ (/ z b) (* t (/ (/ x b) y)))
(if (<= t_2 2e+295)
t_2
(if (<= t_2 INFINITY)
(* z (+ (/ x (* z t_3)) (/ y (* t t_3))))
(/ (+ z (* t (/ x y))) b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = (x + ((y * z) / t)) / (t_1 + (a + 1.0));
double t_3 = 1.0 + (a + t_1);
double tmp;
if (t_2 <= -2e-307) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = (z / b) + (t * ((x / b) / y));
} else if (t_2 <= 2e+295) {
tmp = t_2;
} else if (t_2 <= ((double) INFINITY)) {
tmp = z * ((x / (z * t_3)) + (y / (t * t_3)));
} else {
tmp = (z + (t * (x / y))) / b;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = (x + ((y * z) / t)) / (t_1 + (a + 1.0));
double t_3 = 1.0 + (a + t_1);
double tmp;
if (t_2 <= -2e-307) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = (z / b) + (t * ((x / b) / y));
} else if (t_2 <= 2e+295) {
tmp = t_2;
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = z * ((x / (z * t_3)) + (y / (t * t_3)));
} else {
tmp = (z + (t * (x / y))) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * b) / t t_2 = (x + ((y * z) / t)) / (t_1 + (a + 1.0)) t_3 = 1.0 + (a + t_1) tmp = 0 if t_2 <= -2e-307: tmp = t_2 elif t_2 <= 0.0: tmp = (z / b) + (t * ((x / b) / y)) elif t_2 <= 2e+295: tmp = t_2 elif t_2 <= math.inf: tmp = z * ((x / (z * t_3)) + (y / (t * t_3))) else: tmp = (z + (t * (x / y))) / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * b) / t) t_2 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(t_1 + Float64(a + 1.0))) t_3 = Float64(1.0 + Float64(a + t_1)) tmp = 0.0 if (t_2 <= -2e-307) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(Float64(z / b) + Float64(t * Float64(Float64(x / b) / y))); elseif (t_2 <= 2e+295) tmp = t_2; elseif (t_2 <= Inf) tmp = Float64(z * Float64(Float64(x / Float64(z * t_3)) + Float64(y / Float64(t * t_3)))); else tmp = Float64(Float64(z + Float64(t * Float64(x / y))) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y * b) / t; t_2 = (x + ((y * z) / t)) / (t_1 + (a + 1.0)); t_3 = 1.0 + (a + t_1); tmp = 0.0; if (t_2 <= -2e-307) tmp = t_2; elseif (t_2 <= 0.0) tmp = (z / b) + (t * ((x / b) / y)); elseif (t_2 <= 2e+295) tmp = t_2; elseif (t_2 <= Inf) tmp = z * ((x / (z * t_3)) + (y / (t * t_3))); else tmp = (z + (t * (x / y))) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(t$95$1 + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(1.0 + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e-307], t$95$2, If[LessEqual[t$95$2, 0.0], N[(N[(z / b), $MachinePrecision] + N[(t * N[(N[(x / b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+295], t$95$2, If[LessEqual[t$95$2, Infinity], N[(z * N[(N[(x / N[(z * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(y / N[(t * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t}\\
t_2 := \frac{x + \frac{y \cdot z}{t}}{t\_1 + \left(a + 1\right)}\\
t_3 := 1 + \left(a + t\_1\right)\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{-307}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\frac{z}{b} + t \cdot \frac{\frac{x}{b}}{y}\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+295}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;z \cdot \left(\frac{x}{z \cdot t\_3} + \frac{y}{t \cdot t\_3}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{z + t \cdot \frac{x}{y}}{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))) < -1.99999999999999982e-307 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 2e295Initial program 97.3%
if -1.99999999999999982e-307 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -0.0Initial program 55.5%
associate-/l*55.3%
associate-/l*70.1%
Simplified70.1%
Taylor expanded in b around inf 60.1%
Taylor expanded in y around inf 60.1%
Taylor expanded in y around inf 67.4%
associate-/l*67.8%
associate-/r*83.7%
Simplified83.7%
if 2e295 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 33.4%
associate-/l*55.6%
associate-/l*55.6%
Simplified55.6%
Taylor expanded in z around inf 94.2%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 0.0%
associate-/l*0.3%
associate-/l*9.2%
Simplified9.2%
Taylor expanded in b around inf 5.5%
Taylor expanded in y around inf 32.7%
Taylor expanded in b around 0 95.6%
*-un-lft-identity95.6%
associate-/l*100.0%
Applied egg-rr100.0%
Final simplification95.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (/ (* y b) t) (+ a 1.0)))))
(if (<= t_1 -2e-307)
t_1
(if (<= t_1 0.0)
(+ (/ z b) (* t (/ (/ x b) y)))
(if (<= t_1 4e+297) t_1 (/ (+ z (* t (/ x y))) b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
double tmp;
if (t_1 <= -2e-307) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = (z / b) + (t * ((x / b) / y));
} else if (t_1 <= 4e+297) {
tmp = t_1;
} else {
tmp = (z + (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) :: t_1
real(8) :: tmp
t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0d0))
if (t_1 <= (-2d-307)) then
tmp = t_1
else if (t_1 <= 0.0d0) then
tmp = (z / b) + (t * ((x / b) / y))
else if (t_1 <= 4d+297) then
tmp = t_1
else
tmp = (z + (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 t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
double tmp;
if (t_1 <= -2e-307) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = (z / b) + (t * ((x / b) / y));
} else if (t_1 <= 4e+297) {
tmp = t_1;
} else {
tmp = (z + (t * (x / y))) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0)) tmp = 0 if t_1 <= -2e-307: tmp = t_1 elif t_1 <= 0.0: tmp = (z / b) + (t * ((x / b) / y)) elif t_1 <= 4e+297: tmp = t_1 else: tmp = (z + (t * (x / y))) / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))) tmp = 0.0 if (t_1 <= -2e-307) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(z / b) + Float64(t * Float64(Float64(x / b) / y))); elseif (t_1 <= 4e+297) tmp = t_1; else tmp = Float64(Float64(z + Float64(t * Float64(x / y))) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0)); tmp = 0.0; if (t_1 <= -2e-307) tmp = t_1; elseif (t_1 <= 0.0) tmp = (z / b) + (t * ((x / b) / y)); elseif (t_1 <= 4e+297) tmp = t_1; else tmp = (z + (t * (x / y))) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-307], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(z / b), $MachinePrecision] + N[(t * N[(N[(x / b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e+297], t$95$1, N[(N[(z + N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-307}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{z}{b} + t \cdot \frac{\frac{x}{b}}{y}\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+297}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z + t \cdot \frac{x}{y}}{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))) < -1.99999999999999982e-307 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 4.0000000000000001e297Initial program 97.3%
if -1.99999999999999982e-307 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -0.0Initial program 55.5%
associate-/l*55.3%
associate-/l*70.1%
Simplified70.1%
Taylor expanded in b around inf 60.1%
Taylor expanded in y around inf 60.1%
Taylor expanded in y around inf 67.4%
associate-/l*67.8%
associate-/r*83.7%
Simplified83.7%
if 4.0000000000000001e297 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 12.3%
associate-/l*22.4%
associate-/l*27.6%
Simplified27.6%
Taylor expanded in b around inf 14.7%
Taylor expanded in y around inf 40.5%
Taylor expanded in b around 0 79.4%
*-un-lft-identity79.4%
associate-/l*81.9%
Applied egg-rr81.9%
Final simplification92.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -4.4e+84)
(/ z b)
(if (<= y 6e-66)
(/ x (+ a 1.0))
(if (<= y 4.5e-27)
(/ (* y (/ z a)) t)
(if (<= y 5e+17)
(/ x (+ 1.0 (/ (* y b) t)))
(if (<= y 1.55e+38) (/ (* y (/ z t)) (+ a 1.0)) (/ z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -4.4e+84) {
tmp = z / b;
} else if (y <= 6e-66) {
tmp = x / (a + 1.0);
} else if (y <= 4.5e-27) {
tmp = (y * (z / a)) / t;
} else if (y <= 5e+17) {
tmp = x / (1.0 + ((y * b) / t));
} else if (y <= 1.55e+38) {
tmp = (y * (z / t)) / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-4.4d+84)) then
tmp = z / b
else if (y <= 6d-66) then
tmp = x / (a + 1.0d0)
else if (y <= 4.5d-27) then
tmp = (y * (z / a)) / t
else if (y <= 5d+17) then
tmp = x / (1.0d0 + ((y * b) / t))
else if (y <= 1.55d+38) then
tmp = (y * (z / t)) / (a + 1.0d0)
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -4.4e+84) {
tmp = z / b;
} else if (y <= 6e-66) {
tmp = x / (a + 1.0);
} else if (y <= 4.5e-27) {
tmp = (y * (z / a)) / t;
} else if (y <= 5e+17) {
tmp = x / (1.0 + ((y * b) / t));
} else if (y <= 1.55e+38) {
tmp = (y * (z / t)) / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -4.4e+84: tmp = z / b elif y <= 6e-66: tmp = x / (a + 1.0) elif y <= 4.5e-27: tmp = (y * (z / a)) / t elif y <= 5e+17: tmp = x / (1.0 + ((y * b) / t)) elif y <= 1.55e+38: tmp = (y * (z / t)) / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -4.4e+84) tmp = Float64(z / b); elseif (y <= 6e-66) tmp = Float64(x / Float64(a + 1.0)); elseif (y <= 4.5e-27) tmp = Float64(Float64(y * Float64(z / a)) / t); elseif (y <= 5e+17) tmp = Float64(x / Float64(1.0 + Float64(Float64(y * b) / t))); elseif (y <= 1.55e+38) tmp = Float64(Float64(y * Float64(z / t)) / Float64(a + 1.0)); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -4.4e+84) tmp = z / b; elseif (y <= 6e-66) tmp = x / (a + 1.0); elseif (y <= 4.5e-27) tmp = (y * (z / a)) / t; elseif (y <= 5e+17) tmp = x / (1.0 + ((y * b) / t)); elseif (y <= 1.55e+38) tmp = (y * (z / t)) / (a + 1.0); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -4.4e+84], N[(z / b), $MachinePrecision], If[LessEqual[y, 6e-66], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.5e-27], N[(N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[y, 5e+17], N[(x / N[(1.0 + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.55e+38], N[(N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.4 \cdot 10^{+84}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq 6 \cdot 10^{-66}:\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{-27}:\\
\;\;\;\;\frac{y \cdot \frac{z}{a}}{t}\\
\mathbf{elif}\;y \leq 5 \cdot 10^{+17}:\\
\;\;\;\;\frac{x}{1 + \frac{y \cdot b}{t}}\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{+38}:\\
\;\;\;\;\frac{y \cdot \frac{z}{t}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -4.3999999999999997e84 or 1.55000000000000009e38 < y Initial program 51.8%
associate-/l*56.2%
associate-/l*63.8%
Simplified63.8%
Taylor expanded in y around inf 61.9%
if -4.3999999999999997e84 < y < 6.0000000000000004e-66Initial program 92.9%
associate-/l*85.7%
associate-/l*81.5%
Simplified81.5%
Taylor expanded in y around 0 54.7%
if 6.0000000000000004e-66 < y < 4.5000000000000002e-27Initial program 90.5%
associate-/l*90.5%
associate-/l*90.5%
Simplified90.5%
Taylor expanded in z around inf 81.3%
Taylor expanded in a around inf 52.5%
Taylor expanded in t around 0 70.2%
Taylor expanded in t around 0 69.7%
associate-*r/69.5%
Simplified69.5%
if 4.5000000000000002e-27 < y < 5e17Initial program 85.2%
associate-/l*85.0%
associate-/l*77.6%
Simplified77.6%
Taylor expanded in x around inf 62.7%
Taylor expanded in a around 0 55.1%
if 5e17 < y < 1.55000000000000009e38Initial program 99.8%
associate-/l*99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in b around 0 99.8%
Taylor expanded in x around 0 85.6%
associate-*r/85.6%
Simplified85.6%
Final simplification58.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -4.4e+84)
(/ z b)
(if (<= y 5.2e-78)
(/ x (+ a 1.0))
(if (<= y 1.8e-21)
(/ z b)
(if (<= y 5.2e+18)
(+ x (/ (* y z) t))
(if (<= y 1.45e+37) (/ (* y (/ z a)) t) (/ z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -4.4e+84) {
tmp = z / b;
} else if (y <= 5.2e-78) {
tmp = x / (a + 1.0);
} else if (y <= 1.8e-21) {
tmp = z / b;
} else if (y <= 5.2e+18) {
tmp = x + ((y * z) / t);
} else if (y <= 1.45e+37) {
tmp = (y * (z / a)) / t;
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-4.4d+84)) then
tmp = z / b
else if (y <= 5.2d-78) then
tmp = x / (a + 1.0d0)
else if (y <= 1.8d-21) then
tmp = z / b
else if (y <= 5.2d+18) then
tmp = x + ((y * z) / t)
else if (y <= 1.45d+37) then
tmp = (y * (z / a)) / t
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -4.4e+84) {
tmp = z / b;
} else if (y <= 5.2e-78) {
tmp = x / (a + 1.0);
} else if (y <= 1.8e-21) {
tmp = z / b;
} else if (y <= 5.2e+18) {
tmp = x + ((y * z) / t);
} else if (y <= 1.45e+37) {
tmp = (y * (z / a)) / t;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -4.4e+84: tmp = z / b elif y <= 5.2e-78: tmp = x / (a + 1.0) elif y <= 1.8e-21: tmp = z / b elif y <= 5.2e+18: tmp = x + ((y * z) / t) elif y <= 1.45e+37: tmp = (y * (z / a)) / t else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -4.4e+84) tmp = Float64(z / b); elseif (y <= 5.2e-78) tmp = Float64(x / Float64(a + 1.0)); elseif (y <= 1.8e-21) tmp = Float64(z / b); elseif (y <= 5.2e+18) tmp = Float64(x + Float64(Float64(y * z) / t)); elseif (y <= 1.45e+37) tmp = Float64(Float64(y * Float64(z / a)) / t); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -4.4e+84) tmp = z / b; elseif (y <= 5.2e-78) tmp = x / (a + 1.0); elseif (y <= 1.8e-21) tmp = z / b; elseif (y <= 5.2e+18) tmp = x + ((y * z) / t); elseif (y <= 1.45e+37) tmp = (y * (z / a)) / t; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -4.4e+84], N[(z / b), $MachinePrecision], If[LessEqual[y, 5.2e-78], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.8e-21], N[(z / b), $MachinePrecision], If[LessEqual[y, 5.2e+18], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.45e+37], N[(N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.4 \cdot 10^{+84}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{-78}:\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{-21}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{+18}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{+37}:\\
\;\;\;\;\frac{y \cdot \frac{z}{a}}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -4.3999999999999997e84 or 5.2000000000000002e-78 < y < 1.79999999999999995e-21 or 1.44999999999999989e37 < y Initial program 57.3%
associate-/l*61.0%
associate-/l*66.5%
Simplified66.5%
Taylor expanded in y around inf 59.4%
if -4.3999999999999997e84 < y < 5.2000000000000002e-78Initial program 93.4%
associate-/l*86.0%
associate-/l*82.4%
Simplified82.4%
Taylor expanded in y around 0 56.1%
if 1.79999999999999995e-21 < y < 5.2e18Initial program 82.5%
associate-/l*82.4%
associate-/l*73.6%
Simplified73.6%
Taylor expanded in b around 0 64.8%
Taylor expanded in a around 0 55.9%
if 5.2e18 < y < 1.44999999999999989e37Initial program 99.8%
associate-/l*99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 99.3%
Taylor expanded in a around inf 72.0%
Taylor expanded in t around 0 71.5%
Taylor expanded in t around 0 71.5%
associate-*r/72.0%
Simplified72.0%
Final simplification57.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* y (/ z a)) t)))
(if (<= y -4.4e+84)
(/ z b)
(if (<= y 6e-66)
(/ x (+ a 1.0))
(if (<= y 5.3e-27)
t_1
(if (<= y 6.5e+18)
(/ x (+ 1.0 (/ (* y b) t)))
(if (<= y 1.55e+38) t_1 (/ z b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * (z / a)) / t;
double tmp;
if (y <= -4.4e+84) {
tmp = z / b;
} else if (y <= 6e-66) {
tmp = x / (a + 1.0);
} else if (y <= 5.3e-27) {
tmp = t_1;
} else if (y <= 6.5e+18) {
tmp = x / (1.0 + ((y * b) / t));
} else if (y <= 1.55e+38) {
tmp = t_1;
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (y * (z / a)) / t
if (y <= (-4.4d+84)) then
tmp = z / b
else if (y <= 6d-66) then
tmp = x / (a + 1.0d0)
else if (y <= 5.3d-27) then
tmp = t_1
else if (y <= 6.5d+18) then
tmp = x / (1.0d0 + ((y * b) / t))
else if (y <= 1.55d+38) then
tmp = t_1
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * (z / a)) / t;
double tmp;
if (y <= -4.4e+84) {
tmp = z / b;
} else if (y <= 6e-66) {
tmp = x / (a + 1.0);
} else if (y <= 5.3e-27) {
tmp = t_1;
} else if (y <= 6.5e+18) {
tmp = x / (1.0 + ((y * b) / t));
} else if (y <= 1.55e+38) {
tmp = t_1;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * (z / a)) / t tmp = 0 if y <= -4.4e+84: tmp = z / b elif y <= 6e-66: tmp = x / (a + 1.0) elif y <= 5.3e-27: tmp = t_1 elif y <= 6.5e+18: tmp = x / (1.0 + ((y * b) / t)) elif y <= 1.55e+38: tmp = t_1 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * Float64(z / a)) / t) tmp = 0.0 if (y <= -4.4e+84) tmp = Float64(z / b); elseif (y <= 6e-66) tmp = Float64(x / Float64(a + 1.0)); elseif (y <= 5.3e-27) tmp = t_1; elseif (y <= 6.5e+18) tmp = Float64(x / Float64(1.0 + Float64(Float64(y * b) / t))); elseif (y <= 1.55e+38) tmp = t_1; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y * (z / a)) / t; tmp = 0.0; if (y <= -4.4e+84) tmp = z / b; elseif (y <= 6e-66) tmp = x / (a + 1.0); elseif (y <= 5.3e-27) tmp = t_1; elseif (y <= 6.5e+18) tmp = x / (1.0 + ((y * b) / t)); elseif (y <= 1.55e+38) tmp = t_1; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[y, -4.4e+84], N[(z / b), $MachinePrecision], If[LessEqual[y, 6e-66], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.3e-27], t$95$1, If[LessEqual[y, 6.5e+18], N[(x / N[(1.0 + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.55e+38], t$95$1, N[(z / b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \frac{z}{a}}{t}\\
\mathbf{if}\;y \leq -4.4 \cdot 10^{+84}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq 6 \cdot 10^{-66}:\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{elif}\;y \leq 5.3 \cdot 10^{-27}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{+18}:\\
\;\;\;\;\frac{x}{1 + \frac{y \cdot b}{t}}\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{+38}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -4.3999999999999997e84 or 1.55000000000000009e38 < y Initial program 51.8%
associate-/l*56.2%
associate-/l*63.8%
Simplified63.8%
Taylor expanded in y around inf 61.9%
if -4.3999999999999997e84 < y < 6.0000000000000004e-66Initial program 92.9%
associate-/l*85.7%
associate-/l*81.5%
Simplified81.5%
Taylor expanded in y around 0 54.7%
if 6.0000000000000004e-66 < y < 5.30000000000000006e-27 or 6.5e18 < y < 1.55000000000000009e38Initial program 94.3%
associate-/l*94.3%
associate-/l*94.3%
Simplified94.3%
Taylor expanded in z around inf 88.7%
Taylor expanded in a around inf 60.5%
Taylor expanded in t around 0 70.7%
Taylor expanded in t around 0 70.4%
associate-*r/70.5%
Simplified70.5%
if 5.30000000000000006e-27 < y < 6.5e18Initial program 85.2%
associate-/l*85.0%
associate-/l*77.6%
Simplified77.6%
Taylor expanded in x around inf 62.7%
Taylor expanded in a around 0 55.1%
Final simplification58.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ z (/ (* x t) y)) b)))
(if (<= y -9e-104)
t_1
(if (<= y 1.9e-79)
(/ x (+ a 1.0))
(if (<= y 0.00069)
t_1
(if (<= y 1.55e+38)
(/ (* 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 t_1 = (z + ((x * t) / y)) / b;
double tmp;
if (y <= -9e-104) {
tmp = t_1;
} else if (y <= 1.9e-79) {
tmp = x / (a + 1.0);
} else if (y <= 0.00069) {
tmp = t_1;
} else if (y <= 1.55e+38) {
tmp = (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) :: t_1
real(8) :: tmp
t_1 = (z + ((x * t) / y)) / b
if (y <= (-9d-104)) then
tmp = t_1
else if (y <= 1.9d-79) then
tmp = x / (a + 1.0d0)
else if (y <= 0.00069d0) then
tmp = t_1
else if (y <= 1.55d+38) then
tmp = (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 t_1 = (z + ((x * t) / y)) / b;
double tmp;
if (y <= -9e-104) {
tmp = t_1;
} else if (y <= 1.9e-79) {
tmp = x / (a + 1.0);
} else if (y <= 0.00069) {
tmp = t_1;
} else if (y <= 1.55e+38) {
tmp = (y * (z / t)) / (a + 1.0);
} else {
tmp = (z / b) + (t * ((x / b) / y));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + ((x * t) / y)) / b tmp = 0 if y <= -9e-104: tmp = t_1 elif y <= 1.9e-79: tmp = x / (a + 1.0) elif y <= 0.00069: tmp = t_1 elif y <= 1.55e+38: tmp = (y * (z / t)) / (a + 1.0) else: tmp = (z / b) + (t * ((x / b) / y)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + Float64(Float64(x * t) / y)) / b) tmp = 0.0 if (y <= -9e-104) tmp = t_1; elseif (y <= 1.9e-79) tmp = Float64(x / Float64(a + 1.0)); elseif (y <= 0.00069) tmp = t_1; elseif (y <= 1.55e+38) tmp = Float64(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) t_1 = (z + ((x * t) / y)) / b; tmp = 0.0; if (y <= -9e-104) tmp = t_1; elseif (y <= 1.9e-79) tmp = x / (a + 1.0); elseif (y <= 0.00069) tmp = t_1; elseif (y <= 1.55e+38) tmp = (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_] := Block[{t$95$1 = N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, If[LessEqual[y, -9e-104], t$95$1, If[LessEqual[y, 1.9e-79], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.00069], t$95$1, If[LessEqual[y, 1.55e+38], N[(N[(y * N[(z / t), $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}
t_1 := \frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{if}\;y \leq -9 \cdot 10^{-104}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{-79}:\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{elif}\;y \leq 0.00069:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{+38}:\\
\;\;\;\;\frac{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 < -8.9999999999999995e-104 or 1.9000000000000001e-79 < y < 6.89999999999999967e-4Initial program 70.4%
associate-/l*72.3%
associate-/l*71.3%
Simplified71.3%
Taylor expanded in b around inf 38.8%
Taylor expanded in y around inf 47.4%
Taylor expanded in b around 0 57.0%
if -8.9999999999999995e-104 < y < 1.9000000000000001e-79Initial program 96.8%
associate-/l*86.9%
associate-/l*81.5%
Simplified81.5%
Taylor expanded in y around 0 66.6%
if 6.89999999999999967e-4 < y < 1.55000000000000009e38Initial program 99.9%
associate-/l*99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in b around 0 99.9%
Taylor expanded in x around 0 64.5%
associate-*r/64.3%
Simplified64.3%
if 1.55000000000000009e38 < y Initial program 57.7%
associate-/l*59.6%
associate-/l*70.6%
Simplified70.6%
Taylor expanded in b around inf 39.2%
Taylor expanded in y around inf 44.7%
Taylor expanded in y around inf 63.2%
associate-/l*65.1%
associate-/r*68.0%
Simplified68.0%
Final simplification63.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ z (/ (* x t) y)) b)))
(if (<= y -5.8e-106)
t_1
(if (<= y 5.9e-81)
(/ x (+ a 1.0))
(if (or (<= y 0.00048) (not (<= y 2.5e+41)))
t_1
(/ (* y (/ z t)) (+ a 1.0)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + ((x * t) / y)) / b;
double tmp;
if (y <= -5.8e-106) {
tmp = t_1;
} else if (y <= 5.9e-81) {
tmp = x / (a + 1.0);
} else if ((y <= 0.00048) || !(y <= 2.5e+41)) {
tmp = t_1;
} else {
tmp = (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 = (z + ((x * t) / y)) / b
if (y <= (-5.8d-106)) then
tmp = t_1
else if (y <= 5.9d-81) then
tmp = x / (a + 1.0d0)
else if ((y <= 0.00048d0) .or. (.not. (y <= 2.5d+41))) then
tmp = t_1
else
tmp = (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 = (z + ((x * t) / y)) / b;
double tmp;
if (y <= -5.8e-106) {
tmp = t_1;
} else if (y <= 5.9e-81) {
tmp = x / (a + 1.0);
} else if ((y <= 0.00048) || !(y <= 2.5e+41)) {
tmp = t_1;
} else {
tmp = (y * (z / t)) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + ((x * t) / y)) / b tmp = 0 if y <= -5.8e-106: tmp = t_1 elif y <= 5.9e-81: tmp = x / (a + 1.0) elif (y <= 0.00048) or not (y <= 2.5e+41): tmp = t_1 else: tmp = (y * (z / t)) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + Float64(Float64(x * t) / y)) / b) tmp = 0.0 if (y <= -5.8e-106) tmp = t_1; elseif (y <= 5.9e-81) tmp = Float64(x / Float64(a + 1.0)); elseif ((y <= 0.00048) || !(y <= 2.5e+41)) tmp = t_1; else tmp = Float64(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 = (z + ((x * t) / y)) / b; tmp = 0.0; if (y <= -5.8e-106) tmp = t_1; elseif (y <= 5.9e-81) tmp = x / (a + 1.0); elseif ((y <= 0.00048) || ~((y <= 2.5e+41))) tmp = t_1; else tmp = (y * (z / t)) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, If[LessEqual[y, -5.8e-106], t$95$1, If[LessEqual[y, 5.9e-81], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 0.00048], N[Not[LessEqual[y, 2.5e+41]], $MachinePrecision]], t$95$1, N[(N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{if}\;y \leq -5.8 \cdot 10^{-106}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 5.9 \cdot 10^{-81}:\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{elif}\;y \leq 0.00048 \lor \neg \left(y \leq 2.5 \cdot 10^{+41}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot \frac{z}{t}}{a + 1}\\
\end{array}
\end{array}
if y < -5.8000000000000001e-106 or 5.90000000000000024e-81 < y < 4.80000000000000012e-4 or 2.50000000000000011e41 < y Initial program 66.0%
associate-/l*67.9%
associate-/l*71.1%
Simplified71.1%
Taylor expanded in b around inf 39.0%
Taylor expanded in y around inf 46.5%
Taylor expanded in b around 0 59.9%
if -5.8000000000000001e-106 < y < 5.90000000000000024e-81Initial program 96.8%
associate-/l*86.9%
associate-/l*81.5%
Simplified81.5%
Taylor expanded in y around 0 66.6%
if 4.80000000000000012e-4 < y < 2.50000000000000011e41Initial program 99.9%
associate-/l*99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in b around 0 99.9%
Taylor expanded in x around 0 64.5%
associate-*r/64.3%
Simplified64.3%
Final simplification62.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -4.4e+84)
(/ z b)
(if (<= y 6.8e-78)
(/ x (+ a 1.0))
(if (or (<= y 1.42e-21) (not (<= y 5.7e+35)))
(/ z b)
(+ x (/ (* y z) t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -4.4e+84) {
tmp = z / b;
} else if (y <= 6.8e-78) {
tmp = x / (a + 1.0);
} else if ((y <= 1.42e-21) || !(y <= 5.7e+35)) {
tmp = z / b;
} else {
tmp = x + ((y * z) / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-4.4d+84)) then
tmp = z / b
else if (y <= 6.8d-78) then
tmp = x / (a + 1.0d0)
else if ((y <= 1.42d-21) .or. (.not. (y <= 5.7d+35))) then
tmp = z / b
else
tmp = x + ((y * z) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -4.4e+84) {
tmp = z / b;
} else if (y <= 6.8e-78) {
tmp = x / (a + 1.0);
} else if ((y <= 1.42e-21) || !(y <= 5.7e+35)) {
tmp = z / b;
} else {
tmp = x + ((y * z) / t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -4.4e+84: tmp = z / b elif y <= 6.8e-78: tmp = x / (a + 1.0) elif (y <= 1.42e-21) or not (y <= 5.7e+35): tmp = z / b else: tmp = x + ((y * z) / t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -4.4e+84) tmp = Float64(z / b); elseif (y <= 6.8e-78) tmp = Float64(x / Float64(a + 1.0)); elseif ((y <= 1.42e-21) || !(y <= 5.7e+35)) tmp = Float64(z / b); else tmp = Float64(x + Float64(Float64(y * z) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -4.4e+84) tmp = z / b; elseif (y <= 6.8e-78) tmp = x / (a + 1.0); elseif ((y <= 1.42e-21) || ~((y <= 5.7e+35))) tmp = z / b; else tmp = x + ((y * z) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -4.4e+84], N[(z / b), $MachinePrecision], If[LessEqual[y, 6.8e-78], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 1.42e-21], N[Not[LessEqual[y, 5.7e+35]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.4 \cdot 10^{+84}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{-78}:\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{elif}\;y \leq 1.42 \cdot 10^{-21} \lor \neg \left(y \leq 5.7 \cdot 10^{+35}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\end{array}
\end{array}
if y < -4.3999999999999997e84 or 6.80000000000000023e-78 < y < 1.42e-21 or 5.69999999999999993e35 < y Initial program 58.1%
associate-/l*61.7%
associate-/l*67.2%
Simplified67.2%
Taylor expanded in y around inf 58.4%
if -4.3999999999999997e84 < y < 6.80000000000000023e-78Initial program 93.4%
associate-/l*86.0%
associate-/l*82.4%
Simplified82.4%
Taylor expanded in y around 0 56.1%
if 1.42e-21 < y < 5.69999999999999993e35Initial program 87.9%
associate-/l*87.8%
associate-/l*81.8%
Simplified81.8%
Taylor expanded in b around 0 75.7%
Taylor expanded in a around 0 51.3%
Final simplification56.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -7.6e-109) (not (<= t 2.35e-194))) (/ (+ x (* y (/ z t))) (+ (* y (/ b t)) (+ a 1.0))) (/ (+ z (/ (* x t) y)) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -7.6e-109) || !(t <= 2.35e-194)) {
tmp = (x + (y * (z / t))) / ((y * (b / t)) + (a + 1.0));
} else {
tmp = (z + ((x * t) / 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 ((t <= (-7.6d-109)) .or. (.not. (t <= 2.35d-194))) then
tmp = (x + (y * (z / t))) / ((y * (b / t)) + (a + 1.0d0))
else
tmp = (z + ((x * t) / 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 ((t <= -7.6e-109) || !(t <= 2.35e-194)) {
tmp = (x + (y * (z / t))) / ((y * (b / t)) + (a + 1.0));
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -7.6e-109) or not (t <= 2.35e-194): tmp = (x + (y * (z / t))) / ((y * (b / t)) + (a + 1.0)) else: tmp = (z + ((x * t) / y)) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -7.6e-109) || !(t <= 2.35e-194)) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(y * Float64(b / t)) + Float64(a + 1.0))); else tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -7.6e-109) || ~((t <= 2.35e-194))) tmp = (x + (y * (z / t))) / ((y * (b / t)) + (a + 1.0)); else tmp = (z + ((x * t) / y)) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -7.6e-109], N[Not[LessEqual[t, 2.35e-194]], $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 + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.6 \cdot 10^{-109} \lor \neg \left(t \leq 2.35 \cdot 10^{-194}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{y \cdot \frac{b}{t} + \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\end{array}
\end{array}
if t < -7.60000000000000003e-109 or 2.3500000000000001e-194 < t Initial program 85.1%
associate-/l*86.5%
associate-/l*89.2%
Simplified89.2%
if -7.60000000000000003e-109 < t < 2.3500000000000001e-194Initial program 62.0%
associate-/l*50.5%
associate-/l*44.0%
Simplified44.0%
Taylor expanded in b around inf 51.9%
Taylor expanded in y around inf 67.3%
Taylor expanded in b around 0 77.8%
Final simplification85.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -8e+84) (not (<= y 1.5e+79))) (/ (+ z (* t (/ x y))) b) (/ (+ x (* z (/ y t))) (+ (/ (* y b) t) (+ a 1.0)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -8e+84) || !(y <= 1.5e+79)) {
tmp = (z + (t * (x / y))) / b;
} else {
tmp = (x + (z * (y / t))) / (((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 <= (-8d+84)) .or. (.not. (y <= 1.5d+79))) then
tmp = (z + (t * (x / y))) / b
else
tmp = (x + (z * (y / t))) / (((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 <= -8e+84) || !(y <= 1.5e+79)) {
tmp = (z + (t * (x / y))) / b;
} else {
tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -8e+84) or not (y <= 1.5e+79): tmp = (z + (t * (x / y))) / b else: tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -8e+84) || !(y <= 1.5e+79)) tmp = Float64(Float64(z + Float64(t * Float64(x / y))) / b); else tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / 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 <= -8e+84) || ~((y <= 1.5e+79))) tmp = (z + (t * (x / y))) / b; else tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -8e+84], N[Not[LessEqual[y, 1.5e+79]], $MachinePrecision]], N[(N[(z + N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+84} \lor \neg \left(y \leq 1.5 \cdot 10^{+79}\right):\\
\;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\end{array}
\end{array}
if y < -8.00000000000000046e84 or 1.49999999999999987e79 < y Initial program 48.8%
associate-/l*52.5%
associate-/l*61.0%
Simplified61.0%
Taylor expanded in b around inf 35.6%
Taylor expanded in y around inf 45.3%
Taylor expanded in b around 0 68.8%
*-un-lft-identity68.8%
associate-/l*74.7%
Applied egg-rr74.7%
if -8.00000000000000046e84 < y < 1.49999999999999987e79Initial program 91.7%
*-commutative69.1%
associate-/l*69.3%
Applied egg-rr92.0%
Final simplification86.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -8.5e+72)
(/ (+ z (/ (* x t) y)) b)
(if (<= y 2.25e+18)
(/ x (+ 1.0 (+ a (/ (* y b) t))))
(if (<= y 1.9e+37)
(/ (* 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 <= -8.5e+72) {
tmp = (z + ((x * t) / y)) / b;
} else if (y <= 2.25e+18) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else if (y <= 1.9e+37) {
tmp = (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 <= (-8.5d+72)) then
tmp = (z + ((x * t) / y)) / b
else if (y <= 2.25d+18) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
else if (y <= 1.9d+37) then
tmp = (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 <= -8.5e+72) {
tmp = (z + ((x * t) / y)) / b;
} else if (y <= 2.25e+18) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else if (y <= 1.9e+37) {
tmp = (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 <= -8.5e+72: tmp = (z + ((x * t) / y)) / b elif y <= 2.25e+18: tmp = x / (1.0 + (a + ((y * b) / t))) elif y <= 1.9e+37: tmp = (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 <= -8.5e+72) tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); elseif (y <= 2.25e+18) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); elseif (y <= 1.9e+37) tmp = Float64(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 <= -8.5e+72) tmp = (z + ((x * t) / y)) / b; elseif (y <= 2.25e+18) tmp = x / (1.0 + (a + ((y * b) / t))); elseif (y <= 1.9e+37) tmp = (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, -8.5e+72], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[y, 2.25e+18], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.9e+37], N[(N[(y * N[(z / t), $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 -8.5 \cdot 10^{+72}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{elif}\;y \leq 2.25 \cdot 10^{+18}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{+37}:\\
\;\;\;\;\frac{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 < -8.5000000000000004e72Initial program 45.1%
associate-/l*52.4%
associate-/l*57.3%
Simplified57.3%
Taylor expanded in b around inf 35.2%
Taylor expanded in y around inf 47.8%
Taylor expanded in b around 0 70.4%
if -8.5000000000000004e72 < y < 2.25e18Initial program 92.5%
associate-/l*86.3%
associate-/l*81.4%
Simplified81.4%
Taylor expanded in x around inf 65.7%
if 2.25e18 < y < 1.89999999999999995e37Initial program 99.8%
associate-/l*99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in b around 0 99.8%
Taylor expanded in x around 0 85.6%
associate-*r/85.6%
Simplified85.6%
if 1.89999999999999995e37 < y Initial program 57.7%
associate-/l*59.6%
associate-/l*70.6%
Simplified70.6%
Taylor expanded in b around inf 39.2%
Taylor expanded in y around inf 44.7%
Taylor expanded in y around inf 63.2%
associate-/l*65.1%
associate-/r*68.0%
Simplified68.0%
Final simplification67.4%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= y -4.5e+84)
(not (or (<= y 4.3e-78) (and (not (<= y 1.75e-21)) (<= y 2.6e+36)))))
(/ 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+84) || !((y <= 4.3e-78) || (!(y <= 1.75e-21) && (y <= 2.6e+36)))) {
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+84)) .or. (.not. (y <= 4.3d-78) .or. (.not. (y <= 1.75d-21)) .and. (y <= 2.6d+36))) 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+84) || !((y <= 4.3e-78) || (!(y <= 1.75e-21) && (y <= 2.6e+36)))) {
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+84) or not ((y <= 4.3e-78) or (not (y <= 1.75e-21) and (y <= 2.6e+36))): 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+84) || !((y <= 4.3e-78) || (!(y <= 1.75e-21) && (y <= 2.6e+36)))) 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+84) || ~(((y <= 4.3e-78) || (~((y <= 1.75e-21)) && (y <= 2.6e+36))))) 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, -4.5e+84], N[Not[Or[LessEqual[y, 4.3e-78], And[N[Not[LessEqual[y, 1.75e-21]], $MachinePrecision], LessEqual[y, 2.6e+36]]]], $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^{+84} \lor \neg \left(y \leq 4.3 \cdot 10^{-78} \lor \neg \left(y \leq 1.75 \cdot 10^{-21}\right) \land y \leq 2.6 \cdot 10^{+36}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a + 1}\\
\end{array}
\end{array}
if y < -4.4999999999999997e84 or 4.29999999999999994e-78 < y < 1.7500000000000002e-21 or 2.6000000000000001e36 < y Initial program 57.7%
associate-/l*61.3%
associate-/l*66.9%
Simplified66.9%
Taylor expanded in y around inf 58.9%
if -4.4999999999999997e84 < y < 4.29999999999999994e-78 or 1.7500000000000002e-21 < y < 2.6000000000000001e36Initial program 92.8%
associate-/l*86.3%
associate-/l*82.4%
Simplified82.4%
Taylor expanded in y around 0 54.0%
Final simplification56.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -8.6e-97) (not (<= t 4.7e-161))) (/ (+ x (* z (/ y t))) (+ a 1.0)) (/ (+ z (/ (* x t) y)) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -8.6e-97) || !(t <= 4.7e-161)) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else {
tmp = (z + ((x * t) / 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 ((t <= (-8.6d-97)) .or. (.not. (t <= 4.7d-161))) then
tmp = (x + (z * (y / t))) / (a + 1.0d0)
else
tmp = (z + ((x * t) / 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 ((t <= -8.6e-97) || !(t <= 4.7e-161)) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -8.6e-97) or not (t <= 4.7e-161): tmp = (x + (z * (y / t))) / (a + 1.0) else: tmp = (z + ((x * t) / y)) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -8.6e-97) || !(t <= 4.7e-161)) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0)); else tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -8.6e-97) || ~((t <= 4.7e-161))) tmp = (x + (z * (y / t))) / (a + 1.0); else tmp = (z + ((x * t) / y)) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -8.6e-97], N[Not[LessEqual[t, 4.7e-161]], $MachinePrecision]], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.6 \cdot 10^{-97} \lor \neg \left(t \leq 4.7 \cdot 10^{-161}\right):\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\end{array}
\end{array}
if t < -8.6e-97 or 4.7000000000000004e-161 < t Initial program 84.6%
associate-/l*86.2%
associate-/l*90.2%
Simplified90.2%
Taylor expanded in b around 0 70.3%
*-commutative70.3%
associate-/l*72.3%
Applied egg-rr72.3%
if -8.6e-97 < t < 4.7000000000000004e-161Initial program 66.1%
associate-/l*56.2%
associate-/l*48.4%
Simplified48.4%
Taylor expanded in b around inf 53.7%
Taylor expanded in y around inf 67.0%
Taylor expanded in b around 0 76.1%
Final simplification73.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -2.35e-97)
(/ (+ x (* z (/ y t))) (+ a 1.0))
(if (<= t 1.1e-161)
(/ (+ z (/ (* x t) y)) b)
(/ (+ x (* y (/ z t))) (+ a 1.0)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.35e-97) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else if (t <= 1.1e-161) {
tmp = (z + ((x * t) / y)) / b;
} else {
tmp = (x + (y * (z / t))) / (a + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-2.35d-97)) then
tmp = (x + (z * (y / t))) / (a + 1.0d0)
else if (t <= 1.1d-161) then
tmp = (z + ((x * t) / y)) / b
else
tmp = (x + (y * (z / t))) / (a + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.35e-97) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else if (t <= 1.1e-161) {
tmp = (z + ((x * t) / y)) / b;
} else {
tmp = (x + (y * (z / t))) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -2.35e-97: tmp = (x + (z * (y / t))) / (a + 1.0) elif t <= 1.1e-161: tmp = (z + ((x * t) / y)) / b else: tmp = (x + (y * (z / t))) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -2.35e-97) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0)); elseif (t <= 1.1e-161) tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); 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 (t <= -2.35e-97) tmp = (x + (z * (y / t))) / (a + 1.0); elseif (t <= 1.1e-161) tmp = (z + ((x * t) / y)) / b; else tmp = (x + (y * (z / t))) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2.35e-97], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.1e-161], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $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}\;t \leq -2.35 \cdot 10^{-97}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{-161}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\
\end{array}
\end{array}
if t < -2.3500000000000001e-97Initial program 82.6%
associate-/l*85.0%
associate-/l*87.5%
Simplified87.5%
Taylor expanded in b around 0 64.4%
*-commutative64.4%
associate-/l*68.0%
Applied egg-rr68.0%
if -2.3500000000000001e-97 < t < 1.10000000000000001e-161Initial program 66.1%
associate-/l*56.2%
associate-/l*48.4%
Simplified48.4%
Taylor expanded in b around inf 53.7%
Taylor expanded in y around inf 67.0%
Taylor expanded in b around 0 76.1%
if 1.10000000000000001e-161 < t Initial program 86.3%
associate-/l*87.2%
associate-/l*92.5%
Simplified92.5%
Taylor expanded in b around 0 75.6%
associate-*r/76.3%
*-commutative76.3%
Applied egg-rr76.3%
Final simplification73.7%
(FPCore (x y z t a b) :precision binary64 (if (<= y -2.4e-89) (/ z b) (if (<= y -1.06e-234) (/ x a) (if (<= y 5.2e-100) (- x (* x a)) (/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.4e-89) {
tmp = z / b;
} else if (y <= -1.06e-234) {
tmp = x / a;
} else if (y <= 5.2e-100) {
tmp = x - (x * a);
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-2.4d-89)) then
tmp = z / b
else if (y <= (-1.06d-234)) then
tmp = x / a
else if (y <= 5.2d-100) then
tmp = x - (x * a)
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.4e-89) {
tmp = z / b;
} else if (y <= -1.06e-234) {
tmp = x / a;
} else if (y <= 5.2e-100) {
tmp = x - (x * a);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.4e-89: tmp = z / b elif y <= -1.06e-234: tmp = x / a elif y <= 5.2e-100: tmp = x - (x * a) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.4e-89) tmp = Float64(z / b); elseif (y <= -1.06e-234) tmp = Float64(x / a); elseif (y <= 5.2e-100) tmp = Float64(x - Float64(x * a)); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -2.4e-89) tmp = z / b; elseif (y <= -1.06e-234) tmp = x / a; elseif (y <= 5.2e-100) tmp = x - (x * a); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.4e-89], N[(z / b), $MachinePrecision], If[LessEqual[y, -1.06e-234], N[(x / a), $MachinePrecision], If[LessEqual[y, 5.2e-100], N[(x - N[(x * a), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.4 \cdot 10^{-89}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq -1.06 \cdot 10^{-234}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{-100}:\\
\;\;\;\;x - x \cdot a\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -2.40000000000000016e-89 or 5.1999999999999997e-100 < y Initial program 68.7%
associate-/l*70.4%
associate-/l*73.3%
Simplified73.3%
Taylor expanded in y around inf 46.6%
if -2.40000000000000016e-89 < y < -1.06000000000000004e-234Initial program 90.8%
associate-/l*89.2%
associate-/l*75.7%
Simplified75.7%
Taylor expanded in x around inf 64.5%
Taylor expanded in a around inf 41.3%
if -1.06000000000000004e-234 < y < 5.1999999999999997e-100Initial program 99.5%
associate-/l*85.4%
associate-/l*83.6%
Simplified83.6%
Taylor expanded in y around 0 71.4%
Taylor expanded in a around 0 41.7%
mul-1-neg41.7%
unsub-neg41.7%
Simplified41.7%
Final simplification44.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -5.1e-86) (not (<= y 4.1e-78))) (/ z b) (/ x a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -5.1e-86) || !(y <= 4.1e-78)) {
tmp = z / b;
} else {
tmp = x / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-5.1d-86)) .or. (.not. (y <= 4.1d-78))) then
tmp = z / b
else
tmp = x / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -5.1e-86) || !(y <= 4.1e-78)) {
tmp = z / b;
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -5.1e-86) or not (y <= 4.1e-78): tmp = z / b else: tmp = x / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -5.1e-86) || !(y <= 4.1e-78)) tmp = Float64(z / b); else tmp = Float64(x / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -5.1e-86) || ~((y <= 4.1e-78))) tmp = z / b; else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -5.1e-86], N[Not[LessEqual[y, 4.1e-78]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.1 \cdot 10^{-86} \lor \neg \left(y \leq 4.1 \cdot 10^{-78}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if y < -5.10000000000000006e-86 or 4.0999999999999998e-78 < y Initial program 67.9%
associate-/l*69.7%
associate-/l*73.2%
Simplified73.2%
Taylor expanded in y around inf 47.0%
if -5.10000000000000006e-86 < y < 4.0999999999999998e-78Initial program 96.8%
associate-/l*87.2%
associate-/l*80.9%
Simplified80.9%
Taylor expanded in x around inf 73.3%
Taylor expanded in a around inf 35.4%
Final simplification42.8%
(FPCore (x y z t a b) :precision binary64 (/ x a))
double code(double x, double y, double z, double t, double a, double b) {
return x / a;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x / a
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / a;
}
def code(x, y, z, t, a, b): return x / a
function code(x, y, z, t, a, b) return Float64(x / a) end
function tmp = code(x, y, z, t, a, b) tmp = x / a; end
code[x_, y_, z_, t_, a_, b_] := N[(x / a), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{a}
\end{array}
Initial program 78.3%
associate-/l*76.0%
associate-/l*76.0%
Simplified76.0%
Taylor expanded in x around inf 50.2%
Taylor expanded in a around inf 20.7%
Final simplification20.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 2024059
(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))))