
(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 23 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
(let* ((t_1
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))))
(if (<= t_1 5e+272)
(- t_1 (* (* j 27.0) k))
(fma c b (- (* t (fma (* x 18.0) (* y z) (* a -4.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 t_1 = ((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i);
double tmp;
if (t_1 <= 5e+272) {
tmp = t_1 - ((j * 27.0) * k);
} else {
tmp = fma(c, b, ((t * fma((x * 18.0), (y * z), (a * -4.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) t_1 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) tmp = 0.0 if (t_1 <= 5e+272) tmp = Float64(t_1 - Float64(Float64(j * 27.0) * k)); else tmp = fma(c, b, Float64(Float64(t * fma(Float64(x * 18.0), Float64(y * z), Float64(a * -4.0))) - Float64(4.0 * Float64(x * i)))); 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_] := Block[{t$95$1 = N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 5e+272], N[(t$95$1 - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(c * b + N[(N[(t * N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * 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 := \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\\
\mathbf{if}\;t_1 \leq 5 \cdot 10^{+272}:\\
\;\;\;\;t_1 - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(c, b, t \cdot \mathsf{fma}\left(x \cdot 18, y \cdot z, a \cdot -4\right) - 4 \cdot \left(x \cdot i\right)\right)\\
\end{array}
\end{array}
if (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) < 4.99999999999999973e272Initial program 94.8%
if 4.99999999999999973e272 < (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) Initial program 59.3%
Simplified79.7%
Taylor expanded in j around 0 80.9%
associate--l+80.9%
*-commutative80.9%
fma-def84.5%
cancel-sign-sub-inv84.5%
associate-*r*84.6%
metadata-eval84.6%
fma-def84.6%
*-commutative84.6%
*-commutative84.6%
Applied egg-rr84.6%
Final simplification91.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
(let* ((t_1
(-
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))
(* (* j 27.0) k))))
(if (<= t_1 5e+299)
t_1
(+
(fma x (fma -4.0 i (* (* y t) (* 18.0 z))) (* b c))
(* 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 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double tmp;
if (t_1 <= 5e+299) {
tmp = t_1;
} else {
tmp = fma(x, fma(-4.0, i, ((y * t) * (18.0 * z))), (b * c)) + (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(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) tmp = 0.0 if (t_1 <= 5e+299) tmp = t_1; else tmp = Float64(fma(x, fma(-4.0, i, Float64(Float64(y * t) * Float64(18.0 * z))), Float64(b * c)) + Float64(j * Float64(k * -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_] := Block[{t$95$1 = N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $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]}, If[LessEqual[t$95$1, 5e+299], t$95$1, N[(N[(x * N[(-4.0 * i + N[(N[(y * t), $MachinePrecision] * N[(18.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -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}
t_1 := \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t_1 \leq 5 \cdot 10^{+299}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, \mathsf{fma}\left(-4, i, \left(y \cdot t\right) \cdot \left(18 \cdot z\right)\right), b \cdot c\right) + j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < 5.0000000000000003e299Initial program 98.7%
if 5.0000000000000003e299 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) Initial program 57.0%
Simplified79.0%
Taylor expanded in a around 0 68.8%
associate-+r+68.8%
associate-*r*68.8%
*-commutative68.8%
associate-*r*71.7%
associate-*l*71.7%
distribute-rgt-in74.9%
fma-def74.9%
fma-def74.9%
*-commutative74.9%
associate-*r*77.9%
associate-*l*77.9%
*-commutative77.9%
Simplified77.9%
Final simplification91.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
(let* ((t_1
(-
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))
(* (* j 27.0) k))))
(if (<= t_1 INFINITY)
t_1
(fma c b (* t (fma (* x 18.0) (* y z) (* a -4.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 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = fma(c, b, (t * fma((x * 18.0), (y * z), (a * -4.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(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = fma(c, b, Float64(t * fma(Float64(x * 18.0), Float64(y * z), Float64(a * -4.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_] := Block[{t$95$1 = N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $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]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(c * b + N[(t * N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision] + N[(a * -4.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 := \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(c, b, t \cdot \mathsf{fma}\left(x \cdot 18, y \cdot z, a \cdot -4\right)\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < +inf.0Initial program 94.5%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) Initial program 0.0%
Simplified40.0%
Taylor expanded in j around 0 46.7%
Taylor expanded in i around 0 47.2%
*-commutative47.2%
fma-def53.8%
cancel-sign-sub-inv53.8%
associate-*r*53.8%
metadata-eval53.8%
fma-def53.8%
*-commutative53.8%
Applied egg-rr53.8%
Final simplification89.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
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))))
(if (<= t_1 5e+272)
(- t_1 (* (* j 27.0) k))
(-
(+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.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 t_1 = ((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i);
double tmp;
if (t_1 <= 5e+272) {
tmp = t_1 - ((j * 27.0) * k);
} else {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.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) :: t_1
real(8) :: tmp
t_1 = ((((((x * 18.0d0) * y) * z) * t) - (t * (a * 4.0d0))) + (b * c)) - ((x * 4.0d0) * i)
if (t_1 <= 5d+272) then
tmp = t_1 - ((j * 27.0d0) * k)
else
tmp = ((b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.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 t_1 = ((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i);
double tmp;
if (t_1 <= 5e+272) {
tmp = t_1 - ((j * 27.0) * k);
} else {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.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): t_1 = ((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i) tmp = 0 if t_1 <= 5e+272: tmp = t_1 - ((j * 27.0) * k) else: tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.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) t_1 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) tmp = 0.0 if (t_1 <= 5e+272) tmp = Float64(t_1 - Float64(Float64(j * 27.0) * k)); else tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.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)
t_1 = ((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i);
tmp = 0.0;
if (t_1 <= 5e+272)
tmp = t_1 - ((j * 27.0) * k);
else
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.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_] := Block[{t$95$1 = N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 5e+272], N[(t$95$1 - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $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[(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}
t_1 := \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\\
\mathbf{if}\;t_1 \leq 5 \cdot 10^{+272}:\\
\;\;\;\;t_1 - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - 4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) < 4.99999999999999973e272Initial program 94.8%
if 4.99999999999999973e272 < (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) Initial program 59.3%
Simplified79.7%
Taylor expanded in j around 0 80.9%
Final simplification90.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 (- (* b c) (* 4.0 (* x i))))
(t_2 (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))))
(if (<= x -4.5e+32)
t_2
(if (<= x 3.6e-274)
(- (* b c) (* 27.0 (* j k)))
(if (<= x 5.15e-76)
(+ (* j (* k -27.0)) (* t (* a -4.0)))
(if (<= x 2.1e+40)
t_1
(if (<= x 7.1e+109)
(* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
(if (<= x 1.55e+151) t_1 t_2))))))))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 = (b * c) - (4.0 * (x * i));
double t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double tmp;
if (x <= -4.5e+32) {
tmp = t_2;
} else if (x <= 3.6e-274) {
tmp = (b * c) - (27.0 * (j * k));
} else if (x <= 5.15e-76) {
tmp = (j * (k * -27.0)) + (t * (a * -4.0));
} else if (x <= 2.1e+40) {
tmp = t_1;
} else if (x <= 7.1e+109) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (x <= 1.55e+151) {
tmp = t_1;
} else {
tmp = t_2;
}
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 = (b * c) - (4.0d0 * (x * i))
t_2 = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
if (x <= (-4.5d+32)) then
tmp = t_2
else if (x <= 3.6d-274) then
tmp = (b * c) - (27.0d0 * (j * k))
else if (x <= 5.15d-76) then
tmp = (j * (k * (-27.0d0))) + (t * (a * (-4.0d0)))
else if (x <= 2.1d+40) then
tmp = t_1
else if (x <= 7.1d+109) then
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
else if (x <= 1.55d+151) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && 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 = (b * c) - (4.0 * (x * i));
double t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double tmp;
if (x <= -4.5e+32) {
tmp = t_2;
} else if (x <= 3.6e-274) {
tmp = (b * c) - (27.0 * (j * k));
} else if (x <= 5.15e-76) {
tmp = (j * (k * -27.0)) + (t * (a * -4.0));
} else if (x <= 2.1e+40) {
tmp = t_1;
} else if (x <= 7.1e+109) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (x <= 1.55e+151) {
tmp = t_1;
} else {
tmp = t_2;
}
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 = (b * c) - (4.0 * (x * i)) t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i)) tmp = 0 if x <= -4.5e+32: tmp = t_2 elif x <= 3.6e-274: tmp = (b * c) - (27.0 * (j * k)) elif x <= 5.15e-76: tmp = (j * (k * -27.0)) + (t * (a * -4.0)) elif x <= 2.1e+40: tmp = t_1 elif x <= 7.1e+109: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) elif x <= 1.55e+151: tmp = t_1 else: tmp = t_2 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(b * c) - Float64(4.0 * Float64(x * i))) t_2 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))) tmp = 0.0 if (x <= -4.5e+32) tmp = t_2; elseif (x <= 3.6e-274) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); elseif (x <= 5.15e-76) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(t * Float64(a * -4.0))); elseif (x <= 2.1e+40) tmp = t_1; elseif (x <= 7.1e+109) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); elseif (x <= 1.55e+151) tmp = t_1; else tmp = t_2; 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 = (b * c) - (4.0 * (x * i));
t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
tmp = 0.0;
if (x <= -4.5e+32)
tmp = t_2;
elseif (x <= 3.6e-274)
tmp = (b * c) - (27.0 * (j * k));
elseif (x <= 5.15e-76)
tmp = (j * (k * -27.0)) + (t * (a * -4.0));
elseif (x <= 2.1e+40)
tmp = t_1;
elseif (x <= 7.1e+109)
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
elseif (x <= 1.55e+151)
tmp = t_1;
else
tmp = t_2;
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[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.5e+32], t$95$2, If[LessEqual[x, 3.6e-274], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.15e-76], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.1e+40], t$95$1, If[LessEqual[x, 7.1e+109], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.55e+151], t$95$1, t$95$2]]]]]]]]
\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 := b \cdot c - 4 \cdot \left(x \cdot i\right)\\
t_2 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{if}\;x \leq -4.5 \cdot 10^{+32}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 3.6 \cdot 10^{-274}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;x \leq 5.15 \cdot 10^{-76}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;x \leq 2.1 \cdot 10^{+40}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 7.1 \cdot 10^{+109}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;x \leq 1.55 \cdot 10^{+151}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if x < -4.5000000000000003e32 or 1.5500000000000001e151 < x Initial program 70.0%
Simplified85.0%
Taylor expanded in x around inf 70.4%
if -4.5000000000000003e32 < x < 3.59999999999999983e-274Initial program 95.0%
Simplified89.1%
Taylor expanded in i around 0 84.5%
Taylor expanded in t around 0 70.6%
if 3.59999999999999983e-274 < x < 5.1500000000000002e-76Initial program 97.1%
Simplified91.2%
Taylor expanded in a around inf 77.0%
*-commutative77.0%
*-commutative77.0%
associate-*r*77.0%
*-commutative77.0%
Simplified77.0%
if 5.1500000000000002e-76 < x < 2.1000000000000001e40 or 7.1000000000000003e109 < x < 1.5500000000000001e151Initial program 77.1%
Simplified85.6%
Taylor expanded in j around 0 79.0%
Taylor expanded in t around 0 72.8%
if 2.1000000000000001e40 < x < 7.1000000000000003e109Initial program 86.7%
Simplified93.1%
Taylor expanded in j around 0 87.5%
Taylor expanded in t around inf 61.0%
Final simplification71.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
(let* ((t_1 (- (* b c) (* 4.0 (* x i)))))
(if (<= x -3.6e+32)
(* x (- (* 18.0 (* z (* y t))) (* 4.0 i)))
(if (<= x 6.8e-274)
(- (* b c) (* 27.0 (* j k)))
(if (<= x 2.15e-73)
(+ (* j (* k -27.0)) (* t (* a -4.0)))
(if (<= x 1.55e+40)
t_1
(if (<= x 7.2e+104)
(* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
(if (<= x 1.7e+151)
t_1
(* x (- (* 18.0 (* t (* y z))) (* 4.0 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 = (b * c) - (4.0 * (x * i));
double tmp;
if (x <= -3.6e+32) {
tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i));
} else if (x <= 6.8e-274) {
tmp = (b * c) - (27.0 * (j * k));
} else if (x <= 2.15e-73) {
tmp = (j * (k * -27.0)) + (t * (a * -4.0));
} else if (x <= 1.55e+40) {
tmp = t_1;
} else if (x <= 7.2e+104) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (x <= 1.7e+151) {
tmp = t_1;
} else {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * 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 = (b * c) - (4.0d0 * (x * i))
if (x <= (-3.6d+32)) then
tmp = x * ((18.0d0 * (z * (y * t))) - (4.0d0 * i))
else if (x <= 6.8d-274) then
tmp = (b * c) - (27.0d0 * (j * k))
else if (x <= 2.15d-73) then
tmp = (j * (k * (-27.0d0))) + (t * (a * (-4.0d0)))
else if (x <= 1.55d+40) then
tmp = t_1
else if (x <= 7.2d+104) then
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
else if (x <= 1.7d+151) then
tmp = t_1
else
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * 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 = (b * c) - (4.0 * (x * i));
double tmp;
if (x <= -3.6e+32) {
tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i));
} else if (x <= 6.8e-274) {
tmp = (b * c) - (27.0 * (j * k));
} else if (x <= 2.15e-73) {
tmp = (j * (k * -27.0)) + (t * (a * -4.0));
} else if (x <= 1.55e+40) {
tmp = t_1;
} else if (x <= 7.2e+104) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (x <= 1.7e+151) {
tmp = t_1;
} else {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * 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 = (b * c) - (4.0 * (x * i)) tmp = 0 if x <= -3.6e+32: tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i)) elif x <= 6.8e-274: tmp = (b * c) - (27.0 * (j * k)) elif x <= 2.15e-73: tmp = (j * (k * -27.0)) + (t * (a * -4.0)) elif x <= 1.55e+40: tmp = t_1 elif x <= 7.2e+104: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) elif x <= 1.7e+151: tmp = t_1 else: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * 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(Float64(b * c) - Float64(4.0 * Float64(x * i))) tmp = 0.0 if (x <= -3.6e+32) tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) - Float64(4.0 * i))); elseif (x <= 6.8e-274) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); elseif (x <= 2.15e-73) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(t * Float64(a * -4.0))); elseif (x <= 1.55e+40) tmp = t_1; elseif (x <= 7.2e+104) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); elseif (x <= 1.7e+151) tmp = t_1; else tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * 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 = (b * c) - (4.0 * (x * i));
tmp = 0.0;
if (x <= -3.6e+32)
tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i));
elseif (x <= 6.8e-274)
tmp = (b * c) - (27.0 * (j * k));
elseif (x <= 2.15e-73)
tmp = (j * (k * -27.0)) + (t * (a * -4.0));
elseif (x <= 1.55e+40)
tmp = t_1;
elseif (x <= 7.2e+104)
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
elseif (x <= 1.7e+151)
tmp = t_1;
else
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * 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[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.6e+32], N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.8e-274], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.15e-73], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.55e+40], t$95$1, If[LessEqual[x, 7.2e+104], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.7e+151], t$95$1, N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * 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}
t_1 := b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;x \leq -3.6 \cdot 10^{+32}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;x \leq 6.8 \cdot 10^{-274}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;x \leq 2.15 \cdot 10^{-73}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;x \leq 1.55 \cdot 10^{+40}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 7.2 \cdot 10^{+104}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;x \leq 1.7 \cdot 10^{+151}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\end{array}
\end{array}
if x < -3.5999999999999997e32Initial program 71.4%
Simplified83.9%
Taylor expanded in x around inf 70.1%
expm1-log1p-u47.8%
expm1-udef47.8%
Applied egg-rr47.8%
expm1-def47.8%
expm1-log1p70.1%
associate-*r*68.3%
*-commutative68.3%
Simplified68.3%
if -3.5999999999999997e32 < x < 6.79999999999999962e-274Initial program 95.0%
Simplified89.1%
Taylor expanded in i around 0 84.5%
Taylor expanded in t around 0 70.6%
if 6.79999999999999962e-274 < x < 2.1499999999999999e-73Initial program 97.1%
Simplified91.2%
Taylor expanded in a around inf 77.0%
*-commutative77.0%
*-commutative77.0%
associate-*r*77.0%
*-commutative77.0%
Simplified77.0%
if 2.1499999999999999e-73 < x < 1.5499999999999999e40 or 7.20000000000000001e104 < x < 1.7e151Initial program 77.1%
Simplified85.6%
Taylor expanded in j around 0 79.0%
Taylor expanded in t around 0 72.8%
if 1.5499999999999999e40 < x < 7.20000000000000001e104Initial program 86.7%
Simplified93.1%
Taylor expanded in j around 0 87.5%
Taylor expanded in t around inf 61.0%
if 1.7e151 < x Initial program 67.8%
Simplified86.5%
Taylor expanded in x around inf 70.9%
Final simplification70.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 (- (* b c) (* 4.0 (* x i)))) (t_2 (* j (* k -27.0))))
(if (<= x -2.8e+32)
(* x (- (* 18.0 (* z (* y t))) (* 4.0 i)))
(if (<= x 1.5e-274)
(- (* b c) (* 27.0 (* j k)))
(if (<= x 2e-73)
(+ t_2 (* t (* a -4.0)))
(if (<= x 4.3e+61)
t_1
(if (<= x 4.8e+110)
(+ t_2 (* 18.0 (* t (* y (* x z)))))
(if (<= x 1.7e+151)
t_1
(* x (- (* 18.0 (* t (* y z))) (* 4.0 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 = (b * c) - (4.0 * (x * i));
double t_2 = j * (k * -27.0);
double tmp;
if (x <= -2.8e+32) {
tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i));
} else if (x <= 1.5e-274) {
tmp = (b * c) - (27.0 * (j * k));
} else if (x <= 2e-73) {
tmp = t_2 + (t * (a * -4.0));
} else if (x <= 4.3e+61) {
tmp = t_1;
} else if (x <= 4.8e+110) {
tmp = t_2 + (18.0 * (t * (y * (x * z))));
} else if (x <= 1.7e+151) {
tmp = t_1;
} else {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * 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) :: t_2
real(8) :: tmp
t_1 = (b * c) - (4.0d0 * (x * i))
t_2 = j * (k * (-27.0d0))
if (x <= (-2.8d+32)) then
tmp = x * ((18.0d0 * (z * (y * t))) - (4.0d0 * i))
else if (x <= 1.5d-274) then
tmp = (b * c) - (27.0d0 * (j * k))
else if (x <= 2d-73) then
tmp = t_2 + (t * (a * (-4.0d0)))
else if (x <= 4.3d+61) then
tmp = t_1
else if (x <= 4.8d+110) then
tmp = t_2 + (18.0d0 * (t * (y * (x * z))))
else if (x <= 1.7d+151) then
tmp = t_1
else
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * 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 = (b * c) - (4.0 * (x * i));
double t_2 = j * (k * -27.0);
double tmp;
if (x <= -2.8e+32) {
tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i));
} else if (x <= 1.5e-274) {
tmp = (b * c) - (27.0 * (j * k));
} else if (x <= 2e-73) {
tmp = t_2 + (t * (a * -4.0));
} else if (x <= 4.3e+61) {
tmp = t_1;
} else if (x <= 4.8e+110) {
tmp = t_2 + (18.0 * (t * (y * (x * z))));
} else if (x <= 1.7e+151) {
tmp = t_1;
} else {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * 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 = (b * c) - (4.0 * (x * i)) t_2 = j * (k * -27.0) tmp = 0 if x <= -2.8e+32: tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i)) elif x <= 1.5e-274: tmp = (b * c) - (27.0 * (j * k)) elif x <= 2e-73: tmp = t_2 + (t * (a * -4.0)) elif x <= 4.3e+61: tmp = t_1 elif x <= 4.8e+110: tmp = t_2 + (18.0 * (t * (y * (x * z)))) elif x <= 1.7e+151: tmp = t_1 else: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * 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(Float64(b * c) - Float64(4.0 * Float64(x * i))) t_2 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (x <= -2.8e+32) tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) - Float64(4.0 * i))); elseif (x <= 1.5e-274) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); elseif (x <= 2e-73) tmp = Float64(t_2 + Float64(t * Float64(a * -4.0))); elseif (x <= 4.3e+61) tmp = t_1; elseif (x <= 4.8e+110) tmp = Float64(t_2 + Float64(18.0 * Float64(t * Float64(y * Float64(x * z))))); elseif (x <= 1.7e+151) tmp = t_1; else tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * 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 = (b * c) - (4.0 * (x * i));
t_2 = j * (k * -27.0);
tmp = 0.0;
if (x <= -2.8e+32)
tmp = x * ((18.0 * (z * (y * t))) - (4.0 * i));
elseif (x <= 1.5e-274)
tmp = (b * c) - (27.0 * (j * k));
elseif (x <= 2e-73)
tmp = t_2 + (t * (a * -4.0));
elseif (x <= 4.3e+61)
tmp = t_1;
elseif (x <= 4.8e+110)
tmp = t_2 + (18.0 * (t * (y * (x * z))));
elseif (x <= 1.7e+151)
tmp = t_1;
else
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * 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[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.8e+32], N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.5e-274], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2e-73], N[(t$95$2 + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.3e+61], t$95$1, If[LessEqual[x, 4.8e+110], N[(t$95$2 + N[(18.0 * N[(t * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.7e+151], t$95$1, N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * 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}
t_1 := b \cdot c - 4 \cdot \left(x \cdot i\right)\\
t_2 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;x \leq -2.8 \cdot 10^{+32}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;x \leq 1.5 \cdot 10^{-274}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;x \leq 2 \cdot 10^{-73}:\\
\;\;\;\;t_2 + t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;x \leq 4.3 \cdot 10^{+61}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{+110}:\\
\;\;\;\;t_2 + 18 \cdot \left(t \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{elif}\;x \leq 1.7 \cdot 10^{+151}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\end{array}
\end{array}
if x < -2.8e32Initial program 71.4%
Simplified83.9%
Taylor expanded in x around inf 70.1%
expm1-log1p-u47.8%
expm1-udef47.8%
Applied egg-rr47.8%
expm1-def47.8%
expm1-log1p70.1%
associate-*r*68.3%
*-commutative68.3%
Simplified68.3%
if -2.8e32 < x < 1.49999999999999989e-274Initial program 95.0%
Simplified89.1%
Taylor expanded in i around 0 84.5%
Taylor expanded in t around 0 70.6%
if 1.49999999999999989e-274 < x < 1.99999999999999999e-73Initial program 97.1%
Simplified91.2%
Taylor expanded in a around inf 77.0%
*-commutative77.0%
*-commutative77.0%
associate-*r*77.0%
*-commutative77.0%
Simplified77.0%
if 1.99999999999999999e-73 < x < 4.3000000000000001e61 or 4.80000000000000025e110 < x < 1.7e151Initial program 78.0%
Simplified85.2%
Taylor expanded in j around 0 82.1%
Taylor expanded in t around 0 69.5%
if 4.3000000000000001e61 < x < 4.80000000000000025e110Initial program 89.0%
Simplified99.8%
Taylor expanded in y around inf 68.0%
*-commutative68.0%
Simplified68.0%
Taylor expanded in x around 0 68.0%
*-commutative68.0%
associate-*l*68.0%
Simplified68.0%
if 1.7e151 < x Initial program 67.8%
Simplified86.5%
Taylor expanded in x around inf 70.9%
Final simplification70.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 (* 27.0 (* j k))))
(if (or (<= t -2.5e-87)
(not
(or (<= t 3.7e-144)
(and (not (<= t 9.5e-78)) (<= t 2100000000.0)))))
(- (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))) t_1)
(- (* b c) (+ (* 4.0 (* x i)) 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 = 27.0 * (j * k);
double tmp;
if ((t <= -2.5e-87) || !((t <= 3.7e-144) || (!(t <= 9.5e-78) && (t <= 2100000000.0)))) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_1;
} else {
tmp = (b * c) - ((4.0 * (x * i)) + 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 = 27.0d0 * (j * k)
if ((t <= (-2.5d-87)) .or. (.not. (t <= 3.7d-144) .or. (.not. (t <= 9.5d-78)) .and. (t <= 2100000000.0d0))) then
tmp = ((b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))) - t_1
else
tmp = (b * c) - ((4.0d0 * (x * i)) + 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 = 27.0 * (j * k);
double tmp;
if ((t <= -2.5e-87) || !((t <= 3.7e-144) || (!(t <= 9.5e-78) && (t <= 2100000000.0)))) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_1;
} else {
tmp = (b * c) - ((4.0 * (x * i)) + 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 = 27.0 * (j * k) tmp = 0 if (t <= -2.5e-87) or not ((t <= 3.7e-144) or (not (t <= 9.5e-78) and (t <= 2100000000.0))): tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_1 else: tmp = (b * c) - ((4.0 * (x * i)) + 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(27.0 * Float64(j * k)) tmp = 0.0 if ((t <= -2.5e-87) || !((t <= 3.7e-144) || (!(t <= 9.5e-78) && (t <= 2100000000.0)))) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) - t_1); else tmp = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(x * i)) + 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 = 27.0 * (j * k);
tmp = 0.0;
if ((t <= -2.5e-87) || ~(((t <= 3.7e-144) || (~((t <= 9.5e-78)) && (t <= 2100000000.0)))))
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - t_1;
else
tmp = (b * c) - ((4.0 * (x * i)) + 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[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t, -2.5e-87], N[Not[Or[LessEqual[t, 3.7e-144], And[N[Not[LessEqual[t, 9.5e-78]], $MachinePrecision], LessEqual[t, 2100000000.0]]]], $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] - t$95$1), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + t$95$1), $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}\;t \leq -2.5 \cdot 10^{-87} \lor \neg \left(t \leq 3.7 \cdot 10^{-144} \lor \neg \left(t \leq 9.5 \cdot 10^{-78}\right) \land t \leq 2100000000\right):\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - t_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + t_1\right)\\
\end{array}
\end{array}
if t < -2.50000000000000021e-87 or 3.7000000000000003e-144 < t < 9.4999999999999997e-78 or 2.1e9 < t Initial program 84.4%
Simplified90.0%
Taylor expanded in i around 0 85.3%
if -2.50000000000000021e-87 < t < 3.7000000000000003e-144 or 9.4999999999999997e-78 < t < 2.1e9Initial program 81.8%
Simplified83.8%
Taylor expanded in t around 0 91.5%
Final simplification87.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
(let* ((t_1 (* 27.0 (* j k)))
(t_2 (- (* b c) (+ (* 4.0 (* x i)) t_1)))
(t_3 (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))
(if (<= t -7e+142)
t_3
(if (<= t -1.35e+76)
t_2
(if (<= t -2.35e+27)
(+ (* j (* k -27.0)) (* 18.0 (* t (* y (* x z)))))
(if (<= t 920000000.0)
t_2
(if (<= t 3e+166) (- (+ (* b c) (* -4.0 (* t a))) t_1) t_3)))))))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 t_2 = (b * c) - ((4.0 * (x * i)) + t_1);
double t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -7e+142) {
tmp = t_3;
} else if (t <= -1.35e+76) {
tmp = t_2;
} else if (t <= -2.35e+27) {
tmp = (j * (k * -27.0)) + (18.0 * (t * (y * (x * z))));
} else if (t <= 920000000.0) {
tmp = t_2;
} else if (t <= 3e+166) {
tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
} else {
tmp = t_3;
}
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) :: t_3
real(8) :: tmp
t_1 = 27.0d0 * (j * k)
t_2 = (b * c) - ((4.0d0 * (x * i)) + t_1)
t_3 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
if (t <= (-7d+142)) then
tmp = t_3
else if (t <= (-1.35d+76)) then
tmp = t_2
else if (t <= (-2.35d+27)) then
tmp = (j * (k * (-27.0d0))) + (18.0d0 * (t * (y * (x * z))))
else if (t <= 920000000.0d0) then
tmp = t_2
else if (t <= 3d+166) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - t_1
else
tmp = t_3
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 t_2 = (b * c) - ((4.0 * (x * i)) + t_1);
double t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -7e+142) {
tmp = t_3;
} else if (t <= -1.35e+76) {
tmp = t_2;
} else if (t <= -2.35e+27) {
tmp = (j * (k * -27.0)) + (18.0 * (t * (y * (x * z))));
} else if (t <= 920000000.0) {
tmp = t_2;
} else if (t <= 3e+166) {
tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
} else {
tmp = t_3;
}
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) t_2 = (b * c) - ((4.0 * (x * i)) + t_1) t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0)) tmp = 0 if t <= -7e+142: tmp = t_3 elif t <= -1.35e+76: tmp = t_2 elif t <= -2.35e+27: tmp = (j * (k * -27.0)) + (18.0 * (t * (y * (x * z)))) elif t <= 920000000.0: tmp = t_2 elif t <= 3e+166: tmp = ((b * c) + (-4.0 * (t * a))) - t_1 else: tmp = t_3 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)) t_2 = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(x * i)) + t_1)) t_3 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))) tmp = 0.0 if (t <= -7e+142) tmp = t_3; elseif (t <= -1.35e+76) tmp = t_2; elseif (t <= -2.35e+27) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(18.0 * Float64(t * Float64(y * Float64(x * z))))); elseif (t <= 920000000.0) tmp = t_2; elseif (t <= 3e+166) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - t_1); else tmp = t_3; 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);
t_2 = (b * c) - ((4.0 * (x * i)) + t_1);
t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
tmp = 0.0;
if (t <= -7e+142)
tmp = t_3;
elseif (t <= -1.35e+76)
tmp = t_2;
elseif (t <= -2.35e+27)
tmp = (j * (k * -27.0)) + (18.0 * (t * (y * (x * z))));
elseif (t <= 920000000.0)
tmp = t_2;
elseif (t <= 3e+166)
tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
else
tmp = t_3;
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]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7e+142], t$95$3, If[LessEqual[t, -1.35e+76], t$95$2, If[LessEqual[t, -2.35e+27], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(18.0 * N[(t * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 920000000.0], t$95$2, If[LessEqual[t, 3e+166], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], t$95$3]]]]]]]]
\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)\\
t_2 := b \cdot c - \left(4 \cdot \left(x \cdot i\right) + t_1\right)\\
t_3 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -7 \cdot 10^{+142}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq -1.35 \cdot 10^{+76}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -2.35 \cdot 10^{+27}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + 18 \cdot \left(t \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{elif}\;t \leq 920000000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 3 \cdot 10^{+166}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if t < -6.99999999999999995e142 or 2.99999999999999998e166 < t Initial program 81.0%
Simplified89.7%
Taylor expanded in j around 0 80.5%
Taylor expanded in t around inf 82.1%
if -6.99999999999999995e142 < t < -1.34999999999999995e76 or -2.34999999999999988e27 < t < 9.2e8Initial program 84.1%
Simplified88.2%
Taylor expanded in t around 0 83.3%
if -1.34999999999999995e76 < t < -2.34999999999999988e27Initial program 77.6%
Simplified67.0%
Taylor expanded in y around inf 78.3%
*-commutative78.3%
Simplified78.3%
Taylor expanded in x around 0 78.3%
*-commutative78.3%
associate-*l*88.9%
Simplified88.9%
if 9.2e8 < t < 2.99999999999999998e166Initial program 87.0%
Simplified87.0%
Taylor expanded in x around 0 78.3%
Final simplification82.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
(let* ((t_1 (+ (* j (* k -27.0)) (* -4.0 (* x i)))))
(if (<= (* b c) -1e-26)
(- (* b c) (* 27.0 (* j k)))
(if (<= (* b c) -1.25e-194)
t_1
(if (<= (* b c) -1e-319)
(+ (* -4.0 (* t a)) (* -27.0 (* j k)))
(if (<= (* b c) 5.9e+178) t_1 (+ (* b c) (* 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 t_1 = (j * (k * -27.0)) + (-4.0 * (x * i));
double tmp;
if ((b * c) <= -1e-26) {
tmp = (b * c) - (27.0 * (j * k));
} else if ((b * c) <= -1.25e-194) {
tmp = t_1;
} else if ((b * c) <= -1e-319) {
tmp = (-4.0 * (t * a)) + (-27.0 * (j * k));
} else if ((b * c) <= 5.9e+178) {
tmp = t_1;
} else {
tmp = (b * c) + (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) :: t_1
real(8) :: tmp
t_1 = (j * (k * (-27.0d0))) + ((-4.0d0) * (x * i))
if ((b * c) <= (-1d-26)) then
tmp = (b * c) - (27.0d0 * (j * k))
else if ((b * c) <= (-1.25d-194)) then
tmp = t_1
else if ((b * c) <= (-1d-319)) then
tmp = ((-4.0d0) * (t * a)) + ((-27.0d0) * (j * k))
else if ((b * c) <= 5.9d+178) then
tmp = t_1
else
tmp = (b * c) + (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 t_1 = (j * (k * -27.0)) + (-4.0 * (x * i));
double tmp;
if ((b * c) <= -1e-26) {
tmp = (b * c) - (27.0 * (j * k));
} else if ((b * c) <= -1.25e-194) {
tmp = t_1;
} else if ((b * c) <= -1e-319) {
tmp = (-4.0 * (t * a)) + (-27.0 * (j * k));
} else if ((b * c) <= 5.9e+178) {
tmp = t_1;
} else {
tmp = (b * c) + (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): t_1 = (j * (k * -27.0)) + (-4.0 * (x * i)) tmp = 0 if (b * c) <= -1e-26: tmp = (b * c) - (27.0 * (j * k)) elif (b * c) <= -1.25e-194: tmp = t_1 elif (b * c) <= -1e-319: tmp = (-4.0 * (t * a)) + (-27.0 * (j * k)) elif (b * c) <= 5.9e+178: tmp = t_1 else: tmp = (b * c) + (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) t_1 = Float64(Float64(j * Float64(k * -27.0)) + Float64(-4.0 * Float64(x * i))) tmp = 0.0 if (Float64(b * c) <= -1e-26) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); elseif (Float64(b * c) <= -1.25e-194) tmp = t_1; elseif (Float64(b * c) <= -1e-319) tmp = Float64(Float64(-4.0 * Float64(t * a)) + Float64(-27.0 * Float64(j * k))); elseif (Float64(b * c) <= 5.9e+178) tmp = t_1; else tmp = Float64(Float64(b * c) + 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)
t_1 = (j * (k * -27.0)) + (-4.0 * (x * i));
tmp = 0.0;
if ((b * c) <= -1e-26)
tmp = (b * c) - (27.0 * (j * k));
elseif ((b * c) <= -1.25e-194)
tmp = t_1;
elseif ((b * c) <= -1e-319)
tmp = (-4.0 * (t * a)) + (-27.0 * (j * k));
elseif ((b * c) <= 5.9e+178)
tmp = t_1;
else
tmp = (b * c) + (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_] := Block[{t$95$1 = N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1e-26], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.25e-194], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -1e-319], N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 5.9e+178], t$95$1, N[(N[(b * c), $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}
t_1 := j \cdot \left(k \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;b \cdot c \leq -1 \cdot 10^{-26}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;b \cdot c \leq -1.25 \cdot 10^{-194}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot c \leq -1 \cdot 10^{-319}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right) + -27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;b \cdot c \leq 5.9 \cdot 10^{+178}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -1e-26Initial program 84.0%
Simplified88.5%
Taylor expanded in i around 0 84.3%
Taylor expanded in t around 0 73.4%
if -1e-26 < (*.f64 b c) < -1.2500000000000001e-194 or -9.99989e-320 < (*.f64 b c) < 5.89999999999999984e178Initial program 85.6%
Simplified88.6%
Taylor expanded in i around inf 59.1%
*-commutative59.1%
Simplified59.1%
if -1.2500000000000001e-194 < (*.f64 b c) < -9.99989e-320Initial program 88.8%
Simplified89.0%
Taylor expanded in a around inf 67.2%
*-commutative67.2%
*-commutative67.2%
associate-*r*67.2%
*-commutative67.2%
Simplified67.2%
Taylor expanded in t around 0 67.3%
if 5.89999999999999984e178 < (*.f64 b c) Initial program 73.1%
Simplified85.1%
Taylor expanded in i around 0 82.7%
Taylor expanded in t around 0 70.0%
sub-neg70.0%
*-commutative70.0%
distribute-rgt-neg-in70.0%
metadata-eval70.0%
*-commutative70.0%
associate-*l*70.0%
Applied egg-rr70.0%
Final simplification65.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 (- (* b c) (+ (* 4.0 (* x i)) (* 27.0 (* j k)))))
(t_2 (* j (* k -27.0)))
(t_3 (+ t_2 (* t (+ (* 18.0 (* x (* y z))) (* a -4.0))))))
(if (<= t -5.5e+142)
t_3
(if (<= t -1.7e+76)
t_1
(if (<= t -2e+27)
(+ t_2 (* 18.0 (* t (* y (* x z)))))
(if (<= t 8.5e+111) t_1 t_3))))))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 = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
double t_2 = j * (k * -27.0);
double t_3 = t_2 + (t * ((18.0 * (x * (y * z))) + (a * -4.0)));
double tmp;
if (t <= -5.5e+142) {
tmp = t_3;
} else if (t <= -1.7e+76) {
tmp = t_1;
} else if (t <= -2e+27) {
tmp = t_2 + (18.0 * (t * (y * (x * z))));
} else if (t <= 8.5e+111) {
tmp = t_1;
} else {
tmp = t_3;
}
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) :: t_3
real(8) :: tmp
t_1 = (b * c) - ((4.0d0 * (x * i)) + (27.0d0 * (j * k)))
t_2 = j * (k * (-27.0d0))
t_3 = t_2 + (t * ((18.0d0 * (x * (y * z))) + (a * (-4.0d0))))
if (t <= (-5.5d+142)) then
tmp = t_3
else if (t <= (-1.7d+76)) then
tmp = t_1
else if (t <= (-2d+27)) then
tmp = t_2 + (18.0d0 * (t * (y * (x * z))))
else if (t <= 8.5d+111) then
tmp = t_1
else
tmp = t_3
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 = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
double t_2 = j * (k * -27.0);
double t_3 = t_2 + (t * ((18.0 * (x * (y * z))) + (a * -4.0)));
double tmp;
if (t <= -5.5e+142) {
tmp = t_3;
} else if (t <= -1.7e+76) {
tmp = t_1;
} else if (t <= -2e+27) {
tmp = t_2 + (18.0 * (t * (y * (x * z))));
} else if (t <= 8.5e+111) {
tmp = t_1;
} else {
tmp = t_3;
}
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 = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k))) t_2 = j * (k * -27.0) t_3 = t_2 + (t * ((18.0 * (x * (y * z))) + (a * -4.0))) tmp = 0 if t <= -5.5e+142: tmp = t_3 elif t <= -1.7e+76: tmp = t_1 elif t <= -2e+27: tmp = t_2 + (18.0 * (t * (y * (x * z)))) elif t <= 8.5e+111: tmp = t_1 else: tmp = t_3 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(b * c) - Float64(Float64(4.0 * Float64(x * i)) + Float64(27.0 * Float64(j * k)))) t_2 = Float64(j * Float64(k * -27.0)) t_3 = Float64(t_2 + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) + Float64(a * -4.0)))) tmp = 0.0 if (t <= -5.5e+142) tmp = t_3; elseif (t <= -1.7e+76) tmp = t_1; elseif (t <= -2e+27) tmp = Float64(t_2 + Float64(18.0 * Float64(t * Float64(y * Float64(x * z))))); elseif (t <= 8.5e+111) tmp = t_1; else tmp = t_3; 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 = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
t_2 = j * (k * -27.0);
t_3 = t_2 + (t * ((18.0 * (x * (y * z))) + (a * -4.0)));
tmp = 0.0;
if (t <= -5.5e+142)
tmp = t_3;
elseif (t <= -1.7e+76)
tmp = t_1;
elseif (t <= -2e+27)
tmp = t_2 + (18.0 * (t * (y * (x * z))));
elseif (t <= 8.5e+111)
tmp = t_1;
else
tmp = t_3;
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[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.5e+142], t$95$3, If[LessEqual[t, -1.7e+76], t$95$1, If[LessEqual[t, -2e+27], N[(t$95$2 + N[(18.0 * N[(t * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.5e+111], t$95$1, t$95$3]]]]]]]
\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 := b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(j \cdot k\right)\right)\\
t_2 := j \cdot \left(k \cdot -27\right)\\
t_3 := t_2 + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + a \cdot -4\right)\\
\mathbf{if}\;t \leq -5.5 \cdot 10^{+142}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq -1.7 \cdot 10^{+76}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -2 \cdot 10^{+27}:\\
\;\;\;\;t_2 + 18 \cdot \left(t \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{+111}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if t < -5.50000000000000035e142 or 8.49999999999999983e111 < t Initial program 79.9%
Simplified91.1%
Taylor expanded in t around inf 88.8%
if -5.50000000000000035e142 < t < -1.6999999999999999e76 or -2e27 < t < 8.49999999999999983e111Initial program 85.4%
Simplified89.0%
Taylor expanded in t around 0 81.1%
if -1.6999999999999999e76 < t < -2e27Initial program 77.6%
Simplified67.0%
Taylor expanded in y around inf 78.3%
*-commutative78.3%
Simplified78.3%
Taylor expanded in x around 0 78.3%
*-commutative78.3%
associate-*l*88.9%
Simplified88.9%
Final simplification83.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
(let* ((t_1 (- (* b c) (+ (* 4.0 (* x i)) (* 27.0 (* j k)))))
(t_2 (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))
(if (<= t -7e+142)
t_2
(if (<= t -2.05e+76)
t_1
(if (<= t -2.35e+27)
(+ (* j (* k -27.0)) (* 18.0 (* t (* y (* x z)))))
(if (<= t 1.42e+166) t_1 t_2))))))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 = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -7e+142) {
tmp = t_2;
} else if (t <= -2.05e+76) {
tmp = t_1;
} else if (t <= -2.35e+27) {
tmp = (j * (k * -27.0)) + (18.0 * (t * (y * (x * z))));
} else if (t <= 1.42e+166) {
tmp = t_1;
} else {
tmp = t_2;
}
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 = (b * c) - ((4.0d0 * (x * i)) + (27.0d0 * (j * k)))
t_2 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
if (t <= (-7d+142)) then
tmp = t_2
else if (t <= (-2.05d+76)) then
tmp = t_1
else if (t <= (-2.35d+27)) then
tmp = (j * (k * (-27.0d0))) + (18.0d0 * (t * (y * (x * z))))
else if (t <= 1.42d+166) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && 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 = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -7e+142) {
tmp = t_2;
} else if (t <= -2.05e+76) {
tmp = t_1;
} else if (t <= -2.35e+27) {
tmp = (j * (k * -27.0)) + (18.0 * (t * (y * (x * z))));
} else if (t <= 1.42e+166) {
tmp = t_1;
} else {
tmp = t_2;
}
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 = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k))) t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0)) tmp = 0 if t <= -7e+142: tmp = t_2 elif t <= -2.05e+76: tmp = t_1 elif t <= -2.35e+27: tmp = (j * (k * -27.0)) + (18.0 * (t * (y * (x * z)))) elif t <= 1.42e+166: tmp = t_1 else: tmp = t_2 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(b * c) - Float64(Float64(4.0 * Float64(x * i)) + Float64(27.0 * Float64(j * k)))) t_2 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))) tmp = 0.0 if (t <= -7e+142) tmp = t_2; elseif (t <= -2.05e+76) tmp = t_1; elseif (t <= -2.35e+27) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(18.0 * Float64(t * Float64(y * Float64(x * z))))); elseif (t <= 1.42e+166) tmp = t_1; else tmp = t_2; 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 = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
tmp = 0.0;
if (t <= -7e+142)
tmp = t_2;
elseif (t <= -2.05e+76)
tmp = t_1;
elseif (t <= -2.35e+27)
tmp = (j * (k * -27.0)) + (18.0 * (t * (y * (x * z))));
elseif (t <= 1.42e+166)
tmp = t_1;
else
tmp = t_2;
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[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7e+142], t$95$2, If[LessEqual[t, -2.05e+76], t$95$1, If[LessEqual[t, -2.35e+27], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(18.0 * N[(t * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.42e+166], t$95$1, t$95$2]]]]]]
\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 := b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(j \cdot k\right)\right)\\
t_2 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -7 \cdot 10^{+142}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -2.05 \cdot 10^{+76}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -2.35 \cdot 10^{+27}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + 18 \cdot \left(t \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{elif}\;t \leq 1.42 \cdot 10^{+166}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -6.99999999999999995e142 or 1.41999999999999995e166 < t Initial program 81.0%
Simplified89.7%
Taylor expanded in j around 0 80.5%
Taylor expanded in t around inf 82.1%
if -6.99999999999999995e142 < t < -2.0499999999999999e76 or -2.34999999999999988e27 < t < 1.41999999999999995e166Initial program 84.6%
Simplified88.0%
Taylor expanded in t around 0 79.5%
if -2.0499999999999999e76 < t < -2.34999999999999988e27Initial program 77.6%
Simplified67.0%
Taylor expanded in y around inf 78.3%
*-commutative78.3%
Simplified78.3%
Taylor expanded in x around 0 78.3%
*-commutative78.3%
associate-*l*88.9%
Simplified88.9%
Final simplification80.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 (<= z 4e+229)
(-
(+ (* b c) (* t (- (* (* x 18.0) (* y z)) (* a 4.0))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))
(- (+ (* b c) (* t (- (* 18.0 (* z (* x y))) (* a 4.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 (z <= 4e+229) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = ((b * c) + (t * ((18.0 * (z * (x * y))) - (a * 4.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 (z <= 4d+229) then
tmp = ((b * c) + (t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0)))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
else
tmp = ((b * c) + (t * ((18.0d0 * (z * (x * y))) - (a * 4.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 (z <= 4e+229) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = ((b * c) + (t * ((18.0 * (z * (x * y))) - (a * 4.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 z <= 4e+229: tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k))) else: tmp = ((b * c) + (t * ((18.0 * (z * (x * y))) - (a * 4.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 (z <= 4e+229) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); else tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(z * Float64(x * y))) - Float64(a * 4.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 (z <= 4e+229)
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
else
tmp = ((b * c) + (t * ((18.0 * (z * (x * y))) - (a * 4.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[LessEqual[z, 4e+229], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $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}\;z \leq 4 \cdot 10^{+229}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) - a \cdot 4\right)\right) - 4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if z < 4e229Initial program 84.2%
Simplified89.6%
if 4e229 < z Initial program 72.7%
Simplified62.0%
Taylor expanded in j around 0 67.6%
expm1-log1p-u39.1%
expm1-udef39.1%
Applied egg-rr39.1%
expm1-def39.1%
expm1-log1p67.6%
associate-*r*78.2%
Simplified78.2%
Final simplification88.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
(let* ((t_1 (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))
(if (<= t -7.2e+142)
t_1
(if (<= t 1.12e-267)
(+ (* b c) (* j (* k -27.0)))
(if (<= t 5000000000.0)
(- (* b c) (* 4.0 (* x i)))
(if (<= t 8.2e+165) (+ (* -4.0 (* t a)) (* -27.0 (* j k))) 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 tmp;
if (t <= -7.2e+142) {
tmp = t_1;
} else if (t <= 1.12e-267) {
tmp = (b * c) + (j * (k * -27.0));
} else if (t <= 5000000000.0) {
tmp = (b * c) - (4.0 * (x * i));
} else if (t <= 8.2e+165) {
tmp = (-4.0 * (t * a)) + (-27.0 * (j * k));
} 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) :: tmp
t_1 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
if (t <= (-7.2d+142)) then
tmp = t_1
else if (t <= 1.12d-267) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else if (t <= 5000000000.0d0) then
tmp = (b * c) - (4.0d0 * (x * i))
else if (t <= 8.2d+165) then
tmp = ((-4.0d0) * (t * a)) + ((-27.0d0) * (j * k))
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 tmp;
if (t <= -7.2e+142) {
tmp = t_1;
} else if (t <= 1.12e-267) {
tmp = (b * c) + (j * (k * -27.0));
} else if (t <= 5000000000.0) {
tmp = (b * c) - (4.0 * (x * i));
} else if (t <= 8.2e+165) {
tmp = (-4.0 * (t * a)) + (-27.0 * (j * k));
} 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)) tmp = 0 if t <= -7.2e+142: tmp = t_1 elif t <= 1.12e-267: tmp = (b * c) + (j * (k * -27.0)) elif t <= 5000000000.0: tmp = (b * c) - (4.0 * (x * i)) elif t <= 8.2e+165: tmp = (-4.0 * (t * a)) + (-27.0 * (j * k)) 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))) tmp = 0.0 if (t <= -7.2e+142) tmp = t_1; elseif (t <= 1.12e-267) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); elseif (t <= 5000000000.0) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); elseif (t <= 8.2e+165) tmp = Float64(Float64(-4.0 * Float64(t * a)) + Float64(-27.0 * Float64(j * k))); 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));
tmp = 0.0;
if (t <= -7.2e+142)
tmp = t_1;
elseif (t <= 1.12e-267)
tmp = (b * c) + (j * (k * -27.0));
elseif (t <= 5000000000.0)
tmp = (b * c) - (4.0 * (x * i));
elseif (t <= 8.2e+165)
tmp = (-4.0 * (t * a)) + (-27.0 * (j * k));
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]}, If[LessEqual[t, -7.2e+142], t$95$1, If[LessEqual[t, 1.12e-267], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5000000000.0], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.2e+165], N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(-27.0 * N[(j * k), $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 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -7.2 \cdot 10^{+142}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.12 \cdot 10^{-267}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;t \leq 5000000000:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;t \leq 8.2 \cdot 10^{+165}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right) + -27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -7.2000000000000003e142 or 8.2000000000000005e165 < t Initial program 81.0%
Simplified89.7%
Taylor expanded in j around 0 80.5%
Taylor expanded in t around inf 82.1%
if -7.2000000000000003e142 < t < 1.12000000000000006e-267Initial program 87.4%
Simplified86.6%
Taylor expanded in b around inf 64.5%
if 1.12000000000000006e-267 < t < 5e9Initial program 78.1%
Simplified87.5%
Taylor expanded in j around 0 73.6%
Taylor expanded in t around 0 63.0%
if 5e9 < t < 8.2000000000000005e165Initial program 87.0%
Simplified93.4%
Taylor expanded in a around inf 53.2%
*-commutative53.2%
*-commutative53.2%
associate-*r*53.2%
*-commutative53.2%
Simplified53.2%
Taylor expanded in t around 0 53.2%
Final simplification67.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
(let* ((t_1 (* 4.0 (* x i))) (t_2 (* 18.0 (* x (* y z)))))
(if (<= j -1.4e+58)
(- (* b c) (+ t_1 (* 27.0 (* j k))))
(if (<= j 3.7e-119)
(- (+ (* b c) (* t (- t_2 (* a 4.0)))) t_1)
(+ (* j (* k -27.0)) (* t (+ t_2 (* a -4.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 = 4.0 * (x * i);
double t_2 = 18.0 * (x * (y * z));
double tmp;
if (j <= -1.4e+58) {
tmp = (b * c) - (t_1 + (27.0 * (j * k)));
} else if (j <= 3.7e-119) {
tmp = ((b * c) + (t * (t_2 - (a * 4.0)))) - t_1;
} else {
tmp = (j * (k * -27.0)) + (t * (t_2 + (a * -4.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) :: t_2
real(8) :: tmp
t_1 = 4.0d0 * (x * i)
t_2 = 18.0d0 * (x * (y * z))
if (j <= (-1.4d+58)) then
tmp = (b * c) - (t_1 + (27.0d0 * (j * k)))
else if (j <= 3.7d-119) then
tmp = ((b * c) + (t * (t_2 - (a * 4.0d0)))) - t_1
else
tmp = (j * (k * (-27.0d0))) + (t * (t_2 + (a * (-4.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 = 4.0 * (x * i);
double t_2 = 18.0 * (x * (y * z));
double tmp;
if (j <= -1.4e+58) {
tmp = (b * c) - (t_1 + (27.0 * (j * k)));
} else if (j <= 3.7e-119) {
tmp = ((b * c) + (t * (t_2 - (a * 4.0)))) - t_1;
} else {
tmp = (j * (k * -27.0)) + (t * (t_2 + (a * -4.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 = 4.0 * (x * i) t_2 = 18.0 * (x * (y * z)) tmp = 0 if j <= -1.4e+58: tmp = (b * c) - (t_1 + (27.0 * (j * k))) elif j <= 3.7e-119: tmp = ((b * c) + (t * (t_2 - (a * 4.0)))) - t_1 else: tmp = (j * (k * -27.0)) + (t * (t_2 + (a * -4.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(4.0 * Float64(x * i)) t_2 = Float64(18.0 * Float64(x * Float64(y * z))) tmp = 0.0 if (j <= -1.4e+58) tmp = Float64(Float64(b * c) - Float64(t_1 + Float64(27.0 * Float64(j * k)))); elseif (j <= 3.7e-119) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(t_2 - Float64(a * 4.0)))) - t_1); else tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(t * Float64(t_2 + Float64(a * -4.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 = 4.0 * (x * i);
t_2 = 18.0 * (x * (y * z));
tmp = 0.0;
if (j <= -1.4e+58)
tmp = (b * c) - (t_1 + (27.0 * (j * k)));
elseif (j <= 3.7e-119)
tmp = ((b * c) + (t * (t_2 - (a * 4.0)))) - t_1;
else
tmp = (j * (k * -27.0)) + (t * (t_2 + (a * -4.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[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -1.4e+58], N[(N[(b * c), $MachinePrecision] - N[(t$95$1 + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 3.7e-119], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(t$95$2 - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(t * N[(t$95$2 + N[(a * -4.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 := 4 \cdot \left(x \cdot i\right)\\
t_2 := 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\\
\mathbf{if}\;j \leq -1.4 \cdot 10^{+58}:\\
\;\;\;\;b \cdot c - \left(t_1 + 27 \cdot \left(j \cdot k\right)\right)\\
\mathbf{elif}\;j \leq 3.7 \cdot 10^{-119}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(t_2 - a \cdot 4\right)\right) - t_1\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + t \cdot \left(t_2 + a \cdot -4\right)\\
\end{array}
\end{array}
if j < -1.3999999999999999e58Initial program 78.2%
Simplified72.3%
Taylor expanded in t around 0 72.5%
if -1.3999999999999999e58 < j < 3.7000000000000001e-119Initial program 86.3%
Simplified94.5%
Taylor expanded in j around 0 89.1%
if 3.7000000000000001e-119 < j Initial program 83.0%
Simplified91.0%
Taylor expanded in t around inf 66.1%
Final simplification77.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 (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
(t_2 (* 27.0 (* j k))))
(if (<= t -7e-18)
(+ (* b c) t_1)
(if (<= t 4200000000.0)
(- (* b c) (+ (* 4.0 (* x i)) t_2))
(if (<= t 5.8e+167) (- (+ (* b c) (* -4.0 (* t a))) t_2) 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 = 27.0 * (j * k);
double tmp;
if (t <= -7e-18) {
tmp = (b * c) + t_1;
} else if (t <= 4200000000.0) {
tmp = (b * c) - ((4.0 * (x * i)) + t_2);
} else if (t <= 5.8e+167) {
tmp = ((b * c) + (-4.0 * (t * a))) - t_2;
} 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 = 27.0d0 * (j * k)
if (t <= (-7d-18)) then
tmp = (b * c) + t_1
else if (t <= 4200000000.0d0) then
tmp = (b * c) - ((4.0d0 * (x * i)) + t_2)
else if (t <= 5.8d+167) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - t_2
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 = 27.0 * (j * k);
double tmp;
if (t <= -7e-18) {
tmp = (b * c) + t_1;
} else if (t <= 4200000000.0) {
tmp = (b * c) - ((4.0 * (x * i)) + t_2);
} else if (t <= 5.8e+167) {
tmp = ((b * c) + (-4.0 * (t * a))) - t_2;
} 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 = 27.0 * (j * k) tmp = 0 if t <= -7e-18: tmp = (b * c) + t_1 elif t <= 4200000000.0: tmp = (b * c) - ((4.0 * (x * i)) + t_2) elif t <= 5.8e+167: tmp = ((b * c) + (-4.0 * (t * a))) - t_2 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(27.0 * Float64(j * k)) tmp = 0.0 if (t <= -7e-18) tmp = Float64(Float64(b * c) + t_1); elseif (t <= 4200000000.0) tmp = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(x * i)) + t_2)); elseif (t <= 5.8e+167) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - t_2); 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 = 27.0 * (j * k);
tmp = 0.0;
if (t <= -7e-18)
tmp = (b * c) + t_1;
elseif (t <= 4200000000.0)
tmp = (b * c) - ((4.0 * (x * i)) + t_2);
elseif (t <= 5.8e+167)
tmp = ((b * c) + (-4.0 * (t * a))) - t_2;
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[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7e-18], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, 4200000000.0], N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.8e+167], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $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 := 27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;t \leq -7 \cdot 10^{-18}:\\
\;\;\;\;b \cdot c + t_1\\
\mathbf{elif}\;t \leq 4200000000:\\
\;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + t_2\right)\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{+167}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -6.9999999999999997e-18Initial program 83.5%
Simplified89.0%
Taylor expanded in j around 0 76.5%
Taylor expanded in i around 0 72.5%
if -6.9999999999999997e-18 < t < 4.2e9Initial program 82.8%
Simplified86.8%
Taylor expanded in t around 0 85.5%
if 4.2e9 < t < 5.79999999999999949e167Initial program 87.0%
Simplified87.0%
Taylor expanded in x around 0 78.3%
if 5.79999999999999949e167 < t Initial program 81.9%
Simplified88.9%
Taylor expanded in j around 0 88.9%
Taylor expanded in t around inf 92.9%
Final simplification81.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 (<= (* b c) -9.2e-29)
(* b c)
(if (<= (* b c) 6.2e+71)
(* -27.0 (* j k))
(if (<= (* b c) 2.3e+182) (* a (* t -4.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 ((b * c) <= -9.2e-29) {
tmp = b * c;
} else if ((b * c) <= 6.2e+71) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= 2.3e+182) {
tmp = a * (t * -4.0);
} 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) <= (-9.2d-29)) then
tmp = b * c
else if ((b * c) <= 6.2d+71) then
tmp = (-27.0d0) * (j * k)
else if ((b * c) <= 2.3d+182) then
tmp = a * (t * (-4.0d0))
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) <= -9.2e-29) {
tmp = b * c;
} else if ((b * c) <= 6.2e+71) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= 2.3e+182) {
tmp = a * (t * -4.0);
} 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) <= -9.2e-29: tmp = b * c elif (b * c) <= 6.2e+71: tmp = -27.0 * (j * k) elif (b * c) <= 2.3e+182: tmp = a * (t * -4.0) 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) <= -9.2e-29) tmp = Float64(b * c); elseif (Float64(b * c) <= 6.2e+71) tmp = Float64(-27.0 * Float64(j * k)); elseif (Float64(b * c) <= 2.3e+182) tmp = Float64(a * Float64(t * -4.0)); 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) <= -9.2e-29)
tmp = b * c;
elseif ((b * c) <= 6.2e+71)
tmp = -27.0 * (j * k);
elseif ((b * c) <= 2.3e+182)
tmp = a * (t * -4.0);
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], -9.2e-29], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 6.2e+71], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2.3e+182], N[(a * N[(t * -4.0), $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 -9.2 \cdot 10^{-29}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq 6.2 \cdot 10^{+71}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;b \cdot c \leq 2.3 \cdot 10^{+182}:\\
\;\;\;\;a \cdot \left(t \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -9.19999999999999965e-29 or 2.3e182 < (*.f64 b c) Initial program 80.7%
Simplified89.9%
Taylor expanded in a around 0 79.1%
associate-+r+79.1%
associate-*r*79.1%
*-commutative79.1%
associate-*r*78.2%
associate-*l*78.2%
distribute-rgt-in78.2%
fma-def78.2%
fma-def78.2%
*-commutative78.2%
associate-*r*79.9%
associate-*l*79.9%
*-commutative79.9%
Simplified79.9%
Taylor expanded in i around 0 73.8%
+-commutative73.8%
associate-*r*71.9%
fma-def74.7%
*-commutative74.7%
*-commutative74.7%
associate-*r*75.7%
associate-*l*74.8%
*-commutative74.8%
associate-*r*74.8%
associate-*l*74.8%
Simplified74.8%
Taylor expanded in b around inf 60.5%
if -9.19999999999999965e-29 < (*.f64 b c) < 6.20000000000000036e71Initial program 85.0%
Simplified88.0%
Taylor expanded in j around inf 34.0%
if 6.20000000000000036e71 < (*.f64 b c) < 2.3e182Initial program 88.9%
Simplified94.1%
Taylor expanded in a around inf 51.4%
*-commutative51.4%
*-commutative51.4%
associate-*r*51.4%
*-commutative51.4%
Simplified51.4%
Taylor expanded in t around 0 51.3%
Taylor expanded in j around 0 45.8%
associate-*r*45.8%
*-commutative45.8%
associate-*l*45.8%
Simplified45.8%
Final simplification46.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) -1e-26)
(* b c)
(if (<= (* b c) 4e+72)
(* j (* k -27.0))
(if (<= (* b c) 2.3e+182) (* a (* t -4.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 ((b * c) <= -1e-26) {
tmp = b * c;
} else if ((b * c) <= 4e+72) {
tmp = j * (k * -27.0);
} else if ((b * c) <= 2.3e+182) {
tmp = a * (t * -4.0);
} 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) <= (-1d-26)) then
tmp = b * c
else if ((b * c) <= 4d+72) then
tmp = j * (k * (-27.0d0))
else if ((b * c) <= 2.3d+182) then
tmp = a * (t * (-4.0d0))
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) <= -1e-26) {
tmp = b * c;
} else if ((b * c) <= 4e+72) {
tmp = j * (k * -27.0);
} else if ((b * c) <= 2.3e+182) {
tmp = a * (t * -4.0);
} 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) <= -1e-26: tmp = b * c elif (b * c) <= 4e+72: tmp = j * (k * -27.0) elif (b * c) <= 2.3e+182: tmp = a * (t * -4.0) 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) <= -1e-26) tmp = Float64(b * c); elseif (Float64(b * c) <= 4e+72) tmp = Float64(j * Float64(k * -27.0)); elseif (Float64(b * c) <= 2.3e+182) tmp = Float64(a * Float64(t * -4.0)); 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) <= -1e-26)
tmp = b * c;
elseif ((b * c) <= 4e+72)
tmp = j * (k * -27.0);
elseif ((b * c) <= 2.3e+182)
tmp = a * (t * -4.0);
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], -1e-26], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 4e+72], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2.3e+182], N[(a * N[(t * -4.0), $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 -1 \cdot 10^{-26}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq 4 \cdot 10^{+72}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;b \cdot c \leq 2.3 \cdot 10^{+182}:\\
\;\;\;\;a \cdot \left(t \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -1e-26 or 2.3e182 < (*.f64 b c) Initial program 80.7%
Simplified89.9%
Taylor expanded in a around 0 79.1%
associate-+r+79.1%
associate-*r*79.1%
*-commutative79.1%
associate-*r*78.2%
associate-*l*78.2%
distribute-rgt-in78.2%
fma-def78.2%
fma-def78.2%
*-commutative78.2%
associate-*r*79.9%
associate-*l*79.9%
*-commutative79.9%
Simplified79.9%
Taylor expanded in i around 0 73.8%
+-commutative73.8%
associate-*r*71.9%
fma-def74.7%
*-commutative74.7%
*-commutative74.7%
associate-*r*75.7%
associate-*l*74.8%
*-commutative74.8%
associate-*r*74.8%
associate-*l*74.8%
Simplified74.8%
Taylor expanded in b around inf 60.5%
if -1e-26 < (*.f64 b c) < 3.99999999999999978e72Initial program 85.0%
Simplified88.0%
Taylor expanded in j around inf 34.0%
*-commutative34.0%
associate-*r*34.1%
*-commutative34.1%
Simplified34.1%
if 3.99999999999999978e72 < (*.f64 b c) < 2.3e182Initial program 88.9%
Simplified94.1%
Taylor expanded in a around inf 51.4%
*-commutative51.4%
*-commutative51.4%
associate-*r*51.4%
*-commutative51.4%
Simplified51.4%
Taylor expanded in t around 0 51.3%
Taylor expanded in j around 0 45.8%
associate-*r*45.8%
*-commutative45.8%
associate-*l*45.8%
Simplified45.8%
Final simplification46.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 (<= j -1.4e+65)
(- (* b c) (* 27.0 (* j k)))
(if (<= j 6.8e-99)
(- (* b c) (* 4.0 (* x i)))
(+ (* -4.0 (* t a)) (* -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 (j <= -1.4e+65) {
tmp = (b * c) - (27.0 * (j * k));
} else if (j <= 6.8e-99) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = (-4.0 * (t * a)) + (-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 (j <= (-1.4d+65)) then
tmp = (b * c) - (27.0d0 * (j * k))
else if (j <= 6.8d-99) then
tmp = (b * c) - (4.0d0 * (x * i))
else
tmp = ((-4.0d0) * (t * a)) + ((-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 (j <= -1.4e+65) {
tmp = (b * c) - (27.0 * (j * k));
} else if (j <= 6.8e-99) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = (-4.0 * (t * a)) + (-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 j <= -1.4e+65: tmp = (b * c) - (27.0 * (j * k)) elif j <= 6.8e-99: tmp = (b * c) - (4.0 * (x * i)) else: tmp = (-4.0 * (t * a)) + (-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 (j <= -1.4e+65) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); elseif (j <= 6.8e-99) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); else tmp = Float64(Float64(-4.0 * Float64(t * a)) + 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 (j <= -1.4e+65)
tmp = (b * c) - (27.0 * (j * k));
elseif (j <= 6.8e-99)
tmp = (b * c) - (4.0 * (x * i));
else
tmp = (-4.0 * (t * a)) + (-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[LessEqual[j, -1.4e+65], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 6.8e-99], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(-27.0 * N[(j * k), $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}\;j \leq -1.4 \cdot 10^{+65}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;j \leq 6.8 \cdot 10^{-99}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right) + -27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if j < -1.3999999999999999e65Initial program 78.2%
Simplified72.3%
Taylor expanded in i around 0 74.5%
Taylor expanded in t around 0 68.9%
if -1.3999999999999999e65 < j < 6.80000000000000014e-99Initial program 86.9%
Simplified93.9%
Taylor expanded in j around 0 87.9%
Taylor expanded in t around 0 60.4%
if 6.80000000000000014e-99 < j Initial program 82.1%
Simplified91.6%
Taylor expanded in a around inf 48.7%
*-commutative48.7%
*-commutative48.7%
associate-*r*48.7%
*-commutative48.7%
Simplified48.7%
Taylor expanded in t around 0 48.7%
Final simplification57.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 (or (<= (* b c) -6.5e-31) (not (<= (* b c) 8.8e+95))) (* 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) <= -6.5e-31) || !((b * c) <= 8.8e+95)) {
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) <= (-6.5d-31)) .or. (.not. ((b * c) <= 8.8d+95))) 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) <= -6.5e-31) || !((b * c) <= 8.8e+95)) {
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) <= -6.5e-31) or not ((b * c) <= 8.8e+95): 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) <= -6.5e-31) || !(Float64(b * c) <= 8.8e+95)) 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) <= -6.5e-31) || ~(((b * c) <= 8.8e+95)))
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], -6.5e-31], N[Not[LessEqual[N[(b * c), $MachinePrecision], 8.8e+95]], $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 -6.5 \cdot 10^{-31} \lor \neg \left(b \cdot c \leq 8.8 \cdot 10^{+95}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -6.49999999999999967e-31 or 8.7999999999999996e95 < (*.f64 b c) Initial program 80.7%
Simplified89.9%
Taylor expanded in a around 0 77.7%
associate-+r+77.7%
associate-*r*77.7%
*-commutative77.7%
associate-*r*77.6%
associate-*l*77.6%
distribute-rgt-in77.6%
fma-def77.6%
fma-def77.6%
*-commutative77.6%
associate-*r*78.5%
associate-*l*78.5%
*-commutative78.5%
Simplified78.5%
Taylor expanded in i around 0 70.4%
+-commutative70.4%
associate-*r*68.7%
fma-def71.2%
*-commutative71.2%
*-commutative71.2%
associate-*r*72.1%
associate-*l*72.1%
*-commutative72.1%
associate-*r*72.1%
associate-*l*72.1%
Simplified72.1%
Taylor expanded in b around inf 56.6%
if -6.49999999999999967e-31 < (*.f64 b c) < 8.7999999999999996e95Initial program 85.8%
Simplified88.6%
Taylor expanded in j around inf 33.8%
Final simplification44.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 (<= k -3.2e+47)
(+ (* b c) (* k (* j -27.0)))
(if (<= k 1.5e+28)
(- (* b c) (* 4.0 (* x i)))
(+ (* b c) (* 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 (k <= -3.2e+47) {
tmp = (b * c) + (k * (j * -27.0));
} else if (k <= 1.5e+28) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = (b * c) + (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) :: tmp
if (k <= (-3.2d+47)) then
tmp = (b * c) + (k * (j * (-27.0d0)))
else if (k <= 1.5d+28) then
tmp = (b * c) - (4.0d0 * (x * i))
else
tmp = (b * c) + (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 tmp;
if (k <= -3.2e+47) {
tmp = (b * c) + (k * (j * -27.0));
} else if (k <= 1.5e+28) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = (b * c) + (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 k <= -3.2e+47: tmp = (b * c) + (k * (j * -27.0)) elif k <= 1.5e+28: tmp = (b * c) - (4.0 * (x * i)) else: tmp = (b * c) + (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 (k <= -3.2e+47) tmp = Float64(Float64(b * c) + Float64(k * Float64(j * -27.0))); elseif (k <= 1.5e+28) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); else tmp = Float64(Float64(b * c) + 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 (k <= -3.2e+47)
tmp = (b * c) + (k * (j * -27.0));
elseif (k <= 1.5e+28)
tmp = (b * c) - (4.0 * (x * i));
else
tmp = (b * c) + (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[k, -3.2e+47], N[(N[(b * c), $MachinePrecision] + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.5e+28], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -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}\;k \leq -3.2 \cdot 10^{+47}:\\
\;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;k \leq 1.5 \cdot 10^{+28}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if k < -3.2e47Initial program 77.4%
Simplified85.9%
Taylor expanded in i around 0 76.4%
Taylor expanded in t around 0 69.2%
sub-neg69.2%
*-commutative69.2%
distribute-rgt-neg-in69.2%
metadata-eval69.2%
*-commutative69.2%
associate-*l*69.2%
Applied egg-rr69.2%
if -3.2e47 < k < 1.5e28Initial program 87.8%
Simplified91.2%
Taylor expanded in j around 0 80.4%
Taylor expanded in t around 0 49.4%
if 1.5e28 < k Initial program 78.2%
Simplified80.6%
Taylor expanded in b around inf 64.8%
Final simplification57.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 (<= t 6.5e+167) (+ (* b c) (* j (* k -27.0))) (* a (* t -4.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+167) {
tmp = (b * c) + (j * (k * -27.0));
} else {
tmp = a * (t * -4.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+167) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else
tmp = a * (t * (-4.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+167) {
tmp = (b * c) + (j * (k * -27.0));
} else {
tmp = a * (t * -4.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+167: tmp = (b * c) + (j * (k * -27.0)) else: tmp = a * (t * -4.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+167) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); else tmp = Float64(a * Float64(t * -4.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+167)
tmp = (b * c) + (j * (k * -27.0));
else
tmp = a * (t * -4.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[t, 6.5e+167], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(t * -4.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}\;t \leq 6.5 \cdot 10^{+167}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(t \cdot -4\right)\\
\end{array}
\end{array}
if t < 6.5e167Initial program 83.6%
Simplified89.3%
Taylor expanded in b around inf 54.9%
if 6.5e167 < t Initial program 81.9%
Simplified88.9%
Taylor expanded in a around inf 51.3%
*-commutative51.3%
*-commutative51.3%
associate-*r*51.3%
*-commutative51.3%
Simplified51.3%
Taylor expanded in t around 0 51.3%
Taylor expanded in j around 0 51.3%
associate-*r*51.3%
*-commutative51.3%
associate-*l*51.3%
Simplified51.3%
Final simplification54.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 (* 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 83.4%
Simplified89.2%
Taylor expanded in a around 0 76.4%
associate-+r+76.4%
associate-*r*76.4%
*-commutative76.4%
associate-*r*76.9%
associate-*l*76.9%
distribute-rgt-in78.1%
fma-def78.1%
fma-def78.1%
*-commutative78.1%
associate-*r*79.7%
associate-*l*79.7%
*-commutative79.7%
Simplified79.7%
Taylor expanded in i around 0 64.5%
+-commutative64.5%
associate-*r*64.8%
fma-def66.0%
*-commutative66.0%
*-commutative66.0%
associate-*r*65.3%
associate-*l*65.0%
*-commutative65.0%
associate-*r*65.0%
associate-*l*65.0%
Simplified65.0%
Taylor expanded in b around inf 28.3%
Final simplification28.3%
(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 2024018
(FPCore (x y z t a b c i j k)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, E"
:precision binary64
:herbie-target
(if (< t -1.6210815397541398e-69) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b))) (if (< t 165.68027943805222) (+ (- (* (* 18.0 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4.0)) (- (* c b) (* 27.0 (* k j)))) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b)))))
(- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))