
(FPCore (x y z t a b) :precision binary64 (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * 2.0d0) - (((y * 9.0d0) * z) * t)) + ((a * 27.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
def code(x, y, z, t, a, b): return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + Float64(Float64(a * 27.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * 2.0d0) - (((y * 9.0d0) * z) * t)) + ((a * 27.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
def code(x, y, z, t, a, b): return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + Float64(Float64(a * 27.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b
\end{array}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (- (+ (* b (* a 27.0)) (* x 2.0)) (* y (* 9.0 (* z t)))))
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 * (9.0 * (z * t)));
}
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 * (9.0d0 * (z * t)))
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 * (9.0 * (z * t)));
}
[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 * (9.0 * (z * t)))
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(b * Float64(a * 27.0)) + Float64(x * 2.0)) - Float64(y * Float64(9.0 * Float64(z * t)))) 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 * (9.0 * (z * t)));
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[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] - N[(y * N[(9.0 * N[(z * t), $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])\\
\\
\left(b \cdot \left(a \cdot 27\right) + x \cdot 2\right) - y \cdot \left(9 \cdot \left(z \cdot t\right)\right)
\end{array}
Initial program 94.2%
+-commutative94.2%
associate-+r-94.2%
*-commutative94.2%
cancel-sign-sub-inv94.2%
associate-*r*95.8%
distribute-lft-neg-in95.8%
*-commutative95.8%
cancel-sign-sub-inv95.8%
associate-+r-95.8%
associate-*l*95.8%
fma-define95.8%
cancel-sign-sub-inv95.8%
fma-define95.8%
distribute-lft-neg-in95.8%
distribute-rgt-neg-in95.8%
*-commutative95.8%
associate-*r*94.2%
associate-*l*94.6%
neg-mul-194.6%
associate-*r*94.6%
Simplified94.6%
fma-undefine94.6%
fma-undefine94.6%
associate-+r+94.6%
*-commutative94.6%
associate-*l*95.3%
*-commutative95.3%
associate-*r*95.3%
*-commutative95.3%
*-commutative95.3%
associate-*r*95.3%
associate-*l*95.3%
metadata-eval95.3%
distribute-lft-neg-in95.3%
*-commutative95.3%
distribute-rgt-neg-in95.3%
*-commutative95.3%
associate-+r+95.3%
sub-neg95.3%
Applied egg-rr95.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 (* 27.0 (* b a))) (t_2 (* 9.0 (* t (* y z)))))
(if (<= y -3.8e+169)
(+ (* x 2.0) (* -9.0 (* y (* z t))))
(if (<= y -6e+109)
(- t_1 t_2)
(if (<= y 1.3e-224) (+ (* x 2.0) t_1) (- (* x 2.0) 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 * (b * a);
double t_2 = 9.0 * (t * (y * z));
double tmp;
if (y <= -3.8e+169) {
tmp = (x * 2.0) + (-9.0 * (y * (z * t)));
} else if (y <= -6e+109) {
tmp = t_1 - t_2;
} else if (y <= 1.3e-224) {
tmp = (x * 2.0) + t_1;
} else {
tmp = (x * 2.0) - 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 * (b * a)
t_2 = 9.0d0 * (t * (y * z))
if (y <= (-3.8d+169)) then
tmp = (x * 2.0d0) + ((-9.0d0) * (y * (z * t)))
else if (y <= (-6d+109)) then
tmp = t_1 - t_2
else if (y <= 1.3d-224) then
tmp = (x * 2.0d0) + t_1
else
tmp = (x * 2.0d0) - 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 * (b * a);
double t_2 = 9.0 * (t * (y * z));
double tmp;
if (y <= -3.8e+169) {
tmp = (x * 2.0) + (-9.0 * (y * (z * t)));
} else if (y <= -6e+109) {
tmp = t_1 - t_2;
} else if (y <= 1.3e-224) {
tmp = (x * 2.0) + t_1;
} else {
tmp = (x * 2.0) - 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 * (b * a) t_2 = 9.0 * (t * (y * z)) tmp = 0 if y <= -3.8e+169: tmp = (x * 2.0) + (-9.0 * (y * (z * t))) elif y <= -6e+109: tmp = t_1 - t_2 elif y <= 1.3e-224: tmp = (x * 2.0) + t_1 else: tmp = (x * 2.0) - 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(27.0 * Float64(b * a)) t_2 = Float64(9.0 * Float64(t * Float64(y * z))) tmp = 0.0 if (y <= -3.8e+169) tmp = Float64(Float64(x * 2.0) + Float64(-9.0 * Float64(y * Float64(z * t)))); elseif (y <= -6e+109) tmp = Float64(t_1 - t_2); elseif (y <= 1.3e-224) tmp = Float64(Float64(x * 2.0) + t_1); else tmp = Float64(Float64(x * 2.0) - 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 * (b * a);
t_2 = 9.0 * (t * (y * z));
tmp = 0.0;
if (y <= -3.8e+169)
tmp = (x * 2.0) + (-9.0 * (y * (z * t)));
elseif (y <= -6e+109)
tmp = t_1 - t_2;
elseif (y <= 1.3e-224)
tmp = (x * 2.0) + t_1;
else
tmp = (x * 2.0) - 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[(27.0 * N[(b * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.8e+169], N[(N[(x * 2.0), $MachinePrecision] + N[(-9.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -6e+109], N[(t$95$1 - t$95$2), $MachinePrecision], If[LessEqual[y, 1.3e-224], N[(N[(x * 2.0), $MachinePrecision] + t$95$1), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] - t$95$2), $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(b \cdot a\right)\\
t_2 := 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\mathbf{if}\;y \leq -3.8 \cdot 10^{+169}:\\
\;\;\;\;x \cdot 2 + -9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\
\mathbf{elif}\;y \leq -6 \cdot 10^{+109}:\\
\;\;\;\;t\_1 - t\_2\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{-224}:\\
\;\;\;\;x \cdot 2 + t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - t\_2\\
\end{array}
\end{array}
if y < -3.79999999999999992e169Initial program 82.5%
+-commutative82.5%
associate-+r-82.5%
*-commutative82.5%
cancel-sign-sub-inv82.5%
associate-*r*85.5%
distribute-lft-neg-in85.5%
*-commutative85.5%
cancel-sign-sub-inv85.5%
associate-+r-85.5%
associate-*l*85.5%
fma-define85.5%
cancel-sign-sub-inv85.5%
fma-define85.5%
distribute-lft-neg-in85.5%
distribute-rgt-neg-in85.5%
*-commutative85.5%
associate-*r*82.5%
associate-*l*85.5%
neg-mul-185.5%
associate-*r*85.5%
Simplified85.5%
fma-undefine85.5%
fma-undefine85.5%
associate-+r+85.5%
*-commutative85.5%
associate-*l*96.8%
*-commutative96.8%
associate-*r*96.7%
*-commutative96.7%
*-commutative96.7%
associate-*r*96.8%
associate-*l*96.8%
metadata-eval96.8%
distribute-lft-neg-in96.8%
*-commutative96.8%
distribute-rgt-neg-in96.8%
*-commutative96.8%
associate-+r+96.8%
sub-neg96.8%
Applied egg-rr96.8%
Taylor expanded in b around 0 85.4%
cancel-sign-sub-inv85.4%
metadata-eval85.4%
*-commutative85.4%
associate-*r*93.8%
*-commutative93.8%
Simplified93.8%
if -3.79999999999999992e169 < y < -6.00000000000000031e109Initial program 70.6%
sub-neg70.6%
sub-neg70.6%
associate-*l*99.8%
associate-*l*99.7%
Simplified99.7%
Taylor expanded in x around 0 52.7%
if -6.00000000000000031e109 < y < 1.3000000000000001e-224Initial program 95.9%
+-commutative95.9%
associate-+r-95.9%
*-commutative95.9%
cancel-sign-sub-inv95.9%
associate-*r*97.9%
distribute-lft-neg-in97.9%
*-commutative97.9%
cancel-sign-sub-inv97.9%
associate-+r-97.9%
associate-*l*97.9%
fma-define97.9%
cancel-sign-sub-inv97.9%
fma-define97.9%
distribute-lft-neg-in97.9%
distribute-rgt-neg-in97.9%
*-commutative97.9%
associate-*r*95.9%
associate-*l*96.0%
neg-mul-196.0%
associate-*r*96.0%
Simplified96.0%
Taylor expanded in t around 0 83.0%
if 1.3000000000000001e-224 < y Initial program 98.2%
sub-neg98.2%
sub-neg98.2%
associate-*l*98.1%
associate-*l*98.1%
Simplified98.1%
Taylor expanded in a around 0 69.4%
Final simplification77.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 (<= y -4.3e+139) (not (<= y 1.3e-224))) (+ (* x 2.0) (* -9.0 (* y (* z t)))) (+ (* x 2.0) (* 27.0 (* b 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 ((y <= -4.3e+139) || !(y <= 1.3e-224)) {
tmp = (x * 2.0) + (-9.0 * (y * (z * t)));
} else {
tmp = (x * 2.0) + (27.0 * (b * 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 ((y <= (-4.3d+139)) .or. (.not. (y <= 1.3d-224))) then
tmp = (x * 2.0d0) + ((-9.0d0) * (y * (z * t)))
else
tmp = (x * 2.0d0) + (27.0d0 * (b * 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 ((y <= -4.3e+139) || !(y <= 1.3e-224)) {
tmp = (x * 2.0) + (-9.0 * (y * (z * t)));
} else {
tmp = (x * 2.0) + (27.0 * (b * 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 (y <= -4.3e+139) or not (y <= 1.3e-224): tmp = (x * 2.0) + (-9.0 * (y * (z * t))) else: tmp = (x * 2.0) + (27.0 * (b * 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 ((y <= -4.3e+139) || !(y <= 1.3e-224)) tmp = Float64(Float64(x * 2.0) + Float64(-9.0 * Float64(y * Float64(z * t)))); else tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(b * 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 ((y <= -4.3e+139) || ~((y <= 1.3e-224)))
tmp = (x * 2.0) + (-9.0 * (y * (z * t)));
else
tmp = (x * 2.0) + (27.0 * (b * 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[Or[LessEqual[y, -4.3e+139], N[Not[LessEqual[y, 1.3e-224]], $MachinePrecision]], N[(N[(x * 2.0), $MachinePrecision] + N[(-9.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(b * 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}\;y \leq -4.3 \cdot 10^{+139} \lor \neg \left(y \leq 1.3 \cdot 10^{-224}\right):\\
\;\;\;\;x \cdot 2 + -9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(b \cdot a\right)\\
\end{array}
\end{array}
if y < -4.2999999999999998e139 or 1.3000000000000001e-224 < y Initial program 93.5%
+-commutative93.5%
associate-+r-93.5%
*-commutative93.5%
cancel-sign-sub-inv93.5%
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-define94.2%
cancel-sign-sub-inv94.2%
fma-define94.2%
distribute-lft-neg-in94.2%
distribute-rgt-neg-in94.2%
*-commutative94.2%
associate-*r*93.4%
associate-*l*94.1%
neg-mul-194.1%
associate-*r*94.1%
Simplified94.1%
fma-undefine94.1%
fma-undefine94.1%
associate-+r+94.1%
*-commutative94.1%
associate-*l*97.8%
*-commutative97.8%
associate-*r*97.8%
*-commutative97.8%
*-commutative97.8%
associate-*r*97.8%
associate-*l*97.8%
metadata-eval97.8%
distribute-lft-neg-in97.8%
*-commutative97.8%
distribute-rgt-neg-in97.8%
*-commutative97.8%
associate-+r+97.8%
sub-neg97.8%
Applied egg-rr97.8%
Taylor expanded in b around 0 71.8%
cancel-sign-sub-inv71.8%
metadata-eval71.8%
*-commutative71.8%
associate-*r*74.3%
*-commutative74.3%
Simplified74.3%
if -4.2999999999999998e139 < y < 1.3000000000000001e-224Initial program 95.2%
+-commutative95.2%
associate-+r-95.2%
*-commutative95.2%
cancel-sign-sub-inv95.2%
associate-*r*98.0%
distribute-lft-neg-in98.0%
*-commutative98.0%
cancel-sign-sub-inv98.0%
associate-+r-98.0%
associate-*l*98.0%
fma-define98.0%
cancel-sign-sub-inv98.0%
fma-define98.0%
distribute-lft-neg-in98.0%
distribute-rgt-neg-in98.0%
*-commutative98.0%
associate-*r*95.2%
associate-*l*95.3%
neg-mul-195.3%
associate-*r*95.3%
Simplified95.3%
Taylor expanded in t around 0 83.0%
Final simplification78.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.
(FPCore (x y z t a b)
:precision binary64
(if (<= y -4.8e+110)
(* y (+ (/ (* b (* a 27.0)) y) (* z (* t -9.0))))
(if (<= y 1.3e-224)
(+ (* x 2.0) (* 27.0 (* b a)))
(- (* 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 (y <= -4.8e+110) {
tmp = y * (((b * (a * 27.0)) / y) + (z * (t * -9.0)));
} else if (y <= 1.3e-224) {
tmp = (x * 2.0) + (27.0 * (b * a));
} 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 (y <= (-4.8d+110)) then
tmp = y * (((b * (a * 27.0d0)) / y) + (z * (t * (-9.0d0))))
else if (y <= 1.3d-224) then
tmp = (x * 2.0d0) + (27.0d0 * (b * a))
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 (y <= -4.8e+110) {
tmp = y * (((b * (a * 27.0)) / y) + (z * (t * -9.0)));
} else if (y <= 1.3e-224) {
tmp = (x * 2.0) + (27.0 * (b * a));
} 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 y <= -4.8e+110: tmp = y * (((b * (a * 27.0)) / y) + (z * (t * -9.0))) elif y <= 1.3e-224: tmp = (x * 2.0) + (27.0 * (b * a)) 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 (y <= -4.8e+110) tmp = Float64(y * Float64(Float64(Float64(b * Float64(a * 27.0)) / y) + Float64(z * Float64(t * -9.0)))); elseif (y <= 1.3e-224) tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(b * a))); 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 (y <= -4.8e+110)
tmp = y * (((b * (a * 27.0)) / y) + (z * (t * -9.0)));
elseif (y <= 1.3e-224)
tmp = (x * 2.0) + (27.0 * (b * a));
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[y, -4.8e+110], N[(y * N[(N[(N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] + N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.3e-224], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(b * a), $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}\;y \leq -4.8 \cdot 10^{+110}:\\
\;\;\;\;y \cdot \left(\frac{b \cdot \left(a \cdot 27\right)}{y} + z \cdot \left(t \cdot -9\right)\right)\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{-224}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(b \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if y < -4.80000000000000025e110Initial program 79.3%
sub-neg79.3%
sub-neg79.3%
associate-*l*97.4%
associate-*l*97.4%
Simplified97.4%
Taylor expanded in x around 0 74.5%
Taylor expanded in y around inf 85.6%
cancel-sign-sub-inv85.6%
metadata-eval85.6%
associate-*r/85.7%
associate-*r*85.7%
*-commutative85.7%
*-commutative85.7%
*-commutative85.7%
associate-*r*85.6%
Simplified85.6%
if -4.80000000000000025e110 < y < 1.3000000000000001e-224Initial program 96.0%
+-commutative96.0%
associate-+r-96.0%
*-commutative96.0%
cancel-sign-sub-inv96.0%
associate-*r*97.9%
distribute-lft-neg-in97.9%
*-commutative97.9%
cancel-sign-sub-inv97.9%
associate-+r-97.9%
associate-*l*97.9%
fma-define97.9%
cancel-sign-sub-inv97.9%
fma-define97.9%
distribute-lft-neg-in97.9%
distribute-rgt-neg-in97.9%
*-commutative97.9%
associate-*r*96.0%
associate-*l*96.0%
neg-mul-196.0%
associate-*r*96.0%
Simplified96.0%
Taylor expanded in t around 0 83.1%
if 1.3000000000000001e-224 < y Initial program 98.2%
sub-neg98.2%
sub-neg98.2%
associate-*l*98.1%
associate-*l*98.1%
Simplified98.1%
Taylor expanded in a around 0 69.4%
Final simplification77.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
(let* ((t_1 (* 27.0 (* b a))))
(if (<= y -8.6e+109)
(- t_1 (* 9.0 (* y (* z t))))
(if (<= y 1.3e-224)
(+ (* x 2.0) t_1)
(- (* 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 t_1 = 27.0 * (b * a);
double tmp;
if (y <= -8.6e+109) {
tmp = t_1 - (9.0 * (y * (z * t)));
} else if (y <= 1.3e-224) {
tmp = (x * 2.0) + t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = 27.0d0 * (b * a)
if (y <= (-8.6d+109)) then
tmp = t_1 - (9.0d0 * (y * (z * t)))
else if (y <= 1.3d-224) then
tmp = (x * 2.0d0) + t_1
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 t_1 = 27.0 * (b * a);
double tmp;
if (y <= -8.6e+109) {
tmp = t_1 - (9.0 * (y * (z * t)));
} else if (y <= 1.3e-224) {
tmp = (x * 2.0) + t_1;
} 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): t_1 = 27.0 * (b * a) tmp = 0 if y <= -8.6e+109: tmp = t_1 - (9.0 * (y * (z * t))) elif y <= 1.3e-224: tmp = (x * 2.0) + t_1 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) t_1 = Float64(27.0 * Float64(b * a)) tmp = 0.0 if (y <= -8.6e+109) tmp = Float64(t_1 - Float64(9.0 * Float64(y * Float64(z * t)))); elseif (y <= 1.3e-224) tmp = Float64(Float64(x * 2.0) + t_1); 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)
t_1 = 27.0 * (b * a);
tmp = 0.0;
if (y <= -8.6e+109)
tmp = t_1 - (9.0 * (y * (z * t)));
elseif (y <= 1.3e-224)
tmp = (x * 2.0) + t_1;
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_] := Block[{t$95$1 = N[(27.0 * N[(b * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8.6e+109], N[(t$95$1 - N[(9.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.3e-224], N[(N[(x * 2.0), $MachinePrecision] + t$95$1), $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}
t_1 := 27 \cdot \left(b \cdot a\right)\\
\mathbf{if}\;y \leq -8.6 \cdot 10^{+109}:\\
\;\;\;\;t\_1 - 9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{-224}:\\
\;\;\;\;x \cdot 2 + t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if y < -8.6000000000000001e109Initial program 79.7%
sub-neg79.7%
sub-neg79.7%
associate-*l*97.5%
associate-*l*97.5%
Simplified97.5%
Taylor expanded in x around 0 72.8%
pow172.8%
*-commutative72.8%
associate-*l*83.7%
Applied egg-rr83.7%
unpow183.7%
*-commutative83.7%
Simplified83.7%
if -8.6000000000000001e109 < y < 1.3000000000000001e-224Initial program 95.9%
+-commutative95.9%
associate-+r-95.9%
*-commutative95.9%
cancel-sign-sub-inv95.9%
associate-*r*97.9%
distribute-lft-neg-in97.9%
*-commutative97.9%
cancel-sign-sub-inv97.9%
associate-+r-97.9%
associate-*l*97.9%
fma-define97.9%
cancel-sign-sub-inv97.9%
fma-define97.9%
distribute-lft-neg-in97.9%
distribute-rgt-neg-in97.9%
*-commutative97.9%
associate-*r*95.9%
associate-*l*96.0%
neg-mul-196.0%
associate-*r*96.0%
Simplified96.0%
Taylor expanded in t around 0 83.0%
if 1.3000000000000001e-224 < y Initial program 98.2%
sub-neg98.2%
sub-neg98.2%
associate-*l*98.1%
associate-*l*98.1%
Simplified98.1%
Taylor expanded in a around 0 69.4%
Final simplification77.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 (<= y -5e+139)
(+ (* x 2.0) (* -9.0 (* y (* z t))))
(if (<= y 1.3e-224)
(+ (* x 2.0) (* 27.0 (* b a)))
(- (* 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 (y <= -5e+139) {
tmp = (x * 2.0) + (-9.0 * (y * (z * t)));
} else if (y <= 1.3e-224) {
tmp = (x * 2.0) + (27.0 * (b * a));
} 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 (y <= (-5d+139)) then
tmp = (x * 2.0d0) + ((-9.0d0) * (y * (z * t)))
else if (y <= 1.3d-224) then
tmp = (x * 2.0d0) + (27.0d0 * (b * a))
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 (y <= -5e+139) {
tmp = (x * 2.0) + (-9.0 * (y * (z * t)));
} else if (y <= 1.3e-224) {
tmp = (x * 2.0) + (27.0 * (b * a));
} 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 y <= -5e+139: tmp = (x * 2.0) + (-9.0 * (y * (z * t))) elif y <= 1.3e-224: tmp = (x * 2.0) + (27.0 * (b * a)) 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 (y <= -5e+139) tmp = Float64(Float64(x * 2.0) + Float64(-9.0 * Float64(y * Float64(z * t)))); elseif (y <= 1.3e-224) tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(b * a))); 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 (y <= -5e+139)
tmp = (x * 2.0) + (-9.0 * (y * (z * t)));
elseif (y <= 1.3e-224)
tmp = (x * 2.0) + (27.0 * (b * a));
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[y, -5e+139], N[(N[(x * 2.0), $MachinePrecision] + N[(-9.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.3e-224], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(b * a), $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}\;y \leq -5 \cdot 10^{+139}:\\
\;\;\;\;x \cdot 2 + -9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{-224}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(b \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if y < -5.0000000000000003e139Initial program 79.2%
+-commutative79.2%
associate-+r-79.2%
*-commutative79.2%
cancel-sign-sub-inv79.2%
associate-*r*87.0%
distribute-lft-neg-in87.0%
*-commutative87.0%
cancel-sign-sub-inv87.0%
associate-+r-87.0%
associate-*l*86.9%
fma-define86.9%
cancel-sign-sub-inv86.9%
fma-define86.9%
distribute-lft-neg-in86.9%
distribute-rgt-neg-in86.9%
*-commutative86.9%
associate-*r*79.2%
associate-*l*81.8%
neg-mul-181.8%
associate-*r*81.8%
Simplified81.8%
fma-undefine81.8%
fma-undefine81.8%
associate-+r+81.8%
*-commutative81.8%
associate-*l*97.1%
*-commutative97.1%
associate-*r*97.0%
*-commutative97.0%
*-commutative97.0%
associate-*r*97.1%
associate-*l*97.1%
metadata-eval97.1%
distribute-lft-neg-in97.1%
*-commutative97.1%
distribute-rgt-neg-in97.1%
*-commutative97.1%
associate-+r+97.1%
sub-neg97.1%
Applied egg-rr97.1%
Taylor expanded in b around 0 79.3%
cancel-sign-sub-inv79.3%
metadata-eval79.3%
*-commutative79.3%
associate-*r*89.3%
*-commutative89.3%
Simplified89.3%
if -5.0000000000000003e139 < y < 1.3000000000000001e-224Initial program 95.2%
+-commutative95.2%
associate-+r-95.2%
*-commutative95.2%
cancel-sign-sub-inv95.2%
associate-*r*98.0%
distribute-lft-neg-in98.0%
*-commutative98.0%
cancel-sign-sub-inv98.0%
associate-+r-98.0%
associate-*l*98.0%
fma-define98.0%
cancel-sign-sub-inv98.0%
fma-define98.0%
distribute-lft-neg-in98.0%
distribute-rgt-neg-in98.0%
*-commutative98.0%
associate-*r*95.2%
associate-*l*95.3%
neg-mul-195.3%
associate-*r*95.3%
Simplified95.3%
Taylor expanded in t around 0 83.0%
if 1.3000000000000001e-224 < y Initial program 98.2%
sub-neg98.2%
sub-neg98.2%
associate-*l*98.1%
associate-*l*98.1%
Simplified98.1%
Taylor expanded in a around 0 69.4%
Final simplification78.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. (FPCore (x y z t a b) :precision binary64 (if (<= z -1.42e+23) (* y (* (* z t) -9.0)) (if (<= z 3.5e+97) (+ (* x 2.0) (* 27.0 (* b a))) (* 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 <= -1.42e+23) {
tmp = y * ((z * t) * -9.0);
} else if (z <= 3.5e+97) {
tmp = (x * 2.0) + (27.0 * (b * a));
} else {
tmp = t * (y * (z * -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 (z <= (-1.42d+23)) then
tmp = y * ((z * t) * (-9.0d0))
else if (z <= 3.5d+97) then
tmp = (x * 2.0d0) + (27.0d0 * (b * a))
else
tmp = t * (y * (z * (-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 (z <= -1.42e+23) {
tmp = y * ((z * t) * -9.0);
} else if (z <= 3.5e+97) {
tmp = (x * 2.0) + (27.0 * (b * a));
} else {
tmp = 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]) def code(x, y, z, t, a, b): tmp = 0 if z <= -1.42e+23: tmp = y * ((z * t) * -9.0) elif z <= 3.5e+97: tmp = (x * 2.0) + (27.0 * (b * a)) else: tmp = 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 <= -1.42e+23) tmp = Float64(y * Float64(Float64(z * t) * -9.0)); elseif (z <= 3.5e+97) tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(b * a))); else tmp = Float64(t * Float64(y * Float64(z * -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 (z <= -1.42e+23)
tmp = y * ((z * t) * -9.0);
elseif (z <= 3.5e+97)
tmp = (x * 2.0) + (27.0 * (b * a));
else
tmp = t * (y * (z * -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[LessEqual[z, -1.42e+23], N[(y * N[(N[(z * t), $MachinePrecision] * -9.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.5e+97], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(b * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(y * N[(z * -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}
\mathbf{if}\;z \leq -1.42 \cdot 10^{+23}:\\
\;\;\;\;y \cdot \left(\left(z \cdot t\right) \cdot -9\right)\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+97}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(b \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\
\end{array}
\end{array}
if z < -1.42000000000000004e23Initial program 90.5%
sub-neg90.5%
sub-neg90.5%
associate-*l*90.8%
associate-*l*90.8%
Simplified90.8%
Taylor expanded in x around 0 73.1%
Taylor expanded in y around inf 68.6%
Taylor expanded in a around 0 46.9%
if -1.42000000000000004e23 < z < 3.5000000000000001e97Initial program 98.6%
+-commutative98.6%
associate-+r-98.6%
*-commutative98.6%
cancel-sign-sub-inv98.6%
associate-*r*94.9%
distribute-lft-neg-in94.9%
*-commutative94.9%
cancel-sign-sub-inv94.9%
associate-+r-94.9%
associate-*l*94.9%
fma-define94.9%
cancel-sign-sub-inv94.9%
fma-define94.9%
distribute-lft-neg-in94.9%
distribute-rgt-neg-in94.9%
*-commutative94.9%
associate-*r*98.6%
associate-*l*99.2%
neg-mul-199.2%
associate-*r*99.2%
Simplified99.2%
Taylor expanded in t around 0 80.9%
if 3.5000000000000001e97 < z Initial program 82.7%
+-commutative82.7%
associate-+r-82.7%
*-commutative82.7%
cancel-sign-sub-inv82.7%
associate-*r*95.4%
distribute-lft-neg-in95.4%
*-commutative95.4%
cancel-sign-sub-inv95.4%
associate-+r-95.4%
associate-*l*95.3%
fma-define95.3%
cancel-sign-sub-inv95.3%
fma-define95.3%
distribute-lft-neg-in95.3%
distribute-rgt-neg-in95.3%
*-commutative95.3%
associate-*r*82.6%
associate-*l*82.6%
neg-mul-182.6%
associate-*r*82.6%
Simplified82.6%
Taylor expanded in t around inf 50.7%
*-commutative50.7%
associate-*r*50.7%
associate-*l*50.7%
Simplified50.7%
Final simplification68.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. (FPCore (x y z t a b) :precision binary64 (+ (- (* x 2.0) (* (* z t) (* y 9.0))) (* a (* b 27.0))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - ((z * t) * (y * 9.0))) + (a * (b * 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) - ((z * t) * (y * 9.0d0))) + (a * (b * 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) - ((z * t) * (y * 9.0))) + (a * (b * 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) - ((z * t) * (y * 9.0))) + (a * (b * 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(Float64(z * t) * Float64(y * 9.0))) + Float64(a * Float64(b * 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) - ((z * t) * (y * 9.0))) + (a * (b * 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[(N[(z * t), $MachinePrecision] * N[(y * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(b * 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 - \left(z \cdot t\right) \cdot \left(y \cdot 9\right)\right) + a \cdot \left(b \cdot 27\right)
\end{array}
Initial program 94.2%
sub-neg94.2%
sub-neg94.2%
associate-*l*95.3%
associate-*l*95.3%
Simplified95.3%
Final simplification95.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 (<= a -4.5e+126) (not (<= a 5.3e-17))) (* 27.0 (* b a)) (* 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 <= -4.5e+126) || !(a <= 5.3e-17)) {
tmp = 27.0 * (b * a);
} 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 <= (-4.5d+126)) .or. (.not. (a <= 5.3d-17))) then
tmp = 27.0d0 * (b * a)
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 <= -4.5e+126) || !(a <= 5.3e-17)) {
tmp = 27.0 * (b * a);
} 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 <= -4.5e+126) or not (a <= 5.3e-17): tmp = 27.0 * (b * a) 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 <= -4.5e+126) || !(a <= 5.3e-17)) tmp = Float64(27.0 * Float64(b * a)); 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 <= -4.5e+126) || ~((a <= 5.3e-17)))
tmp = 27.0 * (b * a);
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, -4.5e+126], N[Not[LessEqual[a, 5.3e-17]], $MachinePrecision]], N[(27.0 * N[(b * a), $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 -4.5 \cdot 10^{+126} \lor \neg \left(a \leq 5.3 \cdot 10^{-17}\right):\\
\;\;\;\;27 \cdot \left(b \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if a < -4.49999999999999974e126 or 5.2999999999999998e-17 < a Initial program 91.1%
+-commutative91.1%
associate-+r-91.1%
*-commutative91.1%
cancel-sign-sub-inv91.1%
associate-*r*95.1%
distribute-lft-neg-in95.1%
*-commutative95.1%
cancel-sign-sub-inv95.1%
associate-+r-95.1%
associate-*l*95.0%
fma-define95.0%
cancel-sign-sub-inv95.0%
fma-define95.0%
distribute-lft-neg-in95.0%
distribute-rgt-neg-in95.0%
*-commutative95.0%
associate-*r*91.1%
associate-*l*91.1%
neg-mul-191.1%
associate-*r*91.1%
Simplified91.1%
Taylor expanded in a around inf 61.0%
if -4.49999999999999974e126 < a < 5.2999999999999998e-17Initial program 97.0%
+-commutative97.0%
associate-+r-97.0%
*-commutative97.0%
cancel-sign-sub-inv97.0%
associate-*r*96.5%
distribute-lft-neg-in96.5%
*-commutative96.5%
cancel-sign-sub-inv96.5%
associate-+r-96.5%
associate-*l*96.5%
fma-define96.5%
cancel-sign-sub-inv96.5%
fma-define96.5%
distribute-lft-neg-in96.5%
distribute-rgt-neg-in96.5%
*-commutative96.5%
associate-*r*97.0%
associate-*l*97.7%
neg-mul-197.7%
associate-*r*97.7%
Simplified97.7%
Taylor expanded in t around 0 57.6%
Taylor expanded in x around inf 41.8%
Final simplification50.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 (<= y -5.5e+139) (* y (* (* z t) -9.0)) (if (<= y -5.9e-241) (* b (* a 27.0)) (* 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 (y <= -5.5e+139) {
tmp = y * ((z * t) * -9.0);
} else if (y <= -5.9e-241) {
tmp = b * (a * 27.0);
} 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 (y <= (-5.5d+139)) then
tmp = y * ((z * t) * (-9.0d0))
else if (y <= (-5.9d-241)) then
tmp = b * (a * 27.0d0)
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 (y <= -5.5e+139) {
tmp = y * ((z * t) * -9.0);
} else if (y <= -5.9e-241) {
tmp = b * (a * 27.0);
} 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 y <= -5.5e+139: tmp = y * ((z * t) * -9.0) elif y <= -5.9e-241: tmp = b * (a * 27.0) 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 (y <= -5.5e+139) tmp = Float64(y * Float64(Float64(z * t) * -9.0)); elseif (y <= -5.9e-241) tmp = Float64(b * Float64(a * 27.0)); 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 (y <= -5.5e+139)
tmp = y * ((z * t) * -9.0);
elseif (y <= -5.9e-241)
tmp = b * (a * 27.0);
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[LessEqual[y, -5.5e+139], N[(y * N[(N[(z * t), $MachinePrecision] * -9.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5.9e-241], N[(b * N[(a * 27.0), $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}\;y \leq -5.5 \cdot 10^{+139}:\\
\;\;\;\;y \cdot \left(\left(z \cdot t\right) \cdot -9\right)\\
\mathbf{elif}\;y \leq -5.9 \cdot 10^{-241}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if y < -5.4999999999999996e139Initial program 79.2%
sub-neg79.2%
sub-neg79.2%
associate-*l*97.1%
associate-*l*97.1%
Simplified97.1%
Taylor expanded in x around 0 75.9%
Taylor expanded in y around inf 88.5%
Taylor expanded in a around 0 80.9%
if -5.4999999999999996e139 < y < -5.8999999999999998e-241Initial program 93.5%
+-commutative93.5%
associate-+r-93.5%
*-commutative93.5%
cancel-sign-sub-inv93.5%
associate-*r*97.3%
distribute-lft-neg-in97.3%
*-commutative97.3%
cancel-sign-sub-inv97.3%
associate-+r-97.3%
associate-*l*97.3%
fma-define97.3%
cancel-sign-sub-inv97.3%
fma-define97.3%
distribute-lft-neg-in97.3%
distribute-rgt-neg-in97.3%
*-commutative97.3%
associate-*r*93.6%
associate-*l*93.6%
neg-mul-193.6%
associate-*r*93.6%
Simplified93.6%
Taylor expanded in a around inf 51.6%
*-commutative51.6%
*-commutative51.6%
associate-*r*51.6%
*-commutative51.6%
Simplified51.6%
if -5.8999999999999998e-241 < y Initial program 98.5%
+-commutative98.5%
associate-+r-98.5%
*-commutative98.5%
cancel-sign-sub-inv98.5%
associate-*r*97.3%
distribute-lft-neg-in97.3%
*-commutative97.3%
cancel-sign-sub-inv97.3%
associate-+r-97.3%
associate-*l*97.3%
fma-define97.3%
cancel-sign-sub-inv97.3%
fma-define97.3%
distribute-lft-neg-in97.3%
distribute-rgt-neg-in97.3%
*-commutative97.3%
associate-*r*98.5%
associate-*l*98.5%
neg-mul-198.5%
associate-*r*98.5%
Simplified98.5%
Taylor expanded in t around 0 75.7%
Taylor expanded in x around inf 40.3%
Final simplification49.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 (<= y -5e+139) (* -9.0 (* y (* z t))) (if (<= y -5.3e-241) (* b (* a 27.0)) (* 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 (y <= -5e+139) {
tmp = -9.0 * (y * (z * t));
} else if (y <= -5.3e-241) {
tmp = b * (a * 27.0);
} 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 (y <= (-5d+139)) then
tmp = (-9.0d0) * (y * (z * t))
else if (y <= (-5.3d-241)) then
tmp = b * (a * 27.0d0)
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 (y <= -5e+139) {
tmp = -9.0 * (y * (z * t));
} else if (y <= -5.3e-241) {
tmp = b * (a * 27.0);
} 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 y <= -5e+139: tmp = -9.0 * (y * (z * t)) elif y <= -5.3e-241: tmp = b * (a * 27.0) 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 (y <= -5e+139) tmp = Float64(-9.0 * Float64(y * Float64(z * t))); elseif (y <= -5.3e-241) tmp = Float64(b * Float64(a * 27.0)); 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 (y <= -5e+139)
tmp = -9.0 * (y * (z * t));
elseif (y <= -5.3e-241)
tmp = b * (a * 27.0);
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[LessEqual[y, -5e+139], N[(-9.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5.3e-241], N[(b * N[(a * 27.0), $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}\;y \leq -5 \cdot 10^{+139}:\\
\;\;\;\;-9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\
\mathbf{elif}\;y \leq -5.3 \cdot 10^{-241}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if y < -5.0000000000000003e139Initial program 79.2%
+-commutative79.2%
associate-+r-79.2%
*-commutative79.2%
cancel-sign-sub-inv79.2%
associate-*r*87.0%
distribute-lft-neg-in87.0%
*-commutative87.0%
cancel-sign-sub-inv87.0%
associate-+r-87.0%
associate-*l*86.9%
fma-define86.9%
cancel-sign-sub-inv86.9%
fma-define86.9%
distribute-lft-neg-in86.9%
distribute-rgt-neg-in86.9%
*-commutative86.9%
associate-*r*79.2%
associate-*l*81.8%
neg-mul-181.8%
associate-*r*81.8%
Simplified81.8%
fma-undefine81.8%
fma-undefine81.8%
associate-+r+81.8%
*-commutative81.8%
associate-*l*97.1%
*-commutative97.1%
associate-*r*97.0%
*-commutative97.0%
*-commutative97.0%
associate-*r*97.1%
associate-*l*97.1%
metadata-eval97.1%
distribute-lft-neg-in97.1%
*-commutative97.1%
distribute-rgt-neg-in97.1%
*-commutative97.1%
associate-+r+97.1%
sub-neg97.1%
Applied egg-rr97.1%
Taylor expanded in y around inf 73.4%
*-commutative73.4%
associate-*r*80.8%
*-commutative80.8%
Simplified80.8%
if -5.0000000000000003e139 < y < -5.2999999999999998e-241Initial program 93.5%
+-commutative93.5%
associate-+r-93.5%
*-commutative93.5%
cancel-sign-sub-inv93.5%
associate-*r*97.3%
distribute-lft-neg-in97.3%
*-commutative97.3%
cancel-sign-sub-inv97.3%
associate-+r-97.3%
associate-*l*97.3%
fma-define97.3%
cancel-sign-sub-inv97.3%
fma-define97.3%
distribute-lft-neg-in97.3%
distribute-rgt-neg-in97.3%
*-commutative97.3%
associate-*r*93.6%
associate-*l*93.6%
neg-mul-193.6%
associate-*r*93.6%
Simplified93.6%
Taylor expanded in a around inf 51.6%
*-commutative51.6%
*-commutative51.6%
associate-*r*51.6%
*-commutative51.6%
Simplified51.6%
if -5.2999999999999998e-241 < y Initial program 98.5%
+-commutative98.5%
associate-+r-98.5%
*-commutative98.5%
cancel-sign-sub-inv98.5%
associate-*r*97.3%
distribute-lft-neg-in97.3%
*-commutative97.3%
cancel-sign-sub-inv97.3%
associate-+r-97.3%
associate-*l*97.3%
fma-define97.3%
cancel-sign-sub-inv97.3%
fma-define97.3%
distribute-lft-neg-in97.3%
distribute-rgt-neg-in97.3%
*-commutative97.3%
associate-*r*98.5%
associate-*l*98.5%
neg-mul-198.5%
associate-*r*98.5%
Simplified98.5%
Taylor expanded in t around 0 75.7%
Taylor expanded in x around inf 40.3%
Final simplification49.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 (<= y -5.8e+139) (* -9.0 (* t (* y z))) (if (<= y -8.8e-241) (* b (* a 27.0)) (* 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 (y <= -5.8e+139) {
tmp = -9.0 * (t * (y * z));
} else if (y <= -8.8e-241) {
tmp = b * (a * 27.0);
} 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 (y <= (-5.8d+139)) then
tmp = (-9.0d0) * (t * (y * z))
else if (y <= (-8.8d-241)) then
tmp = b * (a * 27.0d0)
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 (y <= -5.8e+139) {
tmp = -9.0 * (t * (y * z));
} else if (y <= -8.8e-241) {
tmp = b * (a * 27.0);
} 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 y <= -5.8e+139: tmp = -9.0 * (t * (y * z)) elif y <= -8.8e-241: tmp = b * (a * 27.0) 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 (y <= -5.8e+139) tmp = Float64(-9.0 * Float64(t * Float64(y * z))); elseif (y <= -8.8e-241) tmp = Float64(b * Float64(a * 27.0)); 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 (y <= -5.8e+139)
tmp = -9.0 * (t * (y * z));
elseif (y <= -8.8e-241)
tmp = b * (a * 27.0);
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[LessEqual[y, -5.8e+139], N[(-9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -8.8e-241], N[(b * N[(a * 27.0), $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}\;y \leq -5.8 \cdot 10^{+139}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\mathbf{elif}\;y \leq -8.8 \cdot 10^{-241}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if y < -5.7999999999999998e139Initial program 79.2%
+-commutative79.2%
associate-+r-79.2%
*-commutative79.2%
cancel-sign-sub-inv79.2%
associate-*r*87.0%
distribute-lft-neg-in87.0%
*-commutative87.0%
cancel-sign-sub-inv87.0%
associate-+r-87.0%
associate-*l*86.9%
fma-define86.9%
cancel-sign-sub-inv86.9%
fma-define86.9%
distribute-lft-neg-in86.9%
distribute-rgt-neg-in86.9%
*-commutative86.9%
associate-*r*79.2%
associate-*l*81.8%
neg-mul-181.8%
associate-*r*81.8%
Simplified81.8%
Taylor expanded in t around inf 73.4%
if -5.7999999999999998e139 < y < -8.7999999999999997e-241Initial program 93.5%
+-commutative93.5%
associate-+r-93.5%
*-commutative93.5%
cancel-sign-sub-inv93.5%
associate-*r*97.3%
distribute-lft-neg-in97.3%
*-commutative97.3%
cancel-sign-sub-inv97.3%
associate-+r-97.3%
associate-*l*97.3%
fma-define97.3%
cancel-sign-sub-inv97.3%
fma-define97.3%
distribute-lft-neg-in97.3%
distribute-rgt-neg-in97.3%
*-commutative97.3%
associate-*r*93.6%
associate-*l*93.6%
neg-mul-193.6%
associate-*r*93.6%
Simplified93.6%
Taylor expanded in a around inf 51.6%
*-commutative51.6%
*-commutative51.6%
associate-*r*51.6%
*-commutative51.6%
Simplified51.6%
if -8.7999999999999997e-241 < y Initial program 98.5%
+-commutative98.5%
associate-+r-98.5%
*-commutative98.5%
cancel-sign-sub-inv98.5%
associate-*r*97.3%
distribute-lft-neg-in97.3%
*-commutative97.3%
cancel-sign-sub-inv97.3%
associate-+r-97.3%
associate-*l*97.3%
fma-define97.3%
cancel-sign-sub-inv97.3%
fma-define97.3%
distribute-lft-neg-in97.3%
distribute-rgt-neg-in97.3%
*-commutative97.3%
associate-*r*98.5%
associate-*l*98.5%
neg-mul-198.5%
associate-*r*98.5%
Simplified98.5%
Taylor expanded in t around 0 75.7%
Taylor expanded in x around inf 40.3%
Final simplification48.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 (<= a -4.6e+126) (* 27.0 (* b a)) (if (<= a 1.76e-34) (* x 2.0) (* a (* b 27.0)))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -4.6e+126) {
tmp = 27.0 * (b * a);
} else if (a <= 1.76e-34) {
tmp = x * 2.0;
} else {
tmp = a * (b * 27.0);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-4.6d+126)) then
tmp = 27.0d0 * (b * a)
else if (a <= 1.76d-34) then
tmp = x * 2.0d0
else
tmp = a * (b * 27.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -4.6e+126) {
tmp = 27.0 * (b * a);
} else if (a <= 1.76e-34) {
tmp = x * 2.0;
} else {
tmp = a * (b * 27.0);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if a <= -4.6e+126: tmp = 27.0 * (b * a) elif a <= 1.76e-34: tmp = x * 2.0 else: tmp = a * (b * 27.0) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -4.6e+126) tmp = Float64(27.0 * Float64(b * a)); elseif (a <= 1.76e-34) tmp = Float64(x * 2.0); else tmp = Float64(a * Float64(b * 27.0)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (a <= -4.6e+126)
tmp = 27.0 * (b * a);
elseif (a <= 1.76e-34)
tmp = x * 2.0;
else
tmp = a * (b * 27.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -4.6e+126], N[(27.0 * N[(b * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.76e-34], N[(x * 2.0), $MachinePrecision], N[(a * N[(b * 27.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}\;a \leq -4.6 \cdot 10^{+126}:\\
\;\;\;\;27 \cdot \left(b \cdot a\right)\\
\mathbf{elif}\;a \leq 1.76 \cdot 10^{-34}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(b \cdot 27\right)\\
\end{array}
\end{array}
if a < -4.6000000000000001e126Initial program 88.3%
+-commutative88.3%
associate-+r-88.3%
*-commutative88.3%
cancel-sign-sub-inv88.3%
associate-*r*94.1%
distribute-lft-neg-in94.1%
*-commutative94.1%
cancel-sign-sub-inv94.1%
associate-+r-94.1%
associate-*l*94.0%
fma-define94.1%
cancel-sign-sub-inv94.1%
fma-define94.1%
distribute-lft-neg-in94.1%
distribute-rgt-neg-in94.1%
*-commutative94.1%
associate-*r*88.2%
associate-*l*88.2%
neg-mul-188.2%
associate-*r*88.2%
Simplified88.2%
Taylor expanded in a around inf 72.0%
if -4.6000000000000001e126 < a < 1.75999999999999995e-34Initial program 97.0%
+-commutative97.0%
associate-+r-97.0%
*-commutative97.0%
cancel-sign-sub-inv97.0%
associate-*r*96.5%
distribute-lft-neg-in96.5%
*-commutative96.5%
cancel-sign-sub-inv96.5%
associate-+r-96.5%
associate-*l*96.5%
fma-define96.5%
cancel-sign-sub-inv96.5%
fma-define96.5%
distribute-lft-neg-in96.5%
distribute-rgt-neg-in96.5%
*-commutative96.5%
associate-*r*97.0%
associate-*l*97.7%
neg-mul-197.7%
associate-*r*97.7%
Simplified97.7%
Taylor expanded in t around 0 57.6%
Taylor expanded in x around inf 41.8%
if 1.75999999999999995e-34 < a Initial program 93.1%
+-commutative93.1%
associate-+r-93.1%
*-commutative93.1%
cancel-sign-sub-inv93.1%
associate-*r*95.8%
distribute-lft-neg-in95.8%
*-commutative95.8%
cancel-sign-sub-inv95.8%
associate-+r-95.8%
associate-*l*95.7%
fma-define95.7%
cancel-sign-sub-inv95.7%
fma-define95.7%
distribute-lft-neg-in95.7%
distribute-rgt-neg-in95.7%
*-commutative95.7%
associate-*r*93.1%
associate-*l*93.1%
neg-mul-193.1%
associate-*r*93.1%
Simplified93.1%
Taylor expanded in t around 0 80.7%
Taylor expanded in a around inf 80.7%
Taylor expanded in a around inf 53.3%
*-commutative53.3%
associate-*l*53.3%
*-commutative53.3%
Simplified53.3%
Final simplification50.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 (* 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 94.2%
+-commutative94.2%
associate-+r-94.2%
*-commutative94.2%
cancel-sign-sub-inv94.2%
associate-*r*95.8%
distribute-lft-neg-in95.8%
*-commutative95.8%
cancel-sign-sub-inv95.8%
associate-+r-95.8%
associate-*l*95.8%
fma-define95.8%
cancel-sign-sub-inv95.8%
fma-define95.8%
distribute-lft-neg-in95.8%
distribute-rgt-neg-in95.8%
*-commutative95.8%
associate-*r*94.2%
associate-*l*94.6%
neg-mul-194.6%
associate-*r*94.6%
Simplified94.6%
Taylor expanded in t around 0 68.0%
Taylor expanded in x around inf 32.1%
Final simplification32.1%
(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 2024135
(FPCore (x y z t a b)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, A"
:precision binary64
:alt
(! :herbie-platform default (if (< y 7590524218811189/100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (* x 2) (* (* (* y 9) z) t)) (* a (* 27 b))) (+ (- (* x 2) (* 9 (* y (* t z)))) (* (* a 27) b))))
(+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))