
(FPCore (x y z t a b) :precision binary64 (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
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 * 2.0d0) - (((y * 9.0d0) * z) * t)) + ((a * 27.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
def code(x, y, z, t, a, b): return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + Float64(Float64(a * 27.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
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 * 2.0d0) - (((y * 9.0d0) * z) * t)) + ((a * 27.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
def code(x, y, z, t, a, b): return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + Float64(Float64(a * 27.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b
\end{array}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= (* y 9.0) -4e+71) (+ (* y (* (* z t) -9.0)) (- (* x 2.0) (* (* b -27.0) a))) (+ (- (* x 2.0) (* (* t y) (* z 9.0))) (* (* a 27.0) b))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y * 9.0) <= -4e+71) {
tmp = (y * ((z * t) * -9.0)) + ((x * 2.0) - ((b * -27.0) * a));
} else {
tmp = ((x * 2.0) - ((t * y) * (z * 9.0))) + ((a * 27.0) * b);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 * 9.0d0) <= (-4d+71)) then
tmp = (y * ((z * t) * (-9.0d0))) + ((x * 2.0d0) - ((b * (-27.0d0)) * a))
else
tmp = ((x * 2.0d0) - ((t * y) * (z * 9.0d0))) + ((a * 27.0d0) * b)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y * 9.0) <= -4e+71) {
tmp = (y * ((z * t) * -9.0)) + ((x * 2.0) - ((b * -27.0) * a));
} else {
tmp = ((x * 2.0) - ((t * y) * (z * 9.0))) + ((a * 27.0) * b);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if (y * 9.0) <= -4e+71: tmp = (y * ((z * t) * -9.0)) + ((x * 2.0) - ((b * -27.0) * a)) else: tmp = ((x * 2.0) - ((t * y) * (z * 9.0))) + ((a * 27.0) * b) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(y * 9.0) <= -4e+71) tmp = Float64(Float64(y * Float64(Float64(z * t) * -9.0)) + Float64(Float64(x * 2.0) - Float64(Float64(b * -27.0) * a))); else tmp = Float64(Float64(Float64(x * 2.0) - Float64(Float64(t * y) * Float64(z * 9.0))) + Float64(Float64(a * 27.0) * b)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if ((y * 9.0) <= -4e+71)
tmp = (y * ((z * t) * -9.0)) + ((x * 2.0) - ((b * -27.0) * a));
else
tmp = ((x * 2.0) - ((t * y) * (z * 9.0))) + ((a * 27.0) * b);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(y * 9.0), $MachinePrecision], -4e+71], N[(N[(y * N[(N[(z * t), $MachinePrecision] * -9.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x * 2.0), $MachinePrecision] - N[(N[(b * -27.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(t * y), $MachinePrecision] * N[(z * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;y \cdot 9 \leq -4 \cdot 10^{+71}:\\
\;\;\;\;y \cdot \left(\left(z \cdot t\right) \cdot -9\right) + \left(x \cdot 2 - \left(b \cdot -27\right) \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 2 - \left(t \cdot y\right) \cdot \left(z \cdot 9\right)\right) + \left(a \cdot 27\right) \cdot b\\
\end{array}
\end{array}
if (*.f64 y #s(literal 9 binary64)) < -4.0000000000000002e71Initial program 90.7%
Simplified0
Applied egg-rr0
if -4.0000000000000002e71 < (*.f64 y #s(literal 9 binary64)) Initial program 96.9%
Applied egg-rr0
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (* y (* z t)) -9.0)))
(if (<= (* a 27.0) -5e+104)
(* (* a b) 27.0)
(if (<= (* a 27.0) -2e+14)
t_1
(if (<= (* a 27.0) -1e-175)
(* 2.0 x)
(if (<= (* a 27.0) 2e-300)
t_1
(if (<= (* a 27.0) 5e-118) (* 2.0 x) (* b (* a 27.0)))))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * (z * t)) * -9.0;
double tmp;
if ((a * 27.0) <= -5e+104) {
tmp = (a * b) * 27.0;
} else if ((a * 27.0) <= -2e+14) {
tmp = t_1;
} else if ((a * 27.0) <= -1e-175) {
tmp = 2.0 * x;
} else if ((a * 27.0) <= 2e-300) {
tmp = t_1;
} else if ((a * 27.0) <= 5e-118) {
tmp = 2.0 * x;
} else {
tmp = b * (a * 27.0);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 * t)) * (-9.0d0)
if ((a * 27.0d0) <= (-5d+104)) then
tmp = (a * b) * 27.0d0
else if ((a * 27.0d0) <= (-2d+14)) then
tmp = t_1
else if ((a * 27.0d0) <= (-1d-175)) then
tmp = 2.0d0 * x
else if ((a * 27.0d0) <= 2d-300) then
tmp = t_1
else if ((a * 27.0d0) <= 5d-118) then
tmp = 2.0d0 * x
else
tmp = b * (a * 27.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * (z * t)) * -9.0;
double tmp;
if ((a * 27.0) <= -5e+104) {
tmp = (a * b) * 27.0;
} else if ((a * 27.0) <= -2e+14) {
tmp = t_1;
} else if ((a * 27.0) <= -1e-175) {
tmp = 2.0 * x;
} else if ((a * 27.0) <= 2e-300) {
tmp = t_1;
} else if ((a * 27.0) <= 5e-118) {
tmp = 2.0 * x;
} else {
tmp = b * (a * 27.0);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = (y * (z * t)) * -9.0 tmp = 0 if (a * 27.0) <= -5e+104: tmp = (a * b) * 27.0 elif (a * 27.0) <= -2e+14: tmp = t_1 elif (a * 27.0) <= -1e-175: tmp = 2.0 * x elif (a * 27.0) <= 2e-300: tmp = t_1 elif (a * 27.0) <= 5e-118: tmp = 2.0 * x else: tmp = b * (a * 27.0) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * Float64(z * t)) * -9.0) tmp = 0.0 if (Float64(a * 27.0) <= -5e+104) tmp = Float64(Float64(a * b) * 27.0); elseif (Float64(a * 27.0) <= -2e+14) tmp = t_1; elseif (Float64(a * 27.0) <= -1e-175) tmp = Float64(2.0 * x); elseif (Float64(a * 27.0) <= 2e-300) tmp = t_1; elseif (Float64(a * 27.0) <= 5e-118) tmp = Float64(2.0 * x); else tmp = Float64(b * Float64(a * 27.0)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = (y * (z * t)) * -9.0;
tmp = 0.0;
if ((a * 27.0) <= -5e+104)
tmp = (a * b) * 27.0;
elseif ((a * 27.0) <= -2e+14)
tmp = t_1;
elseif ((a * 27.0) <= -1e-175)
tmp = 2.0 * x;
elseif ((a * 27.0) <= 2e-300)
tmp = t_1;
elseif ((a * 27.0) <= 5e-118)
tmp = 2.0 * x;
else
tmp = b * (a * 27.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision] * -9.0), $MachinePrecision]}, If[LessEqual[N[(a * 27.0), $MachinePrecision], -5e+104], N[(N[(a * b), $MachinePrecision] * 27.0), $MachinePrecision], If[LessEqual[N[(a * 27.0), $MachinePrecision], -2e+14], t$95$1, If[LessEqual[N[(a * 27.0), $MachinePrecision], -1e-175], N[(2.0 * x), $MachinePrecision], If[LessEqual[N[(a * 27.0), $MachinePrecision], 2e-300], t$95$1, If[LessEqual[N[(a * 27.0), $MachinePrecision], 5e-118], N[(2.0 * x), $MachinePrecision], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := \left(y \cdot \left(z \cdot t\right)\right) \cdot -9\\
\mathbf{if}\;a \cdot 27 \leq -5 \cdot 10^{+104}:\\
\;\;\;\;\left(a \cdot b\right) \cdot 27\\
\mathbf{elif}\;a \cdot 27 \leq -2 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot 27 \leq -1 \cdot 10^{-175}:\\
\;\;\;\;2 \cdot x\\
\mathbf{elif}\;a \cdot 27 \leq 2 \cdot 10^{-300}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot 27 \leq 5 \cdot 10^{-118}:\\
\;\;\;\;2 \cdot x\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\end{array}
\end{array}
if (*.f64 a #s(literal 27 binary64)) < -4.9999999999999997e104Initial program 93.0%
Simplified0
Taylor expanded in a around inf 0
Simplified0
if -4.9999999999999997e104 < (*.f64 a #s(literal 27 binary64)) < -2e14 or -1e-175 < (*.f64 a #s(literal 27 binary64)) < 2.00000000000000005e-300Initial program 94.6%
Simplified0
Taylor expanded in y around inf 0
Simplified0
Applied egg-rr0
if -2e14 < (*.f64 a #s(literal 27 binary64)) < -1e-175 or 2.00000000000000005e-300 < (*.f64 a #s(literal 27 binary64)) < 5.00000000000000015e-118Initial program 98.6%
Simplified0
Taylor expanded in x around inf 0
Simplified0
if 5.00000000000000015e-118 < (*.f64 a #s(literal 27 binary64)) Initial program 95.1%
Simplified0
Applied egg-rr0
Taylor expanded in b around inf 0
Simplified0
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (* t (* z -9.0)) y)))
(if (<= (* a 27.0) -5e+104)
(* (* a b) 27.0)
(if (<= (* a 27.0) -2e+14)
t_1
(if (<= (* a 27.0) -1e-175)
(* 2.0 x)
(if (<= (* a 27.0) 2e-300)
t_1
(if (<= (* a 27.0) 5e-118) (* 2.0 x) (* b (* a 27.0)))))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t * (z * -9.0)) * y;
double tmp;
if ((a * 27.0) <= -5e+104) {
tmp = (a * b) * 27.0;
} else if ((a * 27.0) <= -2e+14) {
tmp = t_1;
} else if ((a * 27.0) <= -1e-175) {
tmp = 2.0 * x;
} else if ((a * 27.0) <= 2e-300) {
tmp = t_1;
} else if ((a * 27.0) <= 5e-118) {
tmp = 2.0 * x;
} else {
tmp = b * (a * 27.0);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 = (t * (z * (-9.0d0))) * y
if ((a * 27.0d0) <= (-5d+104)) then
tmp = (a * b) * 27.0d0
else if ((a * 27.0d0) <= (-2d+14)) then
tmp = t_1
else if ((a * 27.0d0) <= (-1d-175)) then
tmp = 2.0d0 * x
else if ((a * 27.0d0) <= 2d-300) then
tmp = t_1
else if ((a * 27.0d0) <= 5d-118) then
tmp = 2.0d0 * x
else
tmp = b * (a * 27.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t * (z * -9.0)) * y;
double tmp;
if ((a * 27.0) <= -5e+104) {
tmp = (a * b) * 27.0;
} else if ((a * 27.0) <= -2e+14) {
tmp = t_1;
} else if ((a * 27.0) <= -1e-175) {
tmp = 2.0 * x;
} else if ((a * 27.0) <= 2e-300) {
tmp = t_1;
} else if ((a * 27.0) <= 5e-118) {
tmp = 2.0 * x;
} else {
tmp = b * (a * 27.0);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = (t * (z * -9.0)) * y tmp = 0 if (a * 27.0) <= -5e+104: tmp = (a * b) * 27.0 elif (a * 27.0) <= -2e+14: tmp = t_1 elif (a * 27.0) <= -1e-175: tmp = 2.0 * x elif (a * 27.0) <= 2e-300: tmp = t_1 elif (a * 27.0) <= 5e-118: tmp = 2.0 * x else: tmp = b * (a * 27.0) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(Float64(t * Float64(z * -9.0)) * y) tmp = 0.0 if (Float64(a * 27.0) <= -5e+104) tmp = Float64(Float64(a * b) * 27.0); elseif (Float64(a * 27.0) <= -2e+14) tmp = t_1; elseif (Float64(a * 27.0) <= -1e-175) tmp = Float64(2.0 * x); elseif (Float64(a * 27.0) <= 2e-300) tmp = t_1; elseif (Float64(a * 27.0) <= 5e-118) tmp = Float64(2.0 * x); else tmp = Float64(b * Float64(a * 27.0)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = (t * (z * -9.0)) * y;
tmp = 0.0;
if ((a * 27.0) <= -5e+104)
tmp = (a * b) * 27.0;
elseif ((a * 27.0) <= -2e+14)
tmp = t_1;
elseif ((a * 27.0) <= -1e-175)
tmp = 2.0 * x;
elseif ((a * 27.0) <= 2e-300)
tmp = t_1;
elseif ((a * 27.0) <= 5e-118)
tmp = 2.0 * x;
else
tmp = b * (a * 27.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t * N[(z * -9.0), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[N[(a * 27.0), $MachinePrecision], -5e+104], N[(N[(a * b), $MachinePrecision] * 27.0), $MachinePrecision], If[LessEqual[N[(a * 27.0), $MachinePrecision], -2e+14], t$95$1, If[LessEqual[N[(a * 27.0), $MachinePrecision], -1e-175], N[(2.0 * x), $MachinePrecision], If[LessEqual[N[(a * 27.0), $MachinePrecision], 2e-300], t$95$1, If[LessEqual[N[(a * 27.0), $MachinePrecision], 5e-118], N[(2.0 * x), $MachinePrecision], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := \left(t \cdot \left(z \cdot -9\right)\right) \cdot y\\
\mathbf{if}\;a \cdot 27 \leq -5 \cdot 10^{+104}:\\
\;\;\;\;\left(a \cdot b\right) \cdot 27\\
\mathbf{elif}\;a \cdot 27 \leq -2 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot 27 \leq -1 \cdot 10^{-175}:\\
\;\;\;\;2 \cdot x\\
\mathbf{elif}\;a \cdot 27 \leq 2 \cdot 10^{-300}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot 27 \leq 5 \cdot 10^{-118}:\\
\;\;\;\;2 \cdot x\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\end{array}
\end{array}
if (*.f64 a #s(literal 27 binary64)) < -4.9999999999999997e104Initial program 93.0%
Simplified0
Taylor expanded in a around inf 0
Simplified0
if -4.9999999999999997e104 < (*.f64 a #s(literal 27 binary64)) < -2e14 or -1e-175 < (*.f64 a #s(literal 27 binary64)) < 2.00000000000000005e-300Initial program 94.6%
Simplified0
Taylor expanded in y around inf 0
Simplified0
Applied egg-rr0
if -2e14 < (*.f64 a #s(literal 27 binary64)) < -1e-175 or 2.00000000000000005e-300 < (*.f64 a #s(literal 27 binary64)) < 5.00000000000000015e-118Initial program 98.6%
Simplified0
Taylor expanded in x around inf 0
Simplified0
if 5.00000000000000015e-118 < (*.f64 a #s(literal 27 binary64)) Initial program 95.1%
Simplified0
Applied egg-rr0
Taylor expanded in b around inf 0
Simplified0
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (* a b) 27.0)) (t_2 (* (* a 27.0) b)))
(if (<= t_2 -5e+163)
(+ (* -9.0 (* t (* y z))) t_1)
(if (<= t_2 2e+91)
(+ (* (* y (* z t)) -9.0) (* 2.0 x))
(+ (* (* (* t -9.0) y) z) t_1)))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a * b) * 27.0;
double t_2 = (a * 27.0) * b;
double tmp;
if (t_2 <= -5e+163) {
tmp = (-9.0 * (t * (y * z))) + t_1;
} else if (t_2 <= 2e+91) {
tmp = ((y * (z * t)) * -9.0) + (2.0 * x);
} else {
tmp = (((t * -9.0) * y) * z) + t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (a * b) * 27.0d0
t_2 = (a * 27.0d0) * b
if (t_2 <= (-5d+163)) then
tmp = ((-9.0d0) * (t * (y * z))) + t_1
else if (t_2 <= 2d+91) then
tmp = ((y * (z * t)) * (-9.0d0)) + (2.0d0 * x)
else
tmp = (((t * (-9.0d0)) * y) * z) + t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a * b) * 27.0;
double t_2 = (a * 27.0) * b;
double tmp;
if (t_2 <= -5e+163) {
tmp = (-9.0 * (t * (y * z))) + t_1;
} else if (t_2 <= 2e+91) {
tmp = ((y * (z * t)) * -9.0) + (2.0 * x);
} else {
tmp = (((t * -9.0) * y) * z) + t_1;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = (a * b) * 27.0 t_2 = (a * 27.0) * b tmp = 0 if t_2 <= -5e+163: tmp = (-9.0 * (t * (y * z))) + t_1 elif t_2 <= 2e+91: tmp = ((y * (z * t)) * -9.0) + (2.0 * x) else: tmp = (((t * -9.0) * y) * z) + t_1 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(Float64(a * b) * 27.0) t_2 = Float64(Float64(a * 27.0) * b) tmp = 0.0 if (t_2 <= -5e+163) tmp = Float64(Float64(-9.0 * Float64(t * Float64(y * z))) + t_1); elseif (t_2 <= 2e+91) tmp = Float64(Float64(Float64(y * Float64(z * t)) * -9.0) + Float64(2.0 * x)); else tmp = Float64(Float64(Float64(Float64(t * -9.0) * y) * z) + t_1); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = (a * b) * 27.0;
t_2 = (a * 27.0) * b;
tmp = 0.0;
if (t_2 <= -5e+163)
tmp = (-9.0 * (t * (y * z))) + t_1;
elseif (t_2 <= 2e+91)
tmp = ((y * (z * t)) * -9.0) + (2.0 * x);
else
tmp = (((t * -9.0) * y) * z) + t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a * b), $MachinePrecision] * 27.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+163], N[(N[(-9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t$95$2, 2e+91], N[(N[(N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision] * -9.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(t * -9.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] + t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := \left(a \cdot b\right) \cdot 27\\
t_2 := \left(a \cdot 27\right) \cdot b\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+163}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(y \cdot z\right)\right) + t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+91}:\\
\;\;\;\;\left(y \cdot \left(z \cdot t\right)\right) \cdot -9 + 2 \cdot x\\
\mathbf{else}:\\
\;\;\;\;\left(\left(t \cdot -9\right) \cdot y\right) \cdot z + t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 a #s(literal 27 binary64)) b) < -5e163Initial program 91.2%
Simplified0
Taylor expanded in x around 0 0
Simplified0
if -5e163 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < 2.00000000000000016e91Initial program 96.3%
Simplified0
Taylor expanded in a around 0 0
Simplified0
Applied egg-rr0
if 2.00000000000000016e91 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) Initial program 97.9%
Simplified0
Taylor expanded in x around 0 0
Simplified0
Applied egg-rr0
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (* a 27.0) b))
(t_2 (+ (* -9.0 (* t (* y z))) (* (* a b) 27.0))))
(if (<= t_1 -5e+163)
t_2
(if (<= t_1 2e+91) (+ (* (* y (* z t)) -9.0) (* 2.0 x)) t_2))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a * 27.0) * b;
double t_2 = (-9.0 * (t * (y * z))) + ((a * b) * 27.0);
double tmp;
if (t_1 <= -5e+163) {
tmp = t_2;
} else if (t_1 <= 2e+91) {
tmp = ((y * (z * t)) * -9.0) + (2.0 * x);
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (a * 27.0d0) * b
t_2 = ((-9.0d0) * (t * (y * z))) + ((a * b) * 27.0d0)
if (t_1 <= (-5d+163)) then
tmp = t_2
else if (t_1 <= 2d+91) then
tmp = ((y * (z * t)) * (-9.0d0)) + (2.0d0 * x)
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a * 27.0) * b;
double t_2 = (-9.0 * (t * (y * z))) + ((a * b) * 27.0);
double tmp;
if (t_1 <= -5e+163) {
tmp = t_2;
} else if (t_1 <= 2e+91) {
tmp = ((y * (z * t)) * -9.0) + (2.0 * x);
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = (a * 27.0) * b t_2 = (-9.0 * (t * (y * z))) + ((a * b) * 27.0) tmp = 0 if t_1 <= -5e+163: tmp = t_2 elif t_1 <= 2e+91: tmp = ((y * (z * t)) * -9.0) + (2.0 * x) else: tmp = t_2 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(Float64(a * 27.0) * b) t_2 = Float64(Float64(-9.0 * Float64(t * Float64(y * z))) + Float64(Float64(a * b) * 27.0)) tmp = 0.0 if (t_1 <= -5e+163) tmp = t_2; elseif (t_1 <= 2e+91) tmp = Float64(Float64(Float64(y * Float64(z * t)) * -9.0) + Float64(2.0 * x)); else tmp = t_2; end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = (a * 27.0) * b;
t_2 = (-9.0 * (t * (y * z))) + ((a * b) * 27.0);
tmp = 0.0;
if (t_1 <= -5e+163)
tmp = t_2;
elseif (t_1 <= 2e+91)
tmp = ((y * (z * t)) * -9.0) + (2.0 * x);
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]}, Block[{t$95$2 = N[(N[(-9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+163], t$95$2, If[LessEqual[t$95$1, 2e+91], N[(N[(N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision] * -9.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := \left(a \cdot 27\right) \cdot b\\
t_2 := -9 \cdot \left(t \cdot \left(y \cdot z\right)\right) + \left(a \cdot b\right) \cdot 27\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+163}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+91}:\\
\;\;\;\;\left(y \cdot \left(z \cdot t\right)\right) \cdot -9 + 2 \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (*.f64 a #s(literal 27 binary64)) b) < -5e163 or 2.00000000000000016e91 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) Initial program 94.7%
Simplified0
Taylor expanded in x around 0 0
Simplified0
if -5e163 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < 2.00000000000000016e91Initial program 96.3%
Simplified0
Taylor expanded in a around 0 0
Simplified0
Applied egg-rr0
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (* a 27.0) b)))
(if (<= t_1 -2e+25)
(- (* (* b 27.0) a) (* x -2.0))
(if (<= t_1 2e-6)
(+ (* (* y (* z t)) -9.0) (* 2.0 x))
(+ (* 2.0 x) t_1)))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a * 27.0) * b;
double tmp;
if (t_1 <= -2e+25) {
tmp = ((b * 27.0) * a) - (x * -2.0);
} else if (t_1 <= 2e-6) {
tmp = ((y * (z * t)) * -9.0) + (2.0 * x);
} else {
tmp = (2.0 * x) + t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 = (a * 27.0d0) * b
if (t_1 <= (-2d+25)) then
tmp = ((b * 27.0d0) * a) - (x * (-2.0d0))
else if (t_1 <= 2d-6) then
tmp = ((y * (z * t)) * (-9.0d0)) + (2.0d0 * x)
else
tmp = (2.0d0 * x) + t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a * 27.0) * b;
double tmp;
if (t_1 <= -2e+25) {
tmp = ((b * 27.0) * a) - (x * -2.0);
} else if (t_1 <= 2e-6) {
tmp = ((y * (z * t)) * -9.0) + (2.0 * x);
} else {
tmp = (2.0 * x) + t_1;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = (a * 27.0) * b tmp = 0 if t_1 <= -2e+25: tmp = ((b * 27.0) * a) - (x * -2.0) elif t_1 <= 2e-6: tmp = ((y * (z * t)) * -9.0) + (2.0 * x) else: tmp = (2.0 * x) + t_1 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(Float64(a * 27.0) * b) tmp = 0.0 if (t_1 <= -2e+25) tmp = Float64(Float64(Float64(b * 27.0) * a) - Float64(x * -2.0)); elseif (t_1 <= 2e-6) tmp = Float64(Float64(Float64(y * Float64(z * t)) * -9.0) + Float64(2.0 * x)); else tmp = Float64(Float64(2.0 * x) + t_1); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = (a * 27.0) * b;
tmp = 0.0;
if (t_1 <= -2e+25)
tmp = ((b * 27.0) * a) - (x * -2.0);
elseif (t_1 <= 2e-6)
tmp = ((y * (z * t)) * -9.0) + (2.0 * x);
else
tmp = (2.0 * x) + t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+25], N[(N[(N[(b * 27.0), $MachinePrecision] * a), $MachinePrecision] - N[(x * -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e-6], N[(N[(N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision] * -9.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * x), $MachinePrecision] + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := \left(a \cdot 27\right) \cdot b\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+25}:\\
\;\;\;\;\left(b \cdot 27\right) \cdot a - x \cdot -2\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-6}:\\
\;\;\;\;\left(y \cdot \left(z \cdot t\right)\right) \cdot -9 + 2 \cdot x\\
\mathbf{else}:\\
\;\;\;\;2 \cdot x + t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 a #s(literal 27 binary64)) b) < -2.00000000000000018e25Initial program 94.1%
Simplified0
Taylor expanded in y around 0 0
Simplified0
Applied egg-rr0
if -2.00000000000000018e25 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < 1.99999999999999991e-6Initial program 96.0%
Simplified0
Taylor expanded in a around 0 0
Simplified0
Applied egg-rr0
if 1.99999999999999991e-6 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) Initial program 96.9%
Taylor expanded in x around inf 0
Simplified0
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (* a 27.0) b)))
(if (<= t_1 -2e+25)
(- (* (* b 27.0) a) (* x -2.0))
(if (<= t_1 2e-6)
(+ (* -9.0 (* t (* y z))) (* 2.0 x))
(+ (* 2.0 x) t_1)))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a * 27.0) * b;
double tmp;
if (t_1 <= -2e+25) {
tmp = ((b * 27.0) * a) - (x * -2.0);
} else if (t_1 <= 2e-6) {
tmp = (-9.0 * (t * (y * z))) + (2.0 * x);
} else {
tmp = (2.0 * x) + t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 = (a * 27.0d0) * b
if (t_1 <= (-2d+25)) then
tmp = ((b * 27.0d0) * a) - (x * (-2.0d0))
else if (t_1 <= 2d-6) then
tmp = ((-9.0d0) * (t * (y * z))) + (2.0d0 * x)
else
tmp = (2.0d0 * x) + t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a * 27.0) * b;
double tmp;
if (t_1 <= -2e+25) {
tmp = ((b * 27.0) * a) - (x * -2.0);
} else if (t_1 <= 2e-6) {
tmp = (-9.0 * (t * (y * z))) + (2.0 * x);
} else {
tmp = (2.0 * x) + t_1;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = (a * 27.0) * b tmp = 0 if t_1 <= -2e+25: tmp = ((b * 27.0) * a) - (x * -2.0) elif t_1 <= 2e-6: tmp = (-9.0 * (t * (y * z))) + (2.0 * x) else: tmp = (2.0 * x) + t_1 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(Float64(a * 27.0) * b) tmp = 0.0 if (t_1 <= -2e+25) tmp = Float64(Float64(Float64(b * 27.0) * a) - Float64(x * -2.0)); elseif (t_1 <= 2e-6) tmp = Float64(Float64(-9.0 * Float64(t * Float64(y * z))) + Float64(2.0 * x)); else tmp = Float64(Float64(2.0 * x) + t_1); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = (a * 27.0) * b;
tmp = 0.0;
if (t_1 <= -2e+25)
tmp = ((b * 27.0) * a) - (x * -2.0);
elseif (t_1 <= 2e-6)
tmp = (-9.0 * (t * (y * z))) + (2.0 * x);
else
tmp = (2.0 * x) + t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+25], N[(N[(N[(b * 27.0), $MachinePrecision] * a), $MachinePrecision] - N[(x * -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e-6], N[(N[(-9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * x), $MachinePrecision] + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := \left(a \cdot 27\right) \cdot b\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+25}:\\
\;\;\;\;\left(b \cdot 27\right) \cdot a - x \cdot -2\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-6}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(y \cdot z\right)\right) + 2 \cdot x\\
\mathbf{else}:\\
\;\;\;\;2 \cdot x + t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 a #s(literal 27 binary64)) b) < -2.00000000000000018e25Initial program 94.1%
Simplified0
Taylor expanded in y around 0 0
Simplified0
Applied egg-rr0
if -2.00000000000000018e25 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < 1.99999999999999991e-6Initial program 96.0%
Simplified0
Taylor expanded in a around 0 0
Simplified0
if 1.99999999999999991e-6 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) Initial program 96.9%
Taylor expanded in x around inf 0
Simplified0
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= b -3e-135)
(* (* a b) 27.0)
(if (<= b 3.2e+74)
(* 2.0 x)
(if (<= b 8.6e+102)
(* -9.0 (* t (* y z)))
(if (<= b 1.95e+129) (* 2.0 x) (* b (* a 27.0)))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -3e-135) {
tmp = (a * b) * 27.0;
} else if (b <= 3.2e+74) {
tmp = 2.0 * x;
} else if (b <= 8.6e+102) {
tmp = -9.0 * (t * (y * z));
} else if (b <= 1.95e+129) {
tmp = 2.0 * x;
} else {
tmp = b * (a * 27.0);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-3d-135)) then
tmp = (a * b) * 27.0d0
else if (b <= 3.2d+74) then
tmp = 2.0d0 * x
else if (b <= 8.6d+102) then
tmp = (-9.0d0) * (t * (y * z))
else if (b <= 1.95d+129) then
tmp = 2.0d0 * x
else
tmp = b * (a * 27.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -3e-135) {
tmp = (a * b) * 27.0;
} else if (b <= 3.2e+74) {
tmp = 2.0 * x;
} else if (b <= 8.6e+102) {
tmp = -9.0 * (t * (y * z));
} else if (b <= 1.95e+129) {
tmp = 2.0 * x;
} else {
tmp = b * (a * 27.0);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if b <= -3e-135: tmp = (a * b) * 27.0 elif b <= 3.2e+74: tmp = 2.0 * x elif b <= 8.6e+102: tmp = -9.0 * (t * (y * z)) elif b <= 1.95e+129: tmp = 2.0 * x else: tmp = b * (a * 27.0) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -3e-135) tmp = Float64(Float64(a * b) * 27.0); elseif (b <= 3.2e+74) tmp = Float64(2.0 * x); elseif (b <= 8.6e+102) tmp = Float64(-9.0 * Float64(t * Float64(y * z))); elseif (b <= 1.95e+129) tmp = Float64(2.0 * x); else tmp = Float64(b * Float64(a * 27.0)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (b <= -3e-135)
tmp = (a * b) * 27.0;
elseif (b <= 3.2e+74)
tmp = 2.0 * x;
elseif (b <= 8.6e+102)
tmp = -9.0 * (t * (y * z));
elseif (b <= 1.95e+129)
tmp = 2.0 * x;
else
tmp = b * (a * 27.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -3e-135], N[(N[(a * b), $MachinePrecision] * 27.0), $MachinePrecision], If[LessEqual[b, 3.2e+74], N[(2.0 * x), $MachinePrecision], If[LessEqual[b, 8.6e+102], N[(-9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.95e+129], N[(2.0 * x), $MachinePrecision], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3 \cdot 10^{-135}:\\
\;\;\;\;\left(a \cdot b\right) \cdot 27\\
\mathbf{elif}\;b \leq 3.2 \cdot 10^{+74}:\\
\;\;\;\;2 \cdot x\\
\mathbf{elif}\;b \leq 8.6 \cdot 10^{+102}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\mathbf{elif}\;b \leq 1.95 \cdot 10^{+129}:\\
\;\;\;\;2 \cdot x\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\end{array}
\end{array}
if b < -3.00000000000000012e-135Initial program 95.7%
Simplified0
Taylor expanded in a around inf 0
Simplified0
if -3.00000000000000012e-135 < b < 3.19999999999999995e74 or 8.6000000000000002e102 < b < 1.9499999999999999e129Initial program 96.4%
Simplified0
Taylor expanded in x around inf 0
Simplified0
if 3.19999999999999995e74 < b < 8.6000000000000002e102Initial program 88.2%
Simplified0
Taylor expanded in y around inf 0
Simplified0
if 1.9499999999999999e129 < b Initial program 95.2%
Simplified0
Applied egg-rr0
Taylor expanded in b around inf 0
Simplified0
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= y -7.6e+238)
(* (* t (* z -9.0)) y)
(if (<= y -6.5e+228)
(+ (* 2.0 x) (* (* a 27.0) b))
(if (<= y -1.8e+177)
(* (* y (* z t)) -9.0)
(- (* (* b 27.0) a) (* x -2.0))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -7.6e+238) {
tmp = (t * (z * -9.0)) * y;
} else if (y <= -6.5e+228) {
tmp = (2.0 * x) + ((a * 27.0) * b);
} else if (y <= -1.8e+177) {
tmp = (y * (z * t)) * -9.0;
} else {
tmp = ((b * 27.0) * a) - (x * -2.0);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 <= (-7.6d+238)) then
tmp = (t * (z * (-9.0d0))) * y
else if (y <= (-6.5d+228)) then
tmp = (2.0d0 * x) + ((a * 27.0d0) * b)
else if (y <= (-1.8d+177)) then
tmp = (y * (z * t)) * (-9.0d0)
else
tmp = ((b * 27.0d0) * a) - (x * (-2.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -7.6e+238) {
tmp = (t * (z * -9.0)) * y;
} else if (y <= -6.5e+228) {
tmp = (2.0 * x) + ((a * 27.0) * b);
} else if (y <= -1.8e+177) {
tmp = (y * (z * t)) * -9.0;
} else {
tmp = ((b * 27.0) * a) - (x * -2.0);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if y <= -7.6e+238: tmp = (t * (z * -9.0)) * y elif y <= -6.5e+228: tmp = (2.0 * x) + ((a * 27.0) * b) elif y <= -1.8e+177: tmp = (y * (z * t)) * -9.0 else: tmp = ((b * 27.0) * a) - (x * -2.0) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -7.6e+238) tmp = Float64(Float64(t * Float64(z * -9.0)) * y); elseif (y <= -6.5e+228) tmp = Float64(Float64(2.0 * x) + Float64(Float64(a * 27.0) * b)); elseif (y <= -1.8e+177) tmp = Float64(Float64(y * Float64(z * t)) * -9.0); else tmp = Float64(Float64(Float64(b * 27.0) * a) - Float64(x * -2.0)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (y <= -7.6e+238)
tmp = (t * (z * -9.0)) * y;
elseif (y <= -6.5e+228)
tmp = (2.0 * x) + ((a * 27.0) * b);
elseif (y <= -1.8e+177)
tmp = (y * (z * t)) * -9.0;
else
tmp = ((b * 27.0) * a) - (x * -2.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -7.6e+238], N[(N[(t * N[(z * -9.0), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[y, -6.5e+228], N[(N[(2.0 * x), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.8e+177], N[(N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision] * -9.0), $MachinePrecision], N[(N[(N[(b * 27.0), $MachinePrecision] * a), $MachinePrecision] - N[(x * -2.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.6 \cdot 10^{+238}:\\
\;\;\;\;\left(t \cdot \left(z \cdot -9\right)\right) \cdot y\\
\mathbf{elif}\;y \leq -6.5 \cdot 10^{+228}:\\
\;\;\;\;2 \cdot x + \left(a \cdot 27\right) \cdot b\\
\mathbf{elif}\;y \leq -1.8 \cdot 10^{+177}:\\
\;\;\;\;\left(y \cdot \left(z \cdot t\right)\right) \cdot -9\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot 27\right) \cdot a - x \cdot -2\\
\end{array}
\end{array}
if y < -7.60000000000000049e238Initial program 76.8%
Simplified0
Taylor expanded in y around inf 0
Simplified0
Applied egg-rr0
if -7.60000000000000049e238 < y < -6.5e228Initial program 100.0%
Taylor expanded in x around inf 0
Simplified0
if -6.5e228 < y < -1.80000000000000001e177Initial program 99.8%
Simplified0
Taylor expanded in y around inf 0
Simplified0
Applied egg-rr0
if -1.80000000000000001e177 < y Initial program 96.5%
Simplified0
Taylor expanded in y around 0 0
Simplified0
Applied egg-rr0
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= y -4.3e+238)
(* (* t (* z -9.0)) y)
(if (<= y -1.08e+229)
(+ (* 2.0 x) (* (* a 27.0) b))
(if (<= y -6.5e+176)
(* (* y (* z t)) -9.0)
(- (* (* a b) 27.0) (* x -2.0))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -4.3e+238) {
tmp = (t * (z * -9.0)) * y;
} else if (y <= -1.08e+229) {
tmp = (2.0 * x) + ((a * 27.0) * b);
} else if (y <= -6.5e+176) {
tmp = (y * (z * t)) * -9.0;
} else {
tmp = ((a * b) * 27.0) - (x * -2.0);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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.3d+238)) then
tmp = (t * (z * (-9.0d0))) * y
else if (y <= (-1.08d+229)) then
tmp = (2.0d0 * x) + ((a * 27.0d0) * b)
else if (y <= (-6.5d+176)) then
tmp = (y * (z * t)) * (-9.0d0)
else
tmp = ((a * b) * 27.0d0) - (x * (-2.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -4.3e+238) {
tmp = (t * (z * -9.0)) * y;
} else if (y <= -1.08e+229) {
tmp = (2.0 * x) + ((a * 27.0) * b);
} else if (y <= -6.5e+176) {
tmp = (y * (z * t)) * -9.0;
} else {
tmp = ((a * b) * 27.0) - (x * -2.0);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if y <= -4.3e+238: tmp = (t * (z * -9.0)) * y elif y <= -1.08e+229: tmp = (2.0 * x) + ((a * 27.0) * b) elif y <= -6.5e+176: tmp = (y * (z * t)) * -9.0 else: tmp = ((a * b) * 27.0) - (x * -2.0) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -4.3e+238) tmp = Float64(Float64(t * Float64(z * -9.0)) * y); elseif (y <= -1.08e+229) tmp = Float64(Float64(2.0 * x) + Float64(Float64(a * 27.0) * b)); elseif (y <= -6.5e+176) tmp = Float64(Float64(y * Float64(z * t)) * -9.0); else tmp = Float64(Float64(Float64(a * b) * 27.0) - Float64(x * -2.0)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (y <= -4.3e+238)
tmp = (t * (z * -9.0)) * y;
elseif (y <= -1.08e+229)
tmp = (2.0 * x) + ((a * 27.0) * b);
elseif (y <= -6.5e+176)
tmp = (y * (z * t)) * -9.0;
else
tmp = ((a * b) * 27.0) - (x * -2.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -4.3e+238], N[(N[(t * N[(z * -9.0), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[y, -1.08e+229], N[(N[(2.0 * x), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -6.5e+176], N[(N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision] * -9.0), $MachinePrecision], N[(N[(N[(a * b), $MachinePrecision] * 27.0), $MachinePrecision] - N[(x * -2.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.3 \cdot 10^{+238}:\\
\;\;\;\;\left(t \cdot \left(z \cdot -9\right)\right) \cdot y\\
\mathbf{elif}\;y \leq -1.08 \cdot 10^{+229}:\\
\;\;\;\;2 \cdot x + \left(a \cdot 27\right) \cdot b\\
\mathbf{elif}\;y \leq -6.5 \cdot 10^{+176}:\\
\;\;\;\;\left(y \cdot \left(z \cdot t\right)\right) \cdot -9\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot b\right) \cdot 27 - x \cdot -2\\
\end{array}
\end{array}
if y < -4.29999999999999983e238Initial program 76.8%
Simplified0
Taylor expanded in y around inf 0
Simplified0
Applied egg-rr0
if -4.29999999999999983e238 < y < -1.0800000000000001e229Initial program 100.0%
Taylor expanded in x around inf 0
Simplified0
if -1.0800000000000001e229 < y < -6.49999999999999949e176Initial program 99.8%
Simplified0
Taylor expanded in y around inf 0
Simplified0
Applied egg-rr0
if -6.49999999999999949e176 < y Initial program 96.5%
Simplified0
Taylor expanded in y around 0 0
Simplified0
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* 2.0 x) (* (* a 27.0) b))))
(if (<= y -4e+239)
(* (* t (* z -9.0)) y)
(if (<= y -2.95e+229)
t_1
(if (<= y -1.65e+177) (* (* y (* z t)) -9.0) t_1)))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (2.0 * x) + ((a * 27.0) * b);
double tmp;
if (y <= -4e+239) {
tmp = (t * (z * -9.0)) * y;
} else if (y <= -2.95e+229) {
tmp = t_1;
} else if (y <= -1.65e+177) {
tmp = (y * (z * t)) * -9.0;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 = (2.0d0 * x) + ((a * 27.0d0) * b)
if (y <= (-4d+239)) then
tmp = (t * (z * (-9.0d0))) * y
else if (y <= (-2.95d+229)) then
tmp = t_1
else if (y <= (-1.65d+177)) then
tmp = (y * (z * t)) * (-9.0d0)
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (2.0 * x) + ((a * 27.0) * b);
double tmp;
if (y <= -4e+239) {
tmp = (t * (z * -9.0)) * y;
} else if (y <= -2.95e+229) {
tmp = t_1;
} else if (y <= -1.65e+177) {
tmp = (y * (z * t)) * -9.0;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = (2.0 * x) + ((a * 27.0) * b) tmp = 0 if y <= -4e+239: tmp = (t * (z * -9.0)) * y elif y <= -2.95e+229: tmp = t_1 elif y <= -1.65e+177: tmp = (y * (z * t)) * -9.0 else: tmp = t_1 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(Float64(2.0 * x) + Float64(Float64(a * 27.0) * b)) tmp = 0.0 if (y <= -4e+239) tmp = Float64(Float64(t * Float64(z * -9.0)) * y); elseif (y <= -2.95e+229) tmp = t_1; elseif (y <= -1.65e+177) tmp = Float64(Float64(y * Float64(z * t)) * -9.0); else tmp = t_1; end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = (2.0 * x) + ((a * 27.0) * b);
tmp = 0.0;
if (y <= -4e+239)
tmp = (t * (z * -9.0)) * y;
elseif (y <= -2.95e+229)
tmp = t_1;
elseif (y <= -1.65e+177)
tmp = (y * (z * t)) * -9.0;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(2.0 * x), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4e+239], N[(N[(t * N[(z * -9.0), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[y, -2.95e+229], t$95$1, If[LessEqual[y, -1.65e+177], N[(N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision] * -9.0), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := 2 \cdot x + \left(a \cdot 27\right) \cdot b\\
\mathbf{if}\;y \leq -4 \cdot 10^{+239}:\\
\;\;\;\;\left(t \cdot \left(z \cdot -9\right)\right) \cdot y\\
\mathbf{elif}\;y \leq -2.95 \cdot 10^{+229}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.65 \cdot 10^{+177}:\\
\;\;\;\;\left(y \cdot \left(z \cdot t\right)\right) \cdot -9\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -3.99999999999999996e239Initial program 76.8%
Simplified0
Taylor expanded in y around inf 0
Simplified0
Applied egg-rr0
if -3.99999999999999996e239 < y < -2.9499999999999999e229 or -1.6500000000000001e177 < y Initial program 96.5%
Taylor expanded in x around inf 0
Simplified0
if -2.9499999999999999e229 < y < -1.6500000000000001e177Initial program 99.8%
Simplified0
Taylor expanded in y around inf 0
Simplified0
Applied egg-rr0
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= z 4.5e+142) (+ (* y (* (* z t) -9.0)) (- (* x 2.0) (* (* b -27.0) a))) (+ (* (* (* t -9.0) y) z) (* (* a b) 27.0))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 4.5e+142) {
tmp = (y * ((z * t) * -9.0)) + ((x * 2.0) - ((b * -27.0) * a));
} else {
tmp = (((t * -9.0) * y) * z) + ((a * b) * 27.0);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 (z <= 4.5d+142) then
tmp = (y * ((z * t) * (-9.0d0))) + ((x * 2.0d0) - ((b * (-27.0d0)) * a))
else
tmp = (((t * (-9.0d0)) * y) * z) + ((a * b) * 27.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 4.5e+142) {
tmp = (y * ((z * t) * -9.0)) + ((x * 2.0) - ((b * -27.0) * a));
} else {
tmp = (((t * -9.0) * y) * z) + ((a * b) * 27.0);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= 4.5e+142: tmp = (y * ((z * t) * -9.0)) + ((x * 2.0) - ((b * -27.0) * a)) else: tmp = (((t * -9.0) * y) * z) + ((a * b) * 27.0) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= 4.5e+142) tmp = Float64(Float64(y * Float64(Float64(z * t) * -9.0)) + Float64(Float64(x * 2.0) - Float64(Float64(b * -27.0) * a))); else tmp = Float64(Float64(Float64(Float64(t * -9.0) * y) * z) + Float64(Float64(a * b) * 27.0)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= 4.5e+142)
tmp = (y * ((z * t) * -9.0)) + ((x * 2.0) - ((b * -27.0) * a));
else
tmp = (((t * -9.0) * y) * z) + ((a * b) * 27.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 4.5e+142], N[(N[(y * N[(N[(z * t), $MachinePrecision] * -9.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x * 2.0), $MachinePrecision] - N[(N[(b * -27.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(t * -9.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] * 27.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 4.5 \cdot 10^{+142}:\\
\;\;\;\;y \cdot \left(\left(z \cdot t\right) \cdot -9\right) + \left(x \cdot 2 - \left(b \cdot -27\right) \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(t \cdot -9\right) \cdot y\right) \cdot z + \left(a \cdot b\right) \cdot 27\\
\end{array}
\end{array}
if z < 4.4999999999999999e142Initial program 97.3%
Simplified0
Applied egg-rr0
if 4.4999999999999999e142 < z Initial program 83.8%
Simplified0
Taylor expanded in x around 0 0
Simplified0
Applied egg-rr0
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= z 1.05e+138) (+ (* y (* (* z t) -9.0)) (- (* x 2.0) (* (* a b) -27.0))) (+ (* (* (* t -9.0) y) z) (* (* a b) 27.0))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 1.05e+138) {
tmp = (y * ((z * t) * -9.0)) + ((x * 2.0) - ((a * b) * -27.0));
} else {
tmp = (((t * -9.0) * y) * z) + ((a * b) * 27.0);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 (z <= 1.05d+138) then
tmp = (y * ((z * t) * (-9.0d0))) + ((x * 2.0d0) - ((a * b) * (-27.0d0)))
else
tmp = (((t * (-9.0d0)) * y) * z) + ((a * b) * 27.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 1.05e+138) {
tmp = (y * ((z * t) * -9.0)) + ((x * 2.0) - ((a * b) * -27.0));
} else {
tmp = (((t * -9.0) * y) * z) + ((a * b) * 27.0);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= 1.05e+138: tmp = (y * ((z * t) * -9.0)) + ((x * 2.0) - ((a * b) * -27.0)) else: tmp = (((t * -9.0) * y) * z) + ((a * b) * 27.0) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= 1.05e+138) tmp = Float64(Float64(y * Float64(Float64(z * t) * -9.0)) + Float64(Float64(x * 2.0) - Float64(Float64(a * b) * -27.0))); else tmp = Float64(Float64(Float64(Float64(t * -9.0) * y) * z) + Float64(Float64(a * b) * 27.0)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= 1.05e+138)
tmp = (y * ((z * t) * -9.0)) + ((x * 2.0) - ((a * b) * -27.0));
else
tmp = (((t * -9.0) * y) * z) + ((a * b) * 27.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 1.05e+138], N[(N[(y * N[(N[(z * t), $MachinePrecision] * -9.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x * 2.0), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(t * -9.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] * 27.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 1.05 \cdot 10^{+138}:\\
\;\;\;\;y \cdot \left(\left(z \cdot t\right) \cdot -9\right) + \left(x \cdot 2 - \left(a \cdot b\right) \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(t \cdot -9\right) \cdot y\right) \cdot z + \left(a \cdot b\right) \cdot 27\\
\end{array}
\end{array}
if z < 1.05000000000000003e138Initial program 97.3%
Simplified0
if 1.05000000000000003e138 < z Initial program 84.3%
Simplified0
Taylor expanded in x around 0 0
Simplified0
Applied egg-rr0
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= b -1.2e-137) (* (* a b) 27.0) (if (<= b 5800.0) (* 2.0 x) (* b (* a 27.0)))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.2e-137) {
tmp = (a * b) * 27.0;
} else if (b <= 5800.0) {
tmp = 2.0 * x;
} else {
tmp = b * (a * 27.0);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-1.2d-137)) then
tmp = (a * b) * 27.0d0
else if (b <= 5800.0d0) then
tmp = 2.0d0 * x
else
tmp = b * (a * 27.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.2e-137) {
tmp = (a * b) * 27.0;
} else if (b <= 5800.0) {
tmp = 2.0 * x;
} else {
tmp = b * (a * 27.0);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if b <= -1.2e-137: tmp = (a * b) * 27.0 elif b <= 5800.0: tmp = 2.0 * x else: tmp = b * (a * 27.0) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.2e-137) tmp = Float64(Float64(a * b) * 27.0); elseif (b <= 5800.0) tmp = Float64(2.0 * x); else tmp = Float64(b * Float64(a * 27.0)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (b <= -1.2e-137)
tmp = (a * b) * 27.0;
elseif (b <= 5800.0)
tmp = 2.0 * x;
else
tmp = b * (a * 27.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.2e-137], N[(N[(a * b), $MachinePrecision] * 27.0), $MachinePrecision], If[LessEqual[b, 5800.0], N[(2.0 * x), $MachinePrecision], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.2 \cdot 10^{-137}:\\
\;\;\;\;\left(a \cdot b\right) \cdot 27\\
\mathbf{elif}\;b \leq 5800:\\
\;\;\;\;2 \cdot x\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\end{array}
\end{array}
if b < -1.2e-137Initial program 95.7%
Simplified0
Taylor expanded in a around inf 0
Simplified0
if -1.2e-137 < b < 5800Initial program 98.7%
Simplified0
Taylor expanded in x around inf 0
Simplified0
if 5800 < b Initial program 92.2%
Simplified0
Applied egg-rr0
Taylor expanded in b around inf 0
Simplified0
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (* a 27.0)))) (if (<= b -1.8e-135) t_1 (if (<= b 1300.0) (* 2.0 x) t_1))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a * 27.0);
double tmp;
if (b <= -1.8e-135) {
tmp = t_1;
} else if (b <= 1300.0) {
tmp = 2.0 * x;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 = b * (a * 27.0d0)
if (b <= (-1.8d-135)) then
tmp = t_1
else if (b <= 1300.0d0) then
tmp = 2.0d0 * x
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a * 27.0);
double tmp;
if (b <= -1.8e-135) {
tmp = t_1;
} else if (b <= 1300.0) {
tmp = 2.0 * x;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = b * (a * 27.0) tmp = 0 if b <= -1.8e-135: tmp = t_1 elif b <= 1300.0: tmp = 2.0 * x else: tmp = t_1 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a * 27.0)) tmp = 0.0 if (b <= -1.8e-135) tmp = t_1; elseif (b <= 1300.0) tmp = Float64(2.0 * x); else tmp = t_1; end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = b * (a * 27.0);
tmp = 0.0;
if (b <= -1.8e-135)
tmp = t_1;
elseif (b <= 1300.0)
tmp = 2.0 * x;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.8e-135], t$95$1, If[LessEqual[b, 1300.0], N[(2.0 * x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := b \cdot \left(a \cdot 27\right)\\
\mathbf{if}\;b \leq -1.8 \cdot 10^{-135}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1300:\\
\;\;\;\;2 \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.79999999999999989e-135 or 1300 < b Initial program 94.2%
Simplified0
Applied egg-rr0
Taylor expanded in b around inf 0
Simplified0
if -1.79999999999999989e-135 < b < 1300Initial program 98.7%
Simplified0
Taylor expanded in x around inf 0
Simplified0
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (* 2.0 x))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
return 2.0 * x;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 = 2.0d0 * x
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
return 2.0 * x;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): return 2.0 * x
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) return Float64(2.0 * x) end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp = code(x, y, z, t, a, b)
tmp = 2.0 * x;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := N[(2.0 * x), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
2 \cdot x
\end{array}
Initial program 95.7%
Simplified0
Taylor expanded in x around inf 0
Simplified0
(FPCore (x y z t a b) :precision binary64 (if (< y 7.590524218811189e-161) (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* a (* 27.0 b))) (+ (- (* x 2.0) (* 9.0 (* y (* t z)))) (* (* a 27.0) b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y < 7.590524218811189e-161) {
tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b));
} else {
tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y < 7.590524218811189d-161) then
tmp = ((x * 2.0d0) - (((y * 9.0d0) * z) * t)) + (a * (27.0d0 * b))
else
tmp = ((x * 2.0d0) - (9.0d0 * (y * (t * z)))) + ((a * 27.0d0) * b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y < 7.590524218811189e-161) {
tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b));
} else {
tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y < 7.590524218811189e-161: tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b)) else: tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y < 7.590524218811189e-161) tmp = Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + Float64(a * Float64(27.0 * b))); else tmp = Float64(Float64(Float64(x * 2.0) - Float64(9.0 * Float64(y * Float64(t * z)))) + Float64(Float64(a * 27.0) * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y < 7.590524218811189e-161) tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b)); else tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Less[y, 7.590524218811189e-161], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(y * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y < 7.590524218811189 \cdot 10^{-161}:\\
\;\;\;\;\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 2 - 9 \cdot \left(y \cdot \left(t \cdot z\right)\right)\right) + \left(a \cdot 27\right) \cdot b\\
\end{array}
\end{array}
herbie shell --seed 2024110
(FPCore (x y z t a b)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, A"
:precision binary64
:alt
(if (< y 7.590524218811189e-161) (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* a (* 27.0 b))) (+ (- (* x 2.0) (* 9.0 (* y (* t z)))) (* (* a 27.0) b)))
(+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))