
(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 15 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 (if (<= z 3.8e-58) (+ (* y (* z (* t -9.0))) (+ (* 27.0 (* a b)) (* x 2.0))) (fma a (* 27.0 b) (fma x 2.0 (* t (* y (* z -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 tmp;
if (z <= 3.8e-58) {
tmp = (y * (z * (t * -9.0))) + ((27.0 * (a * b)) + (x * 2.0));
} else {
tmp = fma(a, (27.0 * b), fma(x, 2.0, (t * (y * (z * -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) tmp = 0.0 if (z <= 3.8e-58) tmp = Float64(Float64(y * Float64(z * Float64(t * -9.0))) + Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0))); else tmp = fma(a, Float64(27.0 * b), fma(x, 2.0, Float64(t * Float64(y * Float64(z * -9.0))))); end return 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, 3.8e-58], 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[(a * N[(27.0 * b), $MachinePrecision] + N[(x * 2.0 + N[(t * N[(y * N[(z * -9.0), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 3.8 \cdot 10^{-58}:\\
\;\;\;\;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}:\\
\;\;\;\;\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\right)\right)\\
\end{array}
\end{array}
if z < 3.7999999999999997e-58Initial program 95.7%
+-commutative95.7%
associate-+r-95.7%
*-commutative95.7%
cancel-sign-sub-inv95.7%
associate-*r*93.9%
distribute-lft-neg-in93.9%
*-commutative93.9%
cancel-sign-sub-inv93.9%
associate-+r-93.9%
associate-*l*93.9%
fma-def94.4%
cancel-sign-sub-inv94.4%
fma-def94.4%
distribute-lft-neg-in94.4%
distribute-rgt-neg-in94.4%
*-commutative94.4%
associate-*r*96.2%
associate-*l*95.7%
neg-mul-195.7%
associate-*r*95.7%
Simplified95.7%
fma-udef95.2%
fma-udef95.2%
associate-+r+95.2%
associate-*r*95.2%
*-commutative95.2%
associate-*l*95.2%
*-commutative95.2%
associate-*l*95.4%
*-commutative95.4%
associate-*r*95.4%
*-commutative95.4%
Applied egg-rr95.4%
if 3.7999999999999997e-58 < z Initial program 95.2%
+-commutative95.2%
associate-+r-95.2%
*-commutative95.2%
cancel-sign-sub-inv95.2%
associate-*r*97.4%
distribute-lft-neg-in97.4%
*-commutative97.4%
cancel-sign-sub-inv97.4%
associate-+r-97.4%
associate-*l*97.4%
fma-def97.4%
cancel-sign-sub-inv97.4%
fma-def97.4%
distribute-lft-neg-in97.4%
distribute-rgt-neg-in97.4%
*-commutative97.4%
associate-*r*95.2%
associate-*l*95.2%
neg-mul-195.2%
associate-*r*95.2%
Simplified95.2%
Final simplification95.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
(let* ((t_1 (* -9.0 (* t (* z y)))))
(if (<= b -3.2e-128)
(* 27.0 (* a b))
(if (<= b 6.3e-139)
t_1
(if (<= b 1.85e-44)
(* x 2.0)
(if (<= b 7200000000.0)
t_1
(if (<= b 2.55e+58) (* x 2.0) (* a (* 27.0 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 t_1 = -9.0 * (t * (z * y));
double tmp;
if (b <= -3.2e-128) {
tmp = 27.0 * (a * b);
} else if (b <= 6.3e-139) {
tmp = t_1;
} else if (b <= 1.85e-44) {
tmp = x * 2.0;
} else if (b <= 7200000000.0) {
tmp = t_1;
} else if (b <= 2.55e+58) {
tmp = x * 2.0;
} else {
tmp = a * (27.0 * 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) :: t_1
real(8) :: tmp
t_1 = (-9.0d0) * (t * (z * y))
if (b <= (-3.2d-128)) then
tmp = 27.0d0 * (a * b)
else if (b <= 6.3d-139) then
tmp = t_1
else if (b <= 1.85d-44) then
tmp = x * 2.0d0
else if (b <= 7200000000.0d0) then
tmp = t_1
else if (b <= 2.55d+58) then
tmp = x * 2.0d0
else
tmp = a * (27.0d0 * 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 t_1 = -9.0 * (t * (z * y));
double tmp;
if (b <= -3.2e-128) {
tmp = 27.0 * (a * b);
} else if (b <= 6.3e-139) {
tmp = t_1;
} else if (b <= 1.85e-44) {
tmp = x * 2.0;
} else if (b <= 7200000000.0) {
tmp = t_1;
} else if (b <= 2.55e+58) {
tmp = x * 2.0;
} else {
tmp = a * (27.0 * 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): t_1 = -9.0 * (t * (z * y)) tmp = 0 if b <= -3.2e-128: tmp = 27.0 * (a * b) elif b <= 6.3e-139: tmp = t_1 elif b <= 1.85e-44: tmp = x * 2.0 elif b <= 7200000000.0: tmp = t_1 elif b <= 2.55e+58: tmp = x * 2.0 else: tmp = a * (27.0 * 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) t_1 = Float64(-9.0 * Float64(t * Float64(z * y))) tmp = 0.0 if (b <= -3.2e-128) tmp = Float64(27.0 * Float64(a * b)); elseif (b <= 6.3e-139) tmp = t_1; elseif (b <= 1.85e-44) tmp = Float64(x * 2.0); elseif (b <= 7200000000.0) tmp = t_1; elseif (b <= 2.55e+58) tmp = Float64(x * 2.0); else tmp = Float64(a * Float64(27.0 * 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)
t_1 = -9.0 * (t * (z * y));
tmp = 0.0;
if (b <= -3.2e-128)
tmp = 27.0 * (a * b);
elseif (b <= 6.3e-139)
tmp = t_1;
elseif (b <= 1.85e-44)
tmp = x * 2.0;
elseif (b <= 7200000000.0)
tmp = t_1;
elseif (b <= 2.55e+58)
tmp = x * 2.0;
else
tmp = a * (27.0 * b);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.2e-128], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.3e-139], t$95$1, If[LessEqual[b, 1.85e-44], N[(x * 2.0), $MachinePrecision], If[LessEqual[b, 7200000000.0], t$95$1, If[LessEqual[b, 2.55e+58], N[(x * 2.0), $MachinePrecision], N[(a * N[(27.0 * 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}
t_1 := -9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\mathbf{if}\;b \leq -3.2 \cdot 10^{-128}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;b \leq 6.3 \cdot 10^{-139}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 1.85 \cdot 10^{-44}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;b \leq 7200000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 2.55 \cdot 10^{+58}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\end{array}
\end{array}
if b < -3.1999999999999998e-128Initial program 95.8%
sub-neg95.8%
sub-neg95.8%
associate-*l*95.4%
associate-*l*95.4%
Simplified95.4%
Taylor expanded in a around inf 51.2%
if -3.1999999999999998e-128 < b < 6.2999999999999999e-139 or 1.85e-44 < b < 7.2e9Initial program 95.3%
sub-neg95.3%
sub-neg95.3%
associate-*l*95.0%
associate-*l*95.0%
Simplified95.0%
Taylor expanded in y around inf 46.6%
if 6.2999999999999999e-139 < b < 1.85e-44 or 7.2e9 < b < 2.55000000000000004e58Initial program 94.5%
sub-neg94.5%
sub-neg94.5%
associate-*l*88.8%
associate-*l*88.6%
Simplified88.6%
Taylor expanded in x around inf 59.9%
if 2.55000000000000004e58 < b Initial program 95.9%
sub-neg95.9%
sub-neg95.9%
associate-*l*95.7%
associate-*l*95.7%
Simplified95.7%
Taylor expanded in a around inf 58.8%
associate-*r*58.8%
*-commutative58.8%
associate-*r*58.8%
Simplified58.8%
Final simplification51.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 (<= b -3e-128)
(* 27.0 (* a b))
(if (<= b 1.02e-138)
(* -9.0 (* z (* y t)))
(if (<= b 1.6e-44)
(* x 2.0)
(if (<= b 30000000000.0)
(* -9.0 (* t (* z y)))
(if (<= b 7.5e+61) (* x 2.0) (* a (* 27.0 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 (b <= -3e-128) {
tmp = 27.0 * (a * b);
} else if (b <= 1.02e-138) {
tmp = -9.0 * (z * (y * t));
} else if (b <= 1.6e-44) {
tmp = x * 2.0;
} else if (b <= 30000000000.0) {
tmp = -9.0 * (t * (z * y));
} else if (b <= 7.5e+61) {
tmp = x * 2.0;
} else {
tmp = a * (27.0 * 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 (b <= (-3d-128)) then
tmp = 27.0d0 * (a * b)
else if (b <= 1.02d-138) then
tmp = (-9.0d0) * (z * (y * t))
else if (b <= 1.6d-44) then
tmp = x * 2.0d0
else if (b <= 30000000000.0d0) then
tmp = (-9.0d0) * (t * (z * y))
else if (b <= 7.5d+61) then
tmp = x * 2.0d0
else
tmp = a * (27.0d0 * 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 (b <= -3e-128) {
tmp = 27.0 * (a * b);
} else if (b <= 1.02e-138) {
tmp = -9.0 * (z * (y * t));
} else if (b <= 1.6e-44) {
tmp = x * 2.0;
} else if (b <= 30000000000.0) {
tmp = -9.0 * (t * (z * y));
} else if (b <= 7.5e+61) {
tmp = x * 2.0;
} else {
tmp = a * (27.0 * 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 b <= -3e-128: tmp = 27.0 * (a * b) elif b <= 1.02e-138: tmp = -9.0 * (z * (y * t)) elif b <= 1.6e-44: tmp = x * 2.0 elif b <= 30000000000.0: tmp = -9.0 * (t * (z * y)) elif b <= 7.5e+61: tmp = x * 2.0 else: tmp = a * (27.0 * 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 (b <= -3e-128) tmp = Float64(27.0 * Float64(a * b)); elseif (b <= 1.02e-138) tmp = Float64(-9.0 * Float64(z * Float64(y * t))); elseif (b <= 1.6e-44) tmp = Float64(x * 2.0); elseif (b <= 30000000000.0) tmp = Float64(-9.0 * Float64(t * Float64(z * y))); elseif (b <= 7.5e+61) tmp = Float64(x * 2.0); else tmp = Float64(a * Float64(27.0 * 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 (b <= -3e-128)
tmp = 27.0 * (a * b);
elseif (b <= 1.02e-138)
tmp = -9.0 * (z * (y * t));
elseif (b <= 1.6e-44)
tmp = x * 2.0;
elseif (b <= 30000000000.0)
tmp = -9.0 * (t * (z * y));
elseif (b <= 7.5e+61)
tmp = x * 2.0;
else
tmp = a * (27.0 * b);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -3e-128], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.02e-138], N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.6e-44], N[(x * 2.0), $MachinePrecision], If[LessEqual[b, 30000000000.0], N[(-9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.5e+61], N[(x * 2.0), $MachinePrecision], N[(a * N[(27.0 * 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}\;b \leq -3 \cdot 10^{-128}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;b \leq 1.02 \cdot 10^{-138}:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{elif}\;b \leq 1.6 \cdot 10^{-44}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;b \leq 30000000000:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\mathbf{elif}\;b \leq 7.5 \cdot 10^{+61}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\end{array}
\end{array}
if b < -2.99999999999999978e-128Initial program 95.8%
sub-neg95.8%
sub-neg95.8%
associate-*l*95.4%
associate-*l*95.4%
Simplified95.4%
Taylor expanded in a around inf 51.2%
if -2.99999999999999978e-128 < b < 1.02000000000000007e-138Initial program 95.7%
sub-neg95.7%
sub-neg95.7%
associate-*l*94.1%
associate-*l*94.1%
Simplified94.1%
Taylor expanded in x around 0 95.7%
+-commutative95.7%
*-commutative95.7%
*-commutative95.7%
associate-*r*95.7%
associate-*r*95.7%
*-commutative95.7%
associate-*r*95.7%
associate-*r*94.1%
sub-neg94.1%
distribute-rgt-neg-in94.1%
*-commutative94.1%
distribute-rgt-neg-in94.1%
distribute-lft-neg-in94.1%
metadata-eval94.1%
associate-*l*94.1%
*-commutative94.1%
+-commutative94.1%
Simplified95.8%
Taylor expanded in y around inf 47.7%
associate-*r*49.3%
Simplified49.3%
if 1.02000000000000007e-138 < b < 1.59999999999999997e-44 or 3e10 < b < 7.5e61Initial program 94.5%
sub-neg94.5%
sub-neg94.5%
associate-*l*88.8%
associate-*l*88.6%
Simplified88.6%
Taylor expanded in x around inf 59.9%
if 1.59999999999999997e-44 < b < 3e10Initial program 92.7%
sub-neg92.7%
sub-neg92.7%
associate-*l*99.8%
associate-*l*99.5%
Simplified99.5%
Taylor expanded in y around inf 40.7%
if 7.5e61 < b Initial program 95.9%
sub-neg95.9%
sub-neg95.9%
associate-*l*95.7%
associate-*l*95.7%
Simplified95.7%
Taylor expanded in a around inf 58.8%
associate-*r*58.8%
*-commutative58.8%
associate-*r*58.8%
Simplified58.8%
Final simplification52.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 (<= b -3.5e-128)
(* 27.0 (* a b))
(if (<= b 1.75e-139)
(* -9.0 (* z (* y t)))
(if (<= b 1.65e-44)
(* x 2.0)
(if (<= b 15500000000.0)
(* t (* z (* y -9.0)))
(if (<= b 7.2e+60) (* x 2.0) (* a (* 27.0 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 (b <= -3.5e-128) {
tmp = 27.0 * (a * b);
} else if (b <= 1.75e-139) {
tmp = -9.0 * (z * (y * t));
} else if (b <= 1.65e-44) {
tmp = x * 2.0;
} else if (b <= 15500000000.0) {
tmp = t * (z * (y * -9.0));
} else if (b <= 7.2e+60) {
tmp = x * 2.0;
} else {
tmp = a * (27.0 * 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 (b <= (-3.5d-128)) then
tmp = 27.0d0 * (a * b)
else if (b <= 1.75d-139) then
tmp = (-9.0d0) * (z * (y * t))
else if (b <= 1.65d-44) then
tmp = x * 2.0d0
else if (b <= 15500000000.0d0) then
tmp = t * (z * (y * (-9.0d0)))
else if (b <= 7.2d+60) then
tmp = x * 2.0d0
else
tmp = a * (27.0d0 * 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 (b <= -3.5e-128) {
tmp = 27.0 * (a * b);
} else if (b <= 1.75e-139) {
tmp = -9.0 * (z * (y * t));
} else if (b <= 1.65e-44) {
tmp = x * 2.0;
} else if (b <= 15500000000.0) {
tmp = t * (z * (y * -9.0));
} else if (b <= 7.2e+60) {
tmp = x * 2.0;
} else {
tmp = a * (27.0 * 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 b <= -3.5e-128: tmp = 27.0 * (a * b) elif b <= 1.75e-139: tmp = -9.0 * (z * (y * t)) elif b <= 1.65e-44: tmp = x * 2.0 elif b <= 15500000000.0: tmp = t * (z * (y * -9.0)) elif b <= 7.2e+60: tmp = x * 2.0 else: tmp = a * (27.0 * 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 (b <= -3.5e-128) tmp = Float64(27.0 * Float64(a * b)); elseif (b <= 1.75e-139) tmp = Float64(-9.0 * Float64(z * Float64(y * t))); elseif (b <= 1.65e-44) tmp = Float64(x * 2.0); elseif (b <= 15500000000.0) tmp = Float64(t * Float64(z * Float64(y * -9.0))); elseif (b <= 7.2e+60) tmp = Float64(x * 2.0); else tmp = Float64(a * Float64(27.0 * 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 (b <= -3.5e-128)
tmp = 27.0 * (a * b);
elseif (b <= 1.75e-139)
tmp = -9.0 * (z * (y * t));
elseif (b <= 1.65e-44)
tmp = x * 2.0;
elseif (b <= 15500000000.0)
tmp = t * (z * (y * -9.0));
elseif (b <= 7.2e+60)
tmp = x * 2.0;
else
tmp = a * (27.0 * b);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -3.5e-128], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.75e-139], N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.65e-44], N[(x * 2.0), $MachinePrecision], If[LessEqual[b, 15500000000.0], N[(t * N[(z * N[(y * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.2e+60], N[(x * 2.0), $MachinePrecision], N[(a * N[(27.0 * 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}\;b \leq -3.5 \cdot 10^{-128}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;b \leq 1.75 \cdot 10^{-139}:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{elif}\;b \leq 1.65 \cdot 10^{-44}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;b \leq 15500000000:\\
\;\;\;\;t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\
\mathbf{elif}\;b \leq 7.2 \cdot 10^{+60}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\end{array}
\end{array}
if b < -3.5e-128Initial program 95.8%
sub-neg95.8%
sub-neg95.8%
associate-*l*95.4%
associate-*l*95.4%
Simplified95.4%
Taylor expanded in a around inf 51.2%
if -3.5e-128 < b < 1.75000000000000001e-139Initial program 95.7%
sub-neg95.7%
sub-neg95.7%
associate-*l*94.1%
associate-*l*94.1%
Simplified94.1%
Taylor expanded in x around 0 95.7%
+-commutative95.7%
*-commutative95.7%
*-commutative95.7%
associate-*r*95.7%
associate-*r*95.7%
*-commutative95.7%
associate-*r*95.7%
associate-*r*94.1%
sub-neg94.1%
distribute-rgt-neg-in94.1%
*-commutative94.1%
distribute-rgt-neg-in94.1%
distribute-lft-neg-in94.1%
metadata-eval94.1%
associate-*l*94.1%
*-commutative94.1%
+-commutative94.1%
Simplified95.8%
Taylor expanded in y around inf 47.7%
associate-*r*49.3%
Simplified49.3%
if 1.75000000000000001e-139 < b < 1.65000000000000003e-44 or 1.55e10 < b < 7.19999999999999935e60Initial program 94.5%
sub-neg94.5%
sub-neg94.5%
associate-*l*88.8%
associate-*l*88.6%
Simplified88.6%
Taylor expanded in x around inf 59.9%
if 1.65000000000000003e-44 < b < 1.55e10Initial program 92.7%
sub-neg92.7%
sub-neg92.7%
associate-*l*99.8%
associate-*l*99.5%
Simplified99.5%
Taylor expanded in x around 0 92.7%
+-commutative92.7%
*-commutative92.7%
*-commutative92.7%
associate-*r*92.6%
associate-*r*92.6%
*-commutative92.6%
associate-*r*92.7%
associate-*r*99.9%
sub-neg99.9%
distribute-rgt-neg-in99.9%
*-commutative99.9%
distribute-rgt-neg-in99.9%
distribute-lft-neg-in99.9%
metadata-eval99.9%
associate-*l*99.9%
*-commutative99.9%
+-commutative99.9%
Simplified92.7%
Taylor expanded in y around inf 40.7%
associate-*r*40.6%
*-commutative40.6%
associate-*l*40.6%
Simplified40.6%
expm1-log1p-u33.0%
expm1-udef32.5%
*-commutative32.5%
associate-*l*32.5%
Applied egg-rr32.5%
expm1-def33.0%
expm1-log1p40.7%
associate-*r*40.6%
*-commutative40.6%
associate-*l*40.6%
Simplified40.6%
if 7.19999999999999935e60 < b Initial program 95.9%
sub-neg95.9%
sub-neg95.9%
associate-*l*95.7%
associate-*l*95.7%
Simplified95.7%
Taylor expanded in a around inf 58.8%
associate-*r*58.8%
*-commutative58.8%
associate-*r*58.8%
Simplified58.8%
Final simplification52.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 (+ (* 27.0 (* a b)) (* x 2.0))) (t_2 (* -9.0 (* t (* z y)))))
(if (<= y -1.95e+245)
t_2
(if (<= y -5.3e+218)
t_1
(if (<= y -1.16e+175)
(* t (* -9.0 (* z y)))
(if (<= y 1.48e-133) 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 = (27.0 * (a * b)) + (x * 2.0);
double t_2 = -9.0 * (t * (z * y));
double tmp;
if (y <= -1.95e+245) {
tmp = t_2;
} else if (y <= -5.3e+218) {
tmp = t_1;
} else if (y <= -1.16e+175) {
tmp = t * (-9.0 * (z * y));
} else if (y <= 1.48e-133) {
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 = (27.0d0 * (a * b)) + (x * 2.0d0)
t_2 = (-9.0d0) * (t * (z * y))
if (y <= (-1.95d+245)) then
tmp = t_2
else if (y <= (-5.3d+218)) then
tmp = t_1
else if (y <= (-1.16d+175)) then
tmp = t * ((-9.0d0) * (z * y))
else if (y <= 1.48d-133) 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 = (27.0 * (a * b)) + (x * 2.0);
double t_2 = -9.0 * (t * (z * y));
double tmp;
if (y <= -1.95e+245) {
tmp = t_2;
} else if (y <= -5.3e+218) {
tmp = t_1;
} else if (y <= -1.16e+175) {
tmp = t * (-9.0 * (z * y));
} else if (y <= 1.48e-133) {
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 = (27.0 * (a * b)) + (x * 2.0) t_2 = -9.0 * (t * (z * y)) tmp = 0 if y <= -1.95e+245: tmp = t_2 elif y <= -5.3e+218: tmp = t_1 elif y <= -1.16e+175: tmp = t * (-9.0 * (z * y)) elif y <= 1.48e-133: 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(27.0 * Float64(a * b)) + Float64(x * 2.0)) t_2 = Float64(-9.0 * Float64(t * Float64(z * y))) tmp = 0.0 if (y <= -1.95e+245) tmp = t_2; elseif (y <= -5.3e+218) tmp = t_1; elseif (y <= -1.16e+175) tmp = Float64(t * Float64(-9.0 * Float64(z * y))); elseif (y <= 1.48e-133) 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 = (27.0 * (a * b)) + (x * 2.0);
t_2 = -9.0 * (t * (z * y));
tmp = 0.0;
if (y <= -1.95e+245)
tmp = t_2;
elseif (y <= -5.3e+218)
tmp = t_1;
elseif (y <= -1.16e+175)
tmp = t * (-9.0 * (z * y));
elseif (y <= 1.48e-133)
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[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.95e+245], t$95$2, If[LessEqual[y, -5.3e+218], t$95$1, If[LessEqual[y, -1.16e+175], N[(t * N[(-9.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.48e-133], 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 := 27 \cdot \left(a \cdot b\right) + x \cdot 2\\
t_2 := -9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\mathbf{if}\;y \leq -1.95 \cdot 10^{+245}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -5.3 \cdot 10^{+218}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.16 \cdot 10^{+175}:\\
\;\;\;\;t \cdot \left(-9 \cdot \left(z \cdot y\right)\right)\\
\mathbf{elif}\;y \leq 1.48 \cdot 10^{-133}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -1.9499999999999999e245 or 1.48e-133 < y Initial program 94.7%
sub-neg94.7%
sub-neg94.7%
associate-*l*97.1%
associate-*l*97.0%
Simplified97.0%
Taylor expanded in y around inf 52.1%
if -1.9499999999999999e245 < y < -5.3000000000000001e218 or -1.16e175 < y < 1.48e-133Initial program 97.3%
sub-neg97.3%
sub-neg97.3%
associate-*l*92.9%
associate-*l*92.9%
Simplified92.9%
Taylor expanded in y around 0 78.2%
if -5.3000000000000001e218 < y < -1.16e175Initial program 74.0%
sub-neg74.0%
sub-neg74.0%
associate-*l*99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in x around 0 73.8%
+-commutative73.8%
*-commutative73.8%
*-commutative73.8%
associate-*r*74.0%
associate-*r*74.0%
*-commutative74.0%
associate-*r*73.8%
associate-*r*99.8%
sub-neg99.8%
distribute-rgt-neg-in99.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
distribute-lft-neg-in99.8%
metadata-eval99.8%
associate-*l*99.6%
*-commutative99.6%
+-commutative99.6%
Simplified73.6%
Taylor expanded in y around inf 56.2%
associate-*r*56.2%
*-commutative56.2%
associate-*l*56.4%
Simplified56.4%
Final simplification66.3%
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 (+ (* b (* 27.0 a)) (* y (* -9.0 (* z t))))))
(if (<= b -1.52e-170)
t_1
(if (<= b 3.7e+59)
(- (* x 2.0) (* y (* z (* t 9.0))))
(if (<= b 1.25e+143) t_1 (+ (* 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 t_1 = (b * (27.0 * a)) + (y * (-9.0 * (z * t)));
double tmp;
if (b <= -1.52e-170) {
tmp = t_1;
} else if (b <= 3.7e+59) {
tmp = (x * 2.0) - (y * (z * (t * 9.0)));
} else if (b <= 1.25e+143) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (b * (27.0d0 * a)) + (y * ((-9.0d0) * (z * t)))
if (b <= (-1.52d-170)) then
tmp = t_1
else if (b <= 3.7d+59) then
tmp = (x * 2.0d0) - (y * (z * (t * 9.0d0)))
else if (b <= 1.25d+143) then
tmp = t_1
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 t_1 = (b * (27.0 * a)) + (y * (-9.0 * (z * t)));
double tmp;
if (b <= -1.52e-170) {
tmp = t_1;
} else if (b <= 3.7e+59) {
tmp = (x * 2.0) - (y * (z * (t * 9.0)));
} else if (b <= 1.25e+143) {
tmp = t_1;
} 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): t_1 = (b * (27.0 * a)) + (y * (-9.0 * (z * t))) tmp = 0 if b <= -1.52e-170: tmp = t_1 elif b <= 3.7e+59: tmp = (x * 2.0) - (y * (z * (t * 9.0))) elif b <= 1.25e+143: tmp = t_1 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) t_1 = Float64(Float64(b * Float64(27.0 * a)) + Float64(y * Float64(-9.0 * Float64(z * t)))) tmp = 0.0 if (b <= -1.52e-170) tmp = t_1; elseif (b <= 3.7e+59) tmp = Float64(Float64(x * 2.0) - Float64(y * Float64(z * Float64(t * 9.0)))); elseif (b <= 1.25e+143) tmp = t_1; 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)
t_1 = (b * (27.0 * a)) + (y * (-9.0 * (z * t)));
tmp = 0.0;
if (b <= -1.52e-170)
tmp = t_1;
elseif (b <= 3.7e+59)
tmp = (x * 2.0) - (y * (z * (t * 9.0)));
elseif (b <= 1.25e+143)
tmp = t_1;
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_] := Block[{t$95$1 = N[(N[(b * N[(27.0 * a), $MachinePrecision]), $MachinePrecision] + N[(y * N[(-9.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.52e-170], t$95$1, If[LessEqual[b, 3.7e+59], N[(N[(x * 2.0), $MachinePrecision] - N[(y * N[(z * N[(t * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.25e+143], t$95$1, 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}
t_1 := b \cdot \left(27 \cdot a\right) + y \cdot \left(-9 \cdot \left(z \cdot t\right)\right)\\
\mathbf{if}\;b \leq -1.52 \cdot 10^{-170}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 3.7 \cdot 10^{+59}:\\
\;\;\;\;x \cdot 2 - y \cdot \left(z \cdot \left(t \cdot 9\right)\right)\\
\mathbf{elif}\;b \leq 1.25 \cdot 10^{+143}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\
\end{array}
\end{array}
if b < -1.52000000000000009e-170 or 3.69999999999999997e59 < b < 1.25000000000000003e143Initial program 96.4%
sub-neg96.4%
sub-neg96.4%
associate-*l*96.0%
associate-*l*96.0%
Simplified96.0%
Taylor expanded in x around 0 81.6%
expm1-log1p-u41.7%
expm1-udef38.0%
*-commutative38.0%
*-commutative38.0%
associate-*l*38.0%
Applied egg-rr59.9%
expm1-def41.7%
expm1-log1p53.6%
associate-*l*53.5%
Simplified81.2%
sub-neg81.2%
+-commutative81.2%
distribute-rgt-neg-in81.2%
associate-*r*81.2%
distribute-rgt-neg-in81.2%
metadata-eval81.2%
associate-*r*81.2%
*-commutative81.2%
Applied egg-rr81.2%
if -1.52000000000000009e-170 < b < 3.69999999999999997e59Initial program 94.9%
sub-neg94.9%
sub-neg94.9%
associate-*l*93.6%
associate-*l*93.5%
Simplified93.5%
Taylor expanded in a around 0 82.4%
expm1-log1p-u60.8%
expm1-udef58.6%
*-commutative58.6%
*-commutative58.6%
associate-*l*58.6%
Applied egg-rr58.6%
expm1-def60.8%
expm1-log1p82.4%
associate-*l*80.7%
Simplified80.7%
if 1.25000000000000003e143 < b Initial program 94.4%
sub-neg94.4%
sub-neg94.4%
associate-*l*94.2%
associate-*l*94.3%
Simplified94.3%
Taylor expanded in y around 0 83.3%
Final simplification81.3%
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 (<= b -1.52e-170) (not (<= b 2.05e+57))) (- (* 27.0 (* a b)) (* 9.0 (* t (* z y)))) (- (* 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) {
double tmp;
if ((b <= -1.52e-170) || !(b <= 2.05e+57)) {
tmp = (27.0 * (a * b)) - (9.0 * (t * (z * y)));
} else {
tmp = (x * 2.0) - (y * (z * (t * 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) :: tmp
if ((b <= (-1.52d-170)) .or. (.not. (b <= 2.05d+57))) then
tmp = (27.0d0 * (a * b)) - (9.0d0 * (t * (z * y)))
else
tmp = (x * 2.0d0) - (y * (z * (t * 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 tmp;
if ((b <= -1.52e-170) || !(b <= 2.05e+57)) {
tmp = (27.0 * (a * b)) - (9.0 * (t * (z * y)));
} else {
tmp = (x * 2.0) - (y * (z * (t * 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): tmp = 0 if (b <= -1.52e-170) or not (b <= 2.05e+57): tmp = (27.0 * (a * b)) - (9.0 * (t * (z * y))) else: tmp = (x * 2.0) - (y * (z * (t * 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) tmp = 0.0 if ((b <= -1.52e-170) || !(b <= 2.05e+57)) tmp = Float64(Float64(27.0 * Float64(a * b)) - Float64(9.0 * Float64(t * Float64(z * y)))); else tmp = Float64(Float64(x * 2.0) - Float64(y * Float64(z * Float64(t * 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)
tmp = 0.0;
if ((b <= -1.52e-170) || ~((b <= 2.05e+57)))
tmp = (27.0 * (a * b)) - (9.0 * (t * (z * y)));
else
tmp = (x * 2.0) - (y * (z * (t * 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_] := If[Or[LessEqual[b, -1.52e-170], N[Not[LessEqual[b, 2.05e+57]], $MachinePrecision]], N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] - N[(9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] - N[(y * N[(z * 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])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.52 \cdot 10^{-170} \lor \neg \left(b \leq 2.05 \cdot 10^{+57}\right):\\
\;\;\;\;27 \cdot \left(a \cdot b\right) - 9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - y \cdot \left(z \cdot \left(t \cdot 9\right)\right)\\
\end{array}
\end{array}
if b < -1.52000000000000009e-170 or 2.05e57 < b Initial program 95.9%
sub-neg95.9%
sub-neg95.9%
associate-*l*95.6%
associate-*l*95.7%
Simplified95.7%
Taylor expanded in x around 0 79.9%
if -1.52000000000000009e-170 < b < 2.05e57Initial program 94.9%
sub-neg94.9%
sub-neg94.9%
associate-*l*93.6%
associate-*l*93.5%
Simplified93.5%
Taylor expanded in a around 0 82.4%
expm1-log1p-u60.8%
expm1-udef58.6%
*-commutative58.6%
*-commutative58.6%
associate-*l*58.6%
Applied egg-rr58.6%
expm1-def60.8%
expm1-log1p82.4%
associate-*l*80.7%
Simplified80.7%
Final simplification80.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 (* 27.0 (* a b))))
(if (<= z 8.4e+60)
(+ (* y (* z (* t -9.0))) (+ t_1 (* x 2.0)))
(- t_1 (* 9.0 (* t (* z y)))))))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 = 27.0 * (a * b);
double tmp;
if (z <= 8.4e+60) {
tmp = (y * (z * (t * -9.0))) + (t_1 + (x * 2.0));
} else {
tmp = t_1 - (9.0 * (t * (z * y)));
}
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 = 27.0d0 * (a * b)
if (z <= 8.4d+60) then
tmp = (y * (z * (t * (-9.0d0)))) + (t_1 + (x * 2.0d0))
else
tmp = t_1 - (9.0d0 * (t * (z * y)))
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 = 27.0 * (a * b);
double tmp;
if (z <= 8.4e+60) {
tmp = (y * (z * (t * -9.0))) + (t_1 + (x * 2.0));
} else {
tmp = t_1 - (9.0 * (t * (z * y)));
}
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 = 27.0 * (a * b) tmp = 0 if z <= 8.4e+60: tmp = (y * (z * (t * -9.0))) + (t_1 + (x * 2.0)) else: tmp = t_1 - (9.0 * (t * (z * y))) 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(27.0 * Float64(a * b)) tmp = 0.0 if (z <= 8.4e+60) tmp = Float64(Float64(y * Float64(z * Float64(t * -9.0))) + Float64(t_1 + Float64(x * 2.0))); else tmp = Float64(t_1 - Float64(9.0 * Float64(t * Float64(z * y)))); 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 = 27.0 * (a * b);
tmp = 0.0;
if (z <= 8.4e+60)
tmp = (y * (z * (t * -9.0))) + (t_1 + (x * 2.0));
else
tmp = t_1 - (9.0 * (t * (z * y)));
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[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, 8.4e+60], N[(N[(y * N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 - N[(9.0 * N[(t * N[(z * y), $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 := 27 \cdot \left(a \cdot b\right)\\
\mathbf{if}\;z \leq 8.4 \cdot 10^{+60}:\\
\;\;\;\;y \cdot \left(z \cdot \left(t \cdot -9\right)\right) + \left(t_1 + x \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 - 9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\end{array}
\end{array}
if z < 8.4000000000000004e60Initial program 96.3%
+-commutative96.3%
associate-+r-96.3%
*-commutative96.3%
cancel-sign-sub-inv96.3%
associate-*r*94.3%
distribute-lft-neg-in94.3%
*-commutative94.3%
cancel-sign-sub-inv94.3%
associate-+r-94.3%
associate-*l*94.3%
fma-def94.8%
cancel-sign-sub-inv94.8%
fma-def94.8%
distribute-lft-neg-in94.8%
distribute-rgt-neg-in94.8%
*-commutative94.8%
associate-*r*96.8%
associate-*l*96.3%
neg-mul-196.3%
associate-*r*96.3%
Simplified96.3%
fma-udef95.8%
fma-udef95.8%
associate-+r+95.8%
associate-*r*95.8%
*-commutative95.8%
associate-*l*95.8%
*-commutative95.8%
associate-*l*96.1%
*-commutative96.1%
associate-*r*96.1%
*-commutative96.1%
Applied egg-rr96.1%
if 8.4000000000000004e60 < z Initial program 92.4%
sub-neg92.4%
sub-neg92.4%
associate-*l*90.1%
associate-*l*90.0%
Simplified90.0%
Taylor expanded in x around 0 78.6%
Final simplification92.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 (<= z 105000000.0) (+ (* y (* z (* t -9.0))) (+ (* 27.0 (* a b)) (* x 2.0))) (+ (- (* x 2.0) (* 9.0 (* z (* y t)))) (* a (* 27.0 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 (z <= 105000000.0) {
tmp = (y * (z * (t * -9.0))) + ((27.0 * (a * b)) + (x * 2.0));
} else {
tmp = ((x * 2.0) - (9.0 * (z * (y * t)))) + (a * (27.0 * 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 (z <= 105000000.0d0) then
tmp = (y * (z * (t * (-9.0d0)))) + ((27.0d0 * (a * b)) + (x * 2.0d0))
else
tmp = ((x * 2.0d0) - (9.0d0 * (z * (y * t)))) + (a * (27.0d0 * 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 (z <= 105000000.0) {
tmp = (y * (z * (t * -9.0))) + ((27.0 * (a * b)) + (x * 2.0));
} else {
tmp = ((x * 2.0) - (9.0 * (z * (y * t)))) + (a * (27.0 * 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 z <= 105000000.0: tmp = (y * (z * (t * -9.0))) + ((27.0 * (a * b)) + (x * 2.0)) else: tmp = ((x * 2.0) - (9.0 * (z * (y * t)))) + (a * (27.0 * 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 (z <= 105000000.0) 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(Float64(x * 2.0) - Float64(9.0 * Float64(z * Float64(y * t)))) + Float64(a * Float64(27.0 * 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 (z <= 105000000.0)
tmp = (y * (z * (t * -9.0))) + ((27.0 * (a * b)) + (x * 2.0));
else
tmp = ((x * 2.0) - (9.0 * (z * (y * t)))) + (a * (27.0 * b));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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, 105000000.0], 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[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $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 105000000:\\
\;\;\;\;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}:\\
\;\;\;\;\left(x \cdot 2 - 9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right) + a \cdot \left(27 \cdot b\right)\\
\end{array}
\end{array}
if z < 1.05e8Initial program 96.1%
+-commutative96.1%
associate-+r-96.1%
*-commutative96.1%
cancel-sign-sub-inv96.1%
associate-*r*93.9%
distribute-lft-neg-in93.9%
*-commutative93.9%
cancel-sign-sub-inv93.9%
associate-+r-93.9%
associate-*l*93.9%
fma-def94.4%
cancel-sign-sub-inv94.4%
fma-def94.4%
distribute-lft-neg-in94.4%
distribute-rgt-neg-in94.4%
*-commutative94.4%
associate-*r*96.6%
associate-*l*96.1%
neg-mul-196.1%
associate-*r*96.1%
Simplified96.1%
fma-udef95.6%
fma-udef95.6%
associate-+r+95.6%
associate-*r*95.6%
*-commutative95.6%
associate-*l*95.6%
*-commutative95.6%
associate-*l*95.8%
*-commutative95.8%
associate-*r*95.8%
*-commutative95.8%
Applied egg-rr95.8%
if 1.05e8 < z Initial program 93.9%
sub-neg93.9%
sub-neg93.9%
associate-*l*92.1%
associate-*l*92.1%
Simplified92.1%
Taylor expanded in y around 0 93.9%
associate-*r*98.3%
*-commutative98.3%
Simplified98.3%
Final simplification96.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 (<= z 5e+24) (+ (* y (* z (* t -9.0))) (+ (* 27.0 (* a b)) (* x 2.0))) (+ (- (* x 2.0) (* t (* z (* y 9.0)))) (* b (* 27.0 a)))))
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 <= 5e+24) {
tmp = (y * (z * (t * -9.0))) + ((27.0 * (a * b)) + (x * 2.0));
} else {
tmp = ((x * 2.0) - (t * (z * (y * 9.0)))) + (b * (27.0 * a));
}
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 <= 5d+24) then
tmp = (y * (z * (t * (-9.0d0)))) + ((27.0d0 * (a * b)) + (x * 2.0d0))
else
tmp = ((x * 2.0d0) - (t * (z * (y * 9.0d0)))) + (b * (27.0d0 * a))
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 <= 5e+24) {
tmp = (y * (z * (t * -9.0))) + ((27.0 * (a * b)) + (x * 2.0));
} else {
tmp = ((x * 2.0) - (t * (z * (y * 9.0)))) + (b * (27.0 * a));
}
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 <= 5e+24: tmp = (y * (z * (t * -9.0))) + ((27.0 * (a * b)) + (x * 2.0)) else: tmp = ((x * 2.0) - (t * (z * (y * 9.0)))) + (b * (27.0 * a)) 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 <= 5e+24) 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(Float64(x * 2.0) - Float64(t * Float64(z * Float64(y * 9.0)))) + Float64(b * Float64(27.0 * a))); 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 <= 5e+24)
tmp = (y * (z * (t * -9.0))) + ((27.0 * (a * b)) + (x * 2.0));
else
tmp = ((x * 2.0) - (t * (z * (y * 9.0)))) + (b * (27.0 * a));
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, 5e+24], 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[(N[(x * 2.0), $MachinePrecision] - N[(t * N[(z * N[(y * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(27.0 * a), $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 5 \cdot 10^{+24}:\\
\;\;\;\;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}:\\
\;\;\;\;\left(x \cdot 2 - t \cdot \left(z \cdot \left(y \cdot 9\right)\right)\right) + b \cdot \left(27 \cdot a\right)\\
\end{array}
\end{array}
if z < 5.00000000000000045e24Initial program 96.1%
+-commutative96.1%
associate-+r-96.1%
*-commutative96.1%
cancel-sign-sub-inv96.1%
associate-*r*94.1%
distribute-lft-neg-in94.1%
*-commutative94.1%
cancel-sign-sub-inv94.1%
associate-+r-94.1%
associate-*l*94.1%
fma-def94.6%
cancel-sign-sub-inv94.6%
fma-def94.6%
distribute-lft-neg-in94.6%
distribute-rgt-neg-in94.6%
*-commutative94.6%
associate-*r*96.6%
associate-*l*96.2%
neg-mul-196.2%
associate-*r*96.2%
Simplified96.2%
fma-udef95.7%
fma-udef95.7%
associate-+r+95.7%
associate-*r*95.7%
*-commutative95.7%
associate-*l*95.7%
*-commutative95.7%
associate-*l*95.9%
*-commutative95.9%
associate-*r*95.9%
*-commutative95.9%
Applied egg-rr95.9%
if 5.00000000000000045e24 < z Initial program 93.5%
Final simplification95.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 (<= b -3.5e-128) (not (<= b 7e+113))) (+ (* 27.0 (* a b)) (* x 2.0)) (- (* x 2.0) (* 9.0 (* t (* z y))))))
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 ((b <= -3.5e-128) || !(b <= 7e+113)) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else {
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
}
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 ((b <= (-3.5d-128)) .or. (.not. (b <= 7d+113))) then
tmp = (27.0d0 * (a * b)) + (x * 2.0d0)
else
tmp = (x * 2.0d0) - (9.0d0 * (t * (z * y)))
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 ((b <= -3.5e-128) || !(b <= 7e+113)) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else {
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
}
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 (b <= -3.5e-128) or not (b <= 7e+113): tmp = (27.0 * (a * b)) + (x * 2.0) else: tmp = (x * 2.0) - (9.0 * (t * (z * y))) 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 ((b <= -3.5e-128) || !(b <= 7e+113)) 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(z * y)))); 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 ((b <= -3.5e-128) || ~((b <= 7e+113)))
tmp = (27.0 * (a * b)) + (x * 2.0);
else
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
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[b, -3.5e-128], N[Not[LessEqual[b, 7e+113]], $MachinePrecision]], 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[(z * y), $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}\;b \leq -3.5 \cdot 10^{-128} \lor \neg \left(b \leq 7 \cdot 10^{+113}\right):\\
\;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\end{array}
\end{array}
if b < -3.5e-128 or 7.0000000000000001e113 < b Initial program 95.5%
sub-neg95.5%
sub-neg95.5%
associate-*l*95.2%
associate-*l*95.3%
Simplified95.3%
Taylor expanded in y around 0 70.5%
if -3.5e-128 < b < 7.0000000000000001e113Initial program 95.5%
sub-neg95.5%
sub-neg95.5%
associate-*l*94.4%
associate-*l*94.3%
Simplified94.3%
Taylor expanded in a around 0 80.1%
Final simplification74.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 (or (<= b -3.5e-128) (not (<= b 1e+114))) (+ (* 27.0 (* a b)) (* x 2.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) {
double tmp;
if ((b <= -3.5e-128) || !(b <= 1e+114)) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else {
tmp = (x * 2.0) - (y * (z * (t * 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) :: tmp
if ((b <= (-3.5d-128)) .or. (.not. (b <= 1d+114))) then
tmp = (27.0d0 * (a * b)) + (x * 2.0d0)
else
tmp = (x * 2.0d0) - (y * (z * (t * 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 tmp;
if ((b <= -3.5e-128) || !(b <= 1e+114)) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else {
tmp = (x * 2.0) - (y * (z * (t * 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): tmp = 0 if (b <= -3.5e-128) or not (b <= 1e+114): tmp = (27.0 * (a * b)) + (x * 2.0) else: tmp = (x * 2.0) - (y * (z * (t * 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) tmp = 0.0 if ((b <= -3.5e-128) || !(b <= 1e+114)) tmp = Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0)); else tmp = Float64(Float64(x * 2.0) - Float64(y * Float64(z * Float64(t * 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)
tmp = 0.0;
if ((b <= -3.5e-128) || ~((b <= 1e+114)))
tmp = (27.0 * (a * b)) + (x * 2.0);
else
tmp = (x * 2.0) - (y * (z * (t * 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_] := If[Or[LessEqual[b, -3.5e-128], N[Not[LessEqual[b, 1e+114]], $MachinePrecision]], N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] - N[(y * N[(z * 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])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.5 \cdot 10^{-128} \lor \neg \left(b \leq 10^{+114}\right):\\
\;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - y \cdot \left(z \cdot \left(t \cdot 9\right)\right)\\
\end{array}
\end{array}
if b < -3.5e-128 or 1e114 < b Initial program 95.5%
sub-neg95.5%
sub-neg95.5%
associate-*l*95.2%
associate-*l*95.3%
Simplified95.3%
Taylor expanded in y around 0 70.5%
if -3.5e-128 < b < 1e114Initial program 95.5%
sub-neg95.5%
sub-neg95.5%
associate-*l*94.4%
associate-*l*94.3%
Simplified94.3%
Taylor expanded in a around 0 80.1%
expm1-log1p-u59.3%
expm1-udef56.6%
*-commutative56.6%
*-commutative56.6%
associate-*l*56.6%
Applied egg-rr56.6%
expm1-def59.3%
expm1-log1p80.1%
associate-*l*78.6%
Simplified78.6%
Final simplification73.9%
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 (<= b -1.25e-170) (not (<= b 5.2e+57))) (* 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 ((b <= -1.25e-170) || !(b <= 5.2e+57)) {
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 ((b <= (-1.25d-170)) .or. (.not. (b <= 5.2d+57))) 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 ((b <= -1.25e-170) || !(b <= 5.2e+57)) {
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 (b <= -1.25e-170) or not (b <= 5.2e+57): 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 ((b <= -1.25e-170) || !(b <= 5.2e+57)) 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 ((b <= -1.25e-170) || ~((b <= 5.2e+57)))
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[b, -1.25e-170], N[Not[LessEqual[b, 5.2e+57]], $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}\;b \leq -1.25 \cdot 10^{-170} \lor \neg \left(b \leq 5.2 \cdot 10^{+57}\right):\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if b < -1.25000000000000003e-170 or 5.2e57 < b Initial program 95.9%
sub-neg95.9%
sub-neg95.9%
associate-*l*95.6%
associate-*l*95.7%
Simplified95.7%
Taylor expanded in a around inf 52.6%
if -1.25000000000000003e-170 < b < 5.2e57Initial program 94.9%
sub-neg94.9%
sub-neg94.9%
associate-*l*93.6%
associate-*l*93.5%
Simplified93.5%
Taylor expanded in x around inf 43.0%
Final simplification49.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 (<= b -1.45e-171) (* 27.0 (* a b)) (if (<= b 2.5e+57) (* x 2.0) (* a (* 27.0 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 (b <= -1.45e-171) {
tmp = 27.0 * (a * b);
} else if (b <= 2.5e+57) {
tmp = x * 2.0;
} else {
tmp = a * (27.0 * 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 (b <= (-1.45d-171)) then
tmp = 27.0d0 * (a * b)
else if (b <= 2.5d+57) then
tmp = x * 2.0d0
else
tmp = a * (27.0d0 * 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 (b <= -1.45e-171) {
tmp = 27.0 * (a * b);
} else if (b <= 2.5e+57) {
tmp = x * 2.0;
} else {
tmp = a * (27.0 * 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 b <= -1.45e-171: tmp = 27.0 * (a * b) elif b <= 2.5e+57: tmp = x * 2.0 else: tmp = a * (27.0 * 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 (b <= -1.45e-171) tmp = Float64(27.0 * Float64(a * b)); elseif (b <= 2.5e+57) tmp = Float64(x * 2.0); else tmp = Float64(a * Float64(27.0 * 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 (b <= -1.45e-171)
tmp = 27.0 * (a * b);
elseif (b <= 2.5e+57)
tmp = x * 2.0;
else
tmp = a * (27.0 * b);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.45e-171], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.5e+57], N[(x * 2.0), $MachinePrecision], N[(a * N[(27.0 * 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}\;b \leq -1.45 \cdot 10^{-171}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;b \leq 2.5 \cdot 10^{+57}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\end{array}
\end{array}
if b < -1.4499999999999999e-171Initial program 96.0%
sub-neg96.0%
sub-neg96.0%
associate-*l*95.6%
associate-*l*95.6%
Simplified95.6%
Taylor expanded in a around inf 50.0%
if -1.4499999999999999e-171 < b < 2.49999999999999986e57Initial program 94.9%
sub-neg94.9%
sub-neg94.9%
associate-*l*93.6%
associate-*l*93.5%
Simplified93.5%
Taylor expanded in x around inf 43.0%
if 2.49999999999999986e57 < b Initial program 95.9%
sub-neg95.9%
sub-neg95.9%
associate-*l*95.7%
associate-*l*95.7%
Simplified95.7%
Taylor expanded in a around inf 58.8%
associate-*r*58.8%
*-commutative58.8%
associate-*r*58.8%
Simplified58.8%
Final simplification49.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 (* 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.5%
sub-neg95.5%
sub-neg95.5%
associate-*l*94.9%
associate-*l*94.9%
Simplified94.9%
Taylor expanded in x around inf 26.8%
Final simplification26.8%
(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 2024024
(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)))