
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (or (<= t -1e+105) (not (<= t 5e-35)))
(+
(fma t (fma x (* 18.0 (* y z)) (* a -4.0)) (fma b c (* x (* -4.0 i))))
(* j (* k -27.0)))
(-
(-
(+ (- (* y (* (* x 18.0) (* t z))) (* t (* a 4.0))) (* b c))
(* i (* x 4.0)))
(* k (* j 27.0)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -1e+105) || !(t <= 5e-35)) {
tmp = fma(t, fma(x, (18.0 * (y * z)), (a * -4.0)), fma(b, c, (x * (-4.0 * i)))) + (j * (k * -27.0));
} else {
tmp = ((((y * ((x * 18.0) * (t * z))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0));
}
return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((t <= -1e+105) || !(t <= 5e-35)) tmp = Float64(fma(t, fma(x, Float64(18.0 * Float64(y * z)), Float64(a * -4.0)), fma(b, c, Float64(x * Float64(-4.0 * i)))) + Float64(j * Float64(k * -27.0))); else tmp = Float64(Float64(Float64(Float64(Float64(y * Float64(Float64(x * 18.0) * Float64(t * z))) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(i * Float64(x * 4.0))) - Float64(k * Float64(j * 27.0))); end return tmp end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[t, -1e+105], N[Not[LessEqual[t, 5e-35]], $MachinePrecision]], N[(N[(t * N[(x * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b * c + N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(y * N[(N[(x * 18.0), $MachinePrecision] * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{+105} \lor \neg \left(t \leq 5 \cdot 10^{-35}\right):\\
\;\;\;\;\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(-4 \cdot i\right)\right)\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(y \cdot \left(\left(x \cdot 18\right) \cdot \left(t \cdot z\right)\right) - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(j \cdot 27\right)\\
\end{array}
\end{array}
if t < -9.9999999999999994e104 or 4.99999999999999964e-35 < t Initial program 82.6%
Simplified90.8%
if -9.9999999999999994e104 < t < 4.99999999999999964e-35Initial program 82.7%
pow182.7%
associate-*l*86.0%
*-commutative86.0%
Applied egg-rr86.0%
unpow186.0%
associate-*l*95.1%
*-commutative95.1%
Simplified95.1%
Final simplification93.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) -3.05e+119)
(* b c)
(if (<= (* b c) -1.3e-33)
(* t (* a -4.0))
(if (<= (* b c) -1.45e-127)
(* x (* 18.0 (* t (* y z))))
(if (<= (* b c) 8.8e-58)
(* k (* j -27.0))
(if (<= (* b c) 3.1e+105) (* x (* z (* 18.0 (* t y)))) (* b c)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -3.05e+119) {
tmp = b * c;
} else if ((b * c) <= -1.3e-33) {
tmp = t * (a * -4.0);
} else if ((b * c) <= -1.45e-127) {
tmp = x * (18.0 * (t * (y * z)));
} else if ((b * c) <= 8.8e-58) {
tmp = k * (j * -27.0);
} else if ((b * c) <= 3.1e+105) {
tmp = x * (z * (18.0 * (t * y)));
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-3.05d+119)) then
tmp = b * c
else if ((b * c) <= (-1.3d-33)) then
tmp = t * (a * (-4.0d0))
else if ((b * c) <= (-1.45d-127)) then
tmp = x * (18.0d0 * (t * (y * z)))
else if ((b * c) <= 8.8d-58) then
tmp = k * (j * (-27.0d0))
else if ((b * c) <= 3.1d+105) then
tmp = x * (z * (18.0d0 * (t * y)))
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -3.05e+119) {
tmp = b * c;
} else if ((b * c) <= -1.3e-33) {
tmp = t * (a * -4.0);
} else if ((b * c) <= -1.45e-127) {
tmp = x * (18.0 * (t * (y * z)));
} else if ((b * c) <= 8.8e-58) {
tmp = k * (j * -27.0);
} else if ((b * c) <= 3.1e+105) {
tmp = x * (z * (18.0 * (t * y)));
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -3.05e+119: tmp = b * c elif (b * c) <= -1.3e-33: tmp = t * (a * -4.0) elif (b * c) <= -1.45e-127: tmp = x * (18.0 * (t * (y * z))) elif (b * c) <= 8.8e-58: tmp = k * (j * -27.0) elif (b * c) <= 3.1e+105: tmp = x * (z * (18.0 * (t * y))) else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -3.05e+119) tmp = Float64(b * c); elseif (Float64(b * c) <= -1.3e-33) tmp = Float64(t * Float64(a * -4.0)); elseif (Float64(b * c) <= -1.45e-127) tmp = Float64(x * Float64(18.0 * Float64(t * Float64(y * z)))); elseif (Float64(b * c) <= 8.8e-58) tmp = Float64(k * Float64(j * -27.0)); elseif (Float64(b * c) <= 3.1e+105) tmp = Float64(x * Float64(z * Float64(18.0 * Float64(t * y)))); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -3.05e+119)
tmp = b * c;
elseif ((b * c) <= -1.3e-33)
tmp = t * (a * -4.0);
elseif ((b * c) <= -1.45e-127)
tmp = x * (18.0 * (t * (y * z)));
elseif ((b * c) <= 8.8e-58)
tmp = k * (j * -27.0);
elseif ((b * c) <= 3.1e+105)
tmp = x * (z * (18.0 * (t * y)));
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -3.05e+119], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.3e-33], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.45e-127], N[(x * N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 8.8e-58], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 3.1e+105], N[(x * N[(z * N[(18.0 * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -3.05 \cdot 10^{+119}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -1.3 \cdot 10^{-33}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq -1.45 \cdot 10^{-127}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 8.8 \cdot 10^{-58}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;b \cdot c \leq 3.1 \cdot 10^{+105}:\\
\;\;\;\;x \cdot \left(z \cdot \left(18 \cdot \left(t \cdot y\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -3.05e119 or 3.10000000000000004e105 < (*.f64 b c) Initial program 82.2%
pow182.2%
associate-*l*79.8%
*-commutative79.8%
Applied egg-rr79.8%
unpow179.8%
associate-*l*84.4%
*-commutative84.4%
Simplified84.4%
Taylor expanded in b around inf 53.8%
if -3.05e119 < (*.f64 b c) < -1.29999999999999997e-33Initial program 72.9%
pow172.9%
associate-*l*70.1%
*-commutative70.1%
Applied egg-rr70.1%
unpow170.1%
associate-*l*88.9%
*-commutative88.9%
Simplified88.9%
Taylor expanded in a around inf 44.6%
*-commutative44.6%
*-commutative44.6%
metadata-eval44.6%
distribute-rgt-neg-in44.6%
associate-*r*44.6%
distribute-rgt-neg-in44.6%
distribute-rgt-neg-in44.6%
metadata-eval44.6%
Simplified44.6%
if -1.29999999999999997e-33 < (*.f64 b c) < -1.45e-127Initial program 81.1%
Simplified85.8%
Taylor expanded in x around inf 65.5%
Taylor expanded in t around inf 46.4%
if -1.45e-127 < (*.f64 b c) < 8.80000000000000023e-58Initial program 87.1%
Simplified86.0%
Taylor expanded in i around inf 62.4%
Taylor expanded in k around inf 62.5%
Taylor expanded in k around inf 42.9%
associate-*r*42.9%
*-commutative42.9%
Simplified42.9%
if 8.80000000000000023e-58 < (*.f64 b c) < 3.10000000000000004e105Initial program 84.5%
Simplified87.9%
Taylor expanded in x around inf 63.2%
Taylor expanded in t around inf 41.9%
associate-*r*44.9%
associate-*r*44.9%
Simplified44.9%
Final simplification47.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (* 18.0 (* t (* y z))))))
(if (<= (* b c) -7e+119)
(* b c)
(if (<= (* b c) -2.85e-37)
(* t (* a -4.0))
(if (<= (* b c) -2.2e-128)
t_1
(if (<= (* b c) 4.8e-58)
(* k (* j -27.0))
(if (<= (* b c) 1.5e+108) t_1 (* b c))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * (18.0 * (t * (y * z)));
double tmp;
if ((b * c) <= -7e+119) {
tmp = b * c;
} else if ((b * c) <= -2.85e-37) {
tmp = t * (a * -4.0);
} else if ((b * c) <= -2.2e-128) {
tmp = t_1;
} else if ((b * c) <= 4.8e-58) {
tmp = k * (j * -27.0);
} else if ((b * c) <= 1.5e+108) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = x * (18.0d0 * (t * (y * z)))
if ((b * c) <= (-7d+119)) then
tmp = b * c
else if ((b * c) <= (-2.85d-37)) then
tmp = t * (a * (-4.0d0))
else if ((b * c) <= (-2.2d-128)) then
tmp = t_1
else if ((b * c) <= 4.8d-58) then
tmp = k * (j * (-27.0d0))
else if ((b * c) <= 1.5d+108) then
tmp = t_1
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * (18.0 * (t * (y * z)));
double tmp;
if ((b * c) <= -7e+119) {
tmp = b * c;
} else if ((b * c) <= -2.85e-37) {
tmp = t * (a * -4.0);
} else if ((b * c) <= -2.2e-128) {
tmp = t_1;
} else if ((b * c) <= 4.8e-58) {
tmp = k * (j * -27.0);
} else if ((b * c) <= 1.5e+108) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * (18.0 * (t * (y * z))) tmp = 0 if (b * c) <= -7e+119: tmp = b * c elif (b * c) <= -2.85e-37: tmp = t * (a * -4.0) elif (b * c) <= -2.2e-128: tmp = t_1 elif (b * c) <= 4.8e-58: tmp = k * (j * -27.0) elif (b * c) <= 1.5e+108: tmp = t_1 else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(18.0 * Float64(t * Float64(y * z)))) tmp = 0.0 if (Float64(b * c) <= -7e+119) tmp = Float64(b * c); elseif (Float64(b * c) <= -2.85e-37) tmp = Float64(t * Float64(a * -4.0)); elseif (Float64(b * c) <= -2.2e-128) tmp = t_1; elseif (Float64(b * c) <= 4.8e-58) tmp = Float64(k * Float64(j * -27.0)); elseif (Float64(b * c) <= 1.5e+108) tmp = t_1; else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = x * (18.0 * (t * (y * z)));
tmp = 0.0;
if ((b * c) <= -7e+119)
tmp = b * c;
elseif ((b * c) <= -2.85e-37)
tmp = t * (a * -4.0);
elseif ((b * c) <= -2.2e-128)
tmp = t_1;
elseif ((b * c) <= 4.8e-58)
tmp = k * (j * -27.0);
elseif ((b * c) <= 1.5e+108)
tmp = t_1;
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -7e+119], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2.85e-37], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2.2e-128], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 4.8e-58], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.5e+108], t$95$1, N[(b * c), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;b \cdot c \leq -7 \cdot 10^{+119}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -2.85 \cdot 10^{-37}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq -2.2 \cdot 10^{-128}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 4.8 \cdot 10^{-58}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;b \cdot c \leq 1.5 \cdot 10^{+108}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -7.0000000000000001e119 or 1.49999999999999992e108 < (*.f64 b c) Initial program 82.2%
pow182.2%
associate-*l*79.8%
*-commutative79.8%
Applied egg-rr79.8%
unpow179.8%
associate-*l*84.4%
*-commutative84.4%
Simplified84.4%
Taylor expanded in b around inf 53.8%
if -7.0000000000000001e119 < (*.f64 b c) < -2.84999999999999987e-37Initial program 72.9%
pow172.9%
associate-*l*70.1%
*-commutative70.1%
Applied egg-rr70.1%
unpow170.1%
associate-*l*88.9%
*-commutative88.9%
Simplified88.9%
Taylor expanded in a around inf 44.6%
*-commutative44.6%
*-commutative44.6%
metadata-eval44.6%
distribute-rgt-neg-in44.6%
associate-*r*44.6%
distribute-rgt-neg-in44.6%
distribute-rgt-neg-in44.6%
metadata-eval44.6%
Simplified44.6%
if -2.84999999999999987e-37 < (*.f64 b c) < -2.20000000000000009e-128 or 4.8000000000000001e-58 < (*.f64 b c) < 1.49999999999999992e108Initial program 83.2%
Simplified87.1%
Taylor expanded in x around inf 64.1%
Taylor expanded in t around inf 43.7%
if -2.20000000000000009e-128 < (*.f64 b c) < 4.8000000000000001e-58Initial program 87.1%
Simplified86.0%
Taylor expanded in i around inf 62.4%
Taylor expanded in k around inf 62.5%
Taylor expanded in k around inf 42.9%
associate-*r*42.9%
*-commutative42.9%
Simplified42.9%
Final simplification46.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 18.0 (* x (* y z)))))
(if (<= t -1.55e+107)
(- (+ (* b c) (* t (- t_1 (* a 4.0)))) (* 27.0 (* j k)))
(if (<= t 3e-29)
(-
(-
(+ (- (* y (* (* x 18.0) (* t z))) (* t (* a 4.0))) (* b c))
(* i (* x 4.0)))
(* k (* j 27.0)))
(-
(* t (- (+ t_1 (/ (* b c) t)) (* a 4.0)))
(+ (* x (* i 4.0)) (* j (* k 27.0))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (x * (y * z));
double tmp;
if (t <= -1.55e+107) {
tmp = ((b * c) + (t * (t_1 - (a * 4.0)))) - (27.0 * (j * k));
} else if (t <= 3e-29) {
tmp = ((((y * ((x * 18.0) * (t * z))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0));
} else {
tmp = (t * ((t_1 + ((b * c) / t)) - (a * 4.0))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = 18.0d0 * (x * (y * z))
if (t <= (-1.55d+107)) then
tmp = ((b * c) + (t * (t_1 - (a * 4.0d0)))) - (27.0d0 * (j * k))
else if (t <= 3d-29) then
tmp = ((((y * ((x * 18.0d0) * (t * z))) - (t * (a * 4.0d0))) + (b * c)) - (i * (x * 4.0d0))) - (k * (j * 27.0d0))
else
tmp = (t * ((t_1 + ((b * c) / t)) - (a * 4.0d0))) - ((x * (i * 4.0d0)) + (j * (k * 27.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (x * (y * z));
double tmp;
if (t <= -1.55e+107) {
tmp = ((b * c) + (t * (t_1 - (a * 4.0)))) - (27.0 * (j * k));
} else if (t <= 3e-29) {
tmp = ((((y * ((x * 18.0) * (t * z))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0));
} else {
tmp = (t * ((t_1 + ((b * c) / t)) - (a * 4.0))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 18.0 * (x * (y * z)) tmp = 0 if t <= -1.55e+107: tmp = ((b * c) + (t * (t_1 - (a * 4.0)))) - (27.0 * (j * k)) elif t <= 3e-29: tmp = ((((y * ((x * 18.0) * (t * z))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0)) else: tmp = (t * ((t_1 + ((b * c) / t)) - (a * 4.0))) - ((x * (i * 4.0)) + (j * (k * 27.0))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(18.0 * Float64(x * Float64(y * z))) tmp = 0.0 if (t <= -1.55e+107) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(t_1 - Float64(a * 4.0)))) - Float64(27.0 * Float64(j * k))); elseif (t <= 3e-29) tmp = Float64(Float64(Float64(Float64(Float64(y * Float64(Float64(x * 18.0) * Float64(t * z))) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(i * Float64(x * 4.0))) - Float64(k * Float64(j * 27.0))); else tmp = Float64(Float64(t * Float64(Float64(t_1 + Float64(Float64(b * c) / t)) - Float64(a * 4.0))) - Float64(Float64(x * Float64(i * 4.0)) + Float64(j * Float64(k * 27.0)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 18.0 * (x * (y * z));
tmp = 0.0;
if (t <= -1.55e+107)
tmp = ((b * c) + (t * (t_1 - (a * 4.0)))) - (27.0 * (j * k));
elseif (t <= 3e-29)
tmp = ((((y * ((x * 18.0) * (t * z))) - (t * (a * 4.0))) + (b * c)) - (i * (x * 4.0))) - (k * (j * 27.0));
else
tmp = (t * ((t_1 + ((b * c) / t)) - (a * 4.0))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.55e+107], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(t$95$1 - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3e-29], N[(N[(N[(N[(N[(y * N[(N[(x * 18.0), $MachinePrecision] * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t * N[(N[(t$95$1 + N[(N[(b * c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\\
\mathbf{if}\;t \leq -1.55 \cdot 10^{+107}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(t\_1 - a \cdot 4\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;t \leq 3 \cdot 10^{-29}:\\
\;\;\;\;\left(\left(\left(y \cdot \left(\left(x \cdot 18\right) \cdot \left(t \cdot z\right)\right) - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(j \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\left(t\_1 + \frac{b \cdot c}{t}\right) - a \cdot 4\right) - \left(x \cdot \left(i \cdot 4\right) + j \cdot \left(k \cdot 27\right)\right)\\
\end{array}
\end{array}
if t < -1.55000000000000013e107Initial program 78.5%
Simplified88.0%
Taylor expanded in i around 0 88.2%
if -1.55000000000000013e107 < t < 3.0000000000000003e-29Initial program 83.0%
pow183.0%
associate-*l*86.2%
*-commutative86.2%
Applied egg-rr86.2%
unpow186.2%
associate-*l*95.2%
*-commutative95.2%
Simplified95.2%
if 3.0000000000000003e-29 < t Initial program 84.7%
Simplified89.2%
Taylor expanded in t around inf 90.6%
Final simplification92.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* x (* i 4.0)) (* j (* k 27.0)))))
(if (<= t -5e-112)
(- (+ (* b c) (* t (- (* (* y z) (* x 18.0)) (* a 4.0)))) t_1)
(if (<= t 3e-29)
(- (+ (* b c) (- (* (* y (* x 18.0)) (* t z)) (* t (* a 4.0)))) t_1)
(- (* t (- (+ (* 18.0 (* x (* y z))) (/ (* b c) t)) (* a 4.0))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (x * (i * 4.0)) + (j * (k * 27.0));
double tmp;
if (t <= -5e-112) {
tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - t_1;
} else if (t <= 3e-29) {
tmp = ((b * c) + (((y * (x * 18.0)) * (t * z)) - (t * (a * 4.0)))) - t_1;
} else {
tmp = (t * (((18.0 * (x * (y * z))) + ((b * c) / t)) - (a * 4.0))) - t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (x * (i * 4.0d0)) + (j * (k * 27.0d0))
if (t <= (-5d-112)) then
tmp = ((b * c) + (t * (((y * z) * (x * 18.0d0)) - (a * 4.0d0)))) - t_1
else if (t <= 3d-29) then
tmp = ((b * c) + (((y * (x * 18.0d0)) * (t * z)) - (t * (a * 4.0d0)))) - t_1
else
tmp = (t * (((18.0d0 * (x * (y * z))) + ((b * c) / t)) - (a * 4.0d0))) - t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (x * (i * 4.0)) + (j * (k * 27.0));
double tmp;
if (t <= -5e-112) {
tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - t_1;
} else if (t <= 3e-29) {
tmp = ((b * c) + (((y * (x * 18.0)) * (t * z)) - (t * (a * 4.0)))) - t_1;
} else {
tmp = (t * (((18.0 * (x * (y * z))) + ((b * c) / t)) - (a * 4.0))) - t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (x * (i * 4.0)) + (j * (k * 27.0)) tmp = 0 if t <= -5e-112: tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - t_1 elif t <= 3e-29: tmp = ((b * c) + (((y * (x * 18.0)) * (t * z)) - (t * (a * 4.0)))) - t_1 else: tmp = (t * (((18.0 * (x * (y * z))) + ((b * c) / t)) - (a * 4.0))) - t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(x * Float64(i * 4.0)) + Float64(j * Float64(k * 27.0))) tmp = 0.0 if (t <= -5e-112) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(y * z) * Float64(x * 18.0)) - Float64(a * 4.0)))) - t_1); elseif (t <= 3e-29) tmp = Float64(Float64(Float64(b * c) + Float64(Float64(Float64(y * Float64(x * 18.0)) * Float64(t * z)) - Float64(t * Float64(a * 4.0)))) - t_1); else tmp = Float64(Float64(t * Float64(Float64(Float64(18.0 * Float64(x * Float64(y * z))) + Float64(Float64(b * c) / t)) - Float64(a * 4.0))) - t_1); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (x * (i * 4.0)) + (j * (k * 27.0));
tmp = 0.0;
if (t <= -5e-112)
tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - t_1;
elseif (t <= 3e-29)
tmp = ((b * c) + (((y * (x * 18.0)) * (t * z)) - (t * (a * 4.0)))) - t_1;
else
tmp = (t * (((18.0 * (x * (y * z))) + ((b * c) / t)) - (a * 4.0))) - t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5e-112], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(y * z), $MachinePrecision] * N[(x * 18.0), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t, 3e-29], N[(N[(N[(b * c), $MachinePrecision] + N[(N[(N[(y * N[(x * 18.0), $MachinePrecision]), $MachinePrecision] * N[(t * z), $MachinePrecision]), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(t * N[(N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(i \cdot 4\right) + j \cdot \left(k \cdot 27\right)\\
\mathbf{if}\;t \leq -5 \cdot 10^{-112}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot 18\right) - a \cdot 4\right)\right) - t\_1\\
\mathbf{elif}\;t \leq 3 \cdot 10^{-29}:\\
\;\;\;\;\left(b \cdot c + \left(\left(y \cdot \left(x \cdot 18\right)\right) \cdot \left(t \cdot z\right) - t \cdot \left(a \cdot 4\right)\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + \frac{b \cdot c}{t}\right) - a \cdot 4\right) - t\_1\\
\end{array}
\end{array}
if t < -5.00000000000000044e-112Initial program 85.0%
Simplified89.3%
if -5.00000000000000044e-112 < t < 3.0000000000000003e-29Initial program 79.1%
Simplified78.2%
associate-*r*79.1%
distribute-rgt-out--79.1%
associate-*l*85.0%
*-commutative85.0%
*-commutative85.0%
Applied egg-rr85.0%
if 3.0000000000000003e-29 < t Initial program 84.7%
Simplified89.2%
Taylor expanded in t around inf 90.6%
Final simplification88.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) (- INFINITY))
(* b c)
(-
(+ (* b c) (* t (- (* (* y z) (* x 18.0)) (* a 4.0))))
(+ (* x (* i 4.0)) (* j (* k 27.0))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -((double) INFINITY)) {
tmp = b * c;
} else {
tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -Double.POSITIVE_INFINITY) {
tmp = b * c;
} else {
tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -math.inf: tmp = b * c else: tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= Float64(-Inf)) tmp = Float64(b * c); else tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(y * z) * Float64(x * 18.0)) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(i * 4.0)) + Float64(j * Float64(k * 27.0)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -Inf)
tmp = b * c;
else
tmp = ((b * c) + (t * (((y * z) * (x * 18.0)) - (a * 4.0)))) - ((x * (i * 4.0)) + (j * (k * 27.0)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], (-Infinity)], N[(b * c), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(y * z), $MachinePrecision] * N[(x * 18.0), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(i * 4.0), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -\infty:\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot 18\right) - a \cdot 4\right)\right) - \left(x \cdot \left(i \cdot 4\right) + j \cdot \left(k \cdot 27\right)\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -inf.0Initial program 46.7%
pow146.7%
associate-*l*46.7%
*-commutative46.7%
Applied egg-rr46.7%
unpow146.7%
associate-*l*53.3%
*-commutative53.3%
Simplified53.3%
Taylor expanded in b around inf 80.0%
if -inf.0 < (*.f64 b c) Initial program 84.9%
Simplified87.4%
Final simplification87.0%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 27.0 (* j k))))
(if (<= x -0.16)
(* x (- (* 18.0 (* z (* t y))) (* i 4.0)))
(if (<= x 2.55e+17)
(- (+ (* b c) (* -4.0 (* t a))) t_1)
(if (<= x 4.3e+100)
(- (+ (* b c) (* (* y z) (* x (* t 18.0)))) t_1)
(- (* b c) (* 4.0 (+ (* t a) (* x i)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 27.0 * (j * k);
double tmp;
if (x <= -0.16) {
tmp = x * ((18.0 * (z * (t * y))) - (i * 4.0));
} else if (x <= 2.55e+17) {
tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
} else if (x <= 4.3e+100) {
tmp = ((b * c) + ((y * z) * (x * (t * 18.0)))) - t_1;
} else {
tmp = (b * c) - (4.0 * ((t * a) + (x * i)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = 27.0d0 * (j * k)
if (x <= (-0.16d0)) then
tmp = x * ((18.0d0 * (z * (t * y))) - (i * 4.0d0))
else if (x <= 2.55d+17) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - t_1
else if (x <= 4.3d+100) then
tmp = ((b * c) + ((y * z) * (x * (t * 18.0d0)))) - t_1
else
tmp = (b * c) - (4.0d0 * ((t * a) + (x * i)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 27.0 * (j * k);
double tmp;
if (x <= -0.16) {
tmp = x * ((18.0 * (z * (t * y))) - (i * 4.0));
} else if (x <= 2.55e+17) {
tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
} else if (x <= 4.3e+100) {
tmp = ((b * c) + ((y * z) * (x * (t * 18.0)))) - t_1;
} else {
tmp = (b * c) - (4.0 * ((t * a) + (x * i)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 27.0 * (j * k) tmp = 0 if x <= -0.16: tmp = x * ((18.0 * (z * (t * y))) - (i * 4.0)) elif x <= 2.55e+17: tmp = ((b * c) + (-4.0 * (t * a))) - t_1 elif x <= 4.3e+100: tmp = ((b * c) + ((y * z) * (x * (t * 18.0)))) - t_1 else: tmp = (b * c) - (4.0 * ((t * a) + (x * i))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(27.0 * Float64(j * k)) tmp = 0.0 if (x <= -0.16) tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(t * y))) - Float64(i * 4.0))); elseif (x <= 2.55e+17) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - t_1); elseif (x <= 4.3e+100) tmp = Float64(Float64(Float64(b * c) + Float64(Float64(y * z) * Float64(x * Float64(t * 18.0)))) - t_1); else tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(t * a) + Float64(x * i)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 27.0 * (j * k);
tmp = 0.0;
if (x <= -0.16)
tmp = x * ((18.0 * (z * (t * y))) - (i * 4.0));
elseif (x <= 2.55e+17)
tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
elseif (x <= 4.3e+100)
tmp = ((b * c) + ((y * z) * (x * (t * 18.0)))) - t_1;
else
tmp = (b * c) - (4.0 * ((t * a) + (x * i)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -0.16], N[(x * N[(N[(18.0 * N[(z * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.55e+17], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[x, 4.3e+100], N[(N[(N[(b * c), $MachinePrecision] + N[(N[(y * z), $MachinePrecision] * N[(x * N[(t * 18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := 27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;x \leq -0.16:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(t \cdot y\right)\right) - i \cdot 4\right)\\
\mathbf{elif}\;x \leq 2.55 \cdot 10^{+17}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - t\_1\\
\mathbf{elif}\;x \leq 4.3 \cdot 10^{+100}:\\
\;\;\;\;\left(b \cdot c + \left(y \cdot z\right) \cdot \left(x \cdot \left(t \cdot 18\right)\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a + x \cdot i\right)\\
\end{array}
\end{array}
if x < -0.160000000000000003Initial program 76.2%
Simplified87.4%
Taylor expanded in x around inf 74.6%
pow174.6%
associate-*r*74.6%
Applied egg-rr74.6%
unpow174.6%
*-commutative74.6%
Simplified74.6%
if -0.160000000000000003 < x < 2.55e17Initial program 94.2%
Simplified88.7%
Taylor expanded in x around 0 82.2%
if 2.55e17 < x < 4.29999999999999993e100Initial program 68.4%
Simplified68.4%
Taylor expanded in i around 0 76.5%
Taylor expanded in x around inf 84.9%
associate-*r*84.9%
associate-*r*85.0%
*-commutative85.0%
Simplified85.0%
if 4.29999999999999993e100 < x Initial program 66.5%
Taylor expanded in x around 0 76.8%
Taylor expanded in j around 0 72.7%
distribute-lft-out72.7%
*-commutative72.7%
*-commutative72.7%
Simplified72.7%
Final simplification78.4%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= t -6.5e+108) (not (<= t 1.42e-55))) (- (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))) (* 27.0 (* j k))) (- (- (- (* b c) (* 4.0 (* t a))) (* i (* x 4.0))) (* k (* j 27.0)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -6.5e+108) || !(t <= 1.42e-55)) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (27.0 * (j * k));
} else {
tmp = (((b * c) - (4.0 * (t * a))) - (i * (x * 4.0))) - (k * (j * 27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((t <= (-6.5d+108)) .or. (.not. (t <= 1.42d-55))) then
tmp = ((b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))) - (27.0d0 * (j * k))
else
tmp = (((b * c) - (4.0d0 * (t * a))) - (i * (x * 4.0d0))) - (k * (j * 27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -6.5e+108) || !(t <= 1.42e-55)) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (27.0 * (j * k));
} else {
tmp = (((b * c) - (4.0 * (t * a))) - (i * (x * 4.0))) - (k * (j * 27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (t <= -6.5e+108) or not (t <= 1.42e-55): tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (27.0 * (j * k)) else: tmp = (((b * c) - (4.0 * (t * a))) - (i * (x * 4.0))) - (k * (j * 27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((t <= -6.5e+108) || !(t <= 1.42e-55)) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) - Float64(27.0 * Float64(j * k))); else tmp = Float64(Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(i * Float64(x * 4.0))) - Float64(k * Float64(j * 27.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((t <= -6.5e+108) || ~((t <= 1.42e-55)))
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (27.0 * (j * k));
else
tmp = (((b * c) - (4.0 * (t * a))) - (i * (x * 4.0))) - (k * (j * 27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[t, -6.5e+108], N[Not[LessEqual[t, 1.42e-55]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{+108} \lor \neg \left(t \leq 1.42 \cdot 10^{-55}\right):\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(j \cdot 27\right)\\
\end{array}
\end{array}
if t < -6.4999999999999996e108 or 1.42e-55 < t Initial program 83.0%
Simplified89.2%
Taylor expanded in i around 0 84.0%
if -6.4999999999999996e108 < t < 1.42e-55Initial program 82.4%
Taylor expanded in x around 0 82.7%
Final simplification83.2%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (- (* 18.0 (* z (* t y))) (* i 4.0))))
(t_2 (* j (* k -27.0))))
(if (<= x -7.5e-34)
t_1
(if (<= x 1.25e-244)
(+ t_2 (* b c))
(if (<= x 3.2e+50) (+ t_2 (* -4.0 (* t a))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((18.0 * (z * (t * y))) - (i * 4.0));
double t_2 = j * (k * -27.0);
double tmp;
if (x <= -7.5e-34) {
tmp = t_1;
} else if (x <= 1.25e-244) {
tmp = t_2 + (b * c);
} else if (x <= 3.2e+50) {
tmp = t_2 + (-4.0 * (t * a));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * ((18.0d0 * (z * (t * y))) - (i * 4.0d0))
t_2 = j * (k * (-27.0d0))
if (x <= (-7.5d-34)) then
tmp = t_1
else if (x <= 1.25d-244) then
tmp = t_2 + (b * c)
else if (x <= 3.2d+50) then
tmp = t_2 + ((-4.0d0) * (t * a))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((18.0 * (z * (t * y))) - (i * 4.0));
double t_2 = j * (k * -27.0);
double tmp;
if (x <= -7.5e-34) {
tmp = t_1;
} else if (x <= 1.25e-244) {
tmp = t_2 + (b * c);
} else if (x <= 3.2e+50) {
tmp = t_2 + (-4.0 * (t * a));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * ((18.0 * (z * (t * y))) - (i * 4.0)) t_2 = j * (k * -27.0) tmp = 0 if x <= -7.5e-34: tmp = t_1 elif x <= 1.25e-244: tmp = t_2 + (b * c) elif x <= 3.2e+50: tmp = t_2 + (-4.0 * (t * a)) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(t * y))) - Float64(i * 4.0))) t_2 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (x <= -7.5e-34) tmp = t_1; elseif (x <= 1.25e-244) tmp = Float64(t_2 + Float64(b * c)); elseif (x <= 3.2e+50) tmp = Float64(t_2 + Float64(-4.0 * Float64(t * a))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = x * ((18.0 * (z * (t * y))) - (i * 4.0));
t_2 = j * (k * -27.0);
tmp = 0.0;
if (x <= -7.5e-34)
tmp = t_1;
elseif (x <= 1.25e-244)
tmp = t_2 + (b * c);
elseif (x <= 3.2e+50)
tmp = t_2 + (-4.0 * (t * a));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(N[(18.0 * N[(z * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -7.5e-34], t$95$1, If[LessEqual[x, 1.25e-244], N[(t$95$2 + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.2e+50], N[(t$95$2 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(18 \cdot \left(z \cdot \left(t \cdot y\right)\right) - i \cdot 4\right)\\
t_2 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;x \leq -7.5 \cdot 10^{-34}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.25 \cdot 10^{-244}:\\
\;\;\;\;t\_2 + b \cdot c\\
\mathbf{elif}\;x \leq 3.2 \cdot 10^{+50}:\\
\;\;\;\;t\_2 + -4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -7.5000000000000004e-34 or 3.19999999999999983e50 < x Initial program 72.6%
Simplified81.5%
Taylor expanded in x around inf 67.8%
pow167.8%
associate-*r*69.1%
Applied egg-rr69.1%
unpow169.1%
*-commutative69.1%
Simplified69.1%
if -7.5000000000000004e-34 < x < 1.24999999999999999e-244Initial program 94.6%
Simplified88.2%
Taylor expanded in b around inf 70.8%
if 1.24999999999999999e-244 < x < 3.19999999999999983e50Initial program 91.5%
Simplified89.5%
Taylor expanded in a around inf 62.3%
*-commutative62.3%
Simplified62.3%
Final simplification68.3%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (- (* 18.0 (* t (* y z))) (* i 4.0))))
(t_2 (* j (* k -27.0))))
(if (<= x -3.8e-34)
t_1
(if (<= x 2.85e-244)
(+ t_2 (* b c))
(if (<= x 1.85e+52) (+ t_2 (* -4.0 (* t a))) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((18.0 * (t * (y * z))) - (i * 4.0));
double t_2 = j * (k * -27.0);
double tmp;
if (x <= -3.8e-34) {
tmp = t_1;
} else if (x <= 2.85e-244) {
tmp = t_2 + (b * c);
} else if (x <= 1.85e+52) {
tmp = t_2 + (-4.0 * (t * a));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * ((18.0d0 * (t * (y * z))) - (i * 4.0d0))
t_2 = j * (k * (-27.0d0))
if (x <= (-3.8d-34)) then
tmp = t_1
else if (x <= 2.85d-244) then
tmp = t_2 + (b * c)
else if (x <= 1.85d+52) then
tmp = t_2 + ((-4.0d0) * (t * a))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((18.0 * (t * (y * z))) - (i * 4.0));
double t_2 = j * (k * -27.0);
double tmp;
if (x <= -3.8e-34) {
tmp = t_1;
} else if (x <= 2.85e-244) {
tmp = t_2 + (b * c);
} else if (x <= 1.85e+52) {
tmp = t_2 + (-4.0 * (t * a));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * ((18.0 * (t * (y * z))) - (i * 4.0)) t_2 = j * (k * -27.0) tmp = 0 if x <= -3.8e-34: tmp = t_1 elif x <= 2.85e-244: tmp = t_2 + (b * c) elif x <= 1.85e+52: tmp = t_2 + (-4.0 * (t * a)) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(i * 4.0))) t_2 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (x <= -3.8e-34) tmp = t_1; elseif (x <= 2.85e-244) tmp = Float64(t_2 + Float64(b * c)); elseif (x <= 1.85e+52) tmp = Float64(t_2 + Float64(-4.0 * Float64(t * a))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = x * ((18.0 * (t * (y * z))) - (i * 4.0));
t_2 = j * (k * -27.0);
tmp = 0.0;
if (x <= -3.8e-34)
tmp = t_1;
elseif (x <= 2.85e-244)
tmp = t_2 + (b * c);
elseif (x <= 1.85e+52)
tmp = t_2 + (-4.0 * (t * a));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.8e-34], t$95$1, If[LessEqual[x, 2.85e-244], N[(t$95$2 + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.85e+52], N[(t$95$2 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - i \cdot 4\right)\\
t_2 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;x \leq -3.8 \cdot 10^{-34}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.85 \cdot 10^{-244}:\\
\;\;\;\;t\_2 + b \cdot c\\
\mathbf{elif}\;x \leq 1.85 \cdot 10^{+52}:\\
\;\;\;\;t\_2 + -4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -3.8000000000000001e-34 or 1.85e52 < x Initial program 72.6%
Simplified81.5%
Taylor expanded in x around inf 67.8%
if -3.8000000000000001e-34 < x < 2.85000000000000005e-244Initial program 94.6%
Simplified88.2%
Taylor expanded in b around inf 70.8%
if 2.85000000000000005e-244 < x < 1.85e52Initial program 91.5%
Simplified89.5%
Taylor expanded in a around inf 62.3%
*-commutative62.3%
Simplified62.3%
Final simplification67.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
(t_2 (* j (* k -27.0))))
(if (<= t -1.05e-96)
t_1
(if (<= t -1.95e-210)
(+ t_2 (* -4.0 (* x i)))
(if (<= t 2.8e+18) (+ t_2 (* b c)) t_1)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double t_2 = j * (k * -27.0);
double tmp;
if (t <= -1.05e-96) {
tmp = t_1;
} else if (t <= -1.95e-210) {
tmp = t_2 + (-4.0 * (x * i));
} else if (t <= 2.8e+18) {
tmp = t_2 + (b * c);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
t_2 = j * (k * (-27.0d0))
if (t <= (-1.05d-96)) then
tmp = t_1
else if (t <= (-1.95d-210)) then
tmp = t_2 + ((-4.0d0) * (x * i))
else if (t <= 2.8d+18) then
tmp = t_2 + (b * c)
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double t_2 = j * (k * -27.0);
double tmp;
if (t <= -1.05e-96) {
tmp = t_1;
} else if (t <= -1.95e-210) {
tmp = t_2 + (-4.0 * (x * i));
} else if (t <= 2.8e+18) {
tmp = t_2 + (b * c);
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0)) t_2 = j * (k * -27.0) tmp = 0 if t <= -1.05e-96: tmp = t_1 elif t <= -1.95e-210: tmp = t_2 + (-4.0 * (x * i)) elif t <= 2.8e+18: tmp = t_2 + (b * c) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))) t_2 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (t <= -1.05e-96) tmp = t_1; elseif (t <= -1.95e-210) tmp = Float64(t_2 + Float64(-4.0 * Float64(x * i))); elseif (t <= 2.8e+18) tmp = Float64(t_2 + Float64(b * c)); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
t_2 = j * (k * -27.0);
tmp = 0.0;
if (t <= -1.05e-96)
tmp = t_1;
elseif (t <= -1.95e-210)
tmp = t_2 + (-4.0 * (x * i));
elseif (t <= 2.8e+18)
tmp = t_2 + (b * c);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.05e-96], t$95$1, If[LessEqual[t, -1.95e-210], N[(t$95$2 + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e+18], N[(t$95$2 + N[(b * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
t_2 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;t \leq -1.05 \cdot 10^{-96}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.95 \cdot 10^{-210}:\\
\;\;\;\;t\_2 + -4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{+18}:\\
\;\;\;\;t\_2 + b \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.05000000000000001e-96 or 2.8e18 < t Initial program 84.3%
pow184.3%
associate-*l*78.0%
*-commutative78.0%
Applied egg-rr78.0%
unpow178.0%
associate-*l*78.0%
*-commutative78.0%
Simplified78.0%
Taylor expanded in t around inf 63.2%
if -1.05000000000000001e-96 < t < -1.9499999999999999e-210Initial program 86.0%
Simplified79.0%
Taylor expanded in i around inf 75.7%
if -1.9499999999999999e-210 < t < 2.8e18Initial program 79.0%
Simplified81.3%
Taylor expanded in b around inf 59.1%
Final simplification63.1%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -1.3e-23) (not (<= (* b c) 1e+91))) (+ (* b c) (* -4.0 (* t a))) (* k (+ (* j -27.0) (* -4.0 (/ (* x i) k))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -1.3e-23) || !((b * c) <= 1e+91)) {
tmp = (b * c) + (-4.0 * (t * a));
} else {
tmp = k * ((j * -27.0) + (-4.0 * ((x * i) / k)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((b * c) <= (-1.3d-23)) .or. (.not. ((b * c) <= 1d+91))) then
tmp = (b * c) + ((-4.0d0) * (t * a))
else
tmp = k * ((j * (-27.0d0)) + ((-4.0d0) * ((x * i) / k)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -1.3e-23) || !((b * c) <= 1e+91)) {
tmp = (b * c) + (-4.0 * (t * a));
} else {
tmp = k * ((j * -27.0) + (-4.0 * ((x * i) / k)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -1.3e-23) or not ((b * c) <= 1e+91): tmp = (b * c) + (-4.0 * (t * a)) else: tmp = k * ((j * -27.0) + (-4.0 * ((x * i) / k))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -1.3e-23) || !(Float64(b * c) <= 1e+91)) tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); else tmp = Float64(k * Float64(Float64(j * -27.0) + Float64(-4.0 * Float64(Float64(x * i) / k)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((b * c) <= -1.3e-23) || ~(((b * c) <= 1e+91)))
tmp = (b * c) + (-4.0 * (t * a));
else
tmp = k * ((j * -27.0) + (-4.0 * ((x * i) / k)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -1.3e-23], N[Not[LessEqual[N[(b * c), $MachinePrecision], 1e+91]], $MachinePrecision]], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(k * N[(N[(j * -27.0), $MachinePrecision] + N[(-4.0 * N[(N[(x * i), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -1.3 \cdot 10^{-23} \lor \neg \left(b \cdot c \leq 10^{+91}\right):\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(j \cdot -27 + -4 \cdot \frac{x \cdot i}{k}\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -1.3e-23 or 1.00000000000000008e91 < (*.f64 b c) Initial program 80.5%
Simplified84.5%
Taylor expanded in k around inf 69.4%
Taylor expanded in x around 0 58.3%
Taylor expanded in k around 0 61.1%
if -1.3e-23 < (*.f64 b c) < 1.00000000000000008e91Initial program 84.6%
Simplified86.2%
Taylor expanded in i around inf 56.6%
Taylor expanded in k around inf 56.7%
Final simplification58.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) -5.8e+119)
(* b c)
(if (<= (* b c) -2.1e-28)
(* t (* a -4.0))
(if (<= (* b c) 1.8e+93) (* -27.0 (* j k)) (* b c)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -5.8e+119) {
tmp = b * c;
} else if ((b * c) <= -2.1e-28) {
tmp = t * (a * -4.0);
} else if ((b * c) <= 1.8e+93) {
tmp = -27.0 * (j * k);
} else {
tmp = b * c;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-5.8d+119)) then
tmp = b * c
else if ((b * c) <= (-2.1d-28)) then
tmp = t * (a * (-4.0d0))
else if ((b * c) <= 1.8d+93) then
tmp = (-27.0d0) * (j * k)
else
tmp = b * c
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -5.8e+119) {
tmp = b * c;
} else if ((b * c) <= -2.1e-28) {
tmp = t * (a * -4.0);
} else if ((b * c) <= 1.8e+93) {
tmp = -27.0 * (j * k);
} else {
tmp = b * c;
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -5.8e+119: tmp = b * c elif (b * c) <= -2.1e-28: tmp = t * (a * -4.0) elif (b * c) <= 1.8e+93: tmp = -27.0 * (j * k) else: tmp = b * c return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -5.8e+119) tmp = Float64(b * c); elseif (Float64(b * c) <= -2.1e-28) tmp = Float64(t * Float64(a * -4.0)); elseif (Float64(b * c) <= 1.8e+93) tmp = Float64(-27.0 * Float64(j * k)); else tmp = Float64(b * c); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -5.8e+119)
tmp = b * c;
elseif ((b * c) <= -2.1e-28)
tmp = t * (a * -4.0);
elseif ((b * c) <= 1.8e+93)
tmp = -27.0 * (j * k);
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -5.8e+119], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2.1e-28], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.8e+93], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -5.8 \cdot 10^{+119}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -2.1 \cdot 10^{-28}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 1.8 \cdot 10^{+93}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -5.80000000000000014e119 or 1.8e93 < (*.f64 b c) Initial program 82.8%
pow182.8%
associate-*l*80.5%
*-commutative80.5%
Applied egg-rr80.5%
unpow180.5%
associate-*l*84.9%
*-commutative84.9%
Simplified84.9%
Taylor expanded in b around inf 53.2%
if -5.80000000000000014e119 < (*.f64 b c) < -2.10000000000000006e-28Initial program 74.9%
pow174.9%
associate-*l*72.1%
*-commutative72.1%
Applied egg-rr72.1%
unpow172.1%
associate-*l*88.6%
*-commutative88.6%
Simplified88.6%
Taylor expanded in a around inf 45.8%
*-commutative45.8%
*-commutative45.8%
metadata-eval45.8%
distribute-rgt-neg-in45.8%
associate-*r*45.8%
distribute-rgt-neg-in45.8%
distribute-rgt-neg-in45.8%
metadata-eval45.8%
Simplified45.8%
if -2.10000000000000006e-28 < (*.f64 b c) < 1.8e93Initial program 84.6%
Simplified86.2%
Taylor expanded in j around inf 34.8%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (<= x -0.94) (* x (- (* 18.0 (* z (* t y))) (* i 4.0))) (- (- (- (* b c) (* 4.0 (* t a))) (* i (* x 4.0))) (* k (* j 27.0)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -0.94) {
tmp = x * ((18.0 * (z * (t * y))) - (i * 4.0));
} else {
tmp = (((b * c) - (4.0 * (t * a))) - (i * (x * 4.0))) - (k * (j * 27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-0.94d0)) then
tmp = x * ((18.0d0 * (z * (t * y))) - (i * 4.0d0))
else
tmp = (((b * c) - (4.0d0 * (t * a))) - (i * (x * 4.0d0))) - (k * (j * 27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -0.94) {
tmp = x * ((18.0 * (z * (t * y))) - (i * 4.0));
} else {
tmp = (((b * c) - (4.0 * (t * a))) - (i * (x * 4.0))) - (k * (j * 27.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -0.94: tmp = x * ((18.0 * (z * (t * y))) - (i * 4.0)) else: tmp = (((b * c) - (4.0 * (t * a))) - (i * (x * 4.0))) - (k * (j * 27.0)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -0.94) tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(t * y))) - Float64(i * 4.0))); else tmp = Float64(Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(i * Float64(x * 4.0))) - Float64(k * Float64(j * 27.0))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (x <= -0.94)
tmp = x * ((18.0 * (z * (t * y))) - (i * 4.0));
else
tmp = (((b * c) - (4.0 * (t * a))) - (i * (x * 4.0))) - (k * (j * 27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -0.94], N[(x * N[(N[(18.0 * N[(z * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * N[(x * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.94:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(t \cdot y\right)\right) - i \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(j \cdot 27\right)\\
\end{array}
\end{array}
if x < -0.93999999999999995Initial program 76.2%
Simplified87.4%
Taylor expanded in x around inf 74.6%
pow174.6%
associate-*r*74.6%
Applied egg-rr74.6%
unpow174.6%
*-commutative74.6%
Simplified74.6%
if -0.93999999999999995 < x Initial program 85.1%
Taylor expanded in x around 0 80.2%
Final simplification78.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -4.3e-20) (not (<= (* b c) 5.1e+85))) (+ (* b c) (* -4.0 (* t a))) (+ (* j (* k -27.0)) (* -4.0 (* x i)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -4.3e-20) || !((b * c) <= 5.1e+85)) {
tmp = (b * c) + (-4.0 * (t * a));
} else {
tmp = (j * (k * -27.0)) + (-4.0 * (x * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((b * c) <= (-4.3d-20)) .or. (.not. ((b * c) <= 5.1d+85))) then
tmp = (b * c) + ((-4.0d0) * (t * a))
else
tmp = (j * (k * (-27.0d0))) + ((-4.0d0) * (x * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -4.3e-20) || !((b * c) <= 5.1e+85)) {
tmp = (b * c) + (-4.0 * (t * a));
} else {
tmp = (j * (k * -27.0)) + (-4.0 * (x * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -4.3e-20) or not ((b * c) <= 5.1e+85): tmp = (b * c) + (-4.0 * (t * a)) else: tmp = (j * (k * -27.0)) + (-4.0 * (x * i)) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -4.3e-20) || !(Float64(b * c) <= 5.1e+85)) tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); else tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(-4.0 * Float64(x * i))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((b * c) <= -4.3e-20) || ~(((b * c) <= 5.1e+85)))
tmp = (b * c) + (-4.0 * (t * a));
else
tmp = (j * (k * -27.0)) + (-4.0 * (x * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -4.3e-20], N[Not[LessEqual[N[(b * c), $MachinePrecision], 5.1e+85]], $MachinePrecision]], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -4.3 \cdot 10^{-20} \lor \neg \left(b \cdot c \leq 5.1 \cdot 10^{+85}\right):\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -4.30000000000000011e-20 or 5.0999999999999998e85 < (*.f64 b c) Initial program 80.5%
Simplified84.5%
Taylor expanded in k around inf 69.4%
Taylor expanded in x around 0 58.3%
Taylor expanded in k around 0 61.1%
if -4.30000000000000011e-20 < (*.f64 b c) < 5.0999999999999998e85Initial program 84.6%
Simplified86.2%
Taylor expanded in i around inf 56.6%
Final simplification58.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -0.94)
(* x (- (* 18.0 (* z (* t y))) (* i 4.0)))
(if (<= x 1.15e+47)
(- (+ (* b c) (* -4.0 (* t a))) (* 27.0 (* j k)))
(- (* b c) (* 4.0 (+ (* t a) (* x i)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -0.94) {
tmp = x * ((18.0 * (z * (t * y))) - (i * 4.0));
} else if (x <= 1.15e+47) {
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
} else {
tmp = (b * c) - (4.0 * ((t * a) + (x * i)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-0.94d0)) then
tmp = x * ((18.0d0 * (z * (t * y))) - (i * 4.0d0))
else if (x <= 1.15d+47) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - (27.0d0 * (j * k))
else
tmp = (b * c) - (4.0d0 * ((t * a) + (x * i)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -0.94) {
tmp = x * ((18.0 * (z * (t * y))) - (i * 4.0));
} else if (x <= 1.15e+47) {
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
} else {
tmp = (b * c) - (4.0 * ((t * a) + (x * i)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -0.94: tmp = x * ((18.0 * (z * (t * y))) - (i * 4.0)) elif x <= 1.15e+47: tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k)) else: tmp = (b * c) - (4.0 * ((t * a) + (x * i))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -0.94) tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(t * y))) - Float64(i * 4.0))); elseif (x <= 1.15e+47) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(27.0 * Float64(j * k))); else tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(t * a) + Float64(x * i)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (x <= -0.94)
tmp = x * ((18.0 * (z * (t * y))) - (i * 4.0));
elseif (x <= 1.15e+47)
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
else
tmp = (b * c) - (4.0 * ((t * a) + (x * i)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -0.94], N[(x * N[(N[(18.0 * N[(z * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.15e+47], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.94:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(t \cdot y\right)\right) - i \cdot 4\right)\\
\mathbf{elif}\;x \leq 1.15 \cdot 10^{+47}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a + x \cdot i\right)\\
\end{array}
\end{array}
if x < -0.93999999999999995Initial program 76.2%
Simplified87.4%
Taylor expanded in x around inf 74.6%
pow174.6%
associate-*r*74.6%
Applied egg-rr74.6%
unpow174.6%
*-commutative74.6%
Simplified74.6%
if -0.93999999999999995 < x < 1.1499999999999999e47Initial program 93.7%
Simplified88.4%
Taylor expanded in x around 0 81.4%
if 1.1499999999999999e47 < x Initial program 65.7%
Taylor expanded in x around 0 71.2%
Taylor expanded in j around 0 67.7%
distribute-lft-out67.7%
*-commutative67.7%
*-commutative67.7%
Simplified67.7%
Final simplification76.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -5.8e-34)
(* x (- (* 18.0 (* z (* t y))) (* i 4.0)))
(if (<= x 6e-268)
(+ (* j (* k -27.0)) (* b c))
(- (* b c) (* 4.0 (+ (* t a) (* x i)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -5.8e-34) {
tmp = x * ((18.0 * (z * (t * y))) - (i * 4.0));
} else if (x <= 6e-268) {
tmp = (j * (k * -27.0)) + (b * c);
} else {
tmp = (b * c) - (4.0 * ((t * a) + (x * i)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-5.8d-34)) then
tmp = x * ((18.0d0 * (z * (t * y))) - (i * 4.0d0))
else if (x <= 6d-268) then
tmp = (j * (k * (-27.0d0))) + (b * c)
else
tmp = (b * c) - (4.0d0 * ((t * a) + (x * i)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -5.8e-34) {
tmp = x * ((18.0 * (z * (t * y))) - (i * 4.0));
} else if (x <= 6e-268) {
tmp = (j * (k * -27.0)) + (b * c);
} else {
tmp = (b * c) - (4.0 * ((t * a) + (x * i)));
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -5.8e-34: tmp = x * ((18.0 * (z * (t * y))) - (i * 4.0)) elif x <= 6e-268: tmp = (j * (k * -27.0)) + (b * c) else: tmp = (b * c) - (4.0 * ((t * a) + (x * i))) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -5.8e-34) tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(t * y))) - Float64(i * 4.0))); elseif (x <= 6e-268) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(b * c)); else tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(t * a) + Float64(x * i)))); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (x <= -5.8e-34)
tmp = x * ((18.0 * (z * (t * y))) - (i * 4.0));
elseif (x <= 6e-268)
tmp = (j * (k * -27.0)) + (b * c);
else
tmp = (b * c) - (4.0 * ((t * a) + (x * i)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -5.8e-34], N[(x * N[(N[(18.0 * N[(z * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6e-268], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.8 \cdot 10^{-34}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(t \cdot y\right)\right) - i \cdot 4\right)\\
\mathbf{elif}\;x \leq 6 \cdot 10^{-268}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + b \cdot c\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a + x \cdot i\right)\\
\end{array}
\end{array}
if x < -5.8000000000000004e-34Initial program 78.1%
Simplified87.1%
Taylor expanded in x around inf 72.7%
pow172.7%
associate-*r*72.6%
Applied egg-rr72.6%
unpow172.6%
*-commutative72.6%
Simplified72.6%
if -5.8000000000000004e-34 < x < 5.9999999999999995e-268Initial program 94.3%
Simplified87.6%
Taylor expanded in b around inf 71.7%
if 5.9999999999999995e-268 < x Initial program 78.1%
Taylor expanded in x around 0 74.2%
Taylor expanded in j around 0 63.4%
distribute-lft-out63.4%
*-commutative63.4%
*-commutative63.4%
Simplified63.4%
Final simplification68.5%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= a -1.6e+110) (not (<= a 105000000.0))) (+ (* b c) (* -4.0 (* t a))) (+ (* j (* k -27.0)) (* b c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((a <= -1.6e+110) || !(a <= 105000000.0)) {
tmp = (b * c) + (-4.0 * (t * a));
} else {
tmp = (j * (k * -27.0)) + (b * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((a <= (-1.6d+110)) .or. (.not. (a <= 105000000.0d0))) then
tmp = (b * c) + ((-4.0d0) * (t * a))
else
tmp = (j * (k * (-27.0d0))) + (b * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((a <= -1.6e+110) || !(a <= 105000000.0)) {
tmp = (b * c) + (-4.0 * (t * a));
} else {
tmp = (j * (k * -27.0)) + (b * c);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (a <= -1.6e+110) or not (a <= 105000000.0): tmp = (b * c) + (-4.0 * (t * a)) else: tmp = (j * (k * -27.0)) + (b * c) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((a <= -1.6e+110) || !(a <= 105000000.0)) tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); else tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(b * c)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((a <= -1.6e+110) || ~((a <= 105000000.0)))
tmp = (b * c) + (-4.0 * (t * a));
else
tmp = (j * (k * -27.0)) + (b * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[a, -1.6e+110], N[Not[LessEqual[a, 105000000.0]], $MachinePrecision]], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.6 \cdot 10^{+110} \lor \neg \left(a \leq 105000000\right):\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + b \cdot c\\
\end{array}
\end{array}
if a < -1.59999999999999997e110 or 1.05e8 < a Initial program 76.7%
Simplified78.7%
Taylor expanded in k around inf 76.1%
Taylor expanded in x around 0 66.6%
Taylor expanded in k around 0 56.8%
if -1.59999999999999997e110 < a < 1.05e8Initial program 86.6%
Simplified89.8%
Taylor expanded in b around inf 51.6%
Final simplification53.7%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -2.75e+56) (not (<= (* b c) 1.85e+93))) (* b c) (* -27.0 (* j k))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -2.75e+56) || !((b * c) <= 1.85e+93)) {
tmp = b * c;
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((b * c) <= (-2.75d+56)) .or. (.not. ((b * c) <= 1.85d+93))) then
tmp = b * c
else
tmp = (-27.0d0) * (j * k)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -2.75e+56) || !((b * c) <= 1.85e+93)) {
tmp = b * c;
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -2.75e+56) or not ((b * c) <= 1.85e+93): tmp = b * c else: tmp = -27.0 * (j * k) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -2.75e+56) || !(Float64(b * c) <= 1.85e+93)) tmp = Float64(b * c); else tmp = Float64(-27.0 * Float64(j * k)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((b * c) <= -2.75e+56) || ~(((b * c) <= 1.85e+93)))
tmp = b * c;
else
tmp = -27.0 * (j * k);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -2.75e+56], N[Not[LessEqual[N[(b * c), $MachinePrecision], 1.85e+93]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -2.75 \cdot 10^{+56} \lor \neg \left(b \cdot c \leq 1.85 \cdot 10^{+93}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -2.7500000000000001e56 or 1.84999999999999994e93 < (*.f64 b c) Initial program 81.5%
pow181.5%
associate-*l*77.8%
*-commutative77.8%
Applied egg-rr77.8%
unpow177.8%
associate-*l*84.9%
*-commutative84.9%
Simplified84.9%
Taylor expanded in b around inf 47.6%
if -2.7500000000000001e56 < (*.f64 b c) < 1.84999999999999994e93Initial program 83.5%
Simplified86.3%
Taylor expanded in j around inf 32.2%
Final simplification38.6%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (<= k -6.5e+89) (* -27.0 (* j k)) (if (<= k 6.8e+211) (+ (* b c) (* -4.0 (* t a))) (* k (* j -27.0)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (k <= -6.5e+89) {
tmp = -27.0 * (j * k);
} else if (k <= 6.8e+211) {
tmp = (b * c) + (-4.0 * (t * a));
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (k <= (-6.5d+89)) then
tmp = (-27.0d0) * (j * k)
else if (k <= 6.8d+211) then
tmp = (b * c) + ((-4.0d0) * (t * a))
else
tmp = k * (j * (-27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (k <= -6.5e+89) {
tmp = -27.0 * (j * k);
} else if (k <= 6.8e+211) {
tmp = (b * c) + (-4.0 * (t * a));
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if k <= -6.5e+89: tmp = -27.0 * (j * k) elif k <= 6.8e+211: tmp = (b * c) + (-4.0 * (t * a)) else: tmp = k * (j * -27.0) return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (k <= -6.5e+89) tmp = Float64(-27.0 * Float64(j * k)); elseif (k <= 6.8e+211) tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); else tmp = Float64(k * Float64(j * -27.0)); end return tmp end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (k <= -6.5e+89)
tmp = -27.0 * (j * k);
elseif (k <= 6.8e+211)
tmp = (b * c) + (-4.0 * (t * a));
else
tmp = k * (j * -27.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[k, -6.5e+89], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 6.8e+211], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq -6.5 \cdot 10^{+89}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;k \leq 6.8 \cdot 10^{+211}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\end{array}
\end{array}
if k < -6.4999999999999996e89Initial program 73.8%
Simplified81.5%
Taylor expanded in j around inf 44.9%
if -6.4999999999999996e89 < k < 6.7999999999999998e211Initial program 84.7%
Simplified87.4%
Taylor expanded in k around inf 69.7%
Taylor expanded in x around 0 51.1%
Taylor expanded in k around 0 47.3%
if 6.7999999999999998e211 < k Initial program 87.4%
Simplified83.1%
Taylor expanded in i around inf 67.8%
Taylor expanded in k around inf 68.0%
Taylor expanded in k around inf 59.1%
associate-*r*59.2%
*-commutative59.2%
Simplified59.2%
Final simplification47.9%
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (* b c))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = b * c
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k]) def code(x, y, z, t, a, b, c, i, j, k): return b * c
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k]) function code(x, y, z, t, a, b, c, i, j, k) return Float64(b * c) end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
tmp = b * c;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(b * c), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
b \cdot c
\end{array}
Initial program 82.7%
pow182.7%
associate-*l*81.5%
*-commutative81.5%
Applied egg-rr81.5%
unpow181.5%
associate-*l*86.7%
*-commutative86.7%
Simplified86.7%
Taylor expanded in b around inf 22.9%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (+ (* a t) (* i x)) 4.0))
(t_2
(-
(- (* (* 18.0 t) (* (* x y) z)) t_1)
(- (* (* k j) 27.0) (* c b)))))
(if (< t -1.6210815397541398e-69)
t_2
(if (< t 165.68027943805222)
(+ (- (* (* 18.0 y) (* x (* z t))) t_1) (- (* c b) (* 27.0 (* k j))))
t_2))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((a * t) + (i * x)) * 4.0;
double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
double tmp;
if (t < -1.6210815397541398e-69) {
tmp = t_2;
} else if (t < 165.68027943805222) {
tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
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), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((a * t) + (i * x)) * 4.0d0
t_2 = (((18.0d0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0d0) - (c * b))
if (t < (-1.6210815397541398d-69)) then
tmp = t_2
else if (t < 165.68027943805222d0) then
tmp = (((18.0d0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0d0 * (k * j)))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((a * t) + (i * x)) * 4.0;
double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
double tmp;
if (t < -1.6210815397541398e-69) {
tmp = t_2;
} else if (t < 165.68027943805222) {
tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = ((a * t) + (i * x)) * 4.0 t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b)) tmp = 0 if t < -1.6210815397541398e-69: tmp = t_2 elif t < 165.68027943805222: tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(a * t) + Float64(i * x)) * 4.0) t_2 = Float64(Float64(Float64(Float64(18.0 * t) * Float64(Float64(x * y) * z)) - t_1) - Float64(Float64(Float64(k * j) * 27.0) - Float64(c * b))) tmp = 0.0 if (t < -1.6210815397541398e-69) tmp = t_2; elseif (t < 165.68027943805222) tmp = Float64(Float64(Float64(Float64(18.0 * y) * Float64(x * Float64(z * t))) - t_1) + Float64(Float64(c * b) - Float64(27.0 * Float64(k * j)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = ((a * t) + (i * x)) * 4.0; t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b)); tmp = 0.0; if (t < -1.6210815397541398e-69) tmp = t_2; elseif (t < 165.68027943805222) tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(a * t), $MachinePrecision] + N[(i * x), $MachinePrecision]), $MachinePrecision] * 4.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(18.0 * t), $MachinePrecision] * N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - N[(N[(N[(k * j), $MachinePrecision] * 27.0), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.6210815397541398e-69], t$95$2, If[Less[t, 165.68027943805222], N[(N[(N[(N[(18.0 * y), $MachinePrecision] * N[(x * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] + N[(N[(c * b), $MachinePrecision] - N[(27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot t + i \cdot x\right) \cdot 4\\
t_2 := \left(\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right) - t\_1\right) - \left(\left(k \cdot j\right) \cdot 27 - c \cdot b\right)\\
\mathbf{if}\;t < -1.6210815397541398 \cdot 10^{-69}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t < 165.68027943805222:\\
\;\;\;\;\left(\left(18 \cdot y\right) \cdot \left(x \cdot \left(z \cdot t\right)\right) - t\_1\right) + \left(c \cdot b - 27 \cdot \left(k \cdot j\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024118
(FPCore (x y z t a b c i j k)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, E"
:precision binary64
:alt
(! :herbie-platform default (if (< t -8105407698770699/5000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (- (* (* 18 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4)) (- (* (* k j) 27) (* c b))) (if (< t 8284013971902611/50000000000000) (+ (- (* (* 18 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4)) (- (* c b) (* 27 (* k j)))) (- (- (* (* 18 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4)) (- (* (* k j) 27) (* c b))))))
(- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))