
(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 17 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 (fma a (* 27.0 b) (fma x 2.0 (* t (* y (* -9.0 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) {
return fma(a, (27.0 * b), fma(x, 2.0, (t * (y * (-9.0 * z)))));
}
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 fma(a, Float64(27.0 * b), fma(x, 2.0, Float64(t * Float64(y * Float64(-9.0 * z))))) 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[(a * N[(27.0 * b), $MachinePrecision] + N[(x * 2.0 + N[(t * N[(y * N[(-9.0 * z), $MachinePrecision]), $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])\\
\\
\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(-9 \cdot z\right)\right)\right)\right)
\end{array}
Initial program 95.7%
+-commutative95.7%
associate-+r-95.7%
*-commutative95.7%
cancel-sign-sub-inv95.7%
associate-*r*94.2%
distribute-lft-neg-in94.2%
*-commutative94.2%
cancel-sign-sub-inv94.2%
associate-+r-94.2%
associate-*l*94.2%
fma-def95.4%
cancel-sign-sub-inv95.4%
fma-def95.4%
*-commutative95.4%
distribute-rgt-neg-in95.4%
distribute-lft-neg-out95.4%
associate-*r*96.8%
associate-*l*96.8%
Simplified96.8%
Final simplification96.8%
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)))))
(if (<= z -1.5e-59)
t_2
(if (<= z -1.11e-122)
t_1
(if (<= z -2.1e-229)
(* x 2.0)
(if (<= z -1.2e-269)
t_1
(if (<= z 5.2e-175)
(* x 2.0)
(if (<= z 1.6e-69) (* 27.0 (* a b)) 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 = -9.0 * (t * (y * z));
double tmp;
if (z <= -1.5e-59) {
tmp = t_2;
} else if (z <= -1.11e-122) {
tmp = t_1;
} else if (z <= -2.1e-229) {
tmp = x * 2.0;
} else if (z <= -1.2e-269) {
tmp = t_1;
} else if (z <= 5.2e-175) {
tmp = x * 2.0;
} else if (z <= 1.6e-69) {
tmp = 27.0 * (a * b);
} 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 = (-9.0d0) * (t * (y * z))
if (z <= (-1.5d-59)) then
tmp = t_2
else if (z <= (-1.11d-122)) then
tmp = t_1
else if (z <= (-2.1d-229)) then
tmp = x * 2.0d0
else if (z <= (-1.2d-269)) then
tmp = t_1
else if (z <= 5.2d-175) then
tmp = x * 2.0d0
else if (z <= 1.6d-69) then
tmp = 27.0d0 * (a * b)
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 = -9.0 * (t * (y * z));
double tmp;
if (z <= -1.5e-59) {
tmp = t_2;
} else if (z <= -1.11e-122) {
tmp = t_1;
} else if (z <= -2.1e-229) {
tmp = x * 2.0;
} else if (z <= -1.2e-269) {
tmp = t_1;
} else if (z <= 5.2e-175) {
tmp = x * 2.0;
} else if (z <= 1.6e-69) {
tmp = 27.0 * (a * b);
} 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 = -9.0 * (t * (y * z)) tmp = 0 if z <= -1.5e-59: tmp = t_2 elif z <= -1.11e-122: tmp = t_1 elif z <= -2.1e-229: tmp = x * 2.0 elif z <= -1.2e-269: tmp = t_1 elif z <= 5.2e-175: tmp = x * 2.0 elif z <= 1.6e-69: tmp = 27.0 * (a * b) 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(a * Float64(27.0 * b)) t_2 = Float64(-9.0 * Float64(t * Float64(y * z))) tmp = 0.0 if (z <= -1.5e-59) tmp = t_2; elseif (z <= -1.11e-122) tmp = t_1; elseif (z <= -2.1e-229) tmp = Float64(x * 2.0); elseif (z <= -1.2e-269) tmp = t_1; elseif (z <= 5.2e-175) tmp = Float64(x * 2.0); elseif (z <= 1.6e-69) tmp = Float64(27.0 * Float64(a * b)); 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 = -9.0 * (t * (y * z));
tmp = 0.0;
if (z <= -1.5e-59)
tmp = t_2;
elseif (z <= -1.11e-122)
tmp = t_1;
elseif (z <= -2.1e-229)
tmp = x * 2.0;
elseif (z <= -1.2e-269)
tmp = t_1;
elseif (z <= 5.2e-175)
tmp = x * 2.0;
elseif (z <= 1.6e-69)
tmp = 27.0 * (a * b);
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[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.5e-59], t$95$2, If[LessEqual[z, -1.11e-122], t$95$1, If[LessEqual[z, -2.1e-229], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, -1.2e-269], t$95$1, If[LessEqual[z, 5.2e-175], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 1.6e-69], N[(27.0 * N[(a * b), $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 := a \cdot \left(27 \cdot b\right)\\
t_2 := -9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\mathbf{if}\;z \leq -1.5 \cdot 10^{-59}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -1.11 \cdot 10^{-122}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.1 \cdot 10^{-229}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;z \leq -1.2 \cdot 10^{-269}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-175}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-69}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -1.5e-59 or 1.59999999999999999e-69 < z Initial program 93.5%
sub-neg93.5%
sub-neg93.5%
associate-*l*94.2%
associate-*l*94.3%
Simplified94.3%
Taylor expanded in y around inf 44.5%
if -1.5e-59 < z < -1.11e-122 or -2.09999999999999983e-229 < z < -1.20000000000000005e-269Initial program 99.8%
sub-neg99.8%
sub-neg99.8%
associate-*l*99.8%
associate-*l*99.7%
Simplified99.7%
Taylor expanded in a around inf 56.8%
associate-*r*56.8%
*-commutative56.8%
associate-*r*56.7%
Simplified56.7%
if -1.11e-122 < z < -2.09999999999999983e-229 or -1.20000000000000005e-269 < z < 5.2e-175Initial program 98.0%
sub-neg98.0%
sub-neg98.0%
associate-*l*99.6%
associate-*l*99.5%
Simplified99.5%
Taylor expanded in x around inf 53.0%
if 5.2e-175 < z < 1.59999999999999999e-69Initial program 99.7%
sub-neg99.7%
sub-neg99.7%
associate-*l*99.8%
associate-*l*99.7%
Simplified99.7%
Taylor expanded in a around inf 46.2%
Final simplification47.2%
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 (<= z -2.8e-60)
(* t (* y (* -9.0 z)))
(if (<= z -5.4e-132)
t_1
(if (<= z -1.4e-227)
(* x 2.0)
(if (<= z -3.5e-269)
t_1
(if (<= z 2.45e-173)
(* x 2.0)
(if (<= z 2.6e-65) (* 27.0 (* a 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 t_1 = a * (27.0 * b);
double tmp;
if (z <= -2.8e-60) {
tmp = t * (y * (-9.0 * z));
} else if (z <= -5.4e-132) {
tmp = t_1;
} else if (z <= -1.4e-227) {
tmp = x * 2.0;
} else if (z <= -3.5e-269) {
tmp = t_1;
} else if (z <= 2.45e-173) {
tmp = x * 2.0;
} else if (z <= 2.6e-65) {
tmp = 27.0 * (a * 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) :: t_1
real(8) :: tmp
t_1 = a * (27.0d0 * b)
if (z <= (-2.8d-60)) then
tmp = t * (y * ((-9.0d0) * z))
else if (z <= (-5.4d-132)) then
tmp = t_1
else if (z <= (-1.4d-227)) then
tmp = x * 2.0d0
else if (z <= (-3.5d-269)) then
tmp = t_1
else if (z <= 2.45d-173) then
tmp = x * 2.0d0
else if (z <= 2.6d-65) then
tmp = 27.0d0 * (a * 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 t_1 = a * (27.0 * b);
double tmp;
if (z <= -2.8e-60) {
tmp = t * (y * (-9.0 * z));
} else if (z <= -5.4e-132) {
tmp = t_1;
} else if (z <= -1.4e-227) {
tmp = x * 2.0;
} else if (z <= -3.5e-269) {
tmp = t_1;
} else if (z <= 2.45e-173) {
tmp = x * 2.0;
} else if (z <= 2.6e-65) {
tmp = 27.0 * (a * 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): t_1 = a * (27.0 * b) tmp = 0 if z <= -2.8e-60: tmp = t * (y * (-9.0 * z)) elif z <= -5.4e-132: tmp = t_1 elif z <= -1.4e-227: tmp = x * 2.0 elif z <= -3.5e-269: tmp = t_1 elif z <= 2.45e-173: tmp = x * 2.0 elif z <= 2.6e-65: tmp = 27.0 * (a * 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) t_1 = Float64(a * Float64(27.0 * b)) tmp = 0.0 if (z <= -2.8e-60) tmp = Float64(t * Float64(y * Float64(-9.0 * z))); elseif (z <= -5.4e-132) tmp = t_1; elseif (z <= -1.4e-227) tmp = Float64(x * 2.0); elseif (z <= -3.5e-269) tmp = t_1; elseif (z <= 2.45e-173) tmp = Float64(x * 2.0); elseif (z <= 2.6e-65) tmp = Float64(27.0 * Float64(a * 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)
t_1 = a * (27.0 * b);
tmp = 0.0;
if (z <= -2.8e-60)
tmp = t * (y * (-9.0 * z));
elseif (z <= -5.4e-132)
tmp = t_1;
elseif (z <= -1.4e-227)
tmp = x * 2.0;
elseif (z <= -3.5e-269)
tmp = t_1;
elseif (z <= 2.45e-173)
tmp = x * 2.0;
elseif (z <= 2.6e-65)
tmp = 27.0 * (a * 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_] := Block[{t$95$1 = N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.8e-60], N[(t * N[(y * N[(-9.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.4e-132], t$95$1, If[LessEqual[z, -1.4e-227], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, -3.5e-269], t$95$1, If[LessEqual[z, 2.45e-173], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 2.6e-65], N[(27.0 * N[(a * 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}
t_1 := a \cdot \left(27 \cdot b\right)\\
\mathbf{if}\;z \leq -2.8 \cdot 10^{-60}:\\
\;\;\;\;t \cdot \left(y \cdot \left(-9 \cdot z\right)\right)\\
\mathbf{elif}\;z \leq -5.4 \cdot 10^{-132}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.4 \cdot 10^{-227}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{-269}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.45 \cdot 10^{-173}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-65}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if z < -2.8000000000000002e-60Initial program 94.1%
Taylor expanded in y around 0 94.1%
Taylor expanded in y around inf 52.6%
*-commutative52.6%
associate-*r*52.6%
associate-*l*52.5%
Simplified52.5%
if -2.8000000000000002e-60 < z < -5.3999999999999998e-132 or -1.3999999999999999e-227 < z < -3.50000000000000019e-269Initial program 99.9%
sub-neg99.9%
sub-neg99.9%
associate-*l*99.8%
associate-*l*99.7%
Simplified99.7%
Taylor expanded in a around inf 54.2%
associate-*r*54.1%
*-commutative54.1%
associate-*r*54.0%
Simplified54.0%
if -5.3999999999999998e-132 < z < -1.3999999999999999e-227 or -3.50000000000000019e-269 < z < 2.44999999999999996e-173Initial program 97.9%
sub-neg97.9%
sub-neg97.9%
associate-*l*99.6%
associate-*l*99.5%
Simplified99.5%
Taylor expanded in x around inf 51.9%
if 2.44999999999999996e-173 < z < 2.6000000000000001e-65Initial program 99.7%
sub-neg99.7%
sub-neg99.7%
associate-*l*99.8%
associate-*l*99.7%
Simplified99.7%
Taylor expanded in a around inf 47.7%
if 2.6000000000000001e-65 < z Initial program 92.9%
sub-neg92.9%
sub-neg92.9%
associate-*l*94.3%
associate-*l*94.3%
Simplified94.3%
Taylor expanded in y around inf 38.5%
Final simplification47.1%
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 (<= z -9e-60)
(* t (* y (* -9.0 z)))
(if (<= z -3.2e-130)
t_1
(if (<= z -3e-225)
(* x 2.0)
(if (<= z -3.2e-268)
t_1
(if (<= z 9.6e-174)
(* x 2.0)
(if (<= z 6e-66) (* 27.0 (* a b)) (* t (* z (* y -9.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 = a * (27.0 * b);
double tmp;
if (z <= -9e-60) {
tmp = t * (y * (-9.0 * z));
} else if (z <= -3.2e-130) {
tmp = t_1;
} else if (z <= -3e-225) {
tmp = x * 2.0;
} else if (z <= -3.2e-268) {
tmp = t_1;
} else if (z <= 9.6e-174) {
tmp = x * 2.0;
} else if (z <= 6e-66) {
tmp = 27.0 * (a * b);
} else {
tmp = t * (z * (y * -9.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 = a * (27.0d0 * b)
if (z <= (-9d-60)) then
tmp = t * (y * ((-9.0d0) * z))
else if (z <= (-3.2d-130)) then
tmp = t_1
else if (z <= (-3d-225)) then
tmp = x * 2.0d0
else if (z <= (-3.2d-268)) then
tmp = t_1
else if (z <= 9.6d-174) then
tmp = x * 2.0d0
else if (z <= 6d-66) then
tmp = 27.0d0 * (a * b)
else
tmp = t * (z * (y * (-9.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 = a * (27.0 * b);
double tmp;
if (z <= -9e-60) {
tmp = t * (y * (-9.0 * z));
} else if (z <= -3.2e-130) {
tmp = t_1;
} else if (z <= -3e-225) {
tmp = x * 2.0;
} else if (z <= -3.2e-268) {
tmp = t_1;
} else if (z <= 9.6e-174) {
tmp = x * 2.0;
} else if (z <= 6e-66) {
tmp = 27.0 * (a * b);
} else {
tmp = t * (z * (y * -9.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 = a * (27.0 * b) tmp = 0 if z <= -9e-60: tmp = t * (y * (-9.0 * z)) elif z <= -3.2e-130: tmp = t_1 elif z <= -3e-225: tmp = x * 2.0 elif z <= -3.2e-268: tmp = t_1 elif z <= 9.6e-174: tmp = x * 2.0 elif z <= 6e-66: tmp = 27.0 * (a * b) else: tmp = t * (z * (y * -9.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(a * Float64(27.0 * b)) tmp = 0.0 if (z <= -9e-60) tmp = Float64(t * Float64(y * Float64(-9.0 * z))); elseif (z <= -3.2e-130) tmp = t_1; elseif (z <= -3e-225) tmp = Float64(x * 2.0); elseif (z <= -3.2e-268) tmp = t_1; elseif (z <= 9.6e-174) tmp = Float64(x * 2.0); elseif (z <= 6e-66) tmp = Float64(27.0 * Float64(a * b)); else tmp = Float64(t * Float64(z * Float64(y * -9.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 = a * (27.0 * b);
tmp = 0.0;
if (z <= -9e-60)
tmp = t * (y * (-9.0 * z));
elseif (z <= -3.2e-130)
tmp = t_1;
elseif (z <= -3e-225)
tmp = x * 2.0;
elseif (z <= -3.2e-268)
tmp = t_1;
elseif (z <= 9.6e-174)
tmp = x * 2.0;
elseif (z <= 6e-66)
tmp = 27.0 * (a * b);
else
tmp = t * (z * (y * -9.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[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9e-60], N[(t * N[(y * N[(-9.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.2e-130], t$95$1, If[LessEqual[z, -3e-225], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, -3.2e-268], t$95$1, If[LessEqual[z, 9.6e-174], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 6e-66], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], N[(t * N[(z * N[(y * -9.0), $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 := a \cdot \left(27 \cdot b\right)\\
\mathbf{if}\;z \leq -9 \cdot 10^{-60}:\\
\;\;\;\;t \cdot \left(y \cdot \left(-9 \cdot z\right)\right)\\
\mathbf{elif}\;z \leq -3.2 \cdot 10^{-130}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -3 \cdot 10^{-225}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;z \leq -3.2 \cdot 10^{-268}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 9.6 \cdot 10^{-174}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-66}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\
\end{array}
\end{array}
if z < -9.00000000000000001e-60Initial program 94.1%
Taylor expanded in y around 0 94.1%
Taylor expanded in y around inf 52.6%
*-commutative52.6%
associate-*r*52.6%
associate-*l*52.5%
Simplified52.5%
if -9.00000000000000001e-60 < z < -3.2e-130 or -3.00000000000000018e-225 < z < -3.1999999999999999e-268Initial program 99.8%
sub-neg99.8%
sub-neg99.8%
associate-*l*99.8%
associate-*l*99.7%
Simplified99.7%
Taylor expanded in a around inf 56.8%
associate-*r*56.8%
*-commutative56.8%
associate-*r*56.7%
Simplified56.7%
if -3.2e-130 < z < -3.00000000000000018e-225 or -3.1999999999999999e-268 < z < 9.6e-174Initial program 98.0%
sub-neg98.0%
sub-neg98.0%
associate-*l*99.6%
associate-*l*99.5%
Simplified99.5%
Taylor expanded in x around inf 53.0%
if 9.6e-174 < z < 6.0000000000000004e-66Initial program 99.7%
sub-neg99.7%
sub-neg99.7%
associate-*l*99.8%
associate-*l*99.7%
Simplified99.7%
Taylor expanded in a around inf 47.7%
if 6.0000000000000004e-66 < z Initial program 92.9%
Taylor expanded in y around 0 92.9%
Taylor expanded in y around inf 38.5%
*-commutative38.5%
associate-*r*38.5%
associate-*l*38.6%
Simplified38.6%
Taylor expanded in y around 0 38.5%
*-commutative38.5%
*-commutative38.5%
associate-*l*38.6%
Simplified38.6%
Final simplification47.5%
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 (<= z -1.55e-59)
(* z (* -9.0 (* t y)))
(if (<= z -2.3e-125)
t_1
(if (<= z -1.7e-228)
(* x 2.0)
(if (<= z -1.36e-269)
t_1
(if (<= z 7.5e-175)
(* x 2.0)
(if (<= z 3.1e-69) (* 27.0 (* a b)) (* t (* z (* y -9.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 = a * (27.0 * b);
double tmp;
if (z <= -1.55e-59) {
tmp = z * (-9.0 * (t * y));
} else if (z <= -2.3e-125) {
tmp = t_1;
} else if (z <= -1.7e-228) {
tmp = x * 2.0;
} else if (z <= -1.36e-269) {
tmp = t_1;
} else if (z <= 7.5e-175) {
tmp = x * 2.0;
} else if (z <= 3.1e-69) {
tmp = 27.0 * (a * b);
} else {
tmp = t * (z * (y * -9.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 = a * (27.0d0 * b)
if (z <= (-1.55d-59)) then
tmp = z * ((-9.0d0) * (t * y))
else if (z <= (-2.3d-125)) then
tmp = t_1
else if (z <= (-1.7d-228)) then
tmp = x * 2.0d0
else if (z <= (-1.36d-269)) then
tmp = t_1
else if (z <= 7.5d-175) then
tmp = x * 2.0d0
else if (z <= 3.1d-69) then
tmp = 27.0d0 * (a * b)
else
tmp = t * (z * (y * (-9.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 = a * (27.0 * b);
double tmp;
if (z <= -1.55e-59) {
tmp = z * (-9.0 * (t * y));
} else if (z <= -2.3e-125) {
tmp = t_1;
} else if (z <= -1.7e-228) {
tmp = x * 2.0;
} else if (z <= -1.36e-269) {
tmp = t_1;
} else if (z <= 7.5e-175) {
tmp = x * 2.0;
} else if (z <= 3.1e-69) {
tmp = 27.0 * (a * b);
} else {
tmp = t * (z * (y * -9.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 = a * (27.0 * b) tmp = 0 if z <= -1.55e-59: tmp = z * (-9.0 * (t * y)) elif z <= -2.3e-125: tmp = t_1 elif z <= -1.7e-228: tmp = x * 2.0 elif z <= -1.36e-269: tmp = t_1 elif z <= 7.5e-175: tmp = x * 2.0 elif z <= 3.1e-69: tmp = 27.0 * (a * b) else: tmp = t * (z * (y * -9.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(a * Float64(27.0 * b)) tmp = 0.0 if (z <= -1.55e-59) tmp = Float64(z * Float64(-9.0 * Float64(t * y))); elseif (z <= -2.3e-125) tmp = t_1; elseif (z <= -1.7e-228) tmp = Float64(x * 2.0); elseif (z <= -1.36e-269) tmp = t_1; elseif (z <= 7.5e-175) tmp = Float64(x * 2.0); elseif (z <= 3.1e-69) tmp = Float64(27.0 * Float64(a * b)); else tmp = Float64(t * Float64(z * Float64(y * -9.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 = a * (27.0 * b);
tmp = 0.0;
if (z <= -1.55e-59)
tmp = z * (-9.0 * (t * y));
elseif (z <= -2.3e-125)
tmp = t_1;
elseif (z <= -1.7e-228)
tmp = x * 2.0;
elseif (z <= -1.36e-269)
tmp = t_1;
elseif (z <= 7.5e-175)
tmp = x * 2.0;
elseif (z <= 3.1e-69)
tmp = 27.0 * (a * b);
else
tmp = t * (z * (y * -9.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[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.55e-59], N[(z * N[(-9.0 * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.3e-125], t$95$1, If[LessEqual[z, -1.7e-228], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, -1.36e-269], t$95$1, If[LessEqual[z, 7.5e-175], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 3.1e-69], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], N[(t * N[(z * N[(y * -9.0), $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 := a \cdot \left(27 \cdot b\right)\\
\mathbf{if}\;z \leq -1.55 \cdot 10^{-59}:\\
\;\;\;\;z \cdot \left(-9 \cdot \left(t \cdot y\right)\right)\\
\mathbf{elif}\;z \leq -2.3 \cdot 10^{-125}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{-228}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;z \leq -1.36 \cdot 10^{-269}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{-175}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{-69}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\
\end{array}
\end{array}
if z < -1.55e-59Initial program 94.1%
Taylor expanded in y around 0 94.1%
Taylor expanded in y around inf 52.6%
*-commutative52.6%
*-commutative52.6%
*-commutative52.6%
associate-*r*53.9%
associate-*l*53.9%
*-commutative53.9%
Simplified53.9%
if -1.55e-59 < z < -2.2999999999999999e-125 or -1.69999999999999995e-228 < z < -1.36e-269Initial program 99.8%
sub-neg99.8%
sub-neg99.8%
associate-*l*99.8%
associate-*l*99.7%
Simplified99.7%
Taylor expanded in a around inf 56.8%
associate-*r*56.8%
*-commutative56.8%
associate-*r*56.7%
Simplified56.7%
if -2.2999999999999999e-125 < z < -1.69999999999999995e-228 or -1.36e-269 < z < 7.50000000000000053e-175Initial program 98.0%
sub-neg98.0%
sub-neg98.0%
associate-*l*99.6%
associate-*l*99.5%
Simplified99.5%
Taylor expanded in x around inf 53.0%
if 7.50000000000000053e-175 < z < 3.0999999999999999e-69Initial program 99.7%
sub-neg99.7%
sub-neg99.7%
associate-*l*99.8%
associate-*l*99.7%
Simplified99.7%
Taylor expanded in a around inf 46.2%
if 3.0999999999999999e-69 < z Initial program 93.0%
Taylor expanded in y around 0 93.0%
Taylor expanded in y around inf 38.1%
*-commutative38.1%
associate-*r*38.1%
associate-*l*38.2%
Simplified38.2%
Taylor expanded in y around 0 38.1%
*-commutative38.1%
*-commutative38.1%
associate-*l*38.2%
Simplified38.2%
Final simplification47.5%
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 -8.2e-209)
(- (* x 2.0) (* 9.0 (* z (* t y))))
(if (<= t 6e+68)
(- (* x 2.0) (* b (* a -27.0)))
(if (<= t 5.2e+255)
(+ (* t (* -9.0 (* y z))) (* a (* 27.0 b)))
(- (* x 2.0) (* 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 <= -8.2e-209) {
tmp = (x * 2.0) - (9.0 * (z * (t * y)));
} else if (t <= 6e+68) {
tmp = (x * 2.0) - (b * (a * -27.0));
} else if (t <= 5.2e+255) {
tmp = (t * (-9.0 * (y * z))) + (a * (27.0 * b));
} else {
tmp = (x * 2.0) - (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 <= (-8.2d-209)) then
tmp = (x * 2.0d0) - (9.0d0 * (z * (t * y)))
else if (t <= 6d+68) then
tmp = (x * 2.0d0) - (b * (a * (-27.0d0)))
else if (t <= 5.2d+255) then
tmp = (t * ((-9.0d0) * (y * z))) + (a * (27.0d0 * b))
else
tmp = (x * 2.0d0) - (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 <= -8.2e-209) {
tmp = (x * 2.0) - (9.0 * (z * (t * y)));
} else if (t <= 6e+68) {
tmp = (x * 2.0) - (b * (a * -27.0));
} else if (t <= 5.2e+255) {
tmp = (t * (-9.0 * (y * z))) + (a * (27.0 * b));
} else {
tmp = (x * 2.0) - (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 <= -8.2e-209: tmp = (x * 2.0) - (9.0 * (z * (t * y))) elif t <= 6e+68: tmp = (x * 2.0) - (b * (a * -27.0)) elif t <= 5.2e+255: tmp = (t * (-9.0 * (y * z))) + (a * (27.0 * b)) else: tmp = (x * 2.0) - (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 <= -8.2e-209) tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(z * Float64(t * y)))); elseif (t <= 6e+68) tmp = Float64(Float64(x * 2.0) - Float64(b * Float64(a * -27.0))); elseif (t <= 5.2e+255) tmp = Float64(Float64(t * Float64(-9.0 * Float64(y * z))) + Float64(a * Float64(27.0 * b))); else tmp = Float64(Float64(x * 2.0) - 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 <= -8.2e-209)
tmp = (x * 2.0) - (9.0 * (z * (t * y)));
elseif (t <= 6e+68)
tmp = (x * 2.0) - (b * (a * -27.0));
elseif (t <= 5.2e+255)
tmp = (t * (-9.0 * (y * z))) + (a * (27.0 * b));
else
tmp = (x * 2.0) - (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, -8.2e-209], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(z * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6e+68], N[(N[(x * 2.0), $MachinePrecision] - N[(b * N[(a * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.2e+255], N[(N[(t * N[(-9.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(t * N[(y * z), $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}
\mathbf{if}\;t \leq -8.2 \cdot 10^{-209}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(z \cdot \left(t \cdot y\right)\right)\\
\mathbf{elif}\;t \leq 6 \cdot 10^{+68}:\\
\;\;\;\;x \cdot 2 - b \cdot \left(a \cdot -27\right)\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{+255}:\\
\;\;\;\;t \cdot \left(-9 \cdot \left(y \cdot z\right)\right) + a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if t < -8.19999999999999955e-209Initial program 95.0%
sub-neg95.0%
sub-neg95.0%
associate-*l*96.9%
associate-*l*97.0%
Simplified97.0%
Taylor expanded in a around 0 60.4%
expm1-log1p-u40.5%
expm1-udef39.6%
*-commutative39.6%
*-commutative39.6%
associate-*l*38.9%
Applied egg-rr38.9%
expm1-def40.3%
expm1-log1p61.8%
*-commutative61.8%
Simplified61.8%
if -8.19999999999999955e-209 < t < 6.0000000000000004e68Initial program 95.7%
sub-neg95.7%
sub-neg95.7%
associate-*l*99.8%
associate-*l*99.7%
Simplified99.7%
Taylor expanded in y around 0 86.2%
flip-+48.1%
*-commutative48.1%
fma-neg48.1%
*-commutative48.1%
clear-num48.1%
*-commutative48.1%
fma-neg48.1%
cancel-sign-sub-inv48.1%
metadata-eval48.1%
*-commutative48.1%
*-commutative48.1%
pow248.1%
*-commutative48.1%
Applied egg-rr48.0%
clear-num48.0%
unpow248.0%
*-commutative48.0%
metadata-eval48.0%
unpow248.0%
swap-sqr48.1%
flip--86.2%
associate-*r*86.2%
cancel-sign-sub-inv86.2%
Applied egg-rr86.2%
if 6.0000000000000004e68 < t < 5.20000000000000019e255Initial program 97.5%
sub-neg97.5%
sub-neg97.5%
associate-*l*95.3%
associate-*l*95.2%
Simplified95.2%
Taylor expanded in x around 0 86.8%
*-commutative86.8%
associate-*l*86.9%
sub-neg86.9%
+-commutative86.9%
*-commutative86.9%
distribute-rgt-neg-in86.9%
*-commutative86.9%
distribute-rgt-neg-in86.9%
metadata-eval86.9%
associate-*r*86.8%
*-commutative86.8%
associate-*l*86.8%
Applied egg-rr86.8%
if 5.20000000000000019e255 < t Initial program 94.1%
sub-neg94.1%
sub-neg94.1%
associate-*l*77.4%
associate-*l*77.4%
Simplified77.4%
Taylor expanded in a around 0 92.9%
Final simplification77.1%
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)))))
(if (<= t -8.2e-209)
(- (* x 2.0) (* 9.0 (* z (* t y))))
(if (<= t 8.2e+67)
(- (* x 2.0) (* b (* a -27.0)))
(if (<= t 3.8e+255) (- (* 27.0 (* a b)) t_1) (- (* x 2.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 = 9.0 * (t * (y * z));
double tmp;
if (t <= -8.2e-209) {
tmp = (x * 2.0) - (9.0 * (z * (t * y)));
} else if (t <= 8.2e+67) {
tmp = (x * 2.0) - (b * (a * -27.0));
} else if (t <= 3.8e+255) {
tmp = (27.0 * (a * b)) - t_1;
} else {
tmp = (x * 2.0) - 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 = 9.0d0 * (t * (y * z))
if (t <= (-8.2d-209)) then
tmp = (x * 2.0d0) - (9.0d0 * (z * (t * y)))
else if (t <= 8.2d+67) then
tmp = (x * 2.0d0) - (b * (a * (-27.0d0)))
else if (t <= 3.8d+255) then
tmp = (27.0d0 * (a * b)) - t_1
else
tmp = (x * 2.0d0) - 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 = 9.0 * (t * (y * z));
double tmp;
if (t <= -8.2e-209) {
tmp = (x * 2.0) - (9.0 * (z * (t * y)));
} else if (t <= 8.2e+67) {
tmp = (x * 2.0) - (b * (a * -27.0));
} else if (t <= 3.8e+255) {
tmp = (27.0 * (a * b)) - t_1;
} else {
tmp = (x * 2.0) - 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 = 9.0 * (t * (y * z)) tmp = 0 if t <= -8.2e-209: tmp = (x * 2.0) - (9.0 * (z * (t * y))) elif t <= 8.2e+67: tmp = (x * 2.0) - (b * (a * -27.0)) elif t <= 3.8e+255: tmp = (27.0 * (a * b)) - t_1 else: tmp = (x * 2.0) - 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(9.0 * Float64(t * Float64(y * z))) tmp = 0.0 if (t <= -8.2e-209) tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(z * Float64(t * y)))); elseif (t <= 8.2e+67) tmp = Float64(Float64(x * 2.0) - Float64(b * Float64(a * -27.0))); elseif (t <= 3.8e+255) tmp = Float64(Float64(27.0 * Float64(a * b)) - t_1); else tmp = Float64(Float64(x * 2.0) - 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 = 9.0 * (t * (y * z));
tmp = 0.0;
if (t <= -8.2e-209)
tmp = (x * 2.0) - (9.0 * (z * (t * y)));
elseif (t <= 8.2e+67)
tmp = (x * 2.0) - (b * (a * -27.0));
elseif (t <= 3.8e+255)
tmp = (27.0 * (a * b)) - t_1;
else
tmp = (x * 2.0) - 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[(9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.2e-209], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(z * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.2e+67], N[(N[(x * 2.0), $MachinePrecision] - N[(b * N[(a * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.8e+255], N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(x * 2.0), $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 := 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\mathbf{if}\;t \leq -8.2 \cdot 10^{-209}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(z \cdot \left(t \cdot y\right)\right)\\
\mathbf{elif}\;t \leq 8.2 \cdot 10^{+67}:\\
\;\;\;\;x \cdot 2 - b \cdot \left(a \cdot -27\right)\\
\mathbf{elif}\;t \leq 3.8 \cdot 10^{+255}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right) - t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - t_1\\
\end{array}
\end{array}
if t < -8.19999999999999955e-209Initial program 95.0%
sub-neg95.0%
sub-neg95.0%
associate-*l*96.9%
associate-*l*97.0%
Simplified97.0%
Taylor expanded in a around 0 60.4%
expm1-log1p-u40.5%
expm1-udef39.6%
*-commutative39.6%
*-commutative39.6%
associate-*l*38.9%
Applied egg-rr38.9%
expm1-def40.3%
expm1-log1p61.8%
*-commutative61.8%
Simplified61.8%
if -8.19999999999999955e-209 < t < 8.19999999999999959e67Initial program 95.7%
sub-neg95.7%
sub-neg95.7%
associate-*l*99.8%
associate-*l*99.7%
Simplified99.7%
Taylor expanded in y around 0 86.2%
flip-+48.1%
*-commutative48.1%
fma-neg48.1%
*-commutative48.1%
clear-num48.1%
*-commutative48.1%
fma-neg48.1%
cancel-sign-sub-inv48.1%
metadata-eval48.1%
*-commutative48.1%
*-commutative48.1%
pow248.1%
*-commutative48.1%
Applied egg-rr48.0%
clear-num48.0%
unpow248.0%
*-commutative48.0%
metadata-eval48.0%
unpow248.0%
swap-sqr48.1%
flip--86.2%
associate-*r*86.2%
cancel-sign-sub-inv86.2%
Applied egg-rr86.2%
if 8.19999999999999959e67 < t < 3.7999999999999999e255Initial program 97.5%
sub-neg97.5%
sub-neg97.5%
associate-*l*95.3%
associate-*l*95.2%
Simplified95.2%
Taylor expanded in x around 0 86.8%
if 3.7999999999999999e255 < t Initial program 94.1%
sub-neg94.1%
sub-neg94.1%
associate-*l*77.4%
associate-*l*77.4%
Simplified77.4%
Taylor expanded in a around 0 92.9%
Final simplification77.1%
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 2.3e+51) (+ (* y (* z (* t -9.0))) (+ (* 27.0 (* a b)) (* x 2.0))) (- (* x 2.0) (* 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 (z <= 2.3e+51) {
tmp = (y * (z * (t * -9.0))) + ((27.0 * (a * b)) + (x * 2.0));
} else {
tmp = (x * 2.0) - (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 (z <= 2.3d+51) then
tmp = (y * (z * (t * (-9.0d0)))) + ((27.0d0 * (a * b)) + (x * 2.0d0))
else
tmp = (x * 2.0d0) - (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 (z <= 2.3e+51) {
tmp = (y * (z * (t * -9.0))) + ((27.0 * (a * b)) + (x * 2.0));
} else {
tmp = (x * 2.0) - (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 z <= 2.3e+51: tmp = (y * (z * (t * -9.0))) + ((27.0 * (a * b)) + (x * 2.0)) else: tmp = (x * 2.0) - (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 (z <= 2.3e+51) tmp = Float64(Float64(y * Float64(z * Float64(t * -9.0))) + Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0))); else tmp = Float64(Float64(x * 2.0) - 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 (z <= 2.3e+51)
tmp = (y * (z * (t * -9.0))) + ((27.0 * (a * b)) + (x * 2.0));
else
tmp = (x * 2.0) - (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[z, 2.3e+51], N[(N[(y * N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(t * N[(y * z), $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}
\mathbf{if}\;z \leq 2.3 \cdot 10^{+51}:\\
\;\;\;\;y \cdot \left(z \cdot \left(t \cdot -9\right)\right) + \left(27 \cdot \left(a \cdot b\right) + x \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if z < 2.30000000000000005e51Initial program 97.0%
+-commutative97.0%
associate-+r-97.0%
*-commutative97.0%
cancel-sign-sub-inv97.0%
associate-*r*93.1%
distribute-lft-neg-in93.1%
*-commutative93.1%
cancel-sign-sub-inv93.1%
associate-+r-93.1%
associate-*l*93.1%
fma-def94.1%
cancel-sign-sub-inv94.1%
fma-def94.1%
*-commutative94.1%
distribute-rgt-neg-in94.1%
distribute-lft-neg-out94.1%
associate-*r*97.9%
associate-*l*97.9%
Simplified97.9%
fma-udef96.9%
fma-udef96.9%
associate-+r+96.9%
associate-*r*96.9%
*-commutative96.9%
associate-*l*96.9%
*-commutative96.9%
associate-*l*97.9%
*-commutative97.9%
associate-*r*97.8%
*-commutative97.8%
Applied egg-rr97.8%
if 2.30000000000000005e51 < z Initial program 91.1%
sub-neg91.1%
sub-neg91.1%
associate-*l*91.4%
associate-*l*91.5%
Simplified91.5%
Taylor expanded in a around 0 72.1%
Final simplification92.1%
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 (+ (* b (* a 27.0)) (- (* x 2.0) (* (* y z) (* t 9.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) {
return (b * (a * 27.0)) + ((x * 2.0) - ((y * z) * (t * 9.0)));
}
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 = (b * (a * 27.0d0)) + ((x * 2.0d0) - ((y * z) * (t * 9.0d0)))
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 (b * (a * 27.0)) + ((x * 2.0) - ((y * z) * (t * 9.0)));
}
[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 (b * (a * 27.0)) + ((x * 2.0) - ((y * z) * (t * 9.0)))
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(Float64(b * Float64(a * 27.0)) + Float64(Float64(x * 2.0) - Float64(Float64(y * z) * Float64(t * 9.0)))) 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 = (b * (a * 27.0)) + ((x * 2.0) - ((y * z) * (t * 9.0)));
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[(N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x * 2.0), $MachinePrecision] - N[(N[(y * z), $MachinePrecision] * N[(t * 9.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])\\
\\
b \cdot \left(a \cdot 27\right) + \left(x \cdot 2 - \left(y \cdot z\right) \cdot \left(t \cdot 9\right)\right)
\end{array}
Initial program 95.7%
Taylor expanded in y around 0 95.6%
Taylor expanded in y around 0 95.6%
associate-*r*95.7%
Simplified95.7%
Final simplification95.7%
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 (+ (* b (* a 27.0)) (- (* x 2.0) (* t (* 9.0 (* 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) {
return (b * (a * 27.0)) + ((x * 2.0) - (t * (9.0 * (y * z))));
}
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 = (b * (a * 27.0d0)) + ((x * 2.0d0) - (t * (9.0d0 * (y * z))))
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 (b * (a * 27.0)) + ((x * 2.0) - (t * (9.0 * (y * z))));
}
[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 (b * (a * 27.0)) + ((x * 2.0) - (t * (9.0 * (y * z))))
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(Float64(b * Float64(a * 27.0)) + Float64(Float64(x * 2.0) - Float64(t * Float64(9.0 * Float64(y * z))))) 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 = (b * (a * 27.0)) + ((x * 2.0) - (t * (9.0 * (y * z))));
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[(N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x * 2.0), $MachinePrecision] - N[(t * N[(9.0 * N[(y * z), $MachinePrecision]), $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])\\
\\
b \cdot \left(a \cdot 27\right) + \left(x \cdot 2 - t \cdot \left(9 \cdot \left(y \cdot z\right)\right)\right)
\end{array}
Initial program 95.7%
Taylor expanded in y around 0 95.6%
Final simplification95.6%
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 (+ (- (* x 2.0) (* t (* z (* y 9.0)))) (* b (* a 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) {
return ((x * 2.0) - (t * (z * (y * 9.0)))) + (b * (a * 27.0));
}
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 = ((x * 2.0d0) - (t * (z * (y * 9.0d0)))) + (b * (a * 27.0d0))
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 ((x * 2.0) - (t * (z * (y * 9.0)))) + (b * (a * 27.0));
}
[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 ((x * 2.0) - (t * (z * (y * 9.0)))) + (b * (a * 27.0))
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(Float64(Float64(x * 2.0) - Float64(t * Float64(z * Float64(y * 9.0)))) + Float64(b * Float64(a * 27.0))) 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 = ((x * 2.0) - (t * (z * (y * 9.0)))) + (b * (a * 27.0));
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[(N[(N[(x * 2.0), $MachinePrecision] - N[(t * N[(z * N[(y * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a * 27.0), $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])\\
\\
\left(x \cdot 2 - t \cdot \left(z \cdot \left(y \cdot 9\right)\right)\right) + b \cdot \left(a \cdot 27\right)
\end{array}
Initial program 95.7%
Final simplification95.7%
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 (or (<= z -4.4e-61) (not (<= z 6.5e-66))) (- (* x 2.0) (* 9.0 (* t (* y z)))) (+ (* 27.0 (* a b)) (* x 2.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 tmp;
if ((z <= -4.4e-61) || !(z <= 6.5e-66)) {
tmp = (x * 2.0) - (9.0 * (t * (y * z)));
} else {
tmp = (27.0 * (a * b)) + (x * 2.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) :: tmp
if ((z <= (-4.4d-61)) .or. (.not. (z <= 6.5d-66))) then
tmp = (x * 2.0d0) - (9.0d0 * (t * (y * z)))
else
tmp = (27.0d0 * (a * b)) + (x * 2.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 tmp;
if ((z <= -4.4e-61) || !(z <= 6.5e-66)) {
tmp = (x * 2.0) - (9.0 * (t * (y * z)));
} else {
tmp = (27.0 * (a * b)) + (x * 2.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): tmp = 0 if (z <= -4.4e-61) or not (z <= 6.5e-66): tmp = (x * 2.0) - (9.0 * (t * (y * z))) else: tmp = (27.0 * (a * b)) + (x * 2.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) tmp = 0.0 if ((z <= -4.4e-61) || !(z <= 6.5e-66)) tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(t * Float64(y * z)))); else tmp = Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.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)
tmp = 0.0;
if ((z <= -4.4e-61) || ~((z <= 6.5e-66)))
tmp = (x * 2.0) - (9.0 * (t * (y * z)));
else
tmp = (27.0 * (a * b)) + (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. 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[Or[LessEqual[z, -4.4e-61], N[Not[LessEqual[z, 6.5e-66]], $MachinePrecision]], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $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 -4.4 \cdot 10^{-61} \lor \neg \left(z \leq 6.5 \cdot 10^{-66}\right):\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\
\end{array}
\end{array}
if z < -4.40000000000000017e-61 or 6.50000000000000024e-66 < z Initial program 93.5%
sub-neg93.5%
sub-neg93.5%
associate-*l*94.2%
associate-*l*94.3%
Simplified94.3%
Taylor expanded in a around 0 70.9%
if -4.40000000000000017e-61 < z < 6.50000000000000024e-66Initial program 99.0%
sub-neg99.0%
sub-neg99.0%
associate-*l*99.7%
associate-*l*99.6%
Simplified99.6%
Taylor expanded in y around 0 83.4%
Final simplification75.8%
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 -1.2e-60)
(- (* x 2.0) (* 9.0 (* z (* t y))))
(if (<= z 8.2e-69)
(+ (* 27.0 (* a b)) (* x 2.0))
(- (* x 2.0) (* 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 (z <= -1.2e-60) {
tmp = (x * 2.0) - (9.0 * (z * (t * y)));
} else if (z <= 8.2e-69) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else {
tmp = (x * 2.0) - (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 (z <= (-1.2d-60)) then
tmp = (x * 2.0d0) - (9.0d0 * (z * (t * y)))
else if (z <= 8.2d-69) then
tmp = (27.0d0 * (a * b)) + (x * 2.0d0)
else
tmp = (x * 2.0d0) - (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 (z <= -1.2e-60) {
tmp = (x * 2.0) - (9.0 * (z * (t * y)));
} else if (z <= 8.2e-69) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else {
tmp = (x * 2.0) - (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 z <= -1.2e-60: tmp = (x * 2.0) - (9.0 * (z * (t * y))) elif z <= 8.2e-69: tmp = (27.0 * (a * b)) + (x * 2.0) else: tmp = (x * 2.0) - (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 (z <= -1.2e-60) tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(z * Float64(t * y)))); elseif (z <= 8.2e-69) tmp = Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0)); else tmp = Float64(Float64(x * 2.0) - 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 (z <= -1.2e-60)
tmp = (x * 2.0) - (9.0 * (z * (t * y)));
elseif (z <= 8.2e-69)
tmp = (27.0 * (a * b)) + (x * 2.0);
else
tmp = (x * 2.0) - (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[z, -1.2e-60], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(z * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.2e-69], N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(t * N[(y * z), $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}
\mathbf{if}\;z \leq -1.2 \cdot 10^{-60}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(z \cdot \left(t \cdot y\right)\right)\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{-69}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if z < -1.20000000000000005e-60Initial program 94.2%
sub-neg94.2%
sub-neg94.2%
associate-*l*94.2%
associate-*l*94.2%
Simplified94.2%
Taylor expanded in a around 0 74.4%
expm1-log1p-u46.0%
expm1-udef45.9%
*-commutative45.9%
*-commutative45.9%
associate-*l*45.9%
Applied egg-rr45.9%
expm1-def46.0%
expm1-log1p77.2%
*-commutative77.2%
Simplified77.2%
if -1.20000000000000005e-60 < z < 8.1999999999999998e-69Initial program 99.0%
sub-neg99.0%
sub-neg99.0%
associate-*l*99.7%
associate-*l*99.6%
Simplified99.6%
Taylor expanded in y around 0 83.3%
if 8.1999999999999998e-69 < z Initial program 93.0%
sub-neg93.0%
sub-neg93.0%
associate-*l*94.3%
associate-*l*94.4%
Simplified94.4%
Taylor expanded in a around 0 67.3%
Final simplification76.2%
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 -8.8e-47) (* z (* -9.0 (* t y))) (if (<= z 5.4e+29) (+ (* 27.0 (* a b)) (* x 2.0)) (* -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 (z <= -8.8e-47) {
tmp = z * (-9.0 * (t * y));
} else if (z <= 5.4e+29) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} 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 (z <= (-8.8d-47)) then
tmp = z * ((-9.0d0) * (t * y))
else if (z <= 5.4d+29) then
tmp = (27.0d0 * (a * b)) + (x * 2.0d0)
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 (z <= -8.8e-47) {
tmp = z * (-9.0 * (t * y));
} else if (z <= 5.4e+29) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} 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 z <= -8.8e-47: tmp = z * (-9.0 * (t * y)) elif z <= 5.4e+29: tmp = (27.0 * (a * b)) + (x * 2.0) 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 (z <= -8.8e-47) tmp = Float64(z * Float64(-9.0 * Float64(t * y))); elseif (z <= 5.4e+29) tmp = Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0)); 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 (z <= -8.8e-47)
tmp = z * (-9.0 * (t * y));
elseif (z <= 5.4e+29)
tmp = (27.0 * (a * b)) + (x * 2.0);
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[z, -8.8e-47], N[(z * N[(-9.0 * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.4e+29], N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $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}\;z \leq -8.8 \cdot 10^{-47}:\\
\;\;\;\;z \cdot \left(-9 \cdot \left(t \cdot y\right)\right)\\
\mathbf{elif}\;z \leq 5.4 \cdot 10^{+29}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if z < -8.80000000000000075e-47Initial program 95.4%
Taylor expanded in y around 0 95.4%
Taylor expanded in y around inf 52.7%
*-commutative52.7%
*-commutative52.7%
*-commutative52.7%
associate-*r*54.0%
associate-*l*54.0%
*-commutative54.0%
Simplified54.0%
if -8.80000000000000075e-47 < z < 5.4e29Initial program 97.6%
sub-neg97.6%
sub-neg97.6%
associate-*l*99.0%
associate-*l*98.9%
Simplified98.9%
Taylor expanded in y around 0 83.9%
if 5.4e29 < z Initial program 91.9%
sub-neg91.9%
sub-neg91.9%
associate-*l*92.1%
associate-*l*92.1%
Simplified92.1%
Taylor expanded in y around inf 47.5%
Final simplification67.4%
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 (or (<= a -2.5e+38) (not (<= a 2.95e-74))) (* 27.0 (* a b)) (* x 2.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 tmp;
if ((a <= -2.5e+38) || !(a <= 2.95e-74)) {
tmp = 27.0 * (a * b);
} else {
tmp = x * 2.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) :: tmp
if ((a <= (-2.5d+38)) .or. (.not. (a <= 2.95d-74))) then
tmp = 27.0d0 * (a * b)
else
tmp = x * 2.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 tmp;
if ((a <= -2.5e+38) || !(a <= 2.95e-74)) {
tmp = 27.0 * (a * b);
} else {
tmp = x * 2.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): tmp = 0 if (a <= -2.5e+38) or not (a <= 2.95e-74): tmp = 27.0 * (a * b) else: tmp = x * 2.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) tmp = 0.0 if ((a <= -2.5e+38) || !(a <= 2.95e-74)) tmp = Float64(27.0 * Float64(a * b)); else tmp = Float64(x * 2.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)
tmp = 0.0;
if ((a <= -2.5e+38) || ~((a <= 2.95e-74)))
tmp = 27.0 * (a * b);
else
tmp = 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. 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[Or[LessEqual[a, -2.5e+38], N[Not[LessEqual[a, 2.95e-74]], $MachinePrecision]], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], N[(x * 2.0), $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}\;a \leq -2.5 \cdot 10^{+38} \lor \neg \left(a \leq 2.95 \cdot 10^{-74}\right):\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if a < -2.49999999999999985e38 or 2.94999999999999983e-74 < a Initial program 93.8%
sub-neg93.8%
sub-neg93.8%
associate-*l*94.7%
associate-*l*94.7%
Simplified94.7%
Taylor expanded in a around inf 54.5%
if -2.49999999999999985e38 < a < 2.94999999999999983e-74Initial program 97.6%
sub-neg97.6%
sub-neg97.6%
associate-*l*98.2%
associate-*l*98.2%
Simplified98.2%
Taylor expanded in x around inf 48.4%
Final simplification51.6%
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 (<= a -1.55e+35) (* a (* 27.0 b)) (if (<= a 1.3e-75) (* x 2.0) (* 27.0 (* a b)))))
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 (a <= -1.55e+35) {
tmp = a * (27.0 * b);
} else if (a <= 1.3e-75) {
tmp = x * 2.0;
} else {
tmp = 27.0 * (a * b);
}
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 (a <= (-1.55d+35)) then
tmp = a * (27.0d0 * b)
else if (a <= 1.3d-75) then
tmp = x * 2.0d0
else
tmp = 27.0d0 * (a * b)
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 (a <= -1.55e+35) {
tmp = a * (27.0 * b);
} else if (a <= 1.3e-75) {
tmp = x * 2.0;
} else {
tmp = 27.0 * (a * b);
}
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 a <= -1.55e+35: tmp = a * (27.0 * b) elif a <= 1.3e-75: tmp = x * 2.0 else: tmp = 27.0 * (a * b) 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 (a <= -1.55e+35) tmp = Float64(a * Float64(27.0 * b)); elseif (a <= 1.3e-75) tmp = Float64(x * 2.0); else tmp = Float64(27.0 * Float64(a * b)); 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 (a <= -1.55e+35)
tmp = a * (27.0 * b);
elseif (a <= 1.3e-75)
tmp = x * 2.0;
else
tmp = 27.0 * (a * b);
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[a, -1.55e+35], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.3e-75], N[(x * 2.0), $MachinePrecision], N[(27.0 * N[(a * b), $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}\;a \leq -1.55 \cdot 10^{+35}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;a \leq 1.3 \cdot 10^{-75}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if a < -1.54999999999999993e35Initial program 96.1%
sub-neg96.1%
sub-neg96.1%
associate-*l*94.5%
associate-*l*94.5%
Simplified94.5%
Taylor expanded in a around inf 53.9%
associate-*r*53.9%
*-commutative53.9%
associate-*r*53.9%
Simplified53.9%
if -1.54999999999999993e35 < a < 1.3e-75Initial program 97.6%
sub-neg97.6%
sub-neg97.6%
associate-*l*98.2%
associate-*l*98.2%
Simplified98.2%
Taylor expanded in x around inf 48.4%
if 1.3e-75 < a Initial program 92.4%
sub-neg92.4%
sub-neg92.4%
associate-*l*94.9%
associate-*l*94.9%
Simplified94.9%
Taylor expanded in a around inf 54.9%
Final simplification51.6%
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 (* x 2.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) {
return x * 2.0;
}
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 = x * 2.0d0
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 x * 2.0;
}
[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 x * 2.0
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(x * 2.0) 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 = x * 2.0;
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[(x * 2.0), $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])\\
\\
x \cdot 2
\end{array}
Initial program 95.7%
sub-neg95.7%
sub-neg95.7%
associate-*l*96.4%
associate-*l*96.4%
Simplified96.4%
Taylor expanded in x around inf 35.0%
Final simplification35.0%
(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 2023322
(FPCore (x y z t a b)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, A"
:precision binary64
:herbie-target
(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)))