
(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 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * 2.0d0) - (((y * 9.0d0) * z) * t)) + ((a * 27.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
def code(x, y, z, t, a, b): return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + Float64(Float64(a * 27.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b
\end{array}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (* a 27.0))))
(if (<= z 5e+73)
(- (+ t_1 (* x 2.0)) (* y (* 9.0 (* z t))))
(* t (- (/ t_1 t) (* z (* y 9.0)))))))assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a * 27.0);
double tmp;
if (z <= 5e+73) {
tmp = (t_1 + (x * 2.0)) - (y * (9.0 * (z * t)));
} else {
tmp = t * ((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.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = b * (a * 27.0d0)
if (z <= 5d+73) then
tmp = (t_1 + (x * 2.0d0)) - (y * (9.0d0 * (z * t)))
else
tmp = t * ((t_1 / t) - (z * (y * 9.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a * 27.0);
double tmp;
if (z <= 5e+73) {
tmp = (t_1 + (x * 2.0)) - (y * (9.0 * (z * t)));
} else {
tmp = t * ((t_1 / t) - (z * (y * 9.0)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = b * (a * 27.0) tmp = 0 if z <= 5e+73: tmp = (t_1 + (x * 2.0)) - (y * (9.0 * (z * t))) else: tmp = t * ((t_1 / t) - (z * (y * 9.0))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a * 27.0)) tmp = 0.0 if (z <= 5e+73) tmp = Float64(Float64(t_1 + Float64(x * 2.0)) - Float64(y * Float64(9.0 * Float64(z * t)))); else tmp = Float64(t * Float64(Float64(t_1 / t) - Float64(z * Float64(y * 9.0)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = b * (a * 27.0);
tmp = 0.0;
if (z <= 5e+73)
tmp = (t_1 + (x * 2.0)) - (y * (9.0 * (z * t)));
else
tmp = t * ((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.
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[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, 5e+73], N[(N[(t$95$1 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] - N[(y * N[(9.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(t$95$1 / t), $MachinePrecision] - 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])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := b \cdot \left(a \cdot 27\right)\\
\mathbf{if}\;z \leq 5 \cdot 10^{+73}:\\
\;\;\;\;\left(t\_1 + x \cdot 2\right) - y \cdot \left(9 \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\frac{t\_1}{t} - z \cdot \left(y \cdot 9\right)\right)\\
\end{array}
\end{array}
if z < 4.99999999999999976e73Initial program 97.4%
+-commutative97.4%
associate-+r-97.4%
*-commutative97.4%
cancel-sign-sub-inv97.4%
associate-*r*91.2%
distribute-lft-neg-in91.2%
*-commutative91.2%
cancel-sign-sub-inv91.2%
associate-+r-91.2%
associate-*l*92.1%
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*98.3%
associate-*l*98.3%
neg-mul-198.3%
associate-*r*98.3%
Simplified98.3%
fma-undefine98.3%
fma-undefine98.3%
associate-+r+98.3%
*-commutative98.3%
associate-*l*97.3%
*-commutative97.3%
associate-*r*96.8%
*-commutative96.8%
*-commutative96.8%
associate-*r*97.3%
associate-*l*97.3%
metadata-eval97.3%
distribute-lft-neg-in97.3%
*-commutative97.3%
distribute-rgt-neg-in97.3%
*-commutative97.3%
associate-+r+97.3%
sub-neg97.3%
Applied egg-rr96.4%
if 4.99999999999999976e73 < z Initial program 95.7%
sub-neg95.7%
sub-neg95.7%
associate-*l*88.0%
associate-*l*88.0%
Simplified88.0%
Taylor expanded in x around 0 84.9%
Taylor expanded in t around inf 83.1%
associate-*r/83.1%
associate-*r*83.1%
*-commutative83.1%
*-commutative83.1%
*-commutative83.1%
associate-*r*83.1%
Simplified83.1%
Final simplification93.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 (<= t -2.9e-31)
(* t (* z (* y -9.0)))
(if (<= t 2.5e-15)
(+ (* x 2.0) (* 27.0 (* b a)))
(if (<= t 1.15e+108)
(- (* x 2.0) (* 9.0 (* t (* z y))))
(* t (- (/ (* b (* a 27.0)) t) (* z (* y 9.0))))))))assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.9e-31) {
tmp = t * (z * (y * -9.0));
} else if (t <= 2.5e-15) {
tmp = (x * 2.0) + (27.0 * (b * a));
} else if (t <= 1.15e+108) {
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
} else {
tmp = t * (((b * (a * 27.0)) / t) - (z * (y * 9.0)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-2.9d-31)) then
tmp = t * (z * (y * (-9.0d0)))
else if (t <= 2.5d-15) then
tmp = (x * 2.0d0) + (27.0d0 * (b * a))
else if (t <= 1.15d+108) then
tmp = (x * 2.0d0) - (9.0d0 * (t * (z * y)))
else
tmp = t * (((b * (a * 27.0d0)) / t) - (z * (y * 9.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.9e-31) {
tmp = t * (z * (y * -9.0));
} else if (t <= 2.5e-15) {
tmp = (x * 2.0) + (27.0 * (b * a));
} else if (t <= 1.15e+108) {
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
} else {
tmp = t * (((b * (a * 27.0)) / t) - (z * (y * 9.0)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if t <= -2.9e-31: tmp = t * (z * (y * -9.0)) elif t <= 2.5e-15: tmp = (x * 2.0) + (27.0 * (b * a)) elif t <= 1.15e+108: tmp = (x * 2.0) - (9.0 * (t * (z * y))) else: tmp = t * (((b * (a * 27.0)) / t) - (z * (y * 9.0))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -2.9e-31) tmp = Float64(t * Float64(z * Float64(y * -9.0))); elseif (t <= 2.5e-15) tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(b * a))); elseif (t <= 1.15e+108) tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(t * Float64(z * y)))); else tmp = Float64(t * Float64(Float64(Float64(b * Float64(a * 27.0)) / t) - Float64(z * Float64(y * 9.0)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (t <= -2.9e-31)
tmp = t * (z * (y * -9.0));
elseif (t <= 2.5e-15)
tmp = (x * 2.0) + (27.0 * (b * a));
elseif (t <= 1.15e+108)
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
else
tmp = t * (((b * (a * 27.0)) / t) - (z * (y * 9.0)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2.9e-31], N[(t * N[(z * N[(y * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.5e-15], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(b * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.15e+108], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] - 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])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.9 \cdot 10^{-31}:\\
\;\;\;\;t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{-15}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(b \cdot a\right)\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{+108}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\frac{b \cdot \left(a \cdot 27\right)}{t} - z \cdot \left(y \cdot 9\right)\right)\\
\end{array}
\end{array}
if t < -2.9000000000000001e-31Initial program 95.8%
sub-neg95.8%
sub-neg95.8%
associate-*l*92.5%
associate-*l*93.8%
Simplified93.8%
Taylor expanded in x around 0 80.6%
Taylor expanded in t around inf 79.2%
associate-*r/79.3%
associate-*r*79.3%
*-commutative79.3%
*-commutative79.3%
*-commutative79.3%
associate-*r*79.3%
Simplified79.3%
Taylor expanded in b around 0 56.2%
associate-*r*56.2%
*-commutative56.2%
*-commutative56.2%
Simplified56.2%
if -2.9000000000000001e-31 < t < 2.5e-15Initial program 98.9%
+-commutative98.9%
associate-+r-98.9%
*-commutative98.9%
cancel-sign-sub-inv98.9%
associate-*r*98.9%
distribute-lft-neg-in98.9%
*-commutative98.9%
cancel-sign-sub-inv98.9%
associate-+r-98.9%
associate-*l*98.9%
fma-define98.9%
cancel-sign-sub-inv98.9%
fma-define98.9%
distribute-lft-neg-in98.9%
distribute-rgt-neg-in98.9%
*-commutative98.9%
associate-*r*98.9%
associate-*l*99.0%
neg-mul-199.0%
associate-*r*99.0%
Simplified99.0%
Taylor expanded in t around 0 88.5%
if 2.5e-15 < t < 1.1499999999999999e108Initial program 99.9%
sub-neg99.9%
sub-neg99.9%
associate-*l*96.1%
associate-*l*96.1%
Simplified96.1%
Taylor expanded in a around 0 70.2%
if 1.1499999999999999e108 < t Initial program 92.8%
sub-neg92.8%
sub-neg92.8%
associate-*l*85.9%
associate-*l*88.0%
Simplified88.0%
Taylor expanded in x around 0 83.3%
Taylor expanded in t around inf 88.0%
associate-*r/88.0%
associate-*r*85.9%
*-commutative85.9%
*-commutative85.9%
*-commutative85.9%
associate-*r*85.9%
Simplified85.9%
Final simplification76.8%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* 9.0 (* t (* z y)))) (t_2 (* 27.0 (* b a))))
(if (<= t -3.25e-31)
(* t (* z (* y -9.0)))
(if (<= t 5.4e-18)
(+ (* x 2.0) t_2)
(if (<= t 2e+108) (- (* x 2.0) t_1) (- t_2 t_1))))))assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 9.0 * (t * (z * y));
double t_2 = 27.0 * (b * a);
double tmp;
if (t <= -3.25e-31) {
tmp = t * (z * (y * -9.0));
} else if (t <= 5.4e-18) {
tmp = (x * 2.0) + t_2;
} else if (t <= 2e+108) {
tmp = (x * 2.0) - t_1;
} else {
tmp = t_2 - t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 9.0d0 * (t * (z * y))
t_2 = 27.0d0 * (b * a)
if (t <= (-3.25d-31)) then
tmp = t * (z * (y * (-9.0d0)))
else if (t <= 5.4d-18) then
tmp = (x * 2.0d0) + t_2
else if (t <= 2d+108) then
tmp = (x * 2.0d0) - t_1
else
tmp = t_2 - t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 9.0 * (t * (z * y));
double t_2 = 27.0 * (b * a);
double tmp;
if (t <= -3.25e-31) {
tmp = t * (z * (y * -9.0));
} else if (t <= 5.4e-18) {
tmp = (x * 2.0) + t_2;
} else if (t <= 2e+108) {
tmp = (x * 2.0) - t_1;
} else {
tmp = t_2 - t_1;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = 9.0 * (t * (z * y)) t_2 = 27.0 * (b * a) tmp = 0 if t <= -3.25e-31: tmp = t * (z * (y * -9.0)) elif t <= 5.4e-18: tmp = (x * 2.0) + t_2 elif t <= 2e+108: tmp = (x * 2.0) - t_1 else: tmp = t_2 - t_1 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(9.0 * Float64(t * Float64(z * y))) t_2 = Float64(27.0 * Float64(b * a)) tmp = 0.0 if (t <= -3.25e-31) tmp = Float64(t * Float64(z * Float64(y * -9.0))); elseif (t <= 5.4e-18) tmp = Float64(Float64(x * 2.0) + t_2); elseif (t <= 2e+108) tmp = Float64(Float64(x * 2.0) - t_1); else tmp = Float64(t_2 - t_1); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = 9.0 * (t * (z * y));
t_2 = 27.0 * (b * a);
tmp = 0.0;
if (t <= -3.25e-31)
tmp = t * (z * (y * -9.0));
elseif (t <= 5.4e-18)
tmp = (x * 2.0) + t_2;
elseif (t <= 2e+108)
tmp = (x * 2.0) - t_1;
else
tmp = t_2 - t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(27.0 * N[(b * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.25e-31], N[(t * N[(z * N[(y * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.4e-18], N[(N[(x * 2.0), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[t, 2e+108], N[(N[(x * 2.0), $MachinePrecision] - t$95$1), $MachinePrecision], N[(t$95$2 - t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := 9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
t_2 := 27 \cdot \left(b \cdot a\right)\\
\mathbf{if}\;t \leq -3.25 \cdot 10^{-31}:\\
\;\;\;\;t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\
\mathbf{elif}\;t \leq 5.4 \cdot 10^{-18}:\\
\;\;\;\;x \cdot 2 + t\_2\\
\mathbf{elif}\;t \leq 2 \cdot 10^{+108}:\\
\;\;\;\;x \cdot 2 - t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2 - t\_1\\
\end{array}
\end{array}
if t < -3.24999999999999983e-31Initial program 95.8%
sub-neg95.8%
sub-neg95.8%
associate-*l*92.5%
associate-*l*93.8%
Simplified93.8%
Taylor expanded in x around 0 80.6%
Taylor expanded in t around inf 79.2%
associate-*r/79.3%
associate-*r*79.3%
*-commutative79.3%
*-commutative79.3%
*-commutative79.3%
associate-*r*79.3%
Simplified79.3%
Taylor expanded in b around 0 56.2%
associate-*r*56.2%
*-commutative56.2%
*-commutative56.2%
Simplified56.2%
if -3.24999999999999983e-31 < t < 5.39999999999999977e-18Initial program 98.9%
+-commutative98.9%
associate-+r-98.9%
*-commutative98.9%
cancel-sign-sub-inv98.9%
associate-*r*98.9%
distribute-lft-neg-in98.9%
*-commutative98.9%
cancel-sign-sub-inv98.9%
associate-+r-98.9%
associate-*l*98.9%
fma-define98.9%
cancel-sign-sub-inv98.9%
fma-define98.9%
distribute-lft-neg-in98.9%
distribute-rgt-neg-in98.9%
*-commutative98.9%
associate-*r*98.9%
associate-*l*99.0%
neg-mul-199.0%
associate-*r*99.0%
Simplified99.0%
Taylor expanded in t around 0 88.5%
if 5.39999999999999977e-18 < t < 2.0000000000000001e108Initial program 99.9%
sub-neg99.9%
sub-neg99.9%
associate-*l*96.1%
associate-*l*96.1%
Simplified96.1%
Taylor expanded in a around 0 70.2%
if 2.0000000000000001e108 < t Initial program 92.8%
sub-neg92.8%
sub-neg92.8%
associate-*l*85.9%
associate-*l*88.0%
Simplified88.0%
Taylor expanded in x around 0 83.3%
Final simplification76.4%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* 27.0 (* b a))))
(if (<= z -70000000000000.0)
(* y (* z (* t -9.0)))
(if (<= z -2.25e-244)
t_1
(if (<= z 7.5e-136)
(* x 2.0)
(if (<= z 1.7e-72) t_1 (* 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 t_1 = 27.0 * (b * a);
double tmp;
if (z <= -70000000000000.0) {
tmp = y * (z * (t * -9.0));
} else if (z <= -2.25e-244) {
tmp = t_1;
} else if (z <= 7.5e-136) {
tmp = x * 2.0;
} else if (z <= 1.7e-72) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = 27.0d0 * (b * a)
if (z <= (-70000000000000.0d0)) then
tmp = y * (z * (t * (-9.0d0)))
else if (z <= (-2.25d-244)) then
tmp = t_1
else if (z <= 7.5d-136) then
tmp = x * 2.0d0
else if (z <= 1.7d-72) then
tmp = t_1
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 t_1 = 27.0 * (b * a);
double tmp;
if (z <= -70000000000000.0) {
tmp = y * (z * (t * -9.0));
} else if (z <= -2.25e-244) {
tmp = t_1;
} else if (z <= 7.5e-136) {
tmp = x * 2.0;
} else if (z <= 1.7e-72) {
tmp = t_1;
} 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): t_1 = 27.0 * (b * a) tmp = 0 if z <= -70000000000000.0: tmp = y * (z * (t * -9.0)) elif z <= -2.25e-244: tmp = t_1 elif z <= 7.5e-136: tmp = x * 2.0 elif z <= 1.7e-72: tmp = t_1 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) t_1 = Float64(27.0 * Float64(b * a)) tmp = 0.0 if (z <= -70000000000000.0) tmp = Float64(y * Float64(z * Float64(t * -9.0))); elseif (z <= -2.25e-244) tmp = t_1; elseif (z <= 7.5e-136) tmp = Float64(x * 2.0); elseif (z <= 1.7e-72) tmp = t_1; 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)
t_1 = 27.0 * (b * a);
tmp = 0.0;
if (z <= -70000000000000.0)
tmp = y * (z * (t * -9.0));
elseif (z <= -2.25e-244)
tmp = t_1;
elseif (z <= 7.5e-136)
tmp = x * 2.0;
elseif (z <= 1.7e-72)
tmp = t_1;
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_] := Block[{t$95$1 = N[(27.0 * N[(b * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -70000000000000.0], N[(y * N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.25e-244], t$95$1, If[LessEqual[z, 7.5e-136], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 1.7e-72], t$95$1, 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}
t_1 := 27 \cdot \left(b \cdot a\right)\\
\mathbf{if}\;z \leq -70000000000000:\\
\;\;\;\;y \cdot \left(z \cdot \left(t \cdot -9\right)\right)\\
\mathbf{elif}\;z \leq -2.25 \cdot 10^{-244}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{-136}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{-72}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\
\end{array}
\end{array}
if z < -7e13Initial program 96.5%
+-commutative96.5%
associate-+r-96.5%
*-commutative96.5%
cancel-sign-sub-inv96.5%
associate-*r*98.1%
distribute-lft-neg-in98.1%
*-commutative98.1%
cancel-sign-sub-inv98.1%
associate-+r-98.1%
associate-*l*98.2%
fma-define98.2%
cancel-sign-sub-inv98.2%
fma-define98.2%
distribute-lft-neg-in98.2%
distribute-rgt-neg-in98.2%
*-commutative98.2%
associate-*r*96.6%
associate-*l*96.6%
neg-mul-196.6%
associate-*r*96.6%
Simplified96.6%
fma-undefine96.6%
fma-undefine96.6%
associate-+r+96.6%
*-commutative96.6%
associate-*l*95.4%
*-commutative95.4%
associate-*r*95.4%
*-commutative95.4%
*-commutative95.4%
associate-*r*95.4%
associate-*l*95.4%
metadata-eval95.4%
distribute-lft-neg-in95.4%
*-commutative95.4%
distribute-rgt-neg-in95.4%
*-commutative95.4%
associate-+r+95.4%
sub-neg95.4%
Applied egg-rr95.4%
Taylor expanded in y around inf 48.6%
*-commutative48.6%
associate-*r*45.8%
*-commutative45.8%
Simplified45.8%
associate-*r*45.9%
metadata-eval45.9%
distribute-lft-neg-in45.9%
*-commutative45.9%
distribute-rgt-neg-in45.9%
metadata-eval45.9%
associate-*r*45.9%
associate-*l*45.9%
pow145.9%
*-commutative45.9%
*-commutative45.9%
Applied egg-rr45.9%
unpow145.9%
Simplified45.9%
if -7e13 < z < -2.2500000000000001e-244 or 7.5000000000000003e-136 < z < 1.6999999999999999e-72Initial program 97.2%
+-commutative97.2%
associate-+r-97.2%
*-commutative97.2%
cancel-sign-sub-inv97.2%
associate-*r*89.7%
distribute-lft-neg-in89.7%
*-commutative89.7%
cancel-sign-sub-inv89.7%
associate-+r-89.7%
associate-*l*92.1%
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*99.6%
associate-*l*99.7%
neg-mul-199.7%
associate-*r*99.7%
Simplified99.7%
Taylor expanded in a around inf 50.8%
if -2.2500000000000001e-244 < z < 7.5000000000000003e-136Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
associate-*r*80.3%
distribute-lft-neg-in80.3%
*-commutative80.3%
cancel-sign-sub-inv80.3%
associate-+r-80.3%
associate-*l*80.3%
fma-define80.3%
cancel-sign-sub-inv80.3%
fma-define80.3%
distribute-lft-neg-in80.3%
distribute-rgt-neg-in80.3%
*-commutative80.3%
associate-*r*99.8%
associate-*l*99.8%
neg-mul-199.8%
associate-*r*99.8%
Simplified99.8%
Taylor expanded in t around 0 71.7%
Taylor expanded in x around inf 48.5%
if 1.6999999999999999e-72 < z Initial program 96.2%
+-commutative96.2%
associate-+r-96.2%
*-commutative96.2%
cancel-sign-sub-inv96.2%
associate-*r*95.1%
distribute-lft-neg-in95.1%
*-commutative95.1%
cancel-sign-sub-inv95.1%
associate-+r-95.1%
associate-*l*95.1%
fma-define95.1%
cancel-sign-sub-inv95.1%
fma-define95.1%
distribute-lft-neg-in95.1%
distribute-rgt-neg-in95.1%
*-commutative95.1%
associate-*r*96.2%
associate-*l*96.2%
neg-mul-196.2%
associate-*r*96.2%
Simplified96.2%
Taylor expanded in t around inf 48.8%
*-commutative48.8%
associate-*r*48.8%
associate-*l*48.8%
Simplified48.8%
Final simplification48.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 (<= z -1.05e+15)
(* -9.0 (* y (* z t)))
(if (<= z -4.5e-245)
t_1
(if (<= z 1.4e-135)
(* x 2.0)
(if (<= z 2.15e-72) t_1 (* 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 t_1 = 27.0 * (b * a);
double tmp;
if (z <= -1.05e+15) {
tmp = -9.0 * (y * (z * t));
} else if (z <= -4.5e-245) {
tmp = t_1;
} else if (z <= 1.4e-135) {
tmp = x * 2.0;
} else if (z <= 2.15e-72) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = 27.0d0 * (b * a)
if (z <= (-1.05d+15)) then
tmp = (-9.0d0) * (y * (z * t))
else if (z <= (-4.5d-245)) then
tmp = t_1
else if (z <= 1.4d-135) then
tmp = x * 2.0d0
else if (z <= 2.15d-72) then
tmp = t_1
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 t_1 = 27.0 * (b * a);
double tmp;
if (z <= -1.05e+15) {
tmp = -9.0 * (y * (z * t));
} else if (z <= -4.5e-245) {
tmp = t_1;
} else if (z <= 1.4e-135) {
tmp = x * 2.0;
} else if (z <= 2.15e-72) {
tmp = t_1;
} 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): t_1 = 27.0 * (b * a) tmp = 0 if z <= -1.05e+15: tmp = -9.0 * (y * (z * t)) elif z <= -4.5e-245: tmp = t_1 elif z <= 1.4e-135: tmp = x * 2.0 elif z <= 2.15e-72: tmp = t_1 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) t_1 = Float64(27.0 * Float64(b * a)) tmp = 0.0 if (z <= -1.05e+15) tmp = Float64(-9.0 * Float64(y * Float64(z * t))); elseif (z <= -4.5e-245) tmp = t_1; elseif (z <= 1.4e-135) tmp = Float64(x * 2.0); elseif (z <= 2.15e-72) tmp = t_1; 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)
t_1 = 27.0 * (b * a);
tmp = 0.0;
if (z <= -1.05e+15)
tmp = -9.0 * (y * (z * t));
elseif (z <= -4.5e-245)
tmp = t_1;
elseif (z <= 1.4e-135)
tmp = x * 2.0;
elseif (z <= 2.15e-72)
tmp = t_1;
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_] := Block[{t$95$1 = N[(27.0 * N[(b * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.05e+15], N[(-9.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.5e-245], t$95$1, If[LessEqual[z, 1.4e-135], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 2.15e-72], t$95$1, 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}
t_1 := 27 \cdot \left(b \cdot a\right)\\
\mathbf{if}\;z \leq -1.05 \cdot 10^{+15}:\\
\;\;\;\;-9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\
\mathbf{elif}\;z \leq -4.5 \cdot 10^{-245}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-135}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;z \leq 2.15 \cdot 10^{-72}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\
\end{array}
\end{array}
if z < -1.05e15Initial program 96.5%
+-commutative96.5%
associate-+r-96.5%
*-commutative96.5%
cancel-sign-sub-inv96.5%
associate-*r*98.1%
distribute-lft-neg-in98.1%
*-commutative98.1%
cancel-sign-sub-inv98.1%
associate-+r-98.1%
associate-*l*98.2%
fma-define98.2%
cancel-sign-sub-inv98.2%
fma-define98.2%
distribute-lft-neg-in98.2%
distribute-rgt-neg-in98.2%
*-commutative98.2%
associate-*r*96.6%
associate-*l*96.6%
neg-mul-196.6%
associate-*r*96.6%
Simplified96.6%
fma-undefine96.6%
fma-undefine96.6%
associate-+r+96.6%
*-commutative96.6%
associate-*l*95.4%
*-commutative95.4%
associate-*r*95.4%
*-commutative95.4%
*-commutative95.4%
associate-*r*95.4%
associate-*l*95.4%
metadata-eval95.4%
distribute-lft-neg-in95.4%
*-commutative95.4%
distribute-rgt-neg-in95.4%
*-commutative95.4%
associate-+r+95.4%
sub-neg95.4%
Applied egg-rr95.4%
Taylor expanded in y around inf 48.6%
*-commutative48.6%
associate-*r*45.8%
*-commutative45.8%
Simplified45.8%
if -1.05e15 < z < -4.49999999999999969e-245 or 1.40000000000000012e-135 < z < 2.1499999999999999e-72Initial program 97.2%
+-commutative97.2%
associate-+r-97.2%
*-commutative97.2%
cancel-sign-sub-inv97.2%
associate-*r*89.8%
distribute-lft-neg-in89.8%
*-commutative89.8%
cancel-sign-sub-inv89.8%
associate-+r-89.8%
associate-*l*92.2%
fma-define92.2%
cancel-sign-sub-inv92.2%
fma-define92.2%
distribute-lft-neg-in92.2%
distribute-rgt-neg-in92.2%
*-commutative92.2%
associate-*r*99.6%
associate-*l*99.7%
neg-mul-199.7%
associate-*r*99.7%
Simplified99.7%
Taylor expanded in a around inf 51.4%
if -4.49999999999999969e-245 < z < 1.40000000000000012e-135Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
associate-*r*79.8%
distribute-lft-neg-in79.8%
*-commutative79.8%
cancel-sign-sub-inv79.8%
associate-+r-79.8%
associate-*l*79.8%
fma-define79.8%
cancel-sign-sub-inv79.8%
fma-define79.8%
distribute-lft-neg-in79.8%
distribute-rgt-neg-in79.8%
*-commutative79.8%
associate-*r*99.9%
associate-*l*99.9%
neg-mul-199.9%
associate-*r*99.9%
Simplified99.9%
Taylor expanded in t around 0 70.9%
Taylor expanded in x around inf 49.8%
if 2.1499999999999999e-72 < z Initial program 96.2%
+-commutative96.2%
associate-+r-96.2%
*-commutative96.2%
cancel-sign-sub-inv96.2%
associate-*r*95.1%
distribute-lft-neg-in95.1%
*-commutative95.1%
cancel-sign-sub-inv95.1%
associate-+r-95.1%
associate-*l*95.1%
fma-define95.1%
cancel-sign-sub-inv95.1%
fma-define95.1%
distribute-lft-neg-in95.1%
distribute-rgt-neg-in95.1%
*-commutative95.1%
associate-*r*96.2%
associate-*l*96.2%
neg-mul-196.2%
associate-*r*96.2%
Simplified96.2%
Taylor expanded in t around inf 48.8%
*-commutative48.8%
associate-*r*48.8%
associate-*l*48.8%
Simplified48.8%
Final simplification49.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
(let* ((t_1 (* 27.0 (* b a))))
(if (<= z -2.65e+14)
(* -9.0 (* y (* z t)))
(if (<= z -2.6e-246)
t_1
(if (<= z 2.2e-134)
(* x 2.0)
(if (<= z 1.3e-72) t_1 (* -9.0 (* t (* z y)))))))))assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 27.0 * (b * a);
double tmp;
if (z <= -2.65e+14) {
tmp = -9.0 * (y * (z * t));
} else if (z <= -2.6e-246) {
tmp = t_1;
} else if (z <= 2.2e-134) {
tmp = x * 2.0;
} else if (z <= 1.3e-72) {
tmp = t_1;
} else {
tmp = -9.0 * (t * (z * y));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = 27.0d0 * (b * a)
if (z <= (-2.65d+14)) then
tmp = (-9.0d0) * (y * (z * t))
else if (z <= (-2.6d-246)) then
tmp = t_1
else if (z <= 2.2d-134) then
tmp = x * 2.0d0
else if (z <= 1.3d-72) then
tmp = t_1
else
tmp = (-9.0d0) * (t * (z * y))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 27.0 * (b * a);
double tmp;
if (z <= -2.65e+14) {
tmp = -9.0 * (y * (z * t));
} else if (z <= -2.6e-246) {
tmp = t_1;
} else if (z <= 2.2e-134) {
tmp = x * 2.0;
} else if (z <= 1.3e-72) {
tmp = t_1;
} else {
tmp = -9.0 * (t * (z * y));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = 27.0 * (b * a) tmp = 0 if z <= -2.65e+14: tmp = -9.0 * (y * (z * t)) elif z <= -2.6e-246: tmp = t_1 elif z <= 2.2e-134: tmp = x * 2.0 elif z <= 1.3e-72: tmp = t_1 else: tmp = -9.0 * (t * (z * y)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(27.0 * Float64(b * a)) tmp = 0.0 if (z <= -2.65e+14) tmp = Float64(-9.0 * Float64(y * Float64(z * t))); elseif (z <= -2.6e-246) tmp = t_1; elseif (z <= 2.2e-134) tmp = Float64(x * 2.0); elseif (z <= 1.3e-72) tmp = t_1; else tmp = Float64(-9.0 * Float64(t * Float64(z * y))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = 27.0 * (b * a);
tmp = 0.0;
if (z <= -2.65e+14)
tmp = -9.0 * (y * (z * t));
elseif (z <= -2.6e-246)
tmp = t_1;
elseif (z <= 2.2e-134)
tmp = x * 2.0;
elseif (z <= 1.3e-72)
tmp = t_1;
else
tmp = -9.0 * (t * (z * y));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(27.0 * N[(b * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.65e+14], N[(-9.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.6e-246], t$95$1, If[LessEqual[z, 2.2e-134], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 1.3e-72], t$95$1, N[(-9.0 * N[(t * N[(z * y), $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}\;z \leq -2.65 \cdot 10^{+14}:\\
\;\;\;\;-9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{-246}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-134}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-72}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\end{array}
\end{array}
if z < -2.65e14Initial program 96.5%
+-commutative96.5%
associate-+r-96.5%
*-commutative96.5%
cancel-sign-sub-inv96.5%
associate-*r*98.1%
distribute-lft-neg-in98.1%
*-commutative98.1%
cancel-sign-sub-inv98.1%
associate-+r-98.1%
associate-*l*98.2%
fma-define98.2%
cancel-sign-sub-inv98.2%
fma-define98.2%
distribute-lft-neg-in98.2%
distribute-rgt-neg-in98.2%
*-commutative98.2%
associate-*r*96.6%
associate-*l*96.6%
neg-mul-196.6%
associate-*r*96.6%
Simplified96.6%
fma-undefine96.6%
fma-undefine96.6%
associate-+r+96.6%
*-commutative96.6%
associate-*l*95.4%
*-commutative95.4%
associate-*r*95.4%
*-commutative95.4%
*-commutative95.4%
associate-*r*95.4%
associate-*l*95.4%
metadata-eval95.4%
distribute-lft-neg-in95.4%
*-commutative95.4%
distribute-rgt-neg-in95.4%
*-commutative95.4%
associate-+r+95.4%
sub-neg95.4%
Applied egg-rr95.4%
Taylor expanded in y around inf 48.6%
*-commutative48.6%
associate-*r*45.8%
*-commutative45.8%
Simplified45.8%
if -2.65e14 < z < -2.5999999999999999e-246 or 2.2e-134 < z < 1.29999999999999998e-72Initial program 97.2%
+-commutative97.2%
associate-+r-97.2%
*-commutative97.2%
cancel-sign-sub-inv97.2%
associate-*r*89.8%
distribute-lft-neg-in89.8%
*-commutative89.8%
cancel-sign-sub-inv89.8%
associate-+r-89.8%
associate-*l*92.2%
fma-define92.2%
cancel-sign-sub-inv92.2%
fma-define92.2%
distribute-lft-neg-in92.2%
distribute-rgt-neg-in92.2%
*-commutative92.2%
associate-*r*99.6%
associate-*l*99.7%
neg-mul-199.7%
associate-*r*99.7%
Simplified99.7%
Taylor expanded in a around inf 51.4%
if -2.5999999999999999e-246 < z < 2.2e-134Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
associate-*r*79.8%
distribute-lft-neg-in79.8%
*-commutative79.8%
cancel-sign-sub-inv79.8%
associate-+r-79.8%
associate-*l*79.8%
fma-define79.8%
cancel-sign-sub-inv79.8%
fma-define79.8%
distribute-lft-neg-in79.8%
distribute-rgt-neg-in79.8%
*-commutative79.8%
associate-*r*99.9%
associate-*l*99.9%
neg-mul-199.9%
associate-*r*99.9%
Simplified99.9%
Taylor expanded in t around 0 70.9%
Taylor expanded in x around inf 49.8%
if 1.29999999999999998e-72 < z Initial program 96.2%
+-commutative96.2%
associate-+r-96.2%
*-commutative96.2%
cancel-sign-sub-inv96.2%
associate-*r*95.1%
distribute-lft-neg-in95.1%
*-commutative95.1%
cancel-sign-sub-inv95.1%
associate-+r-95.1%
associate-*l*95.1%
fma-define95.1%
cancel-sign-sub-inv95.1%
fma-define95.1%
distribute-lft-neg-in95.1%
distribute-rgt-neg-in95.1%
*-commutative95.1%
associate-*r*96.2%
associate-*l*96.2%
neg-mul-196.2%
associate-*r*96.2%
Simplified96.2%
Taylor expanded in t around inf 48.8%
Final simplification49.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
(let* ((t_1 (* z (* y 9.0))) (t_2 (* b (* a 27.0))))
(if (<= t_1 1e+265)
(+ t_2 (- (* x 2.0) (* t t_1)))
(* y (+ (/ t_2 y) (* z (* t -9.0)))))))assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (y * 9.0);
double t_2 = b * (a * 27.0);
double tmp;
if (t_1 <= 1e+265) {
tmp = t_2 + ((x * 2.0) - (t * t_1));
} else {
tmp = y * ((t_2 / y) + (z * (t * -9.0)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = z * (y * 9.0d0)
t_2 = b * (a * 27.0d0)
if (t_1 <= 1d+265) then
tmp = t_2 + ((x * 2.0d0) - (t * t_1))
else
tmp = y * ((t_2 / y) + (z * (t * (-9.0d0))))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (y * 9.0);
double t_2 = b * (a * 27.0);
double tmp;
if (t_1 <= 1e+265) {
tmp = t_2 + ((x * 2.0) - (t * t_1));
} else {
tmp = y * ((t_2 / y) + (z * (t * -9.0)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = z * (y * 9.0) t_2 = b * (a * 27.0) tmp = 0 if t_1 <= 1e+265: tmp = t_2 + ((x * 2.0) - (t * t_1)) else: tmp = y * ((t_2 / y) + (z * (t * -9.0))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(y * 9.0)) t_2 = Float64(b * Float64(a * 27.0)) tmp = 0.0 if (t_1 <= 1e+265) tmp = Float64(t_2 + Float64(Float64(x * 2.0) - Float64(t * t_1))); else tmp = Float64(y * Float64(Float64(t_2 / y) + Float64(z * Float64(t * -9.0)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = z * (y * 9.0);
t_2 = b * (a * 27.0);
tmp = 0.0;
if (t_1 <= 1e+265)
tmp = t_2 + ((x * 2.0) - (t * t_1));
else
tmp = y * ((t_2 / y) + (z * (t * -9.0)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(y * 9.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 1e+265], N[(t$95$2 + N[(N[(x * 2.0), $MachinePrecision] - N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(t$95$2 / y), $MachinePrecision] + N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := z \cdot \left(y \cdot 9\right)\\
t_2 := b \cdot \left(a \cdot 27\right)\\
\mathbf{if}\;t\_1 \leq 10^{+265}:\\
\;\;\;\;t\_2 + \left(x \cdot 2 - t \cdot t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\frac{t\_2}{y} + z \cdot \left(t \cdot -9\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 y #s(literal 9 binary64)) z) < 1.00000000000000007e265Initial program 97.2%
if 1.00000000000000007e265 < (*.f64 (*.f64 y #s(literal 9 binary64)) z) Initial program 95.8%
sub-neg95.8%
sub-neg95.8%
associate-*l*92.1%
associate-*l*92.1%
Simplified92.1%
Taylor expanded in x around 0 94.1%
Taylor expanded in y around inf 94.7%
cancel-sign-sub-inv94.7%
metadata-eval94.7%
associate-*r/94.7%
associate-*r*94.7%
*-commutative94.7%
*-commutative94.7%
*-commutative94.7%
associate-*r*94.7%
Simplified94.7%
Final simplification97.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 (<= b -3e-172)
(* 27.0 (* b a))
(if (<= b 9.5e-260)
(* x 2.0)
(if (<= b 4.5e-24)
(* -9.0 (* t (* z y)))
(if (<= b 1.9e+109) (* x 2.0) (* b (* a 27.0)))))))assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -3e-172) {
tmp = 27.0 * (b * a);
} else if (b <= 9.5e-260) {
tmp = x * 2.0;
} else if (b <= 4.5e-24) {
tmp = -9.0 * (t * (z * y));
} else if (b <= 1.9e+109) {
tmp = x * 2.0;
} else {
tmp = b * (a * 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 (b <= (-3d-172)) then
tmp = 27.0d0 * (b * a)
else if (b <= 9.5d-260) then
tmp = x * 2.0d0
else if (b <= 4.5d-24) then
tmp = (-9.0d0) * (t * (z * y))
else if (b <= 1.9d+109) then
tmp = x * 2.0d0
else
tmp = b * (a * 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 (b <= -3e-172) {
tmp = 27.0 * (b * a);
} else if (b <= 9.5e-260) {
tmp = x * 2.0;
} else if (b <= 4.5e-24) {
tmp = -9.0 * (t * (z * y));
} else if (b <= 1.9e+109) {
tmp = x * 2.0;
} else {
tmp = b * (a * 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 b <= -3e-172: tmp = 27.0 * (b * a) elif b <= 9.5e-260: tmp = x * 2.0 elif b <= 4.5e-24: tmp = -9.0 * (t * (z * y)) elif b <= 1.9e+109: tmp = x * 2.0 else: tmp = b * (a * 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 (b <= -3e-172) tmp = Float64(27.0 * Float64(b * a)); elseif (b <= 9.5e-260) tmp = Float64(x * 2.0); elseif (b <= 4.5e-24) tmp = Float64(-9.0 * Float64(t * Float64(z * y))); elseif (b <= 1.9e+109) tmp = Float64(x * 2.0); else tmp = Float64(b * Float64(a * 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 (b <= -3e-172)
tmp = 27.0 * (b * a);
elseif (b <= 9.5e-260)
tmp = x * 2.0;
elseif (b <= 4.5e-24)
tmp = -9.0 * (t * (z * y));
elseif (b <= 1.9e+109)
tmp = x * 2.0;
else
tmp = 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. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -3e-172], N[(27.0 * N[(b * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 9.5e-260], N[(x * 2.0), $MachinePrecision], If[LessEqual[b, 4.5e-24], N[(-9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.9e+109], N[(x * 2.0), $MachinePrecision], N[(b * N[(a * 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}\;b \leq -3 \cdot 10^{-172}:\\
\;\;\;\;27 \cdot \left(b \cdot a\right)\\
\mathbf{elif}\;b \leq 9.5 \cdot 10^{-260}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;b \leq 4.5 \cdot 10^{-24}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\mathbf{elif}\;b \leq 1.9 \cdot 10^{+109}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\end{array}
\end{array}
if b < -2.99999999999999984e-172Initial program 96.7%
+-commutative96.7%
associate-+r-96.7%
*-commutative96.7%
cancel-sign-sub-inv96.7%
associate-*r*92.2%
distribute-lft-neg-in92.2%
*-commutative92.2%
cancel-sign-sub-inv92.2%
associate-+r-92.2%
associate-*l*92.3%
fma-define92.3%
cancel-sign-sub-inv92.3%
fma-define92.3%
distribute-lft-neg-in92.3%
distribute-rgt-neg-in92.3%
*-commutative92.3%
associate-*r*96.7%
associate-*l*96.8%
neg-mul-196.8%
associate-*r*96.8%
Simplified96.8%
Taylor expanded in a around inf 49.5%
if -2.99999999999999984e-172 < b < 9.5000000000000001e-260 or 4.4999999999999997e-24 < b < 1.90000000000000019e109Initial program 97.2%
+-commutative97.2%
associate-+r-97.2%
*-commutative97.2%
cancel-sign-sub-inv97.2%
associate-*r*89.2%
distribute-lft-neg-in89.2%
*-commutative89.2%
cancel-sign-sub-inv89.2%
associate-+r-89.2%
associate-*l*91.8%
fma-define91.9%
cancel-sign-sub-inv91.9%
fma-define91.9%
distribute-lft-neg-in91.9%
distribute-rgt-neg-in91.9%
*-commutative91.9%
associate-*r*99.9%
associate-*l*99.9%
neg-mul-199.9%
associate-*r*99.9%
Simplified99.9%
Taylor expanded in t around 0 58.1%
Taylor expanded in x around inf 46.0%
if 9.5000000000000001e-260 < b < 4.4999999999999997e-24Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
associate-*r*95.2%
distribute-lft-neg-in95.2%
*-commutative95.2%
cancel-sign-sub-inv95.2%
associate-+r-95.2%
associate-*l*95.2%
fma-define95.2%
cancel-sign-sub-inv95.2%
fma-define95.2%
distribute-lft-neg-in95.2%
distribute-rgt-neg-in95.2%
*-commutative95.2%
associate-*r*99.7%
associate-*l*99.7%
neg-mul-199.7%
associate-*r*99.7%
Simplified99.7%
Taylor expanded in t around inf 56.3%
if 1.90000000000000019e109 < b Initial program 95.3%
+-commutative95.3%
associate-+r-95.3%
*-commutative95.3%
cancel-sign-sub-inv95.3%
associate-*r*93.2%
distribute-lft-neg-in93.2%
*-commutative93.2%
cancel-sign-sub-inv93.2%
associate-+r-93.2%
associate-*l*93.2%
fma-define93.2%
cancel-sign-sub-inv93.2%
fma-define93.2%
distribute-lft-neg-in93.2%
distribute-rgt-neg-in93.2%
*-commutative93.2%
associate-*r*95.3%
associate-*l*95.3%
neg-mul-195.3%
associate-*r*95.3%
Simplified95.3%
Taylor expanded in a around inf 69.6%
*-commutative69.6%
*-commutative69.6%
associate-*r*69.7%
*-commutative69.7%
Simplified69.7%
Final simplification53.1%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (* a 27.0))))
(if (<= z -8.2e-54)
(* y (+ (/ t_1 y) (* z (* t -9.0))))
(if (<= z 4.3e-131)
(+ (* x 2.0) (* 27.0 (* b a)))
(* t (- (/ t_1 t) (* z (* y 9.0))))))))assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a * 27.0);
double tmp;
if (z <= -8.2e-54) {
tmp = y * ((t_1 / y) + (z * (t * -9.0)));
} else if (z <= 4.3e-131) {
tmp = (x * 2.0) + (27.0 * (b * a));
} else {
tmp = t * ((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.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = b * (a * 27.0d0)
if (z <= (-8.2d-54)) then
tmp = y * ((t_1 / y) + (z * (t * (-9.0d0))))
else if (z <= 4.3d-131) then
tmp = (x * 2.0d0) + (27.0d0 * (b * a))
else
tmp = t * ((t_1 / t) - (z * (y * 9.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a * 27.0);
double tmp;
if (z <= -8.2e-54) {
tmp = y * ((t_1 / y) + (z * (t * -9.0)));
} else if (z <= 4.3e-131) {
tmp = (x * 2.0) + (27.0 * (b * a));
} else {
tmp = t * ((t_1 / t) - (z * (y * 9.0)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = b * (a * 27.0) tmp = 0 if z <= -8.2e-54: tmp = y * ((t_1 / y) + (z * (t * -9.0))) elif z <= 4.3e-131: tmp = (x * 2.0) + (27.0 * (b * a)) else: tmp = t * ((t_1 / t) - (z * (y * 9.0))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a * 27.0)) tmp = 0.0 if (z <= -8.2e-54) tmp = Float64(y * Float64(Float64(t_1 / y) + Float64(z * Float64(t * -9.0)))); elseif (z <= 4.3e-131) tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(b * a))); else tmp = Float64(t * Float64(Float64(t_1 / t) - Float64(z * Float64(y * 9.0)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = b * (a * 27.0);
tmp = 0.0;
if (z <= -8.2e-54)
tmp = y * ((t_1 / y) + (z * (t * -9.0)));
elseif (z <= 4.3e-131)
tmp = (x * 2.0) + (27.0 * (b * a));
else
tmp = t * ((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.
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[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.2e-54], N[(y * N[(N[(t$95$1 / y), $MachinePrecision] + N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.3e-131], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(b * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(t$95$1 / t), $MachinePrecision] - 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])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := b \cdot \left(a \cdot 27\right)\\
\mathbf{if}\;z \leq -8.2 \cdot 10^{-54}:\\
\;\;\;\;y \cdot \left(\frac{t\_1}{y} + z \cdot \left(t \cdot -9\right)\right)\\
\mathbf{elif}\;z \leq 4.3 \cdot 10^{-131}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(b \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\frac{t\_1}{t} - z \cdot \left(y \cdot 9\right)\right)\\
\end{array}
\end{array}
if z < -8.2000000000000001e-54Initial program 96.9%
sub-neg96.9%
sub-neg96.9%
associate-*l*95.8%
associate-*l*95.9%
Simplified95.9%
Taylor expanded in x around 0 79.9%
Taylor expanded in y around inf 63.4%
cancel-sign-sub-inv63.4%
metadata-eval63.4%
associate-*r/63.5%
associate-*r*63.5%
*-commutative63.5%
*-commutative63.5%
*-commutative63.5%
associate-*r*63.5%
Simplified63.5%
if -8.2000000000000001e-54 < z < 4.30000000000000019e-131Initial program 98.7%
+-commutative98.7%
associate-+r-98.7%
*-commutative98.7%
cancel-sign-sub-inv98.7%
associate-*r*85.2%
distribute-lft-neg-in85.2%
*-commutative85.2%
cancel-sign-sub-inv85.2%
associate-+r-85.2%
associate-*l*86.2%
fma-define86.2%
cancel-sign-sub-inv86.2%
fma-define86.2%
distribute-lft-neg-in86.2%
distribute-rgt-neg-in86.2%
*-commutative86.2%
associate-*r*99.6%
associate-*l*99.7%
neg-mul-199.7%
associate-*r*99.7%
Simplified99.7%
Taylor expanded in t around 0 82.3%
if 4.30000000000000019e-131 < z Initial program 95.8%
sub-neg95.8%
sub-neg95.8%
associate-*l*91.1%
associate-*l*92.0%
Simplified92.0%
Taylor expanded in x around 0 75.0%
Taylor expanded in t around inf 71.2%
associate-*r/71.3%
associate-*r*71.2%
*-commutative71.2%
*-commutative71.2%
*-commutative71.2%
associate-*r*71.2%
Simplified71.2%
Final simplification73.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 -5e+30)
(* y (* z (* t -9.0)))
(if (<= z 4.3e-131)
(+ (* x 2.0) (* 27.0 (* b a)))
(* t (- (* 27.0 (* a (/ b t))) (* z (* y 9.0)))))))assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -5e+30) {
tmp = y * (z * (t * -9.0));
} else if (z <= 4.3e-131) {
tmp = (x * 2.0) + (27.0 * (b * a));
} else {
tmp = t * ((27.0 * (a * (b / t))) - (z * (y * 9.0)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-5d+30)) then
tmp = y * (z * (t * (-9.0d0)))
else if (z <= 4.3d-131) then
tmp = (x * 2.0d0) + (27.0d0 * (b * a))
else
tmp = t * ((27.0d0 * (a * (b / t))) - (z * (y * 9.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -5e+30) {
tmp = y * (z * (t * -9.0));
} else if (z <= 4.3e-131) {
tmp = (x * 2.0) + (27.0 * (b * a));
} else {
tmp = t * ((27.0 * (a * (b / t))) - (z * (y * 9.0)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -5e+30: tmp = y * (z * (t * -9.0)) elif z <= 4.3e-131: tmp = (x * 2.0) + (27.0 * (b * a)) else: tmp = t * ((27.0 * (a * (b / t))) - (z * (y * 9.0))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -5e+30) tmp = Float64(y * Float64(z * Float64(t * -9.0))); elseif (z <= 4.3e-131) tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(b * a))); else tmp = Float64(t * Float64(Float64(27.0 * Float64(a * Float64(b / t))) - Float64(z * Float64(y * 9.0)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -5e+30)
tmp = y * (z * (t * -9.0));
elseif (z <= 4.3e-131)
tmp = (x * 2.0) + (27.0 * (b * a));
else
tmp = t * ((27.0 * (a * (b / t))) - (z * (y * 9.0)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -5e+30], N[(y * N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.3e-131], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(b * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(27.0 * N[(a * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 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])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{+30}:\\
\;\;\;\;y \cdot \left(z \cdot \left(t \cdot -9\right)\right)\\
\mathbf{elif}\;z \leq 4.3 \cdot 10^{-131}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(b \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(27 \cdot \left(a \cdot \frac{b}{t}\right) - z \cdot \left(y \cdot 9\right)\right)\\
\end{array}
\end{array}
if z < -4.9999999999999998e30Initial program 96.4%
+-commutative96.4%
associate-+r-96.4%
*-commutative96.4%
cancel-sign-sub-inv96.4%
associate-*r*98.1%
distribute-lft-neg-in98.1%
*-commutative98.1%
cancel-sign-sub-inv98.1%
associate-+r-98.1%
associate-*l*98.1%
fma-define98.1%
cancel-sign-sub-inv98.1%
fma-define98.1%
distribute-lft-neg-in98.1%
distribute-rgt-neg-in98.1%
*-commutative98.1%
associate-*r*96.5%
associate-*l*96.5%
neg-mul-196.5%
associate-*r*96.5%
Simplified96.5%
fma-undefine96.5%
fma-undefine96.5%
associate-+r+96.5%
*-commutative96.5%
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.2%
Taylor expanded in y around inf 48.6%
*-commutative48.6%
associate-*r*45.6%
*-commutative45.6%
Simplified45.6%
associate-*r*45.7%
metadata-eval45.7%
distribute-lft-neg-in45.7%
*-commutative45.7%
distribute-rgt-neg-in45.7%
metadata-eval45.7%
associate-*r*45.7%
associate-*l*45.7%
pow145.7%
*-commutative45.7%
*-commutative45.7%
Applied egg-rr45.7%
unpow145.7%
Simplified45.7%
if -4.9999999999999998e30 < z < 4.30000000000000019e-131Initial program 98.8%
+-commutative98.8%
associate-+r-98.8%
*-commutative98.8%
cancel-sign-sub-inv98.8%
associate-*r*86.5%
distribute-lft-neg-in86.5%
*-commutative86.5%
cancel-sign-sub-inv86.5%
associate-+r-86.5%
associate-*l*87.5%
fma-define87.5%
cancel-sign-sub-inv87.5%
fma-define87.5%
distribute-lft-neg-in87.5%
distribute-rgt-neg-in87.5%
*-commutative87.5%
associate-*r*99.7%
associate-*l*99.7%
neg-mul-199.7%
associate-*r*99.7%
Simplified99.7%
Taylor expanded in t around 0 82.0%
if 4.30000000000000019e-131 < z Initial program 95.8%
sub-neg95.8%
sub-neg95.8%
associate-*l*91.1%
associate-*l*92.0%
Simplified92.0%
Taylor expanded in x around 0 75.0%
Taylor expanded in t around inf 71.2%
associate-*r/71.3%
associate-*r*71.2%
*-commutative71.2%
*-commutative71.2%
*-commutative71.2%
associate-*r*71.2%
Simplified71.2%
Taylor expanded in b around 0 71.2%
associate-/l*69.1%
Simplified69.1%
Final simplification68.7%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= z 4.6e+74) (+ (- (* x 2.0) (* (* z t) (* y 9.0))) (* a (* b 27.0))) (* t (- (/ (* b (* a 27.0)) t) (* z (* y 9.0))))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 4.6e+74) {
tmp = ((x * 2.0) - ((z * t) * (y * 9.0))) + (a * (b * 27.0));
} else {
tmp = t * (((b * (a * 27.0)) / t) - (z * (y * 9.0)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= 4.6d+74) then
tmp = ((x * 2.0d0) - ((z * t) * (y * 9.0d0))) + (a * (b * 27.0d0))
else
tmp = t * (((b * (a * 27.0d0)) / t) - (z * (y * 9.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 4.6e+74) {
tmp = ((x * 2.0) - ((z * t) * (y * 9.0))) + (a * (b * 27.0));
} else {
tmp = t * (((b * (a * 27.0)) / t) - (z * (y * 9.0)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= 4.6e+74: tmp = ((x * 2.0) - ((z * t) * (y * 9.0))) + (a * (b * 27.0)) else: tmp = t * (((b * (a * 27.0)) / t) - (z * (y * 9.0))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= 4.6e+74) tmp = Float64(Float64(Float64(x * 2.0) - Float64(Float64(z * t) * Float64(y * 9.0))) + Float64(a * Float64(b * 27.0))); else tmp = Float64(t * Float64(Float64(Float64(b * Float64(a * 27.0)) / t) - Float64(z * Float64(y * 9.0)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= 4.6e+74)
tmp = ((x * 2.0) - ((z * t) * (y * 9.0))) + (a * (b * 27.0));
else
tmp = t * (((b * (a * 27.0)) / t) - (z * (y * 9.0)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 4.6e+74], 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], N[(t * N[(N[(N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] - 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])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 4.6 \cdot 10^{+74}:\\
\;\;\;\;\left(x \cdot 2 - \left(z \cdot t\right) \cdot \left(y \cdot 9\right)\right) + a \cdot \left(b \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\frac{b \cdot \left(a \cdot 27\right)}{t} - z \cdot \left(y \cdot 9\right)\right)\\
\end{array}
\end{array}
if z < 4.5999999999999997e74Initial program 97.4%
sub-neg97.4%
sub-neg97.4%
associate-*l*96.4%
associate-*l*97.3%
Simplified97.3%
if 4.5999999999999997e74 < z Initial program 95.7%
sub-neg95.7%
sub-neg95.7%
associate-*l*88.0%
associate-*l*88.0%
Simplified88.0%
Taylor expanded in x around 0 84.9%
Taylor expanded in t around inf 83.1%
associate-*r/83.1%
associate-*r*83.1%
*-commutative83.1%
*-commutative83.1%
*-commutative83.1%
associate-*r*83.1%
Simplified83.1%
Final simplification94.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 (<= z -1.86e+28)
(* y (* z (* t -9.0)))
(if (<= z 1.16e-72)
(+ (* x 2.0) (* 27.0 (* b a)))
(- (* x 2.0) (* 9.0 (* t (* z y)))))))assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.86e+28) {
tmp = y * (z * (t * -9.0));
} else if (z <= 1.16e-72) {
tmp = (x * 2.0) + (27.0 * (b * a));
} else {
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-1.86d+28)) then
tmp = y * (z * (t * (-9.0d0)))
else if (z <= 1.16d-72) then
tmp = (x * 2.0d0) + (27.0d0 * (b * a))
else
tmp = (x * 2.0d0) - (9.0d0 * (t * (z * y)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.86e+28) {
tmp = y * (z * (t * -9.0));
} else if (z <= 1.16e-72) {
tmp = (x * 2.0) + (27.0 * (b * a));
} else {
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -1.86e+28: tmp = y * (z * (t * -9.0)) elif z <= 1.16e-72: tmp = (x * 2.0) + (27.0 * (b * a)) else: tmp = (x * 2.0) - (9.0 * (t * (z * y))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.86e+28) tmp = Float64(y * Float64(z * Float64(t * -9.0))); elseif (z <= 1.16e-72) 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(z * y)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -1.86e+28)
tmp = y * (z * (t * -9.0));
elseif (z <= 1.16e-72)
tmp = (x * 2.0) + (27.0 * (b * a));
else
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.86e+28], N[(y * N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.16e-72], 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[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.86 \cdot 10^{+28}:\\
\;\;\;\;y \cdot \left(z \cdot \left(t \cdot -9\right)\right)\\
\mathbf{elif}\;z \leq 1.16 \cdot 10^{-72}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(b \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\end{array}
\end{array}
if z < -1.86000000000000009e28Initial program 96.4%
+-commutative96.4%
associate-+r-96.4%
*-commutative96.4%
cancel-sign-sub-inv96.4%
associate-*r*98.1%
distribute-lft-neg-in98.1%
*-commutative98.1%
cancel-sign-sub-inv98.1%
associate-+r-98.1%
associate-*l*98.1%
fma-define98.1%
cancel-sign-sub-inv98.1%
fma-define98.1%
distribute-lft-neg-in98.1%
distribute-rgt-neg-in98.1%
*-commutative98.1%
associate-*r*96.5%
associate-*l*96.5%
neg-mul-196.5%
associate-*r*96.5%
Simplified96.5%
fma-undefine96.5%
fma-undefine96.5%
associate-+r+96.5%
*-commutative96.5%
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.2%
Taylor expanded in y around inf 48.6%
*-commutative48.6%
associate-*r*45.6%
*-commutative45.6%
Simplified45.6%
associate-*r*45.7%
metadata-eval45.7%
distribute-lft-neg-in45.7%
*-commutative45.7%
distribute-rgt-neg-in45.7%
metadata-eval45.7%
associate-*r*45.7%
associate-*l*45.7%
pow145.7%
*-commutative45.7%
*-commutative45.7%
Applied egg-rr45.7%
unpow145.7%
Simplified45.7%
if -1.86000000000000009e28 < z < 1.16e-72Initial program 98.1%
+-commutative98.1%
associate-+r-98.1%
*-commutative98.1%
cancel-sign-sub-inv98.1%
associate-*r*86.8%
distribute-lft-neg-in86.8%
*-commutative86.8%
cancel-sign-sub-inv86.8%
associate-+r-86.8%
associate-*l*88.4%
fma-define88.4%
cancel-sign-sub-inv88.4%
fma-define88.4%
distribute-lft-neg-in88.4%
distribute-rgt-neg-in88.4%
*-commutative88.4%
associate-*r*99.7%
associate-*l*99.7%
neg-mul-199.7%
associate-*r*99.7%
Simplified99.7%
Taylor expanded in t around 0 80.2%
if 1.16e-72 < z Initial program 96.2%
sub-neg96.2%
sub-neg96.2%
associate-*l*90.5%
associate-*l*90.5%
Simplified90.5%
Taylor expanded in a around 0 69.5%
Final simplification68.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 (<= z -2.4e+27) (* y (* z (* t -9.0))) (if (<= z 4.1e+105) (+ (* x 2.0) (* 27.0 (* b a))) (* t (* z (* y -9.0))))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.4e+27) {
tmp = y * (z * (t * -9.0));
} else if (z <= 4.1e+105) {
tmp = (x * 2.0) + (27.0 * (b * a));
} else {
tmp = t * (z * (y * -9.0));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-2.4d+27)) then
tmp = y * (z * (t * (-9.0d0)))
else if (z <= 4.1d+105) then
tmp = (x * 2.0d0) + (27.0d0 * (b * a))
else
tmp = t * (z * (y * (-9.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.4e+27) {
tmp = y * (z * (t * -9.0));
} else if (z <= 4.1e+105) {
tmp = (x * 2.0) + (27.0 * (b * a));
} else {
tmp = t * (z * (y * -9.0));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -2.4e+27: tmp = y * (z * (t * -9.0)) elif z <= 4.1e+105: tmp = (x * 2.0) + (27.0 * (b * a)) else: tmp = t * (z * (y * -9.0)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2.4e+27) tmp = Float64(y * Float64(z * Float64(t * -9.0))); elseif (z <= 4.1e+105) tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(b * a))); else tmp = Float64(t * Float64(z * Float64(y * -9.0))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -2.4e+27)
tmp = y * (z * (t * -9.0));
elseif (z <= 4.1e+105)
tmp = (x * 2.0) + (27.0 * (b * a));
else
tmp = t * (z * (y * -9.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.4e+27], N[(y * N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.1e+105], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(b * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(z * N[(y * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{+27}:\\
\;\;\;\;y \cdot \left(z \cdot \left(t \cdot -9\right)\right)\\
\mathbf{elif}\;z \leq 4.1 \cdot 10^{+105}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(b \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\
\end{array}
\end{array}
if z < -2.39999999999999998e27Initial program 96.4%
+-commutative96.4%
associate-+r-96.4%
*-commutative96.4%
cancel-sign-sub-inv96.4%
associate-*r*98.1%
distribute-lft-neg-in98.1%
*-commutative98.1%
cancel-sign-sub-inv98.1%
associate-+r-98.1%
associate-*l*98.1%
fma-define98.1%
cancel-sign-sub-inv98.1%
fma-define98.1%
distribute-lft-neg-in98.1%
distribute-rgt-neg-in98.1%
*-commutative98.1%
associate-*r*96.5%
associate-*l*96.5%
neg-mul-196.5%
associate-*r*96.5%
Simplified96.5%
fma-undefine96.5%
fma-undefine96.5%
associate-+r+96.5%
*-commutative96.5%
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.2%
Taylor expanded in y around inf 48.6%
*-commutative48.6%
associate-*r*45.6%
*-commutative45.6%
Simplified45.6%
associate-*r*45.7%
metadata-eval45.7%
distribute-lft-neg-in45.7%
*-commutative45.7%
distribute-rgt-neg-in45.7%
metadata-eval45.7%
associate-*r*45.7%
associate-*l*45.7%
pow145.7%
*-commutative45.7%
*-commutative45.7%
Applied egg-rr45.7%
unpow145.7%
Simplified45.7%
if -2.39999999999999998e27 < z < 4.1000000000000002e105Initial program 97.2%
+-commutative97.2%
associate-+r-97.2%
*-commutative97.2%
cancel-sign-sub-inv97.2%
associate-*r*88.3%
distribute-lft-neg-in88.3%
*-commutative88.3%
cancel-sign-sub-inv88.3%
associate-+r-88.3%
associate-*l*89.5%
fma-define89.5%
cancel-sign-sub-inv89.5%
fma-define89.5%
distribute-lft-neg-in89.5%
distribute-rgt-neg-in89.5%
*-commutative89.5%
associate-*r*98.4%
associate-*l*98.5%
neg-mul-198.5%
associate-*r*98.5%
Simplified98.5%
Taylor expanded in t around 0 76.2%
if 4.1000000000000002e105 < z Initial program 97.5%
sub-neg97.5%
sub-neg97.5%
associate-*l*93.2%
associate-*l*93.2%
Simplified93.2%
Taylor expanded in x around 0 87.6%
Taylor expanded in t around inf 83.1%
associate-*r/83.1%
associate-*r*83.1%
*-commutative83.1%
*-commutative83.1%
*-commutative83.1%
associate-*r*83.0%
Simplified83.0%
Taylor expanded in b around 0 62.1%
associate-*r*62.0%
*-commutative62.0%
*-commutative62.0%
Simplified62.0%
Final simplification66.9%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (or (<= b -3e-172) (not (<= b 7.2e+108))) (* 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 ((b <= -3e-172) || !(b <= 7.2e+108)) {
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 ((b <= (-3d-172)) .or. (.not. (b <= 7.2d+108))) 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 ((b <= -3e-172) || !(b <= 7.2e+108)) {
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 (b <= -3e-172) or not (b <= 7.2e+108): 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 ((b <= -3e-172) || !(b <= 7.2e+108)) 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 ((b <= -3e-172) || ~((b <= 7.2e+108)))
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[b, -3e-172], N[Not[LessEqual[b, 7.2e+108]], $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}\;b \leq -3 \cdot 10^{-172} \lor \neg \left(b \leq 7.2 \cdot 10^{+108}\right):\\
\;\;\;\;27 \cdot \left(b \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if b < -2.99999999999999984e-172 or 7.2e108 < b Initial program 96.3%
+-commutative96.3%
associate-+r-96.3%
*-commutative96.3%
cancel-sign-sub-inv96.3%
associate-*r*92.5%
distribute-lft-neg-in92.5%
*-commutative92.5%
cancel-sign-sub-inv92.5%
associate-+r-92.5%
associate-*l*92.5%
fma-define92.5%
cancel-sign-sub-inv92.5%
fma-define92.5%
distribute-lft-neg-in92.5%
distribute-rgt-neg-in92.5%
*-commutative92.5%
associate-*r*96.3%
associate-*l*96.3%
neg-mul-196.3%
associate-*r*96.3%
Simplified96.3%
Taylor expanded in a around inf 55.6%
if -2.99999999999999984e-172 < b < 7.2e108Initial program 98.2%
+-commutative98.2%
associate-+r-98.2%
*-commutative98.2%
cancel-sign-sub-inv98.2%
associate-*r*91.4%
distribute-lft-neg-in91.4%
*-commutative91.4%
cancel-sign-sub-inv91.4%
associate-+r-91.4%
associate-*l*93.1%
fma-define93.1%
cancel-sign-sub-inv93.1%
fma-define93.1%
distribute-lft-neg-in93.1%
distribute-rgt-neg-in93.1%
*-commutative93.1%
associate-*r*99.8%
associate-*l*99.8%
neg-mul-199.8%
associate-*r*99.8%
Simplified99.8%
Taylor expanded in t around 0 52.8%
Taylor expanded in x around inf 38.0%
Final simplification48.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 (<= b -3e-172) (* 27.0 (* b a)) (if (<= b 6.5e+108) (* x 2.0) (* b (* a 27.0)))))
assert(x < y && y < z && z < t && t < a && a < b);
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -3e-172) {
tmp = 27.0 * (b * a);
} else if (b <= 6.5e+108) {
tmp = x * 2.0;
} else {
tmp = b * (a * 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 (b <= (-3d-172)) then
tmp = 27.0d0 * (b * a)
else if (b <= 6.5d+108) then
tmp = x * 2.0d0
else
tmp = b * (a * 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 (b <= -3e-172) {
tmp = 27.0 * (b * a);
} else if (b <= 6.5e+108) {
tmp = x * 2.0;
} else {
tmp = b * (a * 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 b <= -3e-172: tmp = 27.0 * (b * a) elif b <= 6.5e+108: tmp = x * 2.0 else: tmp = b * (a * 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 (b <= -3e-172) tmp = Float64(27.0 * Float64(b * a)); elseif (b <= 6.5e+108) tmp = Float64(x * 2.0); else tmp = Float64(b * Float64(a * 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 (b <= -3e-172)
tmp = 27.0 * (b * a);
elseif (b <= 6.5e+108)
tmp = x * 2.0;
else
tmp = 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. NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -3e-172], N[(27.0 * N[(b * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.5e+108], N[(x * 2.0), $MachinePrecision], N[(b * N[(a * 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}\;b \leq -3 \cdot 10^{-172}:\\
\;\;\;\;27 \cdot \left(b \cdot a\right)\\
\mathbf{elif}\;b \leq 6.5 \cdot 10^{+108}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\end{array}
\end{array}
if b < -2.99999999999999984e-172Initial program 96.7%
+-commutative96.7%
associate-+r-96.7%
*-commutative96.7%
cancel-sign-sub-inv96.7%
associate-*r*92.2%
distribute-lft-neg-in92.2%
*-commutative92.2%
cancel-sign-sub-inv92.2%
associate-+r-92.2%
associate-*l*92.3%
fma-define92.3%
cancel-sign-sub-inv92.3%
fma-define92.3%
distribute-lft-neg-in92.3%
distribute-rgt-neg-in92.3%
*-commutative92.3%
associate-*r*96.7%
associate-*l*96.8%
neg-mul-196.8%
associate-*r*96.8%
Simplified96.8%
Taylor expanded in a around inf 49.5%
if -2.99999999999999984e-172 < b < 6.4999999999999996e108Initial program 98.2%
+-commutative98.2%
associate-+r-98.2%
*-commutative98.2%
cancel-sign-sub-inv98.2%
associate-*r*91.4%
distribute-lft-neg-in91.4%
*-commutative91.4%
cancel-sign-sub-inv91.4%
associate-+r-91.4%
associate-*l*93.1%
fma-define93.1%
cancel-sign-sub-inv93.1%
fma-define93.1%
distribute-lft-neg-in93.1%
distribute-rgt-neg-in93.1%
*-commutative93.1%
associate-*r*99.8%
associate-*l*99.8%
neg-mul-199.8%
associate-*r*99.8%
Simplified99.8%
Taylor expanded in t around 0 52.8%
Taylor expanded in x around inf 38.0%
if 6.4999999999999996e108 < b Initial program 95.3%
+-commutative95.3%
associate-+r-95.3%
*-commutative95.3%
cancel-sign-sub-inv95.3%
associate-*r*93.2%
distribute-lft-neg-in93.2%
*-commutative93.2%
cancel-sign-sub-inv93.2%
associate-+r-93.2%
associate-*l*93.2%
fma-define93.2%
cancel-sign-sub-inv93.2%
fma-define93.2%
distribute-lft-neg-in93.2%
distribute-rgt-neg-in93.2%
*-commutative93.2%
associate-*r*95.3%
associate-*l*95.3%
neg-mul-195.3%
associate-*r*95.3%
Simplified95.3%
Taylor expanded in a around inf 69.6%
*-commutative69.6%
*-commutative69.6%
associate-*r*69.7%
*-commutative69.7%
Simplified69.7%
Final simplification48.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))
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 97.1%
+-commutative97.1%
associate-+r-97.1%
*-commutative97.1%
cancel-sign-sub-inv97.1%
associate-*r*92.0%
distribute-lft-neg-in92.0%
*-commutative92.0%
cancel-sign-sub-inv92.0%
associate-+r-92.0%
associate-*l*92.8%
fma-define92.8%
cancel-sign-sub-inv92.8%
fma-define92.8%
distribute-lft-neg-in92.8%
distribute-rgt-neg-in92.8%
*-commutative92.8%
associate-*r*97.8%
associate-*l*97.8%
neg-mul-197.8%
associate-*r*97.8%
Simplified97.8%
Taylor expanded in t around 0 65.9%
Taylor expanded in x around inf 28.4%
Final simplification28.4%
(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 2024137
(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)))