
(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 14 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.
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 9.0) z)))
(if (<= t_1 4e+142)
(+ (- (* x 2.0) (* t_1 t)) (* (* a 27.0) b))
(+ (* y (* z (* t -9.0))) (- (* x 2.0) (* a (* b -27.0)))))))assert(x < y && y < z && z < t && t < a && a < 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 t_1 = (y * 9.0) * z;
double tmp;
if (t_1 <= 4e+142) {
tmp = ((x * 2.0) - (t_1 * t)) + ((a * 27.0) * b);
} else {
tmp = (y * (z * (t * -9.0))) + ((x * 2.0) - (a * (b * -27.0)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 * 9.0d0) * z
if (t_1 <= 4d+142) then
tmp = ((x * 2.0d0) - (t_1 * t)) + ((a * 27.0d0) * b)
else
tmp = (y * (z * (t * (-9.0d0)))) + ((x * 2.0d0) - (a * (b * (-27.0d0))))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
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 * 9.0) * z;
double tmp;
if (t_1 <= 4e+142) {
tmp = ((x * 2.0) - (t_1 * t)) + ((a * 27.0) * b);
} else {
tmp = (y * (z * (t * -9.0))) + ((x * 2.0) - (a * (b * -27.0)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = (y * 9.0) * z tmp = 0 if t_1 <= 4e+142: tmp = ((x * 2.0) - (t_1 * t)) + ((a * 27.0) * b) else: tmp = (y * (z * (t * -9.0))) + ((x * 2.0) - (a * (b * -27.0))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) 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 * 9.0) * z) tmp = 0.0 if (t_1 <= 4e+142) tmp = Float64(Float64(Float64(x * 2.0) - Float64(t_1 * t)) + Float64(Float64(a * 27.0) * b)); else tmp = Float64(Float64(y * Float64(z * Float64(t * -9.0))) + Float64(Float64(x * 2.0) - Float64(a * Float64(b * -27.0)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
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 * 9.0) * z;
tmp = 0.0;
if (t_1 <= 4e+142)
tmp = ((x * 2.0) - (t_1 * t)) + ((a * 27.0) * b);
else
tmp = (y * (z * (t * -9.0))) + ((x * 2.0) - (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.
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 * 9.0), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[t$95$1, 4e+142], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(t$95$1 * t), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x * 2.0), $MachinePrecision] - N[(a * N[(b * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := \left(y \cdot 9\right) \cdot z\\
\mathbf{if}\;t\_1 \leq 4 \cdot 10^{+142}:\\
\;\;\;\;\left(x \cdot 2 - t\_1 \cdot t\right) + \left(a \cdot 27\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(z \cdot \left(t \cdot -9\right)\right) + \left(x \cdot 2 - a \cdot \left(b \cdot -27\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 y #s(literal 9 binary64)) z) < 4.0000000000000002e142Initial program 95.5%
if 4.0000000000000002e142 < (*.f64 (*.f64 y #s(literal 9 binary64)) z) Initial program 94.0%
Simplified0
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 -4.5e+151)
(* (* a b) 27.0)
(if (<= t_1 -1e-182)
(* (* z t) (* y -9.0))
(if (<= t_1 5e-305)
(* 2.0 x)
(if (<= t_1 2e+227) (* (* y z) (* t -9.0)) t_1))))))assert(x < y && y < z && z < t && t < a && a < 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 t_1 = (a * 27.0) * b;
double tmp;
if (t_1 <= -4.5e+151) {
tmp = (a * b) * 27.0;
} else if (t_1 <= -1e-182) {
tmp = (z * t) * (y * -9.0);
} else if (t_1 <= 5e-305) {
tmp = 2.0 * x;
} else if (t_1 <= 2e+227) {
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.
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 <= (-4.5d+151)) then
tmp = (a * b) * 27.0d0
else if (t_1 <= (-1d-182)) then
tmp = (z * t) * (y * (-9.0d0))
else if (t_1 <= 5d-305) then
tmp = 2.0d0 * x
else if (t_1 <= 2d+227) 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;
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 <= -4.5e+151) {
tmp = (a * b) * 27.0;
} else if (t_1 <= -1e-182) {
tmp = (z * t) * (y * -9.0);
} else if (t_1 <= 5e-305) {
tmp = 2.0 * x;
} else if (t_1 <= 2e+227) {
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]) [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 <= -4.5e+151: tmp = (a * b) * 27.0 elif t_1 <= -1e-182: tmp = (z * t) * (y * -9.0) elif t_1 <= 5e-305: tmp = 2.0 * x elif t_1 <= 2e+227: 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]) 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 <= -4.5e+151) tmp = Float64(Float64(a * b) * 27.0); elseif (t_1 <= -1e-182) tmp = Float64(Float64(z * t) * Float64(y * -9.0)); elseif (t_1 <= 5e-305) tmp = Float64(2.0 * x); elseif (t_1 <= 2e+227) tmp = Float64(Float64(y * z) * Float64(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])){:}
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 <= -4.5e+151)
tmp = (a * b) * 27.0;
elseif (t_1 <= -1e-182)
tmp = (z * t) * (y * -9.0);
elseif (t_1 <= 5e-305)
tmp = 2.0 * x;
elseif (t_1 <= 2e+227)
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.
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, -4.5e+151], N[(N[(a * b), $MachinePrecision] * 27.0), $MachinePrecision], If[LessEqual[t$95$1, -1e-182], N[(N[(z * t), $MachinePrecision] * N[(y * -9.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e-305], N[(2.0 * x), $MachinePrecision], If[LessEqual[t$95$1, 2e+227], N[(N[(y * z), $MachinePrecision] * N[(t * -9.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[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 -4.5 \cdot 10^{+151}:\\
\;\;\;\;\left(a \cdot b\right) \cdot 27\\
\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-182}:\\
\;\;\;\;\left(z \cdot t\right) \cdot \left(y \cdot -9\right)\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-305}:\\
\;\;\;\;2 \cdot x\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+227}:\\
\;\;\;\;\left(y \cdot z\right) \cdot \left(t \cdot -9\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 a #s(literal 27 binary64)) b) < -4.4999999999999999e151Initial program 92.4%
Simplified0
Taylor expanded in a around inf 0
Simplified0
if -4.4999999999999999e151 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < -1e-182Initial program 96.6%
Simplified0
Taylor expanded in y around inf 0
Simplified0
Applied egg-rr0
if -1e-182 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < 4.99999999999999985e-305Initial program 97.8%
Simplified0
Taylor expanded in x around inf 0
Simplified0
if 4.99999999999999985e-305 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < 2.0000000000000002e227Initial program 97.7%
Simplified0
Taylor expanded in y around inf 0
Simplified0
Applied egg-rr0
if 2.0000000000000002e227 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) Initial program 84.4%
Applied egg-rr0
Taylor expanded in a 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.
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 -4.5e+151)
(* (* a b) 27.0)
(if (<= t_1 -1e-182)
(* (* y (* z t)) -9.0)
(if (<= t_1 5e-305)
(* 2.0 x)
(if (<= t_1 2e+227) (* (* y z) (* t -9.0)) t_1))))))assert(x < y && y < z && z < t && t < a && a < 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 t_1 = (a * 27.0) * b;
double tmp;
if (t_1 <= -4.5e+151) {
tmp = (a * b) * 27.0;
} else if (t_1 <= -1e-182) {
tmp = (y * (z * t)) * -9.0;
} else if (t_1 <= 5e-305) {
tmp = 2.0 * x;
} else if (t_1 <= 2e+227) {
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.
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 <= (-4.5d+151)) then
tmp = (a * b) * 27.0d0
else if (t_1 <= (-1d-182)) then
tmp = (y * (z * t)) * (-9.0d0)
else if (t_1 <= 5d-305) then
tmp = 2.0d0 * x
else if (t_1 <= 2d+227) 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;
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 <= -4.5e+151) {
tmp = (a * b) * 27.0;
} else if (t_1 <= -1e-182) {
tmp = (y * (z * t)) * -9.0;
} else if (t_1 <= 5e-305) {
tmp = 2.0 * x;
} else if (t_1 <= 2e+227) {
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]) [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 <= -4.5e+151: tmp = (a * b) * 27.0 elif t_1 <= -1e-182: tmp = (y * (z * t)) * -9.0 elif t_1 <= 5e-305: tmp = 2.0 * x elif t_1 <= 2e+227: 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]) 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 <= -4.5e+151) tmp = Float64(Float64(a * b) * 27.0); elseif (t_1 <= -1e-182) tmp = Float64(Float64(y * Float64(z * t)) * -9.0); elseif (t_1 <= 5e-305) tmp = Float64(2.0 * x); elseif (t_1 <= 2e+227) tmp = Float64(Float64(y * z) * Float64(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])){:}
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 <= -4.5e+151)
tmp = (a * b) * 27.0;
elseif (t_1 <= -1e-182)
tmp = (y * (z * t)) * -9.0;
elseif (t_1 <= 5e-305)
tmp = 2.0 * x;
elseif (t_1 <= 2e+227)
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.
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, -4.5e+151], N[(N[(a * b), $MachinePrecision] * 27.0), $MachinePrecision], If[LessEqual[t$95$1, -1e-182], N[(N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision] * -9.0), $MachinePrecision], If[LessEqual[t$95$1, 5e-305], N[(2.0 * x), $MachinePrecision], If[LessEqual[t$95$1, 2e+227], N[(N[(y * z), $MachinePrecision] * N[(t * -9.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[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 -4.5 \cdot 10^{+151}:\\
\;\;\;\;\left(a \cdot b\right) \cdot 27\\
\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-182}:\\
\;\;\;\;\left(y \cdot \left(z \cdot t\right)\right) \cdot -9\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-305}:\\
\;\;\;\;2 \cdot x\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+227}:\\
\;\;\;\;\left(y \cdot z\right) \cdot \left(t \cdot -9\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 a #s(literal 27 binary64)) b) < -4.4999999999999999e151Initial program 92.4%
Simplified0
Taylor expanded in a around inf 0
Simplified0
if -4.4999999999999999e151 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < -1e-182Initial program 96.6%
Simplified0
Taylor expanded in y around inf 0
Simplified0
Applied egg-rr0
if -1e-182 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < 4.99999999999999985e-305Initial program 97.8%
Simplified0
Taylor expanded in x around inf 0
Simplified0
if 4.99999999999999985e-305 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < 2.0000000000000002e227Initial program 97.7%
Simplified0
Taylor expanded in y around inf 0
Simplified0
Applied egg-rr0
if 2.0000000000000002e227 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) Initial program 84.4%
Applied egg-rr0
Taylor expanded in a 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.
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))) (t_2 (* (* a 27.0) b)))
(if (<= t_2 -4.5e+151)
(* (* a b) 27.0)
(if (<= t_2 -1e-182)
t_1
(if (<= t_2 5e-305) (* 2.0 x) (if (<= t_2 2e+227) t_1 t_2))))))assert(x < y && y < z && z < t && t < a && a < 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 t_1 = (y * z) * (t * -9.0);
double t_2 = (a * 27.0) * b;
double tmp;
if (t_2 <= -4.5e+151) {
tmp = (a * b) * 27.0;
} else if (t_2 <= -1e-182) {
tmp = t_1;
} else if (t_2 <= 5e-305) {
tmp = 2.0 * x;
} else if (t_2 <= 2e+227) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 = (y * z) * (t * (-9.0d0))
t_2 = (a * 27.0d0) * b
if (t_2 <= (-4.5d+151)) then
tmp = (a * b) * 27.0d0
else if (t_2 <= (-1d-182)) then
tmp = t_1
else if (t_2 <= 5d-305) then
tmp = 2.0d0 * x
else if (t_2 <= 2d+227) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
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 t_2 = (a * 27.0) * b;
double tmp;
if (t_2 <= -4.5e+151) {
tmp = (a * b) * 27.0;
} else if (t_2 <= -1e-182) {
tmp = t_1;
} else if (t_2 <= 5e-305) {
tmp = 2.0 * x;
} else if (t_2 <= 2e+227) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [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) t_2 = (a * 27.0) * b tmp = 0 if t_2 <= -4.5e+151: tmp = (a * b) * 27.0 elif t_2 <= -1e-182: tmp = t_1 elif t_2 <= 5e-305: tmp = 2.0 * x elif t_2 <= 2e+227: tmp = t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) 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 * z) * Float64(t * -9.0)) t_2 = Float64(Float64(a * 27.0) * b) tmp = 0.0 if (t_2 <= -4.5e+151) tmp = Float64(Float64(a * b) * 27.0); elseif (t_2 <= -1e-182) tmp = t_1; elseif (t_2 <= 5e-305) tmp = Float64(2.0 * x); elseif (t_2 <= 2e+227) tmp = t_1; else tmp = t_2; end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
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);
t_2 = (a * 27.0) * b;
tmp = 0.0;
if (t_2 <= -4.5e+151)
tmp = (a * b) * 27.0;
elseif (t_2 <= -1e-182)
tmp = t_1;
elseif (t_2 <= 5e-305)
tmp = 2.0 * x;
elseif (t_2 <= 2e+227)
tmp = t_1;
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.
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 * z), $MachinePrecision] * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[t$95$2, -4.5e+151], N[(N[(a * b), $MachinePrecision] * 27.0), $MachinePrecision], If[LessEqual[t$95$2, -1e-182], t$95$1, If[LessEqual[t$95$2, 5e-305], N[(2.0 * x), $MachinePrecision], If[LessEqual[t$95$2, 2e+227], t$95$1, t$95$2]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := \left(y \cdot z\right) \cdot \left(t \cdot -9\right)\\
t_2 := \left(a \cdot 27\right) \cdot b\\
\mathbf{if}\;t\_2 \leq -4.5 \cdot 10^{+151}:\\
\;\;\;\;\left(a \cdot b\right) \cdot 27\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-182}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-305}:\\
\;\;\;\;2 \cdot x\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+227}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (*.f64 a #s(literal 27 binary64)) b) < -4.4999999999999999e151Initial program 92.4%
Simplified0
Taylor expanded in a around inf 0
Simplified0
if -4.4999999999999999e151 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < -1e-182 or 4.99999999999999985e-305 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < 2.0000000000000002e227Initial program 97.2%
Simplified0
Taylor expanded in y around inf 0
Simplified0
Applied egg-rr0
if -1e-182 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < 4.99999999999999985e-305Initial program 97.8%
Simplified0
Taylor expanded in x around inf 0
Simplified0
if 2.0000000000000002e227 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) Initial program 84.4%
Applied egg-rr0
Taylor expanded in a 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.
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 (* -9.0 (* t (* y z)))) (t_2 (* (* a 27.0) b)))
(if (<= t_2 -4.5e+151)
(* (* a b) 27.0)
(if (<= t_2 -1e-182)
t_1
(if (<= t_2 5e-305) (* 2.0 x) (if (<= t_2 2e+227) t_1 t_2))))))assert(x < y && y < z && z < t && t < a && a < 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 t_1 = -9.0 * (t * (y * z));
double t_2 = (a * 27.0) * b;
double tmp;
if (t_2 <= -4.5e+151) {
tmp = (a * b) * 27.0;
} else if (t_2 <= -1e-182) {
tmp = t_1;
} else if (t_2 <= 5e-305) {
tmp = 2.0 * x;
} else if (t_2 <= 2e+227) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 = (-9.0d0) * (t * (y * z))
t_2 = (a * 27.0d0) * b
if (t_2 <= (-4.5d+151)) then
tmp = (a * b) * 27.0d0
else if (t_2 <= (-1d-182)) then
tmp = t_1
else if (t_2 <= 5d-305) then
tmp = 2.0d0 * x
else if (t_2 <= 2d+227) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
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 = -9.0 * (t * (y * z));
double t_2 = (a * 27.0) * b;
double tmp;
if (t_2 <= -4.5e+151) {
tmp = (a * b) * 27.0;
} else if (t_2 <= -1e-182) {
tmp = t_1;
} else if (t_2 <= 5e-305) {
tmp = 2.0 * x;
} else if (t_2 <= 2e+227) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = -9.0 * (t * (y * z)) t_2 = (a * 27.0) * b tmp = 0 if t_2 <= -4.5e+151: tmp = (a * b) * 27.0 elif t_2 <= -1e-182: tmp = t_1 elif t_2 <= 5e-305: tmp = 2.0 * x elif t_2 <= 2e+227: tmp = t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(-9.0 * Float64(t * Float64(y * z))) t_2 = Float64(Float64(a * 27.0) * b) tmp = 0.0 if (t_2 <= -4.5e+151) tmp = Float64(Float64(a * b) * 27.0); elseif (t_2 <= -1e-182) tmp = t_1; elseif (t_2 <= 5e-305) tmp = Float64(2.0 * x); elseif (t_2 <= 2e+227) tmp = t_1; else tmp = t_2; end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
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 = -9.0 * (t * (y * z));
t_2 = (a * 27.0) * b;
tmp = 0.0;
if (t_2 <= -4.5e+151)
tmp = (a * b) * 27.0;
elseif (t_2 <= -1e-182)
tmp = t_1;
elseif (t_2 <= 5e-305)
tmp = 2.0 * x;
elseif (t_2 <= 2e+227)
tmp = t_1;
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.
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[(-9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[t$95$2, -4.5e+151], N[(N[(a * b), $MachinePrecision] * 27.0), $MachinePrecision], If[LessEqual[t$95$2, -1e-182], t$95$1, If[LessEqual[t$95$2, 5e-305], N[(2.0 * x), $MachinePrecision], If[LessEqual[t$95$2, 2e+227], t$95$1, t$95$2]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := -9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
t_2 := \left(a \cdot 27\right) \cdot b\\
\mathbf{if}\;t\_2 \leq -4.5 \cdot 10^{+151}:\\
\;\;\;\;\left(a \cdot b\right) \cdot 27\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-182}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-305}:\\
\;\;\;\;2 \cdot x\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+227}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (*.f64 a #s(literal 27 binary64)) b) < -4.4999999999999999e151Initial program 92.4%
Simplified0
Taylor expanded in a around inf 0
Simplified0
if -4.4999999999999999e151 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < -1e-182 or 4.99999999999999985e-305 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < 2.0000000000000002e227Initial program 97.2%
Simplified0
Taylor expanded in y around inf 0
Simplified0
if -1e-182 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < 4.99999999999999985e-305Initial program 97.8%
Simplified0
Taylor expanded in x around inf 0
Simplified0
if 2.0000000000000002e227 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) Initial program 84.4%
Applied egg-rr0
Taylor expanded in a 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.
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))))
(t_3 (+ t_2 (* (* a b) 27.0))))
(if (<= t_1 -5e+61) t_3 (if (<= t_1 100000000.0) (+ t_2 (* 2.0 x)) t_3))))assert(x < y && y < z && z < t && t < a && a < 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 t_1 = (a * 27.0) * b;
double t_2 = -9.0 * (t * (y * z));
double t_3 = t_2 + ((a * b) * 27.0);
double tmp;
if (t_1 <= -5e+61) {
tmp = t_3;
} else if (t_1 <= 100000000.0) {
tmp = t_2 + (2.0 * x);
} else {
tmp = t_3;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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) :: t_3
real(8) :: tmp
t_1 = (a * 27.0d0) * b
t_2 = (-9.0d0) * (t * (y * z))
t_3 = t_2 + ((a * b) * 27.0d0)
if (t_1 <= (-5d+61)) then
tmp = t_3
else if (t_1 <= 100000000.0d0) then
tmp = t_2 + (2.0d0 * x)
else
tmp = t_3
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
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));
double t_3 = t_2 + ((a * b) * 27.0);
double tmp;
if (t_1 <= -5e+61) {
tmp = t_3;
} else if (t_1 <= 100000000.0) {
tmp = t_2 + (2.0 * x);
} else {
tmp = t_3;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [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)) t_3 = t_2 + ((a * b) * 27.0) tmp = 0 if t_1 <= -5e+61: tmp = t_3 elif t_1 <= 100000000.0: tmp = t_2 + (2.0 * x) else: tmp = t_3 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) 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(-9.0 * Float64(t * Float64(y * z))) t_3 = Float64(t_2 + Float64(Float64(a * b) * 27.0)) tmp = 0.0 if (t_1 <= -5e+61) tmp = t_3; elseif (t_1 <= 100000000.0) tmp = Float64(t_2 + Float64(2.0 * x)); else tmp = t_3; end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
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));
t_3 = t_2 + ((a * b) * 27.0);
tmp = 0.0;
if (t_1 <= -5e+61)
tmp = t_3;
elseif (t_1 <= 100000000.0)
tmp = t_2 + (2.0 * x);
else
tmp = t_3;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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[(-9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 + N[(N[(a * b), $MachinePrecision] * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+61], t$95$3, If[LessEqual[t$95$1, 100000000.0], N[(t$95$2 + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[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)\\
t_3 := t\_2 + \left(a \cdot b\right) \cdot 27\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+61}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_1 \leq 100000000:\\
\;\;\;\;t\_2 + 2 \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if (*.f64 (*.f64 a #s(literal 27 binary64)) b) < -5.00000000000000018e61 or 1e8 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) Initial program 92.9%
Simplified0
Taylor expanded in x around 0 0
Simplified0
if -5.00000000000000018e61 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < 1e8Initial program 97.2%
Simplified0
Taylor expanded in a around 0 0
Simplified0
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 (+ (* 2.0 x) t_1)))
(if (<= t_1 -2e+93)
t_2
(if (<= t_1 2e+227) (+ (* -9.0 (* t (* y z))) (* 2.0 x)) t_2))))assert(x < y && y < z && z < t && t < a && a < 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 t_1 = (a * 27.0) * b;
double t_2 = (2.0 * x) + t_1;
double tmp;
if (t_1 <= -2e+93) {
tmp = t_2;
} else if (t_1 <= 2e+227) {
tmp = (-9.0 * (t * (y * z))) + (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.
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 = (2.0d0 * x) + t_1
if (t_1 <= (-2d+93)) then
tmp = t_2
else if (t_1 <= 2d+227) then
tmp = ((-9.0d0) * (t * (y * z))) + (2.0d0 * x)
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
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 = (2.0 * x) + t_1;
double tmp;
if (t_1 <= -2e+93) {
tmp = t_2;
} else if (t_1 <= 2e+227) {
tmp = (-9.0 * (t * (y * z))) + (2.0 * x);
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [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 = (2.0 * x) + t_1 tmp = 0 if t_1 <= -2e+93: tmp = t_2 elif t_1 <= 2e+227: tmp = (-9.0 * (t * (y * z))) + (2.0 * x) else: tmp = t_2 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) 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(2.0 * x) + t_1) tmp = 0.0 if (t_1 <= -2e+93) tmp = t_2; elseif (t_1 <= 2e+227) tmp = Float64(Float64(-9.0 * Float64(t * Float64(y * z))) + 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])){:}
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 = (2.0 * x) + t_1;
tmp = 0.0;
if (t_1 <= -2e+93)
tmp = t_2;
elseif (t_1 <= 2e+227)
tmp = (-9.0 * (t * (y * z))) + (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.
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[(2.0 * x), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+93], t$95$2, If[LessEqual[t$95$1, 2e+227], N[(N[(-9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $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])\\\\
[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 := 2 \cdot x + t\_1\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+93}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+227}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(y \cdot z\right)\right) + 2 \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (*.f64 a #s(literal 27 binary64)) b) < -2.00000000000000009e93 or 2.0000000000000002e227 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) Initial program 90.2%
Taylor expanded in x around inf 0
Simplified0
if -2.00000000000000009e93 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < 2.0000000000000002e227Initial program 97.3%
Simplified0
Taylor expanded in a around 0 0
Simplified0
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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 (* (* a b) 27.0))) (if (<= t_1 -1e+55) t_2 (if (<= t_1 100000000.0) (* 2.0 x) t_2))))
assert(x < y && y < z && z < t && t < a && a < 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 t_1 = (a * 27.0) * b;
double t_2 = (a * b) * 27.0;
double tmp;
if (t_1 <= -1e+55) {
tmp = t_2;
} else if (t_1 <= 100000000.0) {
tmp = 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.
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 = (a * b) * 27.0d0
if (t_1 <= (-1d+55)) then
tmp = t_2
else if (t_1 <= 100000000.0d0) then
tmp = 2.0d0 * x
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
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 = (a * b) * 27.0;
double tmp;
if (t_1 <= -1e+55) {
tmp = t_2;
} else if (t_1 <= 100000000.0) {
tmp = 2.0 * x;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [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 = (a * b) * 27.0 tmp = 0 if t_1 <= -1e+55: tmp = t_2 elif t_1 <= 100000000.0: tmp = 2.0 * x else: tmp = t_2 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) 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(a * b) * 27.0) tmp = 0.0 if (t_1 <= -1e+55) tmp = t_2; elseif (t_1 <= 100000000.0) tmp = 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])){:}
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 = (a * b) * 27.0;
tmp = 0.0;
if (t_1 <= -1e+55)
tmp = t_2;
elseif (t_1 <= 100000000.0)
tmp = 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.
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[(a * b), $MachinePrecision] * 27.0), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+55], t$95$2, If[LessEqual[t$95$1, 100000000.0], N[(2.0 * x), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[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 := \left(a \cdot b\right) \cdot 27\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+55}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 100000000:\\
\;\;\;\;2 \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (*.f64 a #s(literal 27 binary64)) b) < -1.00000000000000001e55 or 1e8 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) Initial program 92.2%
Simplified0
Taylor expanded in a around inf 0
Simplified0
if -1.00000000000000001e55 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < 1e8Initial program 97.8%
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. 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 -1e+55) t_1 (if (<= t_1 100000000.0) (* 2.0 x) t_1))))
assert(x < y && y < z && z < t && t < a && a < 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 t_1 = (a * 27.0) * b;
double tmp;
if (t_1 <= -1e+55) {
tmp = t_1;
} else if (t_1 <= 100000000.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.
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 <= (-1d+55)) then
tmp = t_1
else if (t_1 <= 100000000.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;
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 <= -1e+55) {
tmp = t_1;
} else if (t_1 <= 100000000.0) {
tmp = 2.0 * x;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [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 <= -1e+55: tmp = t_1 elif t_1 <= 100000000.0: tmp = 2.0 * x else: tmp = t_1 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) 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 <= -1e+55) tmp = t_1; elseif (t_1 <= 100000000.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])){:}
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 <= -1e+55)
tmp = t_1;
elseif (t_1 <= 100000000.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.
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, -1e+55], t$95$1, If[LessEqual[t$95$1, 100000000.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])\\\\
[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 -1 \cdot 10^{+55}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 100000000:\\
\;\;\;\;2 \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 a #s(literal 27 binary64)) b) < -1.00000000000000001e55 or 1e8 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) Initial program 92.2%
Applied egg-rr0
Taylor expanded in a around inf 0
Simplified0
Applied egg-rr0
if -1.00000000000000001e55 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < 1e8Initial program 97.8%
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.
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 (- (* x 2.0) (* a (* b -27.0)))))
(if (<= y -2.3e+24)
(+ (* y (* z (* t -9.0))) t_1)
(+ (* (* y (* t -9.0)) z) t_1))))assert(x < y && y < z && z < t && t < a && a < 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 t_1 = (x * 2.0) - (a * (b * -27.0));
double tmp;
if (y <= -2.3e+24) {
tmp = (y * (z * (t * -9.0))) + t_1;
} else {
tmp = ((y * (t * -9.0)) * z) + t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 = (x * 2.0d0) - (a * (b * (-27.0d0)))
if (y <= (-2.3d+24)) then
tmp = (y * (z * (t * (-9.0d0)))) + t_1
else
tmp = ((y * (t * (-9.0d0))) * z) + t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
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 = (x * 2.0) - (a * (b * -27.0));
double tmp;
if (y <= -2.3e+24) {
tmp = (y * (z * (t * -9.0))) + t_1;
} else {
tmp = ((y * (t * -9.0)) * z) + t_1;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = (x * 2.0) - (a * (b * -27.0)) tmp = 0 if y <= -2.3e+24: tmp = (y * (z * (t * -9.0))) + t_1 else: tmp = ((y * (t * -9.0)) * z) + t_1 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) 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(x * 2.0) - Float64(a * Float64(b * -27.0))) tmp = 0.0 if (y <= -2.3e+24) tmp = Float64(Float64(y * Float64(z * Float64(t * -9.0))) + t_1); else tmp = Float64(Float64(Float64(y * Float64(t * -9.0)) * z) + t_1); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
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 = (x * 2.0) - (a * (b * -27.0));
tmp = 0.0;
if (y <= -2.3e+24)
tmp = (y * (z * (t * -9.0))) + t_1;
else
tmp = ((y * (t * -9.0)) * 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.
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[(x * 2.0), $MachinePrecision] - N[(a * N[(b * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.3e+24], N[(N[(y * N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], N[(N[(N[(y * N[(t * -9.0), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision] + t$95$1), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := x \cdot 2 - a \cdot \left(b \cdot -27\right)\\
\mathbf{if}\;y \leq -2.3 \cdot 10^{+24}:\\
\;\;\;\;y \cdot \left(z \cdot \left(t \cdot -9\right)\right) + t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot \left(t \cdot -9\right)\right) \cdot z + t\_1\\
\end{array}
\end{array}
if y < -2.2999999999999999e24Initial program 94.9%
Simplified0
if -2.2999999999999999e24 < y Initial program 95.4%
Simplified0
Applied egg-rr0
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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 6.2e+29) (+ (* y (* z (* t -9.0))) (- (* x 2.0) (* a (* b -27.0)))) (+ (* -9.0 (* t (* y z))) (* 2.0 x))))
assert(x < y && y < z && z < t && t < a && a < 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 (z <= 6.2e+29) {
tmp = (y * (z * (t * -9.0))) + ((x * 2.0) - (a * (b * -27.0)));
} else {
tmp = (-9.0 * (t * (y * z))) + (2.0 * x);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 <= 6.2d+29) then
tmp = (y * (z * (t * (-9.0d0)))) + ((x * 2.0d0) - (a * (b * (-27.0d0))))
else
tmp = ((-9.0d0) * (t * (y * z))) + (2.0d0 * x)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
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 <= 6.2e+29) {
tmp = (y * (z * (t * -9.0))) + ((x * 2.0) - (a * (b * -27.0)));
} else {
tmp = (-9.0 * (t * (y * z))) + (2.0 * x);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [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 <= 6.2e+29: tmp = (y * (z * (t * -9.0))) + ((x * 2.0) - (a * (b * -27.0))) else: tmp = (-9.0 * (t * (y * z))) + (2.0 * x) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) 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 <= 6.2e+29) tmp = Float64(Float64(y * Float64(z * Float64(t * -9.0))) + Float64(Float64(x * 2.0) - Float64(a * Float64(b * -27.0)))); else tmp = Float64(Float64(-9.0 * Float64(t * Float64(y * z))) + Float64(2.0 * x)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
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 <= 6.2e+29)
tmp = (y * (z * (t * -9.0))) + ((x * 2.0) - (a * (b * -27.0)));
else
tmp = (-9.0 * (t * (y * z))) + (2.0 * x);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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, 6.2e+29], N[(N[(y * N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x * 2.0), $MachinePrecision] - N[(a * N[(b * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 6.2 \cdot 10^{+29}:\\
\;\;\;\;y \cdot \left(z \cdot \left(t \cdot -9\right)\right) + \left(x \cdot 2 - a \cdot \left(b \cdot -27\right)\right)\\
\mathbf{else}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(y \cdot z\right)\right) + 2 \cdot x\\
\end{array}
\end{array}
if z < 6.1999999999999998e29Initial program 96.9%
Simplified0
if 6.1999999999999998e29 < z Initial program 88.7%
Simplified0
Taylor expanded in a around 0 0
Simplified0
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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)))) (if (<= a -2.7e+93) t_1 (if (<= a 9e-7) (* 2.0 x) t_1))))
assert(x < y && y < z && z < t && t < a && a < 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 t_1 = a * (b * 27.0);
double tmp;
if (a <= -2.7e+93) {
tmp = t_1;
} else if (a <= 9e-7) {
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.
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 * (b * 27.0d0)
if (a <= (-2.7d+93)) then
tmp = t_1
else if (a <= 9d-7) 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;
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 tmp;
if (a <= -2.7e+93) {
tmp = t_1;
} else if (a <= 9e-7) {
tmp = 2.0 * x;
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [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) tmp = 0 if a <= -2.7e+93: tmp = t_1 elif a <= 9e-7: tmp = 2.0 * x else: tmp = t_1 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(b * 27.0)) tmp = 0.0 if (a <= -2.7e+93) tmp = t_1; elseif (a <= 9e-7) 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])){:}
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);
tmp = 0.0;
if (a <= -2.7e+93)
tmp = t_1;
elseif (a <= 9e-7)
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.
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[(a * N[(b * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.7e+93], t$95$1, If[LessEqual[a, 9e-7], 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])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := a \cdot \left(b \cdot 27\right)\\
\mathbf{if}\;a \leq -2.7 \cdot 10^{+93}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 9 \cdot 10^{-7}:\\
\;\;\;\;2 \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.6999999999999999e93 or 8.99999999999999959e-7 < a Initial program 90.8%
Applied egg-rr0
Taylor expanded in a around inf 0
Simplified0
if -2.6999999999999999e93 < a < 8.99999999999999959e-7Initial program 98.5%
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. 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 (<= t 7.6e+83) (+ (* 2.0 x) (* (* a 27.0) b)) (* -9.0 (* t (* y z)))))
assert(x < y && y < z && z < t && t < a && a < 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 (t <= 7.6e+83) {
tmp = (2.0 * x) + ((a * 27.0) * b);
} else {
tmp = -9.0 * (t * (y * z));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 (t <= 7.6d+83) then
tmp = (2.0d0 * x) + ((a * 27.0d0) * b)
else
tmp = (-9.0d0) * (t * (y * z))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
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 (t <= 7.6e+83) {
tmp = (2.0 * x) + ((a * 27.0) * b);
} else {
tmp = -9.0 * (t * (y * z));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if t <= 7.6e+83: tmp = (2.0 * x) + ((a * 27.0) * b) else: tmp = -9.0 * (t * (y * z)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) 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 (t <= 7.6e+83) tmp = Float64(Float64(2.0 * x) + Float64(Float64(a * 27.0) * b)); else tmp = Float64(-9.0 * Float64(t * Float64(y * z))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
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 (t <= 7.6e+83)
tmp = (2.0 * x) + ((a * 27.0) * b);
else
tmp = -9.0 * (t * (y * z));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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[t, 7.6e+83], N[(N[(2.0 * x), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], N[(-9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 7.6 \cdot 10^{+83}:\\
\;\;\;\;2 \cdot x + \left(a \cdot 27\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if t < 7.6000000000000004e83Initial program 94.7%
Taylor expanded in x around inf 0
Simplified0
if 7.6000000000000004e83 < t Initial program 97.7%
Simplified0
Taylor expanded in y around inf 0
Simplified0
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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);
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.
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;
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]) [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]) 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])){:}
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. 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])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
2 \cdot x
\end{array}
Initial program 95.3%
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 2024111
(FPCore (x y z t a b)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, A"
:precision binary64
:alt
(! :herbie-platform default (if (< y 7590524218811189/100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (* x 2) (* (* (* y 9) z) t)) (* a (* 27 b))) (+ (- (* x 2) (* 9 (* y (* t z)))) (* (* a 27) b))))
(+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))