
(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 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * 2.0d0) - (((y * 9.0d0) * z) * t)) + ((a * 27.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
def code(x, y, z, t, a, b): return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + Float64(Float64(a * 27.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b
\end{array}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= z -1.5e-22) (fma a (* 27.0 b) (fma x 2.0 (* y (* z (* t -9.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);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.5e-22) {
tmp = fma(a, (27.0 * b), fma(x, 2.0, (y * (z * (t * -9.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]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.5e-22) tmp = fma(a, Float64(27.0 * b), fma(x, 2.0, Float64(y * Float64(z * Float64(t * -9.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. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.5e-22], N[(a * N[(27.0 * b), $MachinePrecision] + N[(x * 2.0 + N[(y * N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.5 \cdot 10^{-22}:\\
\;\;\;\;\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, y \cdot \left(z \cdot \left(t \cdot -9\right)\right)\right)\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 < -1.5e-22Initial program 88.1%
+-commutative88.1%
associate-+r-88.1%
*-commutative88.1%
cancel-sign-sub-inv88.1%
associate-*r*94.4%
distribute-lft-neg-in94.4%
*-commutative94.4%
cancel-sign-sub-inv94.4%
associate-+r-94.4%
associate-*l*94.4%
fma-define98.5%
fma-neg98.5%
associate-*l*92.0%
distribute-rgt-neg-in92.0%
*-commutative92.0%
associate-*l*92.1%
*-commutative92.1%
distribute-lft-neg-in92.1%
associate-*r*92.0%
Simplified92.0%
if -1.5e-22 < z Initial program 95.1%
+-commutative95.1%
associate-+r-95.1%
*-commutative95.1%
cancel-sign-sub-inv95.1%
associate-*r*90.9%
distribute-lft-neg-in90.9%
*-commutative90.9%
cancel-sign-sub-inv90.9%
associate-+r-90.9%
associate-*l*91.4%
fma-define92.0%
cancel-sign-sub-inv92.0%
fma-define92.0%
distribute-lft-neg-in92.0%
distribute-rgt-neg-in92.0%
*-commutative92.0%
associate-*r*96.2%
associate-*l*95.7%
neg-mul-195.7%
associate-*r*95.7%
Simplified95.7%
Final simplification94.6%
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-14) (+ (* z (- (* 2.0 (/ x z)) (* 9.0 (* y t)))) (* a (* 27.0 b))) (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);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -5e-14) {
tmp = (z * ((2.0 * (x / z)) - (9.0 * (y * t)))) + (a * (27.0 * b));
} 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]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -5e-14) tmp = Float64(Float64(z * Float64(Float64(2.0 * Float64(x / z)) - Float64(9.0 * Float64(y * t)))) + Float64(a * Float64(27.0 * b))); 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. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -5e-14], N[(N[(z * N[(N[(2.0 * N[(x / z), $MachinePrecision]), $MachinePrecision] - N[(9.0 * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{-14}:\\
\;\;\;\;z \cdot \left(2 \cdot \frac{x}{z} - 9 \cdot \left(y \cdot t\right)\right) + a \cdot \left(27 \cdot b\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 < -5.0000000000000002e-14Initial program 87.8%
sub-neg87.8%
sub-neg87.8%
associate-*l*87.6%
associate-*l*87.6%
Simplified87.6%
Taylor expanded in z around inf 93.0%
if -5.0000000000000002e-14 < z Initial program 95.2%
+-commutative95.2%
associate-+r-95.2%
*-commutative95.2%
cancel-sign-sub-inv95.2%
associate-*r*91.0%
distribute-lft-neg-in91.0%
*-commutative91.0%
cancel-sign-sub-inv91.0%
associate-+r-91.0%
associate-*l*91.5%
fma-define92.1%
cancel-sign-sub-inv92.1%
fma-define92.1%
distribute-lft-neg-in92.1%
distribute-rgt-neg-in92.1%
*-commutative92.1%
associate-*r*96.2%
associate-*l*95.7%
neg-mul-195.7%
associate-*r*95.7%
Simplified95.7%
Final simplification94.9%
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 (<= a -5e+79)
(* 27.0 (* a b))
(if (<= a -6.6e-14)
t_1
(if (<= a -1.8e-62)
(* x 2.0)
(if (<= a -8.6e-105)
t_1
(if (<= a -1.35e-131)
(* x 2.0)
(if (<= a 1.2e-301)
t_1
(if (<= a 6.5e-69) (* x 2.0) (* a (* 27.0 b)))))))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -9.0 * (t * (z * y));
double tmp;
if (a <= -5e+79) {
tmp = 27.0 * (a * b);
} else if (a <= -6.6e-14) {
tmp = t_1;
} else if (a <= -1.8e-62) {
tmp = x * 2.0;
} else if (a <= -8.6e-105) {
tmp = t_1;
} else if (a <= -1.35e-131) {
tmp = x * 2.0;
} else if (a <= 1.2e-301) {
tmp = t_1;
} else if (a <= 6.5e-69) {
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.
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 (a <= (-5d+79)) then
tmp = 27.0d0 * (a * b)
else if (a <= (-6.6d-14)) then
tmp = t_1
else if (a <= (-1.8d-62)) then
tmp = x * 2.0d0
else if (a <= (-8.6d-105)) then
tmp = t_1
else if (a <= (-1.35d-131)) then
tmp = x * 2.0d0
else if (a <= 1.2d-301) then
tmp = t_1
else if (a <= 6.5d-69) 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;
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 (a <= -5e+79) {
tmp = 27.0 * (a * b);
} else if (a <= -6.6e-14) {
tmp = t_1;
} else if (a <= -1.8e-62) {
tmp = x * 2.0;
} else if (a <= -8.6e-105) {
tmp = t_1;
} else if (a <= -1.35e-131) {
tmp = x * 2.0;
} else if (a <= 1.2e-301) {
tmp = t_1;
} else if (a <= 6.5e-69) {
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]) def code(x, y, z, t, a, b): t_1 = -9.0 * (t * (z * y)) tmp = 0 if a <= -5e+79: tmp = 27.0 * (a * b) elif a <= -6.6e-14: tmp = t_1 elif a <= -1.8e-62: tmp = x * 2.0 elif a <= -8.6e-105: tmp = t_1 elif a <= -1.35e-131: tmp = x * 2.0 elif a <= 1.2e-301: tmp = t_1 elif a <= 6.5e-69: 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]) function code(x, y, z, t, a, b) t_1 = Float64(-9.0 * Float64(t * Float64(z * y))) tmp = 0.0 if (a <= -5e+79) tmp = Float64(27.0 * Float64(a * b)); elseif (a <= -6.6e-14) tmp = t_1; elseif (a <= -1.8e-62) tmp = Float64(x * 2.0); elseif (a <= -8.6e-105) tmp = t_1; elseif (a <= -1.35e-131) tmp = Float64(x * 2.0); elseif (a <= 1.2e-301) tmp = t_1; elseif (a <= 6.5e-69) 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])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = -9.0 * (t * (z * y));
tmp = 0.0;
if (a <= -5e+79)
tmp = 27.0 * (a * b);
elseif (a <= -6.6e-14)
tmp = t_1;
elseif (a <= -1.8e-62)
tmp = x * 2.0;
elseif (a <= -8.6e-105)
tmp = t_1;
elseif (a <= -1.35e-131)
tmp = x * 2.0;
elseif (a <= 1.2e-301)
tmp = t_1;
elseif (a <= 6.5e-69)
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.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(-9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5e+79], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -6.6e-14], t$95$1, If[LessEqual[a, -1.8e-62], N[(x * 2.0), $MachinePrecision], If[LessEqual[a, -8.6e-105], t$95$1, If[LessEqual[a, -1.35e-131], N[(x * 2.0), $MachinePrecision], If[LessEqual[a, 1.2e-301], t$95$1, If[LessEqual[a, 6.5e-69], 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])\\
\\
\begin{array}{l}
t_1 := -9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\mathbf{if}\;a \leq -5 \cdot 10^{+79}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;a \leq -6.6 \cdot 10^{-14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -1.8 \cdot 10^{-62}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;a \leq -8.6 \cdot 10^{-105}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -1.35 \cdot 10^{-131}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;a \leq 1.2 \cdot 10^{-301}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 6.5 \cdot 10^{-69}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\end{array}
\end{array}
if a < -5e79Initial program 90.2%
sub-neg90.2%
sub-neg90.2%
associate-*l*90.1%
associate-*l*92.0%
Simplified92.0%
Taylor expanded in a around inf 60.9%
if -5e79 < a < -6.5999999999999996e-14 or -1.8e-62 < a < -8.59999999999999928e-105 or -1.35000000000000011e-131 < a < 1.19999999999999996e-301Initial program 91.9%
sub-neg91.9%
sub-neg91.9%
associate-*l*96.3%
associate-*l*96.2%
Simplified96.2%
Taylor expanded in y around inf 47.6%
if -6.5999999999999996e-14 < a < -1.8e-62 or -8.59999999999999928e-105 < a < -1.35000000000000011e-131 or 1.19999999999999996e-301 < a < 6.49999999999999951e-69Initial program 95.4%
sub-neg95.4%
sub-neg95.4%
associate-*l*95.5%
associate-*l*95.6%
Simplified95.6%
Taylor expanded in x around inf 50.9%
if 6.49999999999999951e-69 < a Initial program 93.9%
sub-neg93.9%
sub-neg93.9%
associate-*l*95.0%
associate-*l*95.1%
Simplified95.1%
Taylor expanded in a around inf 48.8%
associate-*r*48.8%
*-commutative48.8%
associate-*r*48.9%
Simplified48.9%
Final simplification51.5%
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 (* z (* y t)))))
(if (<= a -6e+79)
(* 27.0 (* a b))
(if (<= a -2e-13)
(* -9.0 (* t (* z y)))
(if (<= a -1.35e-62)
(* x 2.0)
(if (<= a -9e-108)
t_1
(if (<= a -5.1e-132)
(* x 2.0)
(if (<= a 1.65e-303)
t_1
(if (<= a 3.15e-75) (* x 2.0) (* a (* 27.0 b)))))))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -9.0 * (z * (y * t));
double tmp;
if (a <= -6e+79) {
tmp = 27.0 * (a * b);
} else if (a <= -2e-13) {
tmp = -9.0 * (t * (z * y));
} else if (a <= -1.35e-62) {
tmp = x * 2.0;
} else if (a <= -9e-108) {
tmp = t_1;
} else if (a <= -5.1e-132) {
tmp = x * 2.0;
} else if (a <= 1.65e-303) {
tmp = t_1;
} else if (a <= 3.15e-75) {
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.
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) * (z * (y * t))
if (a <= (-6d+79)) then
tmp = 27.0d0 * (a * b)
else if (a <= (-2d-13)) then
tmp = (-9.0d0) * (t * (z * y))
else if (a <= (-1.35d-62)) then
tmp = x * 2.0d0
else if (a <= (-9d-108)) then
tmp = t_1
else if (a <= (-5.1d-132)) then
tmp = x * 2.0d0
else if (a <= 1.65d-303) then
tmp = t_1
else if (a <= 3.15d-75) 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;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -9.0 * (z * (y * t));
double tmp;
if (a <= -6e+79) {
tmp = 27.0 * (a * b);
} else if (a <= -2e-13) {
tmp = -9.0 * (t * (z * y));
} else if (a <= -1.35e-62) {
tmp = x * 2.0;
} else if (a <= -9e-108) {
tmp = t_1;
} else if (a <= -5.1e-132) {
tmp = x * 2.0;
} else if (a <= 1.65e-303) {
tmp = t_1;
} else if (a <= 3.15e-75) {
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]) def code(x, y, z, t, a, b): t_1 = -9.0 * (z * (y * t)) tmp = 0 if a <= -6e+79: tmp = 27.0 * (a * b) elif a <= -2e-13: tmp = -9.0 * (t * (z * y)) elif a <= -1.35e-62: tmp = x * 2.0 elif a <= -9e-108: tmp = t_1 elif a <= -5.1e-132: tmp = x * 2.0 elif a <= 1.65e-303: tmp = t_1 elif a <= 3.15e-75: 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]) function code(x, y, z, t, a, b) t_1 = Float64(-9.0 * Float64(z * Float64(y * t))) tmp = 0.0 if (a <= -6e+79) tmp = Float64(27.0 * Float64(a * b)); elseif (a <= -2e-13) tmp = Float64(-9.0 * Float64(t * Float64(z * y))); elseif (a <= -1.35e-62) tmp = Float64(x * 2.0); elseif (a <= -9e-108) tmp = t_1; elseif (a <= -5.1e-132) tmp = Float64(x * 2.0); elseif (a <= 1.65e-303) tmp = t_1; elseif (a <= 3.15e-75) 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])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = -9.0 * (z * (y * t));
tmp = 0.0;
if (a <= -6e+79)
tmp = 27.0 * (a * b);
elseif (a <= -2e-13)
tmp = -9.0 * (t * (z * y));
elseif (a <= -1.35e-62)
tmp = x * 2.0;
elseif (a <= -9e-108)
tmp = t_1;
elseif (a <= -5.1e-132)
tmp = x * 2.0;
elseif (a <= 1.65e-303)
tmp = t_1;
elseif (a <= 3.15e-75)
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.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -6e+79], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -2e-13], N[(-9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.35e-62], N[(x * 2.0), $MachinePrecision], If[LessEqual[a, -9e-108], t$95$1, If[LessEqual[a, -5.1e-132], N[(x * 2.0), $MachinePrecision], If[LessEqual[a, 1.65e-303], t$95$1, If[LessEqual[a, 3.15e-75], 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])\\
\\
\begin{array}{l}
t_1 := -9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{if}\;a \leq -6 \cdot 10^{+79}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;a \leq -2 \cdot 10^{-13}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\mathbf{elif}\;a \leq -1.35 \cdot 10^{-62}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;a \leq -9 \cdot 10^{-108}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -5.1 \cdot 10^{-132}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;a \leq 1.65 \cdot 10^{-303}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 3.15 \cdot 10^{-75}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\end{array}
\end{array}
if a < -5.99999999999999948e79Initial program 90.2%
sub-neg90.2%
sub-neg90.2%
associate-*l*90.1%
associate-*l*92.0%
Simplified92.0%
Taylor expanded in a around inf 60.9%
if -5.99999999999999948e79 < a < -2.0000000000000001e-13Initial program 71.7%
sub-neg71.7%
sub-neg71.7%
associate-*l*89.5%
associate-*l*89.7%
Simplified89.7%
Taylor expanded in y around inf 32.8%
if -2.0000000000000001e-13 < a < -1.3500000000000001e-62 or -8.99999999999999941e-108 < a < -5.10000000000000005e-132 or 1.6499999999999999e-303 < a < 3.14999999999999992e-75Initial program 95.4%
sub-neg95.4%
sub-neg95.4%
associate-*l*95.5%
associate-*l*95.6%
Simplified95.6%
Taylor expanded in x around inf 50.9%
if -1.3500000000000001e-62 < a < -8.99999999999999941e-108 or -5.10000000000000005e-132 < a < 1.6499999999999999e-303Initial program 96.0%
sub-neg96.0%
sub-neg96.0%
associate-*l*97.6%
associate-*l*97.6%
Simplified97.6%
Taylor expanded in y around inf 50.7%
pow150.7%
*-commutative50.7%
associate-*l*52.7%
Applied egg-rr52.7%
unpow152.7%
associate-*r*50.7%
*-commutative50.7%
associate-*r*48.8%
Simplified48.8%
if 3.14999999999999992e-75 < a Initial program 93.9%
sub-neg93.9%
sub-neg93.9%
associate-*l*95.0%
associate-*l*95.1%
Simplified95.1%
Taylor expanded in a around inf 48.8%
associate-*r*48.8%
*-commutative48.8%
associate-*r*48.9%
Simplified48.9%
Final simplification51.1%
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)))
(t_2 (- t_1 (* 9.0 (* t (* z y)))))
(t_3 (+ t_1 (* x 2.0))))
(if (<= a -1.25e+196)
t_3
(if (<= a -5.2e+115)
t_2
(if (<= a -5.8e+79)
t_3
(if (<= a 4.6e-140) (- (* x 2.0) (* 9.0 (* z (* y t)))) t_2))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 27.0 * (a * b);
double t_2 = t_1 - (9.0 * (t * (z * y)));
double t_3 = t_1 + (x * 2.0);
double tmp;
if (a <= -1.25e+196) {
tmp = t_3;
} else if (a <= -5.2e+115) {
tmp = t_2;
} else if (a <= -5.8e+79) {
tmp = t_3;
} else if (a <= 4.6e-140) {
tmp = (x * 2.0) - (9.0 * (z * (y * t)));
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = 27.0d0 * (a * b)
t_2 = t_1 - (9.0d0 * (t * (z * y)))
t_3 = t_1 + (x * 2.0d0)
if (a <= (-1.25d+196)) then
tmp = t_3
else if (a <= (-5.2d+115)) then
tmp = t_2
else if (a <= (-5.8d+79)) then
tmp = t_3
else if (a <= 4.6d-140) then
tmp = (x * 2.0d0) - (9.0d0 * (z * (y * t)))
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 27.0 * (a * b);
double t_2 = t_1 - (9.0 * (t * (z * y)));
double t_3 = t_1 + (x * 2.0);
double tmp;
if (a <= -1.25e+196) {
tmp = t_3;
} else if (a <= -5.2e+115) {
tmp = t_2;
} else if (a <= -5.8e+79) {
tmp = t_3;
} else if (a <= 4.6e-140) {
tmp = (x * 2.0) - (9.0 * (z * (y * t)));
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = 27.0 * (a * b) t_2 = t_1 - (9.0 * (t * (z * y))) t_3 = t_1 + (x * 2.0) tmp = 0 if a <= -1.25e+196: tmp = t_3 elif a <= -5.2e+115: tmp = t_2 elif a <= -5.8e+79: tmp = t_3 elif a <= 4.6e-140: tmp = (x * 2.0) - (9.0 * (z * (y * t))) else: tmp = t_2 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(27.0 * Float64(a * b)) t_2 = Float64(t_1 - Float64(9.0 * Float64(t * Float64(z * y)))) t_3 = Float64(t_1 + Float64(x * 2.0)) tmp = 0.0 if (a <= -1.25e+196) tmp = t_3; elseif (a <= -5.2e+115) tmp = t_2; elseif (a <= -5.8e+79) tmp = t_3; elseif (a <= 4.6e-140) tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(z * Float64(y * t)))); else tmp = t_2; end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = 27.0 * (a * b);
t_2 = t_1 - (9.0 * (t * (z * y)));
t_3 = t_1 + (x * 2.0);
tmp = 0.0;
if (a <= -1.25e+196)
tmp = t_3;
elseif (a <= -5.2e+115)
tmp = t_2;
elseif (a <= -5.8e+79)
tmp = t_3;
elseif (a <= 4.6e-140)
tmp = (x * 2.0) - (9.0 * (z * (y * t)));
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 - N[(9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.25e+196], t$95$3, If[LessEqual[a, -5.2e+115], t$95$2, If[LessEqual[a, -5.8e+79], t$95$3, If[LessEqual[a, 4.6e-140], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := 27 \cdot \left(a \cdot b\right)\\
t_2 := t\_1 - 9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
t_3 := t\_1 + x \cdot 2\\
\mathbf{if}\;a \leq -1.25 \cdot 10^{+196}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;a \leq -5.2 \cdot 10^{+115}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -5.8 \cdot 10^{+79}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;a \leq 4.6 \cdot 10^{-140}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -1.2499999999999999e196 or -5.2000000000000001e115 < a < -5.79999999999999984e79Initial program 87.2%
sub-neg87.2%
sub-neg87.2%
associate-*l*87.1%
associate-*l*89.5%
Simplified89.5%
Taylor expanded in y around 0 84.6%
if -1.2499999999999999e196 < a < -5.2000000000000001e115 or 4.6000000000000002e-140 < a Initial program 95.1%
sub-neg95.1%
sub-neg95.1%
associate-*l*95.1%
associate-*l*95.1%
Simplified95.1%
Taylor expanded in x around 0 77.6%
if -5.79999999999999984e79 < a < 4.6000000000000002e-140Initial program 93.3%
sub-neg93.3%
sub-neg93.3%
associate-*l*96.4%
associate-*l*96.4%
Simplified96.4%
Taylor expanded in a around 0 80.2%
pow144.8%
*-commutative44.8%
associate-*l*48.6%
Applied egg-rr84.3%
unpow148.6%
associate-*r*44.8%
*-commutative44.8%
associate-*r*44.4%
Simplified80.2%
Final simplification79.8%
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))) (t_2 (+ t_1 (* x 2.0))))
(if (<= a -2.05e+195)
t_2
(if (<= a -1.22e+116)
(- t_1 (* 9.0 (* t (* z y))))
(if (<= a -5.2e+79)
t_2
(if (<= a 4e-140)
(- (* x 2.0) (* 9.0 (* z (* y t))))
(- t_1 (* t (* z (* y 9.0))))))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 27.0 * (a * b);
double t_2 = t_1 + (x * 2.0);
double tmp;
if (a <= -2.05e+195) {
tmp = t_2;
} else if (a <= -1.22e+116) {
tmp = t_1 - (9.0 * (t * (z * y)));
} else if (a <= -5.2e+79) {
tmp = t_2;
} else if (a <= 4e-140) {
tmp = (x * 2.0) - (9.0 * (z * (y * t)));
} else {
tmp = t_1 - (t * (z * (y * 9.0)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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)
t_2 = t_1 + (x * 2.0d0)
if (a <= (-2.05d+195)) then
tmp = t_2
else if (a <= (-1.22d+116)) then
tmp = t_1 - (9.0d0 * (t * (z * y)))
else if (a <= (-5.2d+79)) then
tmp = t_2
else if (a <= 4d-140) then
tmp = (x * 2.0d0) - (9.0d0 * (z * (y * t)))
else
tmp = t_1 - (t * (z * (y * 9.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 27.0 * (a * b);
double t_2 = t_1 + (x * 2.0);
double tmp;
if (a <= -2.05e+195) {
tmp = t_2;
} else if (a <= -1.22e+116) {
tmp = t_1 - (9.0 * (t * (z * y)));
} else if (a <= -5.2e+79) {
tmp = t_2;
} else if (a <= 4e-140) {
tmp = (x * 2.0) - (9.0 * (z * (y * t)));
} else {
tmp = t_1 - (t * (z * (y * 9.0)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = 27.0 * (a * b) t_2 = t_1 + (x * 2.0) tmp = 0 if a <= -2.05e+195: tmp = t_2 elif a <= -1.22e+116: tmp = t_1 - (9.0 * (t * (z * y))) elif a <= -5.2e+79: tmp = t_2 elif a <= 4e-140: tmp = (x * 2.0) - (9.0 * (z * (y * t))) else: tmp = t_1 - (t * (z * (y * 9.0))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(27.0 * Float64(a * b)) t_2 = Float64(t_1 + Float64(x * 2.0)) tmp = 0.0 if (a <= -2.05e+195) tmp = t_2; elseif (a <= -1.22e+116) tmp = Float64(t_1 - Float64(9.0 * Float64(t * Float64(z * y)))); elseif (a <= -5.2e+79) tmp = t_2; elseif (a <= 4e-140) tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(z * Float64(y * t)))); else tmp = Float64(t_1 - Float64(t * Float64(z * Float64(y * 9.0)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = 27.0 * (a * b);
t_2 = t_1 + (x * 2.0);
tmp = 0.0;
if (a <= -2.05e+195)
tmp = t_2;
elseif (a <= -1.22e+116)
tmp = t_1 - (9.0 * (t * (z * y)));
elseif (a <= -5.2e+79)
tmp = t_2;
elseif (a <= 4e-140)
tmp = (x * 2.0) - (9.0 * (z * (y * t)));
else
tmp = t_1 - (t * (z * (y * 9.0)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.05e+195], t$95$2, If[LessEqual[a, -1.22e+116], N[(t$95$1 - N[(9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -5.2e+79], t$95$2, If[LessEqual[a, 4e-140], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 - N[(t * N[(z * N[(y * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[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)\\
t_2 := t\_1 + x \cdot 2\\
\mathbf{if}\;a \leq -2.05 \cdot 10^{+195}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -1.22 \cdot 10^{+116}:\\
\;\;\;\;t\_1 - 9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\mathbf{elif}\;a \leq -5.2 \cdot 10^{+79}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 4 \cdot 10^{-140}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 - t \cdot \left(z \cdot \left(y \cdot 9\right)\right)\\
\end{array}
\end{array}
if a < -2.05e195 or -1.21999999999999993e116 < a < -5.20000000000000029e79Initial program 87.2%
sub-neg87.2%
sub-neg87.2%
associate-*l*87.1%
associate-*l*89.5%
Simplified89.5%
Taylor expanded in y around 0 84.6%
if -2.05e195 < a < -1.21999999999999993e116Initial program 99.7%
sub-neg99.7%
sub-neg99.7%
associate-*l*99.7%
associate-*l*99.9%
Simplified99.9%
Taylor expanded in x around 0 84.2%
if -5.20000000000000029e79 < a < 3.9999999999999999e-140Initial program 93.3%
sub-neg93.3%
sub-neg93.3%
associate-*l*96.4%
associate-*l*96.4%
Simplified96.4%
Taylor expanded in a around 0 80.2%
pow144.8%
*-commutative44.8%
associate-*l*48.6%
Applied egg-rr84.3%
unpow148.6%
associate-*r*44.8%
*-commutative44.8%
associate-*r*44.4%
Simplified80.2%
if 3.9999999999999999e-140 < a Initial program 94.5%
sub-neg94.5%
sub-neg94.5%
associate-*l*94.4%
associate-*l*94.5%
Simplified94.5%
Taylor expanded in x around 0 76.7%
add-sqr-sqrt42.5%
sqrt-unprod49.1%
swap-sqr49.1%
metadata-eval49.1%
metadata-eval49.1%
swap-sqr49.1%
associate-*r*48.1%
associate-*r*48.1%
sqrt-unprod25.6%
add-sqr-sqrt42.3%
metadata-eval42.3%
associate-*r*44.5%
distribute-lft-neg-in44.5%
neg-sub044.5%
add-sqr-sqrt30.0%
sqrt-unprod63.2%
swap-sqr63.2%
metadata-eval63.2%
metadata-eval63.2%
swap-sqr63.2%
Applied egg-rr76.7%
neg-sub076.7%
distribute-rgt-neg-in76.7%
associate-*r*76.7%
distribute-lft-neg-in76.7%
metadata-eval76.7%
*-commutative76.7%
*-commutative76.7%
associate-*l*76.7%
Simplified76.7%
Final simplification79.8%
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 -5.4e+79)
(* 27.0 (* a b))
(if (<= a -6.3e-105)
(* y (* -9.0 (* z t)))
(if (<= a -4.6e-132)
(* x 2.0)
(if (<= a 4.8e-303)
(* -9.0 (* z (* y t)))
(if (<= a 6.8e-66) (* x 2.0) (* a (* 27.0 b))))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -5.4e+79) {
tmp = 27.0 * (a * b);
} else if (a <= -6.3e-105) {
tmp = y * (-9.0 * (z * t));
} else if (a <= -4.6e-132) {
tmp = x * 2.0;
} else if (a <= 4.8e-303) {
tmp = -9.0 * (z * (y * t));
} else if (a <= 6.8e-66) {
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.
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 <= (-5.4d+79)) then
tmp = 27.0d0 * (a * b)
else if (a <= (-6.3d-105)) then
tmp = y * ((-9.0d0) * (z * t))
else if (a <= (-4.6d-132)) then
tmp = x * 2.0d0
else if (a <= 4.8d-303) then
tmp = (-9.0d0) * (z * (y * t))
else if (a <= 6.8d-66) 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;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -5.4e+79) {
tmp = 27.0 * (a * b);
} else if (a <= -6.3e-105) {
tmp = y * (-9.0 * (z * t));
} else if (a <= -4.6e-132) {
tmp = x * 2.0;
} else if (a <= 4.8e-303) {
tmp = -9.0 * (z * (y * t));
} else if (a <= 6.8e-66) {
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]) def code(x, y, z, t, a, b): tmp = 0 if a <= -5.4e+79: tmp = 27.0 * (a * b) elif a <= -6.3e-105: tmp = y * (-9.0 * (z * t)) elif a <= -4.6e-132: tmp = x * 2.0 elif a <= 4.8e-303: tmp = -9.0 * (z * (y * t)) elif a <= 6.8e-66: 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]) function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -5.4e+79) tmp = Float64(27.0 * Float64(a * b)); elseif (a <= -6.3e-105) tmp = Float64(y * Float64(-9.0 * Float64(z * t))); elseif (a <= -4.6e-132) tmp = Float64(x * 2.0); elseif (a <= 4.8e-303) tmp = Float64(-9.0 * Float64(z * Float64(y * t))); elseif (a <= 6.8e-66) 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])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (a <= -5.4e+79)
tmp = 27.0 * (a * b);
elseif (a <= -6.3e-105)
tmp = y * (-9.0 * (z * t));
elseif (a <= -4.6e-132)
tmp = x * 2.0;
elseif (a <= 4.8e-303)
tmp = -9.0 * (z * (y * t));
elseif (a <= 6.8e-66)
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. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -5.4e+79], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -6.3e-105], N[(y * N[(-9.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -4.6e-132], N[(x * 2.0), $MachinePrecision], If[LessEqual[a, 4.8e-303], N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.8e-66], 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])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.4 \cdot 10^{+79}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;a \leq -6.3 \cdot 10^{-105}:\\
\;\;\;\;y \cdot \left(-9 \cdot \left(z \cdot t\right)\right)\\
\mathbf{elif}\;a \leq -4.6 \cdot 10^{-132}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;a \leq 4.8 \cdot 10^{-303}:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{elif}\;a \leq 6.8 \cdot 10^{-66}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\end{array}
\end{array}
if a < -5.3999999999999999e79Initial program 90.2%
sub-neg90.2%
sub-neg90.2%
associate-*l*90.1%
associate-*l*92.0%
Simplified92.0%
Taylor expanded in a around inf 60.9%
if -5.3999999999999999e79 < a < -6.3e-105Initial program 90.8%
sub-neg90.8%
sub-neg90.8%
associate-*l*96.4%
associate-*l*96.4%
Simplified96.4%
Taylor expanded in a around 0 59.5%
Taylor expanded in y around inf 59.7%
Taylor expanded in x around 0 51.6%
if -6.3e-105 < a < -4.60000000000000006e-132 or 4.8000000000000002e-303 < a < 6.79999999999999994e-66Initial program 94.8%
sub-neg94.8%
sub-neg94.8%
associate-*l*94.9%
associate-*l*95.0%
Simplified95.0%
Taylor expanded in x around inf 50.8%
if -4.60000000000000006e-132 < a < 4.8000000000000002e-303Initial 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 47.8%
pow147.8%
*-commutative47.8%
associate-*l*50.4%
Applied egg-rr50.4%
unpow150.4%
associate-*r*47.8%
*-commutative47.8%
associate-*r*45.3%
Simplified45.3%
if 6.79999999999999994e-66 < a Initial program 93.8%
sub-neg93.8%
sub-neg93.8%
associate-*l*94.9%
associate-*l*95.0%
Simplified95.0%
Taylor expanded in a around inf 49.3%
associate-*r*49.3%
*-commutative49.3%
associate-*r*49.4%
Simplified49.4%
Final simplification51.6%
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.22e+58) (+ (* a (* 27.0 b)) (+ (* y (* z (* t -9.0))) (* x 2.0))) (* z (- (* 27.0 (/ (* a b) z)) (* 9.0 (* y t))))))
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.22e+58) {
tmp = (a * (27.0 * b)) + ((y * (z * (t * -9.0))) + (x * 2.0));
} else {
tmp = z * ((27.0 * ((a * b) / z)) - (9.0 * (y * t)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= 1.22d+58) then
tmp = (a * (27.0d0 * b)) + ((y * (z * (t * (-9.0d0)))) + (x * 2.0d0))
else
tmp = z * ((27.0d0 * ((a * b) / z)) - (9.0d0 * (y * t)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 1.22e+58) {
tmp = (a * (27.0 * b)) + ((y * (z * (t * -9.0))) + (x * 2.0));
} else {
tmp = z * ((27.0 * ((a * b) / z)) - (9.0 * (y * t)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= 1.22e+58: tmp = (a * (27.0 * b)) + ((y * (z * (t * -9.0))) + (x * 2.0)) else: tmp = z * ((27.0 * ((a * b) / z)) - (9.0 * (y * t))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= 1.22e+58) tmp = Float64(Float64(a * Float64(27.0 * b)) + Float64(Float64(y * Float64(z * Float64(t * -9.0))) + Float64(x * 2.0))); else tmp = Float64(z * Float64(Float64(27.0 * Float64(Float64(a * b) / z)) - Float64(9.0 * Float64(y * t)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= 1.22e+58)
tmp = (a * (27.0 * b)) + ((y * (z * (t * -9.0))) + (x * 2.0));
else
tmp = z * ((27.0 * ((a * b) / z)) - (9.0 * (y * t)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 1.22e+58], N[(N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision] + N[(N[(y * N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(27.0 * N[(N[(a * b), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - N[(9.0 * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 1.22 \cdot 10^{+58}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right) + \left(y \cdot \left(z \cdot \left(t \cdot -9\right)\right) + x \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(27 \cdot \frac{a \cdot b}{z} - 9 \cdot \left(y \cdot t\right)\right)\\
\end{array}
\end{array}
if z < 1.21999999999999995e58Initial program 94.2%
sub-neg94.2%
sub-neg94.2%
associate-*l*95.0%
associate-*l*95.5%
Simplified95.5%
sub-neg95.5%
*-commutative95.5%
distribute-rgt-neg-in95.5%
*-commutative95.5%
distribute-lft-neg-in95.5%
metadata-eval95.5%
associate-*l*95.5%
associate-*r*95.0%
*-commutative95.0%
Applied egg-rr95.0%
if 1.21999999999999995e58 < z Initial program 88.8%
sub-neg88.8%
sub-neg88.8%
associate-*l*92.3%
associate-*l*92.3%
Simplified92.3%
Taylor expanded in x around 0 79.0%
Taylor expanded in z around inf 84.4%
Final simplification92.9%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= z 6.2e+81) (+ (* a (* 27.0 b)) (- (* x 2.0) (* (* y 9.0) (* z t)))) (* z (- (* 27.0 (/ (* a b) z)) (* 9.0 (* y t))))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 6.2e+81) {
tmp = (a * (27.0 * b)) + ((x * 2.0) - ((y * 9.0) * (z * t)));
} else {
tmp = z * ((27.0 * ((a * b) / z)) - (9.0 * (y * t)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= 6.2d+81) then
tmp = (a * (27.0d0 * b)) + ((x * 2.0d0) - ((y * 9.0d0) * (z * t)))
else
tmp = z * ((27.0d0 * ((a * b) / z)) - (9.0d0 * (y * t)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 6.2e+81) {
tmp = (a * (27.0 * b)) + ((x * 2.0) - ((y * 9.0) * (z * t)));
} else {
tmp = z * ((27.0 * ((a * b) / z)) - (9.0 * (y * t)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= 6.2e+81: tmp = (a * (27.0 * b)) + ((x * 2.0) - ((y * 9.0) * (z * t))) else: tmp = z * ((27.0 * ((a * b) / z)) - (9.0 * (y * t))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= 6.2e+81) tmp = Float64(Float64(a * Float64(27.0 * b)) + Float64(Float64(x * 2.0) - Float64(Float64(y * 9.0) * Float64(z * t)))); else tmp = Float64(z * Float64(Float64(27.0 * Float64(Float64(a * b) / z)) - Float64(9.0 * Float64(y * t)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= 6.2e+81)
tmp = (a * (27.0 * b)) + ((x * 2.0) - ((y * 9.0) * (z * t)));
else
tmp = z * ((27.0 * ((a * b) / z)) - (9.0 * (y * t)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 6.2e+81], N[(N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision] + N[(N[(x * 2.0), $MachinePrecision] - N[(N[(y * 9.0), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(27.0 * N[(N[(a * b), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - N[(9.0 * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 6.2 \cdot 10^{+81}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right) + \left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(27 \cdot \frac{a \cdot b}{z} - 9 \cdot \left(y \cdot t\right)\right)\\
\end{array}
\end{array}
if z < 6.2e81Initial program 94.4%
sub-neg94.4%
sub-neg94.4%
associate-*l*95.2%
associate-*l*95.7%
Simplified95.7%
if 6.2e81 < z Initial program 86.5%
sub-neg86.5%
sub-neg86.5%
associate-*l*90.8%
associate-*l*90.8%
Simplified90.8%
Taylor expanded in x around 0 76.9%
Taylor expanded in z around inf 83.5%
Final simplification93.6%
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 2e-194) (+ (* a (* 27.0 b)) (- (* x 2.0) (* (* y 9.0) (* z t)))) (+ (- (* x 2.0) (* t (* z (* y 9.0)))) (* b (* a 27.0)))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 2e-194) {
tmp = (a * (27.0 * b)) + ((x * 2.0) - ((y * 9.0) * (z * t)));
} else {
tmp = ((x * 2.0) - (t * (z * (y * 9.0)))) + (b * (a * 27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= 2d-194) then
tmp = (a * (27.0d0 * b)) + ((x * 2.0d0) - ((y * 9.0d0) * (z * t)))
else
tmp = ((x * 2.0d0) - (t * (z * (y * 9.0d0)))) + (b * (a * 27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 2e-194) {
tmp = (a * (27.0 * b)) + ((x * 2.0) - ((y * 9.0) * (z * t)));
} else {
tmp = ((x * 2.0) - (t * (z * (y * 9.0)))) + (b * (a * 27.0));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= 2e-194: tmp = (a * (27.0 * b)) + ((x * 2.0) - ((y * 9.0) * (z * t))) else: tmp = ((x * 2.0) - (t * (z * (y * 9.0)))) + (b * (a * 27.0)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= 2e-194) tmp = Float64(Float64(a * Float64(27.0 * b)) + Float64(Float64(x * 2.0) - Float64(Float64(y * 9.0) * Float64(z * t)))); else tmp = Float64(Float64(Float64(x * 2.0) - Float64(t * Float64(z * Float64(y * 9.0)))) + Float64(b * Float64(a * 27.0))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= 2e-194)
tmp = (a * (27.0 * b)) + ((x * 2.0) - ((y * 9.0) * (z * t)));
else
tmp = ((x * 2.0) - (t * (z * (y * 9.0)))) + (b * (a * 27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 2e-194], N[(N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision] + N[(N[(x * 2.0), $MachinePrecision] - N[(N[(y * 9.0), $MachinePrecision] * N[(z * t), $MachinePrecision]), $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[(a * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 2 \cdot 10^{-194}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right) + \left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 2 - t \cdot \left(z \cdot \left(y \cdot 9\right)\right)\right) + b \cdot \left(a \cdot 27\right)\\
\end{array}
\end{array}
if z < 2.00000000000000004e-194Initial program 92.9%
sub-neg92.9%
sub-neg92.9%
associate-*l*93.5%
associate-*l*94.0%
Simplified94.0%
if 2.00000000000000004e-194 < z Initial program 93.3%
Final simplification93.8%
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.5e-162) (- (+ (* 27.0 (* a b)) (* x 2.0)) (* y (* t (* z 9.0)))) (+ (- (* x 2.0) (* t (* z (* y 9.0)))) (* b (* a 27.0)))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 1.5e-162) {
tmp = ((27.0 * (a * b)) + (x * 2.0)) - (y * (t * (z * 9.0)));
} else {
tmp = ((x * 2.0) - (t * (z * (y * 9.0)))) + (b * (a * 27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= 1.5d-162) then
tmp = ((27.0d0 * (a * b)) + (x * 2.0d0)) - (y * (t * (z * 9.0d0)))
else
tmp = ((x * 2.0d0) - (t * (z * (y * 9.0d0)))) + (b * (a * 27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 1.5e-162) {
tmp = ((27.0 * (a * b)) + (x * 2.0)) - (y * (t * (z * 9.0)));
} else {
tmp = ((x * 2.0) - (t * (z * (y * 9.0)))) + (b * (a * 27.0));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= 1.5e-162: tmp = ((27.0 * (a * b)) + (x * 2.0)) - (y * (t * (z * 9.0))) else: tmp = ((x * 2.0) - (t * (z * (y * 9.0)))) + (b * (a * 27.0)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= 1.5e-162) tmp = Float64(Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0)) - Float64(y * Float64(t * Float64(z * 9.0)))); else tmp = Float64(Float64(Float64(x * 2.0) - Float64(t * Float64(z * Float64(y * 9.0)))) + Float64(b * Float64(a * 27.0))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= 1.5e-162)
tmp = ((27.0 * (a * b)) + (x * 2.0)) - (y * (t * (z * 9.0)));
else
tmp = ((x * 2.0) - (t * (z * (y * 9.0)))) + (b * (a * 27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 1.5e-162], N[(N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] - N[(y * N[(t * N[(z * 9.0), $MachinePrecision]), $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[(a * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 1.5 \cdot 10^{-162}:\\
\;\;\;\;\left(27 \cdot \left(a \cdot b\right) + x \cdot 2\right) - y \cdot \left(t \cdot \left(z \cdot 9\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 2 - t \cdot \left(z \cdot \left(y \cdot 9\right)\right)\right) + b \cdot \left(a \cdot 27\right)\\
\end{array}
\end{array}
if z < 1.49999999999999999e-162Initial program 93.1%
sub-neg93.1%
sub-neg93.1%
associate-*l*93.6%
associate-*l*94.1%
Simplified94.1%
+-commutative94.1%
associate-+r-94.1%
associate-*r*93.6%
*-commutative93.6%
associate-*l*94.2%
associate-*l*94.2%
associate-*r*94.2%
Applied egg-rr94.2%
if 1.49999999999999999e-162 < z Initial program 93.2%
Final simplification93.8%
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 -5e+79) (not (<= a 4.8e-119))) (+ (* 27.0 (* a b)) (* x 2.0)) (+ (* x 2.0) (* z (* y (* t -9.0))))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -5e+79) || !(a <= 4.8e-119)) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else {
tmp = (x * 2.0) + (z * (y * (t * -9.0)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-5d+79)) .or. (.not. (a <= 4.8d-119))) then
tmp = (27.0d0 * (a * b)) + (x * 2.0d0)
else
tmp = (x * 2.0d0) + (z * (y * (t * (-9.0d0))))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -5e+79) || !(a <= 4.8e-119)) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else {
tmp = (x * 2.0) + (z * (y * (t * -9.0)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if (a <= -5e+79) or not (a <= 4.8e-119): tmp = (27.0 * (a * b)) + (x * 2.0) else: tmp = (x * 2.0) + (z * (y * (t * -9.0))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -5e+79) || !(a <= 4.8e-119)) tmp = Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0)); else tmp = Float64(Float64(x * 2.0) + Float64(z * Float64(y * Float64(t * -9.0)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if ((a <= -5e+79) || ~((a <= 4.8e-119)))
tmp = (27.0 * (a * b)) + (x * 2.0);
else
tmp = (x * 2.0) + (z * (y * (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. code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -5e+79], N[Not[LessEqual[a, 4.8e-119]], $MachinePrecision]], N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] + N[(z * N[(y * 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])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5 \cdot 10^{+79} \lor \neg \left(a \leq 4.8 \cdot 10^{-119}\right):\\
\;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 + z \cdot \left(y \cdot \left(t \cdot -9\right)\right)\\
\end{array}
\end{array}
if a < -5e79 or 4.80000000000000017e-119 < a Initial program 92.9%
sub-neg92.9%
sub-neg92.9%
associate-*l*92.8%
associate-*l*93.5%
Simplified93.5%
Taylor expanded in y around 0 72.0%
if -5e79 < a < 4.80000000000000017e-119Initial program 93.4%
sub-neg93.4%
sub-neg93.4%
associate-*l*96.4%
associate-*l*96.4%
Simplified96.4%
Taylor expanded in a around 0 80.5%
cancel-sign-sub-inv80.5%
*-commutative80.5%
metadata-eval80.5%
+-commutative80.5%
associate-*r*80.5%
associate-*r*80.5%
*-commutative80.5%
Applied egg-rr80.5%
Final simplification75.9%
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 -5e+79) (not (<= a 7.6e-54))) (+ (* 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);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -5e+79) || !(a <= 7.6e-54)) {
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.
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 <= (-5d+79)) .or. (.not. (a <= 7.6d-54))) 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;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -5e+79) || !(a <= 7.6e-54)) {
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]) def code(x, y, z, t, a, b): tmp = 0 if (a <= -5e+79) or not (a <= 7.6e-54): 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]) function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -5e+79) || !(a <= 7.6e-54)) 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])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if ((a <= -5e+79) || ~((a <= 7.6e-54)))
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. code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -5e+79], N[Not[LessEqual[a, 7.6e-54]], $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])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5 \cdot 10^{+79} \lor \neg \left(a \leq 7.6 \cdot 10^{-54}\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 a < -5e79 or 7.6000000000000005e-54 < a Initial program 92.9%
sub-neg92.9%
sub-neg92.9%
associate-*l*92.8%
associate-*l*93.6%
Simplified93.6%
Taylor expanded in y around 0 72.3%
if -5e79 < a < 7.6000000000000005e-54Initial program 93.3%
sub-neg93.3%
sub-neg93.3%
associate-*l*96.1%
associate-*l*96.1%
Simplified96.1%
Taylor expanded in a around 0 79.5%
Final simplification75.9%
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 -5.8e+79) (not (<= a 6.9e-115))) (+ (* 27.0 (* a b)) (* x 2.0)) (- (* x 2.0) (* 9.0 (* z (* y t))))))
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 <= -5.8e+79) || !(a <= 6.9e-115)) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else {
tmp = (x * 2.0) - (9.0 * (z * (y * t)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-5.8d+79)) .or. (.not. (a <= 6.9d-115))) then
tmp = (27.0d0 * (a * b)) + (x * 2.0d0)
else
tmp = (x * 2.0d0) - (9.0d0 * (z * (y * t)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -5.8e+79) || !(a <= 6.9e-115)) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else {
tmp = (x * 2.0) - (9.0 * (z * (y * t)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if (a <= -5.8e+79) or not (a <= 6.9e-115): tmp = (27.0 * (a * b)) + (x * 2.0) else: tmp = (x * 2.0) - (9.0 * (z * (y * t))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -5.8e+79) || !(a <= 6.9e-115)) tmp = Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0)); else tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(z * Float64(y * t)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if ((a <= -5.8e+79) || ~((a <= 6.9e-115)))
tmp = (27.0 * (a * b)) + (x * 2.0);
else
tmp = (x * 2.0) - (9.0 * (z * (y * t)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -5.8e+79], N[Not[LessEqual[a, 6.9e-115]], $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[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.8 \cdot 10^{+79} \lor \neg \left(a \leq 6.9 \cdot 10^{-115}\right):\\
\;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\end{array}
\end{array}
if a < -5.79999999999999984e79 or 6.89999999999999999e-115 < a Initial program 92.8%
sub-neg92.8%
sub-neg92.8%
associate-*l*93.5%
associate-*l*94.2%
Simplified94.2%
Taylor expanded in y around 0 72.6%
if -5.79999999999999984e79 < a < 6.89999999999999999e-115Initial program 93.4%
sub-neg93.4%
sub-neg93.4%
associate-*l*95.7%
associate-*l*95.7%
Simplified95.7%
Taylor expanded in a around 0 80.7%
pow146.2%
*-commutative46.2%
associate-*l*49.1%
Applied egg-rr83.9%
unpow149.1%
associate-*r*46.2%
*-commutative46.2%
associate-*r*45.8%
Simplified80.7%
Final simplification76.3%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= z -2.4e-28) (* z (* y (* t -9.0))) (if (<= z 2.5e+58) (+ (* 27.0 (* a b)) (* x 2.0)) (* z (* t (* y -9.0))))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.4e-28) {
tmp = z * (y * (t * -9.0));
} else if (z <= 2.5e+58) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else {
tmp = z * (t * (y * -9.0));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-2.4d-28)) then
tmp = z * (y * (t * (-9.0d0)))
else if (z <= 2.5d+58) then
tmp = (27.0d0 * (a * b)) + (x * 2.0d0)
else
tmp = z * (t * (y * (-9.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.4e-28) {
tmp = z * (y * (t * -9.0));
} else if (z <= 2.5e+58) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else {
tmp = z * (t * (y * -9.0));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -2.4e-28: tmp = z * (y * (t * -9.0)) elif z <= 2.5e+58: tmp = (27.0 * (a * b)) + (x * 2.0) else: tmp = z * (t * (y * -9.0)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2.4e-28) tmp = Float64(z * Float64(y * Float64(t * -9.0))); elseif (z <= 2.5e+58) tmp = Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0)); else tmp = Float64(z * Float64(t * Float64(y * -9.0))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -2.4e-28)
tmp = z * (y * (t * -9.0));
elseif (z <= 2.5e+58)
tmp = (27.0 * (a * b)) + (x * 2.0);
else
tmp = z * (t * (y * -9.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.4e-28], N[(z * N[(y * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e+58], N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], N[(z * N[(t * N[(y * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{-28}:\\
\;\;\;\;z \cdot \left(y \cdot \left(t \cdot -9\right)\right)\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{+58}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(t \cdot \left(y \cdot -9\right)\right)\\
\end{array}
\end{array}
if z < -2.4000000000000002e-28Initial program 88.4%
sub-neg88.4%
sub-neg88.4%
associate-*l*88.2%
associate-*l*88.2%
Simplified88.2%
Taylor expanded in x around 0 70.0%
Taylor expanded in a around 0 50.7%
associate-*r*50.7%
*-commutative50.7%
associate-*r*55.0%
associate-*r*55.1%
*-commutative55.1%
Simplified55.1%
Taylor expanded in t around 0 55.1%
*-commutative55.1%
*-commutative55.1%
associate-*l*55.0%
Simplified55.0%
if -2.4000000000000002e-28 < z < 2.49999999999999993e58Initial program 97.6%
sub-neg97.6%
sub-neg97.6%
associate-*l*99.1%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in y around 0 81.9%
if 2.49999999999999993e58 < z Initial program 88.6%
sub-neg88.6%
sub-neg88.6%
associate-*l*92.2%
associate-*l*92.2%
Simplified92.2%
Taylor expanded in x around 0 78.6%
Taylor expanded in a around 0 62.0%
associate-*r*62.0%
*-commutative62.0%
associate-*r*65.7%
associate-*r*65.7%
*-commutative65.7%
Simplified65.7%
Final simplification70.7%
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 -3.3e+115) (not (<= a 1.02e-65))) (* 27.0 (* a b)) (* x 2.0)))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -3.3e+115) || !(a <= 1.02e-65)) {
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.
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 <= (-3.3d+115)) .or. (.not. (a <= 1.02d-65))) 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;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -3.3e+115) || !(a <= 1.02e-65)) {
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]) def code(x, y, z, t, a, b): tmp = 0 if (a <= -3.3e+115) or not (a <= 1.02e-65): 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]) function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -3.3e+115) || !(a <= 1.02e-65)) 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])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if ((a <= -3.3e+115) || ~((a <= 1.02e-65)))
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. code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -3.3e+115], N[Not[LessEqual[a, 1.02e-65]], $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])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.3 \cdot 10^{+115} \lor \neg \left(a \leq 1.02 \cdot 10^{-65}\right):\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if a < -3.30000000000000005e115 or 1.02000000000000004e-65 < a Initial program 92.7%
sub-neg92.7%
sub-neg92.7%
associate-*l*93.5%
associate-*l*94.3%
Simplified94.3%
Taylor expanded in a around inf 54.7%
if -3.30000000000000005e115 < a < 1.02000000000000004e-65Initial program 93.5%
sub-neg93.5%
sub-neg93.5%
associate-*l*95.4%
associate-*l*95.4%
Simplified95.4%
Taylor expanded in x around inf 39.6%
Final simplification46.9%
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 -3.65e+115) (* 27.0 (* a b)) (if (<= a 1e-65) (* x 2.0) (* a (* 27.0 b)))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -3.65e+115) {
tmp = 27.0 * (a * b);
} else if (a <= 1e-65) {
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.
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 <= (-3.65d+115)) then
tmp = 27.0d0 * (a * b)
else if (a <= 1d-65) 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;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -3.65e+115) {
tmp = 27.0 * (a * b);
} else if (a <= 1e-65) {
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]) def code(x, y, z, t, a, b): tmp = 0 if a <= -3.65e+115: tmp = 27.0 * (a * b) elif a <= 1e-65: 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]) function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -3.65e+115) tmp = Float64(27.0 * Float64(a * b)); elseif (a <= 1e-65) 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])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (a <= -3.65e+115)
tmp = 27.0 * (a * b);
elseif (a <= 1e-65)
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. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -3.65e+115], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1e-65], 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])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.65 \cdot 10^{+115}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;a \leq 10^{-65}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\end{array}
\end{array}
if a < -3.64999999999999984e115Initial program 90.6%
sub-neg90.6%
sub-neg90.6%
associate-*l*90.7%
associate-*l*92.9%
Simplified92.9%
Taylor expanded in a around inf 65.1%
if -3.64999999999999984e115 < a < 9.99999999999999923e-66Initial program 93.5%
sub-neg93.5%
sub-neg93.5%
associate-*l*95.4%
associate-*l*95.4%
Simplified95.4%
Taylor expanded in x around inf 39.6%
if 9.99999999999999923e-66 < a Initial program 93.8%
sub-neg93.8%
sub-neg93.8%
associate-*l*94.9%
associate-*l*95.0%
Simplified95.0%
Taylor expanded in a around inf 49.3%
associate-*r*49.3%
*-commutative49.3%
associate-*r*49.4%
Simplified49.4%
Final simplification46.9%
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);
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.
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;
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]) 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]) 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])){:}
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. 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 \cdot 2
\end{array}
Initial program 93.1%
sub-neg93.1%
sub-neg93.1%
associate-*l*94.5%
associate-*l*94.9%
Simplified94.9%
Taylor expanded in x around inf 29.1%
Final simplification29.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 2024081
(FPCore (x y z t a b)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, A"
:precision binary64
:alt
(if (< y 7.590524218811189e-161) (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* a (* 27.0 b))) (+ (- (* x 2.0) (* 9.0 (* y (* t z)))) (* (* a 27.0) b)))
(+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))